Quantcast
Channel: SCN : Discussion List - SAP NetWeaver Technology Platform
Viewing all articles
Browse latest Browse all 1520

Error while connecting to ECC using JCO3 connection

$
0
0


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.


Viewing all articles
Browse latest Browse all 1520

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>