on 01-23-2008 10:02 PM
Hi All,
I want to receive a file with dynamic name containing date stamp to it.... eg File_20080123.txt , File_20080122.txt etc.
Can anybody suggest how to do it?
Thanks,
Atul
>> I want to receive a file with dynamic name containing date stamp to it
does this means you want to pick up the file dynamically?
if yes,then you can give file name as File_* in the sender file communication channel as long as the source directory remains the same.
if you have multiple source directories and you want to pick up files from those directories then reply back so that we can suggest you an alternate way for it
Thanx
Aamir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks aamir,
I guess file_* will solve my problem as directory is fixed....
just a small question on this... What will happen if there are more files like File_1 and File_2 ... and i am executing scenario for file File_*?
Will it pick up all the files? in any sequence perticular sequence....?
Thanks,
Atul.
Hi Patil,
The follwoing weblog will be useful for your requirement.
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
regards
mahesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atul,
Are u using mapping program in ur interface? If yes you can go ahead with ASMA + Dynamic Configurations for renaming the file.
Have u tried this option?
See the below Solution
Check the ASMA File for both sender/receiver channels.
Write the below code UDF in mapping program
//Get Input date. Don't pass anything to this UDF except the Date.
//Map the output to the root node of the target.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String fname = conf.get(key);
String ret = fname"_"Date
return "";
raj.
Edited by: Raj on Jan 23, 2008 4:09 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.