cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding totals in smartforms

Former Member
0 Kudos

I am getting data into an internal table from print program. I am displaying that internal table data in the form, but I want to do sum for that internal table data and display it in each page, How can I acheive it please guide me its urgent requirement?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You must be displaying this in a table

and in table if you see there is a tab calculations

here you give your field name target field name and select sum there.

let your target field be variable that you declare in globally in form

insert this target variable in that cell where you want to see total.

this will help u in printing totals

here operation is sum and time is after loop.

Edited by: Swetha on Jul 16, 2008 4:21 PM

Former Member
0 Kudos

I tried as you said but I am unable to see the totals

Former Member
0 Kudos

once done he totals

go to the cell where you wanted to print the total

if you wanted in your footer then if you right click footer select table line

insert your line there

and right click on your cell

create text element

insert the your target variable name which you gave in the calculations tab.

Now it appears.

Former Member
0 Kudos

if still it doesnt appear better you create a loop under main area in table

you right click in main area-> create-> flow logic->loop.

Here in calculations repeat steps.

insert all your cell rows of table under this loop.

In footer do what i mentioned.

this will help.

Former Member
0 Kudos

Hi Swetha,

Thank you for giving the solution

but I want to print the totals at the end of each page display Carry forward and at last I have to print grand totals how to achieve it .

Former Member
0 Kudos

1)TABLE>footer>inset a line display the variable(total u r using).

2)here after the the printing the total..->create a program lines> cleat the v_tot...

3) Reason :. u want to display only the total value which are displaying in the current page

after printing this v_tot

clear this

so that in the next page it start totaling the freshly

Refer this link.

http://help.sap.com/saphelp_nw04/helpdata/en/55/610e2ab57911d4b62c006094192fe3/frameset.htm

It is very useful.

Edited by: Swetha on Jul 16, 2008 4:49 PM

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

To get the totals in the smartforms, write program lines in the end of the body section of the table node.

Then add the relevant fields and store them in a structure created in the smartform of the same type of the table.

check the footer at page break in the events tab of the table node and display the above fields for showing the totals in each page.

To get sub totals on each page use the way as explained above and clear it later.

To get the Grand total add the sub total each time to another variable and print it separately just below the table node.

Regards,

Ram

bpawanchand
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi,

To get the totals in the smartforms, write program lines in the end of the body section of the table node.

Then add the relevant fields and store them in a structure created in the smartform of the same type of the table.

check the footer at page break in the events tab of the table node and display the above fields for showing the totals in each page.

Regards,

Ram