cancel
Showing results for 
Search instead for 
Did you mean: 

Download PDF from Fiori Launchpad ?

former_member210621
Participant
0 Kudos

Hi Experts,

I created and application which has feature to download a complete report as a PDF File. I achieve this functionality by creating a smartform and send it to forntend using media streaming.

I deployed this application in HCP and on FLP as well. It is working as fine when I am executing that application from WebIDE or HCP. However, when I am executing the same application from Fiori Launchpad, it is giving error.

Error Screenshot:

:

var oPdfModel = new sap.ui.model.odata.ODataModel("<Path of oData Service>");
sap.ui.getCore().setModel(oPdfModel);

sPath = "/PDFSet(Id='" + Id + "')/$value";
oPdfModel.read(sPath, null, null, true, function(oData, oResponse) {
	var pdfURL = oResponse.requestUri;
	sap.m.MessageToast.show("Report is being downloaded.");
	html.setContent("<iframe id='idPdfFrame' src=" + pdfURL + " width='800' height='700' visible='false' ></iframe>");
	oPanel.addContent(html);
	oPanel.placeAt("idContentTab");
}, 
function(oError) {
	sap.m.MessageToast.show(oError.message);
});

Same id 'idContentTab' is used in index.html to place a component and referred here.

Could you please suggest anything to solve this issue..

Thanks in Advance

-Ketan

Accepted Solutions (0)

Answers (0)