Skip to Content
avatar image
Former Member

Attachment Download using standard c4codata service in UI5


We have a scenario in which we want to download attachments from Service Requests stored in the SAP C4C system as attachment on our UI5 application using the standard odata i.e c4codata service.

Currently when trying to download the attachment using the url we get a $value file instead of the actual file with the extension.

I have attached screenshots for reference.

I think its due to the Binary field before the $value in the link . Tried to add the Binary value between the $value and still it doesn't work.

Any suggestions would be appreciated.

Add comment
10|10000 characters needed characters exceeded

  • Former Member

    Hello Kaustabh,

    Did you find a way to achieve this requirement? Even we have the same scenario.



  • Get RSS Feed

1 Answer

  • Mar 08 at 09:49 AM


    Try using $expand=ServiceRequestAttachmentFolder to get the binary attribute passed in your odata service.

    The category code 2 ( document), binary content will be passed. For category 3( link or Library), you need to use LinkWebURI attribute.

    This is an example of odata service which would return you with binary content:$expand=ServiceRequestAttachmentFolder

    This is how odata would return if you have category code with Link:

    <d:CreatedBy>John Healy</d:CreatedBy>
    <d:LastUpdatedBy>John Healy</d:LastUpdatedBy>
    "); vertical-align: bottom; height: 10px;"><d:LinkWebURI>
    Add comment
    10|10000 characters needed characters exceeded