What does it do? Static call of a method specified as a standalone statement using the name meth>>. The parameter interface> of the method is filled with the actual parameters in the parentheses. In the first alternative, no formal parameters are supplied with actual parameters. The second and third alternatives are short forms for methods where only the input parameters are supplied with actual parameters. The fourth alternative allows all possible formal parameters to be supplied with actual parameters and non-class-based exceptions to be handled. System Fields> Each method call sets the system field sy-subrc> to 0 in the moment the method is called. Handling non-class-based exceptions> can change this value.
Latest notes: The static method call described here must not be confused with the call of static methods>. A static method call is the static specification of an instance method> or a static method. In addition, there is the dynamic method call>, for which the methods are specified dynamically. NON_V5_HINTS ABAP_HINT_END
ABAP Alternative 1 meth( ).>
What does it do? Call of the method meth>> without passing parameters. The method cannot have any or can have only optional input parameters or input/output parameters. No actual parameters are assigned to any output parameters or to a return value. BEGIN_SECTION SAP_INTERNAL_HINT Undocumented feature: The spaces after the opening and before the closing parenthesis can be omitted if the actual parameter is a text literal within quotes. END_SECTION SAP_INTERNAL_HINT
ABAP_EXAMPLE_VX5 Call of a method without parameters. ABEXA 00078 ABAP_EXAMPLE_END
ABAP Alternative 2 meth( a ).>
What does it do? This is the short form of: meth( EXPORTING> p = a ).> The method meth>> can have the following parameters:
Either exactly one non-optional input parameter p> and any number of optional input parameters
Or only optional input parameters from which p> is defined as a preferred parameter using PREFERRED PARAMETER> The value of a> is passed to the non-optional input parameter or to the preferred parameter. The actual parameter a> can be specified as a data object, a function, or an expression. The method can only have optional input/output parameters. No actual parameter is assigned to these input/output parameters, any output parameters, or return values. BEGIN_SECTION SAP_INTERNAL_HINT Undocumented feature: The space before the closing parenthesis can be omitted if the last actual parameter is a text literal within quotes. END_SECTION SAP_INTERNAL_HINT
ABAP_EXAMPLE_VX5 Call of a method with an input parameter. ABEXA 00079 ABAP_EXAMPLE_END
ABAP Alternative 3 meth( p1 = a1 p2 = a2 ... ).>
What does it do? This is the short form of: meth( EXPORTING> p1 = a1 p2 = a2 ... ).> The method meth>> can have any number of input parameters p1>, p2>, ... that are supplied with the actual parameters a1>, a2>, .... The actual parameters can be specified as a data object, a function, or an expression. The method can only have optional input/output parameters. No actual parameter is assigned to these input/output parameters, any output parameters, or return values. BEGIN_SECTION SAP_INTERNAL_HINT Undocumented feature: The space before the closing parenthesis can be omitted if the last actual parameter is a text literal within quotes. END_SECTION SAP_INTERNAL_HINT
ABAP_EXAMPLE_VX5 Call of a method with two input parameters. ABEXA 00080 ABAP_EXAMPLE_END
What does it do? Call of the method meth>> with explicit parameter passing> and the option of handling non-class-based exceptions. This format can be used to call methods with any number of parameter interfaces.
ABAP_EXAMPLE_VX5 Call of a method with explicit parameter passing. ABEXA 00081 ABAP_EXAMPLE_END