Understand Payroll Wage Type Processing Payroll Schema and Rule Basics Download-1
Understand Payroll Wage Type Processing Payroll Schema and Rule Basics Download-1
Table 1
2100 0 0 100.00
2100 0 0 100.00
4200 0 0 20.00
Now copy the SAP-standard schema U000 to ZUA1 and comment out the initialization schema UIN0 (Figure 3).
In the schema editor, create the production schema (don’t copy it from anything) in my example ZUA0. Be sure to
check the Schema can be executed checkbox. (See Figure 4.) Only executable schemas can be entered into the
payroll driver selection screen.
The production schema ZUA0 is a simple one, just two lines. (See Figure 5.) First, you call the initialization
schema, and then you call the main calculation schema ZUA1.
Copy schema ZUA0 to your test schema ZUAT. (See Figure 6.) You want ZUAT to ignore the control record, so
have it use schema UIN0 for initialization. Remember that CHECK ABR is commented out in UIN0. Therefore, both
the production and test schemas now use the same calculation logic in schema ZUA1 – which keeps them in sync.
Your custom rules for these examples will go in a copy of schema UAP0. Copy UAP0 to ZUA3 and add lines for
each of the five examples. (See Figure 7.) Edit schema ZUA1 to COPY ZUA3 instead of COPY UAP0 (not shown).
When changing schemas and rules, you can go directly to the Documentation section at the first screen of the
editor. Or, while editing, use the Goto>Documentation menu. Either method takes you to an editor. The editor
shown in Figure 8 is from the Enterprise release, and the appearance and functions can change from one release
to another. Rule ZUA0 has no documentation.
Typical documentation might look like what is shown in Figure 9. Another U2 heading was added for Modification
History.
If you are using the schema ZUA0 for production payroll, the payroll period is always left at Current period unless
you are only running simulations, which tells the payroll driver to get the current pay period from the payroll control
record. If you use the test schema ZUAT, you could select Other period and then enter whatever period and year
you want to run, and save those results (only in a non-production system). The payroll area in this section is
required and tells the payroll driver which payroll area to use for deriving the current period, the period begin and
end dates, and other payroll area-related data.
The selection section specifies which groups of employees you include in the payroll run. The payroll area entered
here determines which ones are included in the payroll run. These payroll areas need to have the same setup as
the one entered at the top of the screen – the same period definition and pay dates, for example.
General program control is used to tell the payroll driver how to run the payroll. Off-cycle payroll uses various
reason codes, and those codes can be entered here. If running an off-cycle payroll, you specify the type of payroll
and the date of that payroll in the Off-cycle payroll line. The schema line specifies the main schema to use for the
calculation. If you want to force a payroll run to go back to a certain date and recalculate everything since then, that
date is entered in the Force retro.accounting as of field. And finally, there is an option for a test run – also known
as a simulation run.
The log tells you that one employee was selected, and one employee was successfully calculated. The number of
periods calculated may be more than the number of employees, since it counts the current and retrocalculated
periods. Employees rejected from payroll would be counted in the Rejected line. The payroll driver rejects
employees for two primary reasons – a lack of basic and consistent master data, and customization errors.
Each node can be opened to view deeper levels of processing, until you get down to a particular function and/or
rule. To get to my example, you expand the nodes to the point shown in Figure 13.
For the PIT function and rule ZUA8, you can see the Input, Processing, and Output sections. These sections vary
by function and operation, but are vital to testing and troubleshooting. If you double-click the PIT function, the
payroll driver displays the contents of the input, processing, and output sections together in one list. Or you can
double-click any one section to see its contents alone. Likewise, you can further expand each section to see
individual components – in this case, wage types.
The rule’s treatment of wage types is also affected by how it is called by the function. The rule gets its wage types
from the function, so the function controls what the rule can process. Parameter 2 has the following values:
GEN – Only access the ‘****’ wage type section of the rule.
Pxx – Like GEN but brings along the value of the processing class ‘xx’.
Exx – Same as Pxx except for evaluation classes.
(blank) – Access the section of the rule that corresponds to the current wage type
The employee subgroup grouping for personnel calculations rules is maintained via view v_503_b.
Figure 17 shows the processing section for rule ZUA1, showing calculation done on wage type 0BAS.
See Figure 18 for the IT after rule ZUA1 was processed, showing the new wage type 0COL with the same A and
AP splits as wage type 0BAS, and 0.15 in the NUM field to reflect the percentage used in calculation.
If the employee is in personnel area ACAF, then you look at which employee subgroup they are in (OUTWP
operation with the PERSB option). If they are in employee subgroup PS, then you calculate COLA.
For employees who are not in personnel area ACAF, or are in ACAF but not employee subgroup PS, you perform
the ADDWT * operation. This copies wage type 0BAS from the header row to the IT. If you didn’t do this, that wage
type would be dropped from the payroll calculation at this point.
Notice how the PIT function starts with rule ZUA4, branches to ZUA5 and then returns. When wage type 0COL is
entered via infotype 2010, the rule’s behavior changes. The IT before processing now has 0COL in it (Figure 21).
The processing section now sees 0COL and simply passes it on to the outgoing IT table (Figure 22).
Notice that if wage type 0COL is entered for someone who is not in personnel area ACAF and employee subgroup
PS, then it would be paid anyway. Rules ZUA4 and ZUA5 are processed only for wage type 0BAS. So if wage type
0COL existed in the IT before this rule, it would simply be passed on to the next function. This can be restricted by
customizing views v_511_b, v_503_g and v_001p_k so that 0COL cannot be entered for this combination of
personnel areas and employee subgroups.
Example 4
Hard-coding amounts and wage types into rule is a bad practice. Example 4 is the same calculation logic as
Example 3, but the amounts are moved into constants, and use a processing class to specify the COLA wage base.
Table t511k, or view v_t511k, holds payroll constants. These constants are date-effective, and are read with the
end-date of the pay period being calculated.
First you set up the new processing class. For customer-defined processing classes, start with 99 and work down.
For this case, use processing class 90. In the IMG, go to the section for processing and evaluation classes (Figure
23).
Execute the Maintain processing classes and their specifications item, and create processing class 90. Note
that you can click on the blue "i" icon to document the processing class (Figure 24).
Select the processing class 90 row and then double-click on Processing class specifications. Here is where you
define each value of processing class 90 (Figure 25). You can also document each value. Then go to view
v_512w_o to set wage type 0BAS processing class 90 equal to 1.
Now you create the constants in t511k (using transaction sm30 and view v_t511k). Each constant can be
documented (Figure 26).
Rule ZUA3 also changes since you now have to execute a rule for a specific processing class. Use the P90 value
for parameter 1 (line 150). (See Figure 27.)
When payroll runs, the processing section for rules ZUA6 and ZUA7 look much the same as before, except you see
constants and processing classes (Figure 28).
Figure 28 Processing section for rules ZUA6 and ZUA7 with constants and processing classes
Example 5
The last example involves the handling of wage type splits. Some of the splits have documentation, others don’t.
When viewing the RT table with the pc_payresult transaction (or the Display Results option in the Tools menu in
Payroll), select a split value with your cursor and then press F1 for help. This gives you the full name for the split
indicator. Some documentation is also available in transaction PDSY, using operations ELIMI and SPLIT. See Table
2 for common split indicators.
A N/A This is the ES grouping for the wage type, and it is matched
up to an ES grouping section of a payroll rule for processing
vTvn V0 The variable assignment type (vT) and number (vn) link a
wage type to table V0, and the purpose varies per country.
In the U.S., this is the link to a benefit plan.
In the article in the August/September 2003 issue of HR Expert, I gave an example of an employee changing cost
centers in the middle of a pay period. This causes wage type 0BAS to split – allocating a certain amount to each
cost center via the AP split. The challenge, though, is to calculate COLA for each split value, based on the whole-
period amount of 0BAS. To do this, you create another wage type to hold the whole-period amount. When you
cumulate to that wage type – 9COL – you eliminate the splits, and that is what causes it to store the amount for the
whole period. By using 9COL and processing class 90, you can now have multiple wage types cumulate to the
COLA wagebase, which is more realistic.
The other thing you did was to move the 0COL wage type from infotype 2010 to infotype 14. This was so that you
could allocate the 0COL wage type across the multiple splits. Infotypes differ on how they work with splits. (See
Table 3.)
2010 Allocates the AP split based on whatever day it falls within the pay period. For
example, the pay period is Jan 16 to Jan 31, and it splits on Jan 20. So Jan 16 to
Jan 19 is AP split = 01, and Jan 20 to Jan 31 is split AP=02. If the infotype 2010
wage type is dated Jan 19, it will be assigned to AP split 01; if infotype 2010 is
dated Jan 20 it is assigned to AP split 02.
15 When read into payroll the AP split is eliminated, so its AP split is blank. For
accounting and reporting purposes, it will be assigned to the last organization
assignment (table WPBP in particular), but for payroll operations it is not
associated with either split.
14 If processing class 10 is set to something other than zero, then it will be split
across the pay periods. Otherwise it is handled like infotype 15. So if there is an
AP split in the period, infotype 14 will create multiple wage types in the IT – one for
each AP split.
The behavior of each infotype can be customized in the payroll rules that are processed when functions P2010,
P0015, and P0014 are executed. The logic listed in Table 3 is the standard logic from SAP (for the U.S.) – it could
be customized in your system. So to get COLA in my example to work for splits, I moved 0COL to infotype 14 and
set its processing class 10 to a 1. In this case, processing class 10 is used to tell payroll to allocate wage types
across payroll splits.
In the processing section of rule ZUA8, you can see that it was called once for each 0BAS (Figure 30).
Figure 30 Processing section of rule ZUA8 called once for each 0BAS
You can see that even though 0BAS had splits, wage type 9COL in the resulting IT does not have splits, and
represents the sum of the two (Figure 32).
First, set the amount equal to 0COL to see if there is an override COLA amount. The AMT operation looks for wage
type 0COL in the IT where the split indicators in the IT are the same as in the header of the IT. So wage type 0BAS
is in the header with an AP split of 01. It looks for wage type 0COL with a split AP of 01 in the IT. This is why you
read 0COL into the IT via infotype 14 and processing class 10 = 1.
If the amount is equal to zero, then you don’t have a 0COL wage type. Now, eliminate the splits on 0BAS in the
header row, and go look for 9COL in the IT. If you find 9COL, then test the amount to see what wage bracket you fit
into. Then restore the original splits and reset the amount in the header back to the original amount – i.e., from the
9COL amount to the 0BAS amount. Now you are back to the original 0BAS in the header row. Multiply that amount
by the COLA rate (constant ZR003) and create wage type 0COL with the result. Wage type 0COL in this case has
all the same attributes – including the split values – as wage type 0BAS. So the COLA amounts are split and
allocated in the same manner as the wage types making up the COLA wage base (Figure 34).
Steve Bogner is managing partner at Insight Consulting Partners and has been working with SAP HR since 1993.
He has consulted various public, private, domestic, and global companies on their SAP HR/Payroll
implementations; presented at the SAP user’s group ASUG; and been featured on the SkyRadio Network program
regarding SAP HR. You may reach Steve via email at [email protected].