What is the difference between BAPI and RFC?

Answer Posted / firdoos

I like to describe BAPIs as "Dialog without dialog". What does this mean?

BAPIs do the same validations like in the corresponding dialog transaction, e.g. BAPI_USER_CREATE1 and SU01.
Underneath a BAPI you may find RFC-enabled function modules which may also provide the BAPI functionality (e.g. create a SAP user) yet they do not care much about validations.

Example:
BAPI_USER_CREATE1 eventually uses fm SUSR_BAPI_USER_CREATE to create a SAP user.
The function module may allow you to create the SAP user with a wrong title whereas the BAPI won't. The wrong title will cause problems in the dialog transaction (SU01).

Another important aspect is that BAPIs never raise exceptions but return the AEX-messages in a RETURN parameter (e.g. of type BAPIRET2).
Last but not least a BAPI should never do the COMMIT WORK itself but you have to do it after a successful BAPI call (e.g. by calling BAPI_TRANSACTION_COMMIT or BAPI_TRANSACTION_ROLLBACK).

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a transparent table exist in data dictionary but not in the data base physically? : sap abap data dictionary

618


How do you read files from the application server ? : abap bdc

613


Explain the components of selection table?

636


Some Realtime Objects on Bdc.

2429


Can we control the sequence in which multiple implementations of a multiple use BADI are called? If yes, how?

916






Value table VS check Table.

964


Why we are using Macros instead of Function Modules

1619


what are Hana Basics

899


Sy index and sy tabix

968


What is payroll driver ? : abap hr

610


Describe the difference between macro and subroutine?

636


Can i know some of the Realtime tickets that anyone has been faced ?

1663


What is the difference b/t Session method and call transaction method ??

5258


What is PS structure

1630


What is meant by slab? How is indian slab and us slab? : sap abap hr

558