Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

SAP Gateway get_expanded_entityset with Navigation Properties from different Entitys

Hello,

I am building a Gateway Service in the SEGW transaction. I already worked through:

Let’s code CRUDQ and Function Import operations in OData service!

Implementing Expand Entity/Entity Set

and got it working for my own Data Model, which simplified looks like this:

Both Aggregations have a 1..N Cardinality and the necessary Navigation Properties:

With http://xxxxx/Landscapes?$expand=LandscapeSystems I can already get the Landscapes and the according Systems.

What I would like is, that i can get the Interfaces nested to the Systems in the same Request (to reduce the number of Request to a single one when loading the complete data.)

Using http://xxxxx/Landscapes?$expand=LandscapeSystems,SystemInterfaces doesn't work. (Propably because SystemInterfaces doesn't belong to Landscape Entity?)

Is there any other way to get the nesting over more than one level?

Thanks for any help and suggestions!

Kind regards,

Felix

Tags:
replied

Hi Felix,

Try http://xxxxx/Landscapes?$expand=LandscapeSystems/SystemInterfaces . This will identify Systems associated with Landscapes and Interfaces associated with those Systems.

You can check the URI convention URI Conventions | OData - The Protocol for REST APIs  .

Regards,
Ekansh

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question