Skip to Content

Download pdf file from URL

Nov 03, 2017 at 07:37 AM


avatar image

Hi Community,

We need to retrieve a pdf file from URL that is stored as a link under the attachments of a material. The ultimate goal is to store this pdf as an attachment to a customer quote.

The URL is a regulare one that is publicly available w/o authentication. Meaning I can simply enter the URL ( in webbrowser to get the file.

Is there any way to achieve this? We tried using the REST API but currently fail with an RABAX error whenever we call the REST service.

Any help appreciated,


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Knut Heusermann
Nov 08, 2017 at 10:37 AM

Hi Daniel,

In blog post Read and Write ByDesign Attachments using Web Services I described how to create and update attachments of ByD business objects using Soap services. Adding an external link as attachment to a business object in ByD works basically the same: just submit the external link instead of the file content (here: material attachment):

  <Document PropertyListCompleteTransmissionIndicator="false" ActionCode="01">               
    <AlternativeName>My Web Page</AlternativeName>               

Using OData you would basically need to provide the same data, but I did not use that yet.

Best regards,

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Thanks Knut,

The process is a bit different. Our customer puts a link as an attachment to the material master. When he creates a quote this link needs to be resolved and the real attachment (PDF) must be downloaded from that link and attached to the quote.




Hi Daniel,

did you already try a Add-on solution using the SAP Cloud Applications Studio? Maybe you can embed some Add-on code in the quote creation that picks the link from the material attachment folder, calls some external REST or Soap service to get the pdf (base64 encoded) and creates the corresponding attachment including the encoded pdf as file content in the quote.

Regards, Knut


Hi Knut,

This is exactly what I am trying to do. But I could not find a way to download a PDF from an external source out of an ABSL script. I tryed to use a external service of type REST for this, but calling the REST simply dumps.