*&---------------------------------------------------------------------*
* & Report zfasdfa
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
Report zfasdfa.
Data: con_diabox type ref to cl_gui_dialogbox_container.
Data: l_alv type ref to cl_gui_alv_grid,
Lt_sflight type table of sflight.
Data: OK _code like sy-ucomm.
Parameters: p_zkp type char15.
Initialization.
Start-of-selection.
Set pf-status 'xg001 '.
Write 'zkp is a good student '.
At user-command.
Case sy-ucomm.
When 'sss '.
Call screen 100 ..
When 'back '.
Leave to screen 0.
Endcase.
*----------------------------------------------------------------------*
* Class lcl_event_handler Definition
*----------------------------------------------------------------------*
Class lcl_event_handler definition.
Public section.
Class-methods:
On_close for event close of cl_gui_dialogbox_container importing
Sender.
Endclass. "lcl_event_handler Definition
*----------------------------------------------------------------------*
* Class lcl_event_handler implementation
*----------------------------------------------------------------------*
Class lcl_event_handler implementation.
Method on_close.
Call method sender-> free.
Free: con_diabox, l_alv.
Leave to screen 0.
Endmethod. "on_close
Endclass. "lcl_event_handler implementation
*&---------------------------------------------------------------------*
* & Module status_0100 output
*&---------------------------------------------------------------------*
Module status_0100 output.
Set PF-STATUS 'm200 '.
Select * From sflight into Table lt_sflight.
If con_diabox is initial.
Create object con_diabox
Exporting
Width = 600
Height = 200
Top = 70
Left = 1, 140
Caption = 'title'
Exceptions
Others = 1.
Set handler lcl_event_handler => on_close for con_diabox.
Create object l_alv
Exporting
I _parent = con_diabox.
Endif.
Call method l_alv-> set_table_for_first_display
Exporting
I _structure_name = 'sflight'
Changing
It_outtab = lt_sflight.
Endmodule. "status_0100 output
*&---------------------------------------------------------------------*
* & Module user_command_0100 Input
*&---------------------------------------------------------------------*
Module user_command_0100 input.
Case sy-ucomm.
When 'back '.
Leave to screen 0.
Endcase.
Endmodule. "user_command_0100 inpu