Bapi and Badi

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

What is BAPI?

Business Application Programming Interface(BAPI) are standardized


programming interfaces (methods) enabling external applications to access
business processes and data in the R/3 System.

They provide stable and standardized methods to achieve seamless


integration between the R/3 System and external applications, legacy systems
and add-ons.

BAPIs are defined in the BOR(Business object repository) as methods of


SAP business object types that carry out specific business functions. They are
implemented as RFC-enabled function modules and are created in the
Function Builder of the ABAP Workbench.

Some BAPIs and methods provide basic functions and can be used for most
SAP Business Objects. These are called STANDARDIZED BAPI's.

List of Standardized BAPIs:

 BAPIs for Reading Data - GetList() , GetDetail() , GetStatus() ,


ExistenceCheck()
 BAPIs for Creating or Changing Data- Create() ,Change(),Delete() and
Undelete() ,
 BAPIs for Mass Processing -ChangeMultiple(), CreateMultiple(),
DeleteMultiple().

How to create a BAPI


Step 1.Go to transaction swo1 (Tools->Business Framework -> BAPI
Development ->Business Object builder ) .Select the business object,
according to the functional requirement for which the BAPI is being created.
Step2.Open the business object in change mode. Then Select Utilities ->API
Methods ->Add method.Then enter the name of the function module and
select Continue.

Step 3.In the next dialog box, following information needs to be specified :
 Method : Suggest an appropriate name for the method,
 Texts : Enter description for the BAPI,
 Radio buttons : Dialog, Synchronous, Instance-independent . BAPI 's
are usually implemented synchronously.

Step4.To create the method select Yes in the next dialog box.
Step5.After the program has been generated and executed, check the
program in the method just created.Thus , a BAPI is created.
Testing the BAPI
You can test the BAPI by Testing the individual method of the Business
Object in the Business Object Builder. ( or one can use the transaction
'SWUD' to test the method ) .

Releasing and freezing the BAPI


 To release the BAPI , first release the function module ( using
transaction se37 ) .
 Set the status of the method to 'released' in the Business Object Builder
( using transaction SWo1 - Edit-> change status-> released. )

You can also use the BAPI Explorer (Transaction code BAPI) for 360' view on
BAPI

BADI

BADI stands for Business Add Ins Just like Customer Exits , BADI help hook
custom enhancements to SAP functionality. Example of a BADI: In
transaction CAT2 - Time Sheet Entry, HR wishes to include an interactive
acknowledgment that knowingly submitting incorrect data is grounds for
dismissal. This can be achieved using BADI
Features:
 BADI's are Object Oriented
 They can be implemented multiple times
 It does not require SAP Software Change Registration
 No effect on release upgraded on the functioning of BADI's

Define and Implement a BADI


This involved three steps

Step 1 Creating BADI Definition : Transaction SE18.


Step 2 Define BADI interface: Transaction SE19

Step 3 Define a class implements the interface : During implementation


creation, a class for implementing the enhancement's interface is also created

You might also like