on 02-01-2012 11:38 AM
Hello everyone,
BW would be sending the attachment of MAIL in .XLS format. i need to remane this file at runtime and post it in FTP server.
So, i am planning to write a unix script and deploy it in FTP server.
Can anyone tell me if there is any other easier option other than this.
Regards,
Ravi
Hello Ravi,
Use Dyanic Configuration to rename your file. With this you can create a file name of your choice and write it to the FTP server.
regards,
Younus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can anyone tell me if there is any other easier option other than this.
Dynamic Configuration is the simple way for changing name :
step1:
you have to write one udf for dynamic conf in msg mapping leval
udf:
String DynamicConfig(String a, Container container) throws StreamTransformationException{
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
conf.put(key,a);
return "";
step2:ID
in receiver file comm.cahn, enable ASMA properties .
enable check box -> file name and use asma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks everyone for giving your inputs.
My requirement is that customer will be sending 23 reports with different names and i have to give them naming convention based on the name of the attachment.
So, now can i modify the UDF to accommodate this requirement, if ia musing Dynamic configuration.
Regards,
Ravi
Unix scripts should be your last option.
I recommend using dynamic configuration and ASMA to modify the file name.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Ravi
Are you placing the file directly to the FTP server (it is a bypass scenario)?
If that is the case then OS command is the best option.
Alternatively you can try writing an adapter module in the receiver file adapter just to rename the file (never tried though)
If mapping is involved then you can always use dynamic configuration to rename the file and have to enable ASMA in the adapter.
Sourabh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
might be that is possiable with standard " Beans" / "Variable Substitution" with out mapping .
please refer step 2/3 in below link:
http://wiki.sdn.sap.com/wiki/display/XI/CombiningthreedifferentaspectsofPIinoneshot
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
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.