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

folder symbol when handling node_double_click


I am using the class cl_gui_alv_tree to display tree structure.

I am getting folder symbols in the tree structure ,I have to remove these.

how to do???.

Another thing is I have to handle the event node_double_click.

it is triggered if I double click on folder symbol only.

if I remove the folder symbol how to handle this...

please very very very urjent


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jan 06, 2008 at 09:08 AM


    I doubt that you can leave out the node icons. Check the ADD_NODE(S) method or the structure for defining the node layout for fields NODE_IMAGE and NODE_EXPANDED_IMAGE.

    If you want to react on double-clicking on items register event ITEM_DOUBLE_CLICK.



    Add a comment
    10|10000 characters needed characters exceeded

    • Hello Srilakshmi

      When you double-click in an ALV tree you always get the node key as input for the event handler methods. Therefore, I use a simple trick to retrieve the entire row from the node key:

      " Assumption: ALV tree is used to display customers stored in table KNB1.
      " Note: define additional fields to your outtab itab for the node key (and parent node key)
      TYPES: BEGIN OF ty_s_outtab.
      INCLUDE TYPE knb1   AS customer.
      TYPES: node_key       TYPE tm_nodekey.  " not sure if this is the correct type -> replace if necessary
      TYPES: parent_key     TYPE tm_nodekey.
      TYPES: END OF ty_s_outtab.
      TYPES: ty_t_outtab   TYPE STANDARD TABLE OF ty_s_outtab 
                                       WITH DEFAULT KEY.
        gt_outtab    TYPE ty_t_outtab.   " itab for ALV tree data
      " Fill the ALV tree
        ld_node_Key TYPE tm_nodekey,
        ld_parent_key TYPE tm_Nodekey,
        lt_knb1      TYPE STANDARD TABLE OF knb1,
        ls_knb1     TYPE knb1,
        ls_outtab   TYPE ty_s_outtab.
        LOOP AT lt_knb1 INTO ls_knb1.
          CLEAR: ls_outtab.
          ls_outtab-customer = ls_knb1.
          CALL METHOD go_tree->add_node
              relatkey = ld_parent_key
              node_key = ld_node_key.
          ls_outtab-node_key = ld_node_key.  " returned from ADD_NODE method
          ls_outtab-parent_key = ld_parent_key.
          MODIFY gt_outtab FROM ls_outtab
            TRANSPORTING node_key   parent_key
          WHERE ( bukrs = ls_knb1-bukrs  
          AND         kunnr = ls_Knb1-kunnr ).
      " Retrieve entire row in event handler method by node key
        METHOD handle_node_double_click.
        " define local data
            ls_knb1     TYPE knb1,
            ls_outtab   TYPE ty_s_outtab.
            READ TABLE gt_outtab INTO ls_outtab
                      WITH KEY node_key = node_key.
            IF ( syst-subrc = 0 ).
              ls_Knb1 = ls_outtab-customer.



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.