cancel
Showing results for 
Search instead for 
Did you mean: 

Prevent GET_EXPANDED_ENTITYSET from calling multiple time?

Former Member
0 Kudos

I have a OData Gateway Service with nested entities (say Entity A can be expanded with Entities B ;navigation properties "nv" ).

Now I redefined GET_EXPANDED_ENTITYSET and call in there a method that fills the complete return structure (including the expanded entities).

i have written call to call RFC that will provide me data for A and B.


A= Sales Order

B= Item Data




i konw that structure of the output entity set should have a field with Name same as Navigation Property Name.

i also kow that i need to append the Navigation Property Name in exporting parameter ET_EXPANDED_TECH_CLAUSES , which will tell the gate way framework that the child entity has already been expanded and there is no need to call the child entity set.



Now Problem is that GET_EXPANDED_ENTITYSET is called multiple time and so is my RFC. i am getting all required data in first call.

Prevent GET_EXPANDED_ENTITYSET  from calling multiple time.

Accepted Solutions (0)

Answers (1)

Answers (1)

AshwinDutt
Active Contributor
0 Kudos

Hello Zubin,

Can you please share the URL which your are using to fire $expand operation ? also how you are appending the navigation property to expand clause ?

Regards,

Ashwin

Former Member
0 Kudos

Sorry I cant Share URL but i am using following kind of URL

/sap/opu/odata/SAP/ProjectName/HeaderSet/?$expand=navigationProperty

/sap/opu/odata/SAP/ProjectName/ASet/?$expand=nv

AshwinDutt
Active Contributor
0 Kudos

Check using the below. i mean removing ' / ' after EntitySet name.

/sap/opu/odata/SAP/ProjectName/HeaderSet?$expand=navigationProperty

/sap/opu/odata/SAP/ProjectName/ASet?$expand=nv

Former Member
0 Kudos

No, It is not working. i mean still GET_EXPANDED_ENTITYSET is getting called for multiple time

AshwinDutt
Active Contributor
0 Kudos

What is the cardinality defined between header and item entities ?

Former Member
0 Kudos

My cardinality header to item is 1-n. I have also tried n-n. but no success.

AshwinDutt
Active Contributor
0 Kudos

Can you please share the model of your service ? and also the way you are appending Navigation Property to the expand Clause in the method.

I311295
Associate
Associate
0 Kudos

Did you resolve the issue ?