Skip to Content

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

Jan 24, 2017 at 02:18 PM


avatar image
Former Member


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 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().

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Krishna Kishor Kammaje
Jan 25, 2017 at 04:06 AM

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.

10 |10000 characters needed characters left characters exceeded
Vamsi Krishna C V Jan 30, 2017 at 10:57 AM

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

10 |10000 characters needed characters left characters exceeded