By Punit J, YASH PI Competency Team, Yash Technologies
Description: File Content Conversion is used to convert non-XML file (flat file) to XML file and vice-versa. In this blog, we will see how to convert flat file to XML file when file structure is bit complex. For example, when same columns shows different information in different rows.
For example if it has different. ( XML -Flat File) Using Adapter Module – Receiver. In help.sap.com related to File Content Conversion. Is stored in the NFS file system of SAP PI. This is a basic overview of content conversion using the file adapter. This is a simple asynchronous File to File scenario. File Content Conversion Scenario. Input Message: This is the input message to the receiver file adapter sent from XI. Input XML message. Output Message: Fig3. Output CSV Message. SAP PI Interview Questions and SAP PI Tutorials SAP PI Interview Questions and SAP PI Tutorials.
Business Case: Let’s take an example with file shown below. The file contains employee details. First row contains Header information of Employee (Employee ID and Name), Second and Third row contains his weekly details (Week No, Working Hours in the Week and Wage for the Week), there can be n number of rows for weekly details and Last row contains Employee Monthly Summary (Total hours worked and Total Wage).
Screen shot
Find below the step-by-step procedure to achieve this scenario:
Development on Integration Repository side.
1.Create Data Type.
Here I have added a filed Key in all the records, we will discuss about this field while configuring Sender File Adapter.
2. Create Message Type.
3) Create Message Interface for Sender and Receiver. In this scenario I am using same Message Type for both Sender and Receiver as we are converting flat file to XML file.
4) Create Message Mapping.
Here we don’t have to map the field ‘Key’.
5. Create Interface Mapping.
A file created by the Process Integration (PI) File Receiver Adapter on a Window's file system is ASCII though the file encoding channel parameter is set to UTF-8.
ANSI, BOM , KBA , BC-XI-CON-FIL , File Adapter , How To
Visit SAP Support Portal's SAP Notes and KBA Search.