The customer extension feature in the SAP OEE MII add-on allows a customer to define custom implementation or logic that must be executed before or after a standard SAP OEE event.
SAP OEE How-To-Guide - Create an MII Extension and Plug Into a Dashboard Event
SAP OEE How-To-Guide - Create MII Transactions to be Called From PCo
Data collection to SAP Overall Equipment Effectiveness (OEE) happens in two ways – manual and automatic. Manual data collection is through the SAP OEE user interface. Automatic data collection is through Plant Connectivity (PCo). Here PCo sends messages to OEE to report production, report rejection and so on. SAP OEE does not deliver the SAP Manufacturing Integration and Intelligence (MII) transactions that can be called from PCo. It delivers custom actions that can be used in SAP MII transactions, which in turn can be called from PCo.
SAP OEE How-To-Guide - Define Production Activities and Use Them on OEE Dashboard
The customer extension feature in the SAP OEE MII add-on allows a customer to define custom implementation or logic that must be executed before or after a standard SAP OEE event.
SAP xMII Getting Started Guide
This document will demonstrate how to build HTML pages and/or Web queries to use the connectors directly, however, most of the topics are relevant to the techniques by which the Graphic User Interface (GUI) applets included with SAP xMII interact with the various connectors. All of the properties/parameters exposed by the connectors and builders are identical to those utilized when configuring the user interface applets.
SAP MII and SAP PI in the Industrial Space
I am very often asked by our customers how best to align and leverage the use of SAP PI and MII in a landscape to deliver the best possible solution to the business. From here the response is typically, what are you trying to achieve but in the below I am going to attempt to outline the two products in terms that will hopefully apply to you (Critical feedback is appreciated as this will only make this post better for everyone). While from a very high-level the two products appear to support the same or similar integration scenarios they in fact are designed with specific use-cases in mind.
SAP PI and MII
Simple Statements on position and product focus
SAP PI is...
- an A2A and B2B connector framework to integrate various kinds of enterprise systems and applications
- a Business process engine to support state-full, long running business processes (Process Orchestration)
- an integration tool that does not support a manufacturing end-user focused UI engine to integrate manufacturing people with processes
- the SAP solution for enterprise application integration
- capable of working with SAP MII in a decentralized and asynchronous/synchronous Manufacturing environment for QoS Messaging (EO & EOIO)
- from an architectural point of view, a separate system, whose functionality are deployed in a complementary way, meaning:
- SAP PI as central instance in data processing service center
- SAP MII as separate deployment instance, often at the manufacturing site, with PI client capabilities, including local queues to withstand network and system outages and bandwidth constraints
Positioning of the two products in your landscape
When positioning MII & PI in your integration landscape there are a couple of points to take into consideration:
- SAP MII focuses on the integration of disparate manufacturing systems to provide a common interface for both users and technical systems, agnostic of the underlying systems and their technical nuances
- SAP Process Integrator focuses on the integration of enterprise level business systems and provides robust business to business interfaces
- SAP ERP can pass messages to PI which can providing routing and QoS messaging capabilities to multiple remote MII instances simultaneously
- This is done asynchronously using an HTTP Endpoint in PI and the MII Messaging Services
- SAP MII can generically handle XML messages from PI and process them upon arrival or queue them for batch processing
- SAP PI supports global data needs and MII supports local data needs. “Let the enterprise worry about enterprise issues and plants worry about plant issues”
- SAP MII has special functionality for communicating with PI to leverage its Message QoS and Routing capabilities for the delivery of messages to Enterprise systems
- Supports limited survivability scenarios where local data collection is required
- SAP MII enables limited survivability when plants are disconnected from the enterprise
Top Technical Features of PI & MII
What do you get from SAP PI?
- EAI Platform
- Enterprise Messaging
- Centralized configuration, tracing, monitoring, and maintenance of messages across sites and between systems
- Guaranteed Delivery and Store Forward
- Enterprise Service Repository
- State-full Workflow for Process Orchestration
- BPM Tools
- Business Activity Monitoring (BAM) functionality
- Asynchronous Communication
What do you get from SAP MII?
- Composition Environment, including GUI tools specifically designed for plant use cases, to develop applications for manufacturing
- Store Forward when connection down
- Manufacturing Systems Connectivity
- EAI/EOM enabler for the plant
- Enterprise message client for PI
- Supports using PI queues for Quality of Service (QoS supports both EO & EOIO)
- Easy to use tools to take data from plant systems and populate message templates for message consumption by enterprise applications
- Largely synchronous communication
- Rich analytic capabilities
- Lean and graphical service-enabled composition environment (Codeless)
- Service enablement of the shop floor
- Simple data aggregation and transformation tools
When should you use SAP PI?
- You wish to use Process Integration as the SOA backbone in your Enterprise
- To Establish ES Repository as the central SOA repository in customer landscapes
- To Leverage support of additional WS standards such as UDDI, WS-BPEL and tasks, WS-RM across the enterprise landscape
- Enable high-volume and mission-critical integration scenarios between business applications
- Benefit from new functionality, such as principal propagation, XML validation, and BAM capabilities
When should you use SAP MII?
- You have a heterogeneous set of plant data stores that you want to organize and analyze
- You want to get consistent manufacturing operations reporting across sites
- You need to drill down into plant data stores and across different data stores for manufacturing intelligence applications
- You wish to connect proprietary plant applications to ERP data and work processes – through standard and native out of the box connectors and tools
- You need to enable plant personnel to be able to perform reporting (Standard, Mobile, and Ad-Hoc) along with basic execution
PROs and CONs of ERP Integration with and without PI and MII
This section will outline the various scenarios of including and excluding PI and MII from various scenarios in the manufacturing/industrial space.
Messages flow between ERP, PI, and then to multiple Plant systems (Without MII)
- Message routing and transformation is defined per site in PI (Plants are similar but each has nuance differences that need to be accounted for)
- Very often this can limit plant autonomy in what they can change
- Message processing can vary from each of the 3rd Party Solutions, no consistency
- Customized integration to 3rd Party Solutions are not supported by SAP
- 3rd Party Solution probably requires customization to handle messages, even ISA standard messages are customized to fit actual business requirements
- 3rd Party Solutions probably vary from site to site and requires customization support either in PI or in the 3rd Party Solution
- 3rd Party Solution probably does not support central governance and management of content
Messages flow between ERP, PI, and then to multiple Plant systems (With MII)
Asynchronous Messaging with SAP PI & MII (MII screens can still perform synchronous BAPI/RFC calls directly to SAP ERP when required)
- Messages flow between SAP ERP, SAP PI, and then to multiple SAP MII instances
- Message routing is defined in SAP PI and message processing rules are defined in SAP MII
- Some sites require different rules than others, conglomeration of plant systems
- SAP MII absolves the central systems from having to know about site variances with applications and technical systems
- Everything “appears” the same to the enterprise so communication is consistent and easy to maintain
- Disconnected plant operation for support of local data collection and central business rules
- Central governance and management of software and content
Messages flow between ERP, and then to multiple MII instances (without SAP PI)
Messages flow between ERP and directly to multiple MII instances
- Message routing is custom defined in ERP via destinations and partner profiles
- Without custom ERP routing definitions all messages are sent to every MII server
- Does not provide the same level of Monitoring and routing capabilities as PI; uses direct JRA communication between ERP and MII
- QoS of EO standard in 14.0 and EOIO built in Composite Applications (ie: ME-INT, CAMS-INT)
- Details are here: Message Services - SAP Manufacturing Integration and Intelligence - SAP Library
- MII absolves the ERP system from having to know about site variances or delivery to multiple site systems simultaneously
- Everything “appears” the same to the enterprise so communication is consistent
- Disconnected plant operation for support of local data collection and central business rules
Conclusion
Based on the above I hope that it is now clear how both PI and MII play together in a manufacturing/industrial landscape for supporting operations visibility and reporting at the local, regional, and central levels. This document (although a bit older now) may also help to shed some light on typical implementation architectures and additional points to consider:
SAP Manufacturing Implementation Architecture: The purpose of this document is to explain the standard implementation practices for Manufacturing Integration & Intelligence, Manufacturing Execution, and Plant Connectivity. The specific focus is around why and how to use the various products provided by SAP and the technical & business features of how they co-exist with each other in your landscape for maximum ROI.
Once again your candid feedback is appreciated.
Sam
SAP MII Integration with Business Information Warehouse - how-to-guide
Introduction
The lineage of ‘business processes’ and Enterprise Resource Planning (ERP), and the world of ‘manufacturing processes’ evolved out of the industrial revolution.As the Business and manufacturing process evolved with time, the business world created CRM, HCM, SCM, ERP, PLM, ROI, while the manufacturing world created PLC, HMI, MES, OPC, CMS, DCS.
The type, frequency, granularity and disparity of data are very different between these two worlds, and so there has been a gap between the two technologies.
In the business world, if we have an ERP suite then it is expected that all the modules within the landscape ‘talk’ with each other. However, in the manufacturing world, equipment is often sourced from various vendors, smaller manufacturers are acquired by larger ones and the systems used in one facility may be completely different from those in another. Retrofitting the entire control system in a producing factory is almost impossible so typically, applying one communication standard across an entire manufacturing landscape is a tedious task.
Today however, we have so much information from our various levels of process that how to filter, sort, contextualise and deliver the right information to the right people, is becoming a modern art form of the information age. By combining SAP MII (Manufacturing Integration & Intelligence) with SAP BI (Business Intelligence) it is now possible to deliver “One version of the truth” from the Shop Floor to the Top Floor on the one SAP platform. The outcome of this is to allow businesses to make better decisions.
SAP Manufacturing Integration and Intelligence
SAP MII is a service-based composition environment for rapid development of composite applications for manufacturing. This composite application helps manufacturers become more adaptive by connecting the SAP ERP solution to the plant floor in real time and delivering actionable intelligence to production personnel. It provides both manufacturing intelligence and integration – extending the functionality of the SAP NetWeaver platform onto the real-time plant floor to significantly lower the total cost of ownership on manufacturing systems infrastructure. SAP MII provides a direct connection between shop floor systems and business operations. All data affecting manufacturing is visible in near-real-time, including information about orders, materials, equipment status, costs, and product quality. It enables users to become adaptive manufacturers, profitably replenishing the supply network while dynamically responding to change.
SAP MII is a Web-server-based application with a zero-client design; hence, no application software needs to be installed on the client machine. Clients should use their Web browser with the appropriate version of the Java Runtime Environment (JRE). SAP MII can deliver content to non-Java browsers if the content is prepared properly. This is the typical approach for mobile or handheld device support. Presentation of real-time plant information to Pocket PC wireless devices, Internet phones, and rugged-ized plant handheld devices and scanner drives efficiencies through a mobile workforce. Data consumption and data entry are supported by SAP MII.
SAP BusinessObjects Business Intelligence
SAP BusinessObjects business intelligence (BI) solutions simplify data manipulation, allowing users to access, navigate, analyze, format, and share information across a corporate environment. The reporting, analysis, and interpretation of business data is of central importance to a company in guaranteeing its competitive edge, optimizing processes, and enabling it to react quickly and in line with the market. With Business Intelligence (BI), SAP NetWeaver provides data warehousing functionality, a business intelligence platform, and a suite of business intelligence tools with which an enterprise can attain these goals. Relevant business information from productive SAP applications and all external data sources can be integrated, transformed, and consolidated in BI with the toolset provided. BI provides flexible reporting, analysis, and planning tools to support you in evaluating and interpreting data, as well as facilitating its distribution. Businesses are able to make well-founded decisions and determine target-orientated activities on the basis of this analysis.
Integration of MII and BI in SAP Landscape
The diagram describes the position of MII and BI in the SAP Landscape. Where MII can be seamlessly integrated to Plant floor systems for getting the real time production data via IDOCs, Web Services and other integration techniques. BI in turn has access to Business Warehouse and Enterprise Data. The data coming from Enterprise via BI and shop floor systems via MII can be integrated in MII for building Reporting Dashboards.
Figure 1 - System Landscape of MII and BI
MII and BI – A winning combination
What does Business Intelligence add to the world of Manufacturing
Longer Term Trending;
- MII focuses on providing a real time version of events on the shop floor. By its nature, this means that the data is generally not stored. For longer term trend analysis this can create performance issues because of the volume of data required
- SAP BI is designed for the extraction and storage of high volume data. If the requirement is to analyse longer term trends then SAP BI is the appropriate technology to use
Improved Visualisation Tools
- The new suite of SAP Business Objects tools can now be used to enhance the data visualization capabilities of SAP MII
- This can be done either through running BObj tools on top of SAP BW queries or directly on top of SAP MII for real time data analysis
And what does SAP MII add to the world of Business Intelligence
Specialised Connectors to the shop floor level
- SAP BW has native connectors to SAP systems however the shop floor layer presents special challenges in extracting data due to their specialised data models
- SAP MII overcomes these through its extractor technology designed specifically for the major shop floor systems and historians, and it complies with ISA 95 (“International standard for the integration of enterprise and control systems”)
Specialised graphical representations
- Statistical Process Control and Statistical Quality Control Charts are a feature of SAP MII and represent a manufacturing specific capability which is not easily replicated in SAP BW
Plant Level Metrics
- The Manufacturing Director is focused on optimizing Business Metrics such as asset utilization, material cost and on time supplier performance
- SAP MII can add valuable data at the plant metric level such as machine availability, yields and cycle times which may not be available in SAP BW
The following table highlights the current positioning of SAP MII and SAP BI to deliver reporting and how their combined strengths deliver Enterprise Manufacturing Intelligence from the Shop Floor to the Top Floor:
Functionality or | SAP MII | SAP BI | Combined |
Responsibility | Plant | Manufacturing | Enterprise |
Reporting | Shop | Cross | Shop |
Time | Real | Days/Weeks/Months | All |
Performance | Manufacturing | Enterprise | Enterprise |
Manufacturing | Plant | Business Metrics | Operational |
Planning | Plant | Enterprise Wide Planning | Enterprise |
User | Web | BOBJ, | Best in |
SAP Environment | SAP NW | SAP NW | SAP NW |
Data | Real | Stored | Fit for |
Data | MII is | Data | Access |
Step-by-Step Connection guide
Business Intelligence (BI) from SAP includes the SAP NetWeaver Business Warehouse cube where enterprise data is often stored. SAP MII can read data from the cube using its OLAP Connector, which uses XML for analysis (XMLA) protocols (other third-party cubes support XMLA). Writing data from SAP MII to BI can occur through JCO call. Users can take data sets, reduce and compress results, and deliver them to BI for applications like a certificate of conformance or other quality record from the shop floor to top floor. Assuming the versions of MII and BI as 11.5 and BI AddOn 7.X respectively.
OLAP Connector
Step 1: Remote Enable BEx query
Make the BEx Cube remote enabled by checking the check box “By OLE DB for OLAP” under “Release for External Access”
Step 2: Setup a New ‘SAPBWOLAP’ Connection in MII
In MII, create a new SAPBWOLAP connection by copying the existing one.
Name the new connection and enter the details as required.
Catalog – Name of the cube
Port – HTTP port can be determined by logging on to the SAP GUI of the server. Go to T-code SICF, Go to à Port Information. Note the HTTP port here.
After the details are entered, save the connection. The summary for the connection will look like
Also note that this connection will not show up in the Status window as it is not a persistent connection to BI but rather an on demand connection.
Step 3: Test a MDX query in SAP GUI
Open T-code MDXTEST. You can view the cube 0PP_C03, and the variables under the cube. Suppose we run a query to fetch all the materials in the cube, write a simple select query and drag and drop the material column and cube name.
Execute to test the query and directed.
This displays the result in a new window.
Step 4: Building a Query in MII
Create a Query Template of type OLAP Query. Select the OLAP Server created above and mode as Query.
Select the Cube name mentioned above, and write a simple OLAP query by dragging and dropping the columns required.
Execute the query to compare the results with the one from MDXTEST.
JCO Connection
Step 1: SetUp JCO Connection
Create a new JCO connection under the SAP Server Configuration and enter the IP address, client, user name and password.
Step 2: Create a Business Logic Service
Open the Business Logic Services and add an action block SAPJCOInterface and select the server details just created.
Also search for a BAPI to check the connection.
Create the request-response XML structure and go to Configure Links and assign the Airline as below. Close editor and save the transaction.
Step 3: Add a tracer to read the response and execute the transaction
Result will give you the list of flights with airline LH-Lufthansa.
Troubleshooting
The OLAP and JCo connection have a set of prerequisites without which the connection and fetching data can not be possible. These prerequisites are also a key to troubleshoot the issues being faced during establishing the connection from the beginning and creating the queries in MII Query Templates.
JCo Connection
Make sure that port number 3300 is opened between MII and BI server. Not doing so will give you an error when you add a JCo connection block.
OLAP Connection
- Open port: The http port number is opened between MII and BI server. The XMLA web services will be made available only through the http port
- Activate XMLA: The XMLA web services need to be enabled to go ahead. To check whether they are active or not, login tohttp://<hostname>:<port>/sap/bw/xml/soap/xmla using the credentials.
MDX Query test
Before writing the OLAP queries in MII, the we can also test them in BI. The t-code MDXTEST helps us test the MDX queries in BI. An executable mdxsrv.exe for the MDX parser needs to be executed on the server in order to make it working. If not done, we get the following error on executing the queries “Error occurred when starting the parser: timeout during allocate / CPIC-CALL: 'ThSAPCMRCV'”
Upcoming trends to combine MII and BI:
Over the years, SAP MII has released techniques for collating the best features of MII and BI together with every new version.
In SAP MII 14.0, the following business objects tools are introduced for querying, reporting and analysis, and visualization:
SAP Business Objects Crystal Report : A tool to create easy, simple, and specialized reports, and visualize the data pictorially using colorful and sophisticated charts. The crystal report charts are comprehensive than MII grid applets. We can also filter or sort the records based on required parameters. These reports can be integrated into MII, JSP, and IRPT pages. Optionally, we can host these reports on SAP Business Objects Crystal Reports Server.
SAP Business Objects Dashboards (formerly Xcelsius) : A tool to create customized and interactive using MII query templates. On creating dashboards, the XLF files are imported to MII and integrated to existing MII, JSP, and IRPT pages.
Contacts
Gita Chhatri is Consultant with Deloitte Consulting India Pvt. Ltd. and based in Mumbai office. She has 7 years of experience in SAP Implementation, Support, Enhancement and Upgrade projects in Web Dynpro Java, PI and SAP Manufacturing solution Technologies like MII, ME and PCo. Her SAP Functional experience includes knowledge in Business processes in areas of Production Planning for discrete and process industries and Materials Management. She is aligned to the C&IP industry. Gita can be reached at gchhatri@deloitte.com.
References:
- http://www.theodorou.gr/material/pdf/sap_mii_architecture.pdf
- http://fm.sap.com/data/UPLOAD/files/SAP%20MII%20Positioning%20091709.pdf
- http://www-07.ibm.com/sg/events/techexpo/pdf/Thao_SAP_xApp_Manufacturing_Integration_and_Intelligence.pdf
- http://www.faeriefeather.com/files/seeit_2pg.pdf
- http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/458ba574-0a01-0010-2aab-d1ee76ee9820?QuickLink=index&overridelayout=true&5003637328809
- http://help.sap.com/saphelp_xmii115/helpdata/en/Connectors/OLAPConnector.htm
- https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCkQFjAA&url=http%3A%2F%2Fdownload.microsoft.com%2Fdownload%2F0%2FF%2FB%2F0FBFAA46-2BFD-478F-8E56-7BF3C672DF9D%2FMultidimensional%2520Expressions%2520-%2520MDX%2520-%2520Reference.pdf&ei=zk4kUrGJIvSvsATf6oHADQ&usg=AFQjCNEk3kHhqWC4zfeoLUNPrLg-uZvxzg&sig2=fZ90XJ5O0DPThD3sw2lFjg
- http://www.plaut.com.au/images/stories/content/PLAUT_Capability_briefs/MII_BI_-_A_winning_combination.pdf
- https://websmp101.sap-ag.de/~sapidb/011000358700001254832012E
- http://www.dell.com/downloads/global/solutions/perot/Consulting_SAP_MII.pdf
New MII PCoQuery Fixed Query Mode
This article describes the new MII PCoQuery Template Fixed Query Mode and provides some examples of its use.
How to set up Custom KPI in SAP OEE Management
This document covers the aspect of creating a custom KPI andon and integrating to the SAP OEE Dashboard.
SAP OEE How-To-Guide - Custom Development for Multiple ERP and MII Systems
This document explains how HANA modeling should be done in case of multiple ERP and MII systems are connected to single HANA system.
SAP xMII Getting Started Guide
This document will demonstrate how to build HTML pages and/or Web queries to use the connectors directly, however, most of the topics are relevant to the techniques by which the Graphic User Interface (GUI) applets included with SAP xMII interact with the various connectors. All of the properties/parameters exposed by the connectors and builders are identical to those utilized when configuring the user interface applets.
MII 15.0 - Self Service Composition Environment - Integration of Resources/Files
The document is a 'How-to' guide for working with the Self Service Composition Environment - Integration of Resource/Files available in MII 15.0. It explains in detail, the steps to configure and preview the dashboard in MII 15.0 product release.
MII 15.0 - Self Service Composition Environment - Overview
The document is a 'How-to' guide for working with the Self Service Composition Environment - Overview. It explains in detail, the steps to configure and preview the dashboard in MII 15.0 product release.
MII 15.0 - Self Service Composition Environment - Integration of PIC
The document is a 'How-to' guide for working with the Self Service Composition Environment - Integration of PIC available in MII 15.0. It explains in detail, the steps to configure and preview the dashboard in MII 15.0 product release.
MII 15.0 - Self Service Composition Environment - Integration of Query Templates
The document is a 'How-to' guide for working with the Self Service Composition Environment - Integration of Query Templates available in MII 15.0. It explains in detail, the steps to configure and preview the dashboard in MII 15.0 product release.
MII 15.0 - Self Service Composition Environment - Integration of Display Templates
The document is a 'How-to' guide for working with the Self Service Composition Environment - Integration of Display Templates available in MII 15.0. It explains in detail, the steps to configure and preview the dashboard in MII 15.0 product release.
MII 15.0 - Self Service Composition Environment - Integration of UI Elements
The document is a 'How-to' guide for working with the Self Service Composition Environment - Integration of UI Elements available in MII 15.0. It explains in detail, the steps to configure and preview the dashboard in MII 15.0 product release.
MII 15.0 - Self Service Composition Environment - Integration of MDO/KPI
The document is a 'How-to' guide for working with the Self Service Composition Environment - Integration of MDO/KPI available in MII 15.0. It explains in detail, the steps to configure and preview the dashboard in MII 15.0 product release.
SAP MII & ESP Integration Guide (Technical)
Overview
I am often asked how the SAP Event Stream Processing (ESP) engine and the SAP Manufacturing Integration & Intelligence (MII) applications can be used together to provide value for various customers and different use-cases that they have. I will write a BLOG about this topic but wanted to first showcase how the integration between the products can be achieved to ensure maximum value and coverage of multiple most use-cases. As you probably know there are many deployment options for both the SAP MII and ESP products and more recently the deployment on a central HANA database is now an option for both of these products. Each product has something that it's really good at and the below integration highlights the strengths and weaknesses of the products and shows how they complement each other in a joint landscape.
What SAP Event Stream Processor (ESP)
In short ESP is really good at inline data analytics so as the data arrives to the stream it's waveform (sliding window typically) is instantly correlated with other various waveforms to identify patterns in the data. It can also stream this data, in tremendously large volumes, to HANA database tables for longer-term predictive and operational analytics. It has it's origins in the financial sector for high-frequency trading and trading analytics but we believe that there is value in this engine for driving in-line process analytics and controls visibility to operations folks for live/real-time process improvements (See BLOG once it's done).
What is SAP Manufacturing Integration & Intelligence (MII)
The SAP MII product is very good at providing local operations KPI views with SAP ERP context around them and around the data and it also has a product called SAP Plant Connectivity (PCo) bundled along with it that interfaces directly to the various Operations Technology (OT) systems. Combining these together you have a very powerful ERP centric view of your live and historical operations data for driving live performance management and KPI data to improve processes in real-time. This view of data can be pushed to ERP to drive live insight in ERP on what is happening at various plants and locations or to local operator dashboards and screens to further drive operations visibility and capture additional context around events from operators. This type of data can then be loaded into the local MES or central ERP/HANA instances or both in a seamless, to the systems & workers, manner to ensure consistency of data and information.
Architecture
The SAP MII, PCo, ESP, and HANA products all have various technical features that can be jointly leveraged to drive local and central OT data but with ERP context so that the data can be correlated in-line and also after the fact once it's stored in the HANA database tables. Having context to various event points also enables ad-hoc analysis of the detected events to drive operations improvements across multiple systems simultaneously. The most common architectural scenarios for integration MII/PCo and ESP together is to stream live data from PCo directly to ESP in high-volumes and then to also include lower volume data (such as data from an operator or an MES/ERP system) into the stream in parallel to the OT data. Then using the context provided by MII/PCo to the data to feed the "Enriched Data Stream" of ESP you have the ability to correlate the data across streaming inputs as it happens. Conceptually the interface looks like this:
What happens is that the live operations data needs to be correlated with live execution and enterprise information to have the proper identification fields but also needs to know the additional conditions that the assets are operating in to determine the proper course of action, if any, that needs to be raised as an event and pushed to MII for reporting or process improvement recommendations or to HANA for the predictive analytics and multi-asset/distributed asset comparisons. This is all done agnostically of the underlying historian/SCADA/DCS/HMI vendor because it's using the SAP MII and PCo products to achieve this. On a more technical level the following diagram shows the details behind the various interfaces between the different SAP products and how they are used:
There are many ways to leverage the above interfaces to drive process improvements and visibility to live operations data in-line with the acquisition or after the fact in a larger analytical HANA model across huge time frames and assets. Again this is all possible because of technology improvements to the SAP MII product for mapping in ERP data to the various tag sensor data points using the Plant Information Catalog (PIC) and would continue to improve with the "Remote Administration & Configuration of PCo" topic that is currently in the customer Co-Innovation process but is planned to support pushing meta-data from the PIC to the notification streams of the PCo engine to address specifically the requirement of BuCM that is shown in the above diagram.
Something Important to Keep in Mind
When people ask me about this scenario I am always very pleased to hear that they have given a lot of thought and are also very eager to implement this scenario to bolster their existing analytics capabilities. I am also confronted with a common question around reliability of the data and how accurate the streaming engine is for loading data to HANA. We are aware of the fact that sometimes in the SCADA, DCS, or Tiered Historian layers data gets buffered so that the "Current' values do not update until the buffered data moves through the network but only then if your hooked to a historian will the most recent, or Current, data value be updated and that is what will appear in the stream. So this streaming feed behaves more like a video feed rather than a guaranteed delivery/replication mechanism of the historian data. There are ways that are built into the ESP engine to detect the flat-lining of tag data which in ESP Terms is called "Data Aging". This is a common scenario in the financials sector as well and why it's already handled by ESP to detect this occurs. From here ESP can send a "Data Retrieval" style message to MII which can then synchronously query the Historian Event Table for all of the events missed during the detected flat-lining or data aging time period and then load the HANA tables with the missing data. The scenario looks like the below in case you are a more visual person:
The above scenario is a very common one to come across in the real-world especially when working with a large number of distributed assets but it's important to know that this scenario only needs to be configured for your particular business rules and not implemented as a custom development project.
Configuration of SAP ESP
In order to setup and use the above scenario a stream interface in the SAP ESP product has to first be defined to accept the high-volume data from SAP PCo and also another lower volume MII interface so that MII can push MES/ERP/Operator data into the streams. For now we will stick to the PCo to ESP interface as the MII interface to ESP is covered here already (SAP MII & Sybase ESP Publish Actions | SCN). In the SAP ESP environment to define a stream first open the ESP Studio (additional details and help are available here: SyBooks Online) connect/login to your ESP server and create a new project and workspace using the SAP Sybase ESP Authoring perspective you can create very complex and interactive streaming and analytical flows like this:
The above flow enables the ESP engine to sort out various streaming data feeds across multiple PCo notification streams, correlates the enriched streams together, and then generates a severity and notification payload for MII as the data is streamed in from the tags (100ms per data point per tag). Then the notifications are fed to the MII Messaging Services interface (HTTP) and stored in the MII KPI Framework so that event frequencies can be stored and reported on as they happen to give operators insight into the process. This is the foundation for Short Interval Control (SIC). The Post to MII operation in the above ESP Stream definition simply authenticates (Using Basic Authentication) and posts an XML message to the MII Message Listener, Message Listeners - Message Services - SAP Library, using this URL:
and is done when any "event" with an assigned severity is detected by the ESP engine across the streams as the live data flows into the engine. Here are some example snippets of how to handle and manage the PCo data:
/** Write PCo events to a file for replay purposes -- starts manually */ ATTACH OUTPUT ADAPTER oaPCoEvents TYPE toolkit_file_csv_output TO isPCo GROUP asgNoStart PROPERTIES dir = 'D:/SAP/ESP/workspace/pco1/data' , file = 'isPcoSimulator' , csvPrependStreamNameOpcode = TRUE , csvHasHeader = TRUE ; /* Simulator input stream to test input without running PCo */ /* ATTACH INPUT ADAPTER isPCoSimulator TYPE toolkit_file_csv_input TO isPCo GROUP asgNoStart PROPERTIES csvExpectStreamNameOpcode = TRUE , dir = 'C:/ESP5.1SP04/workspace/pco1/data' , file = 'isPcoSimulatorSmall.csv' , csvHasHeader = TRUE ; */ /** Send XML alert to MII MessageService using HTTP POST */ ATTACH OUTPUT ADAPTER POST2MII TYPE toolkit_http_output TO Alerts2MIIXML PROPERTIES bodyCharset = 'UTF-8' , retryNumber = 1 , bodyColumn = 1 , requestUrl = miiMessagePostUrl ; ATTACH OUTPUT ADAPTER Tags2HANA TYPE hana_out TO isPCo PROPERTIES service = 'MIIServiceHANA' , sourceSchema = 'RTES' , table = 'TAGDATA' , outputBase = FALSE , dataWarehouseMode = 'INSERTONLY' , timestampColumnName = 'HANATimestamp' , maxReconnectAttempts = 5 , maxQueueSize = 32768 ; ATTACH OUTPUT ADAPTER HANA_Output1 TYPE hana_out TO Alerts2MII PROPERTIES service = 'MIIServiceHANA' , sourceSchema = 'RTES' , table = 'MIIALERTS' , dataWarehouseMode = 'INSERTONLY' , timestampColumnName = 'AlertTimestamp' ; ADAPTER START GROUPS asgNoStart NOSTART;
Configuration of SAP Plant Connectivity (PCo)
Once a stream like the one above is completed or at least the inputs to the stream are defined you can define an ESP Destination in the SAP Plant Connectivity (PCo) product; also outlined in the help documentation here Sybase ESP Destination - SAP Plant Connectivity - SAP Library. This destination can then be used and re-used by any number of notifications defined per agent instance inside of PCo. Here is a screen capture of how to set this up and correlate the entries between the ESP and PCo Destination screens:
Once you think that you have it setup properly you can press the "Test Connection" button and if everything is deployed and running on the ESP server then the results should look like this:
The next step is to configure what tag data and how frequently it will be pushed into the ESP Destination stream. To do this setup a PCo agent against your tag source system, define your subscription item tag for the agent, and then create a notification definition. For the trigger logic I defaulted this to Always so that anytime the tag value changes the new value is sent to the ESP Stream. Then in the payload of the notification which is defined in the Output tab I defined some meta-data about the stream (Later this will be managed by the Remote Administration & Configuration of PCo feature) as shown below to enhance the context of the streaming data:
Finally, the tag data, reading timestamp, quality secondary data, and the context defined in the Output tab have to be mapped to the input of the ESP Stream interface and this is done in the Destinations tab and in my example looks like this:
Once the agent is started data will begin to flow to the ESP Stream (visible in the ESP Studio) and the streams will also send raw data to the specified HANA DB tables and the detected events to the SAP MII KPI Engine for driving operations reports. The next step is to verify that the streaming data is in fact making into the right ESP stream and to do you open up the ESP Studio, connect to the project and open up the stream viewer and verify new data is continuously appearing in the stream:
Once you have verified that the data is in fact coming into the stream it's possible to then verify that the ESP Stream is sending the raw data to the HANA tables and the detected event data to the MII Messaging Services layer.
Configuring MII to Accept ESP Event Notifications
The SAP MII Messaging Services layer was used here for message monitoring purposes but you could just as easily called the MII Transaction Runner Servlet (Transaction Calls Using URLs - Content Development - SAP Library) in place of the messaging services. The Messaging Services layer does however have a nice monitoring and management layer which helps with the demonstration of the flow of the live notification data from ESP. First you need to setup a message processing rule to handle the XML payload and setup how the messages will be processed but it's easy to do. From the MII Menu -> Messaging Services -> Message Listener we have already imported and configured the expected XML Payload from the ESP engine in order to automatically identify what the message type and id is for MII to handle:
As you can see we have mapped the message Name and ID fields based on the contents of the XML payload and the message name is what is used to classify how the message is process by the Message Processing Rules and the ID is used to guarantee uniqueness of the processing and to assign a unique identifier to the detected event from ESP. The associated Message Processing Rule was setup to send all messages with the name of "ALL_HIGH_TAG_VALUES" meaning there are lots of upper threshold violations and need to be handled with additional logic and then below it was a generic rule that processes all of the other messages in the same way to the MII KPI Engine to persist and report on their frequency over the specific time KPI interval.
The transaction used to handle the incoming ESP messages is very simple and it looks like this as it's only job is to take the ESP XML Message and load it into the KPI Object:
The KPI Object definition looks like this and is used to identify possible problems with a given process for enablement of short-interval control (SIC) and other Kaizen initiatives:
Conclusion
I hope that the above technical architectural reference diagram and example scenario show how to implement the technical scenario of integrating the ESP/MII/PCo/HANA products together can provide a lot of value to local and enterprise people for short-interval control and for long term multi-asset analytics on both health and operations performance.
If you have any questions or would like further details on any point raised in this Document please let me know via the Comments section below.
Thanks,
Sam
MII 15.0 - Self Service Composition Environment - Integration of Websocket with SAP PCo
The document is a 'How-to' guide for working with the Self Service Composition Environment - Integration of Websocket with SAP PCo in MII 15.0. It explains in detail, the steps to configure and integrate with MII 15.0 product release.
Complete list of MII Release notes
# MII 12.0
SAP Note 1025997 - SAP xMII 12.0
# MII 12.0 SP01
SAP Note 1037631 - xMII 12.0 SP01
# MII 12.0 SP02
SAP Note 1098594 - xMII 12.0 SP02
# MII 12.0 SP03
SAP Note 1142918 - xMII 12.0 SP03
SAP Note 1157227 - xMII 12.0 SP03 (patch 1)
# MII 12.0 SP04
SAP Note 1166730 - xMII 12.0 SP04
# MII 12.0 SP05
SAP Note 1238985 - xMII 12.0 SP05
SAP Note 1280289 - xMII 12.0 SP05 (patch 1)
# MII 12.0 SP06
SAP Note 1270442 - xMII 12.0 SP06
SAP Note 1301833 - xMII 12.0 SP06 (patch 1)
SAP Note 1311583 - xMII 12.0 SP06 (patch 2)
SAP Note 1319850 - xMII 12.0 SP06 (patch 3)
# MII 12.0 SP07
SAP Note 1314696 - xMII 12.0 SP07
SAP Note 1333706 - xMII 12.0 SP07 (patch 1)
SAP Note 1338890 - xMII 12.0 SP07 (patch 2)
SAP Note 1339450 - xMII 12.0 SP07 (patch 3)
SAP Note 1341964 - xMII 12.0 SP07 (patch 4)
SAP Note 1346624 - xMII 12.0 SP07 (patch 5)
SAP Note 1349672 - xMII 12.0 SP07 (patch 6)
# MII 12.0 SP08
SAP Note 1373034 - xMII 12.0 SP08
SAP Note 1382184 - xMII 12.0 SP08 (patch 1)
SAP Note 1386055 - xMII 12.0 SP08 (patch 2)
SAP Note 1391480 - xMII 12.0 SP08 (patch 3)
SAP Note 1397629 - xMII 12.0 SP08 (patch 4)
SAP Note 1399673 - xMII 12.0 SP08 (patch 5)
SAP Note 1401285 - xMII 12.0 SP08 (patch 6)
# MII 12.0 SP09
SAP Note 1409462 - xMII 12.0 SP09
SAP Note 1423088 - xMII 12.0 SP09 (patch 1)
SAP Note 1427373 - xMII 12.0 SP09 (patch 2)
SAP Note 1428898 - xMII 12.0 SP09 (patch 3)
SAP Note 1435052 - xMII 12.0 SP09 (patch 4)
SAP Note 1441399 - xMII 12.0 SP09 (patch 5)
SAP Note 1441952 - xMII 12.0 SP09 (patch 6)
SAP Note 1445267 - xMII 12.0 SP09 (patch 7)
# MII 12.0 SP10
SAP Note 1457554 - xMII 12.0 SP10
SAP Note 1467738 - xMII 12.0 SP10 (patch 1)
SAP Note 1470446 - xMII 12.0 SP10 (patch 2)
SAP Note 1473286 - xMII 12.0 SP10 (patch 3)
SAP Note 1476052 - xMII 12.0 SP10 (patch 4)
SAP Note 1477123 - xMII 12.0 SP10 (patch 5)
SAP Note 1486169 - xMII 12.0 SP10 (patch 6)
SAP Note 1490962 - xMII 12.0 SP10 (patch 7)
# MII 12.0 SP11
SAP Note 1491023 - xMII 12.0 SP11
SAP Note 1512526 - xMII 12.0 SP11 (patch 1)
SAP Note 1531123 - xMII 12.0 SP11 (patch 2)
# MII 12.0 SP12
SAP Note 1545777 - xMII 12.0 SP12
SAP Note 1575714 - xMII 12.0 SP12 (patch 1)
# MII 12.0 SP13
SAP Note 1757834 - xMII 12.0 SP13
SAP Note 1784643 - xMII 12.0 SP13 (patch 1)
# MII 12.1
SAP Note 1259510 - SAP MII 12.1
# MII 12.1 SP01
SAP Note 1298213 - MII 12.1 SP01
SAP Note 1316538 - MII 12.1 SP01 (patch 1)
SAP Note 1322881 - MII 12.1 SP01 (patch 2)
# MII 12.1 SP02
SAP Note 1333494 - MII 12.1 SP02
SAP Note 1336535 - MII 12.1 SP02 (patch 1)
SAP Note 1339842 - MII 12.1 SP02 (patch 2)
SAP Note 1343568 - MII 12.1 SP02 (patch 3)
SAP Note 1360104 - MII 12.1 SP02 (patch 4)
SAP Note 1363354 - MII 12.1 SP02 (patch 5)
# MII 12.1 SP03
SAP Note 1344452 - MII 12.1 SP03
SAP Note 1380081 - MII 12.1 SP03 (patch 1)
SAP Note 1385270 - MII 12.1 SP03 (patch 2)
# MII 12.1 SP04
SAP Note 1375678 - MII 12.1 SP04
SAP Note 1414789 - MII 12.1 SP04 (patch 1)
SAP Note 1416740 - MII 12.1 SP04 (patch 2)
SAP Note 1420556 - MII 12.1 SP04 (patch 3)
SAP Note 1423813 - MII 12.1 SP04 (patch 4)
SAP Note 1429292 - MII 12.1 SP04 (patch 5)
SAP Note 1432223 - MII 12.1 SP04 (patch 6)
# MII 12.1 SP05
SAP Note 1427240 - MII 12.1 SP05
SAP Note 1451448 - MII 12.1 SP05 (patch 1)
SAP Note 1455906 - MII 12.1 SP05 (patch 2)
SAP Note 1457327 - MII 12.1 SP05 (patch 3)
SAP Note 1461632 - MII 12.1 SP05 (patch 4)
SAP Note 1463232 - MII 12.1 SP05 (patch 5)
SAP Note 1464559 - MII 12.1 SP05 (patch 6)
SAP Note 1469749 - MII 12.1 SP05 (patch 7)
SAP Note 1472473 - MII 12.1 SP05 (patch 8)
SAP Note 1475279 - MII 12.1 SP05 (patch 9)
SAP Note 1475879 - MII 12.1 SP05 (patch 10)
SAP Note 1483700 - MII 12.1 SP05 (patch 11)
SAP Note 1487658 - MII 12.1 SP05 (patch 12)
# MII 12.1 SP06
SAP Note 1483701 - MII 12.1 SP06
SAP Note 1493898 - MII 12.1 SP06 (patch 1)
SAP Note 1497097 - MII 12.1 SP06 (patch 2)
# MII 12.1 SP07
SAP Note 1506932 - MII 12.1 SP07
SAP Note 1508605 - MII 12.1 SP07 (patch 1)
SAP Note 1516069 - MII 12.1 SP07 (patch 2)
SAP Note 1520703 - MII 12.1 SP07 (patch 4)
# MII 12.1 SP08
SAP Note 1537813 - MII 12.1 SP08
SAP Note 1552233 - MII 12.1 SP08 (patch 1)
SAP Note 1560332 - MII 12.1 SP08 (patch 2)
SAP Note 1566572 - MII 12.1 SP08 (patch 3)
SAP Note 1581779 - MII 12.1 SP08 (patch 4)
SAP Note 1586551 - MII 12.1 SP08 (patch 5)
SAP Note 1589080 - MII 12.1 SP08 (patch 6)
SAP Note 1591602 - MII 12.1 SP08 (patch 7)
SAP Note 1596956 - MII 12.1 SP08 (patch 8)
SAP Note 1603781 - MII 12.1 SP08 (patch 9)
# MII 12.1 SP09
SAP Note 1618868 - MII 12.1 SP09
SAP Note 1630291 - MII 12.1 SP09 (patch 1)
SAP Note 1644999 - MII 12.1 SP09 (patch 2)
SAP Note 1664982 - MII 12.1 SP09 (patch 3)
SAP Note 1685942 - MII 12.1 SP09 (patch 4)
# MII 12.1 SP10
SAP Note 1713601 - MII 12.1 SP10
SAP Note 1727790 - MII 12.1 SP10 (patch 1)
SAP Note 1788139 - MII 12.1 SP10 (patch 2)
# MII 12.2
SAP Note 1416735 - SAP MII 12.2
# MII 12.2 SP01
SAP Note 1528197 - MII 12.2 SP01 (patch 1)
SAP Note 1566332 - MII 12.2 SP01 (patch 2)
SAP Note 1575009 - MII 12.2 SP01 (patch 3)
# MII 12.2 SP02
SAP Note 1548152 - SAP MII 12.2 SP02
SAP Note 1582014 - MII 12.2 SP02 (patch 1)
SAP Note 1592680 - MII 12.2 SP02 (patch 2)
SAP Note 1596090 - MII 12.2 SP02 (patch 3)
SAP Note 1600756 - MII 12.2 SP02 (patch 4)
SAP Note 1608620 - MII 12.2 SP02 (patch 5)
SAP Note 1618994 - MII 12.2 SP02 (patch 6)
SAP Note 1626043 - MII 12.2 SP02 (patch 7)
SAP Note 1638602 - MII 12.2 SP02 (patch 8)
# MII 12.2 SP03
SAP Note 1663276 - MII 12.2 SP03
SAP Note 1666254 - MII 12.2 SP03 (patch 1)
SAP Note 1667240 - MII 12.2 SP03 (patch 2)
SAP Note 1668546 - MII 12.2 SP03 (patch 3)
SAP Note 1677122 - MII 12.2 SP03 (patch 4)
SAP Note 1695495 - MII 12.2 SP03 (patch 5)
SAP Note 1698732 - MII 12.2 SP03 (patch 6)
SAP Note 1702932 - MII 12.2 SP03 (patch 7)
SAP Note 1720714 - MII 12.2 SP03 (patch 8)
# MII 12.2 SP04
SAP Note 1738883 - MII 12.2 SP04
SAP Note 1748380 - MII 12.2 SP04 (patch 1)
SAP Note 1758832 - MII 12.2 SP04 (patch 2)
SAP Note 1771505 - MII 12.2 SP04 (patch 3)
SAP Note 1782312 - MII 12.2 SP04 (patch 5)
# MII 12.2 SP05
SAP Note 1801918 - MII 12.2 SP05
# MII 12.2 SP06
SAP Note 1892138 - MII 12.2 SP06
# MII 12.2 SP07
SAP Note 2059066 MII 12.2 SP7
# MII 14.0
SAP Note 1693127 - MII 14.0: Release & Info Note
SAP Note 1791900 - MII14.0 SP0 (patch 1)
SAP Note 1804755 - MII 14.0 SP00 (patch 5)
SAP Note 1812757 - MII 14.0 SP00 (patch 6)
# MII 14.0 SP01
SAP Note 1819157 - MII 14.0 SP01
# MII 14.0 SP02
SAP Note 1853301 - MII 14.0 SP02
SAP Note 1863881 - MII 14.0 SP02 (patch 1)
# MII 14.0 SP03
SAP Note 1901036 - MII 14.0 SP03
# MII 14.0 SP04
SAP Note 1928655 - MII 14.0 SP04
# MII 14.0 SP05
SAP Note 2002268 - MII 14.0 SP05
# MII 15.0
SAP Note 1984646 - MII 15.0
# MII 15.0 SP01
SAP Note 2031860 - MII 15.0 SP01
# MII 15.0 SP02
SAP Note 2057521 - MII 15.0 SP02
(to be continued...)
Any broken link? Please let me know.
Marcelo Pacheco