cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PI File Adapter is overwriting files with different filenames

Former Member
0 Kudos

Hello experts,

we have the folowwing scenario:

ERP - PI ( Calling Web-Service and creating PDF-file) - ERP (file saved in unix dir)

From the ERP system there are two seperate calls via proxy object made to te PI. The first is creating a pdf label and then saves it to unix dir on the ERP-system. The second call then creates a datasheet pdf and also saves it to the same directory. The calls are made with a delay of a few seconds and the scenario is async.

When the second file is created it overwrites also the first file although this file is from a different request and has a different file name that it gets saved with. We don't have a clue why this is happening.

regards

Christian

Accepted Solutions (0)

Answers (2)

Answers (2)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Please check whether you set overwrite existing file  option checked in the file receiver adapter. Also make sure not specifying the first file name in the adapter.

or is there any other process or jobs running system level  that delete the files in that directory

Reference

http://help.sap.com/saphelp_nwpi711/helpdata/en/44/6830e67f2a6d12e10000000a1553f6/content.htm

Former Member
0 Kudos

Yes, I have checked this and it is set to "Create" and the option "Overwrite Existing File" is not set. As you can see on the file system two sepparate files get created even with different sizes and timestamp:

But both of them are havng the same content

regards

Christian

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Christian,

You could try setting the file to read only once message processing is completed. To do this, you need to use the Run OS Command After Message Processing e.g

chmod 444 %F sets the file auth to r--r--r--.

Hope this helps,

Mark

gagandeep_batra
Active Contributor
0 Kudos

did you check the Receiver  channel log

Regards

GB

Former Member
0 Kudos

Yes, the channel log didn't show any errors. In fact you can see that the two messages are processed with different message id's:

So I can't see any errors

Regards

Christian