on 02-05-2014 3:02 AM
Hi All,
I have a scenario where PI picks up a file from sftp server, process it and send it to ECC. The vendor will place two files(with different names) at different timings. I need to have same file name as it is sent by the sender.
ex: sender send a two files as "abc.txt" and another file as "def.txt". The requirement is to have same file name which PI places in the ftp folder.
In ID i configured one sftp sender channel and ftp receiver channel.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
in your sender SFTP, under adapter specific message attributes.
change the namespace to "http://sap.com/xi/XI/System/File" and file name to "FileName"
Hi All,
I am getting the target file name as per the input file names but the file is coming with the same timestamp (For Ex: the input file is "POD_AMA_050120010039.txt" the target file name also is same) of the input file how can i remove that as i want the file name to be POD_AMA.txt?.
In receiver channel i have configured "File Construction Mode" as Create.
Hi Selva - Try the below
String filename = "";
DynamicConfiguration conf1 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","FileName");
filename = conf1.get(key1);
filename = filename.substring(0, filename.lastIndexOf("_"))+filename.substring(filename.lastIndexOf("."));
conf1.put(key1,filename);
return filename;
map it to your target message type and no need to change anything in adapters
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.