Code: Alles auswählen.
import com.sap.mw.jco.JCO;
import com.sap.mw.jco.*;
public class Test
{
JCO.Client _client;
JCO.Function func ;
String _sapClient = "000";
String _userID = "bcuser";
String _pwd = "minisap";
String _language = null; //sets default
String _hostname = "localhost";
String _sysNo = "00";
public void establishConnection()
{
_client = JCO.createClient(_sapClient, _userID, _pwd, _language,_hostname, _sysNo);
try
{
_client.connect();
System.out.println(_client.getAttributes());
JCO.Repository repository = new JCO.Repository( "ZBC400", _client);
IFunctionTemplate ft = repository.getFunctionTemplate(("ZFB_NAME"));
func = ft.getFunction();
JCO.Table E_table = func.getTableParameterList().getTable("ZKUNDE");
System.out.println(E_table.getString("FIRMA"));
_client.disconnect();
}
catch(Exception e)
{
}
}
public static void main(String[] args)
{
Test t = new Test();
t.establishConnection();
}
}
Code: Alles auswählen.
JCO.Repository mRepository = new JCO.Repository("JCO Tutorial", mConnection);