SAP PI For Beginners PDF
SAP PI For Beginners PDF
Rana Brata De
more by this author
share
0 share
2 tweet share
0
Follow
Objective
The objective of this tutorial is to make you understand – what is SAP Process
Integration? We will not go into the nitty-gritty of the subject but we will discuss
about the architecture and different features of SAP PI. We will cover the basic
features only and will avoid discussing all features in this tutorial.
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 1/31
4/10/2018 SAP PI for Beginners | SAP Blogs
Next there are a set of case studies which will give you an idea about the industry
level utilization of SAP PI. Once you get more acquainted with the subject, you
should try to solve them. The test cases are prepared in a manner so that it will
take you down into the subject from simple to more complexes with each lesson
and will give you an overall idea of the subject.
For any business – large or small, these are the standard business functionalities
it must carry out i.e. Material Management, Sales and Distribution, Finance,
Human Resources etc. There is much software in the market which is utilized by
the industry. You will notice the simplest one – the teller machine generating sales
invoice if you visit a small shop to a network of computers in a large retail store,
hotel etc operating on an ERP.
There are few points we should know before we jump into the subject.
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 2/31
4/10/2018 SAP PI for Beginners | SAP Blogs
Legacy System
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.
Architecture of SAP PI
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 3/31
4/10/2018 SAP PI for Beginners | SAP Blogs
The SAP PI consists of a hub and spoke structure; the spokes connect with
external systems while the hub exchange messages between them. The source
system is known as the sender system and the target system is known as the
receiver system. The PI is not a single component, but rather a collection of
components that work together flexibly to implement integration scenarios. The
architecture includes components to be used at design time, at configuration time
and at run time.
1. Integration Server
2. Integration Builder
3. System Landscape
4. Configuration and Monitoring
Integration Server is the central processing engine of the SAP PI. All messages are
processed here in a consistent way. It consists of three separate engines
1. Integration Engine
2. Adapter Engine
3. Business Process Engine
Integration engine can be considered to be the hub and the Adapter engine the
spoke. Regarding the Business Process Engine, I will explain it later.
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 4/31
4/10/2018 SAP PI for Beginners | SAP Blogs
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. So 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 dispensed off or modified to work on the Java stack.
So PI needs only the Java environment to run and is known as the single stack.
There are pros and cons between the two stacks but they are not covered in this
tutorial.
Integration Engine
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 5/31
4/10/2018 SAP PI for Beginners | SAP Blogs
The Integration Engine is responsible for central Integration Server services i.e.
the pipe-line steps – routing and mapping. If the source message structure is
different from the target message structure, then integration engine calls the
Mapping Runtime, where source structure is converted to the target structure.
The Mapping Runtime is based on the Java stack. The integration engine can also
utilize an ABAP program for the conversion, which is based on the ABAP stack.
When we configure integration logic (scenario) in the SAP PI as per our business
requirements, it is the integration engine which executes that configuration in a
step-wise manner. Pipeline is the term used to refer to all steps that are
performed during the processing of an XML message. The pipe-line steps consist
of the following:
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 6/31
4/10/2018 SAP PI for Beginners | SAP Blogs
Adapter Engine
You must have noticed earlier that the integration engine handles messages in
XML-SOAP protocol only. But what if we have a sender and a receiver business
system where the data is not in the same format. We use the various adapters in
the Adapter Engine to convert XML- and HTTP-based messages to the specific
protocol and format required by these systems, and vice versa.
As we have discussed earlier, SAP PI is a hub and spoke structure where the
Adapter Engine can be considered as spoke. We use the Adapter Engine to
connect the Integration Engine (Hub) to the external systems. The Adapter
Framework is the basis of the Adapter Engine. The Adapter Framework is based
on the SAP J2EE Engine (as part of the SAP Web Application Server) and the J2EE
Connector Architecture (JCA). The Adapter Framework provides interfaces for
configuration, management, and monitoring of adapters.
In a dual stack system, most of the adapters where based on the Java stack
barring two adapters which are based on the ABAP stack.
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
When SAP PI moved from dual stack to single stack then these two adapters
became part of the Java stack. The modified adapter engine is known as the
Advance Adapter Engine and the two adapters are called the IDOC_AAE adapter
and HTTP_AAE adapter respectively.
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 7/31
4/10/2018 SAP PI for Beginners | SAP Blogs
At runtime, the Business Process Engine executes the integration processes. The
integration process can send and receive messages using abstract interfaces only.
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 8/31
4/10/2018 SAP PI for Beginners | SAP Blogs
Each hyperlink will open one application. All these four are Java application. ESR
and ID are swing applications. They are launched from the browser based on
JNLP. So for the first time it takes more time as it downloads the entire library file.
But from second time onwards, it takes less time to launch. SL and CM are pure
web applications and run on the browser.
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 9/31
4/10/2018 SAP PI for Beginners | SAP Blogs
PI uses integration repository to design message structure for both sender and
receiver systems and develop an interface message using corresponding message
structures which act as a point of interaction to the outside world. Data type and
Message type are used to simplify and modularize the design of a complex
interface.
1. Graphical Mapping
2. Java Mapping
3. XSLT Mapping
4. ABAP Mapping
There are other areas also, but they are not covered in this tutorial.
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.
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 10/31
4/10/2018 SAP PI for Beginners | SAP Blogs
The pipe-line steps are created by creating the following 4 configuration in the
DIR
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 11/31
4/10/2018 SAP PI for Beginners | SAP Blogs
1. Sender Agreement
2. Receiver Determination
3. Interface Determination
4. Receiver Agreement
1. Sender Component
2. Sender Interface
3. Sender Communication Channel
Sender Agreement is similar to primary key in table. There cannot be the two
similar sender agreements in one landscape.
1. Sender Component
2. Receiver Component
3. Receiver Interface
4. Receiver Communication channel
1. Sender Component
2. Sender Interface
3. Receiver Component
1. Sender Component
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 12/31
4/10/2018 SAP PI for Beginners | SAP Blogs
2. Sender Interface
3. Receiver Component
4. Receiver Interface
System Landscape
The SAP System Landscape Directory (SLD) is the central information provider in
a system landscape. In the web page you will find the following links:
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 13/31
4/10/2018 SAP PI for Beginners | SAP Blogs
Technical System and Business System are commonly called the Landscape
Description.
The following information are extracted from the SLD into the ESR and DIR
1. Component Information are used in the ESR to define the Product and the
SWCV
2. Business System are used in the Directory for defining the sender and
receiver of messages
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.
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 14/31
4/10/2018 SAP PI for Beginners | SAP Blogs
With the Configuration and Monitoring the following monitoring functions are
supported:
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 15/31
4/10/2018 SAP PI for Beginners | SAP Blogs
Suppose there are two systems – A and B. All communication between A and B is
via a method call and thus they are synchronous. We introduce a third system
between A and B and called it the Intermediate system – I. The communication
between A and I is via method call and similarly between I and B is also via
method call. But the communication between A and B can be called asynchronous
as A does not have to wait for the response from B.
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 16/31
4/10/2018 SAP PI for Beginners | SAP Blogs
queue and remains there as long as B is not available. Once B is available, the
message is pulled from the queue and sends to B.
1. Synchronous
2. Asynchronous with order not maintained
3. Asynchronous with order maintained
Acknowledgment
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 17/31
4/10/2018 SAP PI for Beginners | SAP Blogs
While working in PI, you will come across the term – RFC. What are they? To
establish communication between two SAP systems i.e. an R/3 and PI, we create
the RFC Destination. It is configured by the following
1. Connection Type
2. IP Address and Port of the receiver
Connection Type tells the type of System Connection i.e. R/3, TCP/IP, Internal
etc.
Case Studies – 1
Assume that you are in a class room and there are 10 students in it. The
instructor then asks each student to prepare his/her the following personal details
and save them in an XML file. The details are as follows:
1. Student ID
2. Name
3. Mobile
4. Email
5. Gender
There will be 10 files and the files are named as cv_1,2,3….10. The files are saved
into the source directory. For test purposes following directories are created:
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 18/31
4/10/2018 SAP PI for Beginners | SAP Blogs
You are asked to develop scenarios in SAP PI which will read the source files from
the source directory and write them to the target directory. Once a file is
successfully read from the source directory, it should be moved to the archive
directory and if the file cannot be read for some error i.e. xml format not
maintained, it should be moved to the error directory. The files moved to archive,
error or target directory should have a time-stamp append to the file-name.
i. i.e. filename+<time-stamp>.
Lesson-1
Prepare a scenario to read one single file i.e. file cv_1.xml from the source
directory and write it to the target directory. The target file name should
also be cv_1.xml with the time-stamp append to the name.
Lesson-2
Prepare a scenario to read all the files from the source directory and write
them to the target directory. Similarly the target files should also be
named as cv_1, 2 ..xml with the time-stamp append to each of them.
Lesson-3
The instructor then asks you all to add the following validation to the
data.
Before you run the scenario, in some of the source files, modify the
mobile and the email so that they are in error as per the logic given
above.
Lesson-4
Prepare a scenario to read all the source files and classify them according
to their gender. The files for the men will be written in one directory and
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 19/31
4/10/2018 SAP PI for Beginners | SAP Blogs
for the ladies to another directory. Two directories are created for the
above purpose:
Suppose there are 6 men and 4 women in the class, then if all the source
files are read successfully then the target directory for men should have 6
files and the target directory for women should have 4 files.
Case Studies – 2
The instructor then asks you all to prepare one single file with the personal details
of each student in separate segments.
Lesson-5
Write a scenario which will read this file and produces 10 target files
where each file should correspond to the personal data of each employee.
The target files should be named as cv_<emp_ID>_<timestamp>
Lesson-6
Case Study -3
Same as case study – 1, the instructor ask each student to prepare his/her the
personal details and save them in an XML file. There will be 10 files. The files are
saved in the source directory.
Lesson-7
Prepare a scenario to read all the source files from the source directory
and to create one single file in the target directory. The name of the
target file will be output.xml with the time stamp append to the file-name.
The target file will have all the details of each source file as sub-segment.
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 20/31
4/10/2018 SAP PI for Beginners | SAP Blogs
Lesson-8
Prepare a scenario to read the entire source files from the source
directory and create two files in the target directory – one for the men
and the other for the ladies. For 6 men, the men file should have six
segments having each man’s details and for 4 women, similarly there
should be 4 segments with each lady’s details.
Case Study – 4
The instructor now asks each of the students to prepare another set of details
which will consist of his/her the following academic details:
1. Student ID
2. School Name
3. College Name
4. Department Name
5. Admission Year
There will be 10 files and the files are named as ad_1, 2, 3….10. The files are
saved into the source directory. So each student will now have a pair of files –
one for the personal details and the other for the academic details. Two files are
co-related with the Student ID. The input directory now consists of 10 personal
files and 10 academic files.
Lesson – 9
You are asked to develop a scenario which will pick the source files and
will process them in pair. The scenario will generate 10 target files. Each
target file will consist of the personal and academic details of a student in
separate segments. The target files will be named as res_1, 2, 10.
Lesson – 10
You are then asked to change the student ID in some of the files so that
they do not have a matching academic or personal files and vice-versa.
The scenario should run and if it found any files who does not have a
matching corresponding file then the process should end after some
period of time i.e. 2 min and those files will be moved to the error
directory and there will be no corresponding target files for them.
———————————————————————————————
———————————————————————————————
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 21/31
4/10/2018 SAP PI for Beginners | SAP Blogs
——————————–
* To know more about Process Integration (PI 7.31), go thru the below
document – http://scn.sap.com/docs/DOC-38669
———————————————————————————————
———————————————————————————————
——————————–
Alert Moderator
143 Comments
You must be Logged on to comment or reply to a post.
Zhichao Chen
Oscar Hymnelius
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 22/31
4/10/2018 SAP PI for Beginners | SAP Blogs
Kasyap D
Carol Wang
In Cloud and Big Data era, what integration and middileware expertises we should build?
Pallavi Uppuleti
Thanks
michael van
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 23/31
4/10/2018 SAP PI for Beginners | SAP Blogs
Thanks a lot.
Michael
Sumit Bramhe
Ramana Danda
Rana Brata!,this is very good blogand i would also like you to please also share your views and
information on basic scenario in this section so that it will help fresher to understand one flow and
definitely it will help them to understand the end to end flow of PI.
Ajay Kumar
Hi Rana,
I am fresher to SAP Pi and this blog is very useful for me to understand and can you pls
give some more material if available .
Megha Chatterjee
Thank you for introducing PI in such an understandable way. This was the first document
I read 🙂
Jeevitha Natarajan
Hi Rana,
Very nice blog, easy to understand all concepts at one place. Please share the
document if you have for PO (PI 7.4) .
Thanks
Jeevitha N
BVDVPrasad Prasad
Shailendra Karada
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 25/31
4/10/2018 SAP PI for Beginners | SAP Blogs
Bhupesh Shukla
Regards,
Bhupesh
Sampathkumar Sathyanarayana
Leelakrishna Nadimpalli
Steven Schliem
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 26/31
4/10/2018 SAP PI for Beginners | SAP Blogs
Will Done
sree harsha
Very detailed explanation Rana. It will help me a lot. People who are beginners they will
know the basic concepts in detail.
May I know the difference between SAP BI & PI what was the link between the 2.
Thanks in advance
Leelakrishna Nadimpalli
Hi Sree,
For example, you have a legacy system(or any SAP/non SAP systems)…
you can connect your legacy system and SAP system with an interface
developed in PI.
Regards,
Leela.
Chetan Risbud
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 27/31
4/10/2018 SAP PI for Beginners | SAP Blogs
Excellent work.
Reagrds,
Chetan Risbud
raju s
Hi rana, very useful document, but am new to PI can you provid ethe scenario’s like F2F,
IDOC2File… etc…
Mattias Mirhagen
Excellent article! Especially the Lessons were much appreciated. Integrations are often
complex but the author explains in an easy way.
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 28/31
4/10/2018 SAP PI for Beginners | SAP Blogs
Narasimha Velaga
Mohamed Lyazid
Thank you for the introduction it’s very helpful, I appreciate it.
Best regards
Asad S Zafer
But the link at the end id dead, do you have the new one ?
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 29/31
4/10/2018 SAP PI for Beginners | SAP Blogs
Hello Ran!
This was a very useful blog! I am trying to develop myself on the integration world in
SAP, I was wondering if you have any other resources or tips that might be useful for
beginners like me, I would really appreciate any help from your part.
My mail is [email protected],
Thank you very much!
omkar Donkena
hiiii very clear and nice explanation.am new beginner for sap pi,can you provide the
material if available.please drop the material [email protected] thanks.
priyadarshini c
Helpful 🙂
Thanks a lot 🙂
priyadarshini c
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 30/31
4/10/2018 SAP PI for Beginners | SAP Blogs
Shivangi Rawat
Hi,
Cheers..!!
Previous 1 2 3
https://blogs.sap.com/2013/05/21/sap-pi-for-beginners/ 31/31