Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI

Former Member
0 Likes
663

Hi Friends,

please help in finding

1)the differences beween BAPI and Remote Enabled FunctionModules

2) how to access BAPI's and Remote Enabled FunctionModules

5 REPLIES 5
Read only

h_senden2
Active Contributor
0 Likes
636

ad 2 : transaction SE37 (for bapi's also trx BAPI is usefull)

ad 1 : both are rfc, but bapi are defined via trx SWO1 as linked to a business object.

regards,

Hans

Please reward all helpful answers !!!!!

Read only

Former Member
0 Likes
636

Hi,

Difference between RFC and BAPI

BAPI are RFC enabled function modules. The difference between RFC and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. In this case u only specify the business object and its method from external system. in BAPI there is no direct system call. While RFC are direct system call Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.

check these links

http://searchsap.techtarget.com/ateQuestionNResponse/0,289625,sid21_cid558752_tax293481,00.html

http://www.sap-img.com/abap/interview-question-on-bapi-rfc-abap-objects-tables.htm

http://www.sap-img.com/fu033.htm

http://www.sap-img.com/abap/ale-bapi.htm

Remote Function Call:

RFC is an SAP interface protocol. Based on CPI-C, it considerably simplifies the programming of communication processes between systems.

RFCs enable you to call and execute predefined functions in a remote system - or even in the same system.

RFCs manage the communication process, parameter transfer and error handling.

http://help.sap.com/saphelp_47x200/helpdata/en/22/042860488911d189490000e829fbbd/frameset.htm.

Regards,

Priyanka.

Read only

Former Member
0 Likes
636

Hi,

1) check this link..

http://www.sap-img.com/abap/interview-question-on-bapi-rfc-abap-objects-tables.htm

Remote Function Call:

RFC is an SAP interface protocol. Based on CPI-C, it considerably simplifies the programming of communication processes between systems.

RFCs enable you to call and execute predefined functions in a remote system - or even in the same system.

RFCs manage the communication process, parameter transfer and error handling.

http://help.sap.com/saphelp_47x200/helpdata/en/22/042860488911d189490000e829fbbd/frameset.htm.

BAPI

BAPI stands for Business API(Application Program Interface).

A BAPI is remotely enabled function module

ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..

You can make your function module remotely enabled in attributes of Function module but

A BAPI are standard SAP function modules provided by SAP for remote access.

Also they are part of Businees Objest Repository(BOR).

BAPI are RFC enabled function modules. the difference between RFc and BAPI are business objects.

You create business objects and those are then registered in your BOR (Business Object Repository)

which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA.

In this case u only specify the business object and its method from external system

in BAPI there is no direct system call. while RFC are direct system call.

Some BAPIs provide basic functions and can be used for most SAP business object types.

These BAPIs should be implemented the same for all business object types.

Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs.

Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.

2) From Se37 you can see both function modules, and you can call these function modules from SAP as well as from out of SAP

Regards

Sudheer

Read only

Former Member
0 Likes
636

RFC: Stands for Remote Enabled Function Module, this is nothing but a Function Module, Actually FM you can call with in same server, but RFCs can call in between different servers but same Environment. i.e. In different SAP servers.

BAPI: Stands for Business Application Programming Interface, this is nothing RFC. But after creating RFC it should be release and create object in SW01 T-Code to Create a BAPI. In this we have to add the RFC to API method. BAPIs are to connect in between different servers in different environments.

Steps To Create RFC and BAPI.

RFC:

1. Create Normal Function Module in attributes Tab you can find a Radio buttons

As Normal, Remote Enabled etc… you have to select Remote Enabled.

2. In Export and Import Parameters should be Pass by value. RFCs parameters are always Pass by value only.

3. This FM should be In a Function group and it should be in a Package, Not local.

4. In tables and source code tabs as usual you can write the code.

5. After creating RFC you have to call the FM in destination system.

6. To connecting between different servers we have to create destinations actually this is BASIS people work.

7. SM59 is T-Code to create Destination.

8. Once create the destination you can call the FM in target system.

BAPI: After completion of all these above steps. We have to release the FM. Up to RFC creation Same after that follow the below steps.

1. Once it is released you can go to SW01

2. Create Object follow all the steps and to that object we have to add our FM name in API method. It should be implement and relased.

3. Here Key fields, Methods, object etc… we have to add Key fields to that object.

4. If you want to create a BAPI the RFC name should be follow as BAPIZXXXX and import and export parameters also follow BAPIXXX and return type should be BAPIRETURN.

5. Once it is created, implemented and released successfully you can see in BOR Business Object Repository it is BAPI explorer here you can find all the BAPIs list.

If any doubt please reply

Regards

Ganesh

Read only

RenjithKumar
Product and Topic Expert
Product and Topic Expert
0 Likes
636

Hi Ram ,

This is an Excellent Step by Step Document on using BAPI FM in ABAP .

http://www.201interviewquestions.com/docs/BAPI.pdf

Best Regards

P.Renjith Kumar