‎2010 Jul 31 8:42 AM
Hi experts,
I want to split the container in Two row and First Row with single column and second row with four column.
anyone help me??? i use code as below.
DATA :custom_container TYPE REF TO cl_gui_custom_container,
splitter TYPE REF TO cl_gui_splitter_container,
contt TYPE REF TO cl_gui_container,
contb TYPE REF TO cl_gui_container,
cont1 TYPE REF TO cl_gui_container,
cont2 TYPE REF TO cl_gui_container,
cont3 TYPE REF TO cl_gui_container,
cont4 TYPE REF TO cl_gui_container.
CREATE OBJECT custom_container
EXPORTING
container_name = 'CONTAINER'.
*creating the splitter control
CREATE OBJECT splitter
EXPORTING
parent = custom_container
rows = 2
columns = 1
align = 15.
*calling the container method of the splitter class
*for the first graphic
CALL METHOD splitter->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = contt.
*calling the container method of the splitter class
*for the second graphic
CALL METHOD splitter->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = contb.
CREATE OBJECT splitter
EXPORTING
parent = contb
rows = 1
columns = 4.
align = 15.
CALL METHOD splitter->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = cont1.
CALL METHOD splitter->get_container
EXPORTING
row = 2
column = 2
RECEIVING
container = cont2.
CALL METHOD splitter->get_container
EXPORTING
row = 2
column = 3
RECEIVING
container = cont3.
CALL METHOD splitter->get_container
EXPORTING
row = 2
column = 3
RECEIVING
container = cont4.
‎2010 Aug 03 8:34 AM
‎2010 Jul 31 10:02 AM
by using "splitter" variable in 2 CREATE OBJECT, you destroyed the first instance, it's why there is an issue.
Just define and use a "splitter2" variable...
‎2010 Jul 31 10:55 AM
Thanks for reply Sandra Rossi,
I have create first row with 1 column and 2nd row with 4 column. but when i put the graph in 2nd row 1st and 2nd column it work fine but when i put the graph in 3rd column, 1st and 2nd column hide the graph.
any problem in code????.
DATA :custom_container TYPE REF TO cl_gui_custom_container,
custom_cont_alv TYPE REF TO cl_gui_custom_container,
splitter TYPE REF TO cl_gui_splitter_container,
splitterb TYPE REF TO cl_gui_splitter_container,
contt TYPE REF TO cl_gui_container,
contb TYPE REF TO cl_gui_container,
cont1 TYPE REF TO cl_gui_container,
cont2 TYPE REF TO cl_gui_container,
cont3 TYPE REF TO cl_gui_container,
cont4 TYPE REF TO cl_gui_container.
CREATE OBJECT custom_container
EXPORTING
container_name = 'CONTAINER'.
*creating the splitter control
CREATE OBJECT splitter
EXPORTING
parent = custom_container
rows = 2
columns = 1
align = 15.
*calling the container method of the splitter class
*for the first graphic
CALL METHOD splitter->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = contt.
*calling the container method of the splitter class
*for the second graphic
CALL METHOD splitter->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = contb.
CREATE OBJECT splitterb
EXPORTING
parent = contb
rows = 1
columns = 4
align = 15.
CALL METHOD splitterb->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = cont1.
CALL METHOD splitterb->get_container
EXPORTING
row = 1
column = 2
RECEIVING
container = cont2.
CALL METHOD splitterb->get_container
EXPORTING
row = 1
column = 3
RECEIVING
container = cont3.
CALL METHOD splitterb->get_container
EXPORTING
row = 1
column = 4
RECEIVING
container = cont4.
*Function module to display graph (Graphs)
CALL FUNCTION 'GFW_PRES_SHOW_MULT'
EXPORTING
parent = cont1 "cont2 "cont3 "cont4
presentation_type = gfw_prestype_lines
show = gfw_false
TABLES
values = grval1
column_texts = col1_texts
EXCEPTIONS
error_occurred = 1.
‎2010 Jul 31 4:08 PM
1) Do you mean cont1 and cont2 occupy each 50% of screen width, and both cont3 and cont4 are not displayed at all?
2) Does it happen when you start the program the first time, or only after you do interactions? (I mean, did you think to free the controls in case you are re-displaying controls differently)
3) Why do you use ALIGN=15? (which means ALIGN = ALIGN_AT_BOTTOM + ALIGN_AT_LEFT + ALIGN_AT_RIGHT + ALIGN_AT_TOP)
‎2010 Aug 03 6:53 AM
Thanks for reply Sandra Rossi,
In the 100% screen, first(top) container have 50% of screen and the bottom 50% screen have 4 part.
I want to display ALV in top Container and want to display 4 graph in botton 50% screen.
The bottom 50% screen display 4 (A,B,C,D) Container equally 25% in bottom 50% screen.
I display the graph in A and B Container, it work well and means A and B Container with Graph and C and D Container is empty.
but i display a graph in C container the A and B Containers hide the Graph(A and B Containers display but empty) and C container display its single graph.
‎2010 Aug 03 8:34 AM
‎2010 Aug 03 8:50 AM
I still don't understand what you ask: you say that when you fill container 3, containers 1 and 2 hide graph in container 3, but every container occupies correctly 25% of the bottom row. There's something incoherent in your description. It's maybe why nobody answers. Show a screen capture, that will be easier to understand.
‎2010 Aug 03 10:07 AM
first which is work.
http://www.4shared.com/photo/nfT58b-z/work.html
and after adding the third graph.
‎2010 Aug 03 11:16 AM
‎2010 Aug 03 12:26 PM
‎2010 Aug 03 12:57 PM
Okay, so first 2 containers DON'T hide container 3, it's why we couldn't understand!
Issue description should be: when your program displays 3 graph controls in 3 containers, only third is displayed (the 2 first containers have empty content). What is surprising is that when you remove the code for the 3rd container, the two first graph controls then appear.
It happens typically when the variables of the control instances are cleared. It has nothing to do with the way you create the container controls, so please share your code about the graph controls, and how to reproduce if operations need user interactions.
‎2010 Aug 03 1:15 PM
‎2010 Aug 03 1:51 PM
Thanks. Okay I see. The issue is about the SHOW parameter of GFW_PRES_SHOW_MULT:
> SHOW parameter documentation:
> Display all (previously buffered) graphics.
> If you want to display multiple graphics, you must call the function module for each graphic. The parameter must only be set for the last graphic to be created.
> Can be gfw_true ('X') or gfw_false (space)
GFW_PRES_SHOW_MULT does that:
1) if GRAPHICS_SHOWN = 'X', destroy and unregister all registered graphes
2) register graph
3) if SHOW = gfw_true, send all registered graphes to frontend, and set GRAPHICS_SHOWN = 'X'
What happens is that you call GFW_PRES_SHOW_MULT three times with one wrong SHOW value:
- Graph 2 with False --> register it
- Graph 1 with True --> register it, send registered graphes to the frontend, at next call graphes should be destroyed and unregistered
- Graph 3 with True --> destroy and unregister graphes 2 and 1, register graph 3, send graph 3 to the frontend
‎2010 Aug 05 12:35 PM
Thanks,
problem solved.
for four graphs,
in the FM GFW_PRES_SHOW_MULT for 1st, 2nd and 3rd time SHOW = gfw_false
and for the last (4th) call SHOW = gfw_true