Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to remove standard buttons from alv tree?

hi friends,

I am working on an ALV tree object. I am supposed to remove the standard buttons that are just on top of the alv tree. The buttons are - Expand Subtree , Collapse subtree,Find,Recalcuate colums,Print view and select layout.

I was able to remove the find button by passing the attribute cl_gui_alv_grid=>MC_FC_FIND to IT_TOOLBAR_EXCLUDING to the method set_table_for_first_display. But i am unable to remove the other buttons. Can someone help me on this?



Former Member
Former Member replied

Hi Venkat,

U can remove the standard toolbar of ALV tree by checking the no toolbar field while creating object of alv tree.

U can do like this:

CREATE OBJECT g_alv_tree
        parent                       = g_custom_container
        node_selection_mode = cl_gui_column_tree=>
        item_selection            = 'X'
        no_html_header          = 'X'
        no_toolbar                  = ' X'
        cntl_error                         = 1
        cntl_system_error            = 2
        create_error                     = 3
        lifetime_error                    = 4
        illegal_node_selection_mode  = 5
        failed                                 = 6
        illegal_column_name          = 7.

g_alv_tree is object of class cl_gui_alv_tree

Hope this will solve your problem.



1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question