parameter passing - USING

This question is answered

in parameter passing, if USING and CHANGING serve the same purpose (see my previous post - subroutine parameter issue) and the only difference is when you use CHANGING you are going to do something with the formal parameter inside the FORM. Does this mean I cannot do operation (like addition if the formal parameter is an integer type) if USING is being used? i tried doing that and i used USING and surprisingly it allowed the operation. anyone can help me understand pls? <b>thanks!</b>

Tags:

abap

Former Member

October 06, 2007 at 12:39 PM

0
Likes

Correct Answer

Former Memberreplied

October 06, 2007 at 12:15 PM

Hi Jabbar

As I told you in the previous post both of them have same function.For better understanding we use Changing parameter.I.e. suppose you are passing two actual parameters to the subroutine.one parameter is being changed in the form and the other one is not getting changed.Now if use only USING also it will work.But for a a person checking the code he cant make ouy which one is getting changed.SO use CHANGING.

In short

The additions USING and CHANGING have exactly the

same meaning. You only need to use one or the other. However, for documentary reasons, it is a

good idea to divide the parameters in the same way in which they occur in the interface