Note 821267 – FAQ: XI 3.0 / PI 7.0/ PI 7.1 File Adapter 1

SAP PI Interview Questions and SAP PI Tutorials

SAP PI Interview Questions and SAP PI Tutorials


SAP PI Interview Questions and SAP PI Tutorials

SAP PI Interview Questions and SAP PI Tutorials

11. File Sender: Processing Multiple Source Directories

Q: Can the File Sender Adapter be configured to poll multiple source directories from a single channel?

A: This functionality is available starting with XI 3.0 Support Package 14 as well as PI 7.0.

12. File Sender: Quality of Service EOIO (Exactly Once In Order)

Q: How does a File Adapter sender channel handle the quality of service EOIO? Are files that match the File Name Scheme in the sender’s channel configuration processed in arbitrary order?

A: The File Adapter allows you to configure the Processing Sequence of files for the Transport Protocol “File System (NFS)”, which also determines the order for EOIO processing. Files can either be processed in ascending alphabetical order (Processing Sequence “By Name”) or by their last modification time stamp (Processing Sequence “By Date”), where the oldest file is processed first. For the Transport Protocol “File Transfer Protocol (FTP)” files are always processed in ascending alphabetical order.

13. File Receiver: FTP Problems for Large Files with Microsoft IIS

Q: I have configured a File Adapter receiver channel to upload to a Microsoft Internet Information Server FTP server using the “Put File” mode “Use Temporary File”.

When sending a large file to the receiver, I get the following error: “ <filename>: The process cannot access the file because it is being used by another process.”

How do I solve this problem?

A: The cause of this problem is a known bug in the Microsoft IIS FTP server implementation you are using. For details, refer to:

IIS 4.0:;en-us;238644

There is no fix available from Microsoft. As a workaround, set the configuration parameter “Put File” to “Directly”.

IIS 5.0: The problem is currently not documented by Microsoft. As a workaround, set the configuration parameter “Put File” to “Directly”.

IIS 6.0:;en-us;828086

Apply the hotfix provided by Microsoft.

14. Memory Requirements

Q: Which memory requirements does the File Adapter have? Is there a restriction on the maximum file size it can process?

A: The maximum file size that can be processed by the File Adapter depends on a number of factors:

The most important one is the size of the Java heap, which is shared among all messages processed at a certain point in time. In order to be able to process larger messages without an out of memory error (OOM), it is recommended to increase the size of the available Java heap and/or to reduce the concurrency in the system so that fewer messages are processed in parallel.

Another factor negatively influencing the maximum message size in releases up to and including XI 3.0 SP 13 is an enabled charcter set (encoding) conversion if the message type is set to “Text”.

Using the transport protocol “File Transfer Protocol (FTP)” also uses more memory for processing than the transport protocol “File System (NFS)” (up to and including XI 3.0 SP 13).

If the Message Protocol “File Content Conversion” is used in a File Sender channel, consider that not only the size of the input file affects the File Adapter’s memory usage, but even more the size of the XML resulting from the conversion, which is usually a few factors larger than the original plain text file.

To reduce the memory consumption in this scenario, consider configuring the setting “Maximum Recordsets per Message” for the sender channel. This will cause the input file to be split into multiple smaller mesages.

15. Operating System Command

Q: I am having difficulties getting an external operating system command to work. What can I do to diagnose the problem?

A: Refer to note 841704.

16. File Encoding

Q: How do I correctly configure the File Encoding used by the File Adapter?

A: Generally, the message payload of an XI message is treated as UTF-8 when it needs to be converted from or into a different encoding. So, what you specify in the File Sender channel is the source encoding for an encoding conversion to UTF-8. On the other hand, in the Receiver channel, you specify the target encoding for a conversion from UTF-8. If you configure a channel’s File Type setting as “Binary”, no conversion will be applied.

Depending on your scenario, only some encoding settings actually make sense and lead to the expected results:

XML Files

An XML file’s encoding is set in the XML header, which is later interpreted when parsing the XML, e.g. in the mapping, so there is no necessity to perform an encoding conversion in the File Adapter. As a rule of thumb, always configure the File Type parameter of a sender or receiver channel as “Binary” when reading or writing XML data.

Important: Even if you configure a File Encoding in the File Adapter channel, the File Adapter will not re-write the XML header to reflect the changed encoding, so you will probably see an XML parsing error later during the processing of the message if you specify an encoding.

Flat Files with File Content Conversion

For a File Sender channel, configure the encoding of the source file. The file will be interpreted according to the configured encoding and converted to XML with an UTF-8 encoding.

For a File Receiver channel, configure the encoding to match the encoding you would like to be written to the target flat file.

Flat Files without File Content Conversion

Whether to configure an encoding in this case depends on if you want to pass through the file “as is”, e.g. within a File Sender to File Receiver scenario, or if you want to convert the file’s encoding on its way through the Integration Server. For “as is” processing, configure both the sender and the receiver using the File Type setting “Binary”.

To apply an encoding conversion, configure the respective source and target encoding in both the sender and receiver channel.

Important: Configuring an encoding in the receiver channel will only lead to the expected results if the payload sent to the receiver channel is in UTF-8 format (e.g., by having specified an encoding conversion in the Sender channel).

17. Empty File Encoding Parameter

Q: Which encoding is used if I configure the File Type as “Text”, but leave the File Encoding parameter empty?

A: In this case, the system encoding will be used, e.g. “Cp1252” on most western Windows installations.

18. File Sender: Scheduling

Q: How do I configure a File Adapter sender channel to poll a directory at a specific time of day?

A: This is available from SP 20 in Communication channel monitoring with the feature by name ‘Availability Time Planning’.

19. Secure FTP (FTPS)

Q: I would like to use Secure FTP (FTPS) with the File Adapter. Does my FTP server support this out of the box? Which configuration changes do I need to apply to my FTP server?

A: Not every FTP server supports FTPS and many that do require a configuration change to activate the FTPS protocol extension. Contact your FTP server software vendor for detailed information.

20. File Sender: Special Characters in File Names

Q: I am trying to get the File Adapter to poll a file, which contains special characters (e.g., accented characters or umlauts) in its file name. However, irrespectively of the wildcard mask I specify in the File Adapter sender channel configuration, the file does not get picked up. Which configuration setting do I need to change to get my scenario working?

A: Under certain operating system platforms, such as Solaris, the APIs used by the Java Runtime (JRE) are not Unicode-aware. Consequently, the JRE needs to be configured to correctly interpret the character set it receives from the operating system.

This is configured through the “file.encoding” system property as well as the “LANG” environment variable.

Make sure you set “file.encoding” to a character set (such as ISO-8859-1) that supports the special characters you would like to process. This system property can be configured by appending “-Dfile.encoding=<encoding>” to the Java VM parameters section of the SAP J2EE Config Tool.

Additionally, you need to set the “LANG” environment variable to a locale that supports more than 7 bits, such as “de.ISO8859-1”. The encoding you specify in the LANG environment variable needs to match the encoding set via “file.encoding”.

You can persistently configure the environment variable by setting it in the profile $HOME/.sapenv_$HOSTNAME.csh of the <sid>adm user: setenv LANG de.ISO8859-1. For additional details on ‘How to Work with Character Encodings in PI’ the following guide can also be followed:

SAP PI Interview Questions and SAP PI Tutorials

SAP PI Interview Questions and SAP PI Tutorials

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter
PDF24    Send article as PDF   
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *