REPORT ZR_G216HR_PAYROLL_OFFCYCLE.
TABLES PERNR.
DATA I_RGDIR LIKE PC261 OCCURS 0 WITH HEADER LINE.
DATA I_PAYRESULT TYPE PAYIN_RESULT.
DATA WA_RT TYPE PC207.
START-OF-SELECTION.
GET PERNR.
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
PERSNR = PERNR-PERNR
* BUFFER =
* NO_AUTHORITY_CHECK = ' '
* IMPORTING
* MOLGA =
TABLES
IN_RGDIR = I_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.
LOOP AT
I_RGDIR." WHERE SY-TABIX EQ
5."FPPER IS INITIAL AND INPER IS INITIAL.
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
EXPORTING
* CLUSTERID =
EMPLOYEENUMBER = PERNR-PERNR
SEQUENCENUMBER = I_RGDIR-SEQNR
* READ_ONLY_BUFFER = ' '
* READ_ONLY_INTERNATIONAL = ' '
* ARC_GROUP = ' '
* CHECK_READ_AUTHORITY = 'X'
* FILTER_CUMULATIONS = 'X'
* CLIENT =
* IMPORTING
* VERSION_NUMBER_PAYVN =
* VERSION_NUMBER_PCL2 =
CHANGING
PAYROLL_RESULT = I_PAYRESULT
* 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.
LOOP AT I_PAYRESULT-INTER-RT INTO WA_RT.
IF I_RGDIR-FPPER EQ '000000' AND I_RGDIR-INPER EQ '000000'.
WRITE:/
I_RGDIR-FPPER,I_RGDIR-INPER,WA_RT-LGART, WA_RT-BETRG.
ENDIF.
ENDLOOP.
ENDLOOP.