SAP Knowledge Base Article - Public

3366726 - Call OData API_PURCHASEREQ_PROCESS_SRV with JSON format raise exception


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.


SAP S/4HANA Cloud.

Reproducing the Issue

  1. Open the API Platform 
  2. Select GET method
  3. URI /sap/opu/odata/sap/API_PURCHASEREQ_PROCESS_SRV/A_PurchaseRequisitionItem?$format=json
  4. Execute
  5. Error 500


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).


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


API_PURCHASEREQ_PROCESS_SRV, 500, bad request , KBA , MM-PUR-REQ , Purchase Requisitions , Bug Filed


SAP S/4HANA Cloud all versions