Dear Experts,
I have called a perform cmmand from a SAPScript passing two variable dateparameters one as using parameter and another as changing parameter.My logic is like that when changing parameter is blank it should feel with in the form but if not initial it should come as it is before.While i test passing the changing parameter as filled it shows the value in sap script but when i call ther form the value field goes empty.
PERFORM ZCAL IN PROGRAM ZF130_CONFIRM
USING &RF130-ABSTIDAT&
CHANGING &RF130-RUECKDAT&
ENDPERFORM
FORM ZCAL TABLES B_RF130 STRUCTURE ITCSY "RF130
L_RF130 STRUCTURE ITCSY. "-RUECKDAT.
BREAK-POINT.
DATA:DAT(2) TYPE C,
MON(2) TYPE C,
YR(4) TYPE C,
L_LOCAL(13) TYPE C,
FINAL_DAT LIKE RF130-RUECKDAT.
DATA:DOT(1) TYPE C VALUE '.'.
READ TABLE L_RF130 WITH KEY 'RF130-RUECKDAT'.
IF SY-SUBRC EQ 0 AND L_RF130-VALUE IS INITIAL.
READ TABLE B_RF130 WITH KEY 'RF130-ABSTIDAT'.
IF SY-SUBRC EQ 0.
SPLIT B_RF130-VALUE AT DOT INTO DAT MON YR.
CONCATENATE YR MON DAT INTO FINAL_DAT.
CLEAR: DAT, MON, YR.
FINAL_DAT = FINAL_DAT + 7.
YR = FINAL_DAT+0(4).
MON = FINAL_DAT+4(2).
DAT = FINAL_DAT+6(2).
CONCATENATE DAT DOT MON DOT YR INTO L_RF130-VALUE.
L_RF130-VALUE = FINAL_DAT.
CLEAR: DAT,MON,YR,FINAL_DAT.
ELSEIF SY-SUBRC EQ 0 AND L_RF130-VALUE IS NOT INITIAL.
READ TABLE L_RF130 WITH KEY 'RF130-RUECKDAT'.
IF SY-SUBRC EQ 0.
L_RF130-VALUE = L_RF130-VALUE.
ENDIF.
ENDIF.
MODIFY L_RF130 INDEX 1.
ENDIF.
ENDFORM. "ZCAL