Application Development 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: 

STOP is shown as obselete -- any alternate

Former Member
0 Kudos

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.

5 REPLIES 5

0 Kudos

Hi surya,

U can use EXIT or LEAVE LIST-PROCESSING depending on where you are using this stop.

Thnx n regards

Debasish

former_member404244
Active Contributor
0 Kudos

Hi,

Instead of STOP use EXIT.

Reagrds,

Nagaraj

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

Put your cursor on a STOP statement and press F1. The help should show you what to do.

Rob