cancel
Showing results for 
Search instead for 
Did you mean: 

sum in smartform

Former Member
0 Kudos

how can i do total in smarform

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi,

For getting a sum

1) Define a variable in the global definitions

2) Now goto the main area of the table and in the cell where you want to get the

sum you get a code for it like

v_sum = v_sum + IT_MARA-VOLUM.

v_sum is the global variable defined and it_mara-volum is the field which you want to get a sum for.

If useful reward points

Arpit

Former Member
0 Kudos

hi nidhi,

if ur total field in loop then u can do the totals in the calculation tab itself of that loop, there u just provide your fireld on which u can calculate total then this total field u can define wherever u want to display,

or if ur field in not a loop , then on that window right click select progarm lines there u can code accordingly.

regards,

seshu.

former_member196280
Active Contributor
0 Kudos

use program lines.and do your totals.

Regards,

SaiRam

Former Member
0 Kudos

hi nidhi,

for TOTAL...u must have used a LOOP or TABLE node to dispaly the data...

the only thing to dispaly the total is define a Global variable and in program lines go on passing the data in this variable...

code..

gv_var = field + gv_var. " In loop write this code lines

and display this var in AT end of that field.....

Hope this would solve ur problem...

please reward points in case useful....

regards,

Prashant

amit_khare
Active Contributor
0 Kudos

Nidhi,

In your table node you have this option under calculation tab.

Just declare the variable in the global definition of type I.

Foor loop node you have to perform it manually.

Regards,

Amit

Former Member
0 Kudos

Hi,

If you have defined a table to display your contents then you have a option to display the sum of particular field in the table.

Else if you are using a loop to display the content then you would have to define a data field where u would manually add the fileld content in every loop acess and finally display the total field in a separate window after the loop.

Regards,

Devendra