popupabapdynpro

How to return to previous popup?


I am opening a Popup(1) - Screen_0300

CASE sy-ucomm.
  WHEN 'POPUP1'.
    CALL SCREEN 0300 STARTING AT 10 08 ENDING AT 70 15.
ENDCASE.

From within this Popup I am calling another screen Popup(2) - Screen_0400.

MODULE user_command_0300 INPUT.
  CASE sy-ucomm.
    WHEN 'POPUP2'.
      CALL SCREEN 0400 STARTING AT 10 08 ENDING AT 70 15.
  ENDCASE.
ENDMODULE.

Now when I close Popup(2) I want to return to Popup(1). Currently both Popups get closed simultaneously. I already tried to call Popup(1) in the PAI of Popup(2) with Leave to Screen or Set Screen. Is there any way to achieve this?


Solution

  • To leave a screen displayed using CALL SCREEN, use SET SCREEN 0 during the execution of the PAI (MODULE ... INPUT), and the program will continue after the statement CALL SCREEN.

    0 is a special value to leave the current "Screen Call Sequence".

    NB: