Skip to Content
0
Jul 17, 2019 at 02:28 PM

ABAP: Odata batch calls with json string and attachment content

372 Views

Hi Experts,

I have to trigger an ODATA Batch call having two post calls, one with json string and another post for the attachment(xstring). This has to be achieved in ABAP. Could you please help how to make such calls in ABAP?

Basically, I want to make a single ODATA end point call passing document data + attachment content using ABAP logic.

URI: /sap/opu/odata/IWBEP/TEST_APPLICATION/$batch

--batch
Content-Type: multipart/mixed; boundary=changeset

--changeset
Content-Type: application/http
Content-Transfer-Encoding: binary

POST EmployeePictures HTTP/1.1

Content-Type: image/jpeg

<xstring content of the file>

--changeset
Content-Type: application/http
Content-Transfer-Encoding: binary

POST EmployeeDetails HTTP/1.1
Content-Type: application/json

{

<json string>

}

--changeset--

--batch--

Warm Regards,

Rajesh.