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

Sending Batch Request to External Applications from SAP C4C SDK

Former Member
0 Kudos
724

Dear Experts,

I have a scenario to transfer Tickets from C4C to another SAP system based on a specific criteria. I am consuming the Ticket O data and writing my logic to send the request to create a Ticket "POST" with the necessary access token & cookies from the previous "GET" method call.

I need to transfer the Ticket Header Data, Text Collection & attachments of the ticket, all 3 are different entities in the Odata. I need to do a Batch request to send all the data in a single call to the other SAP system. Even i need to send updates of the Ticket to the external system.

When i tried using the batch request in C4C, I am able to form the body in the JSON format by using the batch process, but i am not able to pass the Content Type of Batch while the Execution of the web service.

In my logic the Content-Type is hardcoded as multipart/mixed;boundary=batch_1, when we use the function WebServiceutilities.ExecuteRESTWebservice() to pass the necessary parameters with the Content type mentioned above, the content type is only passed as multipart/mixed and the boundary=batch_1 is ignored in the request.

Just because this boundary=batch_1 is ignored am getting a response HTTP 202 Accepted but with empty response payload and the Ticket is not created in the system.

I tried to replicate the same in POSTMAN by including the statement boundary=batch_1 in the Header Parameters of the Content-Type then it was successful with HTTP 201 (Created) with the response payload as well.

Anyone please share your ideas how to implement the batch request in C4C to send the data outbound.


View Entire Topic
0 Kudos

Hi Adi ,

Were you able to solve this problem ? I am facing the same problem but I could not get over it.