SAP PIPO Guru99 Tutorials5
SAP PIPO Guru99 Tutorials5
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.
The pipe-line steps are created by creating the following 4 configuration in the
DIR
Sender Agreement
Receiver Determination
Interface Determination
Receiver Agreement
Sender Component
Sender Interface
Sender Communication Channel
Sender Agreement is similar to primary key in table. There cannot be the two
similar sender agreements in one landscape.
Receiver Agreement defines how the message is to be transformed so that it can be
processed by a receiver. It consists of
Sender Component
Receiver Component
Receiver Interface
Receiver Communication channel
Sender Component
Sender Interface
Receiver Component
Sender Component
Sender Interface
Receiver Component
Receiver Interface
Receiver Determination and Interface Determination – the two together are commonly
known as the logical routing. Sender Agreement and Receiver Agreement – the two
together are commonly known as the Collaboration Agreement.
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:
Technical System - Technical systems are application systems that are installed
in your system landscape.
Business System - Business systems are logical systems, which function as
senders or receivers within PI. Business Systems has one-to-one dependency with the
associated technical system.
Products and Components – This is 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.
The following information are extracted from the SLD into the ESR and DIR
Component Information are used in the ESR to define the Product and the SWCV
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.
With the Configuration and Monitoring the following monitoring functions are
supported:
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.
Synchronous
Asynchronous with order not maintained
Asynchronous with order maintained
In PI, we identify them as: Synchronous – BE (Best Effort), Asynchronous with order
not maintained – EO (Exactly Once), Asynchronous with order maintained – EOIO
(Exactly Once in Order).
Acknowledgment
For synchronous communication, System A calls system B and if B fails to send the
response the process failed. But in an asynchronous communication, System A calls
System I and System I calls System B. So suppose the communication between A and I
is successful but between I and B, it fails. How should A realize that the delivery
to B has failed? This is realized by an acknowledgment which is send back to A by B
via the same route as the message from A took to B. If the acknowledgment from B
fails to arrive to A then A consider that the process has failed and will send the
message again.
While we discussed about asynchronous communication in PI, we have used the term –
‘Exactly Once’ for both EO and EOIO. Exactly Once means a message delivered once
cannot be delivered again. To achieve this, there is an acknowledgment for every
message send from A to B. It is the adapters which lie at the end of the
communication. So the adapters must support acknowledgment.
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
Connection Type
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:
Student ID
Name
Mobile
Email
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:
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.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 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
Modify the above scenario so that it produces 2 target files instead of 10 where
one target file for men and another target file for the ladies. The target file for
men should have 6 segments for 6 men and the target file for ladies should have 4
segments for 4 women.
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.
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:
Student ID
School Name
College Name
Department Name
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.