Introduction
SAP Net Weaver Process Integration (SAP PI) is
SAP enterprise application integration (EAI) software, a component of the
NetWeaver product group used to facilitate the exchange of information among a
company's internal software and systems and those of external parties.
While implementing the SAP ERP in a large
business establishment, it is found that not all sections can be brought under
the SAP ERP. Many of the business sections may have their own proprietary
tools, which are highly complex and may not be possible to replace. They run
parallel to the SAP System. They are called the Legacy Systems. Then it becomes
necessary to integrate between the SAP Systems and such pre-existing non-SAP
System. This is where the SAP PI comes into play.
Why do we need SAP PI?
Apart from Legacy Systems, in a large business
establishment, SAP ERP does not consist of a single system but several
integrated systems i.e. CRM, SRM and FICO etc. To handle with such complexities
SAP introduced Process Integration a platform to provide a single point of
integration for all systems without touching existing complex network of legacy
systems. This is a powerful middleware by SAP to provide seamless end-to-end
integration between SAP and non-SAP applications inside and outside the
corporate boundary. SAP PI supports B2B as well as A2A exchanges, supports
synchronous and asynchronous message exchange and includes built in engine for
designing and executing Integration Processes
Lifecycle of SAP
PI
•
The first version of Exchange
Infrastructure is XI 2.0 then XI 3.0
•
Exchange Infrastructure 2.0.
Release Date : Dec 2003
•
Exchange Infrastructure 3.0.
Release Date : Dec 2005
•
Process integration is from PI
7.0, PI 7.1, PI 7.11 & PI 7.30
•
Process Integration 7.0. Release Date : June 2006
•
Process Integration 7.1. Release Date : July 2008
•
Process Integration 7.11. Release
Date : July 2009
•
Process Integration 7.30. Release
Date : May 2011
•
Process Orchestration from PO
7.31, PO 7.4 & PO 7.5
•
Process Orchestration 7.31.
Release Date : May 2012
•
Process Orchestration 7.4. Release Date : May 2013
•
Process Orchestration 7.5. Release Date : Oct 2015
•
Single stack ESB was introduced
from SAP PI 7.30 released on
May 2011.
Single
stack and dual stack
When PI was first released, not all components
were built on the same platform. Integration Engine and Business Process Engine
was built in ABAP while Adapter Engine, Integration Builder, SL, CM and Mapping
Runtime were built in Java. Therefore, PI needs both the Java and the ABAP
environment to run and is known as the dual stack.
But in the later version all
the components are built in Java. Some of the dual-stack components are either
not used or modified to work on the Java stack. Therefore, PI needs only the
Java environment to run and that is called single stack.
Architecture of SAP
PI
We can divide the SAP PI into several areas
- Integration Server
- Integration Builder
- System Landscape
- Configuration and Monitoring
Integration Server can be termed as the Central Processing Engine of SAP PI. All the
messages in PI gets processed here in this engine.
It
consist of three different Engines. Those are
- Advanced
Adapter Engine
- Integration
Engine
- Business
Process Engine
Advanced Adapter Engine
- Runs on Java stack.
- Converts native data to PI messages and vice versa.
- Forwards messages to Integration Engine for further processing.
Adapters in Advance Adapter Engine : FILE, JDBC, JMS, SOAP, RFC, WS-ADAPTER, REST SFTP, AS2, EDISEPARATOR, OFTP, X400, ODATA, SFSF, BC, CDIX, RNIF, RNIF11,
WS_AAE, HTTP_AAE, ICOD_AAE
Integration Engine
- Runs on ABAP stack.
- Processes the messages according to the configuration defined in the Integration Builder.
- Adapters in integration engine : IDOC and HTTP
Business Process Engine
- Uses SAP workflow Engine.
- Executes the Business Process Management
(BPM) steps.
Integration Builder is a client-server framework
for accessing and editing integration objects and it consists of two related
tools:
- Enterprise Service Repository – to design and develop
objects to be used in scenarios
- Integration Directory – to configure the ESR
objects to develop scenarios
Two together, we built
integration processes which are commonly called scenarios.
The System Landscape is a central repository of
information about software and systems in data center and simplifies the
administration of your system landscape.
In Configuration and Monitoring, we can monitor the messages
and adapters.
A
message in PI can be of two types:
Synchronous - has both the request-response part
Synchronous messages are flagged with Quality
of Service (QoS) Best Effort. In this case,
further processing in the sending
application is blocked until a response is received.
Asynchronous - has either the request or the response part only
Asynchronous messages are processed with
Quality of Service Exactly Once (equivalent to tRFC) or Exactly Once In Order
(equivalent to qRFC).
In
PI, message is represented by an interface.
Interface
-> structure of the message in XML format + direction
Based
on the above criteria, there are three types of interfaces
1. Outbound
interface – connect to the
sender system
2. Inbound
interface – connect
to the receiver system
3. Abstract
interface – connect
to the BPE
Architectural differences-AEX
SAP PI Homepage
The SAP PI tools Home screen looks like this
This home page can be
accessed by using the tcode sxmb_ifr from your SAP GUI or using the URL: http://<host>:5<instance#>00/dir/start/index.jsp
The
SAP PI home page consist of four main java links:
- Integration Builder :
Enterprise Service Repository
- Integration Builder :
Integration Directory
- System Landscape
- Integration Monitoring
: Configuration and monitoring
Creating the products, software component and
assigning Technical system and business system to the created products is
done in the System Landscape
directory(SLD). Design these objects is done in the Enterprise Service
Repository(ESR),configuration in the Integration Directory and monitoring in
the Runtime Workbench.
Enterprise Service Repository
In SAP PI, Enterprise
Service Repository is used to design and create objects to be used in the
integration scenario. You can design Interface Objects, Mapping Objects and the
different integration processes.
The following are the Interface
Objects
·
Service Interface
·
Data type
·
Message type
Mapping of messages is
done as per the sender and the receiver data structure
Integration process:
Operation Mapping is used for
converting the source structure to target structure if data structure is
different. Complex Operation Mapping can be simplified using Message Mapping.
Message Mapping can be implemented
in the following ways −
- Graphical
Mapping
- Java
Mapping
- XSLT
Mapping
- ABAP
Mapping
Mapping
is used for transformation of one structure (input) to another structure
(output). And the transformation rules are defined by the mapping program.
Mapping programs are developed at design time using Enterprise Services
Repository or any other tool. These mapping programs are used at run time
during the transformation of different structures using the configuration
information provided using the Integration Directory.
Graphical Mapping
Can
be designed by using graphical editor provided in the ESR.
XSLT and Java Mapping
- For
these two, there is no tool support in PI. To make them available for the
integration server, they have to be developed externally and imported into
the ESR as JAR files.
- Can be
designed externally and imported into ESR.
- Java mappings
are implemented by using a specific class.
- XSLT
mappings are designed by using various tools like Stylus studio, Altova
XML Spy etc. as runtime supports XSLT processor.
ABAP Mapping
An
ABAP functional module or program can be used for transforming messages.
Integration
Directory
Here we make the pipe-line steps by configuring the ESR objects
created earlier. These steps are executed by the integration engine during
run-time.
Before we start the
configuration we need to create/import the following objects in the DIR.
- · Service - Business System/ Business Service/ Integration Process
- Communication Channel
Service allows you to address the sender or the receiver of
messages. Depending on how you want to use the service, you can select from the
following service types:
- Business
System
- Business
Service
- Integration
Process Service
Communication channel determines
the inbound and outbound processing of messages. The messages are converted
from native format to soap-xml specific message format and vice-versa through
the adapter. Generally, there are two
types of communication channel in a scenario: Sender Communication Channel and Receiver Communication Channel.
The pipe-line steps are created by
creating the following 4 configuration in the DIR:
·
Sender Agreement −
this determines how the message is transformed by Integration server.
·
Receiver Determination −
this is used to determine information of receiver to whom message to be sent.
·
Interface Determination −
this is used to determine the inbound interface to which the message is to be
sent. This also determines the interface mapping for processing the message.
·
Receiver agreement −
this defines how a message is to be transformed and processed by the receiver.
Aspects of an incoming
message
Inbound Processing – Inbound processing
defines how the incoming message has to be transformed technically to the XML
message format that the integration broker can understand.
Routing - Defines to which
receivers the incoming message is to be sent to. The configuration of routing
may also include routing conditions.
Mapping - Defines how the
business data of the message is to be transformed with regard to a particular
receiver.
Outbound processing - Defines how the
incoming message has to be transformed technically with respect to a specific
receiver. Outbound processing again implies a technical transformation step: A
transformation from the XML message format that the integration broker speaks
to the protocol or standard that the receiver system can handle
Integrated
Configuration
Integrated Configuration object
allows configuring Local Processing in the Advanced Adapter Engine
New Directory object that includes
multiple configuration objects into one and hence called “Integrated”
configuration object.
Used for configuring local
processing within advance adapter engine.
Integrated Configuration=Sender
Agreement +Interface Determination + Receiver Determination+ Receiver
Agreement.
The ICO is transferred as one
single object to the AAE.
System
Landscape
The System
Landscape Directory contains the information about landscape and software
component versions. A SAP system can be configured to register under this
directory. System Landscape Directory (SLD) manages information about all
installable and installed elements of your system landscape.
You can find the
following links in a web page:
Landscape:
Under Landscape, you
can find the following options −
- Technical Systems − You can view and define systems and servers.
- Landscapes − You can view and configure group of systems.
- Business Systems − You can view and configure business systems for use in
Process Integration.
Software
catalog
- Products − This is to view products in SAP software catalog.
- Software components − This is to view software components in SAP Software catalog.
Development
- Name Reservation − This is used for name reservation and also for NW
development.
Products and components are the information
about all available SAP products and components, including their versions. If
there are any third-party products in the system landscape, they are also
registered here.
Component
Information are used in the ESR to define the Product and the SWCV.
Technical
systems are application systems that are installed in your system landscape.
Business
System are used in the Directory for defining the sender and receiver of
messages.
Configuration
and Monitoring
The Configuration
and Monitoring option on SAP PI tools Home Page allows you to monitor the
functions of the integration engine, CCMS integration and process monitoring
infrastructure in SAP system.
It is the central entry point for
monitoring purposes. This gives you the option of navigating to the monitoring
functions of the Integration Engine, as well as integration with the Computing
Center Management System (CCMS), and the Process Monitoring Infrastructure
(PMI) of SAP.
- Component monitoring - monitoring the different SAP PI components (Java and ABAP
parts).
- Message monitoring - tracking the message processing status within an SAP PI
component and on error detection and analysis.
- End-to-end monitoring - monitoring of a message lifecycle from the SAP PI point of
view.
- Performance monitoring - statistics about different performance aspects of SAP PI can be
accessed through the RWB. Here, you can select and aggregate performance data,
for example, by component, time range, or message attributes.
- Index administration - by administering and monitoring the indexing of messages per
SAP PI component, you enable an index-based message search that you can use in
message monitoring. This kind of message search offers you enhanced selection
criteria including adapter-specific message attributes and terms or phrases
from the message payload
- Alert configuration - by using the Alert Framework, central monitoring in PI can be
provided with all errors reported during message processing in ABAP and Java.
This enables an improved reaction to such errors in both the ABAP runtime and
the Java-based Adapter Engine. For this purpose, the Alert Framework is
provided with rules based on certain events and on information from the header
of the PI message protocol. These rules determine whether alerts are send or
not. If an alert is sent, it can be used for error analysis.
- Alert inbox - the alert inbox is user-specific and displays all the alerts
for each alert server that has been generated based on the alert configuration.
- Cache monitoring - cache monitoring displays objects that are currently in the
runtime cache. Different cache objects are monitored depending on the cache
instance concerned.
Adapters in SAP PI
1
|
RFC
Adapter
This is used to communicate with other SAP systems using RFC
interface.
|
2
|
HTTP
Adapter/HTTP AAE Adapter
This allows the exchange of data using HTTP protocol. These
adapters are available both in the Integration Engine and also in the
Advanced Adapter Engine.
|
3
|
JDBC
Adapter
This allows access to databases.
|
4
|
File/FTP
Adapter
This is used to perform data exchange with external systems
using a file interface or an FTP server.
|
5
|
Mail
Adapter
This allows you to connect e-mail servers to the Integration
Engine.
|
6
|
IDoc
Adapter
This allows the exchange of IDocs. These adapters are available
both in the Integration Engine and also in the Advanced Adapter Engine.
|
7
|
XI
Adapter
This
adapter allows you to communicate using proxy. This adapter does not run in
the Advanced Adapter Engine and runs in the Integration Engine. XI Adapter is
used only for establishing the HTTP connection to the receiver.
|
8
|
JMS
Adapter
It
enables communication with messaging systems using the JMS API.
|
9
|
WS
Adapters
This adapter is used to provide the connectivity with WS
providers and WS consumers according to the standard Web Services Reliable
Messaging (WS-RM) protocol. SAP has developed the WS-RM protocol with its own
inbox, which is implemented in the ABAP stack on the Integration Engine.
|
10
|
SOAP
Adapter
It
allows the integration of remote clients or Web service providers using SOAP.
|
Transporting objects in SAP PI
In
Order to know how the transport mechanism in PI works we will first look at the
landscape that we are interested in.
We
use this procedure to transport any PI object or integration flows with their
referenced entities from a development to test environment or from a test to a
production environment using the File or CTS+ transport type. The File
transport type allows you to export the objects from a source system to a
locally stored .tpz file and import the file into a target system. If you want
to export objects from a source system and easily import to multiple target
systems in a landscape, you can choose CTS+ transport type.