SAP PI - Quick Guide
SAP PI - Introduction
SAP Process Integration is a part of the SAP NetWeaver platform. It is called SAP NetWeaver Exchange Infrastructure XI in NetWeaver 7.0 ehp2 and older versions. SAP NetWeaver Process Integration is a part of the NetWeaver software component and is used for exchange of information in company’s internal system or with external parties.
SAP PI/XI enables you to set up cross system communication and integration and allows you to connect SAP and non-SAP systems based on different programming language like Java and SAP ABAP. It provides an open source environment that is necessary in complex system landscape for the integration of systems and for communication.
SAP Process Integration is a middleware to allow seamless integration between SAP and non-SAP application in a company or with systems outside the company.
An application that is run on different systems that are part of different business units in a company or implemented in a distributed environment between different companies that have a business relationship with each other. In this environment, there is a need for seamless integration and transfer of information between different systems. SAP PI provides a middleware platform that doesn’t deal with how application components are implemented with a business logic and focuses more on data exchange between the different components.
You can consider SAP PI as a central instance or middleware that interconnects different systems. This middleware can be referred as SAP PI runtime engine and this communication is called mediated communication. When you compare this communication with a point to point scenario, it is easy to manage the systems and connections. In addition to all this, information related to integration is available at one central point.
The message exchange between the different systems using SAP PI contains business data. The communication message protocol is based on W3C standard SOAP messages.
Why do We Need SAP PI?
In an organization, SAP ERP doesn’t contain a single system but consists of a number of integrated systems like SAP CRM, FICO, EWM, etc. SAP PI provides a platform as single point of integration for all systems without touching complex legacy system for all data and information exchange.
The following are the key capabilities provided by SAP Process Integration −
Using SAP PI, you can connect different applications and systems that have different technical ways of communication. SAP PI provides you with a variety of adapters that allow you to connect applications based on different protocols like HTTPS or Remote Function Call (RFC).
Routing defines the rules for flow of messages between different systems at runtime.
SAP PI is used to connect different applications or systems in a distributed environment that can be set up between different companies, so there is a possibility that the structure of data exchange between two components differs from each other.
Mapping determines the structure of data in a source system to structure of data in a target system. It also determines the conversion rules that are applied to the data between source and target system.
SAP PI - Installation Options
When you run a scenario in SAP PI, the communication and processing capabilities depend on runtime engines that are installed with the installation of SAP PI. You can install one or more runtime engines on a host system. SAP PI provides the following two installation options −
Type 1 — Dual Usage Type
This installation is based on ABAP and Java and provides tools for designing and configuring integration content and also these runtime engines −
- Integration Engine
- Business Process Engine
- Advanced Adapter Engine
Type 2 — Advance Adapter Engine Extended AEX
This installation is based on Java and provides tools for designing and configuring integration content and contains Advance adapter engine as runtime engine.
SAP PI - Netweaver PI Architecture
SAP PI architecture consists of multiple components which are used at design time, configuration time and runtime. In SAP PI, the sender system is known as the source and the receiver is called the target system and the architecture is known as Hub and Spoke structure. The Spoke is used to connect with external systems and Hub is used to exchange messages.
A SAP PI system is divided into the following components −
- Integration Server
- Integration Builder
- System Landscape Directory SLD
- Configuration and Monitoring
This is a tool used to provide central monitoring of PI components and messages.
This is one of the key components of the SAP PI system and is used for processing of messages.
It consists of the following three engines −
- Business Process Engine
- Integration Engine
- Central Advanced Adapter Engine AAE
Business Process Engine
This engine is used for message correlation and deals with the processing of messages in ccBPM.
This engine is used for routing and mapping and provides central integration server services. If the source structure is different from the target structure, the integration engine calls mapping runtime as shown in the illustration below wherein, the source structure is converted to target structure.
A mapping runtime is based on Java Stack as mentioned under the SAP PI platform topic.
A message can be of the following two types −
Synchronous message is defined as message contains both the request-response part
Asynchronous message is defined as message contains either request or the response part only
In SAP PI, a message is represented by an interface. An Interface contains the structure of the message in XML format and the direction.
Central Advanced Adapter Engine (AAE)
As Integration Engine handles messages in XML and SOAP protocol, if the business system doesn’t contain data in a specific format, adapters are used to convert the messages specific protocol and message format required by the Integration Engine.
In SAP PI architecture, you can consider Adapter Engine as Spoke and Integration Engine as HUB to connect to external systems.
In SAP PI older releases dual stack system, most of the adapters were part of Java stack and only two adapters were part of ABAP stack.
Java Stack Adapters
The following adapters run on Java Stack −
RFC adapter, SAP Business Connector adapter, file/FTP adapter, JDBC adapter, JMS adapter, SOAP adapter, Marketplace Adapter, Mail adapter, RNIF adapter, CIDX adapter
ABAP Stack Adapters
The following adapters run on ABAP Stack −
|Sr.No||ABAP Stack Adapter & Description|
IDOC and HTTP Adapter
In the latest releases when SAP PI moved to the single stack system, these two adapters also moved to the Java stack and the new engine thus formed is known as Advanced Adapter Engine AAE.
Services Registry is a UDDI complaint registry, listing available Web Service Definitions (based on WSDL), extended with a classification system.
Enterprise Service Repository
This is used to store design time repository objects like mapping, interfaces and process definitions in the PI system.
System Landscape Directory (SLD)
This contains the information about landscape and software component versions. A SAP system can be configured to register under SLD.
This is used to configure the scenarios in PI system for exchange of messages between different systems.
SAP PI - UI Tools
You can use different SAP PI user interface tools to access different components of SAP PI system architecture. The most common UI tools are −
ES Builder − This tool provides Java user interface for working in Enterprise Service Repository ESR.
SAP NW Developer Studio − This is Java Eclipse-based tool to view and edit some object types in Enterprise Service Repository.
Integration Builder − This tool provides Java-based user interface to work in the Integration Directory.
This is SAP client tool to access ABAP stack of the SAP PI system.
The following illustration shows the different UI tools of SAP PI and the components that can be accessed using these tools −
SAP PI — Platform
Single Stack Vs Dual Stack
In SAP PI older releases, not all the components were based on a single platform. Few components like Integration Engine, Business Process Engine and Integration Builder were based on ABAP stack and other components like Enterprise Service Repository ESR, Integration Directory (SLD, Adapter Engine, etc.) were based on Java Stack. So these type of systems were called dual stack systems as PI required both ABAP and Java stack to run.
|ABAP Stack||Java Stack|
|Integration Engine||Enterprise Service Repository ESR|
|Business Process Engine||Integration Directory|
|Integration Builder||(Runtime Workbench, System Landscape, Adapter Engine, Mapping Runtime)|
In the latest releases of SAP PI, ABAP stack components are modified to work on Java stack so, SAP PI needs only Java stack to run and is called the single stack system.
SAP PI - Home Page
To open SAP PI Tools home page, use the following URL −
Example − http://scmehp2:50200/dir/start/index.jsp
SAP PI home page has the following four Java links −
- Enterprise Services Repository (ESR)
- Integration Directory (ID)
- System Landscape (SL)
- Configuration and Monitoring (CM)
Enterprise Services Repository (ESR)
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
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
Under Enterprise Service Repository, you can see different UI tools — Enterprise Service Builder and Web UI and Service Registry.
When you launch the Enterprise Service ES Builder application, you get an option to run the application for the first time as shown in the following screenshot. Click Run.
Once the application is launched, you get the following options −
- Main Menu Bar and Standard Toolbar at the top
- Navigation Area on the left side
- Work Area on the right side
The object editors are displayed in the work area. These object editors include functions that relate specifically to the objects that are open.
When you run Web UI, you will be prompted to enter the username and password.
In Web-based interface, you can perform the following tasks −
Search − Search for service interfaces, data types, and so on.
Subscribe − Subscribe for Notifications.
Manage − Manage lifecycle status of service interfaces, data types, and so on.
Integration Directory is used for the configuration of objects that are created in Enterprise Service Repository and configuration is executed by the Integration Engine at runtime. To configure ESR objects, you need to import object — Service and 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 inbound and outbound processing of messages by converting external native messages to SOAP XML format using Adapter Engine. Two types of communication Channel — Sender Channel and Receiver Channel.
In Integration directory, you can make four types of configuration −
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.
Under Integration Directory, you can see the Integration Builder. When you click the Integration Builder, you can see the different options to configure the objects created in ESR.
SAP PI - System Landscape Directory
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 −
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.
Products − This is to view products in SAP software catalog.
Software components − This is to view software components in SAP Software catalog.
Name Reservation − This is used for name reservation and also for NW development.
CIM Instances − This is used to view and maintain data on CIM level.
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.
Using Configuration and Monitoring, you can monitor the following functions −
Component Monitoring − To monitor different Java and ABAP components of SAP PI.
Message Monitoring − To monitor the status of message processing in a SAP PI component.
Performance Monitoring − Using runtime workbench, you can monitor different performance measures in a SAP PI system. You can create various aggregation reports.
End to End Monitoring − To monitor end to end lifecycle in SAP PI system for a scenario.
Message Index Search − You can perform Index-based message search in message monitoring and you can also search based on adapter specific selection, etc.
Alert Inbox − Alert inbox is as per the role assigned to a business user and is used for viewing all the alerts in SAP PI system as per configuration.
Alert Configuration − Alert framework in C&M allows you to report all the errors during message processing in ABAP and Java. Using alert configuration, you can define policy, if an alert has to be reported for error and to perform analysis or not.
Monitoring of Runtime Cache − This is used to view objects in runtime cache.
Let us see where these options are under Configuration and Monitoring in SAP PI tools Home Page. Under Configuration and Monitoring Home, you see the three options as in the following screenshot −
Under the Monitoring tab, you get 4 options as shown in the following screenshot −
Message Overview − This is used to get an overview of message processing during a specific time period. Messages are aggregated by the processing status.
Alert Inbox − This is used to process pending message-based alerts raised by SAP NetWeaver Process Integration. Alerts can provide you with runtime information and links to troubleshooting tools to facilitate faster problem isolation.
Message Search with Trex − This is used to search for messages using message payload content. You require the Search and Classification Engine TREX for indexing and searching documents. Additionally, you have set up and activated the message indexing.
Component Monitor − This is used to get the insight into the health status of the individual components of SAP NetWeaver Process Integration.
Configuration and Administration Tab
Under Configuration and Administration tab, you get the 3 options as shown in the following screenshot −
Message Indexing (Trex) − This is used to control and monitor the indexing for the index-based message search using the Search and Classification Engine TREX.
Alert Rules − To create and manage alert rules. In an alert rule, you define the runtime conditions under which the system generates an alert.
SLD Registration − This is used to check if the components of SAP NetWeaver Process Integration were registered correctly during the technical configuration phase. You can apply corrections to the registration as well register further components.
Under the Testing tab, you get the following two options −
Send Test Message
To simulate a message flow and verify that the SAP NetWeaver Process Integration runtime is functioning correctly by sending a test message to the Integration Engine or the Advanced Adapter Engine.
Cache Connectivity Test
This is used to inspect the cache connectivity status of the infrastructure components of SAP NetWeaver Process Integration and test their connectivity with the runtime caches.
SAP PI - Communication
In SAP PI, you can define two types of communication — Synchronous and Asynchronous.
Synchronous communication is invoked by request and response operation and process output is returned immediately after the operation. In general terms, you can say that a synchronous scenario is when a sender process sends a request to the receiver and waits for a response. If an error occurs at the receiver side, the sender application is responsible for sending the message again.
In this approach, there is a possibility that the sender might resend the message after time out and a duplicate message may exist. This approach in PI is known as BE (Best Effort).
Consider two systems – A and B. And, you introduce an intermediate system I between the two systems. Communication between System A and System I is synchronous and System A and System B is asynchronous.
The following types of errors can occur in this communication scenario −
Application Error − There is an error at the receiver end while processing a message and the sender is not aware about this error and keeps waiting for the reply.
Network level Error − In this error, there is an error in communication network between the sender and the receiver. Sender is not aware about this and the message is stuck in between and the sender waits till the operation timeout.
Error in Response Message − In this scenario, an error occurs and the response message gets stuck in between and sender keeps on waiting.
The following are the key advantages of using Synchronous Communication −
There is no need to configure response message routing.
There is no need to correlate response to a request.
In this communication, response is received immediately.
This is suitable for operations that involve read operations, for example, viewing a purchase order.
The following are the key disadvantages of using Asynchronous Communication −
In case of a failure, the sender needs to send a message again.
The receiving system should be configured to check duplicate messages.
In this scenario, the sender application is blocked till a response is received or a time out error occurs.
You can’t configure multiple receivers.
In Asynchronous Communication, you add an intermediate system or a middleware between two systems. When a Sender Application sends a request, it does not wait for the Receiver Application to send the response. If there is a failure due to some reason, the middleware is responsible for resending the message. If required, the receiving system can send a response back to Sender as a separate asynchronous call.
This approach in SAP PI is called Exactly Once (EO) or Exactly Once in Order (EOIO).
An intermediate system is a queue and message from A is first added to the queue and at receiver end, it is pulled from queue and send to receiver. The response message from system B follows the
You can also maintain order in certain situations as per business requirement by using First In First Out (FIFO). This scenario is called Asynchronous with order maintained or Exactly Once in Order (EOIO).
Asynchronous communication assures guaranteed delivery. If the receiver system is not available for sometime, then the intermediate queue keeps the message and it remains there till the receiver system is available and the message is pulled from queue and sent to receiver system.
This is recommended for modify operations like creating a purchase order or modify a purchase order
The following are the key advantages of asynchronous communication −
In case of failure, the SAP PI system ensures guaranteed delivery and will resend the message.
No configuration required for duplicate checks.
You can configure multiple receivers in this scenario.
Both the sender system and the receiver system need not be online at same time.
PI logs all the messages sent via asynchronous communication.
No time out as intermediate system keeps the message and response request.
The following are the key disadvantages of asynchronous communication −
In this scenario, the sender needs to correlate responses to request on its own.
Response message needs to be implemented and routed separately.
It doesn’t provide an immediate response.
SAP PI — Technologies
SAP provides a middleware based on NetWeaver called the SAP NetWeaver Process Integration. SAP NetWeaver PI delivers a message in specific format called the Simple Object Access Protocol (SOAP-HTTP). This message contains a header and payload. The header contains general information such as the sender and receiver information and the payload contains the actual data.
System can communicate with SAP NetWeaver PI directly or with the use of adapters −
- Communication using Application Adapters
- Communication using Technical Adapters
- Communication using Industry Standard Adapters
- Communication using Transaction Adapters
- Direct communication using Proxies
SAP PI - Securing Objects
For transferring information in the form of objects from one Enterprise Service Repository to other, you can select from the three means of transport −
- File System Based Transport
- Change Management Service (CMS)
- Change and Transport System (CTS)
The illustration shows two software components — Version A and Version B that have been transferred from ESRep_1 and ESRep_2 to other ESRep’s.
Transport Level Security
Transport Level Security includes the security of design objects while transferring over the network. While transferring objects you perform authentication and encryption at the transport level and authorization at end point. For internal communication you use Secure Socket Layer (SSL) for encryption and decryption of data across a secure connection. For external communication between SAP and non-SAP system, the type of encryption depends on the type of adapter used for communication.
SAP PI Adapters and Security Mechanism −
|HTTP based Adapter||HTTP||HTTPS|
|RFC based Adapter||RFC||Secure Network Communication|
|Mail Adapter||SMTP, IMAP4, POP3||HTTPS|
|File Adapters||FTP||FTP over SSL|
Transport Level Authorization
To achieve transport level authorization, you can use HTTP with client authentication. HTTP transport level authentication can use user name and password, X.509 certificates or SAP logon tickets.
Message Level Security
Message level security can be achieved using encryption techniques and digital signatures. Message to be sent over network is first encrypted by an encryption algorithm that includes a session key and a public key for encryption. Same session key and public key is used at the receiver’s side for decryption of message to see the content.
HTTP Transport Level
You can use the following mechanisms for HTTP Transport Level −
- User Id and Password
- X.509 certificates
- SAP Logon tickets
- Message Level Security
- WS Security
- XML Signature
- XML Encryption
SAP PI - Creating Objects
SAP PI is runtime environment that assigns inbound messages to receivers and maps them to another structure or protocol. SAP NW PI requires information about how the messages are to be processed. The information about the design objects are there in PI Enterprise Service Repository ESR and Integration Directory.
Systems that are connected to SAP PI are maintained in the System Landscape Directory (SLD). The data in SLD can be divided into the following categories −
- Software Component Information
- System Landscape Description
Software Component Information
It includes information about all available SAP software modules. It also includes possible combinations of software modules along with dependencies. For example, software component, release, support packages, OS versions and database etc.
To check this, go to System Landscape Directory (SLD)
To see all technical systems, their type, versions and last update, go to the Technical System tab.
To view products and software components, go to the Software Catalog option.
Once you click the Product tab, you can see all the products, and also their version and vendor name.
You can also check Software components, versions and Vendor name.
System Landscape Description defines the individual system landscape information. Data supplier provides SLD up to date system information at regular time periods.
SAP PI - Modeling Scenarios
A Model shows the exchange of messages between applications and its Design Objects like message types, data types, etc. Model is the basis of an integration configuration scenario and the input and output processing defines the routing of messages. SAP PI modeling scenarios are used to design an integration scenario in SAP PI.
You can use the following two integration scenario models −
- Process Component Architecture Model
- Process Integration Scenario Model
Process Component Architecture Model
The Process Component Architecture Model is used for application role SOA backbone. This model includes process component model, integration scenario model and process component interaction model. The process component model provides the detail of internal structure of a process component. The integration scenario model defines the complete scenario across different deployment units and process component. Process component model defines how different components interact with each other.
Process Integration Scenario Model
This is used for application role process integration scenarios. It is the design object of Enterprise Service Builder and is uniquely identified by a name and namespace and you can create multiple versions.
You need to define a business scenario and business process before you create a process integration model. Process integration steps are performed in applications. An application runs in the form of software component. You can also create multiple versions of software components and the relationship between application and software component is 1:1.
SAP PI - Design Objects
A Design Object is uniquely identified by the name and namespace and is assigned to one software component. You can create different design objects to perform various functions and few are mandate objects and others are optional in an integration scenario. Most common design objects include process integration scenario, message types, data types, mappings, etc.
The following table defines common design objects, their functions and use in a scenario −
|Integration scenarios||No||It is used to bundle all necessary design objects|
|Message types||Yes||It is used to encapsulate data types|
|Data types||Yes||It is used to describe structure of data to be exchanged|
|Service Interfaces||Yes||It encapsulates message types and parameters|
|Mapping||No||Mapping of message|
|Integration processes||No||It defines ccBPM workflows|
These Design Objects are often represented in the form of hierarchy.
SAP PI - Display Design Objects
Consider a company that has many interfaces and each interface contains a middleware. You want to see the different types of middleware that are used. This can be done by logging into SAP PI tools Start Page.
Step 1 − Use Integration Builder URL or T-code — SXMB_IFR.
Step 2 − Go to System Landscape Directory on SAP PI 7.3 screen.
Step 3 − Click Product as shown in the following screenshot. If you are prompted to enter username and password enter the details.
Step 4 − To see the technical system, the software component is assigned to, enter the product name and click Go.
Step 5 − Click the product name and go to the Installed System tab on the details pane. You can check the name of the assigned technical system there.
Step 6 − If you want to see which business system is derived from this technical system, select the technical system. You can also check it by going to the SLD home page → Business Systems.
Step 7 − Enter the technical system name and click Go.
Step 8 − Name the field that determines the name of the business system.
SAP PI - Integration Scenarios
To create an integration scenario in SAP PI, you need to create technical and business system in System Landscape Directory.
The SLD is implemented as a Java software component (SAP _JTECHT) on the SAP NetWeaver Application Server Java. It is based on the open Common Information Model (CIM) standard, and is defined and published by the Distributed Management Task Force, Inc. at www.dmtf.org.
The SLD is the central listing tool for application component information, products and software components, and system landscape data (technical and business systems).
In SLD, to move from business model to technical model you use relationship between process step and software component.
How to Transfer Software Components in SLD?
When you install the System Landscape Directory, the initial catalog is installed.
From SAP Market Place, you can import more up to date catalog.
You can also import your own software components and products depending on the project and integration scenario.
For A2A scenarios, business systems are used and they exist in SLD. For B2B scenario, you use business objects and they reside in Integration Directory.
Technical systems are part of the System Landscape Directory (SLD) and contain information about version, database and patch levels, operating system, etc.
There are different modes on the technical system −
- AS ABAP System
- AS Java System
- Standalone Java system
- Third Party
There are different import tools that can be used to transfer data from the technical system to SLD. SAP NetWeaver Administrator is common SAP AS JAVA > 7.1 import tool.
Business system acts as a sender and a receiver in SLD. They inherit the software components from technical systems as products. No new software components can be added to the business systems in SLD.
With SAP AS ABAP, each client is defined as one business system. In SAP AS Java, each technical system acts as a business system.
SAP PI - File to File Scenario
In SAP PI file to file scenario, we transfer a file from source system to target system. Once the components are built in SAP PI, you can transfer a file in SAP PI system by creating objects in the Enterprise Service Builder.
SAP PI — File to File Scenario Execution
Step 1 − Go to SAP PI Tools Page → Enterprise Service Builder under ESR.
Step 2 − To find the name of component under which objects have to be created, expand the component to find out the software component version.
Step 3 − Select the component → Right click, click New to create an object under this component.
Step 4 − The first object that we create is a namespace. Enter the namespace in the form of URL and click Create button at the bottom.
Step 5 − Once the object is created under software component, save and activate the object.
Step 6 − To Activate, click Activate as shown in the following screenshot −
Step 7 − Once the Namespace is saved and activated, create a data type. Go to software component → Right click → New. In the next window, select interface objects → data type.
Step 8 − Enter the name of Data Type and Namespace and click Create as above. Next is to insert sub element into the Data Type.
Step 9 − Enter the name of the element.
Step 10 − Insert sub element to add child employee id and name.
Step 11 − Define the type and occurrence. Occurrence defines how many times that element will appear in the file. You can select minimum occurrence and maximum occurrence value.
Step 12 − Click the Save button.
Step 13 − Activate the data type. Go to Data type → Activate.
Creating a Message Type
Step 1 − Right click Namespace → New
Step 2 − Under Interface Objects, select Message Type. Enter the fields.
Step 3 − Enter the name of Message Type.
Step 4 − By default, it takes the name of Namespace and Software components. If it doesn’t, you can select manually. Then, click Create.
Step 5 − Now, define the Data Type that you will be using for Message Type. Drag the Data Type from the left bar to the Data Type option under Message Type ( ). Click Save button.
Step 6 − Activate Message Type → Activate.
Note − If the structure of your input file and output file is the same, you can use one Data Type and one Message Type only. If the structure is different, you have to create two data types and message types for inbound and outbound. In this example we are using the same structure for both input and output file.
SAP PI - Creating Service Interface
Let us now understand how to create a service interface. We have to create two service interfaces — one for inbound and one for outbound.
Step 1 − Right click Namespace → New → Interface Objects → Service Interface
Step 2 − Enter the name of Service Interface (In – Inbound here) and by default, it takes the value of Namespace and the software component version. Click Create button.
Step 3 − In Inbound Service Interface, enter the category as Inbound and the the mode of communication as Synchronous or Asynchronous.
Step 4 − Now, define the Message Type by dragging it from the left pane to Service Interface Inbound Request Message as below. Click the Save button at the top.
Step 5 − Go to Service Interface and Activate after saving this Service Interface.
Step 6 − Similarly, create a Service Interface for outbound process.
Step 7 − You can select the Service Interface → Object → New.
Step 8 − Enter the name of Service Interface (Out represents outbound process).
Step 9 − Click Create button to create the interface.
Step 10 − In the next window, define the category and the mode of communication for Outbound Service Interface. As we have one message type for both service interfaces, drag the Message Type from the left pane to request message and click Save.
Step 11 − Once it is saved, click Activate button under the Service Interface button.
SAP PI - Creating Message Mapping
Let us now understand how to create Message Mapping to map inbound process to outbound process.
Step 1 − Go to Object → New → Mapping Objects → Message Mapping.
Step 2 − Enter the name of mapping name and click Create as shown above. Now, define source and target message. Drag the message under Message Type to source and target message under mapping.
Step 3 − Now, map these messages using the available mapping options. Select the function from dropdown and you can see different options available under each tab.
Example − You have first name and last name in the source file and you want the full name in the target file. Here you can use Concatenate under Text function.
Step 4 − We are now implementing file to file scenario so, we will just select source and target mapping and will directly map if the name and the structure are identical.
Step 5 − As the structure is the same, we will use the above method. In the next window, click Apply.
Step 6 − You can see all icons turn green and mapping is shown. Now, save the mapping.
Step 7 − Activate the Message Mapping. Go to Message Mapping → Activate. Once this Message Mapping is activated, create Operation Mapping in ESR.
SAP PI - Creating Operation Mapping
Let us now understand how to create Operation Mapping.
Step 1 − Go to Object → New → Message Objects → Operation Mapping.
Step 2 − Enter the name of Operation Mapping and click Create button.
Step 3 − In the next window, you need to enter Source Operation and Target Operation. Drag the Service Interface from the left pane to Source Operation and Target Operation. Inbound Service Interface will be dragged to Target Operation and Outbound Service Interface will be dragged to Source Operation.
Step 4 − Drag the Message Mapping to the Mapping Program option as in the following screenshot. Once you make these settings, click the Save button at the top.
Step 5 − Now, go to Operation Mapping → Activate → Activate → Close.
Step 6 − Go to Integration Builder under Integration Directory on SAP PI Tools Home Page to configure a scenario.
Step 7 − Go to Configuration Scenario View of Integration Builder.
Step 8 − To configure a scenario, go to Object → New → Under Administration tab → Configuration Scenario.
Step 9 − Enter the name of Configuration Scenario and click Create button.
Step 10 − Save and Activate the Configuration Scenario as shown in the following screenshot.
SAP PI - Creating a Communication Channel
Lets us now understand how to create a communication channel.
Step 1 − Right click Configuration Scenario → New
Step 2 − You have to create two communication channels — one for the sender and the other for the receiver. Select communication component for the sender and the receiver channel from the list of available components. Enter the name of communication channel and Click Create.
Step 3 − Select the parameters under Communication Channel. Go to Adapter and click the available adapter types. The Adapter Type depends on the type of scenario. For file to file scenario, you can select file adapter.
Step 4 − The following is a list of available adapters that can be selected for different scenarios.
Step 5 − The Adapter Type can be selected as the sender or the receiver depending on the type of communication channel.
Step 6 − Enter the path of the directory for source file.
Step 7 − Once you enter the source file, click Save. Click Activate button once the sender communication channel is saved → Activate → Close.
Step 8 − Similarly, you have to create a communication channel for the receiver. Enter the communication channel component and the name of communication channel for the receiver and click Create.
Step 9 − Select the Adapter Type as File and and then, select Receiver. Enter the Target Directory and the file name scheme as in the following screenshot −
Step 10 − Save the file and Activate the receiver communication channel. Once you create sender and receiver communication channel, create Integrated Configuration.
SAP PI - Creating Integrated Configuration
Let us now understand how to create Integrated Configuration.
Perform the following steps −
Step 1 − Go to Object → New → Under Collaboration Agreement → Integrated Configuration
Step 2 − In communication component, enter the sender component used earlier.
Interface will be the same Service Interface name as for the outbound process created in ESR in the previous steps.
Namespace will be the same Namespace as created in ESR in the previous steps.
Click Create button.
Step 3 − In Inbound Processing tab, select the communication channel as created for the Sender.
Step 4 − In the Receiver tab, select the communication receiver as shown in the following screenshot −
Step 5 − Go to the Receiver Interfaces tab, select Operation Mapping. Click Search and select the Operation Mapping as shown in the following screenshot. Operation Mapping will be created the same way as in the previous steps.
Step 6 − Go to Outbound Processing tab and select the Receiver Communication channel.
Step 7 − Once you are done with the above mentioned setting, click Save and Activate at the top.
Step 8 − Put the sample.xml file to the outbound folder. You can get a sample xml file from Message Mapping in ESR. Go to ESR → Message Mapping → Test.
Step 9 − This sample file doesn’t have any data. Create abc.xml file and paste sample xml to that file. You have to add some data to this xml file as shown in the following screenshot.
Step 10 − Place this file in the Send folder as mentioned in the directory and file scheme at the time of configuration.
Step 11 − Go to the Receiver folder and you can see xml file with the data inside it.
Step 12 − To monitor Adapter Engine → Communication Channel Monitor, go to configuration and monitoring home.
Step 13 − Go to Adapter Engine → Communication Channel Monitor.
Step 14 − Copy the communication channel
Step 15 − You can check the status of file to file scenario. If it is running properly, you will see a green icon under status.
SAP PI - Connectivity
SAP PI connectivity deals with the connectivity of source or target system with the integration server. This connectivity deals with the exchange of messages with integration server. The message format to be exchanged should be in SAP PI protocol format or an adapter should be used to convert an external format to SAP PI specific format.
SAP PI provides you with a wide range of adapters that allows you to connect applications from different protocols. In the case of the sender, the adapter converts the inbound message encrypted in the sender protocol into a PI-SOAP message; in the case of the receiver, the PI-SOAP message is converted then into the receiver's protocol.
Available Adapters in SAP NetWeaver PI
SAP PI supports different adapters and some of them are processes in Advance Adapter Engine or in the Integration engine. IDoc, HTTP and XI are few adapters that are processed in the Integration Engine.
The following are the available adapters in SAP NetWeaver PI −
|S.No.||Adapters in SAP NetWeaver PI & Uses|
This is used to communicate with other SAP systems using RFC interface.
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.
This allows access to databases.
This is used to perform data exchange with external systems using a file interface or an FTP server.
This allows you to connect e-mail servers to the Integration Engine.
This allows the exchange of IDocs. These adapters are available both in the Integration Engine and also in the Advanced Adapter Engine.
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.
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.
It enables communication with messaging systems using the JMS API.
It allows the integration of remote clients or Web service providers using SOAP.
How to Check Existing Adapter Engines?
You can check the list of existing adapter engines in System Landscape Directory (SLD) by performing the following steps −
Step 1 − Use Integration Builder URL or T-code — SXMB_IFR.
Step 2 − Go to the System Landscape directory on SAP PI 7.3 screen and click Product as shown below. If you are prompted to enter the username and password, enter the details.
Step 3 − Navigate to the Technical System area on the left pane of the System Landscape Directory.
Step 4 − Select Process Integration as the type of Technical System.
Step 5 − Check how many Adapter Engines are listed.
Step 6 − There is only one type XIAdapterFramework Adapter Engine that corresponds to the Central Adapter Engine on the Integration Server.
Step 7 − You can also check the list of existing adapters on Runtime Workbench. Go to Configuration and Monitoring.
Step 8 − In the next window, go to component monitor option.
Step 9 − Select components with ‘All’ as status.
SAP PI - ccBPM Overview
Business Process Management deals with cross component BPM. This includes SAP workflow in SAP backend and processing of message on Integration Server.
Cross Component Business Process Management provides SAP NetWeaver Process Integration with functions for stateful message processing, that is, the status of an integration process is persisted on the Integration Server. This means that an integration process can, for example, wait infinitely until further messages are received or until a particular deadline is reached. Moreover, it is possible to process messages further within an integration process.
The above illustration shows that message from system 1, 2, 3 has been sent to the Integration Server and only when all the messages arrived, the composite message has been sent to the target system business system 4. Using cross component BPM, the message that is already on the Integration Server, is made persistent. Any other message that comes to the Integration Server, a relationship is defined between messages to ensure that all messages are sent correctly. Business Process Engine is responsible to perform this task in ccBPM.
SAP PI - ccBPM Configuration
While using ccBPM, the integration process used in ccBPM receives inbound message but also sends messages to the corresponding receiver business system.
ccBPM consists of a Graphical Process Editor and a Business Process Engine. Business Process Editor opens when you select an integration process.
To open Business Process Editor, go to ESR → ES Builder → Design Objects Integration directory on SAP PI tools page.
SAP PI — Integration Processes
The Display Integration Process screen opens, and the Graphical Definition of the Integration Process is displayed.
The Business Process Editor starts when you double click an Integration Process. It consists of the following areas −
- Area with header data
- Graphical definition area
- Properties pane
- Process over view area
- Processing log
- Object area
Steps in an Integration Process
The steps that are configured in an integration process are either message steps or steps related to a process.
The following are message-relevant steps −
- Receive a message
- Send a Message
- Determine receivers for subsequent send steps in the process
- Transform a message
The following are process-relevant steps −
- Control (trigger exceptions or alerts)
- Container operation (processing of data)
- While loop
SAP PI - Monitoring Integration Processes
You can monitor the integration processes at message level by using message monitor function.
Step 1 − Use T-Code — SXMB_MONI
This transaction can be used to display the message processing during an integration process or you can also move to a process view.
Step 2 − You also have the option of switching to Process View in this transaction. You can select Process checkbox and Execute.
Step 3 − In transaction SXMB_MONI, you can use different criteria to also select processes directly.
The process monitor T-code — SWF_XI_SWI1 expects the workflow number of the integration process.
You can determine the runtime cache by using the T-code — SXI_CACHE as shown in the following screenshot −
SAP PI - Web Services
A Web service is an application function or a service and can be used through Internet standard. It is an independent, modular, and self-describing application function or service.
It can be described, made available, located and transformed or called using standard Internet Protocols.
Each Web service encapsulates a function which is used to perform many tasks. A service provider is used to provide access to a web service. A service provider has WSDL document.
A Web service user is called a service requester who uses the web service with the help of a web browser. In a normal scenario, a service requester is an application that access Web service. An application takes all the necessary details to access a Web service from service description and this information is maintained in the service registry.
The following illustration shows a common Web service scenario −
Web Service – Key Features
The following are the key features of a Web service −
Web service allows programs running on different platforms, operating systems and different languages to communicate with each other.
Web service is an application function or a service.
Web service can be used through internet standard.
Web services can be published and traced.
Web services form a basis for Enterprise Services Architecture (ESA) which is known as SAP's enhanced version of service-oriented architecture SOA.
How to Analyze Different Web Services?
Perform the following steps to analyze different Web services −
Step 1 − Login to ECC system, use Transaction code — SOAMANAGER
Step 2 − Select the Web service checkbox → Apply Selection.
Step 3 − Verify if the Overview tab contains the entry SERVICE → binding is displayed. In case SERVICE binding is not displayed, it means that binding must be completed.
Step 4 − To show the Web service and its binding, choose the Open WSDL document for the selected binding or service link.
Step 5 − A Web browser showing the WSDL opens → you can scroll down at the end of the WSDL. You will find the endpoint under the node WSDL port.
Where SAP PI is Not Recommended?
SAP PI is not recommended for a synchronous request/response scenario. In synchronous communication, it is invoked by request and response operation and process output is returned immediately after the operation. The load is more on infrastructure in case of synchronous communication.
In a non-SAP backend like Java, DOT NET, SAP PI is not recommended as middleware tool in UI driven scenario.
When a backend system is exposed as UI service, SAP PI is not recommended for UI driven scenarios.