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.
|
Followers
Popular Posts
- ABAP - ALV Report example with steps
- ABAP - Step by step tutorial on Smart Forms - Template Node
- ABAP - Sending email with pdf attachment
- SAP Adobe Form - Steps to create simple ADOBE Form and calling it from ABAP Program
- SAP ABAP - CL_ABAP_CHAR_UTILITIES class usage
- ABAP - Multiple value selection from F4 help for SELECT-OPTIONS
- Execute ABAP Report using SUBMIT statement
- ABAP - Select all or Deselect all in ALV or Check box handling in ALV
- Web Dynpro ABAP ALV - ON_CLICK event
- ABAP - Dynamic WHERE clause
This comment has been removed by the author.
ReplyDelete