Quantcast
Channel: SAP Manufacturing Integration and Intelligence (SAP MII)
Viewing all 85 articles
Browse latest View live

Representation of Data in a Tabular and Chart format on SSCE 15.0

$
0
0

SSCE is an acronym of Self Service Composition Environment. SSCE is one of the feature of SAP MII 15.0. It has been given a name Self Service Composition Environment because it provides an environment to a developer where one can create their own dashboards with a very little efforts. This tool enables user to create dashboards by just drag and dropping MII objects.

 

This blog mainly focuses on how to represent data in a Tabular or Chart format by using SSCE features.

 

Firstly, in order to launch the SSCE follow the below steps :-

    1. Logon to MII portal.
    2. Expand Content Development.

     On expanding, some links will be displayed.

          3. Click the link Self Service Composition Environment as shown below.

 

                                             loginScreenOfSSCE.jpg

 

 

                                                            homescreen.jpg

 

On clicking the link, a homepage of SSCE will appear which will display list of all the previously developed dashboards. Now, in order to create our own dashboard follow the below images:-

 

    1. Click on the Create Dashboard icon as shown below.

                                                  createDashboardScreen.jpg

          2. On clicking Create dashboard icon a pop up will appear which will ask for which type of dashboards we want to use.

 

                                        selectStandardLayoutScreen(3).jpg

 

           3. After selecting one of the layout, click 'Finish'. Now our dashboard is ready to be used as shown below.

 

                                     DashboardScreen.jpg

 

Now, in order to represent your data in Tabular/Chart format follow the below steps :-

 

  1. Go to MII Content on the right hand side of the created dashboard screen as shown in fig(a).

                              SelectMIIContent.jpg          

                                                                                                          fig(a)

 

    

  1. Expand Query Templates and Select one of the Tag query whose data is to be represented as shown in fig(b).

                               SelectQueryTemplate.jpg

                                                                                                               fig(b)

 

  1. Finally drag and drop the selected query as shown in fig(c).

                                    Drag&Drop.jpg

                                                                                                               fig(c)

 

     4.  After dragging and dropping the query on the work area. We need to select the format whether to see the data in tabular                  format or in a form of chart. So, in order to have a particular format we need to configure it. For configuring, click on the                    Configure Visualization icon as shown in fig(d).

                                                        configureVisualizationScreen.jpg

                                                                                                                         fig(d)

 

 

     5.  On clicking a pop up will appear where we can configure all the desired requirements as shown in fig(e).

 

                                                                  configureVisualizationPopUPScreen.jpg

                                                                                                               fig(e)

 

      6.  After configuring all the required fields, click on Apply. Now, In order to see the desired result, go to preview link written on           the top as shown in fig(f).

                                                             GoToPreview.jpg

                                                                                                             fig(f)

 

      7.  In the Preview Screen, the data will be represented in the form of table as shown in fig(g).

                                    ResultInTabularForm.jpg

                                                                                                                    fig(g)

 

       8.  Now, In order to represent data in the form of chart then go to Design tab on the top and again follow the sequence from           step-4 and select "Chart" instead of "Table" in the Select Type field of Configure visualization pop-up screen. From the Select           Chart field, we can select any type of chart which will be best suited to our requirements. In fig(h), data is represented in the           form of "Stacked Bar" chart.

                                    ResultInChartFormat.jpg

                                                                                                                    fig(h)

 

 

Below is one more example which is comparing the performance of two machines.


                                        ComparePerformance.jpg


Cloud Connector Configurations for SAP MII

$
0
0

Cloud Connector Introduction:

The cloud connector serves as the link between on-demand applications in SAP HANA Cloud Platform and existing on-premise systems.

The cloud connector runs as on-premise agent in a secured network and acts as a reverse invoke proxy between the on-premise network and SAP HANA Cloud Platform. Due to its reverse invoke support, you don't need to configure the on-premise firewall to allow external access from the cloud to internal systems. The cloud connector provides fine-grained control over:

  • On-premise systems and resources that shall be accessible by cloud applications;
  • Cloud applications that shall make use of the cloud connector.


In This blog showing Configuration settings of cloud connector while connecting with SAP MII.

 

  • Extract zip file and run go.btach file.

 

  • Launch cloud connector by entering https ://< hostname>:8443 in browser where <hostname> is the host name of the machine on which you have  installed the cloud connector.

 

  • If you access the cloud connector locally from the same machine, you can just enter localhost where 8443 is an open port.

 

  • Log in to the Cloud Connector:

While logging first time provide username as “Administrator”

Password as “manage”.

Note: Both UserName and Password are case sensitive.

  • You will find two installation types,
    1. Master Installation
    2. Shadow Installation

           Use Master Installation, if you are installing a single cloud instance.

  • Change your Password from default.
  • Establish connectivity between Cloud Connector and Cloud Platform

          Provide  Account Name and Account user details of SAP HANA Cloud platform.

InitialScreen.png

 

  • The Connector State shows as below with respective cloud account:

Connector State.png

  • Configuring Access control (HTTP)

          Select back - end type as SAP Application Server Java,Click "Next" and select Protocol as "HTTP"

AccessControl.png

  •     Provide IP address and Port number of server on which  SAP MII is running.SystemMapping2.png
  • Provide Virtual host and Port  as URL Property of the HTTP destination configuration in SAP HANA Cloud Platform.
  • As Virtual host name we can give any dummy name which does not need to exist for example in above image given as “test”.
  • The Virtual Portallows you to distinguish between different entry points of your back-end system, for example, HTTP/80and HTTPS/443, and have different    sets of access control settings for them.

SystemMapping3.png

     Click Next

SystemMapping4.png

Now the Status shows as “There are no accessible resources”

 

  • Limiting the Accessible Services for HTTP

addResource.png

 

After adding resources Host status changes to “Green”.

ResourceStatus.png

  • Additionally we can check connectivity status of connector with Cloud by logging in Cloud platform.
  • Login to Cloud platform.
  • Go to Connectivity Tab, Select Cloud Connectors and check the details of Configured Cloud connector and Exposed back end.

Note: While Configuring Destinations in cloud platform, provide Virtual host name and Port number in URL.

Check the connectivity status by clicking on “Test Connection”

Manufacturing Suite 15.1 FP02 Workshop

$
0
0

SAP Manufacturing Integration and Intelligence (SAP MII) enables you to integrate your plant and enterprise systems and display integrated data to your employees. You can use MII to view, measure, and compare the performance of plants and assets with different automation system infrastructures. SAP MII reduces the cost of synchronizing plant and enterprise business processes.

 

SAP Plant Connectivity (SAP PCo) is a framework and set of services and management tools that allow the creation of connectors that provide the communication paths between control systems, control devices, files, historians, TCP Sockets, and SAP Manufacturing (SAP ME, SAP MII, SAP OEE, etc.)

 

 

SAP Manufacturing Execution (SAP ME) is a powerful, enterprise-level, scalable, manufacturing business solution that enables global manufacturers to manage and control manufacturing and shop floor operations. It provides a multi-faceted set of features that integrates business systems to the shop floor, allowing for complete component and material-level visibility for single and global installations.

 

SAP Overall Equipment Effectiveness Management (SAP OEE Management) allows you to measure and analyze plant performance both in real-time and historically. It utilizes common sources of manufacturing data to obtain metrics that enable you to measure availability and performance of equipment and the quality of goods produced by that equipment.

 

 

Planned release for the SAP Manufacturing Suite Feature Pack 2 in Nov 2016 & there is event to have new features for the SAP Manufacturing Suite (SAP ME, MII, MII-OEE, PCO) discussed in a workshop for customer and partner at these below location & dates.

  1. 1. SAP Office, Walldorf, Germany:  19th and 20th Sep 2016 from 8:30 AM to 5:30 PM
  2. 2. SAP Office, Newtown Square, USA:  26th and 27th Sep 2016 from 8:30 AM to 5:30 PM
  3. 3. SAP Labs Office, Bangalore, India:  4th Oct from 8:30 AM to 6:00 PM

 

Participation to this workshop requires a valid signed FBA and invite.

 

To request for the participation /invite you can comment on this blog.



Building a CRUD Application using XML Model

$
0
0

Hello All,

 

Many times I personally / my colleagues have encountered this scenario, where a XML Model need to be used throughout the application and not sure how to use it. To avoid this, most of us try to convert the data into JSON, since it is bit easy compared to XML.

However in this blog, I try to explain how we can use XML Models in UI5 which is more required for SAP MII related services where the data response is in XML format.

 

Models:

 

A model in the MVC paradigm holds the data and provide methods like Create, Read, Update and Delete.

 

We have totally four types of models in SAPUI5:

     - JSON Model

     - XML Model

     - OData Model

     - Resource Model

 

For more information, please check this link: Models - UI Development

 

JSON and XML models are client-side models and OData model is a server side model. We have lots of examples with JSON and OData model. But, I didn't found much for XML model which serves the purpose.

 

SAP MII provides most of the data response in standard XML format.

We have a Runner service which provides the output in XML format. To avoid XML, generally most of us wrap the transaction into a query object to fetch the response in JSON.

 

I would suggest that, instead of creating a new Query object, let us make use of XML structure itself.

Let us go through different operations like Create / Read / Update / Delete and Save using XML model.

 

Read:


I have following XML Data:

<Rowsets CachedTime="" DateCreated="2016-07-03T04:08:56" EndDate="2016-07-03T04:08:56" StartDate="2016-07-03T03:08:56">    <Rowset>        <Columns>            <Column Description="ProductId" MaxRange="1" MinRange="0" Name="ProductId" SourceColumn="ProductId" />            <Column Description="Name" MaxRange="1" MinRange="0" Name="Name" SourceColumn="Name" />            <Column Description="Category" MaxRange="1" MinRange="0" Name="Category" SourceColumn="Category" />            <Column Description="SupplierName" MaxRange="1" MinRange="0" Name="SupplierName" SourceColumn="SupplierName" />            <Column Description="WeightMeasure" MaxRange="1" MinRange="0" Name="WeightMeasure" SourceColumn="WeightMeasure" />        </Columns>        <Row>            <ProductId>1239102</ProductId>            <Name>Power Projector</Name>            <Category>Projector</Category>            <SupplierName>Titanium</SupplierName>            <WeightMeasure>1467</WeightMeasure>        </Row>        <Row>            <ProductId>2212-121-828</ProductId>            <Name>Gladiator MX</Name>            <Category>Graphics Card</Category>            <SupplierName>Technocom</SupplierName>            <WeightMeasure>321</WeightMeasure>        </Row>        <Row>            <ProductId>K47322.1</ProductId>            <Name>Hurricane GX</Name>            <Category>Graphics Card</Category>            <SupplierName>Red Point Stores</SupplierName>            <WeightMeasure>588</WeightMeasure>        </Row>        <Row>            <ProductId>22134T</ProductId>            <Name>Webcam</Name>            <Category>Accessory</Category>            <SupplierName>Technocom</SupplierName>            <WeightMeasure>700</WeightMeasure>        </Row>    </Rowset></Rowsets>

Now, I need to bind above XML data to the table.

In controller onInit, it would be:

        onInit: function(oEvent) {          var oModel = new XMLModel();          oModel.loadData("data.xml");          oModel.attachRequestCompleted(function(oEvent) {            sap.ui.getCore().setModel(oEvent.getSource());          });        }

Since, I am loading the file locally I have to use the above code. But in your case, there would be an AJAX call to Query Template / Transaction etc, and then in the success condition you can set the data to model.

 

Now table XML code would be:

<Table id="idProductsTable"          mode="SingleSelectMaster"          selectionChange="onSelectionChange"          items="{/Rowset/0/Row}"          class="TableStyle">    <headerToolbar>        <Toolbar>            <ToolbarSpacer />            <Button text="Insert Item" type="Emphasized" press="onInsert" />            <Button text="Edit Item" type="Emphasized" press="onEdit" />            <Button text="Save Item" type="Emphasized" press="onSave" />            <Button text="Delete Item" type="Reject" press="onDelete" />        </Toolbar>    </headerToolbar>    <columns>        <Column>            <Label text="ID" />        </Column>        <Column>            <Label text="Product" />        </Column>        <Column>            <Label text="Category" />        </Column>        <Column>            <Label text="WeightMeasure" />        </Column>    </columns>    <items>        <ColumnListItem>            <cells>                <Input value="{ProductId}" editable="false" class="InputStyle" />                <Input value="{Name}" editable="false" class="InputStyle" />                <Input value="{Category}" editable="false" class="InputStyle" />                <Input value="{WeightMeasure}" editable="false" class="InputStyle" />            </cells>        </ColumnListItem>    </items></Table>

If you see the table items binding path, it is bound to: "{/Rowset/0/Row}", if you're not sure about the same, you can debug to make it clear:

2016-08-09_19-27-36.jpg


Once data is bound to table, the same would be displayed in 'items' aggregation of table.


Create:


Since the Item template is already created, we just need to push an empty 'Row' node with sub nodes to XML structure. In result it creates a new Column List Item in table.


        onInsert: function(oEvent) {          //Create          var oModel = sap.ui.getCore().getModel();          var oModelData = oModel.getData();          var oRow = $(oModelData).find('Row')[0];          var oNewChildNode = oModelData.createElement("Row");          var oNodes = oRow.children;          for (var i = 0; i < oNodes.length; i++) {            var oNodeName = oNodes[i].nodeName;            var xmlNode = oModelData.createElement(oNodeName);            xmlNode.appendChild(document.createTextNode(""));            oNewChildNode.appendChild(xmlNode);          }          var oRowset = $(oModelData).find('Rowset')[0];          oRowset.appendChild(oNewChildNode);          oModel.setData(oModelData);          var oTable = oEvent.getSource().getParent().getParent();          jQuery.sap.delayedCall(100, null, function() {            var oLength = $(oModelData).find('Row').length;            var oItem = oTable.getItems()[oLength - 1];            var oCells = oItem.getCells();            for (var j = 0; j < oCells.length; j++) {              oCells[j].setEditable(true);            }          });        }

Update:

 

We just need to make the item fields 'editable' property to true and once the save item button is pressed the fields will be non-editable and data will be saved in XML Model.

 

        onEdit: function(oEvent) {          //Update          var oTable = oEvent.getSource().getParent().getParent();          var oSelectedItem = oTable.getSelectedItem();            var oCells = oSelectedItem.getCells();            for (var j = 0; j < oCells.length; j++) {              oCells[j].setEditable(true);            }        }

Delete:

 

Delete the selected Item data from table and remove the selected Row node from XML Model.

 

        onDelete: function(oEvent) {          //Delete          var oTable = oEvent.getSource().getParent().getParent();          var oSelectedItem = oTable.getSelectedItem();          if (oSelectedItem === null) {            MessageBox.alert("Please select an Item to Delete", {              icon: sap.m.MessageBox.Icon.ERROR,              title: "Error"            });          } else {            var that = this;            MessageBox.confirm("Are you sure you want to delete selected item?", {              icon: sap.m.MessageBox.Icon.WARNING,              title: "Delete",              actions: [sap.m.MessageBox.Action.YES, sap.m.MessageBox.Action.NO],              onClose: function(oEvent) {                that.fnCallbackConfirm(oEvent, oTable, oSelectedItem);              }            });          }        },        fnCallbackConfirm: function(oEvent, oTable, oItem) {          if (oEvent == "YES") {            var oIndex = oTable.indexOfItem(oItem);            var oModel = sap.ui.getCore().getModel();            var oModelData = oModel.getData();            var oRow = $(oModelData).find('Row')[oIndex];            var oRowset = $(oModelData).find('Rowset')[0];            oRowset.removeChild(oRow);            oModel.setData(oModelData);            oTable.removeSelections(true);          } else {            oTable.removeSelections(true);            return false;          }        }

Save:

 

Once we have the new data in XML file / model, here we need to make an AJAX call to query template where we can pass this parameter as XML type to SQL Stored Procedure and loop through XML file to update / insert the records to SQL tables.

 

Full Demo: Since there is no connection with MII, I just made a sample using Plunker CRUD Application - XML Model


Working Snippet:

Capture.gif


Regards,

Sai.

Connecting SAP HANA Views to Sensor Data from Osisoft PI using SAP MII

Viewing all 85 articles
Browse latest View live