ABAP Keyword Documentation →  ABAP − Reference →  Enhancements →  Enhancements Using BAdIs → 

CALL BADI  Syntax Diagram

Short Reference

Syntax

CALL BADI { badi->meth         parameter_list }
        | { badi->(meth_name) {parameter_list
                              |parameter_tables} }.


Effect

Calls a BAdI method. The statement has a static and a dynamic variant. In both variants a BAdI reference variable must be specified for badi.

With regards to the addressing of BAdI methods, the BAdI reference variable behaves like an interface reference variable with the static type of the affected BAdI interface. A BAdI method declared as a component of the corresponding BAdI interface is addressed directly using its name. BAdI methods declared in component interfaces of the BAdI interface can be addressed using the interface component selector or any alias names.

The additions parameter_list or parameter_tables assign actual parameter to the formal parameters of the BAdI method or handle non-class-based exceptions exactly as described in Method Call. The exceptions that can occur in dynamic accesses are also the same as those of CALL METHOD.

The effect of the statement CALL BADI is that the specified method is called in all object plug-ins to which the BAdI object referenced by the badi refers.

If a method is added to a BAdI afterwards, it can be missing in a BAdI implementation. In this case the call is executed as if the method existed with an empty implementation. Actual parameters that are bound to EXPORTING or RETURNING parameters passed by value are initialized. All other actual parameters remain unchanged.

System Fields

With a regular method call, the system field sy-subrc is either set to 0 or, when handling non-class-based exceptions, it is set to the value specified after EXCEPTIONS.

Notes

Exceptions

Catchable Exceptions

CX_BADI_INITIAL_REFERENCE

CX_SY_DYN_CALL_ILLEGAL_METHOD