FTP and "File-in-use"
We have a scenario in which a file is written to the SAP application server which should be picked up by XI using the FTP adapter. The polling interval of the adapter is set to 60 seconds.
We running into a strange problem: it may occur that the program on the SAP application server is still busy writing the dataset to the server, however the file already exists (as soon as the OPEN DATASET statement is passed the file is created on the application server but with no content yet). If just at this time the interval of 60 seconds is passed the FTP-adapter picks up the empty file, does no processing because the file is empty, but still archives the file to an archive directory.
Obviously the OPEN DATASET does not put an exclusive lock to the file? Does anyone know a solution to this?
In your file sender communication channel there is a parameter in Additional Parameters. MSecs to Wait Before Modification Check. Put some 'x' value. So the file adapter waits for 'x' time if the file is still writing.