SAP ABAP IMG Activity SIMG_OHAE664 (Define rules)
Hierarchy
SAP_HRCES (Software Component) Sub component SAP_HRCES of SAP_HR
   PY-ES (Application Component) Spain
     P04C (Package) HR Customizing: Spain
IMG Activity
ID SIMG_OHAE664 Define rules  
Transaction Code S_AHR_61005764   IMG activity: SIMG_OHAE664 
Created on 19981221    
Customizing Attributes SIMG_OHAE664   Define rules 
Customizing Activity    
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name SIMG_OHAE664    

You only need to set up rules for a payroll journal form if specific information in conjunction with specific conditions must be printed on a remuneration statement.

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 by another piece of information.

Rules can be defined for all variable information, that is, for information that can differ from employee to employee. Variable information is set up in the step 'Individual fields'.

A rule is assigned to a specific piece of information by the rule number of the information.

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 condition of a rule. It includes the following fields:

    • Table
    • Field
    • Offset for comparison
    • Comparison length
    • Comparison type
    • Comparison operator
    • First comparison value
    • Second comparison value

  • THEN component

    This component contains the replacement values for a piece of information. The replacement values are used if the condition of the IF component is fulfilled. The THEN component includes the following fields:

    • Table
    • Field
    • Position (gap in form)
    • Output length
    • 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.

The individual components and their fields in the "Modify rules" screen of the form editor 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 that you set up in preceding steps.

Number

The field Number is used to number the rule lines. Rule line numbering starts at "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.

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, be as follows:

"IF information xy is equal to z, ..."

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

  • Table
  • Field
  • Offset for comparison
  • Comparison length
  • Comparison type
  • Comparison operator
  • First comparison value
  • Second comparison value

The above condition could, for example, be assigned to these fields as follows:

"Information xy"    -> stored in the Table and Field fields

"is equal to"     -> stored in the Comparison operator field

"z"     -> stored in the First comparison value field

Table and field

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

  • The specified name is identical to the 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 name is not identical to the 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..."

Name restrictions

The fields Table and Field are subject to certain restrictions with regard to what can and cannot be entered.

  • The specified table name must be identical to the individual field table to which the rule is assigned.

    Example:

    You want to assign a rule to the individual field "Employee's personnel number" which is stored in field "PERNR" in table "PERNR". In this example, you can only specify "PERNR" as the Table and Field fields that are stored in table "PERNR".

  • If a rule is assigned to an individual field stored in table "SCHLW", the field specified in the rule 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 case, only "SCHLW" can be specified as the Table and "PHIRE" as the Field.

  • Fields from the following tables can be specified as IF components in every rule:

        EVP

        PN

        PERM (table applies to Germany only)

        STAT

        SY

        VERSC

Offset and comparison length

You need to make entries in these fields if only certain parts of the information specified must 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. The Offset and Comparison length enable you to restrict the information specified for the comparison in the IF component to specific characters. When entering the data in the field, take careful note of the following:

  • Data may only be entered in these fields if "C" has been specified in the field Comparison type.

  • The total value resulting from the Offset and the Comparison length must not exceed the predefined field length (type-specific length of printout).

    Example:

    You only want the last two characters of the company code for internal comparison. To do this, you enter the following in the fields Offset and Comparison length:

    Offset        CL

    002        002

The company code has 4 characters. The value "002" in the field Offset determines that information should only be used as of the third character. The second value "002" in the field Comparison length determines that two characters must be used, starting from the third character.

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-character 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 for the comparison carried out within the IF component. The comparison operator is a two-character value which can have the following settings:

"EQ"    (equal)

"NE"    (not equal)

"GE"    (greater or equal)

"GT"    (greater than)

"LE"    (less or equal)

"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
Business Attributes
ASAP Roadmap ID 204   Establish Functions and Processes 
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 2   Non-critical 
Country-Dependency I   Valid for countries specified 
Customizing Attributes Country Key Country Name
SIMG_OHAE664 ES Spain
Assigned Application Components
Documentation Object Class Documentation Object Name Current line number Application Component Application Component Name
SIMG SIMG_OHAE664 0 HLA0008547 Payroll Journal 
Maintenance Objects
Maintenance object type    
History
Last changed by/on SAP  19981221 
SAP Release Created in