on 01-11-2010 11:40 AM
Hi,
I have a requirement in witch i have to pick 7 different file from seven different folder.
for this I am using advance selection tab and defining all the other folder path.
but my problem is I have to archive the different file in different folder .
For exm..
/folder1/file1.txt need to be archive in /archive_filder1/file1.txt
/folder2/file2.txt need to be archive in /archive_filder2/file2.txt
/folder3/file3.txt need to be archive in /archive_filder3/file3.txt
can any one tell me that how to define the dynamic archive folder path??.
regards,
Navneet
Thanks. we use only one directory to archive all the file and than writing a small script at FTP end to move the file to corresponding folder according to there naming convention.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
.
Edited by: Dheeraj Kumar on Jan 11, 2010 6:10 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Navneet
In File Access parameters --> Target Directory
Use this type of Directory name
\XIDEV_STORES\%store%\sapoutbound
here %store% will be changed accordingly
e.g. if file will come for store 001 then this %Store% will be replaced by 001 and file will be placed in this 001 folder and if file will come for store 002 then this %Store% will be replaced by 002 and file will be placed in this 002 folder over FTP.
For to achieve this Go to Advanced tab
For Variable Substitution check mark Enable
Now speciofy the parameter values for Variable Name and Reference
Under Vriable name specify = store
Under Reference specify = payload:WP_PLU02,1,IDOC,1,EDI_DC40,1,RCVPRN,1 -
You have to give full path name here that where this store variable is located into IDOC.
Hope this example will help you
Regards
Dheeraj Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Create the mapping which does the determination of the path (i.e directory use Dynamic Configuration for the same)
and use one more receiver agreement apart from the target for the same with the above mapping name in interface determination
and use FTP receiver adapter with Adapter specific message attributes enabled...
This will allow you to archive the files in the required folders...
HTH
Rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Try to use variable substitution options of File Adapter to achive your goal. It works for file name and i think that should work for archiving.
Advanced Tab Page
Variable Substitution (Target Directory/File Name Scheme)
http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm
And several blogs on this theme:
/people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12
/people/sameer.shadab/blog/2005/09/23/an-interesting-usage-of-variable-substitution-in-xi
/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
And of course as described above you can write your script and use it in OS command line of File adapter.
BR,
Dzmirty
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Udo
Hi Dzmirty,
Try to use variable substitution options of File Adapter to achive your goalWe are speaking about a file sender adapter. How can you use payload variables there?
Regards,
Udo
We are speaking about Receiver file adapter not sender file adapter so using variable substitution we can achieve this. So we can use Payload variables there.
Regards
Dheeraj Kumar
Hi Navneet
I dont think so it is possible coz you cannot run OS commands if you are using FTP. So you cannot sent to different target folders.
Using a single channel, answer is No. Try using multiple channels.
Regards
Dheeraj Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Navneet,
of coz the easiest way is just to copy the adapter 7x.
Another way would be to run a operation system command after processing what is calling a script. That script copies archived files depending on file name to the required folders.
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Navneet,
Santoshs blog describes a similar scenario:
[Glimpse at OS Command: Yet Another Scenario|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/10392] [original link is broken] [original link is broken] [original link is broken];
Michals blog handles OS commands at all:
[XI/PI: Command line sample functions|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/5814] [original link is broken] [original link is broken] [original link is broken];
Please notice that the script will be executed on that server so you need to write the script in a fitting language.
Regards,
Udo
Hi Navneet
go to this blog and read option 1 there it is clearly mentioned "This will only work when the file system is NFS (not FTP). "
http://wiki.sdn.sap.com/wiki/display/XI/DifferentwaystokeepyourInterfacefromprocessingduplicate+files
We cannot move file from one location to another location at FTP without using communication channel.
Regards
Dheeraj Kumar
Hi Udo
Santoshs blog describes a similar scenario:
Glimpse at OS Command: Yet Another Scenario
In this blog see its Archive directory it is local means it is not related to FTP it is NFS
Michals blog handles OS commands at all:
XI/PI: Command line sample functions
This blog is dealing with Receiver File communication channel not Sender File Communication channel.
If i am wrong somewhere then please do correct me.
Regards
Dheeraj kumar
Edited by: Dheeraj Kumar on Jan 11, 2010 7:40 PM
Hi Dheeraj kumar,
>in this blog see its Archive directory it is local means it is not related to FTP it is NFS
Yes, if you know a blog where we have just the required scenario please dont hesitate to post it. I wrote it would be "similar"
>This blog is dealing with Receiver File communication channel not Sender File Communication channel.
Yes, as i said it gives an overview or an introduction to OS command. I m glad you agree with a sender channel
Regards,
Udo
Hi Udo
definitely i will agree boss if i will come to know that i have misunderstood the requirement. We are not doing group discussion here to win, we have to provide suitable solutions right na so i was trying my best.
K let me ask you one thing -
can we perform operation over FTP using OS Commands or any other solution?
please tell me with explanation.
Regards
Dheeraj Kumar
Hi Udo and Dheeraj,
Thanks for all your reply.
After going with all the threads posted I can understood that OS command can only be executed on NFS not in FTP. But Dheeraj please see the Link below which says ,FTP server can be hit by opening the FTP connection in script only(not a good practice).
http://wiki.sdn.sap.com/wiki/display/XI/SAPXIFileAdapterOSCommandLine+Feature
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/10392. [original link is broken] [original link is broken] [original link is broken]
But my requirement is to archive the file in different archive folder.
Can it be possible to define the archive folder path dynamically instead of hard coding it in sender Communication Channel.
Regard,
Navneet
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.