Application Development and Automation 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 only

Function module to get the sequence numbers based on PERNR & payroll period

Former Member
0 Likes
2,087

Hi,

Right now i am using the function module 'CU_READ_RGDIR' to get the sequence number based on the PERNR. Once i get the data i am filtering based on payroll periods (begin date and end date). Is there any function module to get the sequence number directly based on PERNR and payroll period dates? if so could you let me know.

Thanks

Satya

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,023

I think thats the only way

CALL FUNCTION 'CU_READ_RGDIR'

EXPORTING

persnr = p0001-pernr

TABLES

in_rgdir = it_rgdir

EXCEPTIONS

no_record_found = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

  • check whether "Pay date for payroll result" with in Start Date and

  • End date, and "Reason for Off-Cycle Payroll" is initial

LOOP AT it_rgdir WHERE paydt >= v_begda

AND paydt <= v_endda AND

void IS INITIAL

AND ocrsn IS INITIAL

AND srtza = 'A'.

v_seqnr = it_rgdir-seqnr.

ENDLOOP.

Hope this helps.

Thanks

Kiran

Hi,

Right now i am using the function module 'CU_READ_RGDIR' to get the sequence number based on the PERNR. Once i get the data i am filtering based on payroll periods (begin date and end date). Is there any function module to get the sequence number directly based on PERNR and payroll period dates? if so could you let me know.

Thanks

Satya

1 REPLY 1
Read only

Former Member
0 Likes
1,024

I think thats the only way

CALL FUNCTION 'CU_READ_RGDIR'

EXPORTING

persnr = p0001-pernr

TABLES

in_rgdir = it_rgdir

EXCEPTIONS

no_record_found = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

  • check whether "Pay date for payroll result" with in Start Date and

  • End date, and "Reason for Off-Cycle Payroll" is initial

LOOP AT it_rgdir WHERE paydt >= v_begda

AND paydt <= v_endda AND

void IS INITIAL

AND ocrsn IS INITIAL

AND srtza = 'A'.

v_seqnr = it_rgdir-seqnr.

ENDLOOP.

Hope this helps.

Thanks

Kiran