‎2013 Oct 18 12:33 PM
Hi All,
I am facing issues while expanding the node of the tree before this code am collapsing the tree but while expanding it shows run time error
i.e 'MESSAGE TYPE X' please let me know how to pass the correct node and my requirement is to expand only the top most node .
CALL METHOD gl_tree->expand_node
EXPORTING
node_key = node_key
level_count = 0
expand_subtree = ' '
* EXCEPTIONS
* failed = 1
* illegal_level_count = 2
* cntl_system_error = 3
* node_not_found = 4
* cannot_expand_leaf = 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.
‎2013 Oct 23 11:44 AM
Problem resolved I've added the below piece of code
data:node_key_table type treev_nks.
node_key_table = node_table.
delete node_key_table index 1.
call method gl_tree->collapse_nodes
exporting
node_key_table = node_key_table
* EXCEPTIONS
* failed = 1
* cntl_system_error = 2
* error_in_node_key_table = 3
* dp_error = 4
* others = 5
.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
‎2013 Oct 23 11:44 AM
Problem resolved I've added the below piece of code
data:node_key_table type treev_nks.
node_key_table = node_table.
delete node_key_table index 1.
call method gl_tree->collapse_nodes
exporting
node_key_table = node_key_table
* EXCEPTIONS
* failed = 1
* cntl_system_error = 2
* error_in_node_key_table = 3
* dp_error = 4
* others = 5
.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.