The File Modification Check feature prevents the File Adapter from processing incomplete files. Sometimes you may find that the File Modification Check is not available in your sender file adapter channel. Here I will explain when this feature is supported.
For sender file adapter channel, there are two transport protocols: File System (NFS) / File Transfer Protocol (FTP), and two message protocols: File / File Content Conversion.
The File Modification Check feature has already been made available in NFS mode from XI 3.0 SP11/ PI 7.0, when NO file content conversion or file split is used. There is a parameter named ‘Msecs to Wait Before Modification Check‘ in the advanced mode.
This setting causes the File Adapter to wait a certain time after reading, but before sending a file to the Adapter Engine. If the file has been modified (which is basically determined by comparing the size of the read data with the current file size of the input file) after the configured interval has elapsed, the adapter aborts the processing of the file and tries to process the file again after the retry interval has elapsed.
For lower releases, this feature is not supported in FTP mode. If you enter a value in the field of ‘Msecs to Wait Before Modification Check‘ when configuring the sender FTP adapter channel, it will have no effect. However, since 7.31 SP18/7.40 SP13, File Modification Check feature is supported in FTP mode as well. For more details, please check SAP Note 2188990 – File Modification Check in FTP mode for File Adapter.
If the option “Msecs to Wait Before Modification Check” is not available for the settings you would like to use (for example, FCC, file split, FTP mode in lower releases), the following algorithm (to be implemented in your application) may be used to ensure that the File Adapter only processes completely written files:
- Create the file using an extension, which does not get processed by the File Adapter, e.g., “.tmp”
- Write the file content
- Rename the file to its final name, so the File Adapter will notice its existence and pick it up
SAP Note 821267 – FAQ: XI 3.0 / PI 7.0 / PI 7.1 / PI 7.3 File Adapter
SAP Note 2188990 – File Modification Check in FTP mode for File Adapter
SAP Note 1713305 – Msecs to Wait Before Modification Check option missing