Show TOC

Configuring the Receiver FTP AdapterLocate this document in the navigation structure

Use

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

Prerequisites

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.

Procedure
  1. To save the document that is sent from the Integration Server/PCK directly in a file, select File as 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

  1. Select the Target tab page.
  2. 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

  3. 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.

  4. 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

  1. 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).
  2. 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.
  3. 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 FTPS for 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.
  4. To log on anonymously, select Anonymous Login.

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

  5. 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.
  6. Set Transfer Mode of the FTP connection to Text or Binary data transfer.

Define Processing Parameters

  1. Select the Processing tab page.
  2. Select the File Construction Mode.
    • Create

      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.

    • Append

      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-SSS is 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:

      • Prefix

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

      • Format

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

      • Step

        Specify the counter increment.

      • Mode

        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.

        Note

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

  3. 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 .

  4. Select Empty Message Handling:
    • Write Empty File

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

    • Ignore

      No file is put in the target directory.

  5. Enter the number of messages that the adapter can process simultaneously on a cluster node under Maximum Concurrency.
  6. Specify the File Type of the document.
    • Binary
    • Text

      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:

      • US-ASCII

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

      • ISO-8859-1

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

      • UTF-8
      • UTF-16BE

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

      • UTF-16LE

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

      • UTF-16

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

Define Operating System Commands

  1. 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

  1. 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

  1. 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.

  1. To evaluate adapter attributes in the message header of the PI message, select Use Adapter-Specific Message Attributes.
  2. 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 http://sap.com/xi/XI/System/File .

Define the Adapter Status

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

Define Additional Parameters in Advanced Mode

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

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

    Note

    Additional parameters are published in SAP Note 801926 .