Skip to Content
0
Jul 02, 2009 at 07:58 AM

ALV Tree

26 Views

Hi Experts,

I have a screen divided into two parts and in each part i have two tree structures(Source and Target, say gcl_tree_source and gcl_tree_target).

I can drag and drop a node from the source to the target or i can place the node on the target by selecting from the source to the target by using an add button on the screen.

And in the add( ) method i am getting the selected node details from the tree using the statement :

lcl_node ?= gcl_tree_source->get_node_object( ).

While placing the node from the source to the target i need to populate the node in an internal table and this logic is in the add( ) method, and i could able to do this while drag and drop by forcefully calling the add( ) method in PAI of the screen.

Every thing working fine but the problem here is when using drag and drop the node is getting moved to the target and any how the internal table is getting populated with the node details.and now if i use the add button for the next node to place in the target

instead of drag and drop, the add( ) method in the PAI of the screen is getting called but i am having the previous node object details (in lcl_node )even for the new node selected.

How to over come this problem..

Thanks in advance,

Kumar