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: 

program exit

Former Member
0 Kudos

Hi All,

Based on a specific condition I want to come out from the program . Can I use EXIT. That is I dont want to execute the remainign part of the program . Which Command Should I use.

Regards

Renuka

1 ACCEPTED SOLUTION

Former Member
0 Kudos

By using this exit statement can I come out from the entire program or only from the IF part. Could you pls clarify.

Regards

renuka

5 REPLIES 5

Former Member
0 Kudos

hi,

yes you can use EXIT command it should be like

if ......

do this....

exit.

endif.

thanks,

anupama

Former Member
0 Kudos

Hi,

try this:

DATA: ...

...

start-of-selection.

if sy-uname <> 'TEST'.

exit.

endif.

...

end-of-selection.

Regards, Dieter

Former Member
0 Kudos

By using this exit statement can I come out from the entire program or only from the IF part. Could you pls clarify.

Regards

renuka

0 Kudos

Hi,

why don't you try it and look what will be happend????

Regards, Dieter

0 Kudos

Renuga,

You may try the idea suggested , U could also use

check <logical expression>

If this logical expression becomes false, the program control will be taken out from current block, Entire prgm will be terminated....

Thanks

Santhosoh