Sending Data in Batch using CAP Node js Service to SAP S4Hana public cloud Api
Hi,
We are implementing a requirement to send huge amount of data from SAP BTP CAP Node.js program to SAP S4 Hana Public Cloud and we dont have any build in functionality avilable in SAP CAP BTP So we are manually creating a batch pyload and we try to send the Req to S4Hana Api.
bp is over destination service
let oresponse = await bp.send({ method: ‘POST’, path: `/$batch`, headers: { ‘Content-Type’: ‘multipart/mixed; boundary=request-separator’ }, data:`–request-separator Content-Type: application/http Content-Transfer-Encoding: binary GET /A_SuplrInvcHeaderWhldgTax HTTP/1.1 Accept: application/json –request-separator–`
});Using the above approach we are getting the following error message – Error during request to remote service:
Batch request payload is invalid
Please help on how this manually creation can be achieved or if anyone has knowledge on sending data from SAP BTP CAP Node.Js to S4 Hana Public Cloud $batch API.
Regards,Vipin.
Read more here: Source link
