SAP Knowledge Base Article - Public

3141762 - Error code: Out of Memory,When trying to execute the Odata call for Service Request Attachment

Symptom

You are getting the error, "Error code: Out of Memory", when you are trying the Odata Query for ServiceRequestAttachmentFolder Collection.

Environment

SAP Cloud for Customer

Reproducing the Issue

  • Execute the below URL to get the attachment details in web browser :

        https://myXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codata/ServiceRequestCollection('YYYYYYY')/ServiceRequestAttachmentFolder('ZZZZZZZZZZZ')

    • XXXXXXX - Tenant ID
    • YYYYYYYY - Object ID of Service Request
    • ZZZZZZZ - Object ID of Attachment Folder
  • You will get the error, Error code: Out of Memory

Cause

This issue is happening because the Client (browser) cannot handle the load because the size of the attachment is too big.

Resolution

You can use Odata Monitor to download the Response Payload.

Steps :

  • Go to Administrator -> General settings -> Odata API Monitor
  • Activate the Odata Trace.
  • Make the same call from Google Chrome.
  • Refresh the Monitor and you can see the call you have just made in the Odata Monitor. Download the response payload of that particular call.

Also, You can directly download the attachment by getting only the binary value by using this URL :

https://myXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codata/ServiceRequestCollection('YYYYYYY')/ServiceRequestAttachmentFolder('ZZZZZZZZZZZ')/binary/$value

Note : If you are using this Odata URL for intergration purposes, you will not face any issue if the external system can handle the load of a bigger attachment.

The C4C server can handle attachment size upto 100 Mb. If the attachment is more than 100 MB, the above solution is not applicable since the Odata call will fail at C4C level.

 

Keywords

Odata, Attachment, Attachment size, ServiceRequestAttachmentFolder , KBA , LOD-CRM-INT-API , OData API (C4C Only) , Problem

Product

SAP Cloud for Customer add-ins all versions