SAP CALL METHOD DYNAMIC ABAP Statements



Get Example source ABAP code based on a different SAP table
  


ID CALL-METHOD
• CALL METHOD ABAP Statement

CALL METHOD
Short Reference

ABAP_SYNTAX
CALL METHOD dynamic_meth ${ parameter_list
$| parameter_tables $}.

What does it do?
This statement calls the method specified dynamically in dynamic_meth (Dynamic Invoke). Actual parameters are assigned to the formal parameters of the method, either statically using parameter_list or dynamically using parameter_tables. The syntax of parameter_list is the same as for explicit parameter specification for the static method call.
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:

In the dynamic method call, the parameters are not passed in parentheses. The syntax of the dynamic method call is like that of a function module call.
The statement CALL METHOD should now only be used for the dynamic method call. It is unnecessary, and therefore obsolete, for the static method call.
NON_V5_HINTS
ABAP_HINT_END