on 04-12-2010 11:33 AM
Hi Everybody,
I have written a JAVA map and inside which I am reading file name from the header.
ASMA is also checked in the adapter.
I need to take the filename at runtime and pass it to a field.
Below is the piece of code I have written for Dynamic Configuration.
private Map param;
DynamicConfiguration dynamicconfiguration = (DynamicConfiguration)param.get("DynamicConfiguration");
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
String MyFileName = dynamicconfiguration.get(key);
I am getting a runtime error when I test the mapping (End to End).
Is something wrong with the code shown above?
Something specific needs to be done wrt PI 7.1??
Helpful Answers will be rewarded points.
Thanks & Regards,
RK
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
> private Map param;
>
> DynamicConfiguration dynamicconfiguration = (DynamicConfiguration)param.get("DynamicConfiguration");
>
> DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
> String MyFileName = dynamicconfiguration.get(key);
>
The code looks correct,instead of developing a Java mapping,whu dont you create as UDF ,my advice create UDF and map to root node it will def work.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String newfilename= dynamicconfiguration.get(key);
conf.put(key, newfilename);
return "";
> I am getting a runtime error when I test the mapping (End to End).
>
Test interface end to end,then only Dynamic conf will work
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
check these blogs and verify your steps:
/people/madanmohan.agrawal/blog/2009/05/20/combining-three-different-aspects-of-pi-asma-af-module-and-variable-substitution-in-one-shot
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.