Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Calling and leaving program units →  Calling Processing Blocks →  Calling procedures →  CALL METHOD →  CALL METHOD - static 

CALL METHOD - super

Short Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


... super->meth 
  | super->constructor ... .

Alternatives

1. ... super->meth ...

2. ... super->constructor ... .

Effect

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.

Alternative 1

... super->meth ...

Effect

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.

Alternative 2

... super->constructor ...

Effect

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 constructor call super->constructor is always a standalone statement and canbe specified in a short form and a long form.


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.