‎2007 Jul 09 12:14 PM
Hi frnds,
What is the difference between BAPI AND RFC?
Regards,
Suraj
‎2007 Jul 09 12:17 PM
‎2007 Jul 09 12:16 PM
Hi,
RFC and BAPIs are remote enabled function modules. They are practicly the same. A BAPI is one step further as it usually is a self contained business function, such as "Create Purchase Order", or "Change Sales Document". BAPIs interface is very well defined and documented. BAPIs can be found in the BAPI browser via transaction BAPI. RFCs are just remote enabled function modules.
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.
<b>Reward points</b>
Regards
‎2007 Jul 09 12:17 PM
‎2007 Jul 09 12:26 PM
Hi Suraj,
check it out.
http://help.sap.com/saphelp_nw2004s/helpdata/en/7e/5e114a4a1611d1894c0000e829fbbd/frameset.htm
http://www.sapgenie.com/abap/bapi/example.htm
http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
http://techrepublic.com.com/5100-6329-1051160.html#
http://www.sap-img.com/bapi.htm
http://www.sap-img.com/abap/bapi-conventions.htm
http://www.sappoint.com/abap/bapiintro.pdf
http://www.sapgenie.com/abap/bapi/example.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
http://techrepublic.com.com/5100-6329-1051160.html#
http://www.sap-img.com/bapi.htm
http://www.sap-img.com/abap/bapi-conventions.htm
http://www.sappoint.com/abap/bapiintro.pdf
RFC
RFC (Remote Function Call) is similar to the general SAP fun module: except that in the attributes you click the radio button: RFC enabled;
and you will be passing an Import parameter DESTINATION to it.
Other code and usage will be similar to any fun module;
Have a look at any fun module in SE37 to understand better about the different components of Fun modules;
Refer this link:
http://help.sap.com/saphelp_nw04/helpdata/en/22/042518488911d189490000e829fbbd/frameset.htm
reward points if u find it helpful.
Thanks&Regards,
Rajesh
‎2007 Jul 09 12:55 PM
Hi Suraj,
RFC is used for BAPI function Module.It is to be noted that while creating BAPI function module u must keep in mind a no of points :-
1) Only use 1 func group for all of the BAPIs of a business object.Consider this the same as encapsulation of the business object.
2)The function module must be RFC-enabled.
3)All parameters in the interface (fields,structures,tables) must have an reference to a BAPI data structure in the ABAP Dictionary.
4)U can use Importing,exporting and Tables Parameters.All error messages have to use the RETURN parameter.
5)Use the standard data structures BAPIRET2 for the RETURN structure and BAPIPAREX for any ExtensionIN and ExtensionOut structures.
6)BAPIs cannot have any screen output.
7)A BAPI doesnot cause an program termination(A message).
8)You must provide Badis for customer Enhacements.
9)A BAPI may not dispatch a COMMIT-WORK command.
10)Always perform dbase changesby using the update task.
11)For mapping purposes,transaction BDBS generates function modules that do the mapping between internal & external structures.
12)The following two BAPIs can be usede for converting currencies to and from internal and BAPI format:
BAPI_CURRENCY_CONV_TO_EXTERNAL
BAPI_CURRENCY_CONV_TO_INTERNAL
13) The Parameter RETURN should use the ABAP Dictionary structure BAPIRET2.
14)Function module BALW_BAPIRETURN_GET2 fills the BAPIRET2 struture.
These are all the practcal steps which is most important than just knowing the difdference hence appending the earliers replies along with this will make ur concept more clear incase u have more querries please do raise an question.
Always note that for creating RFC enabled BAPI u need to:-
i)describe the business scenerio
ii)define the business scenario
iii)Review the business scenerio
iv) create an RFC-enabled function module
v)test the documentation for accuracy and completeness
vi)test an RFC-enabled function module.
Please do reward points for all the helpful answes.....................
Regards,
Somnath