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: 

Pushbuttons in ALV Tree (In List Level/ In rows)

Former Member
0 Kudos

Hi,

I have a requirement to add the push buttons in the list items (In cells/ Rows) of ALV TREE.

I am using the class cl_gui_alv_tree for creating the tree.

It is possible to add a pushbutton in the ALV Grid (cl_gui_alv_grid) using the layout parameter in SET_TABLE_FOR_FIRST_DISPLAY method.

But in the class method cl_gui_alv_tree-SET_TABLE_FOR_FIRST_DISPLAY, we dont have the import parameter LAYOUT for enabling the push button.

Any isseas/ comments are most welcome.

2 REPLIES 2

Former Member

Solved by myself after some research work... Pl find the code snippet below,

DATA: ls_item_layout TYPE lvc_s_layi.

ls_item_layout-style = cl_gui_column_tree=>style_intensified.

ls_item_layout-class = cl_gui_column_tree=>item_class_button.

ls_item_layout-fieldname = tree->c_hierarchy_column_name.

APPEND ls_item_layout TO lt_item_layout.

l_node_text = 'Sample'.

relat = cl_gui_column_tree=>relat_last_child.

CALL METHOD tree->add_node

EXPORTING

i_relat_node_key = key1

i_relationship = relat

i_node_text = l_node_text

is_outtab_line = lw_outtab

is_node_layout = ls_node_layout

it_item_layout = lt_item_layout

IMPORTING

e_new_node_key = p_ab_key.

Simple!!!!

Former Member
0 Kudos

Solved Myself!