When is the File Modification Check supported in Sender File adapter channel?
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
Related Notes:
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
Related Docs:
Hi Tina,
Than you for share that this functionality is available for FTP in the last PI SP.
However, i don't understand your algorithm for the cases that it is not available.
What application?, to do an own module bean?
How do you know the .tmp is really written completely?, do you put this file in a NFS PI shared directory?, how do you know the source file taken to write to the .tmp is really written completely?
Regards.
Hi Inaki,
She means that sender application(who ever is generating the file) needs to create the temporary file and rename it to actual file name which PI is polling for. We already doing all the time when this feature is not available.
Regards,
Praveen.
Hi Praveen,
Than you for the clarification, when i have this kind of problem, it's a bit difficult to persuade to change the sender application functionality, i'd rather to have a NFS shared directory, to change the hours to send and pick files and so on.
Regards.
Is this functionality available for SFTP scenarios?
Thanks
Sheril