10-10-2007 12:59 PM
Hi all,
I have STOP used in my code which is shown as an obsolete Error during Extended Syntax Check in ECC 6.0.
Can any one tell me if we have an alternate.
Surya Kiran.
10-10-2007 1:03 PM
Hi surya,
U can use EXIT or LEAVE LIST-PROCESSING depending on where you are using this stop.
Thnx n regards
Debasish
10-10-2007 1:08 PM
10-10-2007 1:09 PM
comment the stop with pseudo codes "#EC *.
IF pa_upd EQ gc_x.
SEARCH pa_file FOR '.csv'.
IF sy-subrc NE gc_zero_num.
MESSAGE i008. "DISPLAY LIKE 'E'. "#EC *
STOP. "#EC *
ENDIF.
ENDIF.
i would suggest you to go through SAP Release Note for ECC6.0,that would help you more to solve your problem
10-10-2007 1:17 PM
Hi,
STOP statement will terminate the execution of the program.
To replace this we can use EXIT but with some conditions.
Example code:
Suppose that we have STOP statement in code as follows:
report ztest.
perform f1000.
FORM f1000.
if x eq 0.
stop.
else.
write 'Hi'.
endif.
endform.
Here, the stop statement will stop the execution of the program.
replacing with EXIT.
report ztest.
data : flag type c.
perform f1000.
if flag ='X'.
EXIT.
endif.
FORM f1000.
if x eq 0.
flag = 'X'.
EXIT.
else.
write 'Hi'.
endif.
endform.
The EXIT statement in the subroutine gets the control out of the perform statement.But we need to terminate the program. So , after the perform statement we need to check whether the EXIT statement in side subroutine is executed , if so then come out the program using EXIT.
EXIT will come out of the loops , subroutines and program it self if it is not used in any loop or subroutine.
Regards,
Lakshmi.
10-10-2007 2:30 PM
Put your cursor on a STOP statement and press F1. The help should show you what to do.
Rob