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

cl_gui_alv_tree - Auto expand Node

Hi,

Is it possible to auto expand all/some nodes in the ALV Tree(Uisng cl_gui_alv_tree Class) in the initial display?

Thanks,

Murali

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2006 at 09:06 AM

    Methods: EXPAND_NODE - Expands one Node

    EXPAND_NODES - Expands Several Nodes

    Regards,

    Sreejesh P.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2006 at 08:16 AM

    Hi

    Try the below way to expand all nodes.

       CALL METHOD TREE1->EXPAND_NODES
         EXPORTING
           IT_NODE_KEY             = GT_NODE_KEY
         EXCEPTIONS
           FAILED                  = 1
           CNTL_SYSTEM_ERROR       = 2
           ERROR_IN_NODE_KEY_TABLE = 3
           DP_ERROR                = 4
           NODE_NOT_FOUND          = 5
           others                  = 6.
       IF SY-SUBRC <> 0.
    *    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.

    Note GT_NODE_KEY will be having the values of nodes that we wish to expand. Basing on the conditions and the nodes to expand, populate the node keys and call the method to expand the respective nodes.

    Hope this helps you.

    Kind Regards

    Eswar

    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.