2008 Jan 17 3:54 PM
Hi,
I've created a tree structure using the class CL_GUI_LIST_TREE but my customer wants all the nodes expanded when they open this screen instead of having to expand them themselves. How can I do this?
Thanks,
Gill
2008 Jan 17 4:16 PM
I think you need to call
CALL METHOD g_alv_tree->expand_nodes
EXPORTING
it_node_key = it_node_key
after the call method set_table_for_first_display
a®
2008 Jan 17 4:16 PM
I think you need to call
CALL METHOD g_alv_tree->expand_nodes
EXPORTING
it_node_key = it_node_key
after the call method set_table_for_first_display
a®
2008 Jan 17 4:19 PM
Do I need to do this for all nodes? Is there a method I can call which expands all nodes?
2008 Jan 17 4:35 PM
Please check program
MSABAPDEMOS_TREEF01 and form create_and_init_tree.
line no 125
a®
2008 Jan 17 4:37 PM
I used the following code:
LOOP AT node_table INTO node_wa.
IF node_wa-node_key(1) NE 'C'.
CALL METHOD g_tree->expand_node
EXPORTING
node_key = node_wa-node_key.
ENDIF.
ENDLOOP.
C marking the node as a child and P for parent so this opens all Parent nodes.