cancel
Showing results for 
Search instead for 
Did you mean: 

Passing data from one http operation to another http operation in a batch call

0 Kudos

Hi,

We know that HTTP is stateless protocol and so is ODATA(since it is on top of HTTP).

But in ODATA batch operation we can send multiple http operation(get, put) in a single batch.

As mentioned here https://help.sap.com/saphelp_nw74/helpdata/en/94/a126519eff236ee10000000a445394/content.htm gateway server process these operation in CHANGESET_PROCESS method and call getEntitySet() for get operation and UpdateEntitySet() call for update operation.

Let us consider a batch call( with one get and one update in a single batch). My requirement is, can we use result set returned by getEntitySet() in UpdateEntitySet().

Accepted Solutions (1)

Accepted Solutions (1)

kammaje_cis
Active Contributor
0 Kudos

I have not done this but I would suggest you to try this.

Create an attribute in the DPC_EXT class to store the query results, and when you do the update, try referencing that attribute. If the entire http request is processed in single SAP session and if the runtime re uses the DPC instance, then this would work.

Answers (1)

Answers (1)

vamsixk
Active Participant
0 Kudos

Depending on your OData version, the Requests within a BATCH request may not be processed in the given order. They could be processed asynchronously as well. Do check the documentation ODATA Version 2.0