I try to demonstrate a CALL METHOD statement with dynamic method name on a 7.40 system. I use the following test code and get an ABAP Runtime Error in line 27. The Error Analysis in the Description of Exception states ... in the class LCL, the method "m" could not be found. But the standalone method call succeeds in calling m.
REPORT ZUTEST10.
CLASS lcl DEFINITION.
PUBLIC SECTION.
METHODS m.
ENDCLASS.
CLASS lcl IMPLEMENTATION.
METHOD m.
write / 'success'.
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
DATA oref TYPE REF TO lcl.
CREATE OBJECT oref.
oref->m( ). " works fine
DATA name TYPE c VALUE 'm'.
CALL METHOD oref->(name). " <-- Runtime Error