Application Development and Automation 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: 
Read only

CL_GUI_ALV_TREE DELETE_SUBTREE

Former Member
0 Likes
892

I have a program that uses ALV tree.

Part of the funcionality I have implemented is to Refresh the data.

As a result of the refresh I delete/rebuild the tree using DELETE_SUBTREE and a call to FRONTEND_UPDATE is also perfromed.

A further function implemented is event ITEM_DOUBLE_CLICK which returns the NODE_KEY of the item selected.

However after the Refresh and therefore the DELETE_SUBTREE, the NODE_KEY is not being refreshed and is returning a NODE_KEY result that is the record selected PLUS the total number of nodes prior to the refresh. Therefore the subsequent data reads being perfromed with NODE_KEY reference data that is beyond the index of the data I actually have.

The program has been based around the following example;

http://wiki.sdn.sap.com/wiki/display/Snippets/Refresh+ALVtree

Has there been anything missed/overlooked?

Thanks

Justin

I have a program that uses ALV tree.

Part of the funcionality I have implemented is to Refresh the data.

As a result of the refresh I delete/rebuild the tree using DELETE_SUBTREE and a call to FRONTEND_UPDATE is also perfromed.

A further function implemented is event ITEM_DOUBLE_CLICK which returns the NODE_KEY of the item selected.

However after the Refresh and therefore the DELETE_SUBTREE, the NODE_KEY is not being refreshed and is returning a NODE_KEY result that is the record selected PLUS the total number of nodes prior to the refresh. Therefore the subsequent data reads being perfromed with NODE_KEY reference data that is beyond the index of the data I actually have.

The program has been based around the following example;

http://wiki.sdn.sap.com/wiki/display/Snippets/Refresh+ALVtree

Has there been anything missed/overlooked?

Thanks

Justin

2 REPLIES 2
Read only

Former Member
0 Likes
669

I have found the answer.

Calling method GET_OUTTAB_LINE to return the data by the NODE_KEY as returned from the event.

Read only

Former Member
0 Likes
669

I have found the answer.

Calling method GET_OUTTAB_LINE to return the data by the NODE_KEY as returned from the event.