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

differences between rfc and bapi

Former Member
0 Likes
924

hi..

will please send differences between rfc and bapi..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
776

Hi,

Please reward points if helpful.

BAPI is used only when it is available for the particular transaction like Delivery Sales order. but BDC can be used for any

transaction which have screen and fields.

BAPI is directly updated the database instead BDC run through the screen flow.

So BAPI can't handle all the flow logic checking and enhancement put by programmer to faciliate the user requirement.

BAPI methods 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.BAPI is having all Key fields, methods, interfaces etc.

************here are some points for review***********

The Remote Function Call facility allows you to call an R/3 Function module on a “remote” machine.

2. To communicate between two R/3 Systems and also with an External System. External Application program also can call these function module for integration.

3. RFC or sRFC - Synchronous RFC

aRFC - Asynchronous RFC

tRFC - Transactional RFC

qRFC - Queued RFC (I.e. Serialization of tRFC)

RFC makes direct and synchronous calls of a program in the remote system.

If the caller is an external program it will call an RFC-enabled function in R/3.

If the calling program is the R/3 system it will call an RFC-function in another R/3-system or it will call a non-R/3 program through a gateway-proxy (usually rfcexec.exe).

. When you execute an RFC call, a number of task are automatically

performed. These include:

- Data conversion

- Logon to the SAP partner system

- Conversion of all RFC data types

- Control of the communication flow

The function module to be called must be flagged as RFC-enabled.

All parameters must have a reference field.

All parameters should be Pass by Value

The target system must be defined

You can execute the function in any of the RFC types

3. The RFC client is the instance which calls a function from a "remote" location.

The RFC server gets the function and executes it.

Types of RFC Call

Synchronous

CALL FUNCTION Func Destination Dest

CALL FUNCTION func DESTINATION 'NONE' ...

CALL FUNCTION func DESTINATION ’BACK' ...

Asynchronous

CALL FUNCTION func … STARTING NEW TASK taskname

PERFORMING form ON END OF TASK

RECEIVE RESULTS FROM FUNCTION func

BAPI:::::::::::::::::::::::::::::

BAPIs are a subset of the RFC-enabled function modules, especially designed as Application Programming Interface (API) to the SAP business object, or in other words: are function modules officially released by SAP to be called from external programs.

1. A full cycle of a transaction for a particular business application.

2. Business Object Repository is the object oriented repository in the R/3 System. It contains, among other objects, SAP Business Objects and their methods.

3. BAPI is a precisely defined interface providing access to processes and data in business application systems. These are defined as API Methods of SAP Business Objects

4. It can be called within in R/3 system from external application systems and other programs. Its an Interface technology forms the basis for the following developments like :

Distributed R/3 scenarios using ALE

Connecting to the Internet using Internet Application Components

Visual Basic programs as frontends

Workflow applications that extend beyond system boundaries

connections to non-sap software / legacy system

Provides an object oriented view of R/3 system data and processes.

Ensures interface stability

Points to be remembered while creating BAPI

It should not contain

CALL TRANSACTION

SUBMIT REPORT

SUBMIT REPORT AND RETURN

COMMIT WORK

Steps in Developing BAPI

1)Defining the scenario

2)Review the BAPI scenario

3)Defining a BAPI and its Interface

4)Creating Individual Programming Objects

5)Programming BAPI

6)Testing & Documentation

7)Release

8)Enhance existing BAPIs, if required

Assigning a Name to the Function Module

BAPI_<Business Object Name>_<Method Name>

specify the function group

The technical name of a SAP Business object ususally takes the form of BUSnnnn, where n is a number. Use the suffix “nnnn” as the name of function group

Thanks

Sivaparvathi

2 REPLIES 2
Read only

Former Member
0 Likes
778

Hi,

Please reward points if helpful.

BAPI is used only when it is available for the particular transaction like Delivery Sales order. but BDC can be used for any

transaction which have screen and fields.

BAPI is directly updated the database instead BDC run through the screen flow.

So BAPI can't handle all the flow logic checking and enhancement put by programmer to faciliate the user requirement.

BAPI methods 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.BAPI is having all Key fields, methods, interfaces etc.

************here are some points for review***********

The Remote Function Call facility allows you to call an R/3 Function module on a “remote” machine.

2. To communicate between two R/3 Systems and also with an External System. External Application program also can call these function module for integration.

3. RFC or sRFC - Synchronous RFC

aRFC - Asynchronous RFC

tRFC - Transactional RFC

qRFC - Queued RFC (I.e. Serialization of tRFC)

RFC makes direct and synchronous calls of a program in the remote system.

If the caller is an external program it will call an RFC-enabled function in R/3.

If the calling program is the R/3 system it will call an RFC-function in another R/3-system or it will call a non-R/3 program through a gateway-proxy (usually rfcexec.exe).

. When you execute an RFC call, a number of task are automatically

performed. These include:

- Data conversion

- Logon to the SAP partner system

- Conversion of all RFC data types

- Control of the communication flow

The function module to be called must be flagged as RFC-enabled.

All parameters must have a reference field.

All parameters should be Pass by Value

The target system must be defined

You can execute the function in any of the RFC types

3. The RFC client is the instance which calls a function from a "remote" location.

The RFC server gets the function and executes it.

Types of RFC Call

Synchronous

CALL FUNCTION Func Destination Dest

CALL FUNCTION func DESTINATION 'NONE' ...

CALL FUNCTION func DESTINATION ’BACK' ...

Asynchronous

CALL FUNCTION func … STARTING NEW TASK taskname

PERFORMING form ON END OF TASK

RECEIVE RESULTS FROM FUNCTION func

BAPI:::::::::::::::::::::::::::::

BAPIs are a subset of the RFC-enabled function modules, especially designed as Application Programming Interface (API) to the SAP business object, or in other words: are function modules officially released by SAP to be called from external programs.

1. A full cycle of a transaction for a particular business application.

2. Business Object Repository is the object oriented repository in the R/3 System. It contains, among other objects, SAP Business Objects and their methods.

3. BAPI is a precisely defined interface providing access to processes and data in business application systems. These are defined as API Methods of SAP Business Objects

4. It can be called within in R/3 system from external application systems and other programs. Its an Interface technology forms the basis for the following developments like :

Distributed R/3 scenarios using ALE

Connecting to the Internet using Internet Application Components

Visual Basic programs as frontends

Workflow applications that extend beyond system boundaries

connections to non-sap software / legacy system

Provides an object oriented view of R/3 system data and processes.

Ensures interface stability

Points to be remembered while creating BAPI

It should not contain

CALL TRANSACTION

SUBMIT REPORT

SUBMIT REPORT AND RETURN

COMMIT WORK

Steps in Developing BAPI

1)Defining the scenario

2)Review the BAPI scenario

3)Defining a BAPI and its Interface

4)Creating Individual Programming Objects

5)Programming BAPI

6)Testing & Documentation

7)Release

8)Enhance existing BAPIs, if required

Assigning a Name to the Function Module

BAPI_<Business Object Name>_<Method Name>

specify the function group

The technical name of a SAP Business object ususally takes the form of BUSnnnn, where n is a number. Use the suffix “nnnn” as the name of function group

Thanks

Sivaparvathi

Read only

Former Member
0 Likes
776

Hi Midathala,

Bapi is a method for some procedure . And RFC is a method to call that method.

Eg : Bapi can be called through RFC .

Regards

Sourabh Verma