PI102:Interface Configuration using File Adopter
Foreword: – In the PI101 blog, we discussed basics of SAP PI. In this blog, let’s look into end-to-end configuration of a simple interface using File Adopter. Technical consultants with basic PI knowledge are the intended audience of this article.
Scenario: – File to PI to File
Assumptions:-
- All SLD objects listed below are already created
- Software product and versions
- Software component version
- Technical systems
- Business systems
- Software component is imported and Name Space is created
Integration Repository:- IR is where interface objects are defined. They are:
- Data Types
- Message Types
- Message Interfaces
- Message Mapping
- Interface Mapping
Let’s create IR objects as shown below.
Source Data Type
Create data type with elements like that of source file record data fields.
Target Data Type
Create target data type same as source data type.
Source Message Type
Create source message type using source data type DT_EMPLOYEE.
Target Message Type
Create target message type using target data type DT_Details.
Outbound Message Interface
Create Asynchronous Outbound interface using Target Message type MT_DETAILS.
Inbound Message Interface
Create Asynchronous Inbound interface using Source Message type MT_EMPLOYEE.
Message Mapping
Using message types that were created above, map the corresponding elements of the data types as shown below. Source message type MT_Employee will be on left side and target message type MT_Details will be on right side. After mapping, we can test the mapping results using Test tab.
Interface mapping
Map the interfaces that are created above.
Integration Directory:- Integration Directory is where we configure/define the following objects:
- Integration Scenario
- Business Systems/Services
- Communication Channels
- Receiver Determination
- Interface Determination
- Sender Agreement
- Receiver Agreement
Let’s create ID objects as shown below.
Create Configuration Scenario
Import Business Systems
Import the business systems that are created in SLD. The import option is available in the main menu of Integration Directory.
Create Sender Communication Channel
Create sender communication channel under BS_FileSysOut. Select the File Adopter in Adopter Type Drop.
Create Receiver Communication Channel
Create sender communication channel under BS_FileSysIn. Select the File Adopter in Adopter Type Drop down.
Create Receiver Determination
Create receiver determination using interface MI_DETAILS_OB , business system BS_FileSysOut and receiver communication channel.
Create Interface Determination
Create interface determination using interface MI_DETAILS_OB , business system BS_FileSysOut and business system BS_FileSysOut.
Create Receiver Agreement
Create receiver agreement using business system BS_FileSysOut as sender, business system BS_FileSysIn as receiver and receiver communication channel.
Create Sender Agreement
Create sender agreement using business system BS_FileSysOut as sender and sender communication channel. It is not required to enter anything for receiver service.
To complete the interface configuration, activate all components.
Testing Scenario:-
Place file with a record layout that contains the data elements as defined in data type in C:\ftprrot\PI71\out folder. PI picks up this file for processing and places it in C:\ftprrot\PI71\in folder.
Conclusion: – This is a simple interface using File adapter. We will discuss interface scenarios using different adaptors in future blogs.