Skip to Content

Using Applet in View/Controller in SAP MII 15.1


I have a task to upgrade SAP MII 12.1 to SAP MII 15.1. And I got problem with applet + View/Controller need your help.

In old app, I have an applet in .irpt file:

<applet WIDTH="705" NAME="mySPCChart" MAYSCRIPT="true" HEIGHT="250" CODEBASE="/XMII/Classes" CODE="iSPCChart" ARCHIVE="">
    <PARAM NAME="QueryTemplate" VALUE="Operator/RecordsByMatNumForSPCQuery"/>
    <PARAM NAME="DisplayTemplate" VALUE="Operator/RecordsByMatNumSPCChart"/>
    <PARAM NAME="CreationEvent" VALUE="CreateSpcApplet"/>
    <PARAM NAME="UpperChartSelectionEvent" VALUE="getSelectedApplet"/>

function CreateSpcApplet() {
function getSelectedApplet() {

In new app, I'm using SAPUI5 with View and Controller to handle the page. I don't know how to show the applet and how to handle the CreationEvent and UpperChartSelectionEvent in my controller.

I tried to use JSView to show the applet. But I don't know where to implement/write function CreateSpcApplet/CreationEvent and getSelectedApplet/UpperChartSelectionEvent

sap.ui.jsview("OperatorUI.InspLotCharInputFormItem", { 
  getControllerName : function() {
    return "OperatorUI.InspLotCharInputFormItem";
  createContent : function(oController) {  
    var chartHTML = new sap.ui.core.HTML({
      content: '<applet name="mySPCChart" codebase="/XMII/Classes" code="iSPCChart" archive="" width="705px" height="250px" mayscript="true">' +
      '<param name="QueryTemplate" value="Operator/RecordsByMatNumForSPCQuery"/>' +
      '<PARAM NAME="DisplayTemplate" VALUE="Operator/RecordsByMatNumSPCChart"/>' +
      '<PARAM NAME="CreationEvent" VALUE="CreateSpcApplet"/>' +
      '<PARAM NAME="UpperChartSelectionEvent" VALUE="getSelectedApplet"/>' +
    return new sap.m.Page({
      title: "{/Name}",
      content: [

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    May 10, 2018 at 03:05 PM

    You might have some success switching to an i5spcchart, so you would have something like this : (I've left in some setting variables just so you can see how it's done, the help screens can be a bit unclear)

    onInit: function() {
    var i5SPC = new"myproject/my_display_template", "myproject/myQry");
    var qry = i5SPC.getQueryObject();
    var chart = i5SPC.getChartObject();
    qry.setParameter("Param.1", "whatever");
    myFunction: function(oEvent) {
    // do something

    and in your view file simply (I am using XML View, I'm not sure what the JS equivalent is)

    <core:View xmlns:core="sap.ui.core" xmlns="sap.m" controllerName="myProject.controllerFile">
    <Panel id="chartPanel" />

    Hope this helps


    Add comment
    10|10000 characters needed characters exceeded

    • At first glance it looks like something odd between the Title and the groupSize?

      Looks like the Highlighted Attribute Name & Value have been dropped from the UI5SPCChart, they are not in the template design. Have you seen the data dictionary? http://server:port/XMII/JSDOC/ChartComponent.html

      My guess for the IllumLoginName & Password would be to try adding them like this

      qry.setParam("IllumLoginName", "")

  • May 10, 2018 at 02:13 PM

    I don't recommend using the applets. I don't think they are being supported going forward and most browsers are moving away from the java plugin anyway. Use the i5 charts instead.


    Add comment
    10|10000 characters needed characters exceeded