Skip to Content

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 17 at 08:01 AM

    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

    Add comment
    10|10000 characters needed characters exceeded