cancel
Showing results for 
Search instead for 
Did you mean: 

I can not download PDF or .CSV in Fiori Client App ?

Momen_Allouh
Advisor
Advisor
0 Kudos

In my custom developed Fiori apps, I use the following to open and download the generated PDF file:

var uri = doc.output('datauristring'); <-- this is from jsPDF plugin for creating PDF from json data in client side.

window.open( uri, 'blank');

the window.open( uri, 'blank'); works excellent in Chrome Browser and Safari Browser in iPad, but it is not working correctly in SAP Fiori client app in ios iPad.

in SAP Fiori Client App in ios iPad the PDF will be opened in new window but there will be no options to download or open in iBook as I get in Safari browser in iPad.

the only option I will get from Fiori Client App is "Done" that will close the opened PDF window.

So how can I download a file / attachment / PDF from SAP Fiori Client App ios iPad ? and save it into the iPad ?

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member182874
Active Contributor
0 Kudos

Hi Momen,

Were you able to achieve this using fiori client. ?

We are trying the same and are facing issue while downloading or opening attachments from FC 1.5

from any OS. ios/android etc.

Regards,

Tejas

Momen_Allouh
Advisor
Advisor
0 Kudos

Hi Tejas,

No I were not.

It looks like as I previously mentioned :

"SAP will not update the Fiori client app to allow download, then the only other solution will be to develop your own mobile web app (using cordova plugin) and you can develop the open in iBook / download function."


Or SAP can provide the Fiori Client source code so we can make our custom Launchpad Client App.

Kevin_SAP
Advisor
Advisor
0 Kudos

Launchpad is not Fiori Client code and resides on the server (FioriLaunchpad.html I think is the file name).  There is a UI5 team that works with the Launchpad and Launchpad designer.  You may try asking on this space or UI5 development space.

Fiori Client source code is available with the SAP Mobile Platform 3.0 SDK license and customers can modify the source to suit their needs.  This is the product I usually work with.  This really has nothing to do with updating the Attachment Viewer though as the Attachment Viewer is working as designed since it was designed to be a viewer.

You could probably write some UI5 code or use something like what is documented here:

http://www.w3schools.com/tags/att_a_download.asp

Regards,

Kevin

Momen_Allouh
Advisor
Advisor
0 Kudos

Kevin,


I am already using my own JS code in my custom SAPUI5 Fiori app.

Please read my first question top of page:

window.open( uri ,  'blank');

That is similar to "download" attr from link you send.


window.open( uri, 'blank'); is working fine in safari and chrome browser apps, but not in SAP Fiori client app.

in SAP Fiori client app the  window.open( uri, 'blank');  is opened by attachment viewer ! not same as in safari / chrome app as new browser window.

in Safari / Chrome app the window.open( uri, 'blank'); is opened in new window with ability to save / download.

Kevin_SAP
Advisor
Advisor
0 Kudos

Try using Parent for custom Fiori Apps.  There was a KBA on it, KBA 2217478.

Regards,

Kevin

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Momen,

Please try parent.window.open(urlProvidingFile, '_blank');

2217478 - User cannot open attachment in custom Fiori application on Android using Fiori Client 1.4 - FC/KAP

Regards,

Masa / SAP Technology RIG

Momen_Allouh
Advisor
Advisor
0 Kudos

I am already able to open the attachment with window.open(urlProvidingFile, '_blank') even without parent. because I am not using the index.html which will open in <iframe> I am already using the component to run my custom apps like sap standard apps, and the window.open(uri,"_blank") is working fine and opening my PDF.

My question was : I can't download / save the attachment after opening it.

After open the attachment using window.open(uri,"_blank") there will be no options to save or download the only option I will see is "Done" which will close the opened attachment.

So how can the end-users download the attachments into there iPad ? why they only can view not download ?

b_punith
Participant
0 Kudos

Momen,

I find the same thing with iPad, when attachments are clicked in iPad I could only view and close but there is no option to download.

Is this something can be overridden with and provide an option to download ?

Regards,

Punith

Momen_Allouh
Advisor
Advisor
0 Kudos

My client submitted ticket to SAP but as usual SAP support was not helpful, they took long time to replay and they responded that you can view the attachment and it is working !!! as if they did not read or understand the issue is about download

Since SAP will not update the Fiori client app to allow download, then the only other solution will be to develop your own mobile web app (using cordova plugin) and you can develop the open in iBook / download function.

Kevin_SAP
Advisor
Advisor
0 Kudos

Momen,

The Fiori Client Attachment Viewer is desiged intentionally as an Attachment Viewer and not a downloader.  It opens the attachment in the appropriate viewer or the Cordova InAppBrowser.  It is not intended to be a downloader by design.  The InAppBrowser provides several enterprise advantages as it is not subject to whitelist and does not allow access to the Cordova APIs (advantage for security).

You could create a server side UI5 application to run inside the Fiori Launchpad or a separate Kapsel application to download the attachments as Fiori Client does not limit those features.

Regards,

Kevin

Momen_Allouh
Advisor
Advisor
0 Kudos

Kevin,


So what I previously mentioned  is correct:

"Since SAP will not update the Fiori client app to allow download, then the only other solution will be to develop your own mobile web app (using cordova plugin) and you can develop the open in iBook / download function."

former_member182874
Active Contributor
0 Kudos

Hi Kevin,

Thanks for your inputs, very helpful.  Could you also provide your thoughts on below thread by my colleague, as we are facing issue with CSV format.

Thanks in advance,

BR

Tejas

Kevin_SAP
Advisor
Advisor
0 Kudos

I've responded to him on the POST.  FYI, most Fiori Client questions are asked over on the SMP Developer Center space since it is built using the SAP Mobile Platform SDK for Kapsel.

Thanks,

Kevin