Skip to Content
0
Former Member
Mar 27, 2008 at 04:00 PM

ALV BACK OR EXIT

27 Views

Hi,

i do this alv and i wont when i push back that i go to screen before( to selection screen) ,

and when i do exit or cancel go to the code

i try like below but what happen is the same for exit back and cancel

what i miss(all the button bring me to the selection screen)?

Regards

MODULE pai INPUT.

CALL METHOD cl_gui_cfw=>dispatch.
  CASE ok_code.
    WHEN  'BACK'.
*      LEAVE TO SCREEN 0. "FOR LEAVE THE SCREEN TO THE SCREEN BEFORE
      LEAVE PROGRAM.
   WHEN 'EXIT' OR 'CANCEL'.
      IF NOT g_custom_container IS INITIAL.
        CALL METHOD g_custom_container->free.
        CLEAR: g_custom_container.
        FREE : g_custom_container.
        LEAVE TO SCREEN 0.
      ENDIF.
      WHEN OTHERS.
  ENDCASE.
  CLEAR ok_code.