Skip to content

ABAP Keyword Documentation →  ABAP − Short Reference 

METHODS - Short Reference

Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


METHODS meth [ABSTRACT|FINAL] 
            |[DEFAULT IGNORE|FAIL]
             [FOR EVENT evt OF {class|intf}]
  [ IMPORTING {{VALUE(p1)|REFERENCE(p1)|p1} typing [OPTIONAL|DEFAULT def1]
               {VALUE(p2)|REFERENCE(p2)|p2} typing [OPTIONAL|DEFAULT def2]
               ... }
              [PREFERRED PARAMETER p] ]
  [ EXPORTING {{VALUE(p1)|REFERENCE(p1)|p1} typing
               {VALUE(p2)|REFERENCE(p2)|p2} typing
              ... } ]
  [ CHANGING  {{VALUE(p1)|REFERENCE(p1)|p1} typing [OPTIONAL|DEFAULT def1]
               {VALUE(p2)|REFERENCE(p2)|p2} typing [OPTIONAL|DEFAULT def2]
              ... } ]
  [ RETURNING {VALUE(r)} typing ]
  [{RAISING exc1|RESUMABLE(exc1) exc2|RESUMABLE(exc2) ...}
  | {EXCEPTIONS exc1 exc2 ...} ].

Effect

Declares an instance method meth in the declaration part of a class or in an interface.

Additions