‎2007 Jan 16 1:30 AM
Hi all,
Is any one of them obsolete/not preferred when writing a subroutine?
Thanks,
Charles.
‎2007 Jan 16 1:32 AM
USING is preferred. CHANGING is obsolete.
USING performs both operations.
‎2007 Jan 16 1:32 AM
USING is preferred. CHANGING is obsolete.
USING performs both operations.
‎2007 Jan 16 1:51 AM
USING is preferred in subroutines.
For more info, please refer below link:
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db984635c111d1829f0000e829fbfe/content.htm
Thanks,
Santos
‎2007 Jan 16 2:36 AM
HI,
You can you any of them, but its better if you are going to pass any value to a FM and return back the changed value use it through CHANGING, if you just want to pass it to the FM, use USING.
Regards
Subramanian
‎2007 Jan 16 2:58 AM
The link provided by Santos gives the detail.
In summary:
- If the form definition has a parameter USING VALUE(p_var1) then any changes will NOT be passed back to the caller.
- Any other parameter definitions will result in changes being passed back to the caller.
- For readability, if the form is going to pass back a changed value for a parameter, then you should use a CHANGING parameter.
- The TABLES parameter is obsolete. You should use a using/changing parameter with a table type.
Regards
Michael