Symptom
Using the URI /sap/API_PURCHASEREQ_PROCESS_SRV/A_PurchaseRequisitionItem?$format=json the API returns error 500, when removing the ?$format=json the OData call works without any error.
Environment
SAP S/4HANA Cloud.
Reproducing the Issue
- Open the API Platform
- Select GET method
- URI /sap/opu/odata/sap/API_PURCHASEREQ_PROCESS_SRV/A_PurchaseRequisitionItem?$format=json
- Execute
- Error 500
Cause
Calling API in JSON format returns the error "TOO_LARGE_BODY" in SAP Gateway client usually occurs when the size of the HTTP response is larger than the value specified for the ICM parameter (icm/HTTP/max_request size MB).
Resolution
You can pass $top to restrict the number of records returned in the response:
- /sap/opu/odata/sap/API_PURCHASEREQ_PROCESS_SRV/A_PurchaseRequisitionItem?$format=json&$top=100
See Also
Keywords
API_PURCHASEREQ_PROCESS_SRV, 500, bad request , KBA , MM-PUR-REQ , Purchase Requisitions , Bug Filed
Product
SAP S/4HANA Cloud Public Edition all versions