Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Code for Connecting to R/3 Via Jco Connection

I used the below code to do the back end connection...

my requirement is to use this code in a jsp application...

try

{

JCO.Client jcoClient;

JCO.Repository jcoRepository;

jcoClient = JCO.createClient("202","pcsdevl","patni" ,"EN","192.168.175.222","00");

jcoClient.connect();

jcoRepository = new JCO.Repository("sapcrm", jcoClient);

IFunctionTemplate jcoFunctionTemplate =

jcoRepository.getFunctionTemplate("Z_GET_SCROLL_MESSAGES");

JCO.Function jcoFunction = new JCO.Function(jcoFunctionTemplate);

jcoClient.execute(jcoFunction);

jcoClient.disconnect();

msgmgr.reportSuccess("DONE");

}

catch(Exception e)

{

e.printStackTrace();

msgmgr.reportSuccess("CATCH"+e);

}

Here i m getting a null pointer exception....

Pls help me

Thanks

AD

Former Member
Not what you were looking for? View more on this topic or Ask a question