Tuesday, May 29, 2007

SAP ECC6.0 : TAX - EC Form Enhancement

Annually, Malaysians working either in private or public sector will received a tax form from their employers. Those working in the private sector will get the EA Form. Others in the public sector will get the EC Form. EC Form describes how much one earns and gets remunerated (benefits) as well as how much of one earnings gets deducted. Thus the calculation of taxable of one employee. Therefore EC/EA Form denotes all of this in one year.

EC Form which i had to modify to fill up some blank spaces which was not filled up by SAP standard program took me nearly a week or more. I had to go through the standard program and see how the SAPScript (EC Form) and the standard program goes together to process payroll information. Nevertheless, I had to enhance one include file and pump the data into the SAPScript EC Form.


Although SAP did provide 2 BADI for developers to enhance those forms but it only work on certain way and i find it hard to fullfil my functional request thus forcing me to activate enhancement on the standard program itself. This solved one issue over another. Perhaps I would like to meet people who have experience similar situation in modifying or enhancing the EC Form.

So here goes the famous BADI offered by SAP:
1. HRPAYMY_ECFORM - calculation for BIK (Benefit In Kind). This generally displays a lump sum of benefit in kind into the section B (Manfaat Barangan). Unfortunately, my request was to display the breakdown list of all the benefits to one person.

2. HRPAYMY_EAFORM - process to fill up EA Form header only.

Now for those who had not gone through the EC Form or just started to modify it, my adviced is to really go over the program thoroughly because SAP did provide us a EC/EA Form Breakdown List. You need not to modify it.

Yet, that does not solve my problem because the EC Form still does not display the total amount of earnings, benefit and tax deductible. Thus I have to enhance the standard program.

That took me another few days to trace so i can find the best logical and reasonable point to make the enhancement. As you see, enhancement does not allow you to modify the standard program but you may add your coding at the top or bottom of a standard function without modify the mid section part. If you get my point, enhancement only allows addition of custom code at the top and bottom of the standard code. That is where i have to think where is the best part. Not to mention, that customized code should not affect other process too. It should be safe. So far my enhancement has not yield any justifiable complain that will lead to taking off the code. God knows if that happens!

Note : RPCTEAL0 is the original version given by SAP. RPCTEAL0_01 in this context is the new version given to the customer by SAP after a report was make to correct a certain mistake in the past.
So, in order to enhance the EC Form, there is this INCLUDE file named RCPTEAL3_01 that you can enhance to fullfil the request as above mentioned. RPCTEAL3_01 is an include file that do all the calculation process and also assigning of data to SAPScript. That is where you can modify it. In the process, the following are what i have done:

1. Enhancing subroutine FUELLEN : FUELLEN is a subroutine that will pass data to the SAPScript. This portion i put control to certain feature of the SAPScript to only display a specific format of PERNR(PNALT).

2. Changing PERNR to display a concatenated version PERNR(PNALT) and pass it to FUELLEN.

3. Changing DEPT to hold WERK/TEXT and KOSTL/TEXT and pass it to FUELLEN. Currently the DEPT field in SAPScript is left empty even though SAP did provided logic to determine it.

4. Calculation of earnings and benefits from internal table IT_BLTAB and pass it to EC Form Breakdown List.

For points 1 to 4, enhanced subroutine Fill_HD_TAB to cater the changes.

For points 1, enhanced subroutine FUELLEN to cater the changes.

SAPScript involves:
1. HR_MY_TAXECLM05Y - EC Form
2. HR_MY_TAXEABL007 - EC BreakDown List

IMPORTANT: You will need to open up your SAPScript EC Form to see what fields are displaying your value as you do your enhancement.

is sky the limit... EC Form the best enhancement ever done so far....

2 comments:

Helmi said...

Hi William;
Is there any BADi that can we use to change the calculation in section B of EA form. Based on my analysis, BADi HRPAYMY_ECFORM is for EC form use only. Please correct if im wrong.

Thanks
Helmi

william wilstroth said...

Actually there is a BADI called HRPAYMY_EAFORM u can use...