‎2007 Mar 22 11:02 AM
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.
‎2007 Mar 22 11:55 AM
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
‎2007 Mar 22 11:55 AM
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