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

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

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 07, 2010 at 01:16 PM

    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!!!!

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 07, 2010 at 01:16 PM

    Solved Myself!

    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.