cancel
Showing results for 
Search instead for 
Did you mean: 

Populate Tree Structure from BAPI Model Node

Former Member
0 Kudos

Hi All,

I need to create a tree structure in a view as a lookup for my profit center. I have a BAPI that will return a table structure that has a parentid and childid relationship

Example Structure

ID   ProfitCtr  ChildID   ParentD
1     ABC            1          0
2     DEF            2           1
3     GHI             3           1
4     IJK              4           2
5     LMN            5           2
6     OPQ            6           3
7     RST             7           3

So I want to display

ABC
  ---- DEF
         ---- IJK
         ---- LMN
  ---- GHI
         ---- OPQ
         ---- RST

How do I create a tree structue from the model node of the context. Do I need to create Value Node/attributes and populate from the model node or can i directly bind the model node to tree structure.

I would appreciate if some one can email me the code sample to

sapnwportal@yahoo.com

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member751941
Active Contributor
0 Kudos
Former Member
0 Kudos

Mithu,

Thanks for your response. I was able to figure out the solution based on the links.

Answers (0)