cancel
Showing results for 
Search instead for 
Did you mean: 

Equivalent for "leave program" in ABAP or "exit(0)" in C++/Java

Former Member
0 Kudos

Hi,

How do I by pass the end of a method like "LEAVE PROGRAM" in ABAP or exit(0) in C++/java.

The scenario is an error-check that should exit the method rather than execute the rest.

Regards,

Lloyd

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Lloyd,

Equivalent code in ABAP to exit is 'exit'...

Regards,

jomy

Former Member
0 Kudos

"exit" works verys smoothly..

Regards,

Lloyd

Answers (2)

Answers (2)

former_member182190
Active Participant
0 Kudos

Hi,

You can just use a Check statement for what you wanna check.

If its satisfied the chunk of code will be executed else not.

Regards,

Ismail.

Former Member
0 Kudos

hi lloyd........

you can go for if end if so that only teh required code is executed.

---regards,

alex b justin...

Former Member
0 Kudos

Hi,

Well... I've too many conditions to check for, so too many if conditions would make the code unreadable. Right now, its already setup like that.

Regards,

Lloyd