‎2008 Apr 03 1:15 PM
Hi All,
What is the difference between BAPI and RFC enabled function module
Thanks,
S.Gangireddy.
‎2008 Apr 03 1:18 PM
Hi,
Please refer below:
BAPI stands for Business Application Programming Interface. It is a library of functions that are released to the public as an interface into an existing SAP system from an external system.
RFC is the protocol used to call functions in an R/3 system by a caller external to R/3 or to call programs external to R/3 from an R/3 system.
Functions can only be called via RFC, if they are tagged as RFC functions in the SAP development workbench. They are then called RFC function modules. BAPIs are complete sets of (BAPI) function modules that model a business application.
When you are familiar with web developments: RFC can be compared to HTTP and BAPIs are CGI applications.
In other words: A BAPI function is a function module that can be called remotely using the RFC technology.
Thanks,
Sriram Ponna.
‎2008 Apr 03 1:23 PM
Hi ,
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.
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.
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.
2)
Function modules are modularzation elements in the ABAP programming language. The encapsulate some function that can be reused. They provide an interface or signature in which to pass data to and from the function module. RFC is a remote enabled function module. All you need to do is set the flag on the attributes tab of the function module and you have an RFC.
A BAPI is nothing more than a function module. BAPIs usualy contain the logic for some business function, like "Create Sales Order", or "Change Purchase Order". Again they provide an interface to pass data to and get data from the BAPI. You will never see "Exceptions" in a BAPI as they are designed to be called from other systems, and may no be able to handle exceptions. Also, you will never see a BAPIs signature change. If SAP feels the need to change the signature of the BAPI, then will create a new bapi.
Example,
is BAPI_SALESORDER_CREATEFROMDAT1 and BAPI_SALESORDER_CREATEFROMDAT2. They won't change the signature, but they will create a new one and incorporate the change.
Function Modules --> A reuseable piece of code.
Ex. SD_DATETIME_DIFFERENCE.
BAPI --> Function Modules used for high traffic of for invoice transacctions.
Ex. GL_POSTING_POST.
‎2008 Apr 03 1:28 PM
--> BAPI is used only when it is available for the particular transaction like Delivery Sales order.
--> INTERFACE : These are used for tranfering the data from SAP to non-SAP and vice-versa. for ex: if we are using VB application,where in that we want to connect to SAP and retireve the data,and then change and update the data in SAP for that purpose we can use that.
whereas RFC
--> RFC is the protocol used to call functions in an R/3 system
by a caller external to R/3 or to call programs external to
R/3 from an R/3 system.
--> Functions can only be called via RFC, if they are tagged as
RFC functions in the SAP development workbench.
RFC are the function modules which can be written by "programmers" for their particular requirement,these dont come as "package" as in case of BAPIs where they are already available readily.
Hope this is clear.
Regards,
Ramya
‎2008 Apr 03 1:32 PM
Hi,
BAPI stands for Business Application Programming Interface. It is a library of functions that are released to the public as an interface into an existing SAP system from an external system.
RFC is the protocol used to call functions in an R/3 system by a caller external to R/3 or to call programs external to R/3 from an R/3 system.
Functions can only be called via RFC, if they are tagged as RFC functions in the SAP development workbench. They are then called RFC function modules. BAPIs are complete sets of (BAPI) function modules that model a business application.
When you are familiar with web developments: RFC can be compared to HTTP and BAPIs are CGI applications.
In other words: A BAPI function is a function module that can be called remotely using the RFC technology.
same question answered pretty well in the following thread
Reward if useful.
‎2008 Apr 03 1:39 PM
hi,
RFC are remote enabled function module for communication between SAP systems and between SAP systems and external systems.
BAPIs are implemented as RFC-enabled function modules and are created in the Function Builder of the ABAP Workbench.
Standardized programming interface that enables external applications to access business processes and data in an SAP System.
BAPIs are defined in the BOR as methods of SAP business object types that carry out specific business functions
reward if helpful,
rekha.
‎2016 Jan 21 10:33 AM
‎2020 Aug 20 1:29 PM
Hi,
BAPI:
1. BAPI does not have direct system call.
2. It has Business Objects.
3. It can Communicate with other BAPI's.
4. It is used in OOP's concepts.
RFC:
1. It has direct system call.
2. It does not have any Buisenss objects.
3. it cannot communicate with other RFC's.
Regards,
Nasreen .
‎2020 Aug 20 5:04 PM
Point 2 in each list you've got right. Everything else is wrong. Which is a bit sad when you consider that there are two perfectly correct answers already.
‎2020 Sep 15 3:53 PM
1. It does not have a directly system call but rfc we can.
2. Bapi has a Business Object but rfc it doesn't have.
3. It can Communicate with other bapi but it can't communicate with other rfc.
4. we can use bapi in oops concept
rfc is used on procedure-oriented concepts