How to remove standard buttons from alv tree?
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?
Brajvir Singh replied
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 EXPORTING parent = g_custom_container node_selection_mode = cl_gui_column_tree=> node_sel_mode_single item_selection = 'X' no_html_header = 'X' no_toolbar = ' X' EXCEPTIONS 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.