Understanding functions in Payroll Schemas (specific eg, WPBP)
Introduction
In SAP HR, functions provide the high-level logic for calculations. The functions can be associated with either a payroll class or time management class. In payroll, they provide the overall functionality for payroll processing including rules for calculations. Functions perform general processing such as reading wage types from specific infotypes, calculating payroll taxes on a given set of wages, benefits premiums etc and storing the results of the payroll calculation.
To understand how to read the functions, below is the example for one of the payroll functions, WPBP (Import work center and basic pay data).
WPBP (Import work center and basic pay data)
This function is used to transfer master data on the work center and basic pay for the payroll period to internal table WPBP. The basic pay wage types are stored in the internal table IT. If all the fields of the table WPBP are same during the entire payroll period, this table will contain one record. However, in certain cases different data may exist for different partial periods. In such cases, there will be multiple entries, which are identified by split indicators. Such cases have been explained in the below sections along with the screenshots.
Viewing the function
SAP Payroll comprises of many functions which can be accessed via transaction PE04. Some of these are country-specific while others are not. Each function is defined and documented and can be viewed via transaction PDSY in releases 4.5 and greater, or with report RPDSYS00 in earlier versions.
T Code: PE04
Characteristics of the function
Each function has a corresponding ABAP code associated wit it, which is obtained by adding ‘fu’ at the beginning of its name. While a payroll function may comprise of ABAP code, it is not executed in similar way as ABAP code is. A payroll function is executed in the payroll driver using schemas. Thus, when the payroll driver executes the schema, it automatically puts ‘fu’ in the beginning of the function name and then execute it further.
Usage of function in a Schema#
A function may be used as a part of schema or a sub schema, depending on the requirements. For example, in the below screenshots, the function ‘COM’ is used in the main schema X000 (International Personnel Calc. Schema for RPCALCX0 (International)), while the function WPBP is used as a function in the custom subschema XBD0 (Edit basic data).
Main Schema: X000
Sub schema XBD0
#A schema can be accessed via transaction PE01 and the details of the functions can be viewed by pressing F1 on the function name.
Syntax of a function
The syntax of a function in a schema is defined basis the parameter list defined in the characteristics of the function.
Below is the detailed explanation of the parameters.
- Par2 – different pay-scale type (No check)
- Par3 – rel. time unit (X – WPBP for each time unit)
- Par4 – Subtype of infotype 0008 (No check)
Thus for WPBP, if you specify a pay scale type which has not been maintained correctly in the indirect valuation tables, the personnel number is rejected during indirect valuation.
Setting the third parameter will result in split of WPBP in a greater detail if the time unit for the pay scale does not correspond to the time unit for the payroll area.
For the fourth parameter, the function WPBP is started for the subtype 0 of IT 08.
Executing function in Schema
A function cannot be directly executed in isolation. It can be executed only via schemas which are further executed using payroll driver. Key in the data in the payroll driver (T Code: PC00_M**_CALC_SIMU – payroll driver in simulation mode; ** indicates the country grouping or MOLGA)
Example
T Code:PC00_M01_CALC_SIMU (01 – MOLGA for Germany)
The driver will execute various functions step by step as per the schema. In case the “display log” option has been checked in the payroll driver, a payroll log will be generated basis the inputs given.
The below screenshots depict the output of WPBP function and how the processing is done basis the inputs provided to the function. Here, WPBP function will pick up the inputs from P0000/ P0001 / P0007 / P0008 and P0027 tables and perform indirect valuation of wage types from basic pay in the processing step and subsequently transfer the data into WPBP Table.
Inputs for the WPBP Function
WPBP function will pick up the inputs from P0000/ P0001 / P0007 / P0008 and P0027 tables.
Detailed view of the inputs
Processing during the WPBP function
Indirect valuation of wage types from basic pay is performed in the processing step and subsequently that output is transferred into WPBP Table.
Output – Creation of WPBP Table
In case there are no changes to the IT 0000 / 0001 / 0007 / 0008 / 0027 during the given payroll period, there will be only one entry. However, if certain changes have been made to above infotypes during the payroll period, a split will be created for the partial periods and accordingly, multiple entries will be created in WPBP table. This is being shown in the subsequent section.
WPBP splits created by WPBP function
As mentioned above if there are any changes to IT 0000 / 0001 / 0007 / 0008 / 0027 for an employee during the given payroll period, a split will be created for the partial periods in WPBP table.
For example there had been a change in the basic pay for an employee in the middle of a given payroll period (01.04.2006– 30.04.2006), which resulted in multiple splits in WPBP Table.
Inputs for the WPBP Function
Processing of WPBP Table with splits
Output of WPBP Table with splits
Detailed output of WPBP Table with two entries
Hi,
Nice documentation on WPBP
Will 1018 (cost distribution) infotype from OM will create any split ???
Regards,
Raja sekhar
Hi Raja,
Thanks for appreciating the efforts.
Regarding your query about 1018 creating the split, the answer is no. As per standard SAP, the WPBP split is created only due to changes in the infotypes IT 0000, 0001, 0007, 0008 and 0027. However, the change in 1018 does have an impact on the payroll, though I am not much aware of how it is dealt with. I guess paryoll experts will be able to advise.
I will try to find the answer at my end as well and will share it with you. Until then, sorry for an incomplete response 🙂
Regards
Neha
Hi,
I have got the answer that where can i find the cost distribution in the payroll log if is there is a change in the cost center at the position level. In the Final processing of the schema in function EXPRT and Table C0.
However the same split can be seen in posting from PC00_M99_CIPE.
Regards,
Raja Sekhar
Hi Raja,
Thanks a ton for getting answer to this so quickly 🙂 Am sure it will help all...
Regards
Neha
Hi Neha,
Its a very good document to start with and well explained. Good work.
Thanks,
Madhav.
Thanks a lot Madhav.. Much appreciate your comments 🙂
Regards
Neha
Dear Raja,
Thanks for the document....
Santosh
thanks Santosh 🙂
Hi Neha,
Good one..................
John
Hi John,
Thanks a lot..
Regards
Neha
Hi Neha
Great document
Sometimes there are splits created in WBPB by some country specific infotypes also, like 0442 Company Car or 0808 Wagereturn for the Netherlands.
There is a possibility to create splits also from infotype 0014 by using WPBPC operation.This can be used to factore recurring payments and deductions also.
regards
Theo
Hi Theo,
Thanks for your words and inputs. Provided an insight on new information. Thank you
Regards
Neha
Hi Neha.. Very good document to provide the basis understanding of WPBP function especially with screenshot and explanation.. Its will be nice to include Schema screenshot in Section "Syntax of function' to quickly understand how it's defined in schema to call function with par value.. It's my guess
Kamal
Hi Neha,
Very well explained documentation. I guess new comers will be in a better position to understand WPBP Splits.
Best Regards,
Bhagyashree
Thanks Bhagyashree 🙂 Happy that it helped !
thanks Kamya. Point taken. Will keep this into my radar and try to incorporate new points as and when time permits 🙂
Nice document Factoring plays an important role
For example: An employee joined in the middle of the month His earnings should calculate based on number of working days so in that case there will be WPBP split. 🙂
Same in case with cost distribution if an employee working in two different departments For each department he will share 50% that is 100% for two different departments so he will share two different cost centers so in this case there will be WPBP split. 🙂
WPBP table will consider the following infotypes:
Actions (0000)
Organizational Assignment (0001)
Planned Working Time (0007)
Basic Pay (0008)
Cost Distribution (0027)
If you need split for your custom infotype It is required to create custom function.
Thanks Rajesh for the information shared 🙂
Hi Neha ,
Excellent document extremely helpful for newcomers to understand WPBP split again great work .
kind regards
Laieq Hashmi
Thanks Laieq your words 🙂
Great work neha do you have anything releated to whole schema and pcr configration?
Thanks Tasneem 🙂 Schema and PCR is huge.. Is there any specific information that you are looking for ?
Hello Neha,
What is the possible cause that WPBP split is not regiestered? There's a split in each IT0000/0001/0007, WPBP split output is not generated. (I tried to create a split in IT0008, only then the output is generated.)
Regards,
Euna
Hi Euna
Sorry for late reply. Had been busy with work.
Reg your issue, ideally changes in the given ITs, should create split. However, can you please check if there is any custom rule written which is eliminating the splits ? In case your issue is still not resolved, I would suggest you to post a query on SCN to get it resolved quickly 🙂
Regards
Neha
Check the processing class 20 for the wage types not displaying the splits.
Regards,
Bhagyashree
Hi,
It's just one employee who has a problem. Tested with other EEs, not a problem with them. Thankfully it's only happening in Test environment, but I wanted to make sure I know the answer whenever it happens.
Thank you.
Euna
Hi Neha.. Good Article...
I need a help in understanding elimination of split indicators...
for example specification 6 for processing class 05 is
What exactly is this eliminating splits...and how it will be used further in payroll processing?
Hi Neha,
Nice Explanation, I have a doubt you said there had been a change in the planned working time for an employee in the middle of a given payroll period (01.04.2006– 30.04.2006), which resulted in multiple splits in WPBP Table but in out put log its showing IT8 split, there is no basic pay change right, could you please explain if i am wrong.
Thanks
My bad. Sorry it was a typo. Updated the document. thanks for highlighting it.
Regards
Neha
Hi Neha,
Thank you so much, Do you have complete document of US payroll schema.
Regards,
Sai Krishna
Hi Neha,
Really good document on this.. i have been searching this. it is a nice learning for me.. i will bookmark the page as i dont want to miss the page.
Thanks
Sriram
Thanks Sriram. Glad it helped.
Thanks for sharing this nice document
Thanks Subrajit 🙂
Dear Neha,
I am new to Schema & PCR, could you please guide me with step by step. If you have any valuable document please send it to my email id so that I can improve my skill on this.
Regards,
Subrajit.
hi Subrajit
Schema and PCR is too vast a topic. I will suggest to refer to some of the SCN wiki or google it out to check out the topics.
Regards
Neha
Good day Neha,
Thanks for this awesome document.
Regards,
Tumelo Modise
Thanks Tumelo
Regards
Neha
Hi Neha,
This is always helpful discussion, documents are easy to understand,
Hi Akhilesh,
Glad it helped 🙂
Regards
Neha
I need more information to understand the schema and writing rules .
Any one can help
Nice explanation of schema
regards
Deepak