Skip to Content
Jun 14, 2016 at 08:00 AM

Sapui5 - Xml view open pdf


Hi, I'm developing a Fiori custom web application and I need to open a pdf file in a xml view.

I've develop a custom oData service for implementing the method


Returning the data stream as:

ls_stream-value = l_value.
ls_stream-mime_type = 'application/pdf'.
copy_data_to_ref( EXPORTING is_data = ls_stream
                              CHANGING  cr_data = er_stream )

In xml view I've put

<core:HTML id="idFrame"/>

The relative controller is

var html = this.getView().byId("idFrame");
var url = "/sap/opu/odata/sap/*****('YYYYY')/$value";
html.setContent('<iframe src="' + url +'" width="100%" height="100%"></iframe>');

When I open the view nothing appears and in Chrome console I've got this message

How can I solve it out?

Kind regards,



Capture.PNG (3.6 kB)