‎2007 Nov 01 1:50 PM
In Form...Endform.What is the use of changing parameters?How to use that?
‎2007 Nov 01 1:52 PM
Changing helps to change the parameter value and then use the same in main program with changed value.
Sample:
data : val1 type i value 1,
val2 type i value 0.
perform calc using val1 changing val2.
Write / : 'Changing :' , val2.
write / : 'Using :' , val1.
&----
*& Form calc
&----
text
----
-->P_VAL1 text
<--P_VAL2 text
----
form calc using p_val1
changing p_val2.
p_val2 = p_val1 + 100.
*p_val1 = p_val1 + 100.
*Since p_val1 is passed as using,the above is not *permitted
endform. " calc
This link will clear all your Doubts reagrding Perform Statement.
Have a look:
http://help.sap.com/saphelp_erp2005/helpdata/en/9f/db977635c111d1829f0000e829fbfe/frameset.htm
‎2007 Nov 01 1:55 PM
what is the difference betn changing and using(by reference) parameters in form?
‎2007 Nov 01 1:52 PM
the parameters that you paas with changing.. whatever changes you make in subroutine also get reflected in the passing parameter as well...
‎2007 Nov 01 1:55 PM
hi
good
With the PERFORM statement, you can call subroutines which are coded in the same ABAP program (internal calls), or subroutines which are coded in other ABAP programs (external calls).
You can also specify the name of the subroutine dynamically at runtime, and call subroutines from a list.
Internal Subroutine Calls
To call a subroutine defined in the same program, you need only specify its name in the PERFORM statement:
PERFORM <subr> [USING ... <pi>... ]
[CHANGING... <pi>... ].
The internal subroutine can access all of the global data of the calling program.
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db978335c111d1829f0000e829fbfe/content.htm
reward point if helpful.
thanks
mrutyun^