Setting Up Average Calculation Rules

Objectives

After completing this lesson, you will be able to:
  • Set-up payroll rules to remunerate employees
  • Adjust payroll calculations using averages

Adjustment Rules

Images showing a hospital patient with an IV line, wearing a gown, and sitting on a bed thinks about sales discussions. A person in the HR department, wearing headphones, contemplates payroll remuneration and average values.

If an employee is sick or is on leave, certain remuneration elements such as commission, bonuses for piecework, and overtime are reduced for that employee. As a result, the employer often pays the average values of variable remuneration.

You can also use the average calculation procedure in HR Payroll for different purposes. For example, you can calculate average values for fixed payments.

Time Wage Type Valuation

Flowchart showing the processing of data from the input table to the output table. Specifies valuation basis, and depending on the response (yes or no), follows different paths for valuation.

In personnel calculation rule X015, the system checks if the internal table Input Table (IT) contains time wage types that have not yet been valuated. To do so, the system checks the contents of the value fields AMT (amount), NUM (number), and RTE (rate).

This results in one of the following situations:

  • If the RTE or AMT field contains an amount, the wage type is transferred to the internal table Output Table (OT).
  • If the AMT field is empty, the NUM field contains a number, and the RTE field contains a rate, then the NUM field is multiplied by the RTE field. The result is stored in the AMT field, and the wage type is transferred to table OT.
  • If only the NUM field contains an entry because only a number (for example, hours) was entered, and if the AMT and the RTE fields are both empty, the system queries whether a valuation basis has been specified for the wage type. If this is the case, the wage type is valuated using the specified valuation basis.
  • If no valuation basis is specified, valuation takes place according to the principle of averages if an average valuation is assigned to the wage type. If this is not the case, the wage type is not valuated using a monetary value.

Create an Average Calculation Rule

Business Example

Until now, your company valuated wage type 40## using a constant value of EUR 20.00 per leave day. From payroll period 05 onward, employees have to be paid the average of all remuneration effected for overtime over the past three payroll periods for each leave day.

Use the Project IMG to create cumulation rules for average bases for all employees.

Steps

  1. Delimit the valuation of wage type 40## vacation bonus, which was previously constant at EUR 20. Delimit the existing entry for the wage type to the start date of payroll period 05 and remove the indicator for constant valuation from the new record (## is your group number).

    1. To delimit the valuation of wage type 40## and delete the ID for constant valuation from the new record, in the IMG, choose PayrollPayroll InternationalTime Wage Type ValuationValuation BasesAssign Valuation Bases.

      Alternatively, you can call the table v_512w_B directly through transaction SM30.

    2. Use the Position button to go directly to your wage type 40##. Choose Delimit. Enter the first day of payroll period 05 as the new Start Date. Choose Continue.

    3. Edit the delimited entry by deleting the value K for the valuation basis of the current wage type.

    4. Press Enter and save your changes.

      To review your changes, select your wage type 40## and choose ExpandCollapse. All entries for your wage type are shown and can be reviewed by choosing Detail.

  2. Create a cumulation rule for both the cumulation of overtime remuneration in wage type /201 and for the cumulation of the bonuses in /202. The content of the AMT field should be cumulated positively. Name your cumulation rule ZC## (## is your group number).

    1. To create cumulation rule ZC##, in the IMG, choose PayrollPayroll InternationalTime Wage Type ValuationNew AveragesCreate Calculation Rules for Averages.

    2. Choose the activity Cumulation Rules for Bases for Calculating Average Values.

    3. Create a cumulation rule ZC##, using two lines in the table. Enter 01/01/ of the current year through 12/31/9999 as the validity period. Enter the following:

      Cumul. RuleCumul. TextAv. BasisStart DateEnd DateRTE+NUM+AMT+Adj. rule
      ZC##your choice/20101/01/ current year12/31/9999    X+ 
      ZC##your choice/20201/01/ current year12/31/9999    X+ 
  3. Adjust the average formula. Copy personnel calculation rule X018 to Z8## and store an average calculation formula there that divides the average of the total of the cumulated average bases by the number of workdays in three payroll periods.

    Note

    You can use operation NUM = GADIVP to access the field ADIVP in the view Payroll Parameters Related to Time Units (V_T510H).
    1. To adjust the average formula, in the IMG, choose PayrollPayroll InternationalTime Wage Type ValuationNew AveragesCreate Calculation Rules for Averages.

    2. Choose the activity Modify Average Formula (Personnel Calculation Rule).

    3. Copy rule X018 to Z8##.

    4. Select Change.

    5. Delete the entire rule structure below the Wage Type field (blue box containing ****) and add the following processing link.

      Name of the calculation rule1. Tree2. TreeOperationDecision OperationVariable Key
      Z8## Calculation of average after cumulation: AMT / NUM.*    
        ****   
         

      NUM=GADIVP

      NUM*3

      AMT=M

      DIVID ANR

        
          <

      rte=0

      ADDWT *

          *

      RTE=1

      RTE*KGENAU

      ADDWT *

    6. Place the cursor on this field **** and select Create.

    7. Select Sub-level.

    8. Enter NUM=GADIVP in the input field and press Enter.

      Enter NUM*3.00 in the input field and press Enter.

      Enter AMT=M in the input field and press Enter.

      Enter DIVID ANR in the input field and press Enter twice.

    9. Press Enter twice.

    10. Select Check. If there are no errors, chooseSave to store your rule.

  4. Create your final processing rule ZE## with your personnel calculation rule Z8##.

    1. To create final processing rule ZE##, in the IMG, choose PayrollPayroll InternationalTime Wage Type ValuationNew AveragesCreate Calculation Rules for Averages.

    2. Choose the activity Final Processing Rules for Averages.

    3. By using the New Entries option, enter the following:

      Final proc (Rule for final processing of average calculation)FPr (Final average processing)Short description
      ZE##Z8##Calculation
  5. Now, set up your calculation rule for averages ZA##.

    Use the following information:

    FieldValue
    AV ruleZA##
    AV rule textYour choice
    Start date01.01. current year
    End date12.31.9999
    Cumul. ruleZC##
    Final procZE##
    Relev. av per3
    Time unit1
    1. To create average calculation rule ZA##, in the IMG, choose PayrollPayroll InternationalTime Wage Type ValuationNew AveragesCreate Calculation Rules for Averages.

    2. Choose the activity Create Calculation Rules for Averages.

    3. Use the New Entries option to enter the following data to create the rule.

      FieldValue
      AV ruleZA##
      AV rule textYour choice
      Start date01.01. current year
      End date12.31.9999
      Cumul. ruleZC##
      Final procZE##
      Relev. av per3
      Time unit1
  6. For your wage type 40##, store the assignment to your calculation rule for averages with a start date of payroll period 07. Use the following information:

    FieldValue
    Wage type40##
    Start dateStart of period 07
    End date12.31.9999
    AV. ruleZA##
    1. To assign the average calculation rule to wage type 40##, in the IMG, choose PayrollPayroll InternationalTime Wage Type ValuationNew AveragesAssign the Valuation of Averages to a Primary Wage Type.

    2. Use the New Entries option to enter the following data.

      FieldValue
      Wage type40##
      Start dateStart of period 07
      End date12.31.9999
      AV. ruleZA##
  7. Enter a few days leave for your employee in payroll period 08 using attendance/absence type 0100. Release the payroll period and start the payroll run. Check that the absence remuneration is calculated with an average value.

    1. To record an absence for your employee and test the processing of averages, on the SAP Easy Access screen, choose Human ResourcesPersonnel ManagementAdministrationHR Master DataPA30 - Maintain.

    2. Enter the personnel number 400991## and choose the infotype menu Working times.

    3. Select the Absences infotype and choose Create (F5). Create an absence in period 08 with absence type 0100.

    4. Save your infotype record.

    5. Run payroll for period 08 and check that the absence has been valuated using your average calculation rule. On the SAP Easy Access screen, choose Human ResourcesPayrollInternationalPayrollRelease Payroll (for period 07).

    6. On the SAP Easy Access screen, choose Human ResourcesPayrollInternationalPayrollStart Payroll. Choose your selection variant and run payroll by using the Execute (F8) button.

    7. To review the result, check the detail display Input, Processing and Output for function AVERA in the log section Processing of time data.

      Note

      Do not exit payroll for period 08.

Adjust Average Calculation Bases

Business Example

The new vacation bonus provision in your company specifies that an employee’s vacation bonus must be adjusted if the employee receives a pay increase. In this case, the average calculation bases of the last three previous periods must be adjusted by the appropriate factor. The factor is determined using the difference in valuation basis /001 before and after the increase in pay.

Use the Project IMG to adjust the average calculation bases when there is a change in remuneration.

Steps

  1. Increase your employee’s basic pay infotype 0008 as of the start of payroll period 08 by increasing the amount of the direct bonus in wage type 50## to EUR 500 (## is your group number).

    1. To release the payroll area for correction, on the SAP Easy Accessscreen, choose Human ResourcesPayrollInternationalPayrollCorrections.

    2. To increase the basic pay infotype 0008 of your employee, on the SAP Easy Accessscreen, choose Human ResourcesPersonnel ManagementAdministrationHR Master DataPA30 - Maintain.

    3. Enter the personnel number 400991##. Select the Basic Pay infotype 0008 and choose Copy. Enter the first day of period 08 of the current year as the new start date. Increase the amount of wage type 50## to EUR 500.

    4. Press Enter and save the new record.

  2. Now, create the adjustment rule ZJ## for your average calculation rule ZA##. The adjustment should take place if there is a positive change to the employee’s pay within the 3 periods being used in the calculation. The increase should be determined by comparing the values in wage type /001. Use the following information:

    FieldValue
    Adj. ruleZJ##
    NameYour Choice
    Adj.type4
    +/-P
    Comp. wt/001
    Adjust. per3
    Time unit01
    1. In the IMG, choose PayrollPayroll InternationalTime Wage Type ValuationNew AveragesCreate Calculation Rules for Averages.

    2. Choose the activity Create Modification Rules.

    3. Make the following entries in the table:

      FieldValue
      Adj. ruleZJ##
      NameYour Choice
      Adj.type4
      +/-P
      Comp. wt/001
      Adjust. per3
      Time unit01

      Press Enter and save your entries.

  3. Modify your cumulation rule ZC## by entering your adjustment rule in the AMT field.

    1. In the IMG, choose PayrollPayroll InternationalTime Wage Type ValuationNew AveragesCreate Calculation Rules for Average.

    2. Choose the activity Cumulation Rules for Bases for Calculating Average Values.

    3. Add adjustment rule ZJ## to both entries that define your cumulation rule ZC## by entering ZJ## in the Adj.rule field to the right of the AMT/+ field.

  4. Repeat the payroll run for payroll period 08 and check the change in the calculated average value for wage type 40##.

    1. To do so, on the SAP Easy Accessscreen, choose Human ResourcesPayrollInternationalPayrollRelease Payroll.

    2. On the SAP Easy Accessscreen, choose Human ResourcesPayrollInternationalPayrollStart Payroll. Choose your selection variant and run payroll by choosing Execute (F8).

    3. To review the result, check the detail display Input, Processing and Output for function AVERA in the log section Processing of time data.