cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You can try using the macro rp-imp-c2* to import the data from cluster PCL2.

-Akshay

Former Member
0 Kudos

Thanks guys,

i have nothing to import from the cluster table. I need to retrieve the data including the amounts and wage types

Former Member
0 Kudos

Hi,

You can use the FM -

for CRT last rec -PYXX_READ_LAST_CRT.

You can use PYXX_READ_PAYROLL_RESULT for retrieving payroll results.

Cheers,

Manoj.

Former Member
0 Kudos

I don't know if there is any FM or not for your requirement, but I think the structure PC208 might be of help to resolve your issue.

Thanks,