Code:
*&---------------------------------------------------------------------*
*& Module status_0100 OUTPUT
*&---------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
SET PF-STATUS 'MAIN100'.
SET TITLEBAR 'TB000'.
IF m_custom_container IS INITIAL.
*\ For backgroung processing
IF cl_gui_alv_grid=>offline( ) IS INITIAL.
CREATE OBJECT m_custom_container
EXPORTING container_name = container_main.
CREATE OBJECT m_grid
EXPORTING i_parent = m_custom_container.
ELSE.
* If it is in backround:
CREATE OBJECT m_grid
EXPORTING i_parent = m_doc_container.
ENDIF.
*// For backgroung processing
CALL METHOD m_grid->set_table_for_first_display
EXPORTING
i_structure_name = 'IT_MDPS'
is_layout = wa_layout
is_variant = wa_variant
i_save = 'A'
it_special_groups = it_fieldgroups
CHANGING
it_outtab = it_mdps
it_fieldcatalog = it_fieldcat.
CREATE OBJECT event_receiver.
SET HANDLER event_receiver->handle_hotspot_click FOR m_grid.
ELSE.
CALL METHOD m_grid->refresh_table_display
EXPORTING i_soft_refresh = 'X'.
ENDIF.
ENDMODULE. " status_0100 OUTPUT