Monday, November 20, 2006

SAP R/3 : TRIAD Vendor on Flexible Spending Account (FSA)

One of the many things that i got to know about coding a program to download data on flexible spending account onto a specified file format are the following items:
1. Infotype 0170 - Flexible Spending Account
2. Function module 'CU_READ_RGDIR'
3. Function module 'PYXX_READ_PAYROLL_RESULT'
4. Infotype Payroll, Payroll Results, Payroll Results Table
5. Infotype 0000, 0002, 0041
6. Tables PCL2 to use Payroll clusters and functions
7. Transaction Code PC_PAYRESULT to see payroll result (Payroll result cannot be seen using PA30)
Given an employee number (PERNR), you will need to decide whether he or she is valid for the FSA file extract. In 0170 there will be a BEGDA and ENDDA, you need to compare against the payroll year for selection and the date selection in the program. Comparing against the payroll result, for period (begin date and end date) is a must so you will get the exact record.

To get the payroll result, you will need the function module called 'CU_READ_RGDIR'. This will give you the as you see in pc_payresult transaction code. The paydate, for-period, in-period, begin date, end date and so forth. Now to obtain the result table of a certain for-period record, you need to use the PYXX_READ_PAYROLL_RESULT. This function will return you the RT result table.

Using PYXX_READ_PAYROLL_RESULT, reader must take note that it returns table in structure, preferably use a field type to hold the result. Don't use internal table, you won't be able to see the result when you debug this function module. A better way to see how the result is work out, you can trace PC_PAYRESULT

Employee with health plan DCAP (dependent healthcare) and MCRP (employee healthcare) will be selected into the file. The program will calculate the effective date for the both benefit plan, the deductions and the stop date and annual contribution. The stop date is pretty unique here is that it require the programmer to do plus one record checking.

(Note : In VSP, PPO and TRIAD, all requires plus one record checking. Its just not only in TRIAD that require this feature)

Plus one record checking meaning you check the existent or availability of the next (future) plan from the existing current plan.

At the end of the result, the file should have all the valid employees entitled for FSA via legitimate DCAP and MCRP benefit plan. In contrast to VSP and PPO file that i had done last time, TRIAD file does not require row of records of dependent after employee record. However, TRIAD will not retrieve employees who are retired or terminated.

This program is my last program which was handed over to Mitchelle Yeoh for future maintenance. So far this is the best program i ever written cos all of it are include program and many subroutines for easy handling and maintenance.

is sky the limit... payroll result and result table for FSA

No comments: