Hi,
I am getting an error when using JCO3 for connection. I have specified the connection string and created the destination object.
I get a null pointer exception while setting the import parameter for the RFC. the error is as shown below.
java.lang.NullPointerException:
while trying to invoke the method
com.sap.conn.jco.JCoFunction.getImportParameterList() of a null object loaded
from local variable 'function'
the sample code is as follows:-
destination =JCoDestinationManager.getDestination("ECC destinaton");
function = destination.getRepository().getFunction("RFC name");
function.getImportParameterList().setValue("import parameter name", import parameter value);
function.execute(destination);
the errror occurs at the line highlighted in red.
Quick response appreciated.