OO ALV USING CUSTOM CONTAINER


DATA : o_cust TYPE REF TO cl_gui_custom_container,

o_alv TYPE REF TO cl_gui_alv_grid,
it_spfli TYPE TABLE OF spfli,
wa_spfli TYPE spfli,
ok_code TYPE sy-ucomm.

SELECT-OPTIONS  : p_carr FOR wa_spfli-carrid.

START-OF-SELECTION.
PERFORM data_fetch.
CALL SCREEN 100.

FORM data_fetch .
SELECT * FROM spfli INTO TABLE it_spfli WHERE carrid IN p_carr.
ENDFORM.                    ” DATA_FETCH


MODULE status_0100 OUTPUT.
SET PF-STATUS ‘STATUS’.
SET TITLEBAR ‘TITLE’.

ENDMODULE.                 ” STATUS_0100  OUTPUT


MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN ‘BACK’ OR ‘EXIT’ OR ‘CANCEL’.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE.                 ” USER_COMMAND_0100  INPUT


MODULE display_alv OUTPUT.

CREATE OBJECT o_cust
EXPORTING
container_name              = ‘CUSTOM’.

CREATE OBJECT o_alv
EXPORTING
i_parent          = O_CUST.

CALL METHOD o_alv->set_table_for_first_display
EXPORTING
i_structure_name              = ‘SPFLI’
CHANGING
it_outtab                     = IT_SPFLI.

ENDMODULE.                 ” DISPLAY_ALV  OUTPUT

 SCREEN FLOW LOGIC

PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
MODULE DISPLAY_ALV.


PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.



 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s