SCADA Integration with SAP using SAP PI – Part 3

SCADA Integration with SAP using SAP PI – Part 3 –Interface

In my previous blogs, we saw Systems Integration and how they communicate in exchanging Tag values using a testing tool. Let me discuss about the Interface with actual systems involved. I mean Sap ERP TSW, SAP PI, OPC Gateway Systems, and SCADA Servers (OPC Server). Based on the two previous blogs I hope you got an idea on systems involved.

If you look in to the Business Case, Interface was demanding communicate with Decentralised SCADA servers. They were 10 instances of SCADA Servers in the Landscape, primarily provided by INVENSYS and TELVENT. All the instances will contain same Tags and Values based on the periodic synchronization of the instances. Our requirement was to fetch the values for specific tags based on the availability of the instances. There were some primary instances which will be given priority and rest of them as redundant instances.

IMG 3.1 Interface Technical Connectivity

In ERP TSW module this Read Interface has to be executed at a scheduled time every day to get the Tag values and store it in Z Tables. These values are utilized by the module to finalise Allocations, based on which Ticket Creation, Delivery Creation and Billing Creation happens [Refer IMG 1.1: Business Process] in my first blog of this series.

So to fetch the tag values in ERP all the Tags relevant to the SCADA server instances are stored in Z Table and used to create a proxy request for Read operation with the relevant tags.

Synchronous Communication

Onward Journey -->

  1. In ERP - TSW module a background program which executes every day at scheduled time sends a client proxy request containing SCADA TAG’s to SAP PI.
  2. In SAP PI Read Interface is executed which receives client proxy request and transforms message using operation mapping.
  3. Resultant of this mapping will be mapped as an Operation – Message called ReadSoapIn of Web Service provided by OPC GATEWAYs.
  4. Using conditional routing in Read Interface, SAP PI sends to ReadSoapIn operation to available OPC GATEWAY using a SOAP request.
  5. In OPC GATEWAY a corresponding Web Service will receive SAP PI’s ReadSoapIn request, and sends the request to OPC SERVER in SCADA using .NET program and COM/DCOM technology.

Synchronous Communication

<-- Return Journey

  1. OPC SERVER processes the request and reads the values related to the requested TAG’s, and sends response back to OPC GATEWAY.
  2. OPC GATEWAY will send the response using Operation – Message ReadSoapOut to SAP PI.
  3. SAP PI receives the response using ReadSoapOut Message, this message gets transformed to ERP client proxy response.
  4. ERP client proxy program update relevant table with TAG Values for all OPCSERVERS available.

TAG Values in table will be used for finalizing allocations, ticket creation, delivery and billing.

Now will see abstract of objects which are needed in SAP PI.

Sender and Receiver Message Structures with Mappings in PI:

IMG 3.2 Message Mapping Request

IMG 3.3 Message Mapping Response

Receiver Determination:

In ERP a program controls the flow of Interface, to which Gateway and to which SCADA (OPC Server) request is sent. Based on the source field value the receiver OPC Gateway is determined, and Web Service specifically running for particular OPC Server will be triggered in OPC Gateway based on the request XML.

IMG 3.4 Receiver Determination

Receiver Communication Channel:

IMG 3.5 Communication Channel Receiver

XML - Request:

IMG 3.6 XML Request

XML – Response

IMG 3.7 XML Response

I hope this blog series helped you in understanding SCADA systems integration with SAP.

SAP Developer Network SAP Weblogs: SAP Process Integration (PI)