Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Sub total error in smartform

Former Member
0 Likes
374

Hi All,

I have a table in the main window of a smart form. The subtotal of the line items is printed in everypage and the grand total at the end of the main window or at the last page.

Now the problem is if there are 4 records in first page and 2 records in second page,the subtotal in the first page is picking first line item from the second page (i.e the 5th line item)and printing a wrong subtotal.

But grand total is calculated correctly.

Please let me know the solution for this.

Thanks,

Priya.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
332

Hi ,

Basically you might be doing the sub total calculation inside the loop before the funciton module which you will be calling in the program to pass values to smartform.

Just pass the values and then do the calculation before the endloop. Below i have expalined you taking scripts as an example.

See in scripts we will call write_form inside a loop.

So previously i was doing the subtotal calulation before calling the funciton "write_form".then the same error occured.

Then i have changed it like this given below.

Loop at ITAB.

Call write_form

-


-


subtotal = -


endloop.

So please let me know if you are not clear, so that i can try to explain in detail.

Thanks

Arun Kumar

1 REPLY 1
Read only

Former Member
0 Likes
333

Hi ,

Basically you might be doing the sub total calculation inside the loop before the funciton module which you will be calling in the program to pass values to smartform.

Just pass the values and then do the calculation before the endloop. Below i have expalined you taking scripts as an example.

See in scripts we will call write_form inside a loop.

So previously i was doing the subtotal calulation before calling the funciton "write_form".then the same error occured.

Then i have changed it like this given below.

Loop at ITAB.

Call write_form

-


-


subtotal = -


endloop.

So please let me know if you are not clear, so that i can try to explain in detail.

Thanks

Arun Kumar