What does it do? Both statements have the same semantics and call the method that is specified statically by the name static_meth. The first statement prefixes the standalone method call with a CALL METHOD. The second statement does not have any parentheses for passing values to the parameter interface. Instead, either an explicit parameter list is specified or no parameter list at all
If CALL METHOD is used for the standalone method call, nochained method calls are possible and the operators NEW and CAST cannot be used to specify the method.
Latest notes:CALL METHOD is no longer recommended for static method calls. It is not necessary to prefix the recommended syntax with CALL METHOD since this would make programs harder to read. The syntax without parentheses is based on function module calls and is obsolete. The syntax involving parentheses, however, standardizes both standalone and functional method calls.
The statement CALL METHOD is now only intended fordynamic method calls and distinguishes them clearly from static calls.
Example ABAP Coding The three method calls in the following source code have the same meaning. The first two calls are the obsolete variants with CALL METHOD: one without parentheses and one with. The third call is the recommended variant, without CALL METHOD. CLASS c1 DEFINITION. PUBLIC SECTION. CLASS-METHODS do_something IMPORTING p1 TYPE i p2 TYPE i EXPORTING p3 TYPE i p4 TYPE i RETURNING VALUE(r) TYPE i. ENDCLASS.
CLASS c1 IMPLEMENTATION. METHOD do_something. ... ENDMETHOD. ENDCLASS.