ABAP ABAP Objects Method with returning parameter


Example

Class implementation:

CLASS lcl_abap_class DEFINITION.
  PRIVATE SECTION.
    METHODS method1 RETURNING VALUE(rv_string) TYPE string.
ENDCLASS.

CLASS lcl_abap_class IMPLEMENTATION.
    METHOD method1.
        rv_string = 'returned value'.
    ENDMETHOD.
ENDCLASS.

Method call example:

lv_string = method1( ).

Note that parameters declared with RETURNING are passed by value only.