Skip to Content
0
Former Member
Dec 17, 2007 at 06:50 AM

What is JCo in SAP connectivity

11 Views

Hi all,

i want to connect to SAP system from java program.Is it that i need a JCO jar file.

I am new to this.the code i got by searching in all the forums for sap connectivity is

import com.sap.mw.jco.JCO;

import com.sap.mw.jco.IRepository;

public class checkSAP{

private JCO.Client client = null;

private JCO.Function function = null;

private IRepository repository = null;

try {

client = JCO.createClient(

connClient, // SAP client

connUser, // userid

connPW, // password

connLang, // language

connHost, // host name

connHostSyst ); // System number

client.connect();

}

catch (JCO.Exception ex) {

System.out.println("Caught an exception: \n" + ex);

}

can anyone plz help me how to create a conncetion and retrive data

Regards

Chandra