cancel
Showing results for 
Search instead for 
Did you mean: 

I can not download attachments in Fiori Client

hakan_danaci
Explorer
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

hakan_danaci
Explorer
0 Kudos

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.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Hakan,

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

Regards,

Faisal

hakan_danaci
Explorer
0 Kudos

Hello Faisal,

Unfortunately we couldn't solve problem. Also we opened a note to SAP.

Now, we are waiting reply from SAP.

Regards,
Hakan

Former Member
0 Kudos

Hi Hakan,

thank you for your reply, same situation. I have also raised the issue to SAP .. Now we are trying to update the SAPUI5 libraries just in case..

Regards,

Faisal