Skip to Content
-2

select values from 2 different nodes at same level CL_GUI_SIMPLE_TREE

May 03 at 12:07 PM

48

avatar image

Hello Team,

I want to select the 2 values from 2 different nodes at a time. I know how to select single value of node using using the class CL_GUI_SIMPLE_TREE

NODE_SELECTION_MODE = NODE_SEL_MODE_SINGLE and EVENT-EVENTID = CL_GUI_SIMPLE_TREE=>EVENTID_NODE_DOUBLE_CLICK.


But How do i select 2 diffrent values of 2 different nodes at same level. and store vales in variable.

Image attached

img.jpg (22.3 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Raymond Giuseppi May 03 at 12:38 PM
0

Did you try to use: node_selection_mode = node_sel_mode_multiple and events such as selection_changed followed by call of method get_selected_nodes.

Show 6 Share
10 |10000 characters needed characters left characters exceeded

tried but was unsuccessful selecting multiple nodes as shown in question screen shot.

could you please give sample code ?

0

Perform a where used on the class to find sample demo repoort or on the suggested methd to find reports such as RDSVAS_TRANSPORT_ORGANIZER_C01 which allow multiple selection.

0
Raymond Giuseppi

RDSVAS_TRANSPORT_ORGANIZER_C01 is it report ? seems to be doesnt exists.

0

(Fond on one of my systems) In this report, some data is displayed in a tree on left panel, and on a ok_code f the dynpro menu its call the method get_selected_nodes and copy the selected nodes to an alv grid on right panel.

List of reports/class depends on your version and of the solutions activated on your system(s) so you should perform the where used on such methods of the single tree class on your system to find some samples.

0
Raymond Giuseppi

I not sure

I am getting below message in SE38

Program RDSVAS_TRANSPORT_ORGANIZER_C01 does not exist

Message no. DS017

0

So not available in tour version, to reiterate, perform a where-used search on your system first.

0
Amy King May 03 at 01:12 PM
0

Set the selection mode to multiple upon instantiation of the tree object.

CREATE OBJECT g_tree
    EXPORTING
      node_selection_mode = cl_simple_tree_model=>node_sel_mode_multiple
    ...

If you run demo program SAPSIMPLE_TREE_MODEL_DEMO and change the node selection mode to multiple in debug, you'll see multiple child nodes may be selected.

Cheers,
Amy

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Yes node_selection_mode = cl_simple_tree_model=>node_sel_mode_multiple by this we can select multiple nodes but how we get values of node keys ?


where as in node_sel_mode_single in the event NODE_DOUBLE_CLICK click used to get the node key but in node_sel_mode_multiple which event triggers and how to get both nodes node key ?

0