2009 Aug 27 2:35 PM
Hi all,
I have a program where i need to display split screen ALV.
One ALV table on the left and one the right.
In the left ALV i display 10 table names..
If i click on the table name then the table should be displayed in the right side ALV.
This i can successfully doit but if i click on the another table after displaying the one table the new table will not be displayed where as still the first displayed tabled is shown..
Below is my coding please have a look and let me know the error..
TO DISPLAY THE LEFT SIDE ALV..
IF gr_custom_container_02 IS INITIAL.
CREATE OBJECT gr_custom_container_02
EXPORTING
container_name = 'CUSTOM'.
Split the Container---------------------------------------------------*
CREATE OBJECT splitter
EXPORTING
parent = gr_custom_container_02
rows = 1
columns = 2.
CALL METHOD splitter->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = container_1.
create the ALV Table-------------------------------------------------*
CREATE OBJECT gr_alv_grid_02
EXPORTING
i_parent = container_1.
create Fieldcatalog--------------------------------------------------*
PERFORM prepare_fieldcat_02 CHANGING g_t_fieldcat_02.
To Customize the layout
PERFORM prepare_layout_02 CHANGING g_s_layout_02.
Show ALV-------------------------------------------------------------*
CALL METHOD gr_alv_grid_02->set_table_for_first_display
EXPORTING
is_layout = g_s_layout_02
CHANGING
it_fieldcatalog = g_t_fieldcat_02
it_outtab = g_t_queuename.
SET HANDLER event_receiver->handle_hotspot_click FOR gr_alv_grid_02.
ELSE.
To refresh the table for displaying.
CALL METHOD cl_gui_cfw=>flush.
CALL METHOD gr_alv_grid_02->refresh_table_display
EXCEPTIONS
finished = 1
OTHERS = 2.
ENDIF.
TO DISPLAY THE RIGHT HAND ALV:
CALL METHOD splitter->get_container
EXPORTING
row = 1
column = 2
RECEIVING
container = container_2.
create the ALV Table-------------------------------------------------*
CREATE OBJECT gr_alv_grid_03
EXPORTING
i_parent = container_2.
create Fieldcatalog--------------------------------------------------*
PERFORM prepare_fieldcat_03 CHANGING g_t_fieldcat_03.
Show ALV-------------------------------------------------------------*
CALL METHOD gr_alv_grid_03->set_table_for_first_display
EXPORTING
is_layout = g_s_layout_03
i_buffer_active = space
i_bypassing_buffer = 'X'
i_save = 'A'
CHANGING
it_fieldcatalog = g_t_fieldcat_03
it_outtab = <select_queue_table>.
Regards,
Chaithanya.
Hi all,
I have a program where i need to display split screen ALV.
One ALV table on the left and one the right.
In the left ALV i display 10 table names..
If i click on the table name then the table should be displayed in the right side ALV.
This i can successfully doit but if i click on the another table after displaying the one table the new table will not be displayed where as still the first displayed tabled is shown..
Below is my coding please have a look and let me know the error..
TO DISPLAY THE LEFT SIDE ALV..
IF gr_custom_container_02 IS INITIAL.
CREATE OBJECT gr_custom_container_02
EXPORTING
container_name = 'CUSTOM'.
Split the Container---------------------------------------------------*
CREATE OBJECT splitter
EXPORTING
parent = gr_custom_container_02
rows = 1
columns = 2.
CALL METHOD splitter->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = container_1.
create the ALV Table-------------------------------------------------*
CREATE OBJECT gr_alv_grid_02
EXPORTING
i_parent = container_1.
create Fieldcatalog--------------------------------------------------*
PERFORM prepare_fieldcat_02 CHANGING g_t_fieldcat_02.
To Customize the layout
PERFORM prepare_layout_02 CHANGING g_s_layout_02.
Show ALV-------------------------------------------------------------*
CALL METHOD gr_alv_grid_02->set_table_for_first_display
EXPORTING
is_layout = g_s_layout_02
CHANGING
it_fieldcatalog = g_t_fieldcat_02
it_outtab = g_t_queuename.
SET HANDLER event_receiver->handle_hotspot_click FOR gr_alv_grid_02.
ELSE.
To refresh the table for displaying.
CALL METHOD cl_gui_cfw=>flush.
CALL METHOD gr_alv_grid_02->refresh_table_display
EXCEPTIONS
finished = 1
OTHERS = 2.
ENDIF.
TO DISPLAY THE RIGHT HAND ALV:
CALL METHOD splitter->get_container
EXPORTING
row = 1
column = 2
RECEIVING
container = container_2.
create the ALV Table-------------------------------------------------*
CREATE OBJECT gr_alv_grid_03
EXPORTING
i_parent = container_2.
create Fieldcatalog--------------------------------------------------*
PERFORM prepare_fieldcat_03 CHANGING g_t_fieldcat_03.
Show ALV-------------------------------------------------------------*
CALL METHOD gr_alv_grid_03->set_table_for_first_display
EXPORTING
is_layout = g_s_layout_03
i_buffer_active = space
i_bypassing_buffer = 'X'
i_save = 'A'
CHANGING
it_fieldcatalog = g_t_fieldcat_03
it_outtab = <select_queue_table>.
Regards,
Chaithanya.
2009 Sep 02 10:20 AM
Hi,
You should develop an event handler method where you will catch the click on the left container. There you should evaluate the the data and you should free the ALV grid from the right container and then you should call the method set_table_for_first_display with the data that you want. At the end you should call the static method CL_GUI_CFW=>FLUSH to synchronize the ALV framework.
With Regards
George
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |