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

Average Cumulation Rules

Image showing cumulation rules for average bases table with columns for cumulation rule, average basis, valid from, end date, RTE + AR, NUM + AR, AMT + AR, and factor. Labels explain cumulated fields and factors.

In the cumulation rules, specify which average value calculation basis wage types /2## should be used. When doing so, you determine which field ( RTE(Rate), NUM(Number), or AMT) should be used to cumulate the wage types and if the cumulation should be positive (+) or negative (–). If you do not make any entries, the relevant field is not cumulated.

If you have created adjustment rules and if these should be used when cumulating, enter the adjustment rule required for every field.

Modifying Average Formulas

Flowchart explaining the calculation of the average after cumulation of NUM, RTE, and AMT using personnel calculation rule X018. The process utilizes values from cumulation table MV and updates the work area for wage type.

An average calculation must result in the RTE field containing a valuation basis. The formula used to calculate this value is included in personnel calculation rule X018.

The internal table MV contains the cumulations for averages.

Standard rule X018 uses the formula amount/number to calculate hourly rates.

Final Processing Rules and Comparison Rules

Image showing two tables: Final Processing Rules for Averages with ZEND Z018, divide by standard workdays; Creating Comparison Rule for Average Calculation with ZCOM 4711 AMT; comparison rules explained.

Create the final processing rules that you require. You can reselect certain periods for final processing from the relevant average periods and store a delivered or modified final processing rule.

Define the comparison rules for calculated average values. If you do not want to compare the calculated average value, you do not need to make any settings.

The calculated value can be compared with a value specified here, for example, the standard pay. Specify which value should be used, under which conditions. The system then uses the calculated value or the comparison value accordingly as the average value.

Calculation Rules for Averages

Images showing calculation rules for averages (ZAV1, ZAV2) valid from 01.01.2010 to 12.31.2015. Indicates values frozen for absences (A) and calendar year (1). Definitions for calendar month, weeks, rolling month.

Create the calculation rules using the previously defined relevancy rules, cumulation rules, final processing rules, and comparison rules.

Specify from how many previous periods the relevant average periods should be selected, and whether the current period should be included. Select a time unit for the relevant average periods.

Specify if the calculated average value should be frozen. The rate is then stored in the AVERAGE table in the payroll results. For example, in the case of an absence covering several payroll periods, use the calculated average value throughout. You can also use an average value that was calculated in the first payroll period of the year in all the payroll periods in the year.

If you want to use a relevancy test to determine the relevant period, you must enter the maximum number of relevant periods and the time unit you require.

If it is possible to pay the employee a definite amount instead of the calculated value, enter the wage type you wish to use for this purpose.

You can specify which weekday should be the last day in a calendar week with the help of feature LDAYW. If you want to change the feature, please consider that this will also affect Time Management.For example, you can use the Hourly Average field to create an average for an employee’s overtime for the last three months. The system calculates this average and places the value calculated in the Number field.

Assign Average Valuation to a Primary Wage Type

Image showing wage types assigned to average calculation rules. Wage types include Vacation bonus and Average, with respective average rules ZAV1 and ZAV2. Both rules end on 12.31.9999.

In this step, you must maintain all primary wage types that are to be valuated using an average. These wage types are created in payroll either after they were generated from the attendances and absences, or after you have entered them, for example, in the infotype 2010.

Specify which wage type should be calculated according to which average calculation rule.

Relevancy Rule for Average Calculation

Image titled Creating the Relevancy Rule for Average Calculation. The rule ZREL: N for Legal Person, N for Rehiring, N for Partially Relevant, 1 for Relevant Average Period, and Functional Mode. Annotations detail each check.

While defining a relevancy rule, you need to specify whether an average period should be relevant for the calculation of averages under the conditions specified. You can use any 4-digit sequence of characters starting with the letter Z or a number between 0 and 9 as a name range.

If you do not use a relevancy rule, the system uses all the average periods for average calculation.

You can define the processing of the relevancy test under the following circumstances:

  • Define processing of the relevancy test when the legal person changes: check (Y) or no check (N).
  • Define processing of the relevancy test when an employee is rehired: check (Y) or no check (N).
  • Define processing of the relevancy test for partially relevant periods: no check (N), only take the results that do not overlap into consideration (C) or take all the results into consideration (A).
  • Define processing of the period’s relevancy: average period is relevant if a result (1) or if all results (A) are relevant.

If you perform a relevancy test with a function module, you specify its name.

Excluding the Relevancy of Off-Cycle Reasons

Image titled 'Excluding the Relevancy of Off-Cycle Reasons' shows a row with 'Rel. rule: ZREL', 'Relevancy rule text: Rel. test for incentive wages', 'OC-reason: 0001', and 'Description: Holiday bonus'.

If you do not use an Off-Cycle Payroll, you do not need to make these settings. Otherwise, you specify which Off-Cycle Payroll runs should no longer be taken into consideration.

Adjustment Rules

Image depicting a table for creating adjustment rules with labeled components: Adjustment rule, description, adjustment type, positive/negative adjustment, comparison wage type, number of periods, time unit, and wage type.

If you need to adjust the average bases to retroactively increased payments for the employee, you must create an adjustment rule that can be used in the cumulation rules.

For each rule, specify which adjustment type (multiplication factor) should be used to adjust the average bases or whether the adjustment should be made for individual employees using a wage type. If you use adjustment type 4, enter the required /0## wage type in the Comparison Wage Type field. Decide whether the adjustment should only take place in the case of a positive multiplication factor (P) or also for a negative factor (B).

Determine the number of periods to be adjusted retroactively and the time unit for the average periods.

If you want to retroactively adjust the average bases in your own way, specify a wage type here. In this way, you override the adjustment rule. In the payroll period in which the change of average bases becomes effective, use this wage type to assign an individual percentage to your employee, usually an increase percentage. To do so, enter the percentage, where, for example, ‘105’ corresponds to an increase of 5% and ‘95’ corresponds to a decrease of 5%, in the Amount field for the wage type in the master data.

Processing Averages in Schema

  • XT00 Time data processing INTERNATIONAL
  • .
  • MOD XMOD GEN Determine payroll modifiers
  • RAB Import absences
  • .
  • DAYPR TC00 Day processing of time data
  • .
  • PAB Edit absence data
  • .
  • P2010 X930 GEN NOAB Edit employee remuneration information
  • PIT X015 GEN Valuation of time wage types
  • AVERA Calculation of averages

Time wage types are entered in the internal table Input Table (IT) after the time data and employee remuneration information are processed. Personnel calculation rule X015 then determines which wage types only have a value in the NUM field. If a valuation basis has been specified for a relevant wage type, it is used in personnel calculation rule X115 to valuate the wage type.

If processing class 15 has been maintained for the relevant wage type, personnel calculation rules X016, X017, and X018 are used to calculate the averages.

The AVERA function selects the wage types that are to be evaluated in accordance with the new average calculation procedure.

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.