Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

how to retrieve the amount from the crt table using wage types?

hi guys,

is there a function module that i could call to get the amount in the crt that i see in pc_payresult? sorry im new in the payroll/benefits.

need an expert advice.

thank you!

Former Member
Former Member replied

Hi Ella,

Use FM: PYX_READ_PAYROLL_RESULT to fetch amt according to WT.

Following is the sample code plz check it out.

Reply if u will face any problem.

DATA : RT LIKE pc207 OCCURS 0 WITH HEADER LINE.

DATA : PAYRESULT TYPE payin_result.

DATA : V_SEQ LIKE HRPY_RGDIR-SEQNR.

u can pick sequence no (V_SEQ) from table HRPY_RGDIR.

CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'

EXPORTING

CLUSTERID = 'IN'

EMPLOYEENUMBER = IT_DATA-PERNR

SEQUENCENUMBER = V_SEQ

CHANGING

PAYROLL_RESULT = 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.

RT[] = PAYRESULT-INTER-RT[].

Hope u will get it.

Have a nice time.

Regards,

Ankur

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question