
Use
CALLMETHOD ( <parameter> , <method> , <command interface> ).
This command executes a public instance method of an object. To execute a static method, use CALLSTATIC instead.
The command interface represents the interface of the method.
The parameter must have one of the following reference types:
The class of the object
The class from which the class of the object inherits
An interface that the class of the object implements
The object must have been assigned to the parameter, usually by CREATEOBJ. There is no option for specifying a target system with the CALLMETHOD command because the object only exists in the system where it was created. This system is usually assigned at the CREATEOBJ command.
Example
MYOBJECT is an object of the class EC_APL_ECATT_OBJECT.
CREATEOBJ ( MYOBJECT , MYOBJECT_CO_1 ).
CALLMETHOD ( MYOBJECT , GET_ATTR , GET_ATTR_1 ).