File Content Conversion In Sap Pi At Receiver

  1. Sftp-adapter-file-content-conversion-sap-pi-po Published February 23, 2019 at 410 × 181 in Receiver sFTP Adapter Configuration Message Protocols of sFTP Adapter.
  2. Jan 27, 2020 If the target message (file) created by Message Mapping needs to be converted by the Receiver Adapter Communication Channel select the option ‘File Content Conversion‘. Usually, if the receiver file format is anything other than XML, you can use this feature to convert the file to an appropriate format such as CSV, Text, etc.
  3. Receiver Communications Channel I'm going to focus on the Sender Communication Channel as the rest of the configuration is straightforward. When creating the Communications Channel select 'File Content Conversion' as the message protocol. Configure the File or FTP server details as required and click on the 'Content Conversion' tab.
  4. Some time we need to add the text line in the File content conversion. Let's see the sample scenario. Consider the above txt file is the source file of xi. Now we fill the File content Conversion parameter such as Document name, Namespace, record set Structure, Key field name. Now we need to specify the FCC parameters.

In this article, we are going to learn about SAP PI/PO File Adapter.

First, we will understand the File adapter configuration for both sender and receiver. Then we will have a look at File Content Conversion (FCC) with simple and complex file structures.

File Adapter converts the incoming files into XML and vice versa. The File adapter resides on the J2EE stack of the PI server. It can read/write files directly from/to the PI server at the OS level using File System protocol. It also works using FTP protocol, using which it can read/write files from/to any server location. The configuration of File Adapter is quite simple and straightforward.

Sender File Adapter

Sender Receiver (SFTP) (txt file with Tab separated) - PI/PO -(csv file with pipe separated) Sender channel i don't have to touch, it's already sending the data to some ERP system. I have to implement FCC in receiver side with SFTP adapter. I don't know how to implement it. Could you please help me with your idea to resolve it.

Select the Transport protocol as FTP or NFS and Message Protocol as File. Specify the Directory and filename from where the source file needs to be picked up. File type can be either text (or XML) or binary. In the case of FTP protocol, you will need to provide FTP connection parameters as well. Below configuration for the File sender channel for NFS.

Below configuration for File sender channel for FTP

The adapter supports all the three QoS

    • BE (Best Effort),
    • EO (Exactly Once) and
    • EOIO (Exactly Once in Order).

Specify QoS as per your scenario. Poll Interval indicates the time interval between two consecutive attempts by PI to read the files from the source directory. Processing mode defines how the file should be handled once it is processed by the adapter engine. The file will not get deleted If processing mode selected as “Test”. The File will get deleted if the processing mode is selected “Delete” after the processing. If you specify a queue name (in case of EOIO) it is automatically created in PI. You can also specify the empty file handling.

Receiver File Adapter

Select the Transport protocol as FTP or NFS and Message Protocol as File. Specify the directory and filename where the target file is to be put. The target directory if it does not exist gets created automatically. Specify connection parameters in the case of FTP protocol. You can specify the File Construction mode as per your choice. QoS possible here are EO and EOIO and is inherited from the Integration Server.

You can also Specify the “Add Timestamp” to append file create time to filename. Also, specify the way to handle an empty file.

To see an example of a file adapter using NFS protocol, go through this article about File to IDoc scenario.

Sap

In the next part, we shall discuss setting up File Adapter for File Content Conversion with simple structure (CSV File) at sender File Adapter

and also check

File Content Conversion with simple structure (Fixed Length Fields ) at sender File Adapter

Imagine you need to read a file content from a remote application and you do not want to set up a replication?
Sds real time pcr software. This scenario explains how to expose a CSV file (here a product list) as a WebService using the standard SOAP Adapter and the WHINT FileReader Adapter.

CSV File:

Design (ESR):

Sap
  • Create Service Interfaces (Sender and Receiver side)
  • For the receiver side you can also use the synchronous Inbound Service Interface FileReaderQueryResponse_In which is shipped with the Adapter
  • Optional: Create a Mapping if you do not want to expose the result of the CSV-to-XML conversion of the MessageTransformBean

Configuration (Eclipse/NWDS):

iFlow:

File

Estim computer software. Receiver Channel (FileReader):

Sap Pi Sheet

SFTP Connectivity (of course you can read the file from NFS or FTP as well):

File Content Conversion In Sap Pi Receiver

Module Configuration (MessageTransformBean: CSV->XML):

Upload File to SFTP Server:

Test from SOAP UI:

File Content Conversion In Sap Pi At Receiver For Sale

Update: I think it is obvious that the Files can be also queried with other sender channels, not only from SOAP (like e.g. REST providing the response in JSON format):