collapse_all_nodes
This method allows you to collapse the tree from within your program. The result is that only the root nodes are displayed.
CALL METHOD tree->collapse_all_nodes EXCEPTIONS failed = 1 cntl_system_error = 2.