‎2011 Mar 23 5:50 PM
Hi SapGears!
I'm facing a problem about creating an object using a splited container.
I split the container A in containers A1 and A2 and create alv in A1 and html in A1.
After that, i need to create a toolbar buttons using the class cl_gui_toolbar in A2 without need to recreate all again.
I Try to call method free( ) and recreate the object, but the container A2 appears in blank.
any help will be very nice!!!
‎2011 Apr 06 12:40 PM
Nice man!! you are using easy_splitter or cl_gui_splitter?
I'm using cl_gui_splitter and i cant do that just by calling the free method of the object
maybe the splitter way can be the problem
what splitter class u are using?
Tanks!!!
‎2011 Mar 23 10:03 PM
Hi,
I've checked it and it looks really strange. I'm not able to think any explanation, so this solution is rather walkaround. In my case it worked when I've created additional splitt container. So I've main split container A which had 2 panes A1 and A2. In A1 goes ALV and in A2 goes new split container that have only one container (row = 1 column = 1) B1. At beginning B1 has html and later toolbar.
when time to change from html to toolbar comes:
go_html->free( ).
B1->free( ).
CLEAR: go_html, B1.
CREATE B1
parent = A2.
CREATE go_toolbar
parent = B1
BR
Marcin Cholewczuk
‎2011 Mar 24 8:47 AM
I would try different solution. Split A2 into two new rows B1 and B2. In B1 set your toolbar, in B2 your alv. By default set B1 cell hidden
"suppress splitter bar
CALL METHOD gr_splitter_cont->set_row_sash
EXPORTING
id = 1
type = gr_splitter_cont->type_movable
value = gr_splitter_cont->false.
"show only alv in entire cell
CALL METHOD gr_splitter_cont->set_row_height( id = 1 height = 1000 ).
Now when you request for toolbar display only that cell
CALL METHOD gr_splitter_cont->set_row_height( id = 1 height = 0 ).
A kind of workaround but you will avoid much troubles.
Regards
Marcin
‎2011 Mar 24 4:29 PM
Yes, my solution was to recreate the entire object again with what i want to be in the containers, but this is stupid! i can't belive that abap cannot handle this.... there must be a way of doing that...But tanks for the ideas below!!!
Maybe someone has an way to solve that problem directly
Tanks!!!
‎2011 Apr 05 2:21 PM
Hi Raphael,
I tried the scenario you have mentioned. Please correct me if I have done anything wrong.
In the PBO of the screen, I created a splitter container and placed an ALV grid in the first half and HTML viewer in the Second half. After that I am displaying it. I have placed a push button in the Application Toolbar and when I click on that, in the PAI, I am using the method Free of HTMl Viewer and then I created an object of CL_GUI_TOOLBAR with parent as the bottom container. I added a button to the toolbar and it was displayed in the screen.
Thanks
Rathish
‎2011 Apr 05 3:21 PM
Hi Rathish R Nair, i apreciate your help
try do that in a docking container, that is my case
i never tryied it in a custom container like u did
Tanks a lot!!
‎2011 Apr 06 12:16 PM
Hi Raphael,
I tried it with Docking Container and it is working as well. After creating a Docking Container, I created a Splitter Container object using the Docking Container as the Parent.
Also I tried by creating two docking containers and placing grid in one and HTML viewer in one. In this case also the toolbar was appearing when I press the button on the output screen. Can you please tell me the exact way you did this?
Thanks
Rathish
‎2011 Apr 06 12:40 PM
Nice man!! you are using easy_splitter or cl_gui_splitter?
I'm using cl_gui_splitter and i cant do that just by calling the free method of the object
maybe the splitter way can be the problem
what splitter class u are using?
Tanks!!!
‎2011 Apr 07 4:37 AM
‎2011 Apr 07 1:36 PM
First, i apreciate a lot your help! Tanks!
Hum... so its possible to the error is associated with the PAI call?
If you use an event, like changing the container from html to toolbar not using the sy-ucomm and the screen control, but an event
im my case i use an event. Its strange because evebory say that have the same behave than me
i just use a docking container splitted and i dont have the PAI call to change that, maybe that is the problem, or i belive that when using a custom container the problem dont appears
can you try use docking container and some event to change the subcontainer?
Tanks again!