cancel
Showing results for 
Search instead for 
Did you mean: 

File Scenario

Former Member
0 Kudos

I have a scenario where I am using XI to transport a file from one locatio to another... No mapping or Transformation just simple transfer.

I want to know is it possible to set an option where the file in the target directory doesn't get overwritten before it is processed.

I know there is an optio you can cjeck in the receiver comm channel for this but my question is what happens to this file in this case?

Does it just get held in a Q in XI until the File in the target directory has been processed or what?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

yes as said by the chandra sekhar we can use the option in rece. comm . channel

i.e by setting <b>write mode</b> to use tempraory file.

Answers (8)

Answers (8)

Former Member
0 Kudos

No, you do not use the temporary file option. You immediately try to write the file to it's targer location without the 'overwrite' option, causing the message to fail when the file exists.

For details on the retry interval / timeout, see:

/people/sap.user72/blog/2005/11/29/xi-how-to-re-process-failed-xi-messages-automatically, under "II. Errors in Adapter Engine"

Former Member
0 Kudos

Hi,

If you do not check the flag 'overwrite file' in the receiver comm. channel, the message will fail in the receiver adapter. After the message has been processed by the receiving system and the file is removed from the target directory, the message can be reprocessed in XI and will be delivered to the target directory.

XI will automatically try to re-deliver these messages for a confiurable number of times (by default 5 I think) and after that a manual restart is always possible.

Kind regards,

Koen

Former Member
0 Kudos

Koen,

Ok so will this fail if I was to use the write Temporary File Option Then?

Also could is there somewhere I can define how many times and how often XI tries to redeliver message in the receiver Adapter?

Former Member
0 Kudos

I think you need create two communication channels: one for reading and another for writing.

1) the reading channel: you can control the process mode to delete, set to read only etc for the sent file.

2) the writing channel: you can control the write mode to select what you want.

I just look the type File of Adapter type again. So post again.

Bruce

Former Member
0 Kudos

Bruce what exactly do yo mean? How will that help me?

Also to the gentleman above... Using Timestamps simply wont work because the receiving system requires that we drop off a file with a static name... Any other Ideas

The Overwrite Existing file option in the receiver adapter works well but the issue is that we get all these temp files written as well which is messy? Anyway around that?

Like maybe we dont write a Temp File? but will that work?

Former Member
0 Kudos

Sorry, I read your question again.

You mean you want to transer a file into another location where the file will be processed. And before processed the file mustn't be written. Right?

I think you don't need overwrite the file. This case is asynchronous, right? So maybe you can set the senario automatically to run again after having errors because the file can't be written.

I want to help you, not disturb you. Keep calm.

Bruce

Former Member
0 Kudos

Hi Bruce lol.... No problem...

Yes basically I want to write a file to a directory but if there is already a file in that directory I don't want to overwrite it I simply want to wait until that file has been moved and then deliver my file.

Former Member
0 Kudos

Hey

one way around will be to use BPM with a simple wait step in it.i know BPM is an extra addition in ur scenario whci is not needed but with its help u can wait for as much time as possible and then u can write the file.

moreover BPM's are not that bad your's will be a real simple one so i dont think it will create any problem

thanx

ahmad

Former Member
0 Kudos

HI,

We have an option in File adapter..

Mode Create - Choose Overwrite Existing File if you want to overwrite the existing file. If you do not set the indicator, processing is stopped until the created file is processed.

You can only set the indicator if you have selected Use Temporary File under Put File.

nder Write Mode, specify whether the target file is to be written directly in the specified directory. If an additional step is to be added using a temporary file, choose Use Temporary File.

Regards

Chilla

Former Member
0 Kudos

Chandra...

Can I just clarify what you are saying...

If I simply just uncheck the Overwrite Existing File Check box then Processing is stopped until the existing file in the target directory is moved or deleted?

But if I do write temporary option then whats the difference?

Former Member
0 Kudos

I want to know is it possible to set an option where the file in the target directory doesn't get overwritten before it is processed.

Yes we have by setting processing mode to time stamp

I know there is an option you can check in the receiver comm channel for this but my question is what happens to this file in this case?

Yes there is a option for you in the comm.. channel., for each file it will assign time stamp, so that it can’t overwrite.

Does it just get held in a Q in XI until the File in the target directory has been processed or what?

no , not like that A target directory directory may contain 'n' no . of files with different time stamps.

Former Member
0 Kudos

Hay there,

easiest thing to do is to run a batch script to move the target file to a seperate directory.

you can take a look at what i've done when i had to do some file jiggling with my sender & reciever file adapters in a similer issue:

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/03/additionaltipsforusingXIasahugefiletransfer%28withbatchscripts%29&

have a good one,

Uri Lifshitz.

bhavesh_kantilal
Active Contributor
0 Kudos

Can you give more info?

Which option are we discussingin the receiver file adapter?

regards

Bhavesh

Former Member
0 Kudos

Yes Bhavesh we are talking about the Receiver File adapter

bhavesh_kantilal
Active Contributor
0 Kudos

Which exact option in the receiver file adapter?

Regards

Bhavesh

Former Member
0 Kudos

I suggest you to use file adaper with ftp type to read and send a file. Actually you can let the user account of FTP server to control the read/write permission.

*If helping please reward in the left pane. _*