Skip to Content
author's profile photo Former Member
Former Member

CL_SALV_TREE: how to avoid the toolbar

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?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Sep 22, 2009 at 02:07 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 22, 2009 at 12:08 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.