Application Development 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: 

How to get a node text in cl_gui_alv_tree

Former Member
0 Kudos

Hello,I want to get a node's text by its nodekey,but the method 'TREE_GET_NODE_TEXT' is protected in cl_gui_alv_tree class

,and I don't find another related method in this class to get text

of a node ,can anybody help me ?

Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Ray,

There is no direct method to get the text in cl_gui_alv_tree....but you can do it in a different way.

You will be having the table from which you built the tree, based on the node_key value, read from that table to get the text for that corresponing node_key.

Hope this helps you.

Regards,

Prasanth

  • Reward if helpful

2 REPLIES 2

Former Member
0 Kudos

Hi Ray,

There is no direct method to get the text in cl_gui_alv_tree....but you can do it in a different way.

You will be having the table from which you built the tree, based on the node_key value, read from that table to get the text for that corresponing node_key.

Hope this helps you.

Regards,

Prasanth

  • Reward if helpful

sharat_chandra
Active Participant
0 Kudos

Hi,

You can try the method GET_OUTTAB_LINE in CL_GUI_ALV_TREE. It would provide you with all the info pertaining to the given node key.

ps: This internally uses "tree_get_node_text".

Regards,

Sharat.

Message was edited by:

Sharat Chandra