OO ALV USING DOCKING CONTAINER


 

data : o_dock type ref to cl_gui_docking_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.
if  o_dock is initial.


* EITHER PROVIDE SIDE AND EXTENSION OR RATIO TO CREATE A DOCKING CONTAINER*


CREATE OBJECT  o_dock
EXPORTING
side       = o_dock->dock_at_left 

    extension  = 2000.

* CREATE OBJECT  o_dock
*   EXPORTING 

*    ratio                       = 60.


endif.

  if o_alv is  initial.


CREATE OBJECT o_alv
EXPORTING
i_parent          = o_dock.

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


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 )

Connecting to %s