on 09-20-2007 8:43 PM
Hello,
I have seen several threads about using a UDF and variable substitution for dynamically determining the Target Directory.
Is anyone familiar with (or had to implement) a solution where the Source Directory is dynamically determined.
My challenge is to connect to a different Source Directory name (sy-datum format, ex: 20070920 ) each day on an ftp site and download all the files in the folder to a know target directory. I am doing a simple file-to-file transfer, so no mapping is involved.
Your comments, suggestions and feedback is greatly welcomed.
Thanks,
Ralph
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nilesh,
Thank you for that link. I had previously viewed that one as well.
My FTP Sender comm channel looks like:
Source Directory: /%directoryname%/
At the bottom, under Advanced Mode, I have:
Variable: directoryname
Parameter: systemdate
I have even attempted using Parameter: 20070920
which is an actual folder name, but I see it fails in the adapter monitor, unable to change directory.
I was hoping to avoid extensive java coding for something as simple as this.
No mapping is used, which would not help any way since I an trying to determine the Source Directory and not the Target.
Thanks once again.
Ralph
Hi Ralph,
I have the same problem.
Did you find a good solution?
Thanks,
Carme
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Carme,
I have not found a solution for this type of event.
I was attempting this because the FTP site I was connecting to would DELETE a file the moment XI touched it. So when XI (using FTP Transfer protocol) configured with a DELETE or ARCHIVE (Processing Mode), it would error off because the file was no longer on the FTP site. I contacted the site but they refused to deactivate their script to auto-delete files. Using TEST processing mode is not recommended per SAP in a server pool environment. You would think SAP XI would provide a fourth option in which a DELETE command is not issued back to the FTP site.
The FTP site did have sub-directories in which copies of the original files were stored, but I could not figure out how to dynamically change the XI Source Directory as the current date changed.
I settled on using File NFS (Transfer Protocol) and running the FTP commands from a .bat (batch file). I put the command I run down at the bottom of the XI page with a 60 second timeout.
I still do not change to each folder dynamically because the standard FTP (GET and MGET) commands do not attempt a Delete after file retrieval.
Perhaps using a batch file is an option you may want to consider using.
Cheers,
Ralph
Ralph,
Give a shot by giving source directory as 2/ which means all the directories and its files with start with 2.
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Satish,
I have a similar problem (I have a great number of source directories) and I try to apply your solution.
In source directory I have bust/000*, so I want to read several directories:
bust/0000001
bust/0000002
bust/0000003
...
But it doesn't work.
Error "FTPEx: bust/000*: No such file or directory
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.