cancel
Showing results for 
Search instead for 
Did you mean: 

Sap Business One Service Layer Batch Question

0 Kudos

Hi.

I'm using Service Layer to create documents on SAP B1.

I heard that there are two ways to create a document.

One is the normal format... (* no using batch)

The other one is using batches... For example...

(normal)

PATCH https://ServerAddress:50000/b1s/v1/ObjectName

{ "Code": "1170",

"DocEntry": 5,

"FiledName": "Y" }

(batch)

https://ServerAddress:50000/b1s/v1/$batch

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

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

--changeset_77162fcd-b8da-41ac-a9f8-9357efbbd

Content-Type: application/http

Content-Transfer-Encoding: binary

Content-ID: 1

PATCH /b1s/v1/ObjectName('1170')

Content-Type: application/json

{ "Code": "1170", "DocEntry": 5, "FiledName": "Y" }

......

I don't know how different this method is from the previous one. When should i use batch and why use ?

Accepted Solutions (1)

Accepted Solutions (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert

Hi HyeSoo Yoon,

Service Layer supports executing multiple operations sent in a single HTTP request through the use of batching.

For an example: Using Batch operations, you will be able to Create Item Master Data, Update Business Partner Master Data, Create Sales Invoice in a single HTTP request.

Hope it helps!

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

Answers (0)