Skip to Content

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    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.

    Add comment
    10|10000 characters needed characters exceeded

  • 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

    Add comment
    10|10000 characters needed characters exceeded