Skip to Content
Technical Articles
Author's profile photo Merina Acharya

Batch processing with ODataV4 Adapter in SAP CPI

SAP CPI offers OData adapter to communicate with OData services. It supports messages with JSON as well as Atom format. The message protocol in CPI can be either OData V2 or OData V4. You can use either OData V2 or OData V4 depending on the OData service you need to communicate with.  More details on the difference between V2 and V4 is available at –

This blogs explains the procedure to process batch processing (using operation POST ) in OData V4 service receiver OData Adapter.

Configure the adapter as per the instruction –

In OData V2, batch processing can be enabled using the below option:

However with OData V4 this option is not available. In order to process the request SAP has provided the below operations:

In order to send batch data the Operation ‘Batch Processing ($batch)’ needs to be selected.

 After selecting the operation, add either a ‘Changeset’ or a ‘Batchset’. I have added ‘Batchset’ and selected the entity ‘Logs’ for this scenario:

This will generate an EDMX file, the structure of the payload looks like this:

The field <method> denotes the operation to be performed, in this scenario we will be using ‘POST’. Provide the entity name in the field <uri>,  in this case it will be ‘Logs’.

The remaining fields can be mapped as per your requirement. It is mandatory to have at least one ‘batchSet1’ in a batch request payload. Note that structure should looks something like this after the mapping:

Deploy the iflow and trigger a message, this would post all the records in a single call.


Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Christopher Linke
      Christopher Linke

      Hi @Merina Achary

      great article, thank you!

      I have two questions:

      • Is that possible with OData V2 as well?
      • How do I know if the service supports V2 oder V4? e.g. all the objects of the page, like:
      Author's profile photo si-chan Ham
      si-chan Ham

      I am trying to follow this but I am getting error. My Iflow is as follows.


      My content modifier body has payload like below.


      I am using Batch operation


      I am not getting what is the issue.But its not working I am getting error as

      java.lang.IllegalArgumentException: Invalid content type


      Can you help me here

      Author's profile photo Mastan Vali
      Mastan Vali

      Hi Marina,

      Can you provide the OData URL you are using or sample one to achieve this scenario.