SAP METHOD CALLS STATIC



Get Example source ABAP code based on a different SAP table
  


• ( ) ABAP_METHOD_CALL

Static Method Calls
There are two types of static method call, standalone static method calls and functional static method calls. Method chainings are a special form of static method call.
meth( ... ) - Standalone Method Call
meth( ... ) - Functional Method Call
... meth1( ... )->meth2( ... )->... - Method Chaining
BEGIN_SECTION VERSION 5 OUT
Obsolete variant of the standalone call:
CALL METHOD meth ...
END_SECTION VERSION 5 OUT
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



Runtime Exceptions



Catchable Exceptions
CX_SY_NO_HANDLER
See Class-Based Exceptions in Procedures .
CX_SY_REF_IS_INITIAL
Reason for error:
Reference variable is initial
Runtime error:
OBJECTS_OBJREF_NOT_ASSIGNED