cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the corresponding Current (A) payroll of a Previous (P) payroll?

Former Member
0 Kudos

Dear experts,

I want to find the SEQNR of the 'A' payroll for a 'P' payroll.

Is there any existing FM which can fulfill this task?

Thanks!

Jerry

Accepted Solutions (0)

Answers (1)

Answers (1)

JoseMariaPerez
Explorer
0 Kudos

Hello,

you can get all the registers for the payroll results of an employee:

DATA: lt_rgdir type table of pc261.

CALL FUNCTION 'CU_READ_RGDIR'   

  EXPORTING      

    persnr = pernr-pernr   

  TABLES      

    in_rgdir = lt_rgdir   

  EXCEPTIONS      

    no_record_found = 1   

    OTHERS = 2.

and then you can filter and add some logic using the fields: SEQNR, SRTZA ('P'/'A'), FPEPER, INPER

Best Regards