cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in i5SPC Chart Web Scripting in SAP MII 15.0

Former Member
0 Kudos

Dear Experts.

I am facing an issue in web scripting of i5SPC Display Template in MII 15.0.

When I am running from the Display Template itself, it is giving the correct result like this.

But, when I am calling it from a JavaScript page and drawing it into irpt, it is showing no data.

Here is the Web Script I am using :

var i5SPC = new com.sap.xmii.chart.hchart.i5SPCChart("DisplayTemplate", "QueryTemaplate");

    i5SPC.setChartWidth("740px");

    i5SPC.setChartHeight("500px");

    i5SPC.draw("chart");

The output in irpt page...



The following warning message I am getting in the firebug the i5SPC library is getting loaded.

Is there any way to overcome this problem?

Please help

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Is the query template you configured returning any data?

Did you assign a model for the data and filled it in with respect to the chart you're trying to draw?

If the data chain is broken, getRows can't return anything, hence the error that a variable/method there is undefined.

Former Member
0 Kudos

Hi Paul,

Thanks, but the Issue is fixed, I tried running the display Template in MII SSCE, and from the source code I found this.

try{
   jQuery.sap.require("sap.viz.library");
   var SPCChart = new com.sap.xmii.chart.hchart.i5SPCChart("DisplayTemplate","QueryTemplate");
                                           SPCChart.draw("chart");
  
  
   }catch(err){
   sap.ui.core.BusyIndicator.hide();
   console.log("An error has occured: " + err.name + "-" + err.message);
   }

It is working now, I think there was some problem with the i5SPC Library.

Answers (1)

Answers (1)

saivellanki
Active Contributor
0 Kudos

Hi Ushinar,

var i5SPC = new com.sap.xmii.chart.hchart.i5SPCChart("DisplayTemplate", "QueryTemaplate");

Check your spelling QueryTemaplate --> QueryTemplate

I guess that was causing the issue.

Regards,
Sai Vellanki
Former Member
0 Kudos

Hi Sai,

No that is a typo error, we have to give there the query/display template path anyway, I have written it at the time of posting the question here