Procedure documentation Configuring the Receiver File Adapter 

Use

You create a receiver file adapter to save XML messages from the Integration Server/PCK in files.

Procedure

  1.  If you want the document that is sent from the Integration Server/PCK to be saved 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 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.

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

  7.  Select the Processing tab page.

  8.  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, set the Overwrite Existing File indicator. If you do not set the indicator, processing is stopped until the created file is processed.

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

  9.  Under Write Mode, specify whether the target file is to be written Directly to the specified directory.

  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 scheme is used to determine the prefix and extension of the temporary file; to ensure a unique file name, a time stamp is also added to the name during processing.

Example

The scheme xitemp.tmp, for example, results in the file name xitemp<timestamp>.tmp.

This write mode is not available for the File Construction Mode Append.

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

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

  12.  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 then 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-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)

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

Define Operating System Commands

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

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

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

  16.    To evaluate adapter attributes in the message header of the PI message, set the Use Adapter-Specific Message Attributes indicator.

  17.    If you want missing message attributes to trigger error messages, 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)

You can only set this indicator if File Type is set to Text, and if the file type indicator above is already set.

  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

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

Define Additional Parameters in Advanced Mode

  19.  To specify additional parameters in the adapter configuration, set the Advanced Mode indicator.

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

Note

Additional parameters are published in SAP Note 801926.

 

 

 

 

Was this page helpful to you?