Skip to content

ABAP Keyword Documentation →  ABAP - Short Reference 

CALL METHOD - Short Reference

Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax Forms

Static form

[CALL METHOD] {meth
              |oref->meth
              |super->meth
              |class=>meth}( { }
                           | { a }
                           | p1 = a1 p2 = a2 ...
                           | {   [EXPORTING p1 = a1 p2 = a2 ...]
                               {{[IMPORTING p1 = a1 p2 = a2 ...]
                                 [CHANGING  p1 = a1 p2 = a2 ...]}
                               | [RECEIVING r  = a ]}
                                 [EXCEPTIONS [exc1 = n1 exc2 = n2 ...]
                                             [OTHERS = n_others]] } ).

Dynamische Form

CALL METHOD {(meth_name)
            |oref->(meth_name)
            |(class_name)=>(meth_name)
            |class=>(meth_name)
            |(class_name)=>meth}
  [PARAMETER-TABLE ptab]
  [EXCEPTION-TABLE etab].

Effect

Calls a method. In the static form, all forms of the parameter list can be placed in brackets; in bracketed parameter lists, you can omit CALL METHOD. In the dynamic form, certain static specifications are possible.

Additions

Specify the Method

Specify the Parameters

Specify the Exceptions

  • EXCEPTIONS
    Allows handling of non-class-based exceptions:

    exc1 = n1 exc2 = n2 ... - Assigns to the classic exceptions
    exc1, exc2, ... numbers n1, n2, ... for the return value sy-subrc.

    OTHERS = n_others - Assigns to all not explicitly named exceptions a number n_others for the return value sy-subrc.

Specify Parameters and Exceptions in Tables

  • PARAMETER-TABLE ptab
    Assigns dynamic actual parameters to formal parameters using an internal table ptab of type ABAP_ PARMBIND_TAB.
  • EXCEPTION-TABLE etab
    Assigns dynamic return values to non-class-based exceptions using an internal table etab of type ABAP_EXCPBIND_TAB.