Start of Content Area

Procedure documentation Configuring the Sender FTP Adapter  Locate the document in its SAP Library 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.

More information: Sender Agreement in Integration Server/ PCK, under Obligatory Sender Agreements

      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 noncentrally installed Adapter Engine.

This selection is not available in the PCK.

Define Parameters for Access to the File(s)

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

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

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

Define FTP and FTPS Connection Parameters

       6.      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).

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

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

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

Define Processing Parameters

   13.      Select the Processing tab page.

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

   15.      Specify the following for the poll interval:

       Poll Interval (secs): Number of seconds that the adapter is to wait if no files are found for processing

       Poll Interval (msecs): Number of milliseconds that the adapter is to 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 a file processed with errors is processed again.

If you set the value to null, 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.

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

   17.      Under Empty File Handling, 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.

   18.      To archive source files where a permanent error occurred during processing, select Archive Faulty Source Files.

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.

   19.      Specify the File Type of the document as Binary or Text.

This graphic is explained in the accompanying text

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-8 (BC-ABA)

       UTF-16BE

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

       UTF-16LE

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

       UTF-16

UTF-16 (BC-ABA), byte order

This graphic is explained in the accompanying text

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

Define Operating System Commands

   20.      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 Content Conversion Parameters

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

   22.      Select the Advanced tab page.

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

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

This graphic is explained in the accompanying text

Additional parameters are published in SAP Note 801926.

 

 

 

 

End of Content Area