Skip to Content
0
Aug 12, 2023 at 10:44 AM

Batch Operation issue in SAP B1 Service Layer ?

143 Views Last edit Aug 12, 2023 at 01:02 PM 2 rev

Hi Expert ,

I am new in using Batch operation of SAP B1 Service Layer oData/Rest api.I am able to post BusinessPartner batch operation in SAP B1 using oData/Rest api. But i am geeting issue for one scenario for example i have a 10 businesspartners and in 2nd data have some error for that reason in my request for all packet data it's giving me error.

So is there any way to use batch operation but post will be successful which data are valid below is the example :

For this below scenario only 1st data added but 3rd data is not added which is valid as 2nd data is duplicate data validation error

--batch_36522ad7-fc75-4b56-8c71-56071383e77c

Content-Type: application/http

Content-Transfer-Encoding:binary

POST /b1s/v1/BusinessPartners

Content-Type: application/json

{"CardCode":"TestBatch015", "CardName":"Test Batch 15", "CardType": "C"}

--batch_36522ad7-fc75-4b56-8c71-56071383e77c

--changeset_77162fcd-b8da-41ac-a9f8-9357efbbc

Content-Type: multipart/mixed;boundary=changeset_77162fcd-b8da-41ac-a9f8-9357efbbd

Content-Type: application/http

Content-Transfer-Encoding: binary

Content-ID: 1

POST /b1s/v1/BusinessPartners

Content-Type: application/json

{"CardCode":"TestBatch015", "CardName":"Test Batch 15", "CardType": "C"}

--changeset_77162fcd-b8da-41ac-a9f8-9357efbbc--

--changeset_87162fcd-b8da-41ac-a9f8-9357efbbc

Content-Type: multipart/mixed;boundary=changeset_87162fcd-b8da-41ac-a9f8-9357efbbd

Content-Type: application/http

Content-Transfer-Encoding: binary

Content-ID: 2

POST /b1s/v1/BusinessPartners

Content-Type: application/json

{"CardCode":"TestBatch016", "CardName":"Test Batch 16", "CardType": "C"}

--changeset_87162fcd-b8da-41ac-a9f8-9357efbbc--

--batch_36522ad7-fc75-4b56-8c71-56071383e77c--