cancel
Showing results for 
Search instead for 
Did you mean: 

[File-Adapter] Reading not finished files

Former Member
0 Kudos

Hey,

my sender file adapter reading files which are not finished yet.

The files are created by an ABAP programm. The creation could

take some seconds. If the file adapter polls while creation is not

finished, we have a problem.

The flag "Process Read-Only Files" is not set, so the ABAP programm

doesn't seem to set the file to read only.

Is there a way to check (e.g. with an operating system command) if the

file is processed completly?

For example I could check if the date of creation is higher than 10 minutes

or something like this.

Any other ideas?

thanks

chris

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

What is the file adapter option you are using?

If NFS, you have the option "Milliseconds check before modification" that will prevent the file from being picked up till they are completly written.

If FTP, then when the file is being written to the ftp folder you should have the option to use temporary files option

Regards,

Bhavesh

Former Member
0 Kudos

I don't have access to the ABAP programm and I would check if there is a workaround.

@Bhavesh: I'm using NFS and the hidden option "Msec check before modification seems to be what I'm looking for. So points for you.

Thanks @ all

regards

chris

Answers (2)

Answers (2)

Former Member
0 Kudos

Hey

The approach we follow if pretty straight forward,when the file is being written it is named with an extension .dat(for e.g. inputFile.dat),then once the whole file is written the ABAP program(which was writing the file) simply renames this file to .txt extension(for e.g. inputFile.txt).The file adapter configured in XI pools for *.txt files and hence it only picks up file which are .txt which means it only picks up files after they are completely written.

Thanx

Aamir

Former Member
0 Kudos

Hi,

I guess this issue will happen only if you are using sender adapter with FTP protocol and your ABAP program is writing the file in to a FTP server.

In the case of NFS there will be a lock on the file while writing and you can configure you File sender adapter as NFS too.

Thanks

Francis

VijayKonam
Active Contributor
0 Kudos

Other workaround for this is, change the ABAP program to write to an intermediate directory and then move them to the XI polling directory once done. This is general practice in this kind of scenarios.

VJ