12-25-2008 10:47 AM
Hi all.
I have a screen splited to 2.
I would like to split it to 3 - top, middle & bottom.
My code is:
* Creating Custom Container
IF g_custom_container IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING
container_name = g_custom_container_name.
ENDIF.
* Creating Split Object
IF g_split IS INITIAL.
CREATE OBJECT g_split
EXPORTING parent = g_custom_container
orientation =
cl_gui_easy_splitter_container=>orientation_vertical
sash_position = 30
with_border = 1.
ENDIF.
* Creating ALV instances
IF grid1 IS INITIAL.
CREATE OBJECT grid1
EXPORTING
i_parent = g_split->top_left_container.
* Exclude functions
PERFORM exclude_tb_functions CHANGING lt_exclude.
* Creating and Registering Handler Object
CREATE OBJECT g_event_handler.
SET HANDLER g_event_handler->handle_toolbar FOR grid1.
SET HANDLER g_event_handler->handle_double_click FOR grid1.
SET HANDLER g_event_handler->handle_user_command FOR grid1.
* Fill Field-Catalogs
PERFORM field_catalog01.
* Set Layout
PERFORM layout1.
SORT gt_order BY aufnr.
* Display
CALL METHOD grid1->set_table_for_first_display
EXPORTING
is_layout = gs_layout1
i_save = 'A'
i_default = 'X'
is_variant = g_variant
it_toolbar_excluding = lt_exclude
CHANGING
it_outtab = gt_order[]
it_fieldcatalog = gt_fc1[].
ELSE.
CALL METHOD grid1->refresh_table_display.
ENDIF.
After a double-click I'm activating the following:
IF grid2 IS INITIAL.
CREATE OBJECT grid2
EXPORTING
i_parent = g_split->bottom_right_container.
* Fill Field-Catalog
PERFORM field_catalog02.
* Set Layout
PERFORM layout2.
* SORT gt_res BY rsnum rspos.
IF rb_comp EQ gc_true.
CALL METHOD grid2->set_table_for_first_display
EXPORTING
is_layout = gs_layout2
i_save = 'A'
CHANGING
it_outtab = gt_res[]
it_fieldcatalog = gt_fc2[].
ELSE.
CALL METHOD grid2->set_table_for_first_display
EXPORTING
is_layout = gs_layout2
i_save = 'A'
CHANGING
it_outtab = gt_res_conf[]
it_fieldcatalog = gt_fc2[].
ENDIF.
ELSE.
CALL METHOD grid2->refresh_table_display.
ENDIF.
How can I add the third part ???
When I added it it's being displayed on the second, which means that the problem is with my container's & split's definition.
Thanks in advance,
Rebeka
Code Formatted by: Alvaro Tejada Galindo on Dec 26, 2008 11:19 AM
12-25-2008 11:52 AM
12-25-2008 11:52 AM
12-25-2008 12:01 PM
Hi,
Go to ur screen layout. Check if the containers are overlapping. If so arrange accordingly.
Thanks,
Vinod.
12-25-2008 7:53 PM
Hello Rebeka
If you want to have top/middle/bottom control then create a single splitter container having a single column with three rows. Using the method GET_CONTAINER you retrieve the container instances for each control.
For a sample report have a look at ZUS_SDN_TWO_ALV_GRIDS in thread
Regards
Uwe
01-12-2009 7:32 AM
01-12-2009 7:35 AM
Plz refer to dis link properly..
/people/igor.barbaric/blog/2006/05/03/oo-abap-and-design-patterns-3-docking-containers-controller