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_SALV_TREE

Former Member
0 Likes
1,098

hi folks,

i'm using this class to build an alv tree, besides i have functions (in a toolbar) to interact with the tree.

now i found out that get_selected_nodes etc. does not work with this kind of tree, with cl_gui_column_tree this worked?

can this be achieved to work?

regards oliver

hi folks,

i'm using this class to build an alv tree, besides i have functions (in a toolbar) to interact with the tree.

now i found out that get_selected_nodes etc. does not work with this kind of tree, with cl_gui_column_tree this worked?

can this be achieved to work?

regards oliver

4 REPLIES 4
Read only

uwe_schieferstein
Active Contributor
0 Likes
966

Hello Oliver

Using the CL_SALV_... classes you have to think even more in an OO-based manner. Class CL_SALV_TREE does not have a method GET_SELECTED_NODES but a method <b>GET_SELECTIONS</b> which, no surprise, returns a <i>selection instance</i> (CL_SALV_SELECTIONS_TREE). This class now has the required methods (e.g. GET_SELECTED_NODES, SET_SELECTED_ITEM, GET_SELECTED_COLUMNS).

Method GET_SELECTED_NODES return a table with the selected nodes which, no surprise, are returned as <i>node instances</i>.

Regards

Uwe

Read only

Former Member
0 Likes
966

hi

good

go through this link,hope help you to solve your problem

http://www.sap-press.de/download/dateien/1227/sappress_abap_objects.pdf

thanks

mrutyun^

Read only

0 Likes
966

hi,

yeah i know i get an instance to the selections, but my problem is that the alv tree makes no walk thru pai so whatever i select i get always the first selection i made.

after i force the system to do one pai i get the new selection.

it seeams that cl_salv_tree works differnt to cl_gui_column_tree

As i don't want to integrate my functions in the toolbar of the tree, i integrated this functionality in a seperate toolbar where i want to get th selected nodes....

kind regards oliver

Read only

0 Likes
966

solved my own:

you have to call get_metadata to get data back from frontend