on ‎2011 Feb 01 11:35 AM
Hi All,
I am working on a proxy to jdbc scenario in which we have to throw validation errors to NWPM(Net Weaver Process Monitor Tool)
I am following the below steps,
step 1 - In message mapping a UDF is created to catch errors and store them in a variable using dynamic configuration
step 2 - writing abap mapping for handling this thrown exception and im reading the dynamic configuration in the abap class and raising exception.
I was using DynamicConfiguration odject as "Conf"
and DynamicConfigurationKey object as "Key".
I wrote below code for Dynamic cofiguration in UDF.
String error="";
error=error+ "missing required field"
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
//DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Error", "ERROR");
DynamicConfigurationKey keyHeader1 = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/Error", "ERROR");
conf.put(keyHeader1, error);
but while i am trying to test the data in message mapping it will show one error at the time of runtime .
"Runtime exception when processing target-field mapping /ns0:MT_DB2_SourcePlant/Record/SourcePlant; root message: Exception:java.lang.NullPointerException: while trying to invoke the method com.sap.aii.mapping.api.DynamicConfiguration.put(com.sap.aii.mapping.api.DynamicConfigurationKey, java.lang.String) of an object loaded from local variable .
I am using addInfo method inAbstractTrace class.Using this i find error at conf.put(keyHeader1, error);
before the conf.put(keyHeader1, error);its working correctly.
Could you please help in finding the solution for getting currect error message from ABAP class?
Request clarification before answering.
Hi
Thank you for reply
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.