Sie sind auf Seite 1von 2

Common Functions Functions can have up to four parameters, and usually the SAP documentation does a good job

telling you what each parameter does. Documentation for functions and operations can be found via transactions PDSY or PE04.

COPY This is the same as 'include' in ABAP and other programming languages. COPY just inserts the schema contained in parameter 1 when payroll is executed. Good programming style and good schema configuration style are basically the same - put commonly used logic in an 'include' so that it can be used in several places and to improve readability. BLOCK As of release 4.0 the schema log is organized in a collapsible tree structure. BLOCK BEG starts a node and BLOCK END ends the node. Everything between BEG and END is contained within the node. BLOCK BEG/END can be nested several levels deep. Again, place the BLOCK BEG/END functions appropriately to make the log easy to read.

IF/ELSE/ENDIF There are two ways to specify the true/false condition for an IF function. SAP has several built-in conditions that you can use in parameter 2 (IF NAMC in schema U000). You can also specify a custom rule in parameter 1, and in the rule perform whatever logic you want. In the rule you use operation SCOND to set the true/false switch for the IF function.

Pxxxx The payroll driver & schema read and process data from many infotypes. The common way of doing this is with infotype-specific functions - named as 'P' and the four-digit infotype number. So, P0014 reads and processes data from infotype 14, P0168 processes life insurance plans from infotype 168 and P2010 reads in additional payments from infotype 2010. Many of these functions, but not all, allow you to futher refine the processing with a payroll rule. Schema UAP0, for example, shows that P0014 is processed futher by rule U011. Function P0168 is one of those that does not use a rule (in some older releases it does) - you specify options in parameter 1 instead (see schema UBE1). Some infotypes are used in payroll, but do not have a Pxxx function. Examples include infotypes 207, 208, 209 and 210 which are all read and processed in the main tax function USTAX. Infotypes 0, 1, 7, and 8 are processed by function WPBP.

PIT PIT is an acronym for Process Input Table, and is one of the most used and most powerful functions in payroll. When wage types are read into payroll by the Pxxx functions, they are stored in an internal table called IT - Input Table. PIT loops through that table and applies logic contained in rules. So for each wage type in the IT, it will apply the logic from a rule. The goal of PIT is to move wage types out of the IT and into the RT - Results Table. Most often, the rules called by PIT will change some attributes of the wagetype and then transfer it from the IT to the RT. The wage type can also be left in the IT and even moved to other tables. We'll cover those possibilities when we review how operations work. A good example of PIT is in schema UAL0 PIT X023. When the payroll driver gets to this point in the schema, PIT will look at each wage type in the IT, and rule X023 tells it to do certain things depending on the wagetype's value in

processing class 20. Values 3, 4, 5, 6, 9 and B will move the wagetype to the RT, while values 1, 7, and 8 leave it in the IT. Value 2 has no operation, essentially eliminating the wagetype from the IT.

PRT PRT is short for Process Results Table. Although most wage type processing happens via PIT, there are several occasions where you want to process the wage types that have already been transferred to the Results Table (RT). PRT work much the same as PIT, looping through the RT and applying logic from a rule. In schema UTX0, PRT is used to process tax wage types that are already in the RT. Function UTX0 (US tax function) returns its wage types directly to the RT, so any processing on tax wage types has to be done with a PRT function.

ACTIO The ACTIO function processes a payroll rule, but it does not loop through a wagetype table. Instead it can loop over the different workplace/basic pay records and process the rule for each one. For example, suppose the employee had two infotype 1 records for the current pay period. ACTIO would have two records to loop through. Schema UTX0 again has a good example of ACTIO using rule UWH1 to calculate the number of working hours in the pay period.

Our final article on the basic of SAP Payroll presents some commonly used payroll operations.
Types of Operations Like functions, documentation for operations can be found via transactions PDSY or PE04. Operations can be placed in two broad groups - those that make decisions and those that manipulate wagetypes. Some of them fit into both groups. Manipulating Wagetypes Working with wagetypes in a rule is sort of like working with internal tables in ABAP. The function that called the rule (PIT, PRT, P0014 or whatever) loops through the table, placing each row, one at a time, in a 'header' space. You work with the wagetype in that header space, and when finished add it back to the table. Common Operations MULTI, DIVID These operations let you multiply two fields of a wagetype and store it in a third. The fields you can work with are AMT, RTE and NUM. MULTI RNA would multiply the rate by the number and store the result in the amount field. DIVID ANA would divide the amount field by the number and store it back in the amount field.

This is just the tip of the iceberg of how it is done in SAP's Payroll module!

Das könnte Ihnen auch gefallen