Preface – This post is part of the Differences in ABAP for Interviews series.
Before discussing the difference between BAPI and RFC, let’s have a short introduction of the two.
Table of Contents
BAPI
BAPI stands for Business Application Programming Interface. BAPIs are the specific methods that are stored in BOR (Business Object Repository) of the SAP system to carry out a specific business task. It enables the exchange of business data between SAP components, and between SAP and non-SAP components. It allows integration at the business level rather than technical level. It is stored as RFC enabled function modules in the ABAP Workbench Function Builder. To use a BAPI method to access the data in SAP business objects, an application program only needs to know how to call the method using the name of the BAPI and import/export parameters. Standard BAPIs are easier to use as it prevents the user from having to deal with a large number of different BAPIs. A standard BAPI is preferred over an individual BAPI.
RFC
RFC stands for Remote Function Call. It is a protocol for communication between applications of different systems in SAP environment that includes connections between SAP systems and between SAP systems and non-SAP systems. It is a standard SAP interface for communication between different SAP systems. It describes an external interface to a system function module available in the SAP system. The functionality of R/3 applications can be extended from an external program using RFC interfaces.
Using only RFC, an SAP system cannot be connected to a non-SAP system to retrieve the data. Only through BAPI, RFC can access the SAP system from a non-SAP system or vice versa.
Difference between BAPI and RFC in SAP ABAP
Now, let’s have a look at their difference.
BAPI | RFC |
It is an RFC enabled function module that provides external access to an SAP business application. | It is a protocol for communication between applications of different systems in the SAP environment. |
It can be wrapped in Business Objects. | It cannot be wrapped in Business objects. |
It can be compared to CGI applications. | It can be compared to HTTP |
All BAPIs are RFC. | All RFCs are not BAPI. |
Exceptions are not used in BAPI. | Exceptions can be defined in the interface of the called function module |
0 Comments