‎2007 Dec 11 9:52 AM
Hi. I'd like to get a payroll for one person.
TABLES: pernr,pyorgscreen, pytimescreen.
NODES: payroll TYPE pay99_result.
DATA: wa_rt LIKE LINE OF payroll-inter-rt.
GET pernr.
GET payroll.
READ TABLE payroll-inter-rt WITH KEY lgart = '/T30' INTO wa_rt.
WRITE: ''.In the selection screen I choose 1 employee and some date (for excample searched value exists in 10/2007 so I give that period). When I launch program 'GET pernr' is perforemed whilst 'GET payroll' doesn't do anything Debugger doesn't stop at 'READ TABLE payroll-inter-rt ...' Please give me some tip why there is such situation in my program.
‎2007 Dec 11 10:12 AM
Hi Piotr,
Why not try accessing the tables PA0001, PA0002... and which ever infotypes you need instead of LDB PERNR. Then using your selection screen data you could call a function PYXX_READ_PAYROLL_RESULT to access any individual personnel number or multiple personnel number payroll data for any period.
Thanks
Mouli
Message was edited by:
Chandramouli Gangadharan
Message was edited by:
Chandramouli Gangadharan
‎2007 Dec 11 10:37 AM
I'm completely new at this topic, could You explain a bit more? In which infotype table could I find info I'm searching for in line
<i> READ TABLE payroll-inter-rt WITH KEY lgart = '/T30' INTO wa_rt.</i>
I try to do:
DATA: clu LIKE PCL2-RELID.
DATA: result type pay99_result occurs 0 with header line.
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
* clusterid = '31'
employeenumber = '20100304'
sequencenumber = '00022'
CHANGING
payroll_result = result.but I receive 'Type conflict whec calling FModule'
‎2007 Dec 11 11:13 AM
No you wouldnt be able to find all the details in Infotypes.
You need to understand that Payroll for evey country in SAP are stored in Cluster.
eg. PC00_M40_PAYROLL_CLSTR for India. We would use this to access data for any employment period. Every months data is stored in this cluster amd would have a unique sequence number SEQNR. We need to get this SEQNR for the period you would get the payroll for.
Your Approach should be in the follwoing sequence. I beileve you would have Personell Number, Month and Year atleast in your selection screen.
1. First get the/all (based on the selection options) the personnel number(s) from table PA0001 into an Internal Table.
2. Now for every PERNR from PA0001 get the Country and SEQNR from the FM CU_READ_RGDIR and CD_READ_LAST. and append it in your Internal Table
3. Now use the FM PYXX_READ_PAYROLL_RESULT for every PERNR in your Internal Table by passing the SEQNR and PERNR and get the RESULT Cluster. Then use the Line which you mentioned
READ TABLE payroll-inter-rt WITH KEY lgart = '/T30' INTO wa_rt. where LGART would be your Wage Type.
I hope this would help you getting started.
Thanks
Mouli
The Function module which i gave you would get the payroll details from a payroll cluster.