‎2006 Oct 10 2:38 PM
Hello,
I was trying to use an example program on OSS named:
<a href="https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/note_print.htm?numm=699276&vernr=0000000000&nlang=E&smpsrv=https://websmp104.sap-ag.de&sap-language=E">Note 699276 - New classes: Selection - Reading payroll results</a>
And the program is:
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_**.
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 (...)
importing ex_prr = go_prr
exceptions INVALID_ENTRIES = 4.
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 (...).
* The results are now in table gt_pernr_pr
loop at gt_pernr_pr assigning <pernr_pr>.
go_pernr_pr ?= <pernr_pr>.
* Here do what you have to do with each result
endloop.
I copied almost exactly from the program, besides making a couple of minor changes. However, when I tried to run it, go_prr gives an illegal reference and sy-subrc is 1.
I am pretty sure that the payroll was set up correctly, may I know what could be the problem then?
Thanks a lot!
Regards,
Anyi
‎2006 Oct 10 2:42 PM
Could you check in SE24 whether the class that you are referring to is available 'CL_HRPAY99_PRR_4_PNP_REPS'.
IF it is there
Instead of using CALL METHOd to get instance
why dont you try a simple
CREATE OBJECT go_prr.
This could solve your problem
Message was edited by: Dominic Pappaly
‎2006 Oct 10 3:23 PM
Hello Dominic,
Thanks for the quick reply.
I've checked the class in SE24 and it is implemented/active, I tried to call create object and got the following message:
You cannot generate instances of the abstract class
So do you have any other suggestion?
Thanks a lot!
Regards,
Anyi
> Could you check in SE24 whether the class that you
> are referring to is available
> 'CL_HRPAY99_PRR_4_PNP_REPS'.
>
> IF it is there
>
> Instead of using CALL METHOd to get instance
>
> why dont you try a simple
>
> CREATE OBJECT go_prr.
>
> This could solve your problem
>
>
> Message was edited by: Dominic Pappaly
<i></i><i></i>
‎2006 Oct 10 2:43 PM
‎2006 Oct 10 3:25 PM
Hello Ravi,
Thanks for the quick reply.
To answer your question, yes I did since this is a standard practice to add PNP for HR reports.
Any other suggestion?
Thanks a lot!
Regards,
Anyi
‎2006 Oct 11 3:37 PM
Anyone has any other suggestion? Suggestion from anyone is welcomed.
Thanks!
Anyi