About hiding container in oops abap
I have created two continer on same screen one below the other.
When user double click on any line of first second container get displayed containing more information.
I have created hide button in toolbar of first container, when user click this button second container should be hide.
How can I hide entier container on screen.
I tired following but it is not working.
LOOP AT SCREEN .
IF SCREEN-NAME = 'MY_CONTAINER2'.
SCREEN-INVISIBLE = 1.
'MY_CONTAINER2' is the name of second container.
If anyone know how o solve this please let me know.
Varun Verma replied
I personally don't like the idea of 'Freeing' the object !
If you set the object free, then you have potential source of bug in you code... What if there is some subroutine or method that still refers to this container?? If the control reaches that part then you will have a short dump !
Also, what if you want that container again ? You will create a new object ?? Not a good Idea...
The trick should be to minimize the container.... If you are using a splitter container control then you could set the height and width of the container to 0 - so that the container is no more visible !!
You can refer this article on Splitter controls here : [Link|http://www.abaplearning.com/abap-tutorials/12-cfw/39-abap-cfw-splitter-container]