Show TOC

Configuring the Sender FTP AdapterLocate this document in the navigation structure

Use

You create a sender FTP adapter if you want to send file content from an FTP server to the Integration Server or the PCK. This only applies to files that are not read-only.

Prerequisites
  • There must be exactly one sender agreement for the defined communication channel.
  • If you are developing a module for the adapter and want to access the file name in the module, see SAP Note 819761.
  • The use of FTPS follows the specification RFC 4217.

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

    More information: How to Use Key Storage

Procedure
...
  1. The Transport Protocol is File Transfer Protocol (FTP).
  2. Define whether the file content is to be sent to the Integration Engine or PCK unchanged or the content is to be converted to an XML document.
    • If you want to send the file content unchanged, select File as the Message Protocol.
    • If you want to convert a text file with complex data structures to an XML document, select
      File Content Conversion
      and make the required entries for conversion under Content Conversion Parameters.
  3. 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 Parameters for Access to the File(s)

...
  1. Specify the Source Directory containing the files to be processed.

    You can either specify the entire name or a name relative to the working directory of the Adapter Engine. On all platforms (including Windows), use a forward slash (/) to separate directory names in accordance with the Java specification.

  2. Specify the File Name of the file to be processed.

    If you want to specify multiple files, you can use placeholders in the file name and enter file name masks. Use exclusion masks to exclude particular files from the selection. Files are always processed in ascending alphabetical order.

    More information: Defining Placeholders, File Name Masks, and Exclusion Masks

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

  4. 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. 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 selected FTPS for Connection Security, then enter the following details:

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

        Retain the default setting. Only adjust the sequence of commands to match those expected of 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 AS Java.

      • Enter the Keystore and the X.509 Certificate and Private Key.
  5. To log on anonymously, select Anonymous Login.

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

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

Define Processing Parameters

...
  1. Select the Processing tab page.
  2. Under Quality of Service, specify how a message is to be processed by the Integration Engine/PCK.

    For Quality of Service Exactly Once In Order, enter the Queue Name.

    More information: Quality of Service

  3. Specify the following for the poll interval:
    • Poll Interval (secs): Number of seconds that the adapter must wait if no files are found for processing
    • Poll Interval (msecs) Number of milliseconds that the adapter must wait if no files are found for processing

      If you set Poll Interval (secs) to null, processing times will be short and close to real time.

      If you set Poll Interval (secs) and Poll Interval (msecs) to null, the adapter is called once.

    • Retry Interval (secs): Number of seconds that the adapter is to wait before an SQL statement processed with errors is processed again

      If the value is set to null, then the adapter is canceled if an error occurs, even if a value greater than null is specified for Poll Interval (secs).

      If you do not enter a value, the value from Poll Interval (secs) is used.

  4. Under Processing Mode, specify what is to happen to the file that has been processed successfully:
    • Archive
      • To add a time stamp to the file name, select Add Time Stamp.

        The time stamp has the format yyyMMdd-hhMMss-SSS. The time stamp ensures that the archived files are not overwritten and it enables you to sort them according to the time that they were received.

      • Enter the name of the Archive Directory.
    • Delete
    • Test

      Files are not processed.

      Only use this mode to test the configurations of the FTP adapter or the Integration Engine/PCK. It is not suitable for productive operation.

  5. Under Handling of Empty Files, specify how empty files (length 0 bytes) are to be handled:
    • Do Not Create Message

      No XI messages are created from empty files.

      The files are processed according to the selected processing mode.

      For example, if the processing mode is Delete, empty files are deleted in the source directory.

    • Process Empty Files

      XI messages are created with an empty main payload.

      The files are processed according to the selected processing mode.

    • Skip Empty Files

      No XI messages are created from empty files.

      Empty files are skipped and remain in the source directory.

  6. To archive source files where a permanent error occurred during processing, select Archive Source Files with Errors.

    A permanent error occurs either during the conversion of the file content, or in a module in the module processor.

    More information: Adding MessageTransformBean in the Module Processor

    • Specify Error Archive Directory.
    • To add a time stamp to the archived file, select Add Time Stamp.
  7. Specify the File Type of the document as Binary or Text.
    Caution

    XML text documents usually contain their own code page description. Set the File Type to Binary.

    If you have selected Text, specify a code page under File Encoding. The default setting is to use the system code page that is specific to the configuration of the installed operating system. The file content is converted to the UTF-8 code page before it is sent.

    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, byte order
      Note

      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 Message Processing

Define Duplicate Handling Settings

  1. If you want to control the processing of the duplicate messages, select Enable Duplicate Handling, and then perform the following steps:
    1. Enter a value in the Duplicate Message Alert Threshold textbox.

System notifies the user with an alert message (warning) at the first occurrence of the duplicate message and stops processing these messages. In addition, it notifies the user with an alert message (error) with the n+1 duplicate message occurrence.

  1. If you want to disable the channel after the duplicate threshold is exceeded, select Disable Channel If Threshold Exceeded.
  2. The duplicate message is identified by the last modified time stamp of the file.
  3. This feature increases the robustness by avoiding the processing of  duplicate messages. It also provides flexible threshold configuration and channel deactivation (if threshold exceeds) options.

Define Content Conversion Parameters

...
  1. If you have selected File Content Conversion as the Message Protocol, you can convert a text file containing complex structures into an XML source format in this mode.

    Select the Content Conversion tab page.

    More information: Converting Structures to XML Using the Sender File/FTP Adapter

Define Adapter-Specific Message Attributes

...
  1. Choose the Advanced tab.
  2. To save adapter attributes in the message header of the XI message, select Set Adapter-Specific Message Attributes.

    To include the following attributes in the XI message header, select the following:

    • File Name (technical name: FileName)
    • Directory (technical name: Directory)
    • File Type (technical name: FileType)
    • File Encoding(technical name: FileEncoding)
      You can only set this indicator if you have specified the File Type as
      Text
      , and if the indicator for the message attribute File Type above is already set.
    • Source File Size(technical name: SourceFileSize)
    • Source File Time Stamp(technical name: SourceFileTimeStamp)
    • Source FTP Host(technical name:  SourceFTPHost)

    The attribute namespace for the adapter is http://sap.com/xi/XI/System/File .

Define the Adapter Status

...

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

Define Additional Parameters in Advanced Mode

...

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

  • File splitting (EOIO processing of large binary files)

    You can select this settings for sending larger files (for example, larger than 1 gigabyte). The file is first divided up into smaller file parts. These file parts are then processed individually at runtime.

    You can configure the size of the file parts (in megabytes).

    Note

    If you select this option hen you cannot execute a mapping or any other content conversion.

    Caution

    To be able to activate this function, the Quality of Service must be set to EOIO (on the Processing tab page).

  • Specify the maximum file size in bytes.

    The adapter only processes files that are smaller than the specified size. An error occurs if files are any larger.

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

    Additional parameters are published in SAP Note 801926.