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

What does the extract statement do in extract datasets? : abap modularization

560


How do you backup Sapscript layout sets? Can you download and upload? How?

638


What is new enhancement framework?

883


How do you find the information on the current screen?

598


What is the function of a data element? : abap data dictionary

582






What will happen when we use fully buffered in abap?

563


any 1 having notes on SAP-ABAP certification, or even if any 1 could provide the url for getting notes on SAP-ABAP certification, would be appreciated.

1955


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

556


Reports: Event functionality.

885


What is screen flow logic? What are the sections in it?

598


What is payroll driver ? : abap hr

610


Explain what is a foreign key relationship? Explain this with the help of an example.

566


Explain about the tables exists in a data dictionary and what are they? : abap data dictionary

630


To find the date difference & excude saturday & sunday in between them

1526


what is abstract classes

875