Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Reg :Payroll calculation

Former Member
0 Likes
329

Hi Srinivas,

I have used the function module cd_read_last and I have passed the seqno of the rgdir table into out_seqno.

But after that fm is executed , sy-subrc is 1, that is it is saying that there is no record and the value of the imported variable is 0.

But I am having 16 records in rgdir with seqno read properly .

Please help me.

Thanks for your response.

Sowmya

1 REPLY 1
Read only

Former Member
0 Likes
305

Hi Sowmya,

In that FM OUT_SEQNR is imporing parameter.

The FM will export latest seqnr to that variable.

After u can pass this variable to other FM to get payroll result corresponding to

that seqnr.So declare a new variable and pass that one to OUT_SEQNR parameter.

Just go see the below code.

DATA V_SEQNR TYPE PC261-SEQNR.

CALL FUNCTION 'CD_READ_LAST'

EXPORTING

BEGIN_DATE = PN_BEGDA

END_DATE = PNENDA

IMPORTING

OUT_SEQNR = V_SEQNR

TABLES

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.

Regards,

Srini