on 06-22-2010 5:48 AM
Hello.
I'm a new in PI.
I have created communcation channel:
adapter type: FILE.
transport protocol: FTP
then I defined target directory and file name scheme.
In proccessing tab I choose Add Time Stamp. File was created in my directory, but with this name XXX20100618-153919-672.dat.
Can I somehow change the name of file like
XXX[ddmmyyyy][mmtt].dat
?
Thanks a lot!
Edited by: earnestik on Jun 22, 2010 6:49 AM
> In proccessing tab I choose Add Time Stamp. File was created in my directory, but with this name XXX20100618-153919-672.dat.
>
When you select Add time stamp the output file name come like that only,so chnaging name to your desired format at cc level not possible.
> Can I somehow change the name of file like
XXX[ddmmyyyy][mmtt].dat
?
Try with Dynamic Configuration UDF, in message mapping,then we can achieve this one easily.
String filename=XXX;
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
SimpleDateFormat dateformat = new SimpleDateFormat("yyyyMMdd");
String timestamp = dateformat.format(new Date());
String newfilename=fileName+timestamp+".dat";
// change to new file name
conf.put(key, newfilename);
return "";
some small changes required in above code, do it your slef,
if you dont know how to use Dynamic Configuration UDF search in SDN.
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.