cancel
Showing results for 
Search instead for 
Did you mean: 

$expand calling multiple times in a single sync cycle

hemantbaviska
Explorer
0 Kudos

Hello Experts,

I have a below EXPAND EntitySet defined query. So when we do a sync then this query is getting called multiple times in a single sync cycle like 6 times. And each time the data is same in all the calls. So I wanted to know how should we avoid the odata framework to call the $expand multiple times.

Do we need to do something in tbe BE or in the FE?

/sap/opu/odata/sap/Ztest_SRV/OpportunitySet?$expand=ProjectLeader,ProjectMembers,ProjectResponsible,SalesProspect&!deltatoken='20220720102613'

gregorw
Active Contributor

Please provide more details about your environment. What is the client that does the sync here?

hemantbaviska
Explorer
0 Kudos

Hello Gregor,

Thanks for the reply.

We are using the embedded system i.e. the odata and GW services are in the BE CRM system and we recently moved to SAP BTP environment where we configured all our BE systems and the Request/reponse URL comes via the SAP BTP.

And we are doing the sync from the cusom build app deployed to the istore and then using the online/offline functionality.

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

What is the release your system is based on?

Accepted Solutions (0)

Answers (1)

Answers (1)

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

I doubt that !deltatoken is supported in conjunction with $expand. (I will have to check this though)

So the question is whether you really need a delta request which contains newly created, updated and deleted items or if only newly and updated entries are sufficient.

If the latter is true you could introduce a property last_changed_at for the entity OpportunitySet.

Then you could implement your service such (if possible) so that this field gets updated if any of the dependend entities gets updated.

Then a simple $filter on this property would limit the results to those opportunities that got newly created or updated.

Kind regards,

Andre

hemantbaviska
Explorer
0 Kudos

Hello Andre,

Thanks for the reply.

We have a separate DELTA request for OpportunitySet and for its relationships. Thie request is purely only for the Initial load.

So we need to check if !deltatoken is supported in conjunction with $expand. Can you guide us where we can check this if its supported or not any link or help.com

Regards

Hemant