on 03-09-2012 10:41 AM
Hello all,
maybe sombody ask the same in this forum, but couldn't find any topic regarding these.
Okay:
We have a scenario which have to pick up a txt file from a folder and to deliver to another folder
outside. The file transfer itselfs isn't a problem and works propertly, but we need the same file-
name for the outgoing file. Unfortunaltey we have huge different filenames..
So, my question would be, what for possiblities we have to sure, that if we can deliver the
file which the same filename as we have in the orginal (source) filefolder.
e.g. file named in source called TEST.123 in the destination should be also TEST.123.
The next file called TEST123.abc should be also in the destination TEST123.abc.
Thanks
Hi Stepahn,
The Michal Krawczyk's blog that Mark Dihiansan pointed before is this
http://scn.sap.com/community/pi-and-soa-middleware/blog/2005/11/10/xi-the-same-filename-from-a-sende...
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi friends.
I don't know about if you need still any help. But i think it will be useful for another people who have encountered that problem and looking for the solution.
The solution is pretty simple for case if you are going to some file by scenario FTP - to - FTP without interface mapping. I was able to create simple example ant put it on my site to let you use the portable short instruction with screen shots and highlighted marks that help you understand it more clear. Indeed you don't need any udf if you wish to repeat that example in your real scenario. Link is HERE
Shortly you have to do the next:
1) for the sender adapter in tab "Advanced" switch on the check-box "Set Adapter Specific Attributes" and check that "File name" is switched on as well.
2) for the receiver adapter you have to repeat step 1 as well. Plus you have to change setting on the tab "Processing". On that tab you need to change "File Construction Mode" into "Create" and than you have to switch on the check box named as "Overwrite Existing File".
That's it.
Thank you, i hope that is help.
Sincerely, LukCAD.
Hi Stephen,
I think you do not need a UDF here. You need to ensure
1. Sender Comm Channel has ASMA and file name ticked.
2.Receiver Comm Channel has ASMA , file name and "fail if ASMA missing" ticked.
This should resolve your problem.
Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Stephan
Use this udf:
public String getFileName(Container container) throws StreamTransformationException{
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
//For getting filename
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
// Retrieve the filename
String FileName = conf.get(key);
return FileName;}
In the Sender File Adapter choose Set Adapter Specific Message Attributes and also choose FileName
Regards
Monika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Write a UDF in the mapping area. Use Dynamic configuration to find out the file name and same can be used for the output file name too. This is the simplest solution
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Stephan,
You can achieve the same using Adapter specific message attribute(ASMA) in Sender and receiver file adapter and writing a small UDF for dynamic configuration. Please follow the below steps:
Hope this helps.
Thanks & Regards,
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
There is a blog by Michal regarding this topic, but I am unable to find the blog (for now). What Michal did was to create a file sender/receiver cc and in those two, he enabled ASMA and then checked filename. This was done without any repository objects.
Hope this helps,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
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.