*&---------------------------------------------------------------------*
*& Report ZLEH11
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
report zleh11.
class ooalv definition.
public section.
class-methods:split_con importing iv_type type i
changing io_grid1 type ref to cl_gui_alv_grid optional
io_grid2 type ref to cl_gui_alv_grid optional
io_grid3 type ref to cl_gui_alv_grid optional.
private section.
class-data:go_split1 type ref to cl_gui_splitter_container.
class-data:go_split2 type ref to cl_gui_splitter_container.
class-data:go_cc type ref to cl_gui_custom_container.
* class-data:go_cc type ref to cl_gui_docking_container.
endclass .
class ooalv implementation.
method:split_con.
check go_cc is not bound.
if go_cc is not bound.
go_cc = new cl_gui_custom_container( container_name = 'ALV' ).
endif.
* if go_cc is not bound.
* go_cc = new cl_gui_docking_container(
* side = cl_gui_docking_container=>dock_at_LEFT
* repid = sy-repid dynnr = sy-dynnr extension = 300 ).
* endif.
"iv_type 1 分割左右 2 分割上下 3上半部分割左右 4 下半部分分割左右
case iv_type.
when 1.
if go_split1 is not bound.
go_split1 = new cl_gui_splitter_container( parent = go_cc rows = 1 columns = 2 ).
io_grid1 = new cl_gui_alv_grid( go_split1->get_container( row = 1 column = 1 ) ) .
io_grid2 = new cl_gui_alv_grid( go_split1->get_container( row = 1 column = 2 ) ) .
endif.
when 2.
if go_split1 is not bound.
go_split1 = new cl_gui_splitter_container( parent = go_cc rows = 2 columns = 1 ).
io_grid1 = new cl_gui_alv_grid( go_split1->get_container( row = 1 column = 1 ) ) .
io_grid2 = new cl_gui_alv_grid( go_split1->get_container( row = 2 column = 1 ) ) .
endif.
when 3.
if go_split1 is not bound.
go_split1 = new cl_gui_splitter_container( parent = go_cc rows = 2 columns = 1 ).
endif.
if go_split2 is not bound.
go_split2 = new cl_gui_splitter_container( parent = go_split1->get_container( row = 1 column = 1 ) rows = 1 columns = 2 ).
endif.
io_grid1 = new cl_gui_alv_grid( go_split1->get_container( row = 2 column = 1 ) ) .
io_grid2 = new cl_gui_alv_grid( go_split2->get_container( row = 1 column = 1 ) ) .
io_grid3 = new cl_gui_alv_grid( go_split2->get_container( row = 1 column = 2 ) ) .
when 4.
if go_split1 is not bound.
go_split1 = new cl_gui_splitter_container( parent = go_cc rows = 2 columns = 1 ).
endif.
if go_split2 is not bound.
go_split2 = new cl_gui_splitter_container( parent = go_split1->get_container( row = 2 column = 1 ) rows = 1 columns = 2 ).
endif.
io_grid1 = new cl_gui_alv_grid( go_split1->get_container( row = 1 column = 1 ) ) .
io_grid2 = new cl_gui_alv_grid( go_split2->get_container( row = 1 column = 1 ) ) .
io_grid3 = new cl_gui_alv_grid( go_split2->get_container( row = 1 column = 2 ) ) .
when others.
endcase.
endmethod.
endclass.
start-of-selection.
data:go_grid1 type ref to cl_gui_alv_grid.
data:go_grid2 type ref to cl_gui_alv_grid.
data:go_grid3 type ref to cl_gui_alv_grid.
call screen 100.
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
module status_0100 output.
* SET PF-STATUS 'xxxxxxxx'.
* SET TITLEBAR 'xxx'.
ooalv=>split_con( exporting iv_type = 1 changing io_grid1 = go_grid1 io_grid2 = go_grid2 io_grid3 = go_grid3 ).
endmodule.
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
module user_command_0100 input.
* check sy-ucomm eq 'EXIT'.
leave to screen 0.
endmodule.
CL_GUI_SPLITTER_CONTAINER
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...