Difference Between Changing
And Using
Changing and Using are pass by reference only but the difference is: When you use USING the value which you assign as a Formal value will not effect the Actual value. But when we use CHANGING - The Formal value will overwrite on the Actual value. Formal value is the value which you assign in the Subroutine. It creates the copy of the VARIABLE. Actual value is the value which you assign outside of the Subroutine. EX: DATA V TYPE I VALUE 20 . (HERE V = 20 IS AN ACTUAL VALUE .)
*FORM ABC USING P_V .
HERE THE OUTPUT COMES LIKE THIS FOR USING .
OUTPUT FOR CHANGING.
While USING the VARIABLE value stores in a copy of the ACTUAL VARIABLE'S . When you use CHANING it STORES in the address of the ACTUAL VARIABLE .
Get help for your ABAP problems
ABAP Books
More ABAP Tips
SAP Basis, ABAP Programming and Other IMG Stuff http://www.erpgreat.com All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|