on 10-26-2011 7:08 AM
Hi Guys,
he requirement is to get File Name as XYZ.ddmmyyyy where as XYZ is constant.
To achive this I am writing UDF in message mapping with dynamic configuaration below is the code:
While I was trying to test end to end it is giving Runtime Exception in message mapping. please advice if this code needs correction?
I have mapped as Source Main Node .....> UDF > Target main node correct if it is wrong.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
DateFormat dateFormat = new SimpleDateFormat("ddMMyyyy");
Date date = new Date();
String filename = "XYZ" + dateFormat.format(date);
conf.put (key,filename);
return null;
Thanks.
Hi ,
Please try replacing this line
DateFormat dateFormat = new SimpleDateFormat("ddMMyyyy");
with this line
java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat("ddMMyyyy");
Hope this solves your problem.
regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
While I was trying to test end to end it is giving Runtime Exception in message mapping. please advice if this code needs correction?
Anything that uses dynamic configuration cannot be tested at design time. You have to do end-to-end testing to see if it is working.
Hope this helps,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.