Show TOC Start of Content Area

Procedure documentation Configuring the Receiver FTP Adapter  Locate the document in its SAP Library structure


You create a receiver FTP adapter to save XML messages from the Integration Server/PCK in files on an FTP server.


To use FTPS (File Transfer Protocol using SSL/TLS), the following prerequisites must be met:

The CA certificate used to sign the server certificate must be added to the TrustedCAs keystore view.

More information: How to Use Key Storage

The use of FTPS follows the specification RFC 4217.


       1.      To save the document that is sent from the Integration Server/PCK directly in a file, select Fileas the Message Protocol.

If you want to convert an XML document to a text file, select File Content Conversion and make the required entries for conversion under Content Conversion Parameters (see below).

       2.      Select the Adapter Engine on the Integration Server, or select a non-centrally installed Adapter Engine.

This selection is not available in the PCK.

Define File Access Parameters

       3.      Select the Target tab page.

       4.      Specify the Target Directory in which the documents are to be saved.

You can enter variables for the target directory. The variables can relate to elements in the XML schema of the payload or to attributes in the message header.

More information: Defining Variable Substitution for Target Directory/File Name

       5.      If you want the adapter to create the target directory if it does not exist, select Create Target Directory.

If the indicator is not set and the target directory does not exist, the adapter returns an error.

       6.      Specify the File Name Scheme that the system is to use to save the first incoming document.

You can enter variables for the file name scheme.

More information: Defining Variable Substitution for Target Directory/File Name

Define FTP and FTPS Connection Parameters

       7.      Enter the following information for the FTP server:

       Server: Host name or IP address

       Port: The default is the standard port for the FTP server (21).

       8.      Select Data Connection.

       The default setting for the data connection is Passive.

Only change this setting if you have a specific reason. In passive mode, the client establishes a data connection to the port required by the server.

       If the mode is set to Active, the server establishes a data connection from its data port, port 20, to an end point chosen by the client.

       Under Timeout (secs), define the time interval after which the adapter is to cancel the transfer if no data is transferred between the client and the FTP server. The adapter interprets this as an error.

       9.      Select the Connection Security.

       None (the FTP protocol is used without encryption)

       FTPS (FTP Using SSL/TLS) for Control Connection

The FTP control connection is protected using TLS/SSL (Transport Layer Security (BC-SEC)/Secure Sockets Layer). File transfer is unencrypted.

       FTPS (FTP Using SSL/TLS) for Control and Data Connection

All communication with the FTP server is encrypted using TLS/SSL.

If you have selected FTPSfor Connection Security, enter the following details:

       Under Command Order, define the sequence of commands used to authenticate and secure the connection.

Retain the default setting. Only adjust the Command Order to match those expected by the FTP server if you encounter problems with the FTP connection. For information about the correct setting, see the documentation for the FTP server.

       If you want the adapter to authenticate itself to the FTP server by X.509 certificate and public key cryptography, select Use X.509 Certificate for Client Authentication.

The corresponding key/certificate pair must be saved in a keystore view of the AS Java.

       Enter the Keystore and the X.509 Certificate and Private Key.

   10.      To log on anonymously, select Anonymous Login.

Otherwise, enter the User Name and Password that are valid for the FTP server, and confirm.

   11.      Select the Connect Mode.

       If you select Permanently, an existing connection to the FTP server is used. The connection is reestablished automatically if it is closed by the server.

       If you select Per File Transfer, a new connection to the FTP server is established for each file transfer.

   12.      Set Transfer Mode of the FTP connection to Text or Binary data transfer.

Define Processing Parameters

   13.      Select the Processing tab page.

   14.      Select the File Construction Mode.


The file is created. The document received last is saved in each case.

If you want the created file to be overwritten, select Overwrite Existing File. If you do not set the indicator, processing is stopped until the created file is processed.

You can only set the indicator if you select Use Temporary File under Put File below.


The file is written when the inbound documents are appended.

       Add Time Stamp

A new file is created for each document. A time stamp with the format yyyyMMdd-HHmmss-SSSis added to the file name. The time stamp is added as the last part of the name before the extension.

This mode guarantees that no file is overwritten. In this way, files that originate from the same adapter configuration can be sorted.

       Add Message ID

A new file is created for each document. The message ID generated by the Integration Server/PCK is added to the file name. The ID has the format: xxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

The message ID is added as the last part of the name before the extension. This mode guarantees that no file is overwritten.

       Add Counter

A new file is created for each document. A counter, which is inserted before the file name extension, is added to the file name (for example, default002.file).

Specify the following for Counter Definition:


Specify one or more characters that you want to add before the counter in the file name.


Specify the first counter to be used. It must be a valid integer number. Leading zeros are permitted.


Specify the counter increment.


Specify when the counter is to be added.

If you select After First File, the counter is added when the file name is first used unchanged.

If you select Immediately, the counter is added with the first inbound document.


This option is available only if you select the Transport Protocol as File System (NFS).

   15.      Under Put File, select Directly if you want the file to be saved on the server immediately.

       If an additional step is to be added using a temporary file, choose Use Temporary File.

       You can specify a naming scheme for the temporary file under Temporary File Name Scheme.

This selection is not available for the File Construction Mode Append.

   16.      Select Empty Message Handling:

       Write Empty File

An empty file (length 0 bytes) is put in the target directory.


No file is put in the target directory.

   17.      Enter the number of messages that the adapter can process simultaneously on a cluster node under Maximum Concurrency.

   18.      Specify the File Type of the document.



Under File Encoding, specify a code page.

The default setting is to use the system code page that is specific to the configuration of the installed operating system. The content of the message is converted to the corresponding code page before the message is saved as a file.

You should use this conversion only for plain text and not for XML documents. If you want to change the encoding of an XML document, then select the File Type as Binary and apply XMLAnonymizerBean as an additional module in the Module tab page.

Permitted values for the code page are the existing charsets of the Java runtime. According to the SUN specification for the Java runtime, at least the following standard character sets must be supported:


Seven-bit ASCII, also known as ISO646-US, or Basic Latin block of the Unicode character set


ISO character set for Western European languages (Latin Alphabet No. 1), also known as ISO-LATIN-1




16-bit Unicode character format, big-endian byte order


16-bit Unicode character format, little-endian byte order



Check which other character sets are supported in the documentation for your Java runtime implementation.

Define Operating System Commands

   19.      Specify the operating system commands that are to be executed before or after message processing.

More information: Defining Operating System Commands Before/After Processing

Define Content Conversion Parameters

   20.      If you have selected File Content Conversion as the Message Protocol, you can convert an XML document to a text file.

Select the Content Conversion tab page.

More information: Converting XML in the Receiver File/FTP Adapter to Text Format

Define Variable Substitution for Target Directory/File Name Scheme

   21.      Select the Advanced tab page.

More information: Defining Variable Substitution for Target Directory/File Name

Define Adapter-Specific Message Attributes

A configured variable substitution (see above) is performed after the attributes from the message header are applied.

   22.      To evaluate adapter attributes in the message header of the PI message, select Use Adapter-Specific Message Attributes.

   23.      If you want missing message attributes to trigger an error message, select Fail If Adapter-Specific Message Attributes Missing.

If the indicator is set and the header for adapter-specific message attributes or one of the set attributes is missing from the message, this leads, in asynchronous cases, to a delivery exception in the audit log of the message. In synchronous cases, the sender of the message is notified.

If you do not set the indicator, and message attributes are missing, the adapter accesses information from the adapter configuration.

To evaluate the following attributes in the PI message header, set the corresponding indicators:

       File Name (technical name: FileName)

       Directory (technical name: Directory)

       File Type (technical name: FileType)

       File Encoding (technical name: FileEncoding)

       Temporary Name Scheme for Target File Name (technical name: TargetTempFileName)

You can only set this indicator if the target file is written using a temporary file.

The attribute namespace for the adapter is

Define the Adapter Status

   24.      Set the adapter to Active to enable messages to be exchanged.

Define Additional Parameters in Advanced Mode

   25.      To specify additional parameters for the adapter configuration, select Advanced Mode.

Specify the additional parameter names and parameter values in the table.


Additional parameters are published in SAP Note 801926.







End of Content Area