SAP ABAP Data Element VARGT (Variable function part)
Hierarchy
SAP_HRRXX (Software Component) Sub component SAP_HRRXX of SAP_HR
   PA-PA (Application Component) Personnel Administration
     PBAS (Package) SAP HR Master Data Application Development
Basic Data
Data Element VARGT
Short Description Variable function part  
Data Type
Category of Dictionary Type D   Domain
Type of Object Referenced     No Information
Domain / Name of Reference Type CHAR100    
Data Type CHAR   Character String 
Length 100    
Decimal Places 0    
Output Length 100    
Value Table      
Further Characteristics
Search Help: Name    
Search Help: Parameters    
Parameter ID   
Default Component name    
Change document    
No Input History    
Basic direction is set to LTR    
No BIDI Filtering    
Field Label
  Length  Field Label  
Short 10 Var.part 
Medium 15 Var.func.part 
Long 20 Var. function part 
Heading 55 Variable function part 
Documentation

Definition

The variable function part, which depends on the indicator for step, can have the following meaning:

P - Plausibility checks

You can enter values for specific infotype fields. Field names must be entered in full. Literals and constants can serve as comparison values. These must be enclosed by inverted commas. Variables can also be used.

The old value of a field can be used for comparison; the field name must be preceded by PSAVE-.

If fields of other infotypes are used for comparison, these must be stored in the module pool of the current infotype.

The following comparison operators are supported:

  • =         equal to,
  • <         less than,
  • <=         less than or equal to,
  • >         greater than
  • >=         greater than or equal to and
  • <>         not equal to.

Consecutive checks must be linked by a logical AND. Logical OR links must also be indicated by a /X.

Note:
Note that all checks with OR links must have a /X.

If the result of the comparison operation is not "true", then the following commands (I, F, W etc.) are skipped over until a field is reached or a new comparison operation takes place.

Examples

Infotype Field ..... Ind. Variable function part
  • 0007 STAT3 P P0007-STAT3='0'
  • 0007 STAT3 P PSAVE-STAT3='1'
    The step is taken if the value in the P0007-STAT3 field changes from 1 to 0.
  • 0007 P P0013-KLKZ1<>'0'/X
  • 0007 P P0013-ALVKZ<>'0'/X
    0007 P P0013-RVKZ1<>'0'/X
    0007 P P0013-RVNUM=SPACE
    The first three conditions are linked by an OR; at least one of these conditions must be met. Condition 4 must always be met.
    The step is taken if the following holds true:
    P0013-KVKZ1 not equal to 0 or P0013-ALVKZ not equal to 0 or P0013-RVKZ1 not equal to 0, and P0013-RVNUM empty.

I - Maintain infotype record

Enter the step, infotype, subtype, object ID, start and end dates of the record and an indicator which defines whether the step is to be run in the background. The possible actions are INS, COP, MOD, and DEL.

Use commas to separate selection criteria just like the separator in the matchcode. If an entry is missing, the system inserts a comma.

Separate the indicator for suppressing dialog from other entries by a slash D (/D).

Constants, such as those for subtypes, are not enclosed in inverted commas.

Variable entries are also permitted. Fields containing such values must be put in brackets.

Examples:
Infotype Field .... Ind. Variable function part
  • .... I INS,19,01/D
  • Step: Create a Dates record, subtype 01, run in the background

  • .... I DEL,14,M559

    Step: Delete Rec. Payments/Deds. record with subtype (wage type) M559.

  • 0007 .... I INS,8,,,(P0007-BEGDA),(P0007-ENDDA)
  • Step: Create a Basic Pay record (0008) without subtype and object ID. The start and end dates are the same as those in the current Planned Working Time record (0007); specify these two fields only if they are filled because the dynamic action was triggered by this infotype.

W - Default values for new record

Literals or variables are used as default values.

Set the defaults for the infotype, subtype, object ID, start and end dates using an I step and not a W step.

Do not set defaults for Q fields of an infotype because the values for these fields are derived from the corresponding P fields.

Examples

Infotype Subtype ..... FC Ind. Variable function part
  • 0021 2 04 I INS,0015,M430
  • 0021 2 04 W P0015-BETRG='10000'
    When a Family/Related Person record (0021) record with subtype 2 (child) is created, an Additional Payments record (0015) with a default amount of 100.00 is created.

V - Cross-reference to another step

Here, you can combine fields to groups. The variable function part contains the value in the field which follows the "field" column. Steps which are specified only for the following field are also triggered for each of the other fields.

Examples

Infotype Field ..... FC Ind. Variable function part
  • 0016 PRBZH 06 V PRBZT
  • 0016 PRBZT 06 I DEL,0019,01/D
    Infotype 0019, subtype 01 is deleted in the background when the field PRBZT or PRBZH in infotype 0016 is changed or created (function code 06).

    The following entries are equivalent:

  • 0016 PRBZH 06 I DEL,0019,01/D
  • 0016 PRBZT 06 I DEL,0019,01/D

F - Call a routine

You can call internal (module pool) as well as external routines.

If you call external routines, type the program name in brackets after the routine name. Do not specify 'using' parameters. When calling an external routine, all data must be declared in a common part. You can use the fields of structure RP50D to return values from the routine. These are not used in the standard system and can only be populated via the routine and then can be used for defaults (W-Commands).

This allows customer-specific routines to be formulated with all the above steps.

Example 1:

  • Infotype Field ..... Ind. Var.function part
  • 0016 PRBZT F PROBATION
  • 0016 PRBZT I INS,19,01
    0016 PRBZT W P0019-VTRMN=PRBEND

Module pool MP001600 contains the PROBATION routine. This routine uses the entries in the fields P0016-PRBZT and P0016-PRBEH to determine the end of the probation period which it stores in the field PRBEND.
The system creates a new 'Dates' record with the reminder date = PRBEND.

Example 2:

Infotyp ..... Ind. Var. function part
0001 F GET_DATE(ZPUDYN01)
0001 I INS,19,01
0001 W P0019-VTRMN=RP50D-DATE1

The GET_DATE routine in program ZPUDYN01 calculates a date and enters this date in the RP50D-DATE1 field via "TABLES RP50D" in ZPUDYN01. This date can be user-defined in GET_DATE: if necessary, user-defined infotypes can be read afterwards.

M - Send a mail

Enter the name of the feature which defines the characteristics of the mail.

Example

Infotype Field ..... Ind. Var.function part
  • 0001 SACHP M M0001

A mail is sent when the field SACHP is changed. The characteristics of the mail are defined in feature M0001.

In the standard system, feature M0001 is provided as a model. The documentation on feature M0001 explains how to define the characteristics of a mail.

&ADDITIONAL HINTS&

  • If you use a date as a constant, enter it as YYYYMMDD (YYYY=year, MM=month, DD=day).

The table strings T001P, T503 and PSPAR are filled with the values which are valid on the record start date.

The old values of the infotype are stored in the field string PSAVE. The structure of this string is the same as the Pnnnn structure (nnnn=infotype). The structure is filled with (valid) values only when the delete, change and create functions are used.

Please read Create dynamic actions in the Implementation Guide.

History
Last changed by/on SAP  19980617 
SAP Release Created in