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: 

Module Pool Dynamic Node(Tree)

0 Kudos

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

Former Member

0 Kudos

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

Former Member
0 Kudos

Hi,

please go through this program.I think it will help

Message was edited by: KIRAN RAJAN

Former Member
0 Kudos


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

0 Kudos

Hi ,

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

Thank you

NareshN

0 Kudos

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.

former_member187748
Active Contributor
0 Kudos

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