12-28-2006 8:31 AM
Hi all,
I am aware that there are many posts on multiple ALV grid, but I can't find any that fits my requirement.
My requirement is to display multiple ALV grid tables using ABAP OO (not ALV lists). But I do not know the number of ALV grids tables that I have to create before runtime (so I cannot create multiple custom controls before runtime).
Basically, I have a selection screen with a parameter that will determine the number of ALV tables that I have to create. Each table is of a different structure.
I can't use the splitter container either, coz if I have too many tables, then each section is limited to a few lines of screen.
My idea is to have something similar to NEW-PAGE command for reports. So the same custom control will be used for a different table at a NEW-PAGE. But apparently, NEW-PAGE does not work if I were to create a SCREEN for the ALV grid. Any one has any idea?
Thanks in advance 😃
12-28-2006 2:00 PM
Hi
Why cant u try with tree struture.
There will be nodes on left side, if u click on each node new table will be
displayed . The no of nodes equals to number of tables from the selection
screen .
12-28-2006 2:00 PM
Hi
Why cant u try with tree struture.
There will be nodes on left side, if u click on each node new table will be
displayed . The no of nodes equals to number of tables from the selection
screen .
01-08-2007 3:31 AM
Hi,
Thanks for the suggestion. I have decided to reduce the complexity and have 1 ALV table only. Thanks anyway
01-08-2007 4:23 AM
Hi,
There is a concept of Custom Containers in OO ALV's where u can have multiple GRID's, try to learn the concept. I think thats the only way u can have multiple GRIDS's in a single screen.
Regards,
Aravind
01-08-2007 7:16 AM
use cl_gui_splitter_container.
and at runtime you can decide how many rows/columns you are going to have inthe screen and each cell can be used for rendering a ALV grid.
example
create object g_r_container
exporting container_name = 'CUSTOM'.
create object g_r_splitter_1
exporting parent = g_r_container
rows = 3
columns = 1 .
here the rows and columns value can come from your selection screen or thru calcluted value from within your program.
once its split
then get the reference of the container (splitter container cell)
call method g_r_splitter_1->get_container
exporting
row = 1
column = 1
receiving
container = g_r_container_1.
call method g_r_splitter_1->get_container
exporting
row = 2
column = 1
receiving
container = g_r_container_2.
call method g_r_splitter_1->get_container
exporting
row = 3
column = 1
receiving
container = g_r_container_3.
then use them to place alv grid
create object from_grid
exporting i_parent = g_r_container_1
i_appl_events = 'X' .
create object to_grid
exporting i_parent = g_r_container_2
i_appl_events = 'X' .
create object fin_grid
exporting i_parent = g_r_container_3
i_appl_events = 'X' .
Regards
Raja
01-08-2007 7:16 AM
use cl_gui_splitter_container.
and at runtime you can decide how many rows/columns you are going to have inthe screen and each cell can be used for rendering a ALV grid.
example
create object g_r_container
exporting container_name = 'CUSTOM'.
create object g_r_splitter_1
exporting parent = g_r_container
rows = 3
columns = 1 .
here the rows and columns value can come from your selection screen or thru calcluted value from within your program.
once its split
then get the reference of the container (splitter container cell)
call method g_r_splitter_1->get_container
exporting
row = 1
column = 1
receiving
container = g_r_container_1.
call method g_r_splitter_1->get_container
exporting
row = 2
column = 1
receiving
container = g_r_container_2.
call method g_r_splitter_1->get_container
exporting
row = 3
column = 1
receiving
container = g_r_container_3.
then use them to place alv grid
create object from_grid
exporting i_parent = g_r_container_1
i_appl_events = 'X' .
create object to_grid
exporting i_parent = g_r_container_2
i_appl_events = 'X' .
create object fin_grid
exporting i_parent = g_r_container_3
i_appl_events = 'X' .
Regards
Raja