Skip to Content

I can not download attachments in Fiori Client

Hi,

We have a problem with SAP Fiori Client. We developed an application for SAP Fiori.

We want to export (download) pdf files from SAP system to local in SAP Fiori Client. We use oData service.

Firstly, we add this code (HTTP Name = 'Content-Disposition' and HTTP Value = 'attachment; filename=XXX.PDF') to header in oData class.

Then, we want to download pdf file with this code (sap.m.URLHelper.redirect(urlProvidingFile, true));

If we use Google Chrome web browser, file can be downloaded. But if we use Fiori client application in Android Tablet, the file can not be downloaded and nothing happened.

What could be the problem for SAP Fiori Client?

Otherwise, We can properly download our pdf files with Approve Requests BSP application(CA_ALL_APV) in Android Tablet.

Note : You can see Fiori Client log in attachment.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Sep 16, 2015 at 08:23 AM

    Hi,

    We use this code "parent.window.open(urlProvidingFile, 'blank');" then problem was solved.

    SAP's answer for this problem:

    It turns out the issue was caused by the fact that custom fiori apps are loaded in iframe elements, while standard fiori apps are loaded into div elements.

    This means you will have to make a small change to your javascript to make it work.

    All you have to do is change the lines window.open (urlProvidingFile, 'blank'); to parent.window.open(urlProvidingFile, 'blank'); and then the attachmentViewer plugin should handle opening the pdf.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 31, 2015 at 07:22 AM

    Hello Hakan,

    Is your issue resolved? If yes then would you please share your solution as we are facing the same problem.

    Regards,

    Faisal

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.