Application Development 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: 

SmartForm Calculations

Former Member
0 Kudos

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

Former Member
0 Kudos

Janice,

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

6 REPLIES 6

Former Member
0 Kudos

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.

Former Member
0 Kudos

Janice,

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

0 Kudos

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

Former Member
0 Kudos

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.

sushant_singh
Participant
0 Kudos

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

former_member480923
Active Contributor
0 Kudos

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