09-16-2008 12:27 PM
Hi,
Can any one help me find a logic to retrieve a list all the PERNR under a payroll area?...Thanks , Ragesh
09-16-2008 12:34 PM
09-16-2008 12:34 PM
09-16-2008 12:41 PM
Hi ,
I want the entire list of PERNR under a payroll area by passing payroll area and period?
thanks
09-16-2008 12:43 PM
09-16-2008 12:43 PM
Hi Ragesh,
The infotype for payroll status is PA0003. Write a select statement as follows :
Select pernr
from pa0003
into itab
where <cond>.
Regards,
Swapna.
09-16-2008 1:00 PM
Hi ,
The data has to be taken from the cluster table PCL2 and not infotype .Can you suggest me a logic?
Thanks , Ragesh
09-16-2008 1:14 PM
09-16-2008 1:31 PM
Dear Rajesh ,
You can use macro rp-imp-c2-cu to import the data from cluster PCL2.
Here I have given sample code..Just have a look at it. I hope it will be useful .
DATA: BEGIN OF RX-KEY. "Cluster Key
INCLUDE STRUCTURE PC200.
DATA: END OF RX-KEY.
DATA: BEGIN OF RGDIR OCCURS 100.
INCLUDE STRUCTURE PC261.
DATA: END OF RGDIR.
table to store employee based on payroll area
data : begin of itab_empdetails occurs 0.
data : pernr like pa0001-pernr,
ABKRS like pa0001-ABKRS.
data : end of itab_empdetails.
data w_fpper(6) type c. "For Payroll Period
rp-imp-c2-cu.
check rp-imp-cd-subrc = 0.
clear rx-key.
rx-key-pernr = itab_empdetails-pernr.
Fill internal tables from cluster results to be displayed
loop at rgdir
where fpper = w_fpper
and inper = w_fpper
and void is initial
and abkrs in pnpabkrs.
rx-key-seqno = rgdir-seqnr.
rx-key-pernr = itab_empdetails-pernr.
rp-imp-c2-in.
Successful import of cluster results
RETURN CODE FROM IMPORT.
if rp-imp-in-subrc <> 0.
continue.
endif.
09-17-2008 4:38 AM
Thank You all but i am still need of a solution . The Pernr has to be fetched from the cluster PCL2.
A function module or any other logic should do .
The code provided is showing syntax error.
Edited by: ragesh venugopalan on Sep 17, 2008 5:39 AM