on 10-15-2014 10:09 PM
Hi, all.
I need to create an interface to transfer a text file. The file is located in a source directory in a known pattern. PI will parse the file and do very minor manipulation. Then we need to keep the exact same file name when we SFTP to the destination server. How can I do that in PI?
The requirement sounds simple but I cannot think of an easy way to achieve it in PI. Is there a way to pass the file name from the sender file adapter to the receiver sftp adapter? Actually using unix shell could have been a very easy task.
Thanks,
Jonathan.
Hi,
Use Dynamic configuration with ASMA (Adapter Specific Message Attributes), check the File Name.
Refer below links.
http://scn.sap.com/thread/2155045
Thanks & Regards,
A.Neelima.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jonathan
The requirement sounds simple but I cannot think of an easy way to achieve it in PI. Is there a way to pass the file name from the sender file adapter to the receiver sftp adapter?
Transferring file name from sender adapter to receiver adapter is very common in PI scenarios and can be easily achieved with the combination of ASMA and Dynamic Configuration. Is there a particular reason why you cannot think of an easy way to achieve it?
Basically in your sender file chanel, you set ASMA for the filename. In runtime, it will be stored in Dynamic Configuration attribute FileName under namespace http://sap.com/xi/XI/System/File
Then on your receiver SFTP side, you need to set ASMA to use the filename from the above attribute.
Just to add on to the links above, you can also see an example of ASMA setting in receiver SFTP channel below
Rgds
Eng Swee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jonathan
The namespace for FileName in ASMA is http://sap.com/xi/XI/System/File
You have set http://sap.com/xi/XI/System/System
Regards
Thanks, that fixed it. The http://sap.com/xi/XI/System/System comes in as the default and wasn't checking properly. I guess nothing is easy when you do something the first time in PI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Irikaki
The minor manipulation is just to get rid of lines that don't belong to a certain starting pattern and also replace certain fixed patterns in each line from one to another. I have decided to use a unix shell script to do so as it is rather easy instead of mapping. I don't think I want to create a bean as I haven't done this before
Thanks,
Jonathan.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.