Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Payroll result using class CL_HRPAY99_PRR_4_PNP_REPS

Bhaskar_Tripath
Participant
0 Kudos

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

7 REPLIES 7

Former Member
0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

Hi

Try using methods GET_RGDIR, GET_PERNR_PAYR_RESULTS in class CL_HRPAY99_PRR_4_PNP_REPS.

~~~Ganesh Kumar K.

0 Kudos

Hi Ganesh,

Please elaborate how to use.

Thanks,

Bhaskar

0 Kudos

Please do a where used list on method GET_PERNR_PAYR_RESULTS_ALLIN1 in that class.

Rob

Bhaskar_Tripath
Participant
0 Kudos

self resolved...

0 Kudos

could you post the solution?

Thank you