Q
Problem solve Get help with specific problems with your technologies, process and projects.

How can I get a JCo list of supported BAPIs?

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.


getCachedFunctionInterfaces() only returns the runtime metadata of all RFMs used so far. To get a list of all supported BAPIs you need to call SWO_QUERY_API_METHODS. If you want a full-blown Metadata Server for SAP written in Java, send me an email (tgs@arasoft.de).


Dig Deeper on SAP Java and J2EE

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchContentManagement

SearchHRSoftware

Close