on 08-01-2016 10:52 AM
Hi Experts,
I am using this UDF to call the file name and pass it to the RFC lookup to update it in the table.But unfortunately am getting the below error
Error getting:
java.lang.NullPointerException: while trying to invoke the method com.sap.aii.mapping.api.DynamicConfiguration.get(com.sap.aii.m
UDF Using:
try {
String filename = "";
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create( "http:/"+"/sap.com/xi/XI/System/File","FileName");
filename = conf.get(key);
return filename;
}
catch(Exception e)
{
String exception = e.toString();
return exception;
}
}
Please help is it any thing wrong in the code.
Regards,
Shaik
Hello Shaik,
Try with the below UDF and see if it works.
public String getFileName(Container container) throws StreamTransformationException{
try {
String FileName = "";
DynamicConfiguration conf = (DynamicConfiguration) container.getParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String FileName = conf.get(key);
}
catch(Exception e)
{
String exception = e.toString();
return exception;
}
}
@Manoj. Was about to say the same.:)
If you wish to test the mapping remove that UDF mapping and run.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are u testing this END to END or just in ESR local ? You need to test it END to END don't test it locally it gives error.
UDF looks fine
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 | |
9 | |
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.