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

bapi & rfc

Former Member
0 Likes
1,154

hi,

wht is the main diff b/n RFC and BAPI?

regards,

kb

6 REPLIES 6
Read only

former_member156446
Active Contributor
0 Likes
1,042

BAPI stands for Business Application Program Interface &

RFC stands for Remote Function Call

Major difference betwen Bapi and RFC is that BAPIS are use for communication between SAP and Non SAP system whereas RFCs are used for communicating within sap system only..

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 BAPI are standard SAP function modules provided by SAP for remote access.

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) .

Read only

Former Member
0 Likes
1,042

Hi kb ,

The main difference between BAPI and RFC is that a BAPI will always have a business object associated with it.

Go to transaction BAPI and you can see that there will be an business object under which there will be the BAPI's Associated with it.

Regards

Arun

Read only

Former Member
0 Likes
1,042

BAPI:

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.

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.

RFC:

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.

FUNCTION MODULE:

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,042

Hi Kb

I am writing some document wid this, pls go through this--

please reward some pts--

• BAPI/RFC Interface

A remote function call 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 (as a remote call), but usually caller and callee will be in different systems.

In the SAP System, the ability to call remote functions is provided by the Remote Function Call interface system (RFC). RFC allows for remote calls between two SAP Systems (R/3 or R/2), or between an SAP System and a non-SAP System.

RFC consists of the following interfaces:-

A calling interface for ABAP programs

Any ABAP program can call a remote function using the CALL FUNCTION...DESTINATION statement. The DESTINATION parameter tells the SAP System that the called function runs in a system other than the caller's.

RFC communication with the remote system happens as part of the CALL FUNCTION statement.

RFC functions running in an SAP System must be actual function modules, and must be registered in the SAP System as "remote".

When both caller and called program are ABAP programs, the RFC interface provides both partners to the communication. The caller may be any ABAP program, while the called program must be a function module registered as remote.

Calling interfaces for non-SAP programs

When either the caller or the called partner is a non-ABAP program, it must be programmed to play the other partner in an RFC communication.

To help implement RFC partner programs in non-SAP Systems, SAP provides-

External Interfaces

RFC-based and GUI-based interfaces can be used by external programs to call function modules in SAP R/2 or R/3 systems and execute them in these systems.

Vice versa, ABAP programs in R/2 or R/3 can use the functions provided by external programs via these interfaces.

• Function Groups

Function groups are containers for function modules.

When you call an function module, the system loads the whole of its function group into the internal session of the calling program (if it has not already been loaded).

• Function Modules

Calling Function Modules in ABAP

To call a function module, use the CALL FUNCTION statement:

CALL FUNCTION <module>

[EXPORTING f1 = a 1.... f n = a n]

[IMPORTING f1 = a 1.... f n = a n]

[CHANGING f1 = a 1.... f n = a n]

[TABLES f1 = a 1.... f n = a n]

[EXCEPTIONS e1 = r 1.... e n = r n [ERROR_MESSAGE = r E]

[OTHERS = ro]].

You can specify the name of the function module <module> either as a literal or a variable. Each interface parameter <fi> is explicitly assigned to an actual parameter <a i>. You can assign a return value <r i> to each exception <e i>. The assignment always takes the form <interface parameter> = <actual parameter>. The equals sign is not an assignment operator in this context.

• After EXPORTING, you must supply all non-optional import parameters with values appropriate to their type. You can supply values to optional import parameters if you wish.

• After IMPORTING, you can receive the export parameters from the function module by assigning them to variables of the appropriate type.

• After CHANGING or TABLES, you must supply values to all of the non-optional changing or tables parameters. When the function module has finished

regards

deepanker

Read only

Former Member
0 Likes
1,042

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.

Reward points if useful

Regards,

Sreenivas

Read only

Former Member
0 Likes
1,042

thanks