cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrieve all BAPIs through JCo

Former Member
0 Kudos

Hi All,

i'm currently using JCo to access an SAP server, and just wondering if there's a method to retrieve all BAPIs from the server. From the available online documents, i can only see methods that returns a specific BAPI with a given function name.

If we can't get all BAPIs through JCo, whether there're some system BAPIs that i can call on to process the searching? just like sys procedure in database's context.

Any helps are highly appreciated. Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hallo Tian,

I think the FM you are looking for is RFC_FUNCTION_SEARCH. Give in the import parameter FUNCNAME as "BAPI*" and it returns all FMs starting with "BAPI".

Bye,

Sameer

Answers (4)

Answers (4)

Former Member
0 Kudos

Great~ that's exactly what i'm looking for

Thanks

Former Member
0 Kudos

Well, the Repository seems to only expose methods like

getFunctionInterface() & queryFunctionInterface(), both of which certainly don't serve my needs.

The reason why i expect JCo has such built-in "retrieving all func names" services is because i saw some tooling applications, purely written in Java, developed navigator to display all BAPIs of a SAP. I mean it could be some button say "search all BAPIs", and when the user gestures to hit that button, it just populates all BAPIs returned from server.

While since i can't find such methods from the JCO doc, does it mean it can't be achieved through JCo?

Former Member
0 Kudos

Hi tian,

not at all. the doc or api only describe the part, which is supported from sap. there are maybe internal classes, which could be used.

therefore be carefull to use internal classes, they maybe can be changed in further releases, but if there is no alternative, it is an option for you.

if you saw some tooling applications maybe you could decompile it (e.g. dj) to inspect, how they build it.

regards, jens

Former Member
0 Kudos

Hi Jens,

Thanks for the reply, i think you might misunderstand my requirements. What i mean "retrieving all BAPIs from the server" is retrieving BAPIs in application scope, through java code but not in SAP GUI.

A concrete example could be a tooling that provides a navigation view, which populates all BAPIs' names of a specific server.

I'm seeking for methods like findAllFunctions() or getAllFunctions() in JCo, but i did NOT find any.

Former Member
0 Kudos

Hi Tian,

i do not now you business scenario, but for this purpose i believe the jco is not supported this browsing function. maybe through the repository metadata classes, this could be provided, but i'm not sure .

for more details, check the jco documentation or javadoc, which is available under service.sap.com/connectors to find what you need.

Regards, Jens

Former Member
0 Kudos

Hi Tian,

I believe the better way for your request is to login to the sap system via sapgui and check with transaction se37 which BAPI you need (documentation included). when you browse through the infosystem or use the bo explorer you have to take care, that the bapi is remote enabled. this is the only restriction, you have to take care, if you want to call it via jco.

good luck, regards, jens