on 01-20-2010 3:56 AM
Hi,
I have a requirement to FTP a pdf file to a server directory according to fist 10 char of the file name. I am able to get the file name using variable substitution method but how can i chop the 1st 10 char of file name as my directory? As the file is a .pdf i didn't do any data mapping.
Thanks
Though there is no mapping currently, you can have a java mapping for by passing the stream and setting the dynamic configuartion within the java mapping.............
Reagards,
Praveen Gujjeti.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you dont have any Mapping Objects,then writing adapter module to change file name is the right option
or you can create dummy message mapping and add dynamic configuration UDF ,but in your case you trasfering PDF documents,this option is not feasible.
or writing Java map is the other alternatine,but it is not recommanded to your requirement,because once again you need change the .add IR objects.
Writen adapter module,
add and chnage below code as per module and your requirement
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 filename_new=fileNametimestamp".txt";
conf.put(key, filename_new);
return "";
Regards,
Raj
You need to write adapter module to do this. Adapter module is a java program . If you do not know about adapter modules, search sdn, you will get some good articles on that.
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.