Show TOC Start of Content Area

Function documentation Configuring the Sender File/FTP Adapter  Locate the document in its SAP Library structure

Use

You need to configure the sender file/FTP adapter to be able to send the content of files to the Integration Server or the PCK. This only applies to files that are not read-only. 

Integration

You configure the adapter on the Parameters tab page during the definition of a communication channel in the Integration Server or in the PCK. In addition to the adapter configuration, you can use the Module tab page in the module processor to specify generic modules, which give the adapter additional functions.

Condition for Sender Agreement

The adapter determines the payload of the XI message according to how it is configured. However, the message header information is determined from the corresponding sender agreement for the communication channel.

The following conditions apply to the adapter for the definition of the sender agreement:

      Configure exactly one sender agreement for the defined communication channel.

      At least the interface name and the sender service must be qualified in the sender agreement. All other fields are optional in accordance with the general rules for defining sender agreements.

Accessing File Names

If you are developing a module for the sender file/FTP adapter and want to access the file name in the module, see SAP Note 819761.

Prerequisites

       1.      You have created a new communication channel or have opened an existing one.

       2.      On the Parameters tab page you have selected the adapter type FILE.

       3.      You have selected the Sender radio button to define the adapter as a sender adapter.

Using FTPS (File Transfer Protocol Using SSL/TLS)

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.

See: Key Storage Service

Activities

To configure the adapter, specify the following:

Transport Protocol

The file can be selected from either a file system (File System (NFS)) or from a File Transfer Protocol (FTP) server.

Message Protocol

      To send the file content to the Integration Engine or the PCK unaltered, choose File.

      If you want to send the Integration Engine or the PCK a text file with complex data structures that are to be converted into an XML document, choose File Content Conversion and make the required entries for conversion under Content Conversion Parameters (see below).

Adapter Engine

Select the Adapter Engine on the Integration Server, or select a non-centrally installed Adapter Engine. This selection is not available in the PCK.

Tab Page Source

File Access Parameters

      Source Directory

Specify the directory where the files to be processed are located.

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.

      File Name

Specify the name of the file that you want to process. The name can contain placeholders (*, ? (placeholders for exactly one character)) so that you can select a list of files for processing.

      Advanced Selection for Source File

If you want to set an exclusion mask for theFile Name specified above, or if you want to specify multiple directories using a file name mask and exclusion mask, set the Advanced Selection for Source File indicator.

       Specify an Exclusion Mask for the file name specified above.

Example

You want to process all files that have the extension '.txt', but want to exclude all files that begin with the letter 'a'. To do this, enter *.txt for File Name, and a* for Exclusion Mask.

       You can enter additional specifications for source directories, file name screens, and exclusion screens in the table. These entries are processed in addition to the information specified above.

FTP Connection Parameters

The application of the File Transfer Protocol follows the RFC 959 specification. If you have selected the transport protocol File Transfer Protocol (FTP), enter the following information:

      Server

Enter the host name or IP address of the FTP server.

      Port

Specify the port number of the FTP server. The default is the standard port for the FTP server (21).

      Data Connection

       Active

In active mode, the server establishes a data connection from its data port, port 20, to an end point chosen by the client.

       Passive

In passive mode, the client establishes a data connection to the port required by the server.

Recommendation

The default setting is a passive data connection. Only change this setting if you have a specific reason.

      Timeout (secs.)

If no data is transferred between the client and the FTP server in the time interval specified here, the adapter interprets this as an error and terminates the transfer.

      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/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 and uses TLS/SSL.

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

       Command Order

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

       Use X.509 Certificate for Client Authentication

Set this indicator if the adapter, in contrast to the FTP server, is to use X.509 certificate and public-key cryptography to authenticate itself. The corresponding key/certificate pair must previously be saved in a keystore view of the J2EE server by using the Visual Administrator.

       Enter the Keystore and the X.509 Certificate and Private Key. To do this, you can use the input help.

      To log on anonymously, select Anonymous Login.

Otherwise, enter the following:

       User name:

Enter a valid user name for the FTP server.

       Password with confirmation

      Connect Mode

Permanent

An existing connection to the FTP server is used permanently.

The connection is reestablished automatically if it is closed by the server.

Per File Transfer

A new connection to the FTP server is established for each file transfer.

      Transfer Mode

Set the FTP connection transfer mode to Text or to Binary.

Processing Tab Page

Processing Parameters

      Quality of Service

Specifies how the Integration Engine/PCK should process a message.

For Exactly Once in Order specify the Queue Name.

See: Quality of Service

      Poll Interval (secs)

Number of seconds that the adapter must wait if no files are found for processing.

      Poll Interval (msecs)

Additional waiting time in milliseconds.

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 only called once.

      Retry Interval (secs)

Specify the number of seconds that the adapter is to wait before a file 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).

Note

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

      Processing Mode

       Archive

Files that have been successfully processed are moved to an archive directory.

       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.

       Under Archive Directory, enter the name of the archive directory.

       If you want to archive the files on the FTP server, choose Archive Files on FTP Server. If the indicator is not set, the files are archived in the Adapter Engine file system.

       Delete

Successfully processed files are deleted.

       Test

Files are not processed.

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

       Set to Read-Only

Successfully processed files are given this attribute. Only writable files are processed.

This selection is only available for the File System (NFS) transport protocol.

      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.

      Archive Source Files with Errors

To archive source files where a permanent error occurred during processing, set the indicator.

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

See: MessageTransformBean

       Specify the Directory for Error Archiving.

       To add a time stamp to the archived file, select Add Time Stamp.

      Process Read-Only Files (for transport protocol File System (NFS))

Set the indicator if you want to also transfer files that are locked by other applications.

Only set this indicator if you are sure that no data will be lost.

      Processing Sequence (for transport protocol File System (NFS))

If you used placeholders when specifying the file name, define the processing sequence of the files:

       By Name: Files are processed alphabetically by file name.

       By Date: Files are processed according to their time stamp in the file system, starting with the oldest file.

      File Type

Specify the document data type.

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

8-bit Unicode character format

       UTF-16BE

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

       UTF-16LE

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

       UTF-16

16-bit Unicode character format, byte order

Note

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

XML text documents generally contain their own code page description and should be treated as binary data type.

      Additional File(s) (for transport protocol File System (NFS))

If you want to transfer additional files, select Additional File(s).

More information: Specifications for Additional Files

Run Operating System Command Before/After Message Processing

      Command Line

An operating system command specified here is executed before or after message processing that was found in a run. The default value is an empty character string (no command).

Note

When the operating system command is called, the file name currently being processed can be specified with the following placeholders:

    %f (file name)

    %F (absolute file name including path)

      Timeout (secs.)

This specifies the maximum runtime of the executing program in seconds. When this time interval is exceeded, the adapter continues processing. The executable program continues to run in the background.

      Terminate Program After Timeout

Set this indicator if the adapter is to terminate the executing program in the event of a timeout.

The adapter writes the output (STDOUT and STDERR) for the operating system command in the system trace.

Note

Message processing is independent of any errors that occur during the execution of a configured operating system command.

Content Conversion Tab Page

Content Conversion Parameters

If you have selected File Content Conversion as the message protocol, you can convert a text file that contains complex structures into an XML source format in this mode. The file contains various row formats in logical structures. For more information, see Converting File Content in the Sender Adapter.

Advanced Tab Page

Adapter-Specific Message Attributes

To store adapter attributes in the message header of the XI message, set the Set Adapter-Specific Message Attributes indicator.

To apply the following attributes in the XI message header, set the corresponding indicators:

Name

Technical Name

File Name

FileName

Directory

Directory

File Type

FileType

Character Set

You can only set this indicator if the File Type is text, and if the File Type indicator above is already set.

FileEncoding

Source File Size

SourceFileSize

Source File Timestamp

SourceFileTimeStamp

Source FTP Host

You can only set this indicator if the transport protocol is set to File Transfer Protocol (FTP).

SourceFTPHost

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

Adapter Status

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

Advanced Mode

To specify additional parameters in the adapter configuration, set the Advanced Modeindicator.

      Msecs to Wait Before Modification Check

Enter the number of milliseconds that the adapter must wait before it checks whether the files have been changed.

This parameter is not available if you have selected File Content Conversion as the Message Protocol and then made an entry under Recordsets per Message to split an input file into several messages.

Note

This parameter is applicable only for the File adapter. If you enter a value in this field when configuring the sender FTP adapter, it will have no effect.

      Maximum File Size

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.

      Table

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

Note

Additional parameters are published in SAP Note 801926.

 

 

 

 

 

End of Content Area