‎2010 Apr 16 5:39 PM
hi, i urgently need to do this.
i have three internal tables that may or may not get populated.
i have to display these tables in ooalv depending on whether
these tables have data or not.
as in if only one table has data and remaining two dont, then i display
only one alv. if two tables have data, then two.
the problem i am facing is that if i use three containers and display grids
on them separately, these containers have fixed places on screen, so that part
of the screen gets fixed and cannot be used if in case the alv in that
container need not be displayed as there in no data in the table that needs
to be displayed in the alv in that container.
i tried using a single container and using splitter, but the problem with splitter
is that it only divides the container in to halves. so when i call splitter function once, it
divides the containers into half, and if i call it again it divides either of the earlier
two halves into half again. so the container get divided into 50 25 25 ratio.
i just want to know if there is anway if at runtime i can dynamically create alvs
depending on if the table that needs to be displayed in the alv has data or not.
i guess using three containers doesnt seem right....
Edited by: rohan_naidu on Apr 16, 2010 6:40 PM
‎2010 Apr 16 7:18 PM
You need to use the Splitter Container. You can create 2 or 3 Children of the Splitter Container as needed.
CREATE OBJECT o_split
EXPORTING
parent = o_cc_main
rows = 3 " <<
columns = 1.
lo_3rd_cc = me->o_split->get_container(
row = 3
column = 1 ).
You can also set the height of the row of the Splitter by calling this method:
o_split->set_row_height( id = 3 height = 33 ). " 0 - to hide it
Regards,
Naimesh Patel
‎2010 Apr 16 7:18 PM
You need to use the Splitter Container. You can create 2 or 3 Children of the Splitter Container as needed.
CREATE OBJECT o_split
EXPORTING
parent = o_cc_main
rows = 3 " <<
columns = 1.
lo_3rd_cc = me->o_split->get_container(
row = 3
column = 1 ).
You can also set the height of the row of the Splitter by calling this method:
o_split->set_row_height( id = 3 height = 33 ). " 0 - to hide it
Regards,
Naimesh Patel