Application Development and Automation 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: 
Read only

diff between bapi & Rfc,and diff between rfc & function module

Former Member
0 Likes
1,535

hi,

Iam srinivas can any one plz tell me difference between BAPI and RFC,and

RFC and FUNCTION MODULE.

thanks&regards.

Srinivas Reddy.

1 ACCEPTED SOLUTION
Read only

former_member188829
Active Contributor
0 Likes
1,033

Hi,

check this thread

Message was edited by:

Vishnu Reddy

7 REPLIES 7
Read only

former_member188829
Active Contributor
0 Likes
1,034

Hi,

check this thread

Message was edited by:

Vishnu Reddy

Read only

Former Member
0 Likes
1,033

Hi,

Visit

Regards,

Vani

Read only

Former Member
0 Likes
1,033

Hi Srinivas,

RFC are nothing but Function modules which are remotely enabled so that they can be calles from other R/3 systems.Whereas BAPI's are function modules used nowadays to replace BDC's for updation or changes to standard tables.

U can also refeer to the links given below:

<u>http://www.geekinterview.com/question_details/40974</u>

<u>http://www.sap-img.com/abap/interview-question-on-bapi-rfc-abap-objects-tables.htm</u>

<u>http://searchsap.techtarget.com/loginMembersOnly/1,289498,sid21_cid558752,00.html?NextURL=http%3A//searchsap.techtarget.com/ateQuestionNResponse/0%2C289625%2Csid21_cid558752_tax293481%2C00.html</u>

Thanks

Vasudha

Read only

Former Member
0 Likes
1,033

hi,

bapi is interface which are all developed already by RFC. ALL BAPI ARE rfc.

RFC is nothing but u can create a function module and make it as rfc enabled.

ie u can can call an rfc between different servers but not the normal function module.

regards

karthik

***reward points if this is useful

Read only

Former Member
0 Likes
1,033

<b>BAPI:</b>

BAPI is an API method of a business object which intern is a RFC enabled function module. Business objects are objects in their own sense which involve with a business process.

<b>RFC:</b>

Remote Function Call (RFC) is a call to a function module running in a system different from the caller's. The remote function can also be called from within the same system, but usually caller and callee will be in differene system. RFC allows for remote calls between two SAP Systems (R/3 or R/2) or between an SAP System and a non-SAP System.

<b>FUNCTION MODULE:</b>

Function modules are special external subroutine stored in a central library. The R/3 system provides numerous predefined functin modules that you can call from your ABAP/4 programs. The function modules have global presence and can return value.+

Rewards if useful.

Read only

Former Member
0 Likes
1,033

HI

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

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.

http://help.sap.com/saphelp_47x200/helpdata/en/22/042860488911d189490000e829fbbd/frameset.htm.

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.

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.

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.

BAPIs:

- are designed as the methods of business objects in the business object repository (accessable using transaction BAPI or SWO1)

- have non-technical parameter names (the technical field names in SAP are mapped)

- have a fixed interface and functionality across all SAP releases (this is probably the key point as it means you can develop integrations with them which do not need to be changed when you upgrade)

Generally, if you are trying to find a function for a particular requirement you should look for a BAPI first, then for a RFC function which has a released status (check the function attributes in SE37), and then just a normal RFC last.

The benefit of an RFC function with released status means that it also has a fixed interface which will not change with new SAP releases

Reward if usefull

Read only

Former Member
0 Likes
1,033

Hi Srinivas,

<b>RFC:-</b>

RFC is an SAP interface protocol.

It enables u to call n xecute predefined functions in a remote system .

It manage the communication process & error handling.

<b>BAPI:-</b>

API stands for Business API.

BAPI is remotely enabled function module

ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..

BAPI are standard SAP function modules provided by SAP for remote access also they are the part of business Object Repository(BOR).

BAPI are RFC enabled function modules. the difference between RFc and BAPI are business objects.

We 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 we 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.

<b>Function Module:-</b>

Function modules are routines with a defined interface, supporting optional parameters intend to perform specific tasks encouraging re-use.

Functions that are remotely callable via SAP's proprietary remote function call (RFC) protocol, have additional technical restrictions, primarily that the parameters cannot be changing and/or passed by reference, as previously mentioned. When a function module is marked as RFC-enabled, SAP checks that the function's interface meets the restrictions and also generates an internal stub routine to allow the RFC communication to take place

Hope this will help you

Regards,

Anushree

.