SAP CALL METHOD METH SUPER ABAP Statements

Get Example source ABAP code based on a different SAP table
  


• super-> ABAP_METHOD_CALL

super->meth( ... )

Short Reference


ABAP Syntax ... super->meth

| super->constructor ... .

ABAP_ALTERNATIVES:
1 ... super->meth ...
2 ... super->constructor ... .

What does it do? This special form of specifying methods statically can be used in methods of subclasses to call the implementation of a method with the same name in the direct superclass. The superclass is addressed using the pseudo reference super.

ABAP Alternative 1 ... super->meth ...

What does it do? Can be specified in the redefinition of the method meth in the implementation of a subclass and calls the implementation of the method meth in the direct superclass.

A method call super->meth can be used in the same operand positions and in the same syntax forms as oref->meth. The same rules apply to the passing of parameters.

ABAP Alternative 2 ... super->constructor ...

What does it do? Must be specified in an instance constructor implemented in a subclass to call the instance constructor of the direct superclasses. The following restrictions apply before the superclass constructor is called: The instance constructor does not have access to the instance components of its class. The self-reference me-> cannot be used. The static components of its class can be accessed only directly. Befor the superclass constructor is called, an instance constructor cannot be exited using statements such as RETURN or CHECK.

After the superclass constructure has been called, the self-reference me-> can be used and instance components can be accessed.

The superclass constuctor can be called using super->constructor only as a standalone statement.

Latest notes:During the execution of a superclass constructor called using super->constructor, meth and me->meth do not address the method implementations of the subclass as may be expected, but instead address the method implementations of the superclass. The instance constructor of the superclass must be called if it is not declared explcitly. See also Inheritance and Constructors.

Return to menu