ARTICLE
Return Values of Functional Methods
The return value of a functional
method is always fully typed and always passed on as a value. An
actual parameter can be appended to the return value as follows:
Method call with the addition
RECEIVING
If an actual parameter is specified explicitly after RECEIVING ,
this does not have to comply with the
general typing rules for typing the formal parameter; instead, it is
enough if the formal parameter can be converted to the actual parameter
in accordance with the conversion rules .
Specification of the method at an operand
position
If a function method is used at an operation position, the return value
is used like a data object whose data type is determined by the full
typing of the return value (a type-compatible actual parameter is
implicitly associated with it). Checking of this typing is not necessary
(or is always successful). An error always occurs, however, if the
typing of the return value does not match the
operand type .
Note
If reference variables are returned using RECEIVING , an
up cast is possible, but a
down cast is not.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved