SAP HR Payroll

Payroll accounting is the calculation of remuneration for work performed by an employee. More specifically, payroll accounting consists of a variety of processes that are becoming increasingly important due to the employer’s increased obligation to supply benefits and medical welfare.

These benefits are products of:

  •   Labor law
  •   Tax law
  •   Contribution law
  •   Benefits law
  •   Civil law
  •   Reporting law
  •   Information law
  •   Statistics law

The remuneration is calculated in the following steps:
1. Calculation of gross remuneration
2. Calculation of net remuneration

Gross and net pay comprises the individual payments and deductions which are calculated during a payroll accounting period, and are received by an employee. These payments and deductions are included in the calculation of pay by uniquely distinguishable wage types.

Payroll is predefined in the SAP HR system for many countries specifically (e.g. Payroll United States, Payroll Spain, Payroll Japan) and all other countries’ payroll comes under the heading of “International Payroll”.

Payroll does not just involve the calculation of remuneration, but consists of a variety of processes that are becoming increasingly important due to the employer’s increased obligation to supply benefits and medical welfare. These benefits are products of:

  • Labor law
  • Tax law
  • Contribution law
  • Benefits law
  • Civil law
  • Reporting law
  • Information law
  • Statistics law

In SAP Payroll, functions provide the high-level logic for payroll calculations. Functions perform general processing – such as calculating payroll taxes on a given set of wages, reading wagetypes from specific infotypes, calculating benefits premiums, and storing the results of the payroll calculation. There are dozens of functions in SAP payroll, some are country-specific and others are not. Each function is defined and documented via transaction PE04; you can also view the function documentation via transaction PDSY in releases 4.5 and greater, or with report RPDSYS00 in earlier versions.

In SAP HR terms, a payroll function is not the same as an ABAP function. A payroll function does consist of ABAP code, but it is not executed in the same way an ABAP function would be. Payroll functions are executed within a schema by the payroll driver program (let’s assume RPCALCU0).

A schema is just a collection of functions executed in a specific order – each one passing its results on to the next. Schemas are always created and edited via transaction PE01, but are actually stored as a collection of rows in tables T52C0 (SAP standard schemas) and T52C1 (customer-created schemas and modified SAP-standard schemas). The payroll driver reads the lines in T52C0/T52C1 and executes the functions one by one. So how do we make the leap from a payroll function stored in a table to the execution of ABAP code to get the work done?

In transaction PE04 you can see the ABAP code associated with every function. The function name in the schema correlates to an ABAP form – for example payroll function WPBP maps to the ABAP form ‘fuwpbp’; function USTAX maps to form ‘fuustax’. So when the payroll driver is executing the schema, it takes the function name from the current row in schema, puts an ‘fu’ on the beginning of the name, and then does a ‘perform’ statement on it. It’s a very simple and elegant design.