‎2007 Feb 21 12:47 PM
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
‎2007 Feb 21 1:09 PM
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