cancel
Showing results for 
Search instead for 
Did you mean: 

Tree structure issue.

Former Member
0 Kudos

Hi Folks,

I am working on Tree strcture, I have 3 levels in my tree, Level1, Level2, Level3.

Level1 ->Change number information

Level2 ->BOM Information

Level3 ->Operaton data.

I am in expanding level 3 node to find the operations data based on Level 1 (change number), My user do not want to use the lead selection on any of the nodes, he want to just expand level 1, level2, and level3.

I have two questions here.:

Question1 is: I am in level3, how to find the Level1 information.

when I use the Wizard to get the level1 context...I have two options 1, Lead selection (This is my user don't want )

Option2. based on the Index-> but here the context path always shows index1.

Question 2. How to find level1 index in level 3 node.

My tree is not dynamic tree, and it is static nodes tree.

Thanks in advance.

Regards,

Naresh.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Your requirement's key point is "get Level 1, but not using Lead-selection."

Okay, you know, the "TREE" has a special "attribute" that is "WDEVENT", which you can find it when you press any node of the tree, and in this "WDEVENT", there is a very important parameter named "PATH".

This parameter "PATH" contains the whole "Routine Information" of your selected tree node. just like this format: tree_node.1.level1.1.level2.1.level3.1.

Okay,now, you can find that the 1st element of "level3" has the parent: 1st element of "Level2" which also has the parent : 1st element of "Level1".

Oh, ya, i think, maybe you just want to expand your tree(eg. Level3), will not want to press any node of "Level3".

About this, i suggest that you can add one attribute to your every level node of tree context . Initially, when you form the tree, you can put the value to this attribute. Then you can make use of it anywhere and anytime, if you want.

You can also search this topic in this forum or Goolge.

Best wishes~

Former Member
0 Kudos

Hi Can Tang,

Yes, I am not selecting the tree node, I am just expanding my node.

Finally I found the solution myself.

I have added a parameter in load children event, the parameter reference is "IF_WD_CONTEXT_NODE", at the run time this parameter is providing current node information, in the class IF_WD_CONTEXT_NODE, there is a parameter "get parent element", here I got my parent element, through this my parent I have found the parent node, in this parent again I went to the parent element, again inside that I found the parent node,,,,in this way we can go any number of levels at the top and found the exact parent,(the advantage of this logic is we don't need to think about Index or Lead selection ).

In addition to that in the same we can also find the child nodes at the down levels ...n times.

Thanks for your suggestion on this.

Regards,

Naresh Kumar.

Former Member
0 Kudos

Yes, you are right~

Basically, i suggested you that you recorded the "Parent" information initially when you form the tree first time.Maybe this is not a good or fit solution.

Now, you have resolved your issue, very good.

Very glad to discuss with you on WD4A.

Best wishes~

Answers (0)