Application Development and Automation 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: 
Read only

program exit

Former Member
0 Likes
821

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
Read only

Former Member
0 Likes
784

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
Read only

Former Member
0 Likes
784

hi,

yes you can use EXIT command it should be like

if ......

do this....

exit.

endif.

thanks,

anupama

Read only

Former Member
0 Likes
784

Hi,

try this:

DATA: ...

...

start-of-selection.

if sy-uname <> 'TEST'.

exit.

endif.

...

end-of-selection.

Regards, Dieter

Read only

Former Member
0 Likes
785

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

Read only

0 Likes
784

Hi,

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

Regards, Dieter

Read only

0 Likes
784

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