cancel
Showing results for 
Search instead for 
Did you mean: 

Generic way to get data from R/3 and BW using XI

Former Member
0 Kudos

Is it possible to "programmatically" achieve the following using XI 3.0? How?

1) Introspect the list of BAPIs in R/3 and BW. I am interested in only those BAPIs that return data from SAP. I do not want to update data in R/3 or BW.

2) Introspect the methods exposed by any BAPI

3) Get the request and response schema for any BAPI

4) Execute a BAPI with and get the response

Any pointers to documents would be helpful.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Not sure what the intent here is, but there is no generic way of finding whether a BAPI is going to update / get the details. However, if you are looking at a specific BAPI, you can clearly identify whether the BAPI is going to create / update something or fetch the details, just by looking at the name of the BAPI.

Regards,

Ravi

Note :Please mark all the helpful answers

Former Member
0 Kudos

Ok. I thought that would be the case too!

At least is there a way to programmatically get the list of BAPIs and its metadata (import/export params and its data types) and execute it using XI? If you use transaction SE37, you can see all these details.

Former Member
0 Kudos

Yes, you can do that by accessing the sytem tables where the details of the functions are stored. However, I am still confused how you are going make use of it from XI.

You will have write custom code to do the same on the application system and call that from the XI box.

Regards,

Ravi

Note : Please mark all the helpful answers

Former Member
0 Kudos

What system tables are these? Are there any sample code?

Even if it is not possible to get BAPI metadata using XI, it should be possible to execute any BAPI using XI, correct? Can you please point me for the documentation/code samples for this.

Thanks.

Former Member
0 Kudos

Hi,

Usually the way you execute or call a BAPI is using the RFC Adapter. So, you will have to configure a RFC Adatper and execute your integration scenario. Take a look at the information here ...

/people/michal.krawczyk2/blog/2005/03/29/configuring-the-sender-rfc-adapter--step-by-step

http://help.sap.com/saphelp_nw04/helpdata/en/33/c6e63b60c25767e10000000a11402f/content.htm

I am still missing big picture, what are you trying to do?

Regards,

Ravi

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Daisychain

One possible solution can be:

Programmatically you can make use of JCO to get the metadata of a BAPI. All you need to know is the BAPI name in advance (Since BAPI is a standard FM with RFC protocol so knowing its name in advance won't be a problem) and do the following...

1) IFunctionTemplate ftemplate = repository.getFunctionTemplate(YOUR BAPI NAME)

2) To get import,export & etc parameter list

JCO.ParameterList implist = function.getImportParameterList();

JCO.ParameterList explist = function.getExportParameterList();

JCO.ParameterList tablist = function.getTableParameterList();

By doing so you will be able to get the metadata for a particular BAPI/RFC. Please refer to JavaDocks of JCO for more details (Sorry I don't remember the link to java dock right now).

Using JCO you can even execute the BAPI and get response.

Regards

Vijendra

Former Member
0 Kudos

Vijendra - I know how to solve it using JCo. I want to know how to do the same things using XI.

Thanks.