cancel
Showing results for 
Search instead for 
Did you mean: 

Error on Subtotal in Each Page ?

Former Member
0 Kudos

Hi all,

I have problem in displaying subtotal on each page, the problem is that the sub-total takes sum of all line items of the current page plus the first line item of the next page. I tried changing page initialise counter, increase counter etc but nothing

working.

smartform design :

Main Window : inside main window -

Table 1 (here no internal table) -


> Main Area -


> i created a loop.

LOOP ( here internal table present ) ->FOLDER(page protected)--> item tab line & another tab line

What can be done to solve this problem ?

Thanks,

Siva

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I think, u r printing the subtotal after summing the 1st row of 2nd page. may be u can try like below:

try to print the subtotal in 'TABLE FOOTER'.

Hope it helps!!

Regrds,

Pavan

Former Member
0 Kudos

Hi,

My code:

loop at itab into wtab.

subtotoal = wtab + subtotal.

endloop.

in the footer display subtotal.

so in the first page - first page sub total.

in second page - first page + second page subtotal and so on..........

Thanks,

Siva

Former Member
0 Kudos

Hi Siva, I think the issue what you have put over here is very similar to the wiki which is there in SDN. Just go through it, it will resolve the issue i think. Wiki [Subtotal in Smartforms|https://wiki.sdn.sap.com/wiki/display/ABAP/SUBTOTALINSAP+SMARTFORMS] Regards Sarves

Former Member
0 Kudos

Hi,

Thanks for your reply. events no where related to my code, what i need is to display subtotals on each page.

Thanks,

Siva