cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI and RFC

Former Member
0 Kudos

What is the difference between Bapi and RFC?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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 (Business Application Programming Interface) is an API method of a business object which intern is a RFC enabled Function Module.

Business Objects are the Objects which has business sence associated to it. Ex. Sales Orders, Purchase Orders etc.

The Properties of BAPI are:

Every BAPI name should start with letters 'BAPI'.

It is an API method of a Business Object.

it does not contain a internal COMMIT statement in the Function Module.

It does not contain "CALL TRANSACTION" statements.

BAPI do not raise 'EXCEPTIONS'.

a RETURN structure is defined as an interface parameter of a BAPI which is used to log all the errors, warnings and the successful processes tha are triggered in the course of execution of a BAPI.

A successful execution of a BAPI requires the data to be commited and this process of performing a COMMIT is achieved by calling the BAPI_TRANSACTION_COMMIT' explicitly if there are no errors logged in the RETURN structure.

There are two types of BAPI's: Instance Dependent & Instance Independent.

BAPI provides an access to the SAP system for external applications to have the business data processed in the form of web services. When BAPI's are used to post the data in SAP system these are used as Function Modules.

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.

Reward points if useful

regards

kummari

Edited by: kummari on Jul 11, 2008 10:49 AM

Answers (5)

Answers (5)

Former Member
0 Kudos

my query was asnswered.

former_member193376
Active Contributor
0 Kudos

Hi

BAPI

http://help.sap.com/saphelp_nw04/helpdata/en/3e/ecf226942511d2ad4b080009b0fb56/frameset.htm

BAPI

Definition

The BAPI Explorer is the working environment for developing BAPIs themselves and for developing with BAPIs in an SAP System.

*Use

Prerequisites

The BAPI Explorer is available as of Release 4.6A and enhances or replaces the BAPI Browser used in earlier releases. The BAPI Explorer uses the latest HTML control technology. For this reason to work with the BAPI Explorer, you must be using a SAPgui of version 4.6A.

If you are using a SAPgui from an earlier release, the BAPI Browser (Transaction BAPI45) is automatically called instead of the BAPI Explorer. For information about working in the BAPI Browser see BAPI Browser in the BAPI User Guide.

Purpose

In the BAPI Explorer, application developers can get an overview of the status of BAPIs in the BOR. The BAPIs can be determined either by the position of the associated object or interface type in the component hierarchy in the BOR, or from an alphabetical list. All information required to use a particular BAPI is provided in the BAPI Explorer.

The BAPI Explorer is used internally in SAP to develop BAPIs, but can also be used by customers and partners. The BAPI Explorer provides all the tools used to create BAPIs and the required development objects in an integrated programming environment. The entire development process of a BAPI takes place in the framework of form-controlled "projects" to achieve maximum quality, stability and usability of the BAPI.

Structure

The BAPI Explorer is divided into two areas:

Hierarchy display

Here all the business object types or interface types for which BAPIs have been defined are displayed. For further information see Working with Display Functions.

Work area

Here the details and documentation of the development object selected in the hierarchy display can be viewed.

The tools used to develop BAPIs are also available in the work area. For further information see Working with Tools and Projects.

Integration

To call the BAPI Explorer, choose Tools ® Business Framework ® BAPI Explorer. To call it directly, use transaction BAPI.

RFC HELP...

http://help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5b6a85b11d6b28500508b5d5211/content.htm

*RFC *

Purpose

Communication between applications in different systems in the SAP environment includes connections between SAP systems as well as between SAP systems and non-SAP systems. Remote Function Call (RFC) is the standard SAP interface for communication between SAP systems. RFC calls a function to be executed in a remote system.

Synchronous RFC

The first version of RFC is synchronous RFC (sRFC). This type of RFC executes the function call based on synchronous communication, meaning that the systems involved must both be available at the time the call is made.

Transactional RFC (tRFC)

Transactional RFC(tRFC, previously known as asynchronous RFC) is an asynchronous communication method that executes the called function module just once in the RFC server. The remote system need not be available at the time when the RFC client program is executing a tRFC. The tRFC component stores the called RFC function, together with the corresponding data, in the SAP database under a unique transaction ID (TID).

If a call is sent, and the receiving system is down, the call remains in the local queue. The calling dialog program can proceed without waiting to see whether the remote call was successful. If the receiving system does not become active within a certain amount of time, the call is scheduled to run in batch.

tRFC is always used if a function is executed as a Logical Unit of Work (LUW).

Within a LUW, all calls

· are executed in the order in which they are called

· are executed in the same program context in the target system

· run as a single transaction: they are either committed or rolled back as a unit.

Implementation of tRFC is recommended if you want to maintain the transactional sequence of the calls.

Disadvantages of tRFC

· tRFC processes all LUWs independently of one another. Due to the amount of activated tRFC processes, this procedure can reduce performance significantly in both the send and the target systems.

· In addition, the sequence of LUWs defined in the application cannot be kept. It is therefore impossible to guarantee that the transactions will be executed in the sequence dictated by the application. The only thing that can be guaranteed is that all LUWs are transferred sooner or later.

Queued RFC (qRFC)

To guarantee that multiple LUWs are processed in the order specified by the application, tRFC can be serialized using queues (inbound and outbound queues). This type of RFC is called queued RFC (qRFC).

qRFC is therefore an extension of tRFC. It transfers an LUW (transaction) only if it has no predecessors (based on the sequence defined in different application programs) in the participating queues.

Implementation of qRFC is recommended if you want to guarantee that several transactions are processed in a predefined order.

Data transfer

All RFC types are transferred by means of CPI-C or TCP/IP. They represent a kind of Gateway Communication.

BAPIs are RFCs, the only difference is that BAPIs usually encapulate some complete business object. For example, creating a sales order, the BAPI would do all of the steps required to create a sales order.

refer

https://forums.sdn.sap.com/click.jspa?searchID=12896578&messageID=5237619

https://forums.sdn.sap.com/click.jspa?searchID=12896578&messageID=5135164

DIFFERENCES

RFC:-

1) Direct system call

2) provide communication between sap to sap or sap to non-sap or viceversa

3)RFC can have one instance

4)RFC can have only one instance whereas BAPI can have many.

5) RFC are direct system call.

BAPI:-

1)Business object

2) no direct system call

3) stored in BOR , which can be accessed by non sap applications like JAVA & VB

4) BAPI has many instances

5) support OO concepts

6)Bapi's are nothing but RFC enabled function module....... and the main difference b/w RFC & BAPI is that BAPI is maintained in BOR(business object repository)...

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

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

9)BAPI is having all Key fields, methods, interfaces etc.unlike RFC

Hope this is helpful

Thanks

Saiyog

Former Member
0 Kudos

Both BAPIs and RFCs are function modules.

BAPIs are generally used to access/modify database tables. All BAPIs are remote enabled. i.e. All BAPIs are RFC function modules. However all RFC function modules are not BAPIs.

Regards,

Riyaz

Former Member
0 Kudos

hi leelaratnam,

If still looking for more clarification check the threads below

regards

kummari

Former Member
0 Kudos

Hi leelaratnam,

BAPI :Business Application Programming Interface

The SAP business objects stored in the Business Object Repository (BOR) encapsulate their data and processes. External access to the data and processes is only possible by means of specific methods

BAPI helps to execute the business applications present in the other system like VB applicatoin.using BAPI we can call other applicatons through SAP system

BAPI itself as a RFC associated with it

chk this link

http://help.sap.com/saphelp_nw04/helpdata/en/7e/5e11cf4a1611d1894c0000e829fbbd/frameset.htm

RFC Remote Funtion Call :

it is a concept in SAP that which helps to call the remote functions from the standalone systems

chk this link

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f078394a-4469-2910-c4bf-853c7567...

if found worth pls do the req

Thanx

Sampath