2015 May 07 2:54 PM
Hi Experts,
I am having an issue with the calculation of cumulative total in each page of the smartforms.
Suppose Page 1 is having line items,
1) 1000.00
2) 2000.00
Subtotal coming as 5000. (because 1000 + 2000 + 3000 (which is in the next page) )
Expected: 3000.
Page 2 is having line items
1) 3000
2) 2000
Subtotal coming as 10000.(1000 + 2000 + 3000 + 2000 + 2000 (which is on the next page))
Expected (8000)
What i noticed while debugging is that the sum is happening including the next page first line item.
Note: v_suntotal is the field which calculates the total in every page in the smartform.
Hi Experts,
I am having an issue with the calculation of cumulative total in each page of the smartforms.
Suppose Page 1 is having line items,
1) 1000.00
2) 2000.00
Subtotal coming as 5000. (because 1000 + 2000 + 3000 (which is in the next page) )
Expected: 3000.
Page 2 is having line items
1) 3000
2) 2000
Subtotal coming as 10000.(1000 + 2000 + 3000 + 2000 + 2000 (which is on the next page))
Expected (8000)
What i noticed while debugging is that the sum is happening including the next page first line item.
Note: v_suntotal is the field which calculates the total in every page in the smartform.
2015 May 07 3:01 PM
Hi,
View this link.
https://scn.sap.com/thread/954419
http://scn.sap.com/thread/1454650
Hope it helpful,
Regards,
Venkat.V
2015 May 07 3:08 PM
I already have a look on those threads. But not able to solve my issue with those.
2015 May 07 4:20 PM
Hi P.D,
Follow This Steps for creating subtotal for each Page:
v_subtot = v_subtot + wa.
For Better Clarification Check the Below Scree Shots.
Regards ,
Surya
2015 May 07 4:39 PM
You got me wrong. I need cumulative sum.
1st page: 100
200
___
300
2nd Page 200
300
___
800
Here issue is that page breaking is not working properly. It is considering the second page 1st line item value also while summing.
2015 May 10 4:07 AM
2015 May 10 7:59 AM
Not sure how efficient this would be. but seeing that you are still stuck with same problem i can give you a trick. While processing the first page make sure that you are having a constant number of items to sum up in one page i.e. for eg if 8 items are being printed in one page then sum up the 8 items and force the smartform to next page using 'COMMAND' to trigger the next page. This way you can write logic and makes sure each page has same number of items and your subtotal would be correct.
2015 May 13 9:18 PM
Hi Syed,
It is not possible to have fixed line items. Any other solutions ? If you could suggest how to check programmatically a page break has happened or not, that would be great!
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |