cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a tree UI in WDJ

Former Member
0 Kudos

Hi,

I have a requirement in which I have to create a tree UI in WDJ.The tree data should come from a function module(BAPI).

The tree should be like; when you select the first node, the function mdule should get triggered and should fetch the next set of results, Again when you select the node then the same function mosule should get triggered to fetch the next set of results.

Something similar to a set of drop downs, when you select from the first drop down you get the result into the 2nd drop down, when you select the 2nd drop down the values of 3rd drop down should populate,

The main problem is that in all the case the same BAPI is triggered with different set of values.

Please let me know if anyone has worked on such a sceanrio. If yes please help me.

Regards,

Pranay

Accepted Solutions (0)

Answers (2)

Answers (2)

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi Pranay

1) Create a single model node for the BAPI.

2) If you tree is not hierarchical create a simple (not model) nodes for all your three levels in the tree.

3) Create supply-functions for all the three nodes. In the functions you will execute the BAPI and copy BAPI output to the simple tree node.

4) In the supply-functions use utility WDCopyService.copyElements(IWDNode, IWDNode) to copy element from BAPI output to the current tree node. One important thing here: the utility requires that the source and target nodes have equal set of node attributes!

BR, Sergei

Former Member
0 Kudos

I would suggest that you first work through the Tree tutorial and learn to populate a tree using the onLoadChildren event and how to determine the selected tree node in an action handler.

Then you could try to use your BAPI inside the onLoadChildren action handler to get the real data from the model.

Armin