QUESTION POSED ON: 21 May 2002
I am a newcomer to both SAP and JCo. I would like to obtain, via JCo, a
list of BAPIs supported by an SAP system.
Based on my reading of the JCo doc, I believe after creating a
JCo.Repository, I could invoke JCo.Repository.getCachedFunctionInterfaces()
to obtain a String array of supported BAPIs. Is this so? Do I need to do
some "loading" of the repository that I created? Will the following code do
what I want it to do (ie., print all the BAPIs supported in the SAP system
that I have connected to)?
JCO.Client JCOClient;
IRepository SAPRep;
String[] SAPInterfaces;
JCOClient = JCO.createClient (client, user, passwd, lang, url);
JCOClient.connect();
SAPRep = new JCO.Repository (repositoryName, JCOClient);
SAPInterfaces = SAPRep.getCachedFunctionInterfaces();
System.out.println ("List of Functions in Repository:n"); System.out.println
("================================n");
for (int count = 0; count < SAPInterfaces.length; count++) {
System.out.println (SAPInterfaces[count] + "n"); }
Many thanks.
|