Ansicht
Dokumentation

SIMG_OHAF450 - Address

SIMG_OHAF450 - Address

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

This step enables you to set up special processing rules.

You only need to carry out this step if specific information must be printed on a remuneration statement that depends on specific conditions.

Conditions for printing information can be stored in the system as rules. A rule can determine, for example, that information is only printed or selected if the value of the information exceeds a specified value. A rule can also determine that under a specific condition, one piece of information is replaced on the payroll account by another piece of information.

Rules can be defined for all variable information, that is, for information which can be different from employee to employee. Variable information is set up in the following steps:

  • "Set up data in fixed positions"
  • "Set up line layout in window"
  • "Set up wage types in window"

A rule is assigned to a specific piece of information by the rule number. This is stored in the field Rule for form editing in each of the steps named above.

SETTING UP AND PROCESSING A RULE

A rule can include one or more lines. Every rule line consists of the following components:

  • ID component
This component contains the rule identification. It includes the following fields:
  • Rule

  • Number

  • IF component
This component contains the logical rule condition. It includes the following fields:
  • Field name

  • Comparison type

  • Comparison operator

  • First comparison value

  • Second comparison value

  • Offset/length for comparison

  • THEN component
This component contains the replacement values for a piece of information. The replacement values are taken into account if the condition in the IF component is fulfilled. The THEN component includes the following fields:
  • Offset

  • Output length

  • New value if condition is fulfilled

  • Conversion

  • Subsequent component
This component controls the processing of further rule lines. The component includes the following field:
  • Subsequent rule indicator

The IF and THEN components form the basis of a rule. They specify how a variable piece of information is printed, and under which conditions.

When a payroll account is created, the system carries out a comparison within the IF component for every piece of variable information to be printed to which a rule has been assigned. This can give rise to the following:

  • The condition stored in the IF component has been fulfilled. In this case, the THEN component is processed first (that is, the replacement values stored there are used. The subsequent component is then interpreted.
  • The condition stored in the IF component has not been fulfilled. In this case, the subsequent component is interpreted directly.

The subsequent component determines whether subsequent rule lines are processed (that is, if subsequent rule lines exist).

If more than one rule line is processed for a rule, the replacement values stored in the same rule line are used for every fulfilled condition. To prevent replacement values from overlapping if more than one condition is fulfilled, the replacement values stored in the individual rule lines must be chosen accordingly.

If the specified condition has not been fulfilled in any rule line, the information to which the rule is assigned is not printed on the payroll account.

The individual components and their fields are explained in more detail below.

ID COMPONENT

A rule is identified using the fields Rule and Number.

Rule

The field Rule contains a two-digit number (01-99) for every rule. Using this number, the rule can be assigned to one or more variable pieces of information which you set up in previous work steps.

Number

The field Number is used to number the rule lines. Rule line numbering starts with "01" and is sequential. This means that number "01 must always be assigned to the first rule line, number "02" to the second rule line, and so on.

The rule identification could, for example, be as follows:

Rule   Number
01   01
01   02

In this example, the rule and number fields define rule "01" which consists of two lines.

IF COMPONENT (logical condition)

The logical condition of a rule determines the IF conditions under which replacement values stored in the THEN component are used instead of the information that would normally be printed. The logical condition could, for example, look as follows:

"If information xy equals z, ... "

The logical condition of a rule is stored in the following fields:

  • Field name
  • Offset/offset length
  • Comparison type
  • Comparison operator
  • First comparison value
  • Second comparison value

The above condition can be assigned to these fields as follows:

Information xy,,,,-> stored in the field Field name
"equal to" ,,,,-> stored in the field Comparison operator
"z" ,,,,-> stored in the field First comparison value

Field name

The field name of the information to which the condition refers is stored in the field Field name. The following relationships may exist between the field name and the variable information to which the rule is assigned:

  • The specified field name is identical to the field name of the information to which the rule is assigned. Using "employee's personnel number" as an example, this means that a rule is assigned to the variable information "employee's personnel number" which starts as follows: "If the employee's personnel number..."
  • The specified field name is not identical to the field name of the information to which the rule is assigned. Using "employee's personnel number" as an example, this means that a rule is assigned to the variable information "employee's personnel number" which starts, for example, as follows: "If the employee's religious denomination..."

Field names are specified in the field Field name firstly by the table which contains the field followed by a hyphen followed by the field name itself. In the overview "allowed field names", you will find all of the fields restrictions listed below.

Example:
You want to specify the field "PERNR" from table "PERNR" in the field Field name. To do this, please enter the following:
PERNR-PERNR

For further information on entering field names, please refer to the steps "Set up data in fixed positions" and "Set up line layout in window".

Field name restrictions

The field Field name is subject to certain restrictions regarding what can and cannot be entered. Constants and text modules CANNOT be entered in the field Field name Only the fields of certain tables are allowed.

The following principle applies to whether or not a field is allowed:

The field specified in the field Field name must come from the same table such as the field which contains the variable information to which the rule is assigned.

Example:
You want to assign a rule to the variable information "employee's personnel number" which is stored in the field "PERNR" in table "PERNR". In this example, you can only specify fields in the field Field name which are stored in table "PERNR".

The following exceptions apply to the above principle:

  • If a rule is assigned to variable information stored in table "SCHLW", the field specified in the Field name field must be identical to the field from which the variable information originates.
Example:
You want to assign a rule to the variable information "Hiring date of employee" which is stored in the field "PHIRE" in table "SCHLW". In this example, only PHIRE can be specified in the field Field name.
  • The fields form the following tables can be specified as field names in every rule in the field Field name:
,,EVP
,,PN
,,PERM (table applies to Germany only)
,,STAT
,,SY
,,VERSC

Comparison type

The comparison type allows you to specify whether a numeric comparison or a comparison of character strings is carried out within the IF component. The comparison type is a one-digit value with two possible settings:

  • "C"
Specify "C" to compare character strings.
  • "N"
Specify "N" to carry out a numeric comparison.

Comparison operator

This field enables you to specify the comparison operator that is used comparison for the comparison carried out within the IF component. The operator is a two-character value which can have the following settings:

"EQ",,(equal to)
"NE",,(not equal to)
"GE",,(greater than or equal to)
"GT",,(greater than)
"LE",,(less than or equal to)
"LT",,(less than)
"BE",,(between)
"CS",,(contains string)

The following dependencies exist between the comparison type and the comparison operator:

  • The comparison operator "CS" can only be used in conjunction with comparison type "C".
  • The comparison operators "GE", "GT", "LE", "LT" and "BE" can only be used in conjunction with comparison type "N".

First comparison value

This enables you to enter the value against which the information stored in the field Field name is compared.

The entry in this field can be a constant value, a constant or a table field.

  • Constant value
If you specify a constant value, it must be preceded by an apostrophe which identifies the value as a constant value.
Example:
You want to enter "0" as a constant value in the field First comparison value. To do this, please enter the following:
'0
Decimals as constant values
If numbers are specified after a decimal point as part of a constant value in the field First comparison value, the decimal point that is chosen depends on the comparison type:
Comparison type Decimal point
"N" "." (for example "0.50")
"C" depending on the user values in the
program starter, for example:
in Germany: ","(comma)
in the USA:"."(period)

If numbers are specified as a constant value which include a decimal point, it is recommended that you use comparison type "N".
  • Constant
The fields "HDATE" and "LDATE" in table "SCHLW" are both constants. Fields from table "SCHLW" can be specified simply by entering the field name of the field.
Example:
You want to enter the constant "HDATE" in the field First comparison value. To do this, please enter the following:
HDATE
  • Table field
The restrictions listed for the field Field name also apply to table fields in the field First comparison value.
If you specify a table field, you must first enter the table which contains the field, followed by a hyphen, followed by the field name itself.
Example:
You want to specify the field "BEGDA" from table "PN" in the field First comparison value. To do this, please enter the following:
PN-BEGDA

For further information on constant values and table fields, please refer to the steps "Set up data in fixed positions" and Set up line layout in window.

Second comparison value

An entry in this field is only necessary or useful if the comparison operator "BE" (between) is used. This is the case if the information stored in the field Field name is compared against a specific set of values.

The same entry options and restrictions apply to the field Second comparison value as apply to the field First comparison value.

Offset/length for comparison

You need to make an entry in this field if only certain parts of the information specified in the field Field namemust be used in the logical condition. It is conceivable, for example, that only the last two characters of The company code are relevant to the comparison within the IF component rather than the entire company code. The field Offset/length for comparison enables you to restrict the information specified in the Field name field to specific characters for the comparison within the IF component.

The field Offset/length consists of five characters and is divided into two areas. The first three characters contain the comparison offset, ie. the point from which the information is relevant to the comparison. The last two characters contain the length of the comparison.

When entering data in the field Offset/length for comparison, please take careful note of the following:

  • Data may only be entered in this field if "C" has been specified in the field Comparison type.
  • The total value resulting from "Offset for comparison" and "Offset for length" must not exceed the predefined field length (type-specific length of printout) of the information specified in the field Field name.
Example:
You only want to use the last two characters of the company code for an internal comparison. To do this, please enter the following in the field Offset/length for comparison:
00202
The company code has 4 characters. The first value "002" determines that information should only be used as of the third character. The second value "02" determines that two characters must be used, starting from the third character.

THEN COMPONENT (replacement values)

This component contains the replacement values for the variable information to which the rule is assigned. The replacement values are printed if the condition within the IF component has been fulfilled.

The THEN component includes the following fields:

  • Offset
  • Output length
  • New value if condition fulfilled
  • Conversion

For every piece of variable information to which a rule is assigned, the values in these fields replace the original values determined in the work steps "Set up data in fixed positions", "Set up line layout in window" and "Set up wage types in window".

The original value is used for fields for which nothing has been entered within the THEN component.

Offset

This field enables you to specify the column as of which the information (original information or replacement value) is printed.

Output length and conversion

For a list of entry options and restrictions for the fields Output length and Conversion, please refer to the steps "Set up data in fixed positions" and "Set up line layout in window".

New value if condition fulfilled

This field contains the replacement value that is printed instead of the variable information if the condition of the IF component is fulfilled.

The entry in this field can be a constant value, a text module identifier or a table field.

  • Constant value
If you specify a constant value, it must be preceded by an apostrophe which identifies it as a constant value.
Example:
You want to enter "0" as a constant value in the field Field name.To do this, please enter the following:
'0
  • Text module identifier
If you enter a text module identifier (such as "TEXT01") which you have already specified in the step "Set up text modules", please note that a hyphen must be placed between the character string "TEXT" and the respective text module number.
Example:
You want to enter the text module "Personnel number" with identifier "TEXT05" in the field Field name. To do this, please enter the following:
TEXT-05
  • Table field
The restrictions listed above for the field Field name also apply to the field New value if condition is fulfilled.
If you specify a table field, you must first enter the table which contains the field, followed by a hyphen, followed by the field name itself.
Example:
You want to enter the field "IAPER" from table "EVP" in the field New value if condition is fulfilled. To do this, please enter the following:
EVP-IAPER

For further information on constant values, text modules and table fields, please refer to the steps "Set up data in fixed positions" and "Set up line layout in window".

SUBSEQUENT COMPONENT

This component controls the processing of further rule lines. It includes the following field:

Subsequent rule indicator

The field Subsequent rule indicator is a one-character field which can have the following settings:

  • " "
  • "*"
  • "S"

The meaning of this setting depends on whether the condition in the preceding IF component has been fulfilled.

  • ""
If the condition in the IF component has been fulfilled, the system does not search for a subsequent rule line.
If the condition in the IF component has not been fulfilled, the system searches for a subsequent rule line.
  • "*"
The system searches for a subsequent rule line irrespective or whether the condition was fulfilled or not.
  • "S"
If the condition in the IF component has been fulfilled, the system searches for a subsequent rule line which has an entry in the field Field name that is different from the current rule line.
If the condition in the IF component has not been fulfilled, the system searches for a subsequent rule line which has the same entry in the field Field name as the current rule line.

If a subsequent line is not found, then no information is used or printed (that is, not even the original information!).

THE EFFECT OF A RULE

The effect of a rule depends on whether you assign the rule to information in fixed positions, a layout or a wage type in a window.

Rules for information in fixed positions

If you assign a single or multi-line rule to fixed layout information in the step "Set up data in fixed positions" and if one or several rule conditions have been fulfilled, the specified replacement values are used instead of the original values.

If none of the rule conditions has been fulfilled, nothing is printed (not even the original values).

Layout rules

If you assign a single or multi-line rule to a layout entry in the step "Set up line layout in window", the same information applies as listed above under "Rules for information in fixed positions".

Rules for wage types in a window

If you assign a single or multi-line rule to a wage type in a window via the step "Set up wage types in window" and if one or several rule conditions have been fulfilled, the specified replacement values are used instead of the original values.

If none of the rule conditions is fulfilled, the wage type is not selected for printout in the window. This means that there are no unsightly blank lines in the window.

EXAMPLE

You find a list of the abbreviations used in the example under the heading "Abbreviations used" at the end of this step.

In the step "Set up data in fixed positions", you set up the date of an employee's leaving. The date of leaving set up as a default for every employee still active within your corporation is the highest system date (31.12.9999). You only want this date to be printed on a payroll account if the employee has already left the corporation (that is, the date is not equal to"31.12.9999"). You can achieve this by assigning the following rule to the entry for the leaving date(PFIRE) in the step "Set up data in fixed positions":

Ru No Field Offlg V CO Val1   ...
03 01 PFIRE   N NE '99991231

Number "03" was chosen as the rule number in the ID component in this example.

In the IF component, in the field Field name, you must specify the table field that contains the leaving date of an employee ("PFIRE"). In the field First comparison value, enter the value against which the leaving date should be compared. In this example, this value is "99991231" and it can be specified as a constant value (that is, preceded by an apostrophe). A check should be carried out to ensure that the leaving date is not equal to "31.12.9999" In the field Comparison operator, you must therefore specify# the comparison operator "NE" (not equal to). An "N" in the field Compmarison type specifies that a numeric comparison is carried out in the IF component.

There are no entries in the THEN component. This means that, if the condition has been fulfilled, the original values for the information " leaving date " are taken into account. If the condition has not been fulfilled, nothing is printed.

The entry in the subsequent component specifies that a search will only be carried out for a subsequent rule line if the condition has not been fulfilled. Since this does not exist, processing of the rule is terminated after the first (and only) rule line.

Abbreviations used

In the example shown, the following abbreviations are used:

Ru Rule form
No Number
Field Field name
Offlg Offset / length for comparison
V Comparison type
CO Comparison operator
Val1 First comparison value

Activities

  1. Set up the required rules.
  2. Assign each rule number of the rules you set up to the corresponding variable information. To do this, please return to the steps in which the variable information was set up.





PERFORM Short Reference   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 32554 Date: 20240523 Time: 214801     sap01-206 ( 418 ms )