SAP Knowledge Base Article - Public

3324758 - OData "Top" Parameter Does Not Work with Attachments


You are trying to use a get with $top parameter, when checking the Attachments folder.

You want to display the service summary document of the past several years.

However, this $top parameter is not working and if you remove $top parameter it works fine.


SAP Cloud for Customer

Reproducing the Issue

  1. Go to postman;
  2. Try url with top parameter:'XXXXXXXXXXXXXXXXXXXXX')/ServiceRequestAttachmentFolder?$filter=TypeCode+eq+%2710009%27&$orderby=LastUpdatedOn+desc&$select=Name,MimeType,Binary,TypeCode&$top=1


Attachment folder is special OData entity and has some different set of implementation.

When top and filter is applied simultaneously, there is bug which prevents exact data to be fetched.

So, in this case, when $get top is sent with $filter, the data which is relevant as per the full query gets deleted, as it does not fall in top criteria.

And as a next step, when filter is applied it deletes the records as it does not fall in filter criteria.


This is the current system behavior.

Development team will fix this in future releases.

For now, kindly avoid using top - or have high value if top if possible.


Attachment; OData, get; top; parameters; top parameter; , KBA , LOD-CRM-INT-API , OData API (C4C Only) , Problem


SAP Cloud for Customer add-ins all versions ; SAP Cloud for Customer core applications 2302