GET BADI
is executed, or an object plug-in that has already been generated in
the current internal session is reused, if it is required again. An
object plug-in of this type is a singleton in terms of its BAdI
implementation class.
With the addition CONTEXT , and hence for context-dependent
BAdIs, the same object plug-ins are always used for the same content of
con . These object plug-ins are singletons in terms of their BAdI
implementation class and a BAdI context object.
If a BAdI implementation class implements multiple
BAdI interfaces and GET BADI is
executed within one internal session for several of these BAdIs, then
multiple BAdI objects can point to the same object plug-in. This enables
the sharing of data between different BAdIs. For context-free BAdIs,
this is only the case for reuse. For context-dependent BAdIs, multiple
BAdI objects from the same context can point to the same object
plug-ins.
Latest notes: The fact that object plug-ins can either be newly
generated or reused can also be expressed in terms of an object plug-in
being stateful or stateless with reference to a BAdI or a context.
The tag interface IF_BADI_CONTEXT can be implemented by any
class. Possible applications range from the implementation in a local
class without other components that have the sole purpose of enabling
internal program context administration for BAdIs, to the implementation
in a global application class in which the objects are specifically
enhanced.
Runtime Exceptions
Catchable Exceptions
CX_BADI_CONTEXT_ERROR
Reason for error: A context error has occurred in the dynamic variant of
the statement.
CX_BADI_FILTER_ERROR
Reason for error: Incorrect information was specified regarding the BAdI's
filters in the dynamic variant of the statement.
CX_BADI_INITIAL_CONTEXT
Reason for error: The reference variable declared after CONTEXT is
initial.
CX_BADI_MULTIPLY_IMPLEMENTED
Reason for error: Multiple BAdI implementation classes were found,
although the BAdI is defined for single use. Subclass of
CX_BADI_NOT_SINGLE_USE .
CX_BADI_NOT_IMPLEMENTED
Reason for error: No BAdI implementation class was found, although the
BAdI is defined for single use. Subclass of
CX_BADI_NOT_SINGLE_USE .
CX_BADI_UNKNOWN_ERROR
Reason for error: The BAdI declared in the dynamic variant does not exist.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved