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

leave to selection screen

Former Member
0 Likes
15,190

Hi all,

I am doing an ALV with oops. I am in screen 0001 now. If I select BACK fcode , it should go to previous screen (in this case selection screen 1000).How can I do this? I have tried with

leave to screen 0.

call screen 0.

But it's not working. It's coming out of that selection screen also.

And I have tried with

call selection-screen 1000.

It's working but, when I select BACK from here, it's going to the ALV screen 0001 again.

Please help.

1 ACCEPTED SOLUTION
Read only

Former Member
6,655

Hi,

Use

LEAVE TO SCREEN 0

Regards

Nandha

Hi all,

I am doing an ALV with oops. I am in screen 0001 now. If I select BACK fcode , it should go to previous screen (in this case selection screen 1000).How can I do this? I have tried with

leave to screen 0.

call screen 0.

But it's not working. It's coming out of that selection screen also.

And I have tried with

call selection-screen 1000.

It's working but, when I select BACK from here, it's going to the ALV screen 0001 again.

Please help.

11 REPLIES 11
Read only

Former Member
0 Likes
6,654

Hi,

Try using SET SCREEN 1000.

Read only

0 Likes
6,654

Hi,

it's not working,throwing error like screen 1000 is not called using CALL SELECTION-SCREEN statement.

Read only

0 Likes
6,654

I ususally Code using the LEAVE TO SCREEN 0, which is working for me..,

CASE OK_CODE.

when 'BACK'.
leave to screen 0.

ENDCASE.

where you are calling the screen 0001 , i.e which event you are calling. Calling it under end-of-selection event.

Read only

0 Likes
6,654

Yes, I am calling it after event END-OF-SELECTION.

I have called the screen like SET SCREEN 0001.

I have tried with LEAVE TO SCREEN 0. But it's not moving back to selection screen , it's moving totally out of the report.

Read only

0 Likes
6,654

it all depends on how you are calling screen and navigating. I never faced any problems with the screen navigation. I am sure you are doing some mistake., just try with small code and see how it works, if its not working then post that code here...

Read only

0 Likes
6,654

Hi Vijay,

earlier I have used SET SCREEN 001. Then LEAVE TO SCREEN 0 didn't work.Now I have used CALL SCREEN 001. Then LEAVE TO SCREEN 0 is working. What is the exact difference bet. SET SCREEN and CALL SCREEN?

Read only

0 Likes
6,654

Just Read the F1 help of those, it is explained clearly.

when you use SET SCREEN , you have to use LEAVE SCREEN.

not the LEAVE TO SCREEN 0. "Wrong This is the mistake you are doing.

SET SCREEN + LEAVE SCREEN = LEAVE TO SCREEN <scrno>

Differences Discussed many times in the General forum, Just give a small search.

Read only

0 Likes
6,654

Hi,

SET SCREEN 1000 is used to define the next screen as 1000.

But call screen is used to call any screen from the current screen.

Read only

0 Likes
6,654

Thank u all.

Read only

Former Member
0 Likes
6,654

Hi,

For the screen BACK Button use function code 'BACK'.

Case sy-ucomm.

when 'BACK'.

leave program.

endcase.

this is call selection screen.

Regards,

Madhavi

Read only

Former Member
6,656

Hi,

Use

LEAVE TO SCREEN 0

Regards

Nandha