cancel
Showing results for 
Search instead for 
Did you mean: 

How to avoid partial files via FTP from XI to an external server?

Former Member
0 Kudos

Hi all,

I'm working in an interface where XI sends a big file (greater than 1MB) via FTP to the client. The client needs an empty file to be created once the file has been fully sent from XI, with format <b>.ok</b>, so that their server can trigger their interface to process the file.

They want this procedure to ensure no partial files are processed.

Could someone please help me out on how to do this in XI.

Thank you.

<b>Juan Carlos</b>

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Write a script and then trigger this script using the option Command Processing after MessageProcessing in the receiver file adapter.

Once the entire file is created , the script will be triggered and this will create the New file as you want it.

Regards

Bhavesh

Answers (4)

Answers (4)

Former Member
0 Kudos

Thank you all for you help. I did a test and I ended up using "use temporary file" option.

Cheers.

Former Member
0 Kudos

How we can avoid the access of partial files via FTP from external Server to XI

pls suggess me...

Former Member
0 Kudos

Hi all,

I'm working in an interface where Extrnal Server sends a big file (greater than 1MB) via FTP to client. The cleint needs an empty file to be created once the file has been fully sent from External Server, with format .ok, so that their server can trigger their interface to process the file.

They want this procedure to ensure no partial files are processed.

Could someone please help me out on how to do this in XI.

Thank you.

nisarkhan_n
Active Contributor
0 Kudos

HI rajendra

look into this

file.checkFileModificationInterval=<msecs>

Use this parameter to define a length of time (default value: 0) for the file/FTP adapter to wait after the file has been read to see if the file length changes. If this is the case, the system repeats the read procedure. This is useful if the files to be imported by the adapter are generated dynamically without being locked on the operating system level (for example, files received from FTP servers). Without this workaround, the file/FTP adapter cannot recognize whether the generation of the file is complete in such applications with operating system functions.

regadrs

nisar

Former Member
0 Kudos

Hi,

You could use the option put file Via Temporary File, which causes the FTP adapter to write the file to temorary file and then rename it when it is complete.

Rgds Johan

Former Member
0 Kudos

Thanks for the answer Shabarish but I can't use that option because I will still end up with the same problem: sending a big file via FTP which could be picked up by the client without being completely sent.

Unless XI only delivers the file to the clients server once it has been completely transfered. I will run a test for this.

Thanks

Former Member
0 Kudos

Thank you Bhavesh for you response but if possible could you help me out with the script? A template could be very usefull.

Regards.

Shabarish_Nair
Active Contributor
0 Kudos

or maybe use;

<i>Put File

If the file is to be created on the server immediately, select Directly.

If the content is to be gathered in a temporary file first before the final file is put on the server, choose <b>Use Temporary File</b>.</i>

Ref: http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm

Please let me know if it works .... I guess it should but i am not quite sure.