cancel
Showing results for 
Search instead for 
Did you mean: 

Incorrect Subtotal in Smartforms

Former Member
0 Kudos

Hello could anyone please help? Any feedback would be much appreciated.

I'm currently creating an invoice smartform where the subtotal is displayed at the end of each page, as well as at the top of the next page. What I basically did are the following:

1. created a global variable to store the subtotal

2. inserted a code in the main area of the table loop to add the current line item amount to the subtotal

3. placed a text element in the footer area of the table loop that will display only on page break

4. placed a text element in the header area of the table loop that will display only on page break

The curious thing is that the subtotal displayed is always one line more than what is displayed on the page. Ex. if the total line items = 15, and the number of line items displayed on the first page is 13, the subtotal amount displayed is for 14 line items.

Accepted Solutions (1)

Accepted Solutions (1)

jayanthi_jayaraman
Active Contributor
0 Kudos

HI,

Did you tried using calculation tab in table loop?

Former Member
0 Kudos

No, I'm not using the calculations tab.

I should also clarify that the loop I am using is the the loop in the table itself. I have not placed any other loops within the table, like in line field, etc.

Former Member
0 Kudos

It worked! Thank you very much.

Former Member
0 Kudos

Dear Maple,

I probably have the same problem as you with smartform, subtotal and page break for SAP release 4.6C (so no "Calculation" tabview is available in table node) :

The first page will show one item quantity too much in the subtotal (namely the qty of the first item line of the NEXT page)

and

the next page will show one item quantity too less in the subtotal (namely the qty of the first item line of the CURRENT page).

The item lines all are page protected.

In the text elements the [Only at page break] is switched off.

Could you please reply what you precisely did in order to solve this ?

I am missing the description to the solution in this thread.

Thanks in advance for your reply in this.

Kind regards

Chi

Message was edited by:

Chi Wai Cheung

Former Member
0 Kudos

Hi Chi!

Unfortunately it was the Calculations tab that did the trick for me.

Former Member
0 Kudos

i m also facing the same issue.

Can u please tell me how it worked for u??

Any help will be highly appriciated.

Answers (0)