cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Multiple ODATA Calls via SAP Cloud SDK

sandeepmalhotra
Participant
5,116

Hello Everyone ,

I am calling backend system using executeHttpRequest (SAP Cloud SDK) via destination which is working fine.

My requirement is to make multiple calls in one go

I am thinking to combine multiple calls using batch or Promise.all

If there any other best way to do . Kindly let me know if there any example I can refer.

Thanks in advance

Accepted Solutions (0)

Answers (1)

Answers (1)

Dinu
Active Contributor
0 Likes

Batch is the only way to send multiple requests to an oData service in one roundtrip. Promise.all will send multiple requests. You would be better off using the ready support from Cloud SDK instead of rolling out own solution for batching.

satyaP1395
Discoverer
0 Likes

Hi @gregorw ,

I tried to implement batch call using Batch Requests using SAP cloud sdk link : https://sap.github.io/cloud-sdk/docs/js/features/odata/v2-client#batch-requests but i am facing the error when i trying to call the batch () . I have also configure the BTP destination in package.json , but still facing an error PFB screen shots,

Package.json file.

satyaP1395_0-1741238592895.png

service.js file 

satyaP1395_1-1741238726102.png

error  i am facing ..

satyaP1395_2-1741238836082.png

Please suggest me and verify it how to resolve this error.

Please let me know if you need any more information.