You are on page 1of 81

SCM381

Advanced SAP MII (Manufacturing


Integration and Intelligence)

.
.
PARTICIPANT HANDBOOK
INSTRUCTOR-LED TRAINING
.
Course Version: 11
Course Duration: 2 Day(s)
e-book Duration: 4 Hours 45 Minutes
Material Number: 50151739
SAP Copyrights, Trademarks and
Disclaimers

© 2019 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form or for any purpose without the
express permission of SAP SE or an SAP affiliate company.
SAP and other SAP products and services mentioned herein as well as their respective logos are
trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other
countries. Please see http://global12.sap.com/corporate-en/legal/copyright/index.epx for additional
trademark information and notices.
Some software products marketed by SAP SE and its distributors contain proprietary software
components of other software vendors.
National product specifications may vary.
This course may have been machine translated and may contain grammatical errors or inaccuracies.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only,
without representation or warranty of any kind, and SAP SE or its affiliated companies shall not be liable
for errors or omissions with respect to the materials. The only warranties for SAP SE or SAP affiliate
company products and services are those that are set forth in the express warranty statements
accompanying such products and services, if any. Nothing herein should be construed as constituting an
additional warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business
outlined in this document or any related presentation, or to develop or release any functionality
mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliated companies’
strategy and possible future developments, products, and/or platform directions and functionality are
all subject to change and may be changed by SAP SE or its affiliated companies at any time for any
reason without notice. The information in this document is not a commitment, promise, or legal
obligation to deliver any material, code, or functionality. All forward-looking statements are subject to
various risks and uncertainties that could cause actual results to differ materially from expectations.
Readers are cautioned not to place undue reliance on these forward-looking statements, which speak
only as of their dates, and they should not be relied upon in making purchasing decisions.

© Copyright. All rights reserved. iii


Typographic Conventions

American English is the standard used in this handbook.


The following typographic conventions are also used.

This information is displayed in the instructor’s presentation

Demonstration

Procedure

Warning or Caution

Hint

Related or Additional Information

Facilitated Discussion

User interface control Example text

Window title Example text

© Copyright. All rights reserved. iv


Contents

vi Course Overview

1 Unit 1: SAP Plant Connectivity

2 Lesson: SAP Plant Connectivity Overview


14 Lesson: Remote Configuration of SAP Plant Connectivity from SAP
MII

24 Unit 2: Plant Information Catalog

25 Lesson: Plant Information Catalog Services

39 Unit 3: Self Service Composition Environment

40 Lesson: Self Service Composition Environment

53 Unit 4: Energy Monitoring and Analytics

54 Lesson: Energy Monitoring Scenario

58 Unit 5: SAP MII Web Development Using Web IDE

59 Lesson: Web IDE Integration

70 Unit 6: NWDI Infrastructure

71 Lesson: SAP MII Source Control Using NWDI

© Copyright. All rights reserved. v


Course Overview

TARGET AUDIENCE
This course is intended for the following audiences:

Development Consultant

Developer

© Copyright. All rights reserved. vi


UNIT 1 SAP Plant Connectivity

Lesson 1
SAP Plant Connectivity Overview 2

Lesson 2
Remote Configuration of SAP Plant Connectivity from SAP MII 14

UNIT OBJECTIVES

Understand how SAP Plant Connectivity is integrated with SAP MII

Configure SAP Plant Connectivity remotely from SAP MII

© Copyright. All rights reserved. 1


Unit 1
Lesson 1
SAP Plant Connectivity Overview

LESSON OBJECTIVES
After completing this lesson, you will be able to:

Understand how SAP Plant Connectivity is integrated with SAP MII

SAP Plant Connectivity Overview


Business Example
You are implementing an SAP Manufacturing Integration and Intelligence (MII) solution with
SAP Plant Connectivity (PCo) for a company that has various sources of shop floor-specific
data, such as open process control (OPC) data. You need to visualize this data in near-real
time to enable analysis and immediate corrective actions.

Figure 1: SAP Portfolio from a Machine Connectivity Perspective

SAP PCo is SAP’s connectivity infrastructure which enables integration between SAP
applications and machines, devices, and controls. It provides high-performing and robust
real-time event notification capabilities. Together with SAP MII and SAP Manufacturing
Execution (SAP ME), it can serve as the edge client to supply data to the internet of things and
to applications such as SAP Predictive Maintenance and Service.

© Copyright. All rights reserved. 2


Lesson: SAP Plant Connectivity Overview

Basic Communication Patterns

Figure 2: Basic Communication Patterns in SAP Plant Connectivity

SAP PCo has the following basic communication patterns:

Notification communication
Notifications are initiated by a changing tag value at the data source. The data source then
pushes the changed tag value to SAP PCo through an OPC server. One or more agent
instances can react to a changed tag value, and can send multiple notification messages to
one or more external systems (such as SAP MII).

Note:
External system responses are not processed in SAP PCo. In notification
communication, the action is triggered by the data source.

Query communication
SAP PCo acts as a server. An external system such as SAP MII can access SAP PCo
through a connector and can read and write information from and to a data source. In
query communication, the action is initiated by the external system.

Destination system calls with response processing


This is a combination of the notification and the query patterns. The changing of a device
tag value triggers a notification. The notification can then call, for example, a web service
operation in an external system. The responses of the external system can then be the
data source, as in notification communication.

© Copyright. All rights reserved. 3


Unit 1: SAP Plant Connectivity

Note:
A single agent instance can be configured to handle notifications, queries, and
destination system calls with response processing simultaneously. A single SAP
PCo agent instance can handle all three communication patterns at once, if the
source system type permits it.

Figure 3: Example of a Vertical Integration

SAP PCo is installed on a PC or an integrated device, for example, a programmable logic


controller (PLC) that runs on Microsoft Windows. SAP PCo agents are independent Windows
services that run in the background, managing the data exchange between data sources and
external systems. The SAP PCo Management Console is a Windows application that is used to
configure, control, and monitor the individual SAP PCo agents.
The figure, Example of a Vertical Integration, shows a typical setup in which SAP PCo agents
are configured, controlled, and monitored by a SAP PCo Management Console that runs on
the same Windows device. However, SAP PCo also allows remote configuration and
monitoring .This means that SAP PCo agents can be configured, controlled, and monitored
from a remote instance using native SAP PCo tools (remote monitoring) or web services that
are offered by the SAP PCo Management Host Service.

SAP Plant Connectivity Management Console and Notifications


SAP PCo Management Console Overview
While SAP PCo agents are Windows services that run in the background, the SAP PCo
Management Console is the central place to start, stop, and configure the agents. The SAP
PCo Management Console can also be used to monitor agent instances, view logs, and
resolve error situations.
Important SAP PCo configuration objects include the following:

Agent instances

© Copyright. All rights reserved. 4


Lesson: SAP Plant Connectivity Overview

Source systems

Destination systems

Notifications (as sub-nodes of an agent instance)

From an SAP PCo perspective, all data at a data source is stored as data tags. Data tags are
grouped hierarchically in a node structure. An SAP PCo agent can subscribe to tag changes
(notifications). Queries can read or write individual tag values, and can get information about
the tag structure and the data source capabilities.
Depending on the source system type, data tags can contain additional information
(attributes) such as the following:

Time stamp

Data quality

Data type

Source System

Figure 4: Source Systems in Standard SAP Plant Connectivity

A source system connects a data source to one or multiple agent instances. SAP PCo has a
tag-based view of the data source. This means that the source system has to create a “view”
of the data source where data is stored in tags which, in turn, are structured in nodes. This
unified view allows SAP PCo to connect to virtually any data source and destination.
Source systems have the following tasks:

Translate SAP PCo commands (queries) or configuration parameters (reliability settings)


into commands that are understood by the data source.

Transform source data into a browsable tag-based data structure. A tag-based data
structure is already provided for many data sources, such as OPC servers, but a file
monitor source system, for example, has to present the contents of a file directory as a
browsable node structure.

© Copyright. All rights reserved. 5


Unit 1: SAP Plant Connectivity

Convert local time stamps into UTC time stamps.

Destination System

Figure 5: Destination Systems in Standard SAP Plant Connectivity

A destination system is the instance to which notifications are sent from an SAP PCo agent
perspective. A destination system provides the technical means to connect to external
systems, such as SAP MII, SAP ME, or SAP Business Suite. Destination systems are not
required in the following communication patterns:

Notification

Destination system calls with response processing

Once a destination system has been configured, it can be re-used in multiple agent instances
and notifications.

© Copyright. All rights reserved. 6


Lesson: SAP Plant Connectivity Overview

SAP MII Destinations

Figure 6: SAP MII Destinations

The SAP MII destination provides a “native” connection for sending notifications to an SAP
MII system. Alternatively, SAP PCo can communicate with SAP MII through web services.
When using an SAP MII destination in a notification communication, you can call a pre-defined
SAP MII transaction that is called with the notification message content.

Agent Instances and Notifications


Agent instances manage the data flow between data sources and destinations. As the idea of
SAP PCo is to connect any data source type to any destination type, agent instances
administer the data flow in a neutral format that is independent of the source and destination
system types.
Agent instances fulfil the following functions:

Control the data and information flow between the data source and the various
destinations

Provide a query interface for queries from external systems such as SAP MII or SAP
NetWeaver-based applications

Provide event logging for error analysis

Provide the following features for notification communications:


- Filter tag values (for example, only react to tag value changes or to trigger conditions)
- Modify tag values (for example, output expressions)
- Provide message queuing for notification communications, including retry functionality
and error handling

© Copyright. All rights reserved. 7


Unit 1: SAP Plant Connectivity

Agent Configuration Options: Host Tab

Figure 7: Agent Configuration Options: Host Tab

Agent Configuration Options: Log Tab

Figure 8: Agent Configuration Options: Log Tab

SAP PCo writes a separate log for each agent instance. The raw data in the log is saved in a
Windows event log and can be displayed using the relevant operating system tools. The name
of the Windows event log that is assigned to the agent is displayed in the status bar.
You can export an agent log into a CSV file.

Agent Configuration Options: Query Ports Tab

Figure 9: Agent Configuration Options: Query Ports Tab

"Make PCo accessible from outside". Multiple port types can be selected within one agent.

© Copyright. All rights reserved. 8


Lesson: SAP Plant Connectivity Overview

Query Ports Tab

SAP MII: Recommended port type for MII release 12.2 or higher. Supports non-unique tag
names. Uses a PCo-native query language.

MII before 12.2: Communication via Universal Data Connector (UDC). PCo acts as a
Universal Data Server (UDS). Only allows unique tag names in the namespace of the data
source.

SAP NW RFC Server: Connect any SAP Business Suite system such as ERP to PCo.
Requires a destination system of the type RFC Destination.

SAP ODA RFC Server: Connect SAP systems to PCo using the SAP ODA Connector.
Restricted to OPC DA agents only!

SAP EWM RFC Server: Connects an SAP EWM system to a socket server. Requires almost
no configuration in PCo. Restricted to socket agents only!

WebSocket Server: Connects Web applications such as HTML5 interfaces to PCo, for
example, UIs the were created using SAP MII Self Service Composition Environment. PCo
acts as a WebSocket server.

Agent Configuration Options: Tag Query Tab


The following settings are available:

Cache Mode
- Access to data source only: All tag data is retrieved directly.
- Access to cache and to data source as required: For every query, the cache is first
checked to see whether there are tags and metadata. If not, the requested information
is retrieved from the data source and added to the cache.
- Access using aliases only: Query for tags belonging to specific alias as defined in the
source system.
- Access to cache only: All tags are queried from the data stored in the cache at agent
startup. Metadata is retrieved when a tag is retrieved.

Mask
Restrict the selection of tags to a specified pattern. This is only valid when Cache Mode is
set to Cache.

Alias
Name of the alias to be used when Cache Mode is set to Alias.

Note:
The Tag Query tab cache uses different cache modes and aliases to those used by
SAP MII queries.

© Copyright. All rights reserved. 9


Unit 1: SAP Plant Connectivity

Agent Configuration Options: Notification Processing Tab

Figure 10: Agent Configuration Options: Notification Processing Tab

Notification Message Queues

Figure 11: Notification Message Queues

Message queues serve the following purposes in SAP PCo:

Decouple notification message creation from dispatching. Messages placed into the queue
are stored until the dispatcher retrieves them. Message dispatching does not interfere with
the processing of source system events.

Temporarily compensate for slow message dispatching

Provide resilience functionality to ensure that messages do not get lost in the event of a
system failure

Purge notification messages that could not be delivered and have expired.

Ensure a defined dispatching sequence (if requested), for example, exactly once-in-order

The message queue screen has the following tabs:

© Copyright. All rights reserved. 10


Lesson: SAP Plant Connectivity Overview

Queued Message
Messages that are currently waiting to dispatched

Messages for Bundling


Messages that are to be bundled before dispatching

Message Failures
Messages that could not be sent, even after multiple attempts

Expired Messages
Messages that have exceeded the predefined lifetime

Required Configuration Objects for all Communication Patterns

Figure 12: Required Configuration Objects for all Communication Patterns

Connectivity with SAP MII: Creating SAP PCo Data Server

Figure 13: Connector

Enter a name, type and description.

© Copyright. All rights reserved. 11


Unit 1: SAP Plant Connectivity

Figure 14: Connectivity

Enter a URL in the format http://server:port/PCoManagement or browse through the


System Landscape Directory.

Figure 15: Component

Choose an agent and choose Finish. Enable and save the connection.

Figure 16: Data Server Connection Settings

Once the SAP PCo data server configuration is successful, configured SAP PCo agents can be
accessed using an SAP PCo query in the SAP MII Workbench.

SAP Plant Connectivity Queries


You can use SAP PCo queries in the SAP MII Workbench to query the following SAP PCo
agent types:

Tag

Table (database)

The following modes are available:

GroupList

© Copyright. All rights reserved. 12


Lesson: SAP Plant Connectivity Overview

MetadataList

ModeList

SecondaryList

TagFixedQuery

TagList

TagRetrieveQuery

TagStoreQuery

ViewList

The SAP MII PCo query template is the primary query template used for retrieving tag data
from SAP PCo. However there are some cases in which it is beneficial to modify or create the
query command that the template sends to SAP PCo, as follows:

Executing defined custom functions in the SAP PCo socket agent and SAP PCo file monitor
agent

Executing multiple tag writes in a single request

Executing multiple historical queries in a single request

Constructing and using parameterized queries for parameters other than tag name and
tag value

You can build and test an SAP MII PCo query in the SAP MII Workbench from the Catalog tab
by choosing File New PCo Query. Alternatively you can right-click on your project or on a
folder within your project and choose New PCo Query from the context menu. In the right-
hand pane, from the list of available servers, choose PCo Server.

Note:
The available servers are those configured in the data server editor that apply to
tag-based queries.

LESSON SUMMARY
You should now be able to:

Understand how SAP Plant Connectivity is integrated with SAP MII

© Copyright. All rights reserved. 13


Unit 1
Lesson 2
Remote Configuration of SAP Plant
Connectivity from SAP MII

LESSON OBJECTIVES
After completing this lesson, you will be able to:

Configure SAP Plant Connectivity remotely from SAP MII

Remote Plant Connectivity Integration Overview


Business Example
You are implementing an SAP MII solution for a company that has various data sources of
open process control (OPC) data and need to create a notification agent using SAP MII
remote plant connectivity integration, without stopping the SAP Plant Connectivity (PCo)
agent.

Overview
SAP MII is integrated with SAP PCo, allowing you to create and configure notifications directly
in SAP MII and publish the notifications to the SAP PCo system. SAP PCo connects to the
data source and handles the published notifications. Once notifications are published and
activated in SAP PCo, you can pause and resume them individually from SAP MII without
stopping the whole agent instance.
The benefits of creating notifications in SAP MII are as follows:

Notifications are managed and maintained centrally for multiple PCo installations.

You can modify, pause, and resume notifications in SAP MII.

Notifications are enriched with the business context available in the SAP MII Plant
Information Catalog (PIC).

You can modify notifications even when an agent instance is running.

When notifications are modified or deleted from the SAP MII notification configuration
process, that information is published on both the SAP MII and SAP PCo servers once the
notification changes are published.

© Copyright. All rights reserved. 14


Lesson: Remote Configuration of SAP Plant Connectivity from SAP MII

Figure 17: Plant Connectivity Management

Plant connectivity management has the following features:

Manage notifications
- By plant connectivity
- By PIC

Browse notifications

View recently modified notifications

SAP MII Notification Management

Figure 18: Notification Process

Notification management allows you to create and configure notifications in SAP MII, while
the notification details are processed in SAP PCo.

© Copyright. All rights reserved. 15


Unit 1: SAP Plant Connectivity

When a new notification is created using SAP MII notification management, the following
occurs:

When a notification is published in SAP MII, a draft notification is created on the SAP PCo
server.

When a published notification is modified and re-published in SAP MII, the notification on
the SAP PCo server is updated with the new changes.

When a published notification is activated in SAP MII notification management, the


notification on the SAP PCo server is updated with the status Current .

When a notification is paused in SAP MII notification management, the notification status
in SAP MII is changed to Current – paused .

When a paused notification is resumed in SAP MII notification management, the


notification status on the SAP PCo server is changed to Current .

When an existing notification is edited using SAP MII notification management, the following
occurs:

A new version of the notification is created in SAP MII with the status Draft , and the
existing notification with the status Current is changed to Outdated . A new version of the
notification is created in SAP PCo with the status Draft , and the existing notification with
the status Current is changed to Expiring. These pending messages can be delivered to the
configured destination system.

When a new version of a notification is published in SAP MII, the notification on the SAP
PCo server is available as Draft .

When a newly published version of notification is activated in SAP MII, the status of the
current notification in SAP PCo is changed to Expired and the newly published version is
changed to Current .

Note:
Using multiple SAP MII systems to manage a single notification leads to
complications. Publishing or activating the same notification from multiple SAP
MII systems is not supported. Therefore we recommend that you manage each
notification in the same SAP MII system that was originally used to create it.

Working with Notifications


Create Notifications
You can create notifications in SAP MII and publish the notifications to SAP PCo. You can
create notifications by browsing for SAP PCo tags or PIC tags based on SAP PCo servers
connected to SAP MII data services.
Similarly to SAP PCo notification creation, SAP MII notification management has the following
tabs available when creating notifications:

Trigger
Allows you to define the notification trigger condition

Output

© Copyright. All rights reserved. 16


Lesson: Remote Configuration of SAP Plant Connectivity from SAP MII

Allows you to define an output message based on the trigger condition

Message Delivery
Allows you to define the message delivery conditions

Destination System
Allows you to define the destination system to which the output message is delivered

Description
Allows you to enter a language-specific description

Trigger Tab
The following trigger types are available:

Trigger Type Description

Always This is the default trigger type.


The notification message is delivered when the value of a
tag that is configured in the Output Expression table
changes.

OnTrue If SAP PCo evaluates your defined trigger expression as


TRUE, SAP PCo generates a notification message. The trig-
ger expression must then be evaluated as FALSE before it
can be evaluated as TRUE again to deliver another notifica-
tion message. Choose this setting if you want to receive a
notification message if a rare event occurs.

OnFalse If SAP PCo evaluates your defined trigger expression as


FALSE, SAP PCo generates a notification message. The
trigger expression must then be evaluated as TRUE before
it can be evaluated as FALSE again to deliver another notifi-
cation message.

WhileTrue If SAP PCo evaluates your defined trigger expression as


TRUE, SAP PCo generates notification messages. This hap-
pens until SAP PCo evaluates the expression as FALSE.
Choose this setting only for events that occur frequently.

WhileFalse If SAP PCo evaluates your defined trigger expression as


FALSE, SAP PCo generates notification messages. This
happens until the expression is evaluated as TRUE.

To enter an expression, choose the Manage Expression icon which allows you to select the
tags and tag groups.
The left pane, Plant Information Catalog , displays all the tags and groups from PIC. The right
pane, Trigger Expression , displays a text field where you can add or modify an expression.

© Copyright. All rights reserved. 17


Unit 1: SAP Plant Connectivity

Output Tab

Figure 19: Output Tab

The Output tab contains the tables Output Expression and Context for Expression . You can
create and delete new or existing expressions using Output Expression . This table displays the
output name, expression, and the last published SAP PCo expression in a tabular format. You
can also view the last published SAP PCo expression in SAP PCo format by choosing the
Expression in PCo Format icon.
You can edit the expression by choosing the Edit button in the table. You can perform the
following tasks for the created output expression:

Set context(s)

Define a name, value, and data type

Add multiple contexts

Delete a context

Choose Manage Output to add a context for your expression in the Output tab.

© Copyright. All rights reserved. 18


Lesson: Remote Configuration of SAP Plant Connectivity from SAP MII

Message Delivery Tab

Figure 20: Message Delivery Tab

The following configuration settings are available:

Reliability
Specifies the settings for reliable message delivery

Failed Messages
Defines the order in which you want to store failed notification messages

Lifetime
Specifies for how long you want the messages to remain in the queue

Message Bundling
Specifies the number of notification messages that can be bundled into one single
notification message and sent to the connected destination system

Destinations Tab

Figure 21: Destinations Tab

© Copyright. All rights reserved. 19


Unit 1: SAP Plant Connectivity

The following destination types are supported by notification management. These destination
systems must be created on the SAP PCo server in order for them to be available when
configuring notification management.

SAP MII

Simulation

Web service

OData

ODBC

RESTful web service

SAP ESP destination

Description Tab

Figure 22: Description Tab

The Description tab allows you to add language-specific descriptions to your notifications,
enabling the user of the notification to view the description in their selected language. The
default language is EN .You can provide a default description while creating the notification in
the Create Notification screen. This default description is displayed in the header if you have
not specified any translation for the logged-in locale. If you specify translations, they are
displayed in the notification header.

Notification Status

Action in SAP MII Notification Status in SAP MII Notification Status in


SAP PCo

Create a notification Draft with version 1 -

Publish a notification Published to PCo Draft

Activate Current Current

Pause Current-Paused Current-Paused

© Copyright. All rights reserved. 20


Lesson: Remote Configuration of SAP Plant Connectivity from SAP MII

Action in SAP MII Notification Status in SAP MII Notification Status in


SAP PCo

Resume Current Current

LESSON SUMMARY
You should now be able to:

Configure SAP Plant Connectivity remotely from SAP MII

© Copyright. All rights reserved. 21


Unit 1

Learning Assessment

1. SAP PCO can be installed on which of the following:


Choose the correct answer.

X A Windows

X B Linux

X C Both

2. SAP PCo has which of the following communication patterns?


Choose the correct answer.

X A Notification Communication

X B Query Communication

X C Destination system calls with response processing

X D All the above

© Copyright. All rights reserved. 22


Unit 1

Learning Assessment - Answers

1. SAP PCO can be installed on which of the following:


Choose the correct answer.

X A Windows

X B Linux

X C Both

You are correct! SAP PCO can be installed on Windows.

2. SAP PCo has which of the following communication patterns?


Choose the correct answer.

X A Notification Communication

X B Query Communication

X C Destination system calls with response processing

X D All the above

You are correct! SAP PCo has notification, query, and destination system calls with
response processing communication patterns.

© Copyright. All rights reserved. 23


UNIT 2 Plant Information
Catalog

Lesson 1
Plant Information Catalog Services 25

UNIT OBJECTIVES

Understand the SAP MII Plant Information Catalog

© Copyright. All rights reserved. 24


Unit 2
Lesson 1
Plant Information Catalog Services

LESSON OBJECTIVES
After completing this lesson, you will be able to:

Understand the SAP MII Plant Information Catalog

Catalog Overview
Business Example
You are implementing an SAP Manufacturing Integration and Intelligence (MII) solution for a
company that has various sources of data, such as asset hierarchy from SAP ERP, and
various sources of shop floor-specific data such as open process control (OPC) data. You
need to visualize this data in near-real time to enable analysis and immediate corrective
actions.

Overview
Plant historian systems often contain large volumes of ad hoc data with strict naming
conventions, which makes it difficult to navigate, search, and extract data. You have to refer
to multiple systems to fetch data. SAP MII allows you to integrate with different plant data
servers, extract tags, and build a plant-specific, unified tag catalog; the Plant Information
Catalog (PIC). Here, you can create an alias namespace for a tag and restructure the tags to
make it simpler to search for them. Catalog services are used to logically group shop floor
assets into a hierarchical structure with aliases and hierarchies understandable from a
business user’s point of view.
The feature can broadly be divided into two parts; namely designing and consuming the PIC.
You can use the PIC to import production planning objects and production maintenance
objects from SAP ERP systems.
The production planning objects are the following:

Plant

Work Center

Capacity

The production maintenance objects are the following:

Functional Location

Equipment

Measurement Point

Catalog services include the following screens to configure:

© Copyright. All rights reserved. 25


Unit 2: Plant Information Catalog

Property Set

Category

Plant Information Maintenance

Plant Information Catalog

Change Lists

Approval Lists

Property Set

Figure 23: Property Set

You use the Property Set screen to associate properties within the property set with the
groups and tags on the catalog administration screen. A property set is a repository of the
default values of the properties.
The shop floor assets or logical groups have a set of common properties, the values of which
may differ. To enable you to add these common properties, the Property Set screen allows
you to define a set of properties and later assign the entire set to nodes in the Plant
Information screen.
You can add, edit, and delete property sets using the corresponding buttons.
You can assign a description, a data type, and a typical value to the property sets. The
following data types are allowed:

String

Integer

Double

Boolean

© Copyright. All rights reserved. 26


Lesson: Plant Information Catalog Services

Category

Figure 24: Category

A category is an identifier of a group or a tag in an enterprise. Property sets can be associated


with a category. The translation language defined in the category levels is user locale-specific.
You can use the Category screen to create, edit and delete categories using the
corresponding pushbuttons. You can add property sets to a category by using the Add
pushbutton in the Property Sets tab.
You can use the Localization tab to create language-specific category names.

Note:
Creation of property sets and categories is not mandatory; you can use the pre-
defined property sets and categories.

The following predefined categories are included:

SAP_Plant

SAP_FunctionalLocation

SAP_WorkCenter

SAP_Equipment

SAP_MeasurementPoint

The predefined categories are associated with property sets and properties. You cannot
modify or delete these predefined property sets and categories. You can add new property
sets to a predefined category.

© Copyright. All rights reserved. 27


Unit 2: Plant Information Catalog

Plant Information Maintenance


Overview

Figure 25: Plant Information Maintenance

The Plant Information Maintenance screen contains the hierarchical structure of assets from a
high level down to the tag and group level. This hierarchical structure provides business
context to the tags and their data by interfacing with the tag data servers in a generic way.
You can use the Plant Information Maintenance screen to create, modify, and delete groups.

Figure 26: Hierarchical Asset Structure

© Copyright. All rights reserved. 28


Lesson: Plant Information Catalog Services

The Plant Information Maintenance screen has the following screen areas:

Plant Information Sources

Plant Information Catalog

Details

Plant Information Sources Screen Area


Here you can perform the following tasks:

Browse for PCo data servers and display the list of groups and tags from the plant
historians

Browse production planning objects from the configured SAP ERP system

Plant Information Catalog Screen Area


Here you can perform the following tasks:

Create groups and tags

Rename and modify groups and tags

Delete groups and tags

Organize tags using the cut, copy, and paste functions

Map tags to the tags in the PCo data server

Disconnect tags from the PCo data server

Reset a PIC object; in other words, revert changes associated with production planning
objects before associating them with a change list

Note:
You can import or export PIC content as an XML document.

Details Screen Area

Figure 27: Details Screen Area

The following tabs are available:

General
Provides the basic details such as namespace, description, tag alias, server, category, and
search keywords

Property Sets

© Copyright. All rights reserved. 29


Unit 2: Plant Information Catalog

Displays the property sets associated with the selected node

Custom Property
Allows you to add properties that are specific to the node, meaning that the chances of
reusability in other nodes are fewer

Translate
Allows you to create language-specific descriptions for nodes. If a language is chosen then
a language-specific description is mandatory.

Log
Displays the actions that have been performed on the selected node. This tab also displays
the creation time of the node, the user who created it, the modification time, the modifier,
and the change list with which the object is associated.

Usage
Displays the object types being used for the selected node

Change Management
The actions below are tracked through a user-based change management process. If an
object is being worked on by one user, another user will not be able to modify that node.
The following tables show the actions that can be performed on a child when the parent node
is open or is being created, edited or deleted.

Table 1: Possible actions for the user who is performing the operation on the parent node
Create child Edit child Delete child

Parent node being Yes Yes Yes


edited

Parent node being No No No


deleted

Parent node being Yes n/a n/a


created

Parent node open (no Yes Yes Yes


operation taking
place)

Table 2: Possible actions for another user while someone is working on a specific node
Create child Edit child Delete child

Parent node being Yes Yes Yes


edited

Parent node being No No No


deleted

Parent node being No n/a n/a


created

© Copyright. All rights reserved. 30


Lesson: Plant Information Catalog Services

Parent node open (no Yes Yes Yes


operation taking
place)

Actions
New
You can create a tag or group by choosing the New pushbutton and choosing the type
accordingly.

Edit
The Edit pushbutton allows you to perform the following actions:
- Edit: Allows you to edit node details such as description, search keywords, property
sets, properties, and values.
- Cut/ Copy/ Paste: Allows you to rearrange the hierarchy. The objects that are cut are
marked for deletion, and disappear from the screen only after the change management
lifecycle is complete.
- Delete: Allows you to delete nodes. The deleted nodes are marked for deletion, and
disappear from the screen only after the change management lifecycle is complete.
- Rename: This operation marks the selected hierarchy for deletion and creates a new
structure with the new name.

Import
Allows you to import all or part of a catalog into the hierarchy as an XML file. The property
sets and categories associated with the nodes must exist in the target system, or the
import will fail.

Export
Allows you to export the entire catalog (starting from the Root node) or part of the catalog
(by selecting a group). The export will create an XML file.

Disconnect
Allows you to disconnect tags from the data server

Synchronize
Allows you to synchronize the properties of the master property set and changes to the
category to a group and tag

Group function
You can create a group under the root node or under any group with the following
properties:
- Name: Group name/node type
- Description : Group description
- Category: Node/group category; for example, SAP_PLANT, SAP_WORKCENTER

You can assign a property set and enter values to the properties for a group. By default,
the group does not have any tags; you have to create tags within a group.

© Copyright. All rights reserved. 31


Unit 2: Plant Information Catalog

Tag function
Tags are basically an alias of a unique identifier of an I/O point. Based on the OPC
specification, the client or server software is responsible for naming tags.

Plant Information Catalog

Figure 28: Plant Information Catalog

The Plant Information Catalog (PIC) screen is where the shop floor assets are arranged in a
hierarchical manner understandable to the business user. Here you can attach context
information to the mapped assets.

Name
Name of the tag/group created

Description
Description of the node

Namespace
Namespace in the PIC hierarchy

Operation
Denotes whether the node has the status New, Edit, Locked, or Marked for delete

Inactive
Applicable only for tags. It shows a disconnected symbol which means that the underlying
PCo tag has been removed from the PCo data server.

Category
Denotes the category to which the node is assigned

Sync Status
This can be Out of sync for the following reasons:
- Category is out of sync: The property sets contained in the category have changed and
the latest contents have not been updated in the PIC node.

© Copyright. All rights reserved. 32


Lesson: Plant Information Catalog Services

- Property set is out of sync: The contents of the property sets associated with the node
have changed and the latest contents have not been updated in the PIC node.

Change List
Overview

Figure 29: Change Process

The change list is similar to an activity in the Design Time Repository or in SAP NetWeaver
Development Infrastructure. It contains details about the changes made to objects in the
Plant Information Maintenance screen. You can create multiple change lists and associate
them with distinct objects. A single object cannot be part of multiple change lists. Operations
on the change lists are triggered from the Plant Information Maintenance screen and
maintained in a separate screen.
A change list can have one of the following statuses:

Open

Waiting for Approval

Rejected

Approved

Changes Applied

You can create a change list manually in the Change List screen, or automatically from a
dialog box in the Plant Information Maintenance screen. You can create a change list in
the Plant Information Maintenance screen only if no change list with the status Open exists. If
there are no change lists available, the status of the new change list is set to Open and it is
marked as Current .

© Copyright. All rights reserved. 33


Unit 2: Plant Information Catalog

Under View details, you can see the details for a particular change list, or reset a change list.
When you reset an object, the changes are reverted based on the status of the object. You can
reset an entire change list (at the header level) or individual changes within a change list (at
the line level).

Figure 30: Change List Creation

To create a new change list, select the existing change list item from the list and choose New.
A dialog box appears in which you can create a change list by entering a name and
description.

Approval Process and Change List Statuses


The approval process starts as soon as you submit a change list for approval. An approver
can review the changes made and either approve or reject the change list.
When a change list is approved by an approver, its status is set to Approved . The locks on the
objects are not removed, and the change list cannot be edited. The changes are applied on
the live version at a particular time. The versions are staged and the changes are applied
accordingly. When the changes are applied, the status of the change list is changed to
Changes Applied, the locks on the objects are removed, and the object statuses are set to
Open. When the status of the change list is Changes Applied, all entries for that change list are
removed and their status is set to Closed.
When a change list is rejected by an approver, its status is set to Rejected. The locks on the
objects are not removed. You can either reset the change list or choose Open for Edit to make
changes to the objects. If you choose Open for Edit, the objects are unlocked for your user,
but remain locked for other users.

Change List Status Object Status Action

Waiting for Approval The locks on the objects are A notification is sent to the
maintained. Further modifi- approvers. The link on the
cations of the objects are not landing page shows the up-
possible. Object status is dated number of change lists.
Locked For Approval . The approver can see the
change list in the approval
screen. The approver can ei-
ther approve or reject the
change list

© Copyright. All rights reserved. 34


Lesson: Plant Information Catalog Services

Change List Status Object Status Action

Approved The locks on the objects are The approver approves the
maintained. Further modifi- change list. The changes are
cations of the objects are not now staged. The changes are
possible. Object status is applied to the live version ac-
Locked For Approval . cording to the time sched-
uled in the scheduler. A notifi-
cation is sent to the approv-
ers and submitter about the
approval of the change list.

Rejected The locks on the objects are The approver rejects the
maintained. Further modifi- change list. A notification is
cations of the objects are not sent to the approvers and
possible. Object status is submitter about the rejection
Locked For Approval . of the change list. The sub-
mitter of the change list can
now either reset the change
list or open the change list for
editing.

Changes Applied Object status is set to Open. When it is time to apply the
changes, the changes are
copied to the live version.
New objects are added. De-
leted objects are deleted, and
are also deleted from the
working version. The values
of edited objects are re-
placed.

Note:
If an approver is the creator/submitter of a particular change list, then that
change list is not displayed on the approval screen for that approver.

E-mail Notifications
E-mail notifications are provided when a change list is submitted for approval, approved, or
rejected.
When a change list is submitted for approval:

An e-mail is sent to all approvers informing them that a change list has been submitted by
the user.

An e-mail is sent to the submitter informing them that the change list has been submitted.

When a change list is approved or rejected:

An e-mail is sent to the submitter and approver informing them of the approval or
rejection.

The e-mail contains the following information:

© Copyright. All rights reserved. 35


Unit 2: Plant Information Catalog

Change list name

Date created

Created by (the owner of the change list)

Description (if present)

Note (if present)

Link to access the change list

Note:
Separate e-mails are sent to the approver and submitter because the link to the
change list differs according to the role and permission level. The e-mail
notification is triggered as soon as a change list is submitted, approved, or
rejected.

Plant Information Catalog Query


You can use PIC queries in SAP MII to create templates that access the PIC connectors and
provide the following data:

Current values

Historical (time series) values

GroupList

TagList

HistoryEvent

ModeList

RetrieveProperties

Statistics

To create a PIC query you need to select the available servers that are connected from the
server list.

LESSON SUMMARY
You should now be able to:

Understand the SAP MII Plant Information Catalog

© Copyright. All rights reserved. 36


Unit 2

Learning Assessment

1. When will PIC hierarchy be available to use through Catalog Query?


Choose the correct answer.

X A Once after hierarchy created

X B Once after submitted for approval

X C Once after applying changes

X D Once after approval

2. Tag can be associated with which Category Type while creating Plant Information
catalogs?
Choose the correct answer.

X A SAP_MeasurementPoint

X B SAP_Equipment

X C SAP_FunctionalLocation

X D All of the above

© Copyright. All rights reserved. 37


Unit 2

Learning Assessment - Answers

1. When will PIC hierarchy be available to use through Catalog Query?


Choose the correct answer.

X A Once after hierarchy created

X B Once after submitted for approval

X C Once after applying changes

X D Once after approval

You are correct! PIC hierarchy is available once after applying changes.

2. Tag can be associated with which Category Type while creating Plant Information
catalogs?
Choose the correct answer.

X A SAP_MeasurementPoint

X B SAP_Equipment

X C SAP_FunctionalLocation

X D All of the above

You are correct! SAP_MeasurementPoint can be associated with which Category Type
while creating Plant Information catalogs.

© Copyright. All rights reserved. 38


UNIT 3 Self Service
Composition
Environment

Lesson 1
Self Service Composition Environment 40

UNIT OBJECTIVES

Understand the SAP MII Self Service Composition Environment

© Copyright. All rights reserved. 39


Unit 3
Lesson 1
Self Service Composition Environment

LESSON OBJECTIVES
After completing this lesson, you will be able to:

Understand the SAP MII Self Service Composition Environment

Overview
In this lesson, you will learn what the Self Service Composition Environment (SSCE) is and
what role it plays in creating solutions across applications and plants.

Business Example
You want to create a quick dashboard using SAP MII content (query templates, display
templates, MDO/KPI objects, and resource files), UI elements, and tags from the Plant
Information Catalog (PIC).
The SAP MII SSCE is a robust and lean standards-based platform for creating, designing,
configuring, and displaying dashboards according to your needs. It is based on SAP UI5 and
can be used by both business users and technical users.
You can use the SSCE to perform the following activities:

Create dashboards using any SAP MII content (query templates, display templates,
MDO/KPI objects, alert objects, SVG, images, existing pages, and resource files), UI
elements, and PIC tags

Configure the selected objects. Tags selected from the PIC can be positioned on images.
For each selected tag, you can configure colors, graphics, and icons to be displayed
according to specific conditions. A tag trend (line chart) is displayed when you move a tag
to an empty cell in the SSCE.

Use various display layouts

Save the created dashboards for later use

Customize the created dashboards by adding the saved content to the navigation tree

Use the saved dashboards to share information

Preview the created dashboards with either static or live images

Secure the dashboards by assigning roles

You can launch the SSCE by choosing Content Development Self Service Composition
Environment from the SAP MII menu as shown in the figure, Self Service Composition
Environment.

© Copyright. All rights reserved. 40


Lesson: Self Service Composition Environment

Figure 31: Self Service Composition Environment

Prerequisites
You must be assigned the following UME roles:

XMII_SSCE_CHANGE

XMII_SSCE_MIICONTENT_ALL

XMII_SSCE_UIELEMENTS

XMII_SSCE_PIC

Note:
From the MII Content component, you can access other MII objects for which you
have authorization.

In order to verify you have the proper roles and permissions for your user, you can use the
following URL to view your assigned roles: http://<server:port>/XMII/
PropertyAccessService?Mode=List

Figure 32: SSCE Components

© Copyright. All rights reserved. 41


Unit 3: Self Service Composition Environment

The SSCE is divided into the following components, as shown in the figure, SSCE
Components:

My Dashboards tab (1)

Design Dashboard tab (2)

Left hand side toolbar (3)

Right hand side pane bar (4)

Layout toolbar (5)

My Dashboards Tab
Overview

Figure 33: My Dashboards Tab

You can find all your dashboards and navigation links in the My Dashboards tab.

Figure 34: Sub Tabs

This tab has the following sub tabs:

All

Favorites

Navigation Links

All Sub Tab


The All sub tab lists all the dashboards that were created or modified by your logged in user.
The screen is divided into two parts; a tile view at the top of the screen and a tabular view
below it.

© Copyright. All rights reserved. 42


Lesson: Self Service Composition Environment

Figure 35: Tile View

The upper part of the screen contains a tile representation of the five most recent dashboards
that you created or modified.

Figure 36: Edit, Launch, Add Favorites

To modify the dashboard options displayed in this view, choose a dashboard to view the
following pushbuttons:

Edit
Opens the dashboard in design mode

Launch
Opens the dashboard in a new browser window

Add to Favorites / Remove from Favorites


Allows you to add or remove the dashboard to or from your favorites list

Figure 37: Tabular View

The lower part of the screen displays a tabular view of all the dashboards in a tabular form. To
enable the pushbuttons in the toolbar, select any row in the table.

© Copyright. All rights reserved. 43


Unit 3: Self Service Composition Environment

The following pushbuttons are available:

Edit
Opens the dashboard in design mode

Launch
Opens the dashboard in a new browser window

Add to Favorites / Remove from Favorites


Allows you to add or remove the dashboard to or from your favorites list

Delete
Deletes the dashboard

Favorites Sub Tab


The Favorites sub tab displays all the dashboards you have marked as favorites. All the
dashboards are represented as tiles.

Navigation Links Sub Tab


The Navigation Links sub tab displays all the navigation links that you have created and that
are accessible to the roles that are assigned to your user. All the navigation links are
represented as tiles.

Design Dashboard Tab


Overview

Figure 38: Design Dashboard Tab

You can create and design dashboards in the Design Dashboard tab. This tab is divided into
the following sub tabs:

Design

Preview

Source Code

Design Sub Tab


In this sub tab, you can create, edit, and design dashboards.

© Copyright. All rights reserved. 44


Lesson: Self Service Composition Environment

Figure 39: Page Layout

The following layout types are available:

Standard page layout


Allows you to choose one the available standard layouts provided with standard pages

Custom layout
Allows you to specify numbers of rows and columns according to your design
requirements

Figure 40: Create Dashboard

To customize the layouts further, you can merge or unmerge cells.


To merge or unmerge cells, choose Ctrl and use mouse clicks to select the cells to be
merged or unmerged.
This action is only available in custom layouts.

Preview Sub Tab


The Preview sub tab is available only when either an existing dashboard is opened or when a
new dashboard is being created. You can preview the dashboard before saving.

© Copyright. All rights reserved. 45


Unit 3: Self Service Composition Environment

Source Code Sub Tab

Figure 41: Source Code Sub Tab

The Source Code sub tab is available only when an existing dashboard is opened or when a
new dashboard is being created. By default, the auto-generated source code of the dashboard
is displayed.

Left Hand Side Toolbar


The left hand side toolbar contains icons to trigger all the actions which can be performed in
the SSCE.

Figure 42: Left Hand Side Toolbar

© Copyright. All rights reserved. 46


Lesson: Self Service Composition Environment

Figure 43: Dashboard Icons 1

Create Dashboard
This option allows users to create a standard page layout or a custom layout for the
dashboard

Open Dashboard
This option allows users to open the existing dashboard with search or browse options.
This is applicable to open existing dashboards.

Save Dashboard
This option allows users to save the dashboard.

Save Dashboard As
This option is available only for existing dashboards. The option is inactive for non-existing
dashboards.

Launch Dashboard in New Window


This option is available only for existing dashboards. The option is inactive for non-existing
dashboards.

Figure 44: Dashboard Icons 2

Delete Dashboard
This functionality is available only for existing dashboards. The option is inactive for non-
existing dashboards.

© Copyright. All rights reserved. 47


Unit 3: Self Service Composition Environment

Navigation Links
This functionality is used to create Navigation Links for the dashboards. Unlike MII
Workbench where the navigation links are created either for Users or for Roles, the
navigation links created in SSCE are always for the user logged in.
Created Navigation Links are available in:
- MII Portal Home Page
- My Dashboards – Navigation Links

Figure 45: Dashboard Icons 3

Maintain Security
This functionality controls the access rights of Users and Roles on each and every
dashboard.
There are 3 levels of permission:
- Read – allows only Open, Navigation Links, Launch and Favorite.
- Change – allows Save, Save As, and Maintain Security in addition to all the Read
permissions.
- All – allows Delete in addition to all the Read and Change level permissions.

Add to Favorites
This functionality is used to either add a dashboard to a favorites list or remove a
dashboard from a favorites list. This functionality is available only for existing dashboards.
The icon would remain inactive for non-existing dashboards.

© Copyright. All rights reserved. 48


Lesson: Self Service Composition Environment

Right Hand Side Pane Bar

Figure 46: Right Hand Side Pane Bar

The right hand side pane bar contains all the SAP MII objects which can be integrated in the
layouts to create dashboards.
The pane bar contains the following items:

MII Content
This item is further divided into the following:
- Display Templates : Contains all charts
- Query Templates : Contains all queries
- MDO/KPI Objects : Contains all MDOs and KPI objects
- Resource/Files : Contains web content such as HTML, JSP, IRPT, and images

UI Elements
This item contains a list of UI controls which can be used to create a form. The following
controls are available:
- Text View : Used to create a label
Text Field : Used to create an input field
Button : Used to create an action button
Drop Down Box: Used to create an options list

PIC
This item displays a tree view of all the PIC tags available in the SAP MII system.

Clipboard
This item comes into use only when two or more cells with some content are merged in a
layout. As the name suggests, the clipboard temporarily stores the content of merged
cells. This content can be dragged from the clipboard and dropped into any cell.

© Copyright. All rights reserved. 49


Unit 3: Self Service Composition Environment

Layout Toolbar

Figure 47: Layout Toolbar

The toolbar just above the layout contains actions which can be performed while designing
the dashboard. The following actions are available:

Title input field


This field is used to provide a title for the dashboard. If you choose this field, it becomes
editable.

Undo and Redo pushbuttons


These pushbuttons are used to undo or redo steps during dashboard design.

Live Mode checkbox


If this checkbox is selected, real-time content is shown while designing the dashboard. If it
is deselected, a static image is displayed for contents dropped into the layout cells.

Merge Cells and Unmerge


This action is only available for custom layouts. When multiple cells are selected for
merging, the pushbutton label reads Merge Cells. When a merged area is selected, the
pushbutton label reads Unmerge.

LESSON SUMMARY
You should now be able to:

Understand the SAP MII Self Service Composition Environment

© Copyright. All rights reserved. 50


Unit 3

Learning Assessment

1. User interfaces created through Self Service Composition Environment are accessible for
other users after publishing.
Determine whether this statement is true or false.

X True

X False

2. For the HTML pages created through SSCE, can you edit the source code from SSCE?
Choose the correct answer.

X A Yes

X B No

3. Where can you find the objects created through self service composition environment?
Choose the correct answers.

X A Through Self Service Composition Environment

X B WorkBench Catalog Tab

X C WorkBench Web Tab

X D WorkBench Objects Tab

4. User can access MII web objects in SSCE, which were created directly in MII Workbench.
Determine whether this statement is true or false.

X True

X False

© Copyright. All rights reserved. 51


Unit 3

Learning Assessment - Answers

1. User interfaces created through Self Service Composition Environment are accessible for
other users after publishing.
Determine whether this statement is true or false.

X True

X False

You are correct! User interfaces created through Self Service Composition Environment
are accessible for other users after publishing.

2. For the HTML pages created through SSCE, can you edit the source code from SSCE?
Choose the correct answer.

X A Yes

X B No

You are correct! You can’t edit the source code.

3. Where can you find the objects created through self service composition environment?
Choose the correct answers.

X A Through Self Service Composition Environment

X B WorkBench Catalog Tab

X C WorkBench Web Tab

X D WorkBench Objects Tab

You are correct! Through Self Service Composition Environment, WorkBench Web Tab.

4. User can access MII web objects in SSCE, which were created directly in MII Workbench.
Determine whether this statement is true or false.

X True

X False

You are correct! User can’t access MII web objects in SSCE , which were created directly
in MII Workbench.

© Copyright. All rights reserved. 52


UNIT 4 Energy Monitoring and
Analytics

Lesson 1
Energy Monitoring Scenario 54

UNIT OBJECTIVES

Understand the Energy Monitoring Scenario

© Copyright. All rights reserved. 53


Unit 4
Lesson 1
Energy Monitoring Scenario

LESSON OBJECTIVES
After completing this lesson, you will be able to:

Understand the Energy Monitoring Scenario

Energy Monitoring Scenario


Business Example
You are implementing an SAP MII solution for a company that has various sources of data,
such as an asset hierarchy from SAP ERP, energy meter data, and KPI definitions, and you
need to visualize the energy consumption data.

Overview
Manufacturing companies need to keep track of their key costs in order to be competitive in
the market. One of the most important aspects is energy cost, which plays a key factor in the
cost of the material being produced. Manufacturers need to have complete visibility of energy
consumption by line, by product, and so on, so that it is easy to identify any leaks and take
corrective action. Generally, customers tend to create custom applications on top of SAP MII
to do this energy analysis. These applications are typically not flexible or easy to roll out to
multiple plants.
With this in mind, SAP provides energy monitoring and analysis capabilities as part of SAP MII
15.1. The main objective is to collect the energy data once without any business context, and
to provide analytic capabilities with context available in the Plant Information Catalog (PIC)
and production events, such as order history, resource status available in SAP OEE, SAP ME,
or any third-party system.
Energy monitoring capability in SAP MII is a very good use case of the convergence of
information technology (IT) and operational technology (OT) enabling energy analysis across
your plant structure, depicted as a plant maintenance or production planning hierarchy
coming from an IT system such as SAP ERP, and meter data coming from the OT layer.

Master Data
The key master data for energy analysis is a hierarchical structure against which the analysis
needs to be done; for example, a facility hierarchy or an organizational hierarchy depicting the
complete structure including the meter. The PIC can be used to model the different
hierarchies sharing the different meters represented as tag categories; for example
electricity, water, or compressed air. The properties of each of the nodes can be used to filter
the energy data; for example, energy information only for a specific machine type. The node
properties can also be used to group the data; for example, energy information grouped by
line vendor.

© Copyright. All rights reserved. 54


Lesson: Energy Monitoring Scenario

Data Collection
The automated data required for the energy analysis is collected against the equipment ID
associated with the measurement point ID (tag). The required data collection frequency can
be defined with a regular time interval (such as every one, two, or five minutes) based on the
functional requirement.
A KPI object is used to collect equidistant energy data. The KPI has been enhanced to support
collecting equidistant energy data and providing analysis over a time scale shorter than an
hour.

LESSON SUMMARY
You should now be able to:

Understand the Energy Monitoring Scenario

© Copyright. All rights reserved. 55


Unit 4

Learning Assessment

1. KPI objects created can be assigned to the plant Information catalog. Which category type
is assigned to track the KPI object information?
Choose the correct answer.

X A SAP_MeasurementPoint

X B SAP_Equipment

X C SAP_FunctionalLocation

X D None of the above

2. Does the Energy Monitoring solution require automated data collection?


Choose the correct answer.

X A Yes

X B No

© Copyright. All rights reserved. 56


Unit 4

Learning Assessment - Answers

1. KPI objects created can be assigned to the plant Information catalog. Which category type
is assigned to track the KPI object information?
Choose the correct answer.

X A SAP_MeasurementPoint

X B SAP_Equipment

X C SAP_FunctionalLocation

X D None of the above

You are correct! SAP_MeasurementPoint is assigned to track the KPI object information.

2. Does the Energy Monitoring solution require automated data collection?


Choose the correct answer.

X A Yes

X B No

You are correct! Yes. Energy Monitoring solution requires automated data collection.

© Copyright. All rights reserved. 57


UNIT 5 SAP MII Web
Development Using Web
IDE

Lesson 1
Web IDE Integration 59

UNIT OBJECTIVES

Understand Web IDE Integration

© Copyright. All rights reserved. 58


Unit 5
Lesson 1
Web IDE Integration

LESSON OBJECTIVES
After completing this lesson, you will be able to:

Understand Web IDE Integration

Web IDE Project Creation


The first productive task that is required by a developer in Web IDE, is project creation.
Projects can be created as new or as an import.
The SAP Web IDE provides various ways for the creation of projects:

New
- From a template
- From a sample (reference) app

Import
- From a ZIP file on the file system
- From a SAPUI5 ABAP repository
- From HCP

A Web IDE project can be created by importing content from the SAPUI5 ABAP repository or
from a zip file on the system. The repository is where existing SAP Fiori apps are located. A zip
file allows the developer to be able to customize the settings of a project in the SAP Web IDE.
The following settings can be customized in a Web IDE project:

Code checking rules

JavaScript beautification

Mock data usage

Project types including SAP Fiori, and Web IDE plug-in creation

Run configurations

Supported languages, for example, English and German

Note:
When previewing the app, you can choose between the enabled languages.

Project Creation Steps

© Copyright. All rights reserved. 59


Unit 5: SAP MII Web Development Using Web IDE

The steps to create a project include:

1. Template selection

2. Basic information

3. Template customization

4. Confirmation

Figure 48: Create a Project

Several templates exist for creating new apps. The Template SAPUI5 Application is used.

Figure 49: SAPUI5 Template Selection

Templates can be categorized for:

Building SAP Fiori like apps

© Copyright. All rights reserved. 60


Lesson: Web IDE Integration

- Master details
- Fact sheets

Building SAPUI5 apps


- Basic UI5 apps
- Master details
- Kaspsel apps for the SAP Mobile platform

Building HCP Cloud portal apps


- Dependant on performance settings

Figure 50: Template Selection

The basic information required for the project is the Project Name and App Descriptor Data .

Figure 51: Basic Information

For the template customization, you must select the Initial View details, which include the
View Type and View Name.

© Copyright. All rights reserved. 61


Unit 5: SAP MII Web Development Using Web IDE

Figure 52: Template Customization

The project is confirmed by clicking Finish.

Figure 53: Confirmation

The project structure created within the Web IDE is shown in the figure, Project Structure.

© Copyright. All rights reserved. 62


Lesson: Web IDE Integration

Figure 54: Project Structure

Model View Controller

Figure 55: MVC

The Model View Controller (MVC) concept is used in Open UI5 to separate the representation
of information from the user interaction. The MVC is comprised of the following elements:

Model: Manages application data


- Acts as a bridge between the view and the application data
- Used to get the request from the view and respond as per the user’s input
- Doesn’t depend on classes

View: Defines and renders the UI


- Responsible for managing user information displays
- Based on model

Controller: Reacts to view events and user interaction by modifying the view and model
- Responsible for taking the input given by devices and communicates to model/view
and to trigger correct action

© Copyright. All rights reserved. 63


Unit 5: SAP MII Web Development Using Web IDE

- Based on model

I18n: For globalization and localization


- Framework uses a language code of type string for the identification of languages
- SAPUI5 provides two options to use localized texts in applications, the
jQuery.sap.resources module and data binding
- Contains key-value pairs where the values are language-dependent texts and the keys
are language-independent and used by the application to identify and access the
corresponding values

The separation has the following advantages:

It provides better readability, maintainability, and extensibility.

It allows you to change the view without affecting the underlying business logic and to
define several views of the same data.

Views and controllers usually form a 1:1 relationship (but standalone controllers and views are
possible).

SAP MII Features for SAP Web IDE


The MII plug-in enables the import and edit of MII projects in SAP Web IDE when you have
done the following:

Subscribed to SAP Web IDE full-stack and configured the following additional properties in
the SAP HANA Cloud platform cockpit:
- WebIDEEnabled: true
- WebIDEUsage: MII_Dest

Configured SAP NetWeaver as an intermediary server

Enabled the SAP MII feature in SAP Web IDE full-stack

Assigned the SAP_XMII_WebIDE_User role to your user

Configure MII Features on the Full Stack Web IDE

1. Select the Tool menu.

2. Choose Preferences Features.

3. Enable MII features and save them.

4. Open the Code Editor., and choose File Import from SAP MII System .

Note:
For an import, you will require Cloud Connector and an on premise system.

5. Open Cloud Connector https://localhost:port/ , and login using your credentials:

User: Administrator

Password : *********

© Copyright. All rights reserved. 64


Lesson: Web IDE Integration

6. Select the Cloud to on-premise system http://Server:Port/XMII/Menu.jsp and enter the


same user and password details.

7. Add the back end system as an SAP Application Server Java.

8. Add an internal and virtual host.

Figure 56: Internal and Virtual Host

9. Add resource accessible to /XMII .

Figure 57: Resource Accessible

10. Add the destination of the on-premise system as a sub account.

Figure 58: Destination

11. Check the connection for the on-premise system. After a successful connection is
established, you can import a project from the SAP MII system.

12. To test the connection, open the MII Workbench, download it, and change its extension
from .jsp to .jnlp .

© Copyright. All rights reserved. 65


Unit 5: SAP MII Web Development Using Web IDE

13. Run the file.

14. Add files from the Workbench and do a synchronization from Web IDE.

15. Refresh the Workbench and the Create file appears in the Workbench.

LESSON SUMMARY
You should now be able to:

Understand Web IDE Integration

© Copyright. All rights reserved. 66


Unit 5

Learning Assessment

1. Web IDE can access MII Objects that are available in the Catalog tab.
Determine whether this statement is true or false.

X True

X False

2. What subscription is required to access MII Content on WebIDE?


Choose the correct answer.

X A SAP Web IDE Full-Stack

X B SAP Web IDE

X C Either one

3. When a user imports files to Web IDE, only files with extensions HTML, JS, and IRPT are
imported.
Determine whether this statement is true or false.

X True

X False

4. Additional properties that need to be configured in the SAP HANA cloud platform cockpit
are:
Choose the correct answers.

X A WebIDEEnabled: true

X B WebIDEEnabled: false

X C WebIDEDisbled: true

X D WebIDEUsage: MII_Dest

© Copyright. All rights reserved. 67


Unit 5

Learning Assessment - Answers

1. Web IDE can access MII Objects that are available in the Catalog tab.
Determine whether this statement is true or false.

X True

X False

You are correct! Web IDE can’t access MII Objects that are available in the Catalog tab.
Read more on this in the lesson Web IDE Integration.

2. What subscription is required to access MII Content on WebIDE?


Choose the correct answer.

X A SAP Web IDE Full-Stack

X B SAP Web IDE

X C Either one

You are correct! SAP Web IDE Full-Stack is required to access MII Content on WebIDE.

3. When a user imports files to Web IDE, only files with extensions HTML, JS, and IRPT are
imported.
Determine whether this statement is true or false.

X True

X False

You are correct! When user imports files to Web IDE ,only files with extensions HTML, JS,
and IRPT are imported.

© Copyright. All rights reserved. 68


Unit 5: Learning Assessment - Answers

4. Additional properties that need to be configured in the SAP HANA cloud platform cockpit
are:
Choose the correct answers.

X A WebIDEEnabled: true

X B WebIDEEnabled: false

X C WebIDEDisbled: true

X D WebIDEUsage: MII_Dest

You are correct! WebIDEEnabled: true, WebIDEUsage: MII_Dest.

© Copyright. All rights reserved. 69


UNIT 6 NWDI Infrastructure

Lesson 1
SAP MII Source Control Using NWDI 71

UNIT OBJECTIVES

Understand the NWDI Infrastructure

© Copyright. All rights reserved. 70


Unit 6
Lesson 1
SAP MII Source Control Using NWDI

LESSON OBJECTIVES
After completing this lesson, you will be able to:

Understand the NWDI Infrastructure

SAP MII Source Control Using NWDI


NetWeaver Development Infrastructure (NWDI) combines the features and benefits of a local
development environment with a server supported development landscape, which provides a
consistent central environment, for example, a local IDE is enhanced with a set of central
services. The central services provide development teams with a consistent local
development environment and the necessary infrastructure for development though the
entire life cycle of a product.
The configuration of NWDI and its integration with SAP Manufacturing Integration and
Intelligence (MII) requires some initial process steps to be carried out. After all the
configuration steps are completed, you can enable some NWDI features via the SAP MII
Administration UI so that you can use NWDI powered processes. These include versioning,
building, and changing controls, in your development of the SAP MII content.
The development infrastructure consists of the following central services:

Design Time Repository (DTR)


DTR is a central storage of design time objects (application source code) that supports
distributed versioning. Access to the central storage is through the standard WebDAV and
DeltaV protocols.

Component Build Service (CBS)


CBS plays a central role in the realization of the concepts of NWDI. It offers centralized
build services, storage of build results, and build tools.

Change Management Service (CMS)


CMS is used for the configuration of the landscape, transport software changes within the
landscape, and packaging and delivery of the components being developed using NWDI.

System Landscape Directory (SLD)


SLD provides services to administer the system landscape, which usually consists of a
number of hardware and software components that depend on each other with regards to
installation and upgrades.

Dev Studio (NWDS)


NWDS is the Netweaver Developer Studio, based on Eclipse platform, which enables
development of Java, J2EE, WebDynpro, and a host of other applications. This is already
integrated with NWDI.

© Copyright. All rights reserved. 71


Unit 6: NWDI Infrastructure

MII Workbench
MII Workbench is the development platform for creating MII Content. The MII Workbench
is integrated with NWDI. Any code object created in MII Workbench can be added to NWDI.

Figure 59: NWDI Integration

By using NWDI, you can resolve version control issues. It is possible for multiple developers to
work on different objects as NWDI provides check in and check out options for all the objects
developed or modified within the MII Workbench once the objects are within a shared project.
NWDI integration provides the ability to do the following in MII:

Publish MII content to the SAP DTR.

Integrate into the MII Workbench environment.

Manage MII content status in the central repository from within the MII Workbench.

Provide central administration & management of files in NWDI system.

Employ version control and life cycle management of MII content.

Allow for the check in and check out of content to support distributed MII development.

Provide centralized transport control via NWDI Web interface.

Revert the current version of content back to a previous version in the repository, and to
be able to preview the content.

Create activities to group a set of changes in order to track what MII Content was changed
(for example, bug fixes, enhancements, etc…)

Use MII content in NW Dev. Studio and manage content in CMS Web UI.

Provide content that supports both shared and unshared projects depending on the
requirements.

Deploy shared MII projects for controlled content roll-out.

© Copyright. All rights reserved. 72


Lesson: SAP MII Source Control Using NWDI

Figure 60: MII, NWDI, CTS+ Landscape

The following steps show you how to use NWDI source control features on the MII
Workbench:

1. Login with NWDI user role Workbench Source Control Login.

2. Create a shared project.

3. Create an activity by software component.

4. Create/modify new objects by assigning to the activity.

5. Check in all the objects before activating the activity.

6. Activate the activity.

7. Release the activity using NWDS (this activity will be released to CMS Consolidation).

8. In CMS, track, import the objects into consolidation, and consolidate (in the Consolidation
ab)

9. Assemble the objects in the Assembly tab and follow prompts for CTS + transport request
(auto/manual).

LESSON SUMMARY
You should now be able to:

Understand the NWDI Infrastructure

© Copyright. All rights reserved. 73


Unit 6

Learning Assessment

1. Once integrated with NWDI, any object created on MII Workbench can be added to NWDI.
Determine whether this statement is true or false.

X True

X False

2. The Source Control option on Workbench is available only if NWDI is integrated with SAP
MII Workbench
Determine whether this statement is true or false.

X True

X False

© Copyright. All rights reserved. 74


Unit 6

Learning Assessment - Answers

1. Once integrated with NWDI, any object created on MII Workbench can be added to NWDI.
Determine whether this statement is true or false.

X True

X False

You are correct! Once integrated with NWDI, any object created on MII Workbench can be
added to NWDI.

2. The Source Control option on Workbench is available only if NWDI is integrated with SAP
MII Workbench
Determine whether this statement is true or false.

X True

X False

You are correct! The Source Control option on Workbench is available only if NWDI is
integrated with SAP MII Workbench.

© Copyright. All rights reserved. 75

You might also like