code pal for ABAP > Documentation > Prefer RETURNING to EXPORTING
This check searches for methods in ABAP objects that have only a single exporting parameter.
Change the exporting parameter to a returning parameter, if possible. This may not be possible when the exporting parameter is not fully typed (i.e. at least partly generic) as returning parameters must be fully typed.
In exceptional cases, you can suppress this finding by using the pseudo comment "#EC PREFER_RET
which has to be placed after the method declaration:
METHODS get_name EXPORTING result TYPE string. "#EC PREFER_RET
Before the check:
METHODS get_name EXPORTING result TYPE string.
After the check:
METHODS get_name RETURNING VALUE(result) TYPE string.