Skip to end of metadata
Go to start of metadata


Imagine you need to read a file content from a remote application and you do not want to set up a replication?

This scenario explains how to expose a CSV file (here a product list) as a WebService using the standard SOAP Adapter and the FileReader Adapter with SAP PI/PRO

sap pi1.jpg

CSV File:

sap pi2.jpg

Design (ESR):

  • 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

sap pi3.jpg

sap pi4.jpg

sap pi5.jpg

Configuration (Eclipse/NWDS):


sap pi6.jpg

Receiver Channel (FileReader):

sap pi7.jpg

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

sap pi8.jpg

Module Configuration (MessageTransformBean: CSV->XML):

sap pi9.jpg

Upload File to SFTP Server:

sap pi10.jpg

Test from SOAP UI:

sap pi11.jpg

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):

sap pi12.jpg