on 02-16-2007 3:15 PM
Dear all,
first I want to mention I already scanned the forum for my print problem, but didn't find a concrete solution to my problem.
Before you reply, please note I am working in SAP release 4.6C .
I probably have the same problem as Maple Bautista 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).
Current settings in the smartform :
The item lines all are page protected.
In the text elements the [Only at page break] is switched off.
Unfortunately I am missing the description to the solution in the thread of Maple .
Thanks in advance for your reply in this.
Hi,
The problem you have can be caused when you add your totals. When a page-break is triggered and you use your work area and table of your items in another window it will change the data already in the work area wich would print on the next page as the first item. If you have a seperate window for your totals and loop thru items to add up, do this only after your main window has printed all the lines. Else in the initilization of the form add your totals into a variable.
Subtotals sum do that in code with you last column and not before your first column. A page break is only triggered when the system won't fit the text to print on the page. At that time it is already in your work area and will print on the next page and why if you change that values will mess up the next page first line to be printed. If you added your value to subtotal it would include the first item on the next page because that code was already executed before the page-break.
Hope this is somehow understandable and helpfull.
Regards,
Marius
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marius,
thank you for your answer. Why the subtotal print problem is happening, is clear to me at this moment, but I still have the problem of calculating the subtotal.
For now, I use a correction during page-break (if SFSY-PAGEBREAK eq 'X' ) in the footer node by subtracting the extra quantity and add the missing quantity in the header node.
Although I am not proud of this own made logic, it works up till now. Unfortunately the user found an (exceptional) error .
Therefore I have to look for a more solid program logic.
We are still working in SAP release 4.6C, but I found some information in the SAP help (for ECC 5.0) about calculating subtotal and grand total in smartform. However, it gets fuzzy at the part of the use of field GS_4NEXT_ADDITION . The explanation of delaying the calculation by using this field seems reasonable, but it is not explicit clear how the program logic in the example works in that way.
If someone knows what I mean with this SAP help and can explain it more clearly...
Thanks again !
Hi Chi Wai Cheung,
Did you solve this issue i am facing the same issue here please guide if you have got any solution.
Thanks & Regards,
Bhushan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As of release 6.10
1. Define Work Area of Interface Table (i.e. WA_T_SUMS LIKE YLIPS (type of LIPS))
2. In Smartforms Table, mark the Table Line type of the Items to NO PAGE to make sure item appears on page relevant to SumTotal.
3. Table DATA Tab (i.e. ILIPS into GLIPS)
4. Table Calculations Tab, Operation: SUM Total, Field Name: GLIPS-NETWR, Target Field Name: WA_T_SUMS-NETWR, Time: After Loop
5. WA_T_SUMS-NETWR printed in FOOTER text.
For previous releases you can use example logic of "GS_4NEXT_ADDITION" in supplied Smartform SF_TOTAL. Be sure mark your Table Item "No Page" as in 2 above.
CROSS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.