on 02-11-2010 6:10 AM
Hi Experts,
I need to route xml file from one directory to another and then to another one in the local system. For example, i have the file in directory A, i need to delete that file from that location and place it in B and then from B i have to move it to A again and then move it to C.
The path will be: A-> B -> A -> C
where A, B, C are folder names
How can i do that in SAP-XI in ID? Do i need to create two communication channels? Please guide me and help me out of this.
As far as I know a single file adapter can access only one location @ server and it can either pick a file(sender adapter) or drop a file(receiver adapter).
About deletion its possible by setting the processing mode to DELETE
You will need 3 scenarios = 6 file adapters
P.S : Why PI? I would suggest go for OS scripts. PI would uselessly make things bulky if not complex due to teh number of interfaces.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arkesh
Have a look at these blogs.
/people/santhosh.kumarv/blog/2008/07/27/glimpse-at-os-command-yet-another-scenario
/people/michal.krawczyk2/blog/2007/02/08/xipi-command-line-sample-functions
This will give you an idea of what we are trying to say. You create a batch file(*.bat) , include all the commands in it and call that batch file in file adapter. Thats it!!!
All you need to do is search a bit for the right commands depending on your requirement.
Regards
Soumen...
Hi Arkesh,
>>For example, i have the file in directory A, i need to delete that file from that location and place it in B and then from B i have to move it to A again and then move it to C.
For doing this why you need SAP PI? you can better do this with a script or batch job.
>>A-> B -> A -> C
A to B will be one interface and B-->A will be another one. The file getting picked from A and getting dropped to A (in second scenrio) shoudl not have the same name else these two interfaces will go in a loop.
A to C will be the third scenario
each scenario will have a sender file adapter and a receiver file adapter.
But still I didn't get the business usage or usage of PI in this case
Regards
Suraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My Primary Purpose is to move the file from A -> B,
Do some processing in it at B and then move it to A for normal processing from A -> C.
Initially it was a file to file scenario with file coming into A were picked and dropped in C.
Now i have to add extra functionality to which i need to move the file into another location and perform the check and then move it back to the same location so that the old process is followed.
How can i create a batch process/ script to run on windows to execute the above process?
Hi Arkesh,
Now it sounds good.
For moving from A to B and back to A use batch file commands (depending on whether the Operating System is Unix or windows the coding differs). There are lot of articles on file moving in internet. Just do a search and you can achieve this
for eg : http://www.chebucto.ns.ca/~ak621/DOS/BatExamp.html
And from A to C you can use PI, Be sure that the filename for PI to pick is different from the one which batch job picks.
Regards
Suraj
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.