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: 

Read Payroll Results During Payroll Run

Former Member
0 Kudos

Hello All--

I have created a custom function used as part of the schema in payroll. It does some calculations during a payroll run. In this function, I would like to view the payroll results of the current payroll run. These results have yet to have been stored in the database and are not accessable via FM PYXX_READ_PAYROLL_RESULT. For instance, if a retro has been caused by the current payroll run, I want to be able to see the new active cluster which hasnt been written to the DB until the driver has finished. Any ideas?

Thanks in advance,

Brad

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Brad,

Try...

CALL FUNCTION 'CU_READ_RGDIR'

EXPORTING

persnr = it_pemp-pernr

TABLES

in_rgdir = tp_rgdir

EXCEPTIONS

no_record_found = 1

OTHERS = 2.

IF sy-subrc = 0.

cd-key-pernr = it_pemp-pernr.

sy-subrc = 0.

rp-init-buffer.

rp-imp-c2-cd.

ENDIF.

To get Payroll results...

Regards,

Raj

3 REPLIES 3

Former Member
0 Kudos

Hi Brad,

Try...

CALL FUNCTION 'CU_READ_RGDIR'

EXPORTING

persnr = it_pemp-pernr

TABLES

in_rgdir = tp_rgdir

EXCEPTIONS

no_record_found = 1

OTHERS = 2.

IF sy-subrc = 0.

cd-key-pernr = it_pemp-pernr.

sy-subrc = 0.

rp-init-buffer.

rp-imp-c2-cd.

ENDIF.

To get Payroll results...

Regards,

Raj

Former Member
0 Kudos

Raj,

Thanks for the quick reply.

I am looking to view the RT table.

Brad

0 Kudos

If you crete function via PE04, then put RT in input function´s input parameters.

Regards.