Wage Type Processing Basic Concepts

Table 1 

Wage type 

Number 

Rate 

Amount 

2100 

100.00 

2100 

100.00 

4200 

20.00 

1500 

40 

10.30 

412.00 

 

Relationship of Payroll Driver, Schema (Functions), Rules (Operations)

Each country payroll version supported by SAP has a program called the “payroll driver” that calculates payrolls. For example, in the U.S., the payroll driver is RPCALCU0, in Mexico it is HMXCALC0, and in Canada RPCALCK0. Each one is different, but they share a common core of functionality. The job of the payroll driver is to process payroll functions as specified in a payroll schema. These payroll functions each perform a specific job, for example – reading data from infotypes, calculating taxes, and processing wage types. Some functions process payroll rules. Rules are a collection of payroll operations. Each operation does a small unit of work, such as multiplying a wage type’s number by a rate to get an amount.

Schemas are edited with transaction PE01, and rules with PE02. Functions and operations are maintained with transaction PE04. To view payroll results,

use transaction pc_payresult (or in earlier R/3 releases go to Tools>Payroll result>Display in the Payroll menu). (See Figure 1.)The standard payroll schema for a country can be derived from table t500l. If the country in table t500l has an X in the Old Naming Conv field, then the schema is HR Country Indicator plus 000. Otherwise, it is the ISO Code plus 00. So the U.S. has schema U000 and for Mexico it is MX00.

Header and Table Wage Type Concept

When calculating payroll, wage types are read from infotypes and the Time Management cluster and stored in an internal table called the Input Table (IT). (See Table 1.) In ABAP terms, this is simply an internal table. Various payroll functions and operations can read and update data in this table. Similar to ABAP internal tables, there is a header row. That header row defines which row of data can be accessed by the payroll operations. After manipulating the data in the header row, you can save the row back to the IT, save it to another payroll table, or ignore it. In Table 1 there are three wage types, and wage type 2100 is currently in the header row. After you are done with wage type 2100, wage type 4200 is moved into the header row.

Creating Custom Schemas and Rules

Schema and Rule Naming Conventions

Customer modified schemas and rules need to begin with Z. Many customers simply replace the first letter of the standard schema with a Z – i.e., their modified copy of UAP0 becomes ZAP0. But there can be problems with that convention. For example, you might later implement Canadian payroll and need a modified version of schema KAP0, but ZAP0 is already used for the U.S. For many years, I’ve used a naming convention of Z plus the country identifier and a sequential number for modified rules and schemas. So a modified UAP0 would become ZU01 and a modified KAP0 becomes ZK01.

Editor Documentation

Documentation for the function, operation, schema, and rule editors is available online at http://help.sap.com. Click on SAP R/3 and R/3 Enterprise and then select your release level and language. Then navigate to the Human Resources>HR Tools section.

F1 Help

In the schema and rule editors, place your cursor on a function or operation and press F1 to get help text. A schema or a rule’s documentation is available in the editor via the Goto>Documentation menu. In the schema editor, the F4 key shows possible values for each of the four parameters for whatever function is entered on that line. The same documentation – and more – is available via transaction PDSY.

Creating a Test Schema

For testing purposes, it is useful to have a version of the payroll schema that does not care about the control record (transaction PA03) settings. Bypassing the control record lets you run and save the results for any pay period needed, without having to update the control record. There’s no problem with having such a schema around, since the payroll driver does not save payroll results from a schema that ignores the control record in a production system. For examples, I will show you how to create two schemas – ZUA0, which will be used in production and will check the control record, and ZUAT, which ignores the control record and is used for testing purposes only.

First, create a copy of SAP’s schema UIN0 and name it ZUA2. In the schema editor (transaction PE02) enter schema UIN0, and click the copy button, or Schema>Copy in the menu. Enter ZUA2 for the To schema. Then edit ZUA2 and make the CHECK ABR line executable by removing the asterisk in the D column. (See Figure 2.) The CHECK function is commented out by SAP in the standard schema, so you uncomment it here for use in the main ZUA0 schema.

2 thoughts on “Wage Type Processing Basic Concepts

  1. Sir – Your blog post seems to be a full copy of supplementary information I wrote for the article ‘Understand Payroll Wage Type Processing: Payroll Schema and Rule Basics’ in SAP Insider’s ‘HR Expert’ newsletter – Volume 1 (2003), Issue 5 (August and September). <br /><br />This is a copyright violation and I would appreciate you removing this post.

Leave a Reply

Your email address will not be published. Required fields are marked *