SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software
Development resources, articles, tutorials, code samples, tools and downloads for SAP HANA and ABAP, HANA Database, SQLScript, SAP UI5, Screen Personas, Web Dynpro, Workflow

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.
Code

And the update command which modifies the structure field is something like below

ps_zug-istext = abap_true.
Code

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.
Code

Above code is showing how this parameter type change can be done. Or simply convert the USING to CHANGING according to your code requirements



SAP HANA and ABAP

Install SAP Free
CRM Companies List
Web Based CRM Software


Copyright © 2004 - 2021 Eralper YILMAZ. All rights reserved.