I need to read RT results in the payroll simulation run. I understand that in the simulation run RT table doesn't get updated, but still all the calculations and processing is done. I need to read these values in my ABAP program. Any suggestions on how to read these values in the simulation run?
Hi,
Get the payroll result by using th function module
PYXX_READ_PAYROLL_RESULT
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
EMPLOYEENUMBER = w_pernr-pernr SEQUENCENUMBER = NUMBER
CHANGING
PAYROLL_RESULT = RESULT
EXCEPTIONS
ILLEGAL_ISOCODE_OR_CLUSTERID = 1
ERROR_GENERATING_IMPORT = 2
IMPORT_MISMATCH_ERROR = 3
SUBPOOL_DIR_FULL = 4
NO_READ_AUTHORITY = 5
NO_RECORD_FOUND = 6
VERSIONS_DO_NOT_MATCH = 7
ERROR_READING_ARCHIVE = 8
ERROR_READING_RELID = 9
OTHERS = 10
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*
The deep structure is stored in Result table.
now move the Result table to another table.
move result -inter-rt[ ] to it_rt.
Then, loop IT_RT table and get the values.
Regards,
Vani
Hi Nikhil,
Once you got the SEQNR(Sequence Number), RELID( Cluster ID), you have to pass these fields along with the PERNR to the Function module PYXX_READ_PAYROLL_RESULT, it will give the payroll result is the deep structure, does contains 3 structures(EVP,INTER,NAT), but our interest is on the sturcture INTER, which contains the payroll results.
So u have to loop on this perticulat INTER structure as follows,
LOOP AT i_pay_result-inter-rt INTO wa_rt where lgart = wagetype(selection-screen input).
wa_final-amount = wa_rt-betrg.
ENDLOOP.
DATA : i_result_dir LIKE TABLE OF pc261,
i_pay_result TYPE pay99_result,
Regards,
Narendra
Add a comment