Monday, April 7, 2014

We can use logical database PNP to read payroll results. We can use standard class(CL_PAY), standard macro RP-IMP-C2-CU or standard function module PYXX_READ_PAYROLL_RESULT.


Methods

1
a.     Use LDB PNP and Selection Screen 900 in the Attributes of the program.
b.    Define structures of PNP nodes PERNR, PAYROLL (type PAY99_RESULT) under NODES statement.
c.     Define reference class for CL_PAY. (Pay type ref to CL_PAY).
d.    Under GET pernr event create object PAY for each employee to get list of Payroll records. Call methods READ_RESULT (Read List of Selected Payroll Results), WRITE_RESULT (Write (Modified) List of Payroll Results for GET PAYROLL).
e.     When GET payroll event is triggered, PAYROLL structure is filled up with payroll results.
f.     Loop required tables like RT, CRT and gets the relevant information.
2
1.     Use LDB PNP.
2.     Define structure of PNP node PERNR.
3.     Declare Internal tables and structures used in program. (We use standard Include to define those. (1). Rpc2cd09 (Cluster Directory definitions). (2). Rpc2rx09 (Data Definition, Cluster RX File PCL2 (International Payroll Results)).
4.     Read cluster directory from RP-IMP-C2-CU (x country indicator) by passing CD-key-pernr. RGDIR internal table is filled up.
5.     Call the function module CD_EVALUATION_PERIODS to transfer the payroll results to payroll run as ‘A’ records (Current) and ‘P’ records (Previous) by passing in-period and RGDIR internal table.
6.     Loop new RGDIR itab and read cluster Rx (x Country Indicator) from RP-IMP-C2-Rx (x Country indicator) by passing Rx-key (structure contains pernr, seqno).  Now data is available in RT, CRT, BT and many more tables.
3
a.     Use LDB PNP.
b.    Define structure of PNP node PERNR.
c.     Declare Internal tables and structures used in program. (We use standard Include to define those. (1). Rpc2cd00 (Cluster Directory definitions). (2). Rpc2rxx0 (Data Definition, Cluster RX File PCL2 (International Payroll Results)).
d.    Read cluster directory from CD_READ_RGDIR by passing CD-key (pernr).
e.     Call the function module CD_EVALUATION_PERIODS to transfer the payroll results to payroll run as ‘A’ records (Current) and ‘P’ records (Previous) by passing in-period and RGDIR internal table.
f.     Loop new RGDIR internal table and read cluster Rx (x country indicator) from PYXX_READ_PAYROLL_RESULT by passing Rx-key (structure contains pernr, seqno) and Cluster id (RELID from RGDIR table). We will get the results into deep structure I_payroll_results type PAY99_RESULT. Now data is available in RT, CRT, and BT and in many more tables.

1 comment:

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.