ATC Check: Do not modify a USING reference parameter
In a recent ABAP Test Cockpit ATC check I see "Do not modify a USING reference parameter. Instead, define the parameter as a USING-VALUE(...) or CHANGING parameter." message. This ATC error occured in an ABAP program form routine where a field of the form routine input parameter of a structure type is modified.
I had following form routine definition in the ABAP report that I executed ATC check.
FORM f_text001 USING ps_zug TYPE ty_zug.
And the update command which modifies the structure field is something like below
ps_zug-istext = abap_true.
As the ATC error message informs the USING parameter should not be modified.
Do not modify a USING reference parameter.
Instead, define the parameter as a USING-VALUE(...) or CHANGING parameter.
If the update is required, it is better to change the form routine USING parameter to CHANGING parameter in code.
Or instead of USING parameter, the form routine parameter type could be changed as USING VALUE().
FORM f_text001 USING VALUE(ps_zug) TYPE ty_zug.
Above code is showing how this parameter type change can be done. Or simply convert the USING to CHANGING according to your code requirements