Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ALV tree expand and collapse

0 Kudos

Hi,

I have a scenario where i need to print an alv tree in a sub screen on double clicking the line item. I have 10 line items .Based on the line item data the data in the alv tree should vary. I'm able to achieve this by deleting the previous nodes when ever a new item is double cliked. using the below method.

CALL METHOD g_tree->delete_all_nodes.

But the expand and collapse button of the alv tree do not work .Need your help here.

Regards,

christina.

1 ACCEPTED SOLUTION

franois_henrotte
Active Contributor
0 Kudos

Hi Christina,

I don't understand the link between deleting/refilling the tree and expand/collapse.

Personnally I would FREE the tree object and display a new one for each item change. This is because if you delete nodes and create new ones you will have to increment the node numbers and you don't know how much times...

I you clear the object reference and create a new tree, you will be able to start from scratch with the node numbering.

1 REPLY 1

franois_henrotte
Active Contributor
0 Kudos

Hi Christina,

I don't understand the link between deleting/refilling the tree and expand/collapse.

Personnally I would FREE the tree object and display a new one for each item change. This is because if you delete nodes and create new ones you will have to increment the node numbers and you don't know how much times...

I you clear the object reference and create a new tree, you will be able to start from scratch with the node numbering.