2007 Jul 19 3:41 PM
Hi all,
Iam getting two warning saying at the lines with write statment
Statement not acessible and even when i activate it with warnings i don't get any o/p i tried in debugging after first form find_sum its just comes out
data : num1 type i ,
num2 type i.
num1 = 7.
num2 = 10.
perform find_sum using num1 num2.
form find_sum using num1 type i num2 type i.
num1 = num1 + num2.
endform.
write num1. "out put will be 7 itself.
*********changing**********
perform find_sum1 changing num1 num2.
form find_sum1 changing num1 num2.
num1 = num1 + num2.
endform.
write num1. "out put will be 17.
Thanks
Kajol
2007 Jul 19 3:44 PM
Change the code as below,
data : num1 type i ,
num2 type i.
num1 = 7.
num2 = 10.
<b>perform find_sum using num1 num2.
write num1. "out put will be 7 itself.
write num1. "out put will be 17.</b>
perform find_sum1 changing num1 num2.
form find_sum using num1 type i num2 type i.
num1 = num1 + num2.
endform.
*********changing**********
form find_sum1 changing num1 num2.
num1 = num1 + num2.
endform.
Now u will not get warnings.
Reward if helpful.
2007 Jul 19 3:44 PM
Change the code as below,
data : num1 type i ,
num2 type i.
num1 = 7.
num2 = 10.
<b>perform find_sum using num1 num2.
write num1. "out put will be 7 itself.
write num1. "out put will be 17.</b>
perform find_sum1 changing num1 num2.
form find_sum using num1 type i num2 type i.
num1 = num1 + num2.
endform.
*********changing**********
form find_sum1 changing num1 num2.
num1 = num1 + num2.
endform.
Now u will not get warnings.
Reward if helpful.
2007 Jul 19 3:44 PM
You should move the write statement directly after the perform statement and before the actual form.
perform find_sum using num1 num2.
write num1. "out put will be 7 itself.
form find_sum using num1 type i num2 type i.
num1 = num1 + num2.
endform.
2007 Jul 19 3:45 PM
hi,
U need to use the write statements within the form and endform.
Try it.
2007 Jul 19 3:52 PM