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: 

Leaving the screen

sharadendu_agrawal
Active Participant
0 Kudos
115

Hi All-

I want to come out of the main program if the condition failed in the user-exit...

I have standard SAP program(SAPMQEVA) and inside that there is a user-exit(EXIT_SAPMQEVA_010 ). Whenver the cursor goes inside the user-exit and if the condition failed then the entire process should terminate and come out of the main program and the screen we get after logging into the SAP system(when we first enter the transaction) should appear.

Plz help me.

Sharadendu

1 ACCEPTED SOLUTION

Former Member
0 Kudos
65

Hi,

Use Leave Program .

reward points if helpful.

Revert back if any issues.

Regards,

Naveen

4 REPLIES 4

Former Member
0 Kudos
66

Hi,

Use Leave Program .

reward points if helpful.

Revert back if any issues.

Regards,

Naveen

Former Member
0 Kudos
65

Hi

Generally we use

EXIT or STOP

commands

in the report programs to comeout of that process loop.

You can use one of them and check, what happens.

Ofcourse in Module pool we may use LEAVE PROGRAM.

Reward points if useful

Regards

Anji

Former Member
0 Kudos
65

u can use,

EXIT PROGRAM.

please reward some points if useful.

Regards,

Padmakar

Former Member
0 Kudos
65

You check the condition and place a error message. It will take u out from the program.

If sy-subrc <> 0.
   message e000(001) with 'no data'.
endif.