Skip to Content

Adobe Actionscript helper Libraries for SAP MII


I assume that you would have read my blog and seen the video which tells you how to Use xMII Services in Adobe Flex 2.0 (Video)

Since there is a lot of activity on using Adobe Flex as an alternative UI for SAP MII on SDN, I’ve created a helper class which will ease this process.


The helper class is located in the package and is called SAPMIIHTTPService.

You just need to set a couple of parameters and call the sendRequest() method to send the call to SAP MII. This class supports both the versions 11.5 and 12.0.

You need to set the following Parameters :

  • SAPMIIHost – The SAP MII system hostname or IP address
  • SAPMIIPort – The SAP MII system port (not required for 11.5)
  • MIIUserName – The SAP MII Username
  • MIIPassword – The SAP MII User Password
  • MIIVersion – Values“115” or “120”. If no values are provided, defaults to 12.0
  • DataSource – Path of the Query Template (eg: abesh/BatchTrend/PlasticBottleTrendQT) If you want to execute a Transaction, you would need to make a Xacute query out of it 🙂

After these variables are set you need to call sendRequest() to actually send the request to the SAP MII server. The class dispatches two events SAPMIIResultEvent.RESULT in case data is returned and SAPMIIFaultEvent.FAULTin case an error occurs. You need to add event handlers to listen tothe events mentioned above and handle them according to your need.

Example Code

var reqToMII:SAPMIIHTTPService = new SAPMIIHTTPService();
reqToMII.SAPMIIHost = "inld50045873a";
reqToMII.SAPMIIPort = 53000;
reqToMII.MIIUserName = "abesh";
reqToMII.MIIPassword = "dodo1234";
reqToMII.MIIVersion = "120";
reqToMII.DataSource = "abesh/BatchTrend/PlasticBottleBatchData_QT";
reqToMII.addEventListener(SAPMIIResultEvent.RESULT, dataArrived);


You can download the helper library and the sample actionscript project below :

You must be Logged on to comment or reply to a post.
  • Abesh:

    I have never used MII and probably I never will…But your Flex approach is just AWESOME! Keep on doing such a great job buddy! -:D



  • Hi, Abesh.  As a “for fun” project, I built a set of Flex/AIR UI components for displaying MII data (trend chart, smart grid, SPC chart), including time scrolling, selection, and other goodies.  Maybe someday I’ll “open source” them.
  • Hi i read your blog of displaying the data from query template in data grid in flex

    I am acessing query template and display the value in the data grid. I followed as per your video clip. But while i try to execute i am getting security error acessing url

    i am new to both this technology (xMII and flex). Can you please give me suggestion on this.

    I will be very happy if i am able to solve this. So i can proceed to next step