Monday, August 2, 2010

SAP HR - Creation of the customer specific Operation and Rule

Hi.........Today  we will try to learn to create the customer specific Operation and Rule. First we will start with the naming conventions for Operations and rules

Operations and Functions :
Naming convention for Operations: Name of the operations and functions should have special character as a part of name except the signs : * # " . + : , '
Transaction code for operations and functions: PE04

Rule:
Naming convention for Rule: Name of the rule should start with the letter Z
Transaction code for operations and functions: PE04

We will take one example to create the customer specific operation and Rule. I will be using A-E1 for operation and ZAP1 for rule. Please follow the below steps,
Step 1 - Create the customer specific OperationA-E1
Step 2 - Copy the code for operation A-E1
Step 3 - Create customer specific rule ZAP1
Step 4 - Place the Rule ZAP1 in customer specific schema


Step 1 - Create the customer specific Operation A-E1

(1)  On the SAP Easy Access screen, enter the transaction PE04. The Maintain Functions and Operations 
      screen appears.

(2)  Enter A-E1 in the Name field.

(3) Select Object class as Payroll for payroll objects and Object type as Operation.

(4) Choose Create.

(5) After clicking create button system will take you to the next screen and enter “Text name” as the  
     description of the operation

(6) In the Parameters section, please specify a model for the model number. Here we will enter DG in the  
      Model field. Choose 'Enter' in the Structure field and OOOOSVVVVV appears. Which means first 4    
      O’s will be the Characters which present in the name of  the operation, S is the operation indicator and
      we are using '?' as the operation indicator. We are using 5 as length of value parameter and because of  
      that we are using 5 V’s in the structure.

(7) In Country assignment section, we can select the country for which we are writing the operation. We will
       select India as a country assignment.

(8) Choose Insert line. The first row of the parameter fields is editable

(9)  Val. F is a 1st independent parameter. Here you must specify the operation field .This field refers to the  
       F block of the operation in table T52BM. In our example we are not using the 1st independent
       parameter and we are leaving Val. F field blank

(10) Val. S is a 2nd independent parameter. This field refers to the S block of the operation in table  
       T52BM. In our example we are using ?(compare) as 2nd independent parameter . Enter ? in Val. S field

(11) Type V field is dependent parameters. There are many types are available(please check F1 help of that
       field) and we will have 'All'(All characters that can be printed and displayed) in Type V field

(12) Lngth V is a Length of value parameter and we will enter 5 in Lngth V field

(13) Meaning field is meant for parameter text and we will enter comparison in the Meaning field as we are  
       comparing the values.

(14) If you want to run a more extensive check on the parameter settings of an operation, you must enter the
        number of the special case in the Check # field. You can only do this if the field 'Customer check   
        routine'  has been flagged for the operation in table T52BN and as we are not using that, we will leave 
       Check # field blank

(15)  Reac field means reaction indicator and we will enter D as we need to use request operation. The
        reaction indicators allowed are listed below. The characters that may be used as the first character of 
        the reaction

(16) Specify the type of variable key in VKeyT field . There are many types are available(please check F1  
        help of that field)

(17) We are entering COMPARE in VKeyT field as we need to do comaprision.

(18) VKyLngth field is for legth of variables we are using 1 in VKyLngth field

(19) Click on “Save”

(20) Click on “Activate”


Screen Shot 01 :













Screen Shot 02:



















Step 2 - Copy the code for operation A-E1

(1)  On the SAP Easy Access screen, enter the transaction SE38. The ABAP Editor: Initial Screen appears.

(2)  Enter PCBURZIN0 in the Program field. Note: PCBURZIN0 is provided used to create customer
       specific functions and operations.

(3)  Choose Display <-> Change (Ctrl+F1). You can now copy the following code.

Note : It might ask for an access key, if this is your first modification of the Include. Since this code is in the customer specific "area" of coding within the Payroll driver, there is no need for any further maintenance from your end in case of support packages/upgrades etc.

* --------------------------------CODE STARTS FROM HERE------------------------

*----------------Write code here


*--------------------------------CODE ENDS HERE--------------------------------

After copying the above code:

(4) Choose Save.

(5) Choose Activate (Ctrl+F3) to activate the copied code.

Screen Shot 03:













Screen Shot  04:












Step 3 - Create customer specific rule ZAP1

(1) On the SAP Easy Access screen, enter the transaction PE02. The Personnel Calculation Rules screen
     appears.

(2) Enter ZAP1 in the Name field.

(3) Choose Create, attributes of Rule are displayed.

(4) Maintain Short text for the Rule

(5) Select Program class (The program class defines the purpose of the object.) as C and Country grouping 
     (In this field, enter the country for which the personnel calculation rule can be used. This entry also affects 
     the use of operations and their parameters. You can only use the operations and parameters which are
     permitted for the country grouping.) as 40(As we are considering INDIA) in the attributes.

(6) Choose 'Save'.

(7) We are selecting ES grouping as * (The employee subgroup grouping for personnel calculation rules is a
     control indicator for payroll programs. The same rules apply to employees who have the same grouping)
     and Wage/time type as **** (The wage/time type is used in conjunction with the employee subgroup
     grouping for personnel calculation rules to define the wage type and/or time type and the employees for
     whom the personnel calculation rule is to be processed during payroll accounting or time evaluation.)

(8) Choose Display <-> Change (Ctrl+F1).

(9) In the first row we are entering D in the T (Rule type) field and A-E1?11/60 in the Operation field where 
     A-E1 is the operation and ? will check for the return value of the operation and if it is 11/60 then it is
     true else it is false

(10) In the second row Enter * in the VarKey (Variable key) field and SCOND=T IF in the Operation field

(11) In the third row Enter < in the VarKey (Variable key) field and SCOND=F IF in the Operation field

(12) Choose check.

(13) Choose Save.


Screen Shot 05:


































Step 4 - Place the Rule ZAP1 in customer specific schema which starts with Z

(1) Insert Rule ZAP1 wherever it is needed inside the customer specific schema which starts with Z. We can
      use the standard functions 'IF' and 'ENDIF' to use the rule for specific conditions.


References:
SAP R/3 System

2 comments: