03-12-2012 5:48 AM
Hi all,
I'm doing a report on ALV.
I have a selection screen at beginning, after user fill in, it will call screen 100.
In screen 100, if user double click on a row, it will call screen 200 to display further detail.
In screen 200, once user press back and return to screen 100, what is the necessary code to navigate the user back to the selection screen at the start?
I try to use "Leave to screen 0", it doesn't really work, as I have to press several time of back only can go back to the selection screen.
I try to use "Call selection-screen 1000", it navigate back to the selection screen but once I enter the select options, it will call screen 100 but nothing can displayed (ALV gone missing), in fact it doesn't route back to my "START-OF-SELECTION" point...
Any help will be deeply appreciated, if you need more info I can added the necessary code thanks.
03-12-2012 6:07 AM
Hi,
You may try calling your transaction code.
CALL TRANSACTION <your tcode here>.
Regards,
iostreamax
03-12-2012 6:07 AM
Hi,
You may try calling your transaction code.
CALL TRANSACTION <your tcode here>.
Regards,
iostreamax
03-12-2012 6:19 AM
Hi Jake,
My scenario is a report program, so I can't use call transaction statement.
In fact, I have solved this one by using "SUBMIT <pro> VIA SELECTION-SCREEN".
Thanks for your help.
03-13-2012 6:13 AM
Hi,
Ya that might have solved your problem but you have to execute your program again. Instead you could have called you selection screen itself in screen 200 when back is pressed.
Call screen 1000.
regards.
Aswath.
03-15-2012 5:45 AM
Hi,
What you need to do is to return back to screens as you went forward with it. For having select-options on your screen you must have created screen 100, as it navigated well by itself. Next step as per your requirement is to have user navigate to screen number 200 whenever it clicks on 1 of the row of an ALV column.
Now, for returning back you can do the following to return to screen 100 -
and under these section/s put the following code - CALL SCREEN 100
The same thing needs to be done for screen 100. You can follow the above procedure for the screen 100. Here in screen 100 you can use the command LEAVE TO SCREEN 0 at the push buttons or mention it under the buttons created in standard toolbar.
Hope this helps !
03-26-2012 10:18 PM
This question has already been answered but I think I have a better answer than those offered:
You have two options for navigating to other screens:
CALL SCREEN will simply add the screen which you are navigating to the top of the stack. If you go back, this screen will be removed from the stack, and you will return to the previous screen.
LEAVE TO SCREEN removes the current screen from the top of the stack, and adds the screen which you are navigating to the top of the stack. If you go back, this screen too will be removed from the stack, and you will return to the screen before the one you started from. Also note that LEAVE TO SCREEN 0 removes the current screen from the top of the stack, and does not add any screen to the top of the stack. This is why you return to the previous screen. It is now on the top of the stack.
If your situation, on screen 100 you should NOT use a CALL SCREEN 200, because on screen 200 if you go back, you will return to screen 100. You should instead use a LEAVE TO SCREEN 200. This way if you go back, you will return to the selection screen, because screen 100 will have been removed from the stack.
03-27-2012 4:10 AM
Hello Alex,
Yes you sure do have a pretty good answer for the original post. It's clean, nice and well explained concept on call and leave screen.
08-03-2016 11:36 AM
06-07-2021 7:04 AM