SAP PI PO Notes Class
SAP PI PO Notes Class
1) transactional data
.xml format
ADAPTERS --> IT IS A MEDIUM WHICH SAP PI WILL USE TO CONNECT AND SEND OR RECEIVE THE DATA
1) SAP ADAPTERS--> SAP ADAPTERS WILL BE USED TO CONNECT SAP BASED APPLICATIONS .
2) IDOC-> ASYNCH
2) NON SAP ADAPTERS --> NON SAP ADAPTERS WILL BE USED TO TO CONNECT NON SAP BASED
APPLICATIONS.
1) FILE-----> WE WILL USE FILE ADAPTER TO CONNECT ANY FILE DIRECTORY / FOLDER WITH IN
COMPANY NETWORK OR OUTSIDE THE COMPANY NETWORK ( DATA WILL IN THE FORM OF FILES (
.TXX, PDF,JPG))
ASYNCH ONLY
2) SFTP --> WE WILL USE FILE ADAPTER TO CONNECT ANY FILE DIRECTORY / FOLDER FROM SFTP
SERVER WITH IN COMPANY NETWORK OR OUTSIDE THE COMPANY NETWORK ( DATA WILL IN THE
FORM OF FILES ( .XML, .TXT, PDF,JPG))
ASYNCH ONLY
3) JDBC--> WE WILL USE FILE ADAPTER TO CONNECT ANY DATA BASE APPLICATIONS WITH IN
COMPANY NETWORK OR OUTSIDE THE COMPANY NETWORK ( DATA WILL IN THE FORM OF FILES (
.TXX, PDF,JPG))
ORACLE, TERA DATA, SYBASE, HANA, DB2, MS ACCESS, MANGO DB (native sql)
5) SOAP--> WE WILL USE FILE ADAPTER TO CONNECT ANY WEBSERVCIE APPLICATIONS WITH IN
COMPANY NETWORK OR OUTSIDE THE COMPANY NETWORK
WEBPAGES
SYNCH / ASYNCH
6) MAIL--> WE WILL USE FILE ADAPTER TO CONNECT ANY MAIL SERVERS WITH IN COMPANY
NETWORK OR OUTSIDE THE COMPANY NETWORK
ASYNCH ONLY
7) HTTP_AAE--> WE WILL USE FILE ADAPTER TO CONNECT ANY WEBSERVCIE APPLICATIONS WITH
IN COMPANY NETWORK OR OUTSIDE THE COMPANY NETWORK
WEBPAGES
SYNCH / ASYNCH
8) REST->> WE WILL USE FILE ADAPTER TO CONNECT ANY WEBSERVCIE APPLICATIONS WITH IN
COMPANY NETWORK OR OUTSIDE THE COMPANY NETWORK
SYNCH / ASYNCH
9) EDI SEPARATOR-> WE WILL USE FILE ADAPTER TO CONNECT ANY EDI BASED APPLICATIONS
WITH IN COMPANY NETWORK OR OUTSIDE THE COMPANY NETWORK
ASYNCH ONLY
FS -->
interface -->
dev -->
TS
Production-->
2) support--->
3) incident --->
--------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------>
History
PI history
XI -> 1.0,2.0,3.0
Stack ->
1) Integration engine---> it is responsible for transferring the data between abap stack and java stack .
2) mapping engine--> it is responsible for executing the mapping rules between source and target
structure .
Point to point
1) PRODUCT
2) SOFTWARE COMPONENT VERSION --> ESR DEVELOPMENT
3) TECHNICAL SYSTEM
4) BUSINESS SYSTEM --< ID DEVELOPMENT
2) ENTERPRISE SERVICE REPOSITORY --> ESR --> THIS IS THE WHERE WE CREATE THE SENDER AND
RECEIVER STRUCTURE AND PERFORM THE MAPPING
1) NAMESPACE
2) DATA TYPE
3) MESSAGE TYPE
4) SERVCIE INTERFACE
5) MESSAGE MAPPING
6) OPERATION MAPPING
3) INTEGRATION DIRECTORY --> ID---> THIS IS THE PLACE WHERE WE CREATE THE SENDER
COMMUNICATION CHANNEL AND RECEIVER COMMUNICATION CHANNEL FOR RESPECTIVE ADAPTER AND
MERGE THE MAPPING
java stack
dual stack
this is the place where we moniotor the deployed interface flow ->
Scenario:
File (Non-SAP)—File (Non-SAP)
Adapter
Behaviour—Asynchronous
Module- Material Management (MM)
Example : Aurobindo----SaiLabs
STEP3: Select the BY PRODUCT because we are creating for the first time and then
click on NEW
STEP4: Select the “CREATE A NEW PRODUCT” as we are creating for the first time
STEP5:
Enter the product name, product vendor and version like below
(“Aurobindo_MM”, www.sailabs.com or Aurobindo, 1.0) and click on next
STEP6: Enter the instance name, in this we give the client name and click on next
STEP7: Enter the vendor, Name and version and click on finish
(www.sailabs.com, Aurobindo_MM_O2C (sub module of MM),1.0)
STEP8: After creating the product and software comment we will use them in ESR
Click on ESR(Enterprise Service Repository)
STEP14: After clicking on CREATE button. Need to select the original language
(ENGLISH/GERMAN) it is mandatory to select. And save it
Creating ESR Objects
In this we create NameSpace, Data Type, Message Type, Massage mapping and
Operation Mapping.
Material Management Data fields
Material Number, Quantity, Material Type, Material Name, Manufacture Date,
Expiry Date, Storage condition, Batch Number, Material transfer date, MRP, Total
Price
STEP15: Go to Design objects and search with Letter A which we created and
expanded the created SLD and select it.
STEP16: Click on Paper icon and go to the work areas and expand and select the
NameSpace
Always Namespace will start with
http://aurobindo.com/MM/O2C/MaterialInfoTransferToSaiLabs
After giving the namespace click on create
STEP17: Click on Save and then after saving we need to Activate the created
object. This should be done for every object which we create
To activate go to Namespace definition and activate (it is deployment)
Creation of Data type
STEP18: Select the created Namespace and click on paper icon (create object)
Go to the interface object and select the Data Type
For this scenario we need to create 2 data types that is one for sender and other
for receiver. Because we are using FILE adapter in this adapter the behaviour is
Asynchronous (Request only).
When we use Synchronous at that time, we need to create 4 data type those
Sender (request and response) And receiver (request and response)
Always Data type naming should start with DT
Ex: DT_MaterialInfoTransfer_From_Aurobindo_Sender(Optional)
After giving the Data type name click on create
STEP19: After creating select the Node and right click and select the insert sub
element
STEP20:
In each row enter the field which we have gathered for MM in sender side
We need to give 3 mandatory fields
Field Name—MaterialName
FieldType—XSD.string(In SAP PI always we this type only because it is a
alphanumeric)
Occurrence—Min occurrence (0(Options it comes or not) and 1( at least one time
it occurs))
Max occurrence (1(Max one time occurrence) and Unbounded
(Unlimited))
***These are mandatory types which we need to give FieldName, FieldType and
Occurrence will be given in the mapping doc.
To give multiple rows at a time right click on the element and select the insert and
then insert rows (In this enter the no of rows we want)
Instead of selecting xsd.string we can copy and paste for other elements
STEP21: After giving all the required elements we need to check whether we
entered correctly or not
To check that go to data type and select the CHECK
STEP22: After entering save the elements and data type and activate it
STEP23:
Creating Data structure for Receiver. In this we create same data fields like sender
to do that select the sender data type which we created and right click and select
copy object
STEP26:
Always start with MT for message type name
MT_MaterialInfo_Transfer_From_Aurobindo
After that click on create
STEP27: After clicking on create we need to select the sender data type
To do that go to the data type used and select the sender data type and click apply
Save and activate it
If we change any data field in sender or receive data type then we need to refresh
in message type for both sender and receiver
STEP28: Receiver message type
Highlight the namespace and go to paper icon and select the interface object as
message type
MT_MaterialInfo_Transfer_To_SaiLabs
Service interface name should always start with SIS (Service interface syn) and SIA
(Service interface Asyn)
SIA_MaterialInfo_Transfer_From_Aurobindo
SIA: Inbound Asynch-- Receiver
SIS: Inbound Synch-- Receiver
SOS: Outbound Synch-- Sender
SOA: Outbound Asynch--Sender
Then click on create
STEP31:
Creation of Message Mapping
To do that highlight the namespace and go to the paper icon and select the message
object and select the message mapping
Give the name like MM_MaterialInfo_Transfer_From_Aurobindo_To_SaiLabs
If it is synch means in that last, we give like
MM_MaterialInfo_Transfer_From_Aurobindo_To_SaiLabs_Request
Message mapping: It is mapping between the sender and receiver
Synch—there will be 2 massing mapping
Request (Sender and receiver MT)
Response (Receiver and Sender MT)
Asynch—there will be only 1 messaging mapping--- request (Sender and receiver MT)
After giving click on create
STEP32:
In this step we need to drag and drop the source (Sender) and target (Receiver)
message types
In the above under receiver side there is red colour indicator which means it is
mandatory (Min occurrence is 1)
Mapping can be done in 3 options
Method 1
Double click on Target element and after the respective source element we need
to click
Right to left mapping with their respective elements
Select the white box of source and map to the target box
After mapping colour of red will change to green
Method 2
Left to right means drag and drop from source to target
In this there is a disadvantage by mistake we might map to different element
instead of mapping with the same element. So apply the method 1
Method 3
This is easy method but we won’t use. When we need to use this means when
source and target elements has same structure/fields. This mapping is called
mass mapping
To do this
Select the node elements of source and target and click on apply mass mapping
symbol
After completing the mapping we need to test whether it is correctly mapping
or not
To do this
Click on test and enter the fields elements like below
Test Result
We can also save the test result also by doing this
After that we need to select the product which we have created under installed
products by searching with the created product *AUROBINDO*
We need to select the product and also software component and click on finish
After clicking on finish, we need to create the sender side business system to do
that click on the Business System and click on Add new business system
Click next
Business systems in sender side will have 3 like for development, Quality and
production
We are creating for development environment so we need to give as
Name: BS_AUROBINDO_DEV
And then click on next
Click on Next
Click on Finish
Click on Save
Technical and Business Systems for receiver
Select Third party as the receiver side also we are using the FILE adapter
Give the system name and host name (TS_SAILABS, WWW.SAILABS.COM) and then
click on next
After select the product and software component and click on finish
We need to create the business system for receiver
Business systems in receiver side will have 3 like for development, Quality and
production
Click on business system and click on Add new business system
Click on next
Go to the ID
To import go to tools and click on assign business systems
Click on continue
Click on continue
After that in the next window we can see all the created business systems in that
we need to select our business system of sender and receivers which we have
created.
If we are unable to see the business system then we need to clear the SLD cache 2
times
Select both the sender and receiver BS and click on finish
After assigning the sender and receiver Business systems we can those BS under
the “communication component without party”
Expand it and under that expand the business system so in that you will find the BS
systems which we have assigned
If the assigned business system is in pencil symbol that means it is in edit mode still
not yet activated
To activate that right click on the sender business system and click on activate
1) NFS—When we select this file system means when the folder is in within
the company network, PI OS and folder OS should be same.
2) FTP—it is a file hosting server. When the folder is in FTP server either it
can be in within company network or outside the company network at
that time we use this
In our scenario we use NFS transport protocol
Message protocol will define the data format
1) File—The file which we take in .XML then we use this
2) File Content Conversion—Other than .XML we use this like if the file is in
.pdf,.doc ..
PI understandable format is .XML
In this we use file message protocol
Adapter engine will be having only one that centre adapter engine
Next we need to give source details for that go to the source tab and give the
following details
Source directory—in this we need to give the file location folder details.
We need to create the folder in the F drive for both sender dev and receiver dev
F:\Aurobindo_DEV
file name—If we give
*-- all files will pick
*.xml—All files related to xml will pick
Mat*.xml—all files related to mat. Xml will pick
Mat*-- all files which contains with t letter will pick
MaterialInfo.xml
We will give the details for processing
Go to processing tab and enter the processing parameters
1) Quality of service
2) Poll interval
3) Processing Mode
Poll Interval—60sec (1 Min) --- For every 60 sec the communication channel will
run and check whether the file is there or not and processes the file.
We need to select the receiver adapter type which is FILE and click on apply
Under the adapter type we need to select the Receiver because we are creating
the receiver communication channel
Need to select the transport protocol and message protocol which is NFS and
File
In target tab we need to give the target file path which we have created in F
drive with the server
Target Directory: F:\Sailabs_DEV
Always uncheck the Create Target Directory because by default it will be
checked
Give file name scheme: If we select the ASMA means we need to give *, because
sender and receiver file name are same in our scenario or else if we won’t select
ASMA we can give filename as per the requirement
Now go to the processing tab in that give all the mandatory fields which are in *
Under processing parameters
**File Construction Mode
1) Add Time Stamp: It will add the server time stamp. In real time we use this
2) Create: it creates the file
Overwrite exciting: It over rides the old data with new data if we check the
box
3) Append: Old data and new data will merge
4) Message Id: A unique message id will be generated for every PI processed
that will add to the file name. In real time we use this
5) Counter: It adds the serial numbers to the files
In advanced tab
When we have enabled the ASMA in sender at the same time we also need to
enable the ASMA in the receiver side also
After giving all the parameters we need to save and activate the receive
communication channel
NameSpace
After giving all the sender details click on create
Go to the ICO and inbound processing and copy the sender channel and paste in
communication channel monitor
Paste in Find and click go
Select the channel and click on start
At the same start the receiver channel also by following above just copy paste
the receiver channel in find and click GO
Now we need to keep the file in the sender folder to do that
File name should be same which we have given in the sender communication
channel Like MaterialInfo.xml
Go to ESR
Select the created interface in that go to message mapping
Go to the test tab and click on the SRC icon
Copy and paste the XML data in the note and save with MaterialInfo in sender
(Source) folder and While saving the .xml file we need to select all files in save
as type
After that we need to monitor this file in the sender communication channel
monitoring tool
While running the channel message id will be generated
If we click on that message id means we can know the status of the message
After successfully processing the file stop the sender and receive channels
For message monitoring go to the monitoring tab and select the message
monitoring in that copy paste the name space (interface)
http://aurobindo.com/MM/O2C/MaterialInfoTransferToSaiLabs
https://integrationlearn.com/sap-pi-adapter/file-adapter-sender-convert-single-fixed-length-
structure-to-xml/
https://blogs.sap.com/2014/08/21/content-conversion-for-fixed-length-files-with-key-field-
value-shorter-than-key-field-length/
Step1:
Same software component we are creating the Data type
First, we need to create the Name Space
Give Name as http://Employee_Details_Trannsfer_To_Sailabs
Click on create
Click on read operations and select the message mapping and then save
and activate it
Now we the create the communication channels for sender and receiver
Go to the Integration directory
If we create new ID means then only we will use the SLD business system
At this point we are using already created business system
Give the Sender communication channel name as
CC_FILE_SND_Employee_Details_Transfer
Then click on create
After that in parameters type we need to select the adapter which we are
using and then click apply
We need to select the
Transport protocol: File System (NFS)
Message Protocol : File Content conversion because our file is in non xml
format
When we select the FCC there you will find the extra tab that is content
conversion
In the source tab we need to give the
Source directory path and file name
Source Directory: F:\Aurobindo_DEV
File name: Employee_Details.txt
Create employee details note pad in the F drive save with the
Employee_Details.txt as we gave the same name in the sender source
communication channel.
Next tab processing give the following
Quality of service: exactly once as it is async
Poll interval: 60
Processing mode: test
Now go to the advanced tab as we cant select the ASAM because sender
side file is .txt and receiver is .xml
Save and activate after giving all the required values
Massage Mapping
Operation Mapping
Creation of ICO
Give the BC name as BC_Aurobindo then click on create and save activate it
If we are using business component means if we have ESR part then we select
the sender side add the outbound service interface in sender side. If it is in
receiver side means we use receiver side service interface
We didn’t create anything in ESR so we won’t add anything in this
In processing tab there is no change but in advanced tab we need to enable the
ASMA
Massage Mapping
Operation Mapping
Creation of ICO
Synch Asynch
1 data type
4 data types Sender – SOAP
Sender request & response--- SOAP Receiver—ABAP Proxy
Receiver Request & response--- ABAP Proxy
We can same sender structure in the receiver side
While copying change the name space which we have created for SOAP sender
I am creating only one data type as we have same structure for sender and receiver
Active it
Drag and drop the data type under the Name in data type used place. After that
save and activate it
Perform the mass mapping because sender and receiver has the same structure so
we are doing mass mapping. Save and activate it
Creation of Operational Mapping
OM_SOAP_SND_EX
Drag and drop the sender and receiver service interfaces on source (Sender service
Interface) and target (Receiver service interface). Select the message mapping
After that save and activate it
Creation of communication channels for sender and receiver
Go to the ID (integration directory)
CC_SOAP_SND_EX
Authentication is of 2 types
1) Mutual authentication--
PI server should also be in HTTPS url
Click finish
We need to download this certificate for both with or without client authentication
Certificate has the validity when the validity expires it doesn’t work at that time we
need to delete that certificate and import the updated one. We wont get any alert
for expiry of validity we need to make note of it.
Receiver communication channel
CC_FILE_RCV_MaterialInfo_Transfer
We are not creating a new receiver channel using the existing channel and doing
some modifications
Un select the ASMA and change the file name as SOAP.xml
Save and activate it
Creation of ICO
Select the communication component, interface and click on create
Click on save and select the path where we want to save the file
***How to import the SSL certificates
PI—SSL certificate
NWA—Configuration—certificates and Keys---TrustedCAs—import—select
X.509.certificate
***After completion of ICO we generate the WSDL file by going into ICO integrated
configuration and select the display WSDL
ICO---Display WSDL
***We need to test WSDL file
For SOAP and REST there are 2 testing tools where we test for webservice
applications
1) SOAPUI
2) Postman
In the below screen we need to give the values to give go to the ESR
Message mapping in test tab select the SRC and copy the content from material
number to material dat
Right click on the data and click on format
Click on validate
Start the communication channels
To start go to ICO and in integrated configuration select the open channel monitoring
for sender and receiver
General Tab
Conversion Parameters
1) Do not use SOAP Envelope--- If we don’t want to mask means we use this option
that means data will not mask
2) Keep Headers--- if we want to send any data in header means we will use this
option that means if we want read the values from header
3) Keep Attachments—In case if we want to the attachments along with the data
means we need to select this option
4) Use Encoded Headers
5) Use Query String
SOAP data will come in Envelope that means data will be masked
In SOAP by default data will appear in Body
In PI supported adapters for attachments are SOAP, REST, MAIL, SFTP (Non- SAP) and
ABAP Proxy (SAP)
SCENARIO 7
SOAP RECEIVER
Scenario
File to SOAP
SOAP is at receiver side then receiver application will give the following details for
us
WSDL File, Server, End Point, User name and password
In WSDL file structure is inbuilt so in SOAP receiver we won’t create data type and
message type
Drag and drop the sender data type and save activate it
CC_FILE_SND_MaterialInfo_Transfer_SOAP
Change the file name as File.xml and then save and activate it
Receiver channel
CC_SOAP_RCV_SAMPLE
Enable the configure User authentication and enter the client given user name and
password but for our use we are giving our server user name and password
***Configure Proxy
In any company we can’t access all the web sites that’s means there is a firewall
which will block that website
Every time when we hit the URL that is not mandatory to be in company network it
might be in outside the company network
To enable the firewall, we use the proxy servers/web dispatcher
There are 2 types of proxy servers/web dispatchers
1) Reverse Proxy—It takes the request which we get. It is used for SOAP Sender
side
2) Forward Proxy—It forwards our request. It is used for SOAP Receiver side
After completing SOAP scenario if there is any firewall then proxy team (Network
team)
We send the end point to the reverse proxy team then they will give one URL that
URL we give to the SOAP sender
It is SOAP receiver so we use forward proxy but now we are not using as we are
doing practice
Save and activate
Creation of ICO
Select the interface
Enable the locks in advanced tab
When we start the SOAP receiver channel at that time, we need to click on the Ping
channel mandatory
SCENARIO 8
REST Sender XML format
In general tab
Transport protocol will be HTTP
Message protocol will be REST
Data format will be 2 XML and JSON
For our scenario we select XML
Quality of service will be best effort (Synch) and exactly once (Asynch)
If we select Best effort then output message format need to update
Ours is Asynch so we select exactly once
For file receiver we are not creating any channel using the existing channel
Creation of ICO
Select the communication channel
Select the interface
In inbound processing select the communication channel
***After completing REST sender testing, we need to give the following details to
receiver
End Point
PI username and password
Sample data
Method
SCENARIO 9
REST Receiver XML Format
REST Receiver we need to create Data type and message type mandatory
Create the receiver name space
http://REST_XML_RCV_EXAM
Receiver: SIA_REST_XML_RCV
Category: inbound
Creation of message mapping
MM_REST_XML_RCV_EXAM
Drag and drop the sender and receiver service interface and click on read operations
Drag and drop the message mapping
Save and activate it
Creation of ID
File communication channel creation
Copy the existing communication channel and change the channel name
CC_FILE_REST_XML_RCV
Creation of ICO
In inbound Tab
Select the file sender communication channel
In receiver Tab
Select the Sailabs receiver
In receiver interface
Select the Operation mapping
In outbound Tab
Select the receiver channel
In advanced tab
Enable the locks and save activate
MAIL, HTTP, JMS and JDBC ADAPTERS
JMS Adapter
It is used to connect any message queue-based applications
Behaviour: Sender: Asynch only
Receiver: Synch/Asynch
Examples: Main frames, server, WebSphere, MQ Server
For JDBC and JMS firstly we need to install drivers to receive the data
Driver deployment--- we need to collect the queue details
**There is no specific naming convention for JMS only for JDBC there is specific
naming convention.
In ESR for sender 2 DATA type, 2 Service interface, 2 message types, Message
mapping and operation mapping
**For JMS we need to create the As JAVA technical system
For every application there is separate driver syntax this driver will deploy by the
BASIS team
Data will pass through queue
**For JMS receiver if behaviour is synch, then we create 2 communication channels
because data will pass through queue and there will one queue for request and
response
JDBC Adapter
It is used to connect any data base applications
Behaviour: Sender: Asynch only
Receiver: Synch/Asynch
First, we need to deploy the drivers
**For which data base we are connecting for that data base we need to deploy the
drivers in our PI system. These drivers will be deployed by the BASIS team
After deploying the drivers then we need to start the interface
**We need to follow a dedicated naming convention for JDBC for both sender and
receiver
**In JDBC sender data type 1st Node always we create with “row” in small letters
because in data base data will be in rows and columns
Under the created Node with name “row” we need to create the structure
In JDBC receiver data type 1st Node always we create with “any name (Statement)”
like below
**In JDBC there will be different structures for sender and receiver
HTTP Adapter
It is used to connect any web service applications like web sites, web pages
Behaviour: Synch/Asych
It is ABAP stack-based adapter as it runs on ABAP stack
In PI 7.1 it is not possible to use HTTP adapter because there is not HHTP adapter in
java stack
From 7.3 SAP introduced HTTP—AAE Adapter it runs on java stack
This adapter we used in the old versions when there is no SOAP and REST Adapters,
after introducing SOAP and REST adapters this HTTP-AAE is not using
HTTP-AAE supports GET and POST methods only
REST OAuth
OAuth is an open standard for authorization, commonly used as a way for Internet
users to log in to third party websites using their Microsoft, Google, Facebook,
Twitter, One Network etc. accounts without exposing their password.
MAIL Adapter
It is used to connect any mail server
Ex: Gmail, Outlook,..etc
Behaviour: Asynch
Mail, JDBC, File, SFTP--- these are based on polling concept that means if these
adapters are in sender side means we need to take the data
Mail adapter sender side
Transport protocol will be IMP4 (We use this protocol mostly) and POP3 these are
mailing server protocols
Message protocol: XIALL and XIPayload
Difference between XIALL and XIPayload
XIALL—We can’t send attachments
XIPayload—we can send the attachments
FTP Server details we take from tools like WinSCP and FileZilla
First, we need to check whether we are able to access those servers or not to
do that we need to use these tools WinSCP or FileZIlla
FTP there will be different FTP servers for production, quality, development.
We need to change the FTP server details in the communication channel
WinSCP
Select the FTP in file protocol
Host Name or IP address of the
**FTP has by default port no 21
User name and password
Pre
SAP ADAPTER (RFC, ABAP Proxy and IDOC)
RFC Adapter
RFC (Remote Function Call) Sender
RFC is used to connect the SAP based applications like ECC, CRM, S/4 hana, etc..
RFC/BAPI/Functional module are same
SAP applications all will be in ABAP stack
When we are using ABAP stack, we need to install SAP Logon pad (SAP GUI)
In case PI is dual stack means we can access in SAP Logon pad itself
In SAP Logon pad application, we can access the ABAP based applications
In SAP Logon application if we want to perform any action we need to use “T-code
(Transaction code)”
RFC Behaviour: Synch/Asynch
RFC consists of 3 types
1) Standard—In built—a- to x (If any RFC name starts from a to x that means it is
standard RFC)
2) Custom—New Development—this development handling will be taken care by
ABAP team-- We need to start with Y or Z for RFC name
3) Extended—in built modification—In the last we give the standard name- exten
(Like a-exten)
In SAP Logon already on function is opened and if we want to open another function
means we need to type /osmgw
To know the gateway details in SAP logon application type SMGW—GOTO---
Parameters—Display/change
In real time BASIS team will give the gateway details
Program id purpose: It is used to identify the RFC sender channel within the SAP
gateway ( To tell the ABAP system what is the RFC sender channel )
Creation RFC is mandatory for all like custom, standard and extended
For standard RFC creation of functional module in SAP logon application is not
required directly we need to create RFC destination
Creation of ABAP report is mandatory for all like custom, standard and extended
ABAP report is written by ABAP’er
RFC sender side or receiver side then no need to create the Data type, message
type and service interface
RFC will be in SAP system so that we need to import to SAP PI system
In our created software component, we need to import the RFC
Click on the software component which we have created already
Go to imported objects right click and select the import SAP objects
If we get any error means then double click on the system name and give the
following details
System E72, Client 800, Message server- 192.168.1.72 and save
After that go to imported objects and select the import SAP objects
Give the IP address which we have given in system component
ECC username and password
ABAP Proxy
It is used to connect any SAP applications (ECC, CRM, S/4 hana, etc)
ABAP proxy is available from ECC 4.0 version
Latest version of ECC is ECC 6.0
ABAP proxy concept is adapter less communication that is there is no need of
adapter
If ABAP proxy is in dual stack (before 7.4) then ABAP proxy sender side no need to
create sender communication channel and sender agreement
ABAP proxy receiver side in dual stack means we use XI adapter
From 7.5 version integration engine is removed so we need to use adapter engine
mandatorily so we are using SOAP adapter as a proxy
For SOAP adapter in communication channel, we use message protocol with XI 3.0
for ABAP proxy
Because SOAP will support only xml format and proxy is also XML format by this data
transfer is fast
To connect ECC we have IDOC and RFC adapters
In proxy PI structure will be created as proxy class by the ABAP’per
Based on our PI structure ABAP’per will create the proxy
For proxy we need to create mandatorily data type, message type and service
interface. This structure is used by the ABAP’per
In ECC if we execute the SPROXY transaction code means ESR should be visible
If proxy is in sender side means outbound service interface name should be given to
the ABAP’per
If proxy is in receiver side means inbound service interface name should be given to
the ABAP’per
The ABAP’per will go to ECC and execute SPROXY transaction code by this they
should see the ESR part which we have created
In sender communication channel we use SOAP adapter with message protocol XI 3.0
as a proxy
In receiver communication channel we use SOAP adapter with message protocol XI
3.0 and in connection parameter we select addressing type as HTTP Destination
HTTP destination name creation
Go to SAP NetWeaver administrator
Configuration
Destinations
After completing the interface development Inbound (Receiver) service interface
name and Outbound (Sender) service interface name will be given to the ABAP team
After that ABAP team will log in into ECC and execute SPROXY transaction code
Step2:
After creation of 4 destination names, we need to run this SLDAPICUST transaction
code to append complete SLD content
In this give the system details and click on test then we should get like this
Connection to SLD works correctly
Step3:
SLDCHECK transaction code if we run this code means SLD should open that means
ESR page should open
Step4:
SXMB_ADM transaction code in that call the Integration Engine Configuration
Go to configuration and give IS_URL parameter
Click on edit, new entries, in category select RUNTIME and parameter as IS_URL and
in current value we need to give 4th destination name (dest://4th destination name)
IDOC
IDOC adapter is used to connect any SAP applications (ECC,SRM,CRM, etc.)
Behaviour: Asynch
IDOC has 3 types
1) Standard IDOC –If IDOC name starts from A to X that is standard IDOC
2) Custom IDOC—If IDOC name starts with Y or Z that is custom IDOC
3) Extended IDOC
In IDOC we won’t create DATA Type, Service Interface and Message Type
Standard IDOC types
1) Cremas Vendor related data transfer
2) DebmasCustomer data transfer
3) Invoice Invoice data transfer
4) Orders Purchase orders and orders data transfer
5) Matmas Material data transfer
6) Shicon Shipment data transfer
7) Desadv Dispatch advise
PI set up
Step 5:
Creation of RFC destination – SM59—type 3
Step 6:
Port creation—IDX1 transaction code
Port name should be 6 characters like
SAP<System ID>
Step 6:
IDX2 transaction code is used to create meta data
Meta data is in segments in IDOC
In dual stack always need to delete the meta data and import it again if there are any
structure change
After completing all the settings, we need to start the interface development
In ESR part
For IDOC we won’t create DATA TYPE, MESSAGE TYPE and SERVICE INTERFACE
Instead, we need to go to import of SAP objects and select the IDOC like
ORDERS (Message Type).ORDERS05 (IDOC Type/ Basic Type)
In IDOC data will be in segments and also in records
In IDOC there will be 3 types of records
1) Control Record—It contains the IDOC technical details ( Unique IDOC number,
Direction {1 [ Sender side], 2 [Receiver side]}, Basic type, partner type, partner
number)
2) Data Record—in actual data will be there
3) Status Record – Status of the IDOC
How to identify the control record in IDOC means EDI_DC40
In mapping Specification, we don’t have the control record details
In mapping specification data record related data will be there
Anytime in data we need to hag the begin in IDOC with constant 1
In the same way there will be segment for that also we need to map with constant 1
Direction need to map with constant if IDOC is in sender means 1 and If it is in
receiver side means 2
IDOC type need to map with constant with ORDERS05 which will be in Right hand
side
MESType need to map constant with ORDERS which will be in Left hand side
Follow the below blog for IDOC control log mapping
https://sapintegrationhub.com/pi-po/idoc_aae/idoc-control-record-mapping-in-sap-pi-po/
When I checked in ECC IDOC is in 03 status but data is not reached in PI where do
we check
We check SM58 transaction code
ALERTS, TRANSPORTS, MAPPING
ALERTS:
These alerts are used when any interface in PI fails at that time through email we can notify to
the particular persons
This is very useful for support project
Alerts are of 2 types
1) Dual Stack alerts (ABAP based alerts)—It works only in ABAP stack
2) Single Stack alerts (Java bases alerts)—It works on both ABAP and Java stack
Alert rule is available in the ID part (Integration Directory)
Alerts are also called as component based alerts
Follow this blog
https://blogs.sap.com/2012/03/25/michals-pi-tips-component-based-message-alerting/
Step 1: We create alert rule for each priority like P1 (Very High), P2 (High), P3 (Medium) and P4
(Low)
1) FILE TRANSPORT
2) CTS PLUS TRANSPORT
3) CCMS TRANSPORT—this is also one type of transport but we use mostly File and CTS plus
transports
Always we transport the ESR and ID objects but we wont transport the SLD components through
transports
File Transport
If we want to move entire software component means then select the software component
Check the download file to client so that we can save in our desktop and click on continue
Always uncheck the Include deleted objects and skip preview
In Object set we have the following options
1) All Objects of a Software Component version--- This option is used to move entire software
component
2) Only definition of software component version and namespace
3) All objects of individual namespaces--- This option is used to move the particular namespace
objects
4) Individual objects—This option is used to move only individual objects like (MM, DT, OM, MT,
SI)
Click on Finish
After performing the file transport the file will be saved in .TPZ format
If there are any IDOC and RFC scenarios means we need to select those scenarios because for this
namespace those will not be selected.
In the below screen shot if we want to select the with namespace definition means we need to
check that box
Click Finish
To move the individual objects
For suppose if we want to move the data type then simply we do drag and drop or select the object
which we want to move
Now to need to import the ESR part from development to quality environment
Earlier we have exported the ESR objects from development so now we will import those ESR
objects in the Quality environment
Go to Tools---Import Design Objects
Click on client
Select the exported .TPZ file which we have saved in a path
Click on import
After importing we need to check whether the objects got imported or not
Go to ---Tools—Find Transports
Now moving the ID objects through file transport
In this the objects will have separately so we create a folder in ID to move the ID objects
Creating a folder to move the ID objects is called as Configuration Scenario
Click on the paper icon and select the Configuration Scenario
Give the Configuration scenario name
In this configuration scenario we add all the details related to namespace (Sender BS, Receiver BS,
Sender Comm, Receiver Comm and ICO)
After that save and activate it
This created configuration scenario we will export to the other environments
To check the created configuration scenario we need to click on the binoculus symbol
Select the configuration scenario view
In CTS+ transport for every transport the request number will be created
MAPPING
Mapping specification will be given in the FS document
In real time
90% mapping will be Field to field mapping (Direct Mapping no conditions required)
5% Requires Node functions/functions
4% Requires UDF
1% Requires Java Mapping/XSLT mapping
Constants:
It is used when the target side field has always a fixed value that means it doesn’t depend on the
source value. PI consultant will give manual value to the constant so that it always populates that
value to the target side particular field
**CopyValue:
when we have same field values at that time if we want to copy same field value to the other fields
we use this copyvalue function. This copies the index values
It copies the index value from a particular index and populates that value into target side in all the
context (Record {Node} is called context)
If we keep copyvalue(0) means it copies only the starting (1st record) record field value to the other
field values
If we keep copyvalue(1) means it copies the 2nd record field value to all other fields
Sender/receiver business system/component is used during the runtime to populate
Date Function:
CurrentDate: It is used to populate the PI server time to the particular field
If we click on the question mark in that we have options to keep different formats
**DateTransformation:
From side we are getting on date format and that date format need to change in another format in
target side at that time it is used
In some case we need to send some English character at that time we need to add like
DDMMMYYYY
***Text Function:
Substring: In Particular field if I want to take only some specific length of a character means we use
this function
There will be 2 input values Starting Position and Character count
For example I need to only starting characters from 0 and count is 5
Concatenation function:
It is used to concatenate the 2 input values and sends to one field value
To identify the 2 string values we can use delimiter also
EqualsS Function:
It checks the 2 input values whether they are equal or not if it is equal means it returns TRUE or
else FALSE
Touppercase function:
It converts the lower case values to upper case values
ToLowercase Function:
It converts the upper case characters to lower case characters
**Length Function:
It returns the length of the field value
**Trim Function:
It is used to remove the left and right side unwanted spaces from a character.
Note: Trim function cannot remove the spaces between the characters
ReplaceString Function:
It is used to replace the string from source side. It consists of 3 input parameters
1st is source field value, 2nd parameter is the value which we want to change that one we need to
give as constant and 3rd is which we want to replace the value that one we need to give as
constant
Arithmetic function
In this we use mostly Less than, Greater than, FormatByNumber and Round functions
Round function is used to round off the value
FormatbyNumber
It also works same like round function
***Boolean Function:
AND Function:
It returns TRUE if both the input parameters are true
OR Function:
It returns TRUE if any input parameters are true