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

Screen module pool programing - leave screen.

Former Member
0 Likes
1,488

Hi all,

I am calling screen in one of the user exit of standard Transaction (CO15). after getting some data I want to return to the code back in user exit. I try with leave screen, lleave program but it directly exit me from the program.

I just want to exit from that screen and come back to user exit code.

Thanks in advance.

9 REPLIES 9
Read only

Former Member
0 Likes
956

Hi,

Try..

LEAVE TO SCREEN 0.

Thanks

Naren

Read only

0 Likes
956

Hi,

another way to proceed is set value 0 in proprierties tab of the screen, in the field "next screen".

Then after the last instruction of the PAI of your custom screen, the code returns after the call screen.

And you don't have to put the LEAVE SCREEN instruction.

Regards

Andrea

Read only

0 Likes
956

Not working any of the above way.

Read only

Former Member
0 Likes
956

Hi,

Where are you writing leave screen, that also would matter....

if you are writing leave screen in the user_exit where you are calling that screen, then possible it will not work.

Try to debug once you call the screen where exactly the control goes... and when you come back from the screen where exactly the control goes...

regards,

Siddarth

Read only

Former Member
0 Likes
956

Hi,

What happens when you do LEAVE TO SCREEN 0.?

btw...how are you calling the screen..?

are you using

CALL SCREEN 'Screen Number'

?

Thanks

Naren

Read only

0 Likes
956

I call the screen using

call screen 0100(screen #).

and in PAI module on back command or any command I want to go back to user exit.

module USER_COMMAND_0100 input.

CASE ok_code.

WHEN 'SAVE'.

"call a subroutine to save the data or give statements to save data.

WHEN 'BACK'.

LEAVE to screen 0.

Read only

0 Likes
956

Try like this.

module USER_COMMAND_0100 input.

clear ok_code.

ok_code = sy-ucomm. <--- Collect SY-UCOMM in ok_code.

CASE ok_code.

WHEN 'SAVE'.

"call a subroutine to save the data or give statements to save data.

WHEN 'BACK'.

SET SCREEN 0.

Thanks..

Read only

0 Likes
956

Hi,

Use set screen <screen_number>.

Read only

Former Member
0 Likes
956

Hi,

Check the below

leave to screen "screen numebr"

Regards,

Anki Reddy