Application Development and Automation 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:Ā 
Read only

Module Pool Dynamic Node(Tree)

0 Likes
1,648

Hi Experts,

I have a requirement that i need to build a node in module pool. and for that node i need to pass the variable(dynamic value from program)  as a child node. Please help how to do this. I already tried but its not working. Here in the image at yellow color highlited, where i need to pass the value as a child node.

Thanks in Advance

NareshN

7 REPLIES 7
Read only

Former Member
Read only

0 Likes
1,346

Hi Kiran,

Thank you for the response. I am sorry, i may not asked the question in clear way. Let me ask in clear now.

There is a fixed Node lets say 'Manager1'. Under this Node i need to display his/her sy-uname as a child node.

I used CLASS lcl_application  to create node. but under this node how can i display sy-uname as a child node of it?

Thank you

NareshN

Read only

Former Member
0 Likes
1,346

Hi,

please go through this program.I think it will help

Message was edited by: KIRAN RAJAN

Read only

Former Member
0 Likes
1,346


Hi,

Please refer to the below code.

  CALL METHOD g_alv_tree->add_node

    EXPORTING

      i_relat_node_key = p_cnode_key   " if this node is father level, keep it blank. if this node is child, need provide the father level number.

      i_relationship   = cl_gui_column_tree=>relat_last_child

      i_node_text      = l_node_text " This is text of the node

      is_outtab_line   = wa_outtab   " This is output work area

    IMPORTING

      e_new_node_key   = p_nnode_key. " This is the node id. using to count the node numbers.

Regards,

Yawa

Read only

0 Likes
1,346

Hi ,

Can u please post a sample code in much clear way, because i am getting confused.

Thank you

NareshN

Read only

0 Likes
1,346

Hi Naresh,

You can have a look at this thread and the working code I suggested. the logic uses a recursive loop and builds the tree dynamically till the last level. There are several demo programs for SALV tree. I request you to have a look into those demo(s) first.

Read only

former_member187748
Active Contributor
0 Likes
1,346

Hi Naresh,

for creating the node, you have to see this link, in which it is shown how to build a node,

you have to do some modifications, considering your requirements

http://scn.sap.com/thread/3382929