SAP BADI ENHANCEMENT



Get Example source ABAP code based on a different SAP table
  



Enhancements Using BAdIs
BAdIs are part of the enhancements made available by the ABAP Enhancement Framework .
BEGIN_SECTION VERSION 5 OUT They are created in the Enhancement Builder.
END_SECTION VERSION 5 OUT BAdIs, together with their calling positions in ABAP programs, form explicit enhancement options of these programs and are assigned to enhancement spots.
If BAdIs and their calling positions are defined in a system, enhancements can be made in follow-on systems by creating BAdI implementations in these systems. A BAdI implementation consists mainly of a BAdI implementation class whose instances enhance the functions of an ABAP program at runtime in the form of an object plug-in. In the ABAP Enhancement Framework, a BAdI implementation is an enhancement implementation element and is administrated by enhancement implementations.
A BAdI consists mainly of a BAdI interface that contains the declaration of BAdI methods, and a set of filters. The filters enable certain BAdI implementations to be selected for use. The following settings can be made in the definition of a BAdI, in addition to the selection of the BAdI interface :
Whether a BAdI is intended for single or multiple use. If a BAdI is intended for single use, only a single BAdI implementation can be used in an ABAP_ISESS , and one BAdI implementation must be available for each use.
A fallback BAdI implementation class can be specified to be used if no BAdI implementation matches the filter conditions.
A BAdI can be defined as context-free or context-dependent. This setting controls the instantiation of the object plug-ins. In context-free BAdIs, it is possible to define whether an object plug-in can be created only once or multiple times within an ABAP_ISESS . In context-dependent BAdIs, the object plug-ins are linked with a context object.

BEGIN_SECTION VERSION 5 OUT Unlike the previous classic BAdIs that were processed directly in the BAdI Builder, the
END_SECTION VERSION 5 OUT BAdIs of the ABAP Enhancement Framework are supported by the ABAP runtime framework by the following ABAP statements:
GET BADI Creates a BAdI object as a handle for object plug-ins.
CALL BADI Calls BAdI methods in object plug-ins.
The BAdIs of the ABAP Enhancement Framework are also freely switchable using switches from the Switch Framework.



Latest notes:

For a BAdI that is intended for single use, it is best to always specify a fallback implementation class and to implement it in the same system as the BAdI.
The implementation of the BAdI methods of a BAdI interface can be made optional , like any other interface method, by using the addition DEFAULT.
See also the documentation Enhancement Framework in SAP Help Portal.
NON_V5_HINTS
For AMDP procedure implementations , special AMDP BAdIs are available. These apply the effect of the switches from the Switch Framework to the implementation of database procedures in the current database.
ABAP_HINT_END