‎2006 Oct 27 1:44 PM
In perform statement, why do we need to use the using & changing statement.
Regards,
Johnn.
‎2006 Oct 27 1:45 PM
You dont.
But it is used to pass parameters. You can use it to run the same code for different data.
‎2006 Oct 27 1:47 PM
Ji Johnn,
using - the fields which you are going to use in your perform.
Changing - the fields which you are going to change the values of the fields.
-Anu
‎2006 Oct 27 1:47 PM
It depends on your requrement.
If you want to passteh variable as read only then use USING clause and if you want the variable to be read/ write one then you can use Changing clause.
Using changing clause you can retireve values from performs. that is pass a vriable as changing and assign value to it in FORM then you can read the same variable in calling routine.
Hope this helps
‎2006 Oct 27 1:50 PM
Hi,
perform can be written without using and changing options.
if you write a perform with using and changing parameters it means that you are using the variables specified in using option and changing the value of the variable used in changing option.
Madhavi
‎2006 Oct 27 1:51 PM
Hi,
When you want to pass data to the subroutine then you use USING or CHANGING. the only difference between using and changing is when you pass by value.
When you are using the 'USING' and you use pass by value then the value is not returned to you.
When you use CHANGING and you use pass by value then the value is returned if the subroutine completes with out any error.
So use changing if you are passing by value and still vant to get the updated value after the routine call.
Otherwise use USING.
Regards,
Sesh