Application Development 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: 

Bapi and RFC DIff

Former Member
0 Kudos

Hi Experts,

I want the major difference b/w Bapi and RFC with 2 or 3 lines which i should understand easily?with 3 or 4 points.

Thanks & Regards,

chalapathi

4 REPLIES 4

Former Member
0 Kudos

hi

hope it will help you.

Pls reward if help.

BAPI stands for Business API(Application Program Interface).

I have answered this question before..

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.

for BApis chk transaction BAPI

1) BAPIs are technically nothing else but RFC-enabled function modules meaning that they provide us with external access to the SAP system.

2) But BAPIs are more than "normal" RFC-enables function modules in that they generally access SAP business objects (sales order, purchase order.).

3) Usually, a BAPI corresponds to a certain dialog transaction dealing with a SAP business object .BAPIs and dialog transaction have in common that they both validate the incoming data very carefully.

4) In which scenarios do you use BAPIs? Most obviously, if you have to access a SAP business object but cannot use dialog.

More generally speaking, if you have either a BAPI or a normal function module which gives you the appropriate access to the business object always choose the BAPI because, as already mentioned, the interface of a BAPI is promised by SAP to be stable over several releases

Former Member
0 Kudos

Hi,

Couple of differences which i find significant are in the rules when defining BAPIS:

1. BAPI cannot have /raise exceptions. All errors/messages are returned via the RETURN (type BAPIRETURN1 or BAPIRET2) parameter.

2. No COMMIT or ROLLBACK commands are permitted within BAPIS. You need to call the BAPI_TRANSACTION_COMMIT or BAPI_TRANSACTION_ROLLBACK after the BAPI call for the purpose of closing the LUW.

The above restrictions do not apply to "normal" RFC function modules.

Cheers,

Aditya

Former Member
0 Kudos

Hi Sir ,

Please have a look below .Hope it is suitable and simpler solution for your question.

Please do reward if useful.

Thankx.

RFC is nothing but a protocol.

BAPI is a remote enabled function module.

Remote Function Call:

RFC is an SAP interface protocol. it considerably simplifies the 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.

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) .

Diff b/w Bapi and RFC

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.

Former Member
0 Kudos

BAPI methods 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.BAPI is having all Key fields, methods, interfaces etc.