Skip to Content

Hi,

AGENDA:-

Writing a  sample code for report program to retrieve new Payroll results generated in the selected period. It will include all those with status indicator “A” and their immediate predecessors, those with status indicator “p”.

FUNCTION MODULES USED :-

PYXX_GET_EVALUATION_PERIODS

PROGRAM CODE:-

 

*&———————————————————————*

*& Report ZR_CSD129

*&

*&———————————————————————*

*&

*&

*&———————————————————————*

 

REPORT ZR_CSD129.

 

** Data declarations for the function module import and export.

 

DATA: IT_RESULTPERIODS TYPE TABLE OF PAYIN_RESULT,

W_RESULT TYPE PAYIN_RESULT,

W_RT TYPE PC207.

TABLES PERNR.

START-OF-SELECTION.

GET PERNR.

 

** After Get pernr Call the FM which will take Pernr as input

** along with IN-period , Period parameters.

** We will get the output of pay results as a table

 

CALL FUNCTION ‘PYXX_GET_EVALUATION_PERIODS’

EXPORTING

CLUSTERID = ‘IN’

EMPLOYEENUMBER = PERNR-PERNR

INPER_MODIF = PN-PERMO

INPER = PN-PAPER

TABLES

EVALUATED_PERIODS = IT_RESULTPERIODS

EXCEPTIONS

NO_PAYROLL_RESULTS = 1

NO_ENTRY_FOUND_ON_CU = 2

IMPORT_ERROR = 3

OTHERS = 4.

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 the Payroll result internal table for printing the Data

LOOP AT IT_RESULTPERIODS INTO W_RESULT.

LOOP AT W_RESULT-INTER-RT INTO W_RT WHERE LGART = ‘/560’.

WRITE:/ PERNR-PERNR, W_RESULT-EVP-SEQNR, W_RT-LGART, W_RT-BETRG, PN-PAPER.

ENDLOOP.

ENDLOOP.

Regards,

Mayure.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply