09-28-2006 6:52 AM
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
09-28-2006 10:06 AM
Methods: EXPAND_NODE - Expands one Node
EXPAND_NODES - Expands Several Nodes
Regards,
Sreejesh P.
09-28-2006 9: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
09-28-2006 10:06 AM
Methods: EXPAND_NODE - Expands one Node
EXPAND_NODES - Expands Several Nodes
Regards,
Sreejesh P.