SAP Knowledge Base Article - Public

3208485 - Error: "500 Connection Timed Out" While Processing a Single $batch Request to the OData Service API_BUSINESS_PARTNER

Symptom

Consider the example of a business use case where every time a record is created in the custom API service, a request is sent to the standard Business Partner API which is API_Business_Partner. During the process, the Business Partner API is running to a timeout error. This works fine for smaller number of entries (for example 10 entries) but for larger number of entries, the system throws a Time Out error.

500 Connection Timed Out
Timeout occurred
Error code: ICMETIMEOUT

Environment

SAP S/4HANA Cloud

Reproducing the Issue

  1. Login to the system 
  2. Go to the custom Fiori app 
  3. Browse and Upload the template
  4. System processes the file for around 10 minutes but later throws a Time Out error

The same behaviour is observed in the SAP Cloud Platform Integration (CPI) tool.

Cause

A single $batch request containing several single requests would lead to a long runtime on most services. Also, as long as API_BUSINESS_PARTNER is called via single requests, the processing of a single business partner will most likely never take below one second. Therefore several separate requests would be leading to the timeout error.

With service API_BUSINESS_PARTNER it is currently not possible to perform operations on multiple Business Partners in a single change-set request. You may refer the documentation available for Business Partner (A2X).

Resolution

  1. For single requests or separate changesets to API_BUSINESS_PARTNER we recommend no more than 100 requests at a time.
  2. You have to split the .csv-file into smaller files so that the custom app triggers smaller $batch requests.
  3. We would not recommend to call an asynchronous SOAP-request within the implementation of your synchronous OData request even if it was somehow possible.

The workaround is to automatically split up large .csv-files into separate $batch-requests containing 100 operations each in the custom Fiori app. In your custom Fiori app, change the batchGroupId with which the request is triggered after every 100 requests.

See Also

Documentation for Business Partner (A2X)

Keywords

Timeout occurred, ICMETIMEOUT, 500 Connection Timed Out, $batch, API_BUSINESS_PARTNER, Time Out , KBA , LO-MD-BP-ODT , OData Service for Business Partner , Problem

Product

SAP S/4HANA Cloud all versions