Step-by-step guide on File-to-IDoc using SAP PI 7.0

By Deepak Shah, L&T Infotech

Brief Overview:

The purpose of this exercise is to implement a simple one way Asynchronous link between a file sender and SAP R/3 system using SAP XI/PI. Custom XML Document Containing Vendor information is picked up from the FTP server by file adapter. The Message is mapped to IDoc –XML format & then routed to the IDoc adapter. The CREMAS IDoc is then posted into the backend R/3 System and vendor will be created by the R/3 system provided that it has authorization to do so.  

Prerequisites:

  1. Basic Knowledge of SAP PI / XI 7.0
  2. Business System configuration in SLD is not covered in detail.  
  3. FTP configuration should be in place to pick up flat file from specified  location
  4. Try creating a vendor in R/3 using transaction XK01 and get list of mandatory fields that are necessary in the source file structure  

Implementation Steps:                                                       

A.) Maintain XI/PI System (Pick File – Transform into IDoc xml)     

 A.1) Maintain SLD (System Landscape Directory)

This Document does not contain configuration steps for creating the Business System, Technical system, Product & Software component. It is assumed that the sender and receiver Business Systems are already created along with corresponding Technical System, Product, Software components. Also the Software Component is imported into Integration Repository.

In this Example,  

Sender Business System: TBIT40_Legacy_BS_DS

Receiver Business System: CX1_Business_System

Software Component: TBIT40_DS_SWCW, 1.0 of SAP     

A.2) Maintain IR (Integration Repository)  

A.2.1 Importing IDoc from SAP R/3 System

Double Click on your Software Component in the Integration Repository.

Select the radio Button “Import of RFC and IDoc interfaces from SAP system Permitted

Enter the Connection Data for Import from SAP System

Add a new Namespace “http://sdht1.com”.

Click on SAVE & Activate.  

Now right click on Imported Object under your Software Component and click on Import of SAP Objects.  

Give the relevant Sender System information

Select the IDoc CREMAS03 and click continue  

 

Click finish to start import. Once the IDoc is successfully imported save & activate it.

Note: We don’t need any Data Type, Message Type and Message Interface for Receiver side as IDoc itself will be used for receiver Data Type, Message Type and Message Interface.  

A.2.2 Create Data Type for Sender:

Go to Interface Objects tab in your namespace.

Go to Data type and Click on new

Here we will create a data type Address_DT and Vendor_DT.

Address_DT will be referred as type for one of the field in the Vendor_DT.

This is called as Nesting of Data types.

This is achieved by Selecting “Search Help” from the Drop down menu. There you will be able to select any existing data type in the SAME Software Component  

 

The Structure of Both data types are as follows  

 

 

A.2.3 Create Message Type for Sender:

 In the Left Frame, Right Click on the Node Message type and select “New”.  

The Name of the Message type will be “Vendor”.

Note: Message type forms the root element of the XML business Document.

For section “data type used”, select your data type “Vendor_ DT” from F4 help.

Save & activate.  

Click here to continue...

 

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image