Using the File Adapter as Receiver

Objectives

After completing this lesson, you will be able to:

  • Use the file adapter as receiver

Receiver File Adapter

File Adapter Architecture

The file/FTP adapter is part of the AAE. The receiver adapter receives messages from SAP Process Integration (PI) message processing and saves them as a file in a directory or sends them to a server using FTP. The sender adapter reads messages from the file system (or from an FTP server), converting them to the SAP PI XML format and transferring them to SAP PI message processing. The file can be in text format or in XML format.

To enable message exchange with the business system, the file adapter and the business system must be able to access the same directory (in the case of the file system transport protocol).

File Structure in ESR

You define the data structure of the inbound interface using data types in the Enterprise Services Repository (ESR).

The exact structure of the objects in the ESR depends on the interface. In the case of XML files, the inbound interface determines not only the message structure, but also the field names (by using XML tags).

Hint

The name of the data type does not appear in the target file. The message type determines the name of the root element and all other names are assigned using the names in the data type definition.

Receiver File / FTP Adapter Configuration

The receiver File / FTP adapter is part of an AAE and you configure it using a communication channel in the ID.

When you create a communication channel for the receiver system (business system or component), choose File from the input help as the adapter type and specify Receiver as the type.

Parameters Tab Page

Values for the Parameters Tab Page

Field NameValue
Transport ProtocolNFS or FTP
Message ProtocolFTP or File Content Conversion
Adapter EngineCentral or Non-Central

After choosing the values on the Parameters tab page, you then specify the following parameters for the transfer file.

Parameters to be specified for the File Transfer:

File name schema
Name of the file (for additional parameters).
File construction mode

Create file, append to existing file or specify additional parameters for the file.

File type

Binary or text file (in the case of a text file, also specify the file encoding as a code page).

If you are creating a new file, specify whether any existing file is to be overwritten. Alternatively, you can add a parameter, such as the message ID, a time stamp, or a consecutive counter to the file name (there are additional parameters for the counter).

These specifications are independent of whether you have selected FTP or the Network File System (NFS).

If you specify NFS as the transport protocol, the only other specification you need to make is the target directory in which the file is to be generated.

The file/FTP adapter expects directories in the configuration parameters to be in a format usual in Java programs. Therefore, you need to enter paths in the form D:/path, even if you are using the Microsoft Windows operating system.

Create a File Receiver Communication Channel

Exercise Information

Note

In this exercise, when the values include ##, replace the character with a two-digit number (01–30).

Note
The exercises in this course were tested with Microsoft Internet Explorer. If you use any other browser, the behavior in some exercises might be different.

Exercise Options

You can perform this exercise in two ways:

  1. Live Environment: choose Start Exercise, and from the entry page choose Open PDF Document. Follow the steps described in this pdf in your own system landscape.
  2. Simulation: choose Start Exercise, and from the entry page choose Start Tutorial. Watch the step-by-step instructions within the simulation.
Note
We recommend running the simulation first.

Log in to track your progress & complete quizzes