SAP METH CALL - Reference

Get Example source ABAP code based on a different SAP table
  



meth( ... )

ABAP Reference
ABAP Code Snippet


ABAP Syntax {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]] } ).
ABAP Code Snippet

What does it do? Static method call. Specify the method: meth - Method meth of the same class. oref->meth - Instance method meth of the object referenced by oref. super->meth - Method meth with the same name in the direct superclass. class=>meth - Static method meth of the class class.

Specify the parameter: ( )
Calls a method without passing a parameter.
(a)
Calls a method while passing a single parameter a.
( p1 = a1 p2 = a2 ... )
Calls a method while passing multiple parameters a1, a2, ...
EXPORTING p1 = a1 p2 = a2 ...
Passes actual parameters a1, a2, ... to input parameters p1, p2, ...
IMPORTING p1 = a1 p2 = a2 ...
Inherits output parameters p1, p2, ... in actual parameters a1, a2, ...
CHANGING p1 = a1 p2 = a2 ...
Assigns actual parameters a1, a2, ... to input/output parameters p1, p2, ...
RECEIVING r = a
Assigns the return value r to the actual parameter a.


Specify the exceptions: EXCEPTIONS
Enables the handling of non-class-based exceptions:

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

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