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: 

how to go back to the previous window?

Former Member
0 Kudos

Pls help me. I have this selection-screen window (my main window) and it has few buttons. One of the buttons of that main window is going to take you to another window which displays an ALV report. on that ALV report window when I press the back button (located at the top of the screen), it ends the entire program and goes back to my program editor.

How can I go back to the main window? <b>PLS help.</b> im a newbie. <b>THANKS.</b>

6 REPLIES 6

Former Member
0 Kudos

Jabbar,

what statement you are using to come back from the ALV report.

Satish

Former Member
0 Kudos

<b>Satish, </b>I do not use any code to come back. I have no idea what to use. PLS HELP. im a newbie.

Former Member
0 Kudos

Hi Jabbar,

I've got similar issue ..may not be same as your problem..

I've solved as below..may be useful for you....


AT USER-COMMAND.
  DATA : varb(10) TYPE c.
  CASE sy-ucomm.
    WHEN 'F3'.
      CALL FUNCTION 'POPUP_TO_DECIDE_INFO'
        EXPORTING
          defaultoption = 'Y'
          textline1     = 'Do you want to exit report ?'
          titel         = 'Exit report confirmation'
        IMPORTING
          answer        = varb.
      IF varb EQ 'J'.
        SUBMIT zreport.  "report name
      ENDIF.


  ENDCASE.

Former Member
0 Kudos

try with:

Go Back:

set screen 0.

leave screen.

Exit the program:

Leave Program

Former Member
0 Kudos

i got it!

i called the previous screen. <b>THANKS GUYS. I GAVE POINTS. </b>

Former Member
0 Kudos

Hi,

Execute the ALV report,

Before clicking the Back button,

Switch on the debugger, enter /H at command field,

Analyze the code, look if there exists Leave Program, correct it.

Bye,

KC