Skip to Content
avatar image
Former Member

Leave to screen 0 doesn't navigate back to previous screen

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.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Mar 12, 2012 at 06:07 AM

    Hi,

    You may try calling your transaction code.

    CALL TRANSACTION <your tcode here>.

    Regards,

    iostreamax

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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.

  • Mar 26, 2012 at 09: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
    • LEAVE TO SCREEN

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 15, 2012 at 05: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 -

    • Create a push button on screen 200 and under it you need to write the logic for returning back i.e. CALL SCREEN 100 for the push button.
    • You can also create buttons on the standard toolbar, whereby you can create modules in the flow-logic of the respective screens i.e. under the PAI section write the below mentioned code -
      • MODULE exit AT EXIT-COMMAND or
      • MODULE cancel AT EXIT-COMMAND

    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 ! 😊

    Add comment
    10|10000 characters needed characters exceeded