Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

CL_SALV_TREE: how to avoid the toolbar

103343
Active Participant
0 Kudos

I use CL_SALV_TREE to show a popup-window that has only one container for the tree. The user may choose an item from the tree by doubleclicking it.

I do not need any toolbar for this functionality, so I do not set any function. But above the tree there is a line of free space left in the container, where the toolbar normally would be shown. Is it possible to switch the toolbar off, so that the tree will use the complete container without leaving empty space for a toolbar?

1 ACCEPTED SOLUTION

karsten_korte
Participant
0 Kudos

CL_SALV_TREE uses CL_SALV_CONTROLLER_TREE and this uses an adapter.

CL_SALV_TREE within a container creates an adapter of type CL_SALV_TREE_ADAPTER and this creates a CL_SALV_GUI_TREE with the parameter no_toolbar = abap_false, so you always get a toolbar - with icons or not depends on your choice of functions, without icons you'll get empty space.

CL_SALV_TREE without a container (fullscreen) creates an adapter of type CL_SALV_FULLSCREEN_TREE_ADAPTE and this creates a CL_SALV_GUI_TREE with the parameter no_toolbar = abap_true, so you never get a toolbar, no icons and no empty space.

Have a look at SALV_DEMO_TREE_SIMPLE. You can choose between fullscreen and tree in dynpro (container). Fullscreen-mode is without toolbar (but with icons from gui-status SALV_STANDARD). Container-mode is with toolbar (or empty space when you delete the functions).

So, I suppose there is no easy way to get rid of the empty space - unless you take CL_SALV_GUI_TREE directly

regards, Karsten

Edited by: Karsten Korte on Sep 22, 2009 4:19 PM

4 REPLIES 4

Former Member
0 Kudos

Try using the method SET_ALL to deactivate all the functions. Get the instance of the functions by using the mthod get_functions of class cl_salv_tree and use the SET_ALL method.

Regards,

kiran Bobbala

karsten_korte
Participant
0 Kudos

CL_SALV_TREE uses CL_SALV_CONTROLLER_TREE and this uses an adapter.

CL_SALV_TREE within a container creates an adapter of type CL_SALV_TREE_ADAPTER and this creates a CL_SALV_GUI_TREE with the parameter no_toolbar = abap_false, so you always get a toolbar - with icons or not depends on your choice of functions, without icons you'll get empty space.

CL_SALV_TREE without a container (fullscreen) creates an adapter of type CL_SALV_FULLSCREEN_TREE_ADAPTE and this creates a CL_SALV_GUI_TREE with the parameter no_toolbar = abap_true, so you never get a toolbar, no icons and no empty space.

Have a look at SALV_DEMO_TREE_SIMPLE. You can choose between fullscreen and tree in dynpro (container). Fullscreen-mode is without toolbar (but with icons from gui-status SALV_STANDARD). Container-mode is with toolbar (or empty space when you delete the functions).

So, I suppose there is no easy way to get rid of the empty space - unless you take CL_SALV_GUI_TREE directly

regards, Karsten

Edited by: Karsten Korte on Sep 22, 2009 4:19 PM

0 Kudos

Hi Karsten,

in debugger I could verify what you said: "no_toolbar = abap_false" when tree is in a container

For the moment I will have to live with that free space. If I find some time in the near future I will have a look at the other tree-classes. I thought of trying CL_GUI_ALV_TREE for which I found the example report BCALV_TEST_SIMPLE_TREE. There is the option to create a toolbar or not!

Thank you

Herbert

0 Kudos

Finally I decided to show at least a print-button in the toolbar. So the empty space does not annoy any longer

Thanks for the help

Herbert