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: 

difference between BAPI and RFC FM

Former Member
0 Kudos

Hi Experts,

what is the difference between BAPI and a RFC FM. I know both can be called from a non SAP apllication, Is there any specific case where a RFC FM can not be called and we have to go for a BAPI??

thanks

sankar

1 ACCEPTED SOLUTION

uwe_schieferstein
Active Contributor
0 Kudos

Hello Sankar

If you want to access a SAP business object you should always go for the BAPI and not use any apparently similar RFC function module. Only the BAPI will ensure that all incoming data are validated and that the business object is after any CREATE or CHANGE is in a consistent state when you use it in a dialog transaction.

Check also my answer in thread

Regards

Uwe

5 REPLIES 5

uwe_schieferstein
Active Contributor
0 Kudos

Hello Sankar

If you want to access a SAP business object you should always go for the BAPI and not use any apparently similar RFC function module. Only the BAPI will ensure that all incoming data are validated and that the business object is after any CREATE or CHANGE is in a consistent state when you use it in a dialog transaction.

Check also my answer in thread

Regards

Uwe

former_member598013
Active Contributor
0 Kudos

Hi Sankara,

The basic difference between the BAPI and RFC is

BAPI: is registered in the BOR(Business Object Repository)

Where are RFC is not registered in the BOR(Business Object Repository).

This is the main difference...

&************** Reward Point If helpfull********************&

Former Member
0 Kudos

hi sankara,

BAPI Calls are Synchronous. RFC Calls are Asynchronous.

Synchronous : In program-to-program communication, synchronous communication requires that each end of an exchange of communication respond in turn without initiating a new communication. A typical activity that might use a synchronous protocol would be a transmission of files from one point to another. As each transmission is received, a response is returned indicating success or the need to resend. Each successive transmission of data requires a response to the previous transmission before a new one can be initiated.

Asynchronous : In computer programs, asynchronous operation means that a process operates independently of other processes, whereas synchronous operation means that the process runs only as a result of some other process being completed or handing off operation. A typical activity that might use a synchronous protocol would be a transmission of files from one point to another. As each transmission is received, a response is returned indicating success or the need to resend. Each successive transmission of data requires a response to the previous transmission before a new one can be initiated.

i think this will help u

regards,

sindhu.

Former Member
0 Kudos

Hi,

Dfference between BAPI and RFC FM

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.

RFC Vs 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 you 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. It is not possible to connect SAP to Non-SAP systems to retrieve data using RFC alone. RFC can acces the SAP from outside only through BAPI and same is for vice versa access.

RFC is the protocol used by SAP for remote communication, that is, for communications between remote (independent) systems. RFC is used for communications between two independent SAP systems, or for communications between an SAP system and a non-SAP system, such as an external application. It can also be used for communications between modules on the same system. Using the RFC interfaces you can extend the functionality of R/3 applications from an external program.

Reward If helpfull,

Naresh.

Former Member
0 Kudos

This message was moderated.