Skip to content

ABAP Keyword Documentation →  ABAP - Release-Specific Changes →  Changes in Release 4.6A 

ABAP Objects - Dynamic Method Calls in Release 4.6A

In Release 4.6A, the kernel functions of ABAP Objects are enhanced by dynamic method calls (or dynamic invoke).

Dynamic method call

In addition to the old static access, methods can now also be addressed dynamically using the usual ABAP parenthesis semantics.

  • Calls an instance method meth:
    CALL METHOD ref->(f)
  • Calls a static method meth:
    CALL METHOD class=>(f)
    CALL METHOD (c)=>meth
    CALL METHOD (c)=>(f)
  • Calls a standalone method meth:
    CALL METHOD (f)
    CALL METHOD ME->(f)

f and c are fields containing the name of the method meth or class class.

In contrast to subroutines and function modules, the actual parameters can also be passed dynamically in dynamic method calls.

Other versions: 7.31 | 7.40 | 7.54