on ‎2019 May 31 11:41 AM
Hi All,
I want to mimic the oData batch operation from SAP Cloud For Customers oData API on the LeadCollection endpoint to create multipe Lead objects. I created an IFlow with a receiver and configured it to the LeadCollection endpoint utilizing the EDMX from Cloud for Customer. When I send a batch operation with a single change set it is fine. When I send multiple change sets then I receive error below. There is nothing in trace or access logs for this error. . I referenced the github documentation, the markup should be fine.
Please help me out achieving this, I want to use this batch as a base for a custom implementation.
Github developers guide on batch: https://github.com/SAP/C4CODATAAPIDEVGUIDE#batch
ECC related information: https://blogs.sap.com/2017/12/17/implementing-batch-operations-in-odata/
Referenced question: https://answers.sap.com/questions/11969450/odata-sadl-batchrequest-with-multiple-changesets-d.html
Please help me out to get this to work, I want to use it as a base for a custom implementation.
Two change sets request:
--batch_guid_01
Content-Type: multipart/mixed; boundary=changeset_guid_01
--changeset_guid_01
Content-Type: application/http
Content-Transfer-Encoding: binary
POST LeadCollection HTTP/1.1
Content-Type: application/json
Content-Length: 10000
{
"ObjectID" : "1111",
"Name": "TestLeadCollection 1",
"AccountPartyID": "1000976",
"ContactID": "1000337",
"Company": "Testleadcollection company 1"
}
--changeset_guid_01
Content-Type: application/http
Content-Transfer-Encoding: binary
POST LeadCollection HTTP/1.1
Content-Type: application/json
Content-Length: 10000
{
"ObjectID" : "2222",
"Name": "TestLeadCollection2",
"AccountPartyID": "1000976",
"ContactID": "1000337",
"Company": "Testleadcollection company 2"
}
--changeset_guid_01--
--batch_guid_01--
Two change sets response:
--batch_73428c58-ea9d-49d4-ba22-48d24a66d9e0
Content-Type: application/http
Content-Transfer-Encoding: binary
HTTP/1.1 500 Internal Server Error
DataServiceVersion: 1.0
Content-Type: application/atom+xml;charset=utf-8;type=entry
Content-Length: 248
<?xml version='1.0' encoding='UTF-8'?><error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><code>INTERNAL_SERVER_ERROR</code><message xml:lang="*">null: Transaction ID :eed36bd8-f068-4498-a813-20910f073a83</message></error>
--batch_73428c58-ea9d-49d4-ba22-48d24a66d9e0--
Thanks in advance!
Bram
Request clarification before answering.
Hi bramkeijers,
Unfortunately, OData Receiver adapter does not support batch operation.
You have to use HTTP Adapter.
Hope this helps,
Bala
P.S.: Your question might have given me another idea for a blog. 😉
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bala,
OData receiver adapter supports batch operation. Blog explaining how batch works in OData Receiver adapter https://blogs.sap.com/2017/05/10/batch-operation-in-odata-v2-adapter-in-sap-cloud-platform-integrati...
BR
Saranya
Hi Bram,
Here is a blog for batch in OData sender
https://blogs.sap.com/2018/11/22/sap-cloud-platform-integration-odata-service-in-batch-mode/
Hope this helps.
BR
Saranya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 13 | |
| 8 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.