Friday, April 27, 2007

SAP ECC6.0 : Payroll - Integration for PA30

A BADI (HRPADOOINFTY) activated to execute an external program that will capture payroll infotypes into a customized table when user click the 'SAVE' button.

It will take 5 types of table
IT0008 - Basic Pay
IT0017 - Tabung Haji
IT0198 - Income Tax
IT0014 - Koperasi
IT0196 - EPF

All these data when user modified and click the SAVE button will be captured and sent to a customized table. Eventually this data saved in the customized table can be utilized by another program.

However, one should take note that doing so, especially in implementing this BADI (HRPADOOINFTY), must be careful that it will not affect the payroll run program. Otherwise, this BADI is useless and not helping at all.

is sky the limit... HRPADOOINFTY to save the 5 tables

SAP ECC6.0 : Payroll - DME Enhancement - New Layout...

Last month, i was required to modify DME (RFFOM100) standard program to add a new layout to the bank transfer file format.

DME is also known as international payment transfer

Although SAP provided a few standard file layout but as agreement between the client and its banks, the file was not supported by SAP. Thus a customized file layout was given to suit their needs.In order to modify this, there are a few requirements that you need to know:

1. In DME, under Output Control, Alternative Format must have the customized new file layout. In order to achieve that, go to OBF5 to add your customized file name. (Editor : Remember to set your ISO Code otherwise it won't go to your desired country specific customized alternative file format. Side Effect : it will make use of International MT100 if not set properly)

2. You will need to modify 3 function modules that will create the header file, item file and the trailer file. In order to do this, you can copy the following standard Malaysia file format (Malaysian Banking Berhad) and modified it. Thus, the standard are:
- DME_MY_HR_MBB_1(Header)
- DME_MY_HR_MBB_2(Item)
- DME_MY_HR_MBB_3(Trailer)

With this three standard function modules, you will copy and modified to become your custom file:
- ZDME_XXX_MT100_1(Header)
- ZDME_XXX_MT100_2(Item)
- ZDME_XXX_MT100_3(Trailer)

In each of this function module, please take note that certain lines you will need to retain and do some modifications so it could pass your parameters back to RFFOM100 (DME) program. The DME program will take this customized files and download accordingly to it.

3. Now, after you have modified your function module here comes the big question on how to link the alternative file format to your customized function module. Yes, you need to modify 3 more additional FMs. These FMs will tie your DME to your customized function module in step 2. Those FM are as follows:
- MT_MOD_MALAYSIA_1
- MT_MOD_MALAYSIA_2
- MT_MOD_MALAYSIA_3

In this three standard function modules, you do not need to copy and modified it. You just have to activate enhancement that is provided by ECC6.0. This feature is provided in ECC6.0 to make adjustment to standard programs easier. So to enhance the three function modules:

1. Open up enhancement feature by going to Function Module/Enhancement.
2. Go to Edit/Enhancement Operations/Show Implicit Enhancement Options
3. Then click on dotted lines indicating where enhancement is allowed on editor panel
4. Go to Edit/Enhancement Operations/Create Enhancement.

Now you can start to enhance the three standard function modules to call your customized function module to use your customized file format.

is sky the limit... DME (International Payment Transfer for Malaysia)

SAP ECC6.0 : Payroll – Payee Key for Alimony

In one of a payroll process when an employee or an entity that is identified to include in the payroll run, certain amount will be deducted or added to/from their gross pay. Thus, payee key in this context is the number that will determine a certain deduction to their gross pay.

The payment code here refers to employees, for example, who has alimony, child care, and so forth that needs to be pay by the person. Thus, this derive the Nafkah or dependent care payment.

The feature in this design:
1. The first two prefix dictates the key for personnel deduction. For example AL and followed by six running digits. (ALXXXXXX)
2. Creation of this requires particulars such as bank key, bank account, country, reference key (payee code), name, date begin, date end, and payment method (restricted to P or S).

If payment method is P then bank key and bank account fields
are not required. Else payment method is S thus the reversed.

3. Either able to modify or display after payee key is created.
4. Delimit the payee key. Delimit actually restricts certain validity of the payee key in this context.

Unlike delimiting a record in a table which creating a few record with similar key and different dates.

Tables that are affected by the process are T521B (payee key) and T521C (check table payee key)

This program is very much similar cheque number program but purpose is to maintain payee key.


More on how to DELIMIT record.


Is Sky The Limit... Payee Key

SAP ECC6.0 : Payroll - Cheque Number

This assignment requires a new infotype 9001 (Check Info) to store newly created cheque number(s). Each of this newly created cheque number is control by personnel area and is a running number too.

The cheque number is 6 digits in length.


In order to maintain cheque numbers, a dialog program is required to create, modify, display and delimit it by users manually. Currently, this program will be used by the conversion team to create cheque numbers by batch for testing. Other particulars that required by user is only the payee description.

This cheque will be use in the later stage when payroll department issue cheques to different personnel in personnel areas monthly.

Now, that you have a table that cater maintainence of cheque number, thus an infotype is required to support this information and tie to certain employee(s) when cheque numbers are allocated during payroll processing. This infotype will call PA9001.
I will explain more on infotype and infotype creation in the next entry.
In summary there are 3 portions to this development:
1. A customized table to hold cheque numbers
2. A program to maintain cheque numbers
3. An infotype to relate cheque numbers to payee.

is sky the limit... cheque numbers

SAP ECC6.0 : Payroll - Driver (Old wage type to new wage type)

This assignment requires a customized table and a payroll schema to maintain old wage type. A customized table containing existing bank key and bank name, begin date and end date, and the new wage type and text for replacement.

At PE04 (schema maintenance for payroll and time management) will be used to create a new payroll function to replace existing wage type to the new wage type based on the above content in customized table. Thus, a payroll driver will be created to maintain old wage type with new wage type.

Known tables or structure involved:
1. RT Table (Result Table) - holds all income/deduction wage types for a person

2. BT Table (Basic Pay Table) - holds all basic pay information (ie pay method, pers. area, etc)
3. V_T012 – House Banks - view of all banks alias with the company/org.

After payroll function has been defined, the new function will be added in PCBURZMY0. (this will require a developer key).

In this new function, certain logic is required to differentiate its outcome based on the payment method. If the payment method is bank transfer denoted by the 'T' then the payroll driver's schema must take into consideration of bank's information. However, on the denotion of 'C' meaning payment method is cheque thus, the bank's information is not required when replacing the wage type.


is sky the limit... payroll driver

SAP ECC6.0 : Payroll - Summarized Bank Report

In this second payroll program, it will display 3 types of report and there are the following:

Bank Cover Slip
Summary of Bank Credit Report
Summary of Employees Report

First, the bank cover slip will calculate the total number of amount payroll to be credited and the total number of employees to be credited. This is an overall calculated by the program when its process report 1 and report 2.

Second, the summary of employees report will display all the eligible employee for payroll. In this report, it will show the employee numbers (PNALT-PERNR), employee’s name, employee IC, employee bank account no and total amount paid. Each of this employee will be group according to a bank code. This bank code determine which bank will be credited.

Third, the summary of bank credit report, simply shows a list of bank and its total amount to be credited. The bank code, bank name and total amount are fields in the report.


is sky the limit... bank reports

SAP ECC6.0 : Payroll - Credit Control Statement

I had started my new project a month ago in one of the main government sector on payroll only. Yes, I will be revisiting HR’s Payroll module for another two months, possibly, might get extended according to the work’s urgency.

My first assignment was to come out with a payroll control statement that will display every employees income and benefit and deductions in a list. This control statement will be group accordingly to its WERKS-personnel area and ANSVH-work contract. This is due to large number of department (with 9XK employees) or states to manage its payroll. In this control statement, the payroll department will be able to validate all of its recipient correct amount of take home wage types and deductible wage types.

Apart from this, the technicality behind this program can be found in my previous entry on flexible spending account.

is sky the limit… payroll revisited for two months