cancel
Showing results for 
Search instead for 
Did you mean: 

How to get a treenode's parentnode

former_member192022
Participant
0 Kudos

when click a tree's node,how to get the parent node of current node.

please give me a demo.

Accepted Solutions (1)

Accepted Solutions (1)

athavanraja
Active Contributor
0 Kudos

you just need to get the node clicked using your code. once you have the node clicked you can then read it from the itab passed to treeview.

the table which is passed to htmlb:treeView will have the parent id of the current node.

to get the node clikced you can use the following code

data: tree_event type ref to cl_htmlb_event_tree.

tree_event ?= event.

clear: nodeclicked , node_status .

move: tree_event->node to nodeclicked ,

Regards

Raja

Message was edited by: Durairaj Athavan Raja

former_member192022
Participant
0 Kudos

Thank you.

In other developent tools ,like Delphi or .net developent studio.

I can get a treenode's parent node use code like this:

<b>tree1.currentnode.parentnode.text </b>

to get the parentnode's text

or

<b>tree1.currentnode.parentnode.id </b>

to get the parentnode's id

ah!!!!!! developing use ABAP or BSP is so pain!

Answers (0)