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 .)
WRITE  V .
*PERFORM ABC USING V .
 PERFORM ABC CHANGING V .
 WRITE V .

*FORM ABC USING P_V .
FORM ABC CHAGING P_V .
P_V = 10 .
WRITE   P_V . 
ENDFORM .

HERE THE OUTPUT COMES LIKE THIS FOR USING .
20
10
20.

OUTPUT  FOR CHANGING.
20
10
10

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
Do you have a ABAP Question?

ABAP Books
ABAP Certification, BAPI, Java, Web Programming, Smart Forms, Sapscripts Reference Books

More ABAP Tips

Best regards,
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.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG. 
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk. 
 The content on this site may not be reproduced or redistributed without the express written permission of 
www.erpgreat.com or the content authors.