2006 Jul 06 7:09 PM
I have a calculation I would like to do within my SmartForm. I know that I can do it in my print program and then pass the calculations as variables, but I would prefer to do it within my Smart Form.
Basically I have a Table in the Smart Form and I would like to keep an continuous calculation going though all the records ...
e.g. WA_MYTABLE-Field1 + WA_MYTABLE-Field2 * 100
and then at the end of the table in the footer, I would like to print the result.
I can do the calculations within the table itself by creating a Program line and doing the calculations within it and placing them into a field called MYCALC. I can even print the results with the table itself, but I cannot print the results at the end of the table in the footer area .... it says my MYCALC has no defined value.
Can anyone help?
2006 Jul 06 7:45 PM
Janice,
I'm pretty sure that is just a warning, so don't let it worry you too much.
I have a calculation I would like to do within my SmartForm. I know that I can do it in my print program and then pass the calculations as variables, but I would prefer to do it within my Smart Form.
Basically I have a Table in the Smart Form and I would like to keep an continuous calculation going though all the records ...
e.g. WA_MYTABLE-Field1 + WA_MYTABLE-Field2 * 100
and then at the end of the table in the footer, I would like to print the result.
I can do the calculations within the table itself by creating a Program line and doing the calculations within it and placing them into a field called MYCALC. I can even print the results with the table itself, but I cannot print the results at the end of the table in the footer area .... it says my MYCALC has no defined value.
Can anyone help?
2006 Jul 06 7:34 PM
Hi janice,
put the particular variable(MYCALC) in the intialization tab(input parameters) of global declarations.
Hope this would solve u r problem.
Thanks,
Vamsi.
2006 Jul 06 7:45 PM
Janice,
I'm pretty sure that is just a warning, so don't let it worry you too much.
2006 Jul 06 7:51 PM
2006 Jul 07 5:47 AM
Hi,
Check you declare your variables (a ,b ,sum like I) in global data which is in global definition?.
In global definition there is a Type you calculate your calculation such as sum = a +b
just check , you declare in Form interface you declare your internal table .than create your table on window.
Ankur Garg.
2006 Jul 07 6:02 AM
u can do it using program lines.create them n do ur calculations here.
2006 Jul 07 6:04 AM
HI
The Problem can be summarized like this.
You have defined a variable a done a calculation inside a loop whichis initialized outside the loop. Try using the Calculation Tab inside the Table and put operation = Number and Time = After loop then assign your value to your target variable and print it outside the loop in the footer.
Hope This Helps
Anirban