Dump in calling PYXX_READ_PAYROLL_RESULT

Hi,

I am trying to get the last active payroll record of transaction pc_payresult.

I am calling the function PYXX_READ_PAYROLL_RESULT but getting a dump.

The code is as below

DATA: wa_result type pay99_result,

it_rgdir type standard table of pc261,

wa_rgdir type pc261,

v_num type CDSEQ,

wa_result type pay99_result,

p_pernr type PERNR_D.

CALL FUNCTION ‘CU_READ_RGDIR’

EXPORTING

persnr = pernr-pernr

BUFFER =

NO_AUTHORITY_CHECK = ‘ ‘

IMPORTING

MOLGA =

tables in_rgdir = it_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.

delete it_rgdir where srtza <> ‘A’ or payty <> space.

describe table it_rgdir lines v_num.

READ table it_rgdir into wa_rgdir index v_num.

p_pernr = pernr-pernr.

CALL FUNCTION ‘PYXX_READ_PAYROLL_RESULT’

EXPORTING

CLUSTERID = ‘ ‘

employeenumber = p_pernr

sequencenumber = wa_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 = wa_result

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.

Do I need to pass the Cluster ID? If so,then what id to pass.

Please help in this matter.

Thanks&Regards

Ananya

***************************************************************

Hi Ananya,

Use the function module PYXX_GET_RELID_FROM_PERNR to get the relid for that pernr before you call the function PYXX_READ_PAYROLL_RESULT.

***************************************************************

Hi

Yes, you need to pass the cluster id. It is nothing but the relid. For the country grouping, get the relid from the check table of molga. I think it is t500l.

This is the only reason for getting dump as for getting any payroll result, the key should contain pernr, seqnr and relid. As you have not passed the relid (signifying the cluster for specific country) it will go for dump.

select relid from t500l for the country grouping you get from the FM.

Regards

Navneet

Message was edited by:

Navneet Saraogi

***************************************************************

Hi,

Go to domain RELID_PCL2.Click value range.There you can find the related value.For eg., RQ for Australia.

What is the dump you are getting?

Comment:

Hi,

Thanks for the replies.

Problem is solved atlast. I declared the structure of wa_result as PAY99_RESULT and

passed ‘read_only_international’ flag as ‘X’ in the function.

Thanks & Regards

Ananya

Was this article helpful?

Related Articles

Leave A Comment?

You must be logged in to post a comment.