cancel
Showing results for 
Search instead for 
Did you mean: 

Problems when reading Payroll with class CL_HRPAY99_PRR_4_PNP_REPS.

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

meenakshi-btp
Explorer
0 Kudos

Hi,

I have to do the same thing. May I know your approach?

This is what I thought..

I can create a custom method in the copied class and change the clusted id and molga and replace the CONSTUCTOR method call in our custom payroll driver program.

But I cannot see this method anywhere in our payroll driver program when I hit the Where Used List.

I am not sure how to proceed.

Please suggest.

suresh_datti
Active Contributor
0 Kudos

Hi Hugo,

The class CL_HR_PAY_RESULT_99 is for International Payroll & hence the cluster id 'RX' is hardcoded. I don't think there is a delivered class for Portugal Payroll (at least not on 47). You cna copy CL_HR_PAY_RESULT_99 into a custom class & hardcode 'RP' in the constructor method. Pl take a look at the classes for the other country versions ie CL_HR_PAY_RESULT_US, CL_HR_PAY_RESULT_GB etc.

Regards,

Suresh Datti

Former Member
0 Kudos

How can I copy. Don't I need a modification key for that? For example to create class

cl_hr_pay_result_NL. When I develop a form in hrforms for molga 05 and try to generate a print program I get an error message that implies cl_hr_pay_result_nl is missing. So I suppose I need this class which would be a slightly modified version of class cl_hr_pay_result_us, but it is not in the customer name range.

Regards,

George Wüst