cancel
Showing results for 
Search instead for 
Did you mean: 

FTP Receiver Adapter:Overwrite Existing File should use Temporary File method

suwandi_cahyadi
Contributor
0 Kudos

Dear Experts,

I plan to have an interface FTP at the receiver side and to overwrite the existing file with the same file name at the FTP server.

From the documentation here:

http://help.sap.com/saphelp_nwpi711/helpdata/en/44/69d7cfa4b633eae10000000a1553f6/content.htm?frames...

It is said that "You can only set the indicator if you select Use Temporary File under Put File below"

I wonder why do we have to use temporary file if we want to overwrite the existing file at the FTP server? AFAIK, the Use Temporary File option is an option to add an additional step to write a temporary file first using the temporary file naming scheme then rename to the final naming scheme.

I'm just afraid there's a reason behind this and that I need to know it before using it to avoid unexpected error.

What is the behavior if I set the Use Temporary File option with empty temporary file naming scheme and set the Overwrite Existing File?

Thank you,

Suwandi C.

Accepted Solutions (0)

Answers (2)

Answers (2)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Suwandi,


It is said that "You can only set the indicator if you select Use Temporary File under Put File below"

This does not seem to be the case anymore. Here is a screenshot from our 7.11 SP13.


What is the behavior if I set the Use Temporary File option with empty temporary file naming scheme and set the Overwrite Existing File?

Interesting, it does not create any errors when the channel is checked using F7. So I guess, if there is no entry on the temporary filename, SAP will generate a temp filename for it?

Regards,

Mark

suwandi_cahyadi
Contributor
0 Kudos

Hi Mark,

Thank you for the reply.

I can see from the screenshot that you used NFS for the transport protocol.

Please try to use the FTP transport protocol.

Thank you,

Suwandi C.

markangelo_dihiansan
Active Contributor
0 Kudos

Thank you Suwandi. That is indeed the case . Usually, we check the Use Temporary File because we do not want the file to be read while it is being written which would result in an incomplete read. It adds overhead though, but for your requirement you need to use it.

Regards,

Mark

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Suwandi,

For the FTP TP also, we have the option in Processing tab. PFB screen shot:

Coming to your query on temporary file name schema, instead of writing the file directly, you can go for a temporary file name schema, and when full file has been pushed then it would renamed to the filename configured in the channel on the server.

If you want to overwrite the file on the server, then use Overwrite existing File option, this would solve your requirement.

Regards

Vishnu

azharshaikh
Active Contributor
0 Kudos

Hi Suwandi,

AFAIK - you need not mention Use  Temp File Option for Overwriting the file.

If you notice, Put File has 2 option : Directly & Use Temp File, based on your requirement you can select either of these.

Please check point 15 in the link:

Configuring the Receiver FTP Adapter - Configuring the File/FTP Adapter in Integration Directory/PCK...

  1. 15.  Under Put File, select Directly if you want the file to be saved on the server immediately.

○  If an additional step is to be added using a temporary file, choose Use Temporary File.

○  You can specify a naming scheme for the temporary file under Temporary File Name Scheme

Regards,

Azhar