cancel
Showing results for 
Search instead for 
Did you mean: 

Smartforms - total in every page

Former Member
0 Kudos

Hi frnds,

In smartforms i need total for every page. How to print that.

In main windowi created a table . if it overflows it should print total in every page.

Need help!!!!!

Regards,

Ramya Ramasamy

Accepted Solutions (1)

Accepted Solutions (1)

former_member209818
Active Contributor
0 Kudos

Ramya,

You can do the sum inside your loop and print the same in the footer of your main window.

After printing, clear that so that for the new page it will start summation from null value again

Answers (2)

Answers (2)

former_member213851
Active Contributor
0 Kudos

Hi Ramya,

You may follow the below link :

http://wiki.sdn.sap.com/wiki/display/ABAP/Subtotal+In+SAP+SMARTFORMS

Or

To show subtotals you can use table's footer follow below procedure:

Consider we want sum of all netwr pagewise.

In the global definitions  of smartforms , declare gv_tot type vbap-netwr

Once when u create the table for line items, in that declare NETWR field also..

Then in the calculations tab

  • select operation-> total
  • fieldname-> w_vbap-netwr or if ur using intetrnal table itab-netwr
  • target fieldname: tot

In the output options of the footer there is a "PRINT Number of TIMEs" block with 2 checkboxes:

1. At page break

2. At end of table

Marking both would solve this issue.



Best Regards,

Sachin

Former Member
0 Kudos

Hi Ramya,

There is already lot of threads in this area.

http://wiki.sdn.sap.com/wiki/display/ABAP/To+get+subtotals+on+each+page+in+smartforms

Please check this.

Thanks,

Shambu