Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SmartForm Calculations

Former Member
0 Likes
2,312

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?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,599

Janice,

I'm pretty sure that is just a warning, so don't let it worry you too much.

6 REPLIES 6
Read only

Former Member
0 Likes
1,599

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.

Read only

Former Member
0 Likes
1,600

Janice,

I'm pretty sure that is just a warning, so don't let it worry you too much.

Read only

0 Likes
1,599

It was just a warning .... thx very much!!

Read only

Former Member
0 Likes
1,599

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.

Read only

sushant_singh
Participant
0 Likes
1,599

u can do it using program lines.create them n do ur calculations here.

Read only

former_member480923
Active Contributor
0 Likes
1,599

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