Skip to Content
0
Former Member
Apr 11, 2006 at 05:26 PM

Problems when reading Payroll with class CL_HRPAY99_PRR_4_PNP_REPS.

145 Views

I'm triyng to use the above class to read Payroll results.

I'm using the code as advised, on note 699276.

However, i'm getting an "Read Error", when executing method GET_PERNR_PAYR_RESULTS_ALLIN1.

After some debugging, i discovered that in method Read_from_buffer (class Cl_hr_pay_buffer), the system does a direct reading to table PCL2, in search for the cluster entry key. The thing is, that instead of looking for CLUSTERID 'RP' (as it's stated on table T500L, for our MOLGA), the system look for CLUSTERID 'RX', because that value is hard-code on the CONSTRUCTOR method of class CL_HR_PAY_RESULT_99.

As anyone been thru this kind of problem? Is this some kind of class or method bug?

Thanks in advance for your cooperation.

Sincerely,

Hugo Ferreira

PS - Here's the code of the program, so far:

data: go_prr type ref to cl_hrpay99_prr_4_pnp_reps,

gt_pernr_pr type H99_HR_PAY_RESULT_TAB,

go_pernr_pr type ref to CL_HR_PAY_RESULT_PT.

field-symbols <pernr_pr> type ref to CL_HR_PAY_RESULT.

start-of-selection.

call method CL_HRPAY99_PRR_4_PNP_REPS=>GET_INSTANCE

EXPORTING

IM_PN_BEGDA = pn-begda

IM_PN_ENDDA = pn-endda

IM_MOLGA = '19'

IM_ADD_RETROES_TO_RGDIR = 'X'

IMPORTING

ex_prr = go_prr

EXCEPTIONS

INVALID_ENTRIES = 1.

get pernr.

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

NO_ENTRIES_FOUND = 3

READ_ERROr = 4.

loop at gt_pernr_pr assigning <pernr_pr>.

go_pernr_pr ?= <pernr_pr>.

endloop.