Gateway entityset with nested tables
My requirement is to create a Gateway service to retreive material data + grid values (size and color) + stock for each grid value.
Level 1: Material general data
Level 2: Grid values (nested table)
For each line of level 2: Level 3: ATP stock (nested table)
In XML this is what I am trying to do:
I would like to get all these information in a single get_entityset request (taking filters in input request).
Whats is the best way to create such a service ? Do I need to use the complex entities ? Are there any samples around because I was not able to find anything on SCN.
Any advises on similar cases would be much appreciated.
Thanks in advance.
Implement Expand_EntitySet where u can send your inputs as filters and get all those those table as output.
Create Entity for each of those output tables. Also Create Entity holding your Inputs as well.
Once u do this create association & navigation between entities with appropriate cardinality.
Implement Expand_EntitySet method and get all ur inputs as filters inside it and use it in ur logic.
Also send back the navigation properties to the expand clause table.
With using $expand in the url u can get the output tables.
Please refer the below which will help u : With this u can try accomplishing your scenario.