Skip to Content

CDS View for tree table

Oct 12, 2016 at 03:40 PM


avatar image
Former Member


I have a requirement where I have to show Purchase Order and Purchase Order item in a tree structure. All purchase order items should be shown as child of purchase order.

There will be a filter bar above tree table where we will enter search filed to search Purchase Order/Purchase order Item.

For this I have created a CDS which returns all Purchase order Items in a linear structure. But to show data in tree structure, I have to make it hierarchical? What is best way to do it?



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Attila Berencsi Dec 28, 2016 at 07:44 PM

Hi Vinayak,

maybe this is helpful, it is about CDS hierarchical annotations:¤t_toc=/en/d9/bc687d35fa42ccbb0b9256ce786d51/plain.htm&node_id=112

Maybe you can combine it with one of the below controls with small efforts (I'm planning to do such combination after we upgraded to NW 7.51, at the moment I load the data from the backend and build the tree manually into a JSON model and use the first control.At the moment we are on a low NW release and do not have the possibility to implement this more simple, onyl using JSON using ABAP backend):

OData service example with annotations for tree/hierarchy representation:

The service should be called on first level and every time you expand a node.



10 |10000 characters needed characters left characters exceeded