08-06-2020 12:45 PM
Hello All,
I have created a tree structure similar to SPRO Tcode. I want to add Execute Icon as a button to navigate to a different screen on click. Can anybody suggest how to achieve this?
Thanks,
Mrunali Shimpi
08-06-2020 12:56 PM
You will need to provide little bit more information. How did you create this tree ? using witch class ?
08-06-2020 2:19 PM
I have created the tree using cl_simple_tree_model class. I have also used the method add_nodes to add child nodes, which is where the execute button button is to be added.
08-06-2020 3:39 PM
The "simple" tree doesn't provide buttons at node level (just the possibility to change the node/leaf icon and eventually you may handle the double click). You have to use an "item" tree like either the "list" tree (CL_LIST_TREE_MODEL) or the "column" tree (CL_COLUMN_TREE_MODEL).
But you will have to restart the coding from scratch, there are several important differences.
For each tree node (line), you will have to define an item of class ITEM_CLASS_BUTTON (constant defined in CL_ITEM_TREE_MODEL).
It's a little bit complex to explain you everything, but you may find examples in demo program SAPTLIST_TREE_MODEL_DEMO and in the Web.