Skip to Content
-2

select values from 2 different nodes at same level CL_GUI_SIMPLE_TREE

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • May 03 at 12:38 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • May 03 at 01:12 PM

    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

    Add comment
    10|10000 characters needed 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 ?