05-24-2011 10:22 AM
Hi All,
My questions are:
1. How to read last payroll result using this class (like when we use FM approach, we can use FM 'CD_READ_LASR' and then use the SEQNR in FM 'PYXX_READ_PAY_RESULT').
2. When I use the below code, it still returns me all the payroll results in gt_pernr_pr. I was expecting only april results. Where I am going wrong?
data go_prr type ref to CL_HRPAY99_PRR_4_PNP_REPS.
data gt_pernr_pr type H99_HR_PAY_RESULT_TAB.
data go_pernr_pr type ref to CL_HR_PAY_RESULT_GB.
DATA ls_RT TYPE PC207.
field-symbols <pernr_pr> type ref to CL_HR_PAY_RESULT.
START-OF-SELECTION.
call method CL_HRPAY99_PRR_4_PNP_TISPAN=>GET_INSTANCE
exporting IM_PN_BEGDA = '20070401'
IM_PN_ENDDA = '20070430'
IM_MOLGA = '08'
importing ex_prr = go_prr
exceptions INVALID_ENTRIES = 4.
GET PERAS.
call method go_prr->GET_PERNR_PAYR_RESULTS_ALLIN1
exporting im_pernr = pernr-pernr
importing EX_PERNR_PAYROLL_RESULTS = gt_pernr_pr
exceptions COUNTRY_VERSION_NOT_AVAILABLE = 1
NO_AUTHORIZATION = 2
READ_ERROR = 4.
IF SY-SUBRC = 0.
loop at gt_pernr_pr assigning <pernr_pr>.
go_pernr_pr ?= <pernr_pr>.
LOOP AT go_pernr_pr->INTER-RT INTO ls_RT.
WRITE: / ls_RT-LGART, ls_RT-BETRG.
ENDLOOP.
endloop.
ENDIF.
Thanks,
Bhaskar
05-24-2011 1:25 PM
Hi Bhaskar,
If u want to see only last payroll result then use FM 'CD_READ_LAST_RESULT_IN_RGDIR' pass pernr and get sequence no.
After that use FM 'PYXX_READ_PAYROLL_RESULT' pass pernr and sequence no and you will last payroll result for that pernr.
Regards
Dhiraj Dangore
05-24-2011 7:42 PM
Hi Dhiraj,
With function module I am aware how to do that. I want to know how to ready last payroll result and specific month result using class CL_HRPAY99_PRR_4_PNP_REPS.
Thanks,
Bhaskar
05-24-2011 1:28 PM
Hi
Try using methods GET_RGDIR, GET_PERNR_PAYR_RESULTS in class CL_HRPAY99_PRR_4_PNP_REPS.
~~~Ganesh Kumar K.
05-24-2011 7:42 PM
05-24-2011 7:50 PM
Please do a where used list on method GET_PERNR_PAYR_RESULTS_ALLIN1 in that class.
Rob
01-02-2012 8:35 AM
11-25-2013 8:14 PM