cancel
Showing results for 
Search instead for 
Did you mean: 

Archive files in SFTP - PI 7.3

0 Kudos

Hi Experts,

Need help on the below two issues, while using SFTP adapter in PI 7.3

1) I need to archive the file in to a specified folder of SFTP server. In channel configuration, checked the Archiving files on SFTP but the files are archiving in the same folder where it is picked with adding a pre-fix to the filename.

When I use a '~/' symbol in the archive name parameter, the files are archiving in the root folder.

2) How to pick file name starts with some keyword? tried with custom FTP file name scheme like (<filename>*.csv), but my SFTP channel is not picking the files which starts with.

Can someone please suggest for any alternatives or modules to use to fix this.

Thanks,

Srikanth.

Accepted Solutions (1)

Accepted Solutions (1)

naveen_chichili
Active Contributor
0 Kudos
0 Kudos

Configured according to the help topics available, but SFTP channel is not picking up the files which starts with IT_EB, we specified the file name as IT_EB*.csv in the file name parameter.

And also channel is not archiving on the specified folder, it is archiving in the same source folder with the name specified in the parameter for archiving.

Kindly suggest and help on this behaviour.

-sri

Former Member
0 Kudos

Hi Sri,

You can use the file name schema that we use with the normal File Adapter. It won't pick up the files you are polling for. You have to use a Regular Expression instead, see:

http://scn.sap.com/thread/3243265

Regarding the archiving...Play around with your slashes (/), particularly by adding a slash right at the end of your archive path and see if the behaviour is different. Using '~/' will archive the files in the root folder for your user on the SFTP server, that is the correct behaviour. So try to use the absolute path (full path) to your achive folder first. 

Regards, Trevor

0 Kudos

Hi Trevor,

I tried all the combinations, when I used ~/ - it is archiving at the root folder

When I use ~/<sourceFolder>/Archive (Which is the actual path) then it is taking Archive as prefix and for the filename and storing it in source folder.

When I use ~/Archive - it is storing the file in root folder with Archive as prefix to the file name.

I will try your suggestion for file name and see. Thanks!!

Regards,

Sri

anand_shankar10
Active Participant
0 Kudos

Hi Sri,

Try once with slash in the end.......

[~/<sourceFolder>/Archive/]

0 Kudos

Hi Trevor,

Now all working fine, but when the file is archived to specified folder it is saving as "<entirefilename.csv>.txt" adding an extension .txt to the original .csv file. Please pass your views to fix this.

e.x.,

EBS_IT02-900005-EUR_201212153119.csv.txt

Thanks in advance.

regards,

Sri-

0 Kudos

Dear Trevor,

Coudl you please suggest the Regular Expression to be used for excluding a file to pick and process from PI. It's most urgent, need your help.

There are some files with BIAC20130209.SRL1234569.Pro, PI need not to pick the files with extension .PRO (Processed files), and it should pick the remaining files BIAC*.

Example files to pick: BIAC1234abc.SNL12345.ok; BIAC1234abc.SNL12345.dlv, e.t.c

regards,

Sri

alexanderaigner
Explorer
0 Kudos

I just ran into the same problem. The reason for that is, that the SAP SFTP Adapter has a check build in which looks like

if (!tmpFileName.endsWith(".txt"))

        tmpFileName = tmpFileName + ".txt";

Therefore, for all file not ending with "txt" it is added.

Former Member
0 Kudos

Hi Alexander,

Did you find any solution for this?

alexanderaigner
Explorer
0 Kudos

There is no real solution to this problem since the check is coded right in the archive procedure. Anyhow, it seems that with the recent version this "feature" has been "fixed". I didn't check it though!

Hope it helps!

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Sri,

i am facing the similar problem regarding Archiving at SFTP Server where file is getting archived at Source  directory with Prefix. I tried different combination by adding '/' but no luck.

Archive directory which we are using is "/Source directory/backup".

pls. provide the detail step which you did in fixing this issue.

thanks in Advance.

regards,

Harsh

Former Member
0 Kudos

Hi Sri,

You could use the following link to test you file naming pattern:

http://www.regexplanet.com/advanced/java/index.html

Hope that helps,

Rakesh.

anand_shankar10
Active Participant
0 Kudos

Hi Sri,

Have a look to the doc http://scn.sap.com/docs/DOC-35572

and refer the file naming convention used for SFTP adapter. Once a new folder is created in the same directory you can use it for archiving. In case its not working just trying reconfiguring... There should not be any issue....

Regards

Anand