on 07-03-2009 2:01 PM
Hi All,
I have create an UDF ,which imports com.sap.aii.mapping.api.*; package adn performs the following:
/* UDF */
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String AgiFileName ="MSIPl_"+ paddedAgi+".dat";
conf.put(key, AgiFileName);
AbstractTrace trace = container.getTrace();
trace.addDebugMessage("FileName"+AgiFileName);
/End of UDF/
I am getting the following error,during run time .Plz advice
RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns1:AddMaterial/LEGAL_REGULATIONS/Legal_Regulation. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._Select_Material_to_AddMaterial_ method Syn_FileName_Directory$[000000000000101960, com.sap.aii.mappingtool.tf3.rt.Context@492f5aa1]
Check with this UDF:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String AgiFileName ="MSIPl_"+ paddedAgi+".dat";
conf.put(key, AgiFileName);
return "";
Why are you using
AbstractTrace trace = container.getTrace();
trace.addDebugMessage("FileName"+AgiFileName);
Any specific reason??
Not quite sure but check if you need com.sap.aii.mapping.lookup.* jar also......
Regards,
Abhishek.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mohan,
It seems that the error is due to directory data. Please change the UDF as below.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","FileName");
DynamicConfigurationKey key_dir = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","Directory");
String AgiFileName = "MSIPl_" + paddedAgi + ".dat";
String dir = "/outgoing";
conf.put(key, AgiFileName);
conf.put(key_dir, dir);
AbstractTrace trace = container.getTrace();
trace.addDebugMessage("FileName" + AgiFileName);
Hope it will help.
Regards,
Madan Agrawal
Edited by: Madan Agrawal on Jul 3, 2009 3:14 PM
Edited by: Madan Agrawal on Jul 3, 2009 3:25 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.