This article will help you to create Custom BADIs in on your own with few steps.
Custom BADI:
In Standard BADIs the developer will handle only the
implementation part. The definition and BADI trigger part is already handled by
SAP.
But in case of Custom BADI the definition, trigger and implementation must be
handled by developer.
2) Create a custom BADI definition in custom enhancement spot.
4) Create any simple method in interface
5) Activate interface and go back to enhancement spot
6) Create custom enhancement implementation (SE19).
- Goto SE19 tcode and create implementation
for ZCBADI1.
As this BADI is created in newer version (after ERP 6.0) we must create BADI implementation in new BADI section using enhancement spot name.
After entering the enhancement implementation name and clicking on OK now the GUI will ask for BADI implementation name. BADI definition contains the BADI created in enhancement spot.
For classic BADIs we create BADI implementation directly using the BADI name. After 6.0 version as the BADIs are moved to enhancement spots we must create the BADI implementation from enhancement spot.
7) Provide BADI implementation name, implementation class (Naming convention should be like custom implementation class created for standard BADI ZCL_IM_* ) and select the BADI definition name. Click on OK
8) Create custom BADI implementation in same custom enhancement implementation (SE19).
Multiple implementations for the same BADI can be created if
it is multiple use BADI. We can do BADI implementations from SE18 also by just right
click on the BADI definition and click on create BADI implementation.
- Create a custom program and call BADI methods.
- Create object using GET BADI statement with object referring to BADI
- Call BADI method using CALL BADI statement.