on 11-07-2008 2:18 PM
Hi all,
I want to do subtotal on every page and on last page there is grand total.
Any suggestions welcome,
Regards,
Hi All,
How to add event in smart forms.
Also my subtotal is not getting displayed correctly if one item is getting extended to the next page.
Please suggest.
jignasa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Navdeep ,
Here's wat you can try on your form.
the logic is simple..
if your &nextpage& = 0
that becomes your last page wher you have to print your grand total .
else .
you have to find out the subtotal .
Sample :
/: if &nextpage& = 0
: 'Grand Total'
/: Else
: 'Sub total'
/: Endif
Hope it helps!
Much Regards ,
Amuktha .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Navdeep,
Refer the standard form for the subtotals and grand total :
SF_subtotals
SF_totals
Regards,
Sravanthi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hemal,
Please let me know the solution . i m facing the same problem but not able to solve it.
Thanks
Jignasa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi SAPBIES,
There is other method to get sub-total on the page.
Please let me know if this post is still unresolved then i will give my solution.
Thanks,
Hemal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Subtotal on every page can be done :
In the main window --> In the table --> footer area --> create the text node for the subtotal.
Grandtotal:
Create the secondary window after the table and in that create the text node for the grand total and display.
Regards,
Sravanthi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Declare the variables for your subtotals and display them in all pages,
and add all your local variables and the final result you display in the Grand Total of your page.
Still not clear means revert back more precisely how many pages and what are fields that you are using etc.
Cheers!!
VEnk@
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I think u need to create a new footer window type VAR where u print the subtotal and grand total:
The grand total will be print as soon as the last page will be printed:
IF &NEXTPAGE& = '0'.
-
> GrandTotal
ELSE
-
> Subtotatal
ENDIF.
U can also see the help (help.sap.com):
Assume that for a multiple-page invoice, you want to print the current total as carry forward amount or subtotal on the current page and on the subsequent page. However, the carry forward amount is incorrect or missing.
The following causes are possible:
* You do not use program symbols with Dictionary reference for totalling.
* You place the carry forward amount into the BOTTOM area. SAPscript processes the BOTTOM area at the beginning of a page; therefore it is not suited for carry forward amounts.
* If you place the carry forwards amount into the TOP area of the main window on the subsequent page, the carry forward amount may be higher than it should be: This happens if the last part of text of the previous page does not fit onto the page, but the text is held together, for example, by a PROTECT command. In this case, a local text symbol must receive the carry forward amount.
You must place the carry forward amount on the current page into a window of type VAR. On the subsequent page, use a local text symbol to print the amount in the TOP area of the main window:
1. At the beginning of the form main text (before printing the first text element), define the amount variable and the total variable (both must be program symbols or Dictionary amount fields).
In the example below, we use the SUMMING command to determine that for each output of &SUMTAB-AMOUNT& the system automatically sums up the amount in the total variable &SUMTAB-TOTAL&. At the end of the page, &SUMTAB-TOTAL& contains the carry forward amount of the current page or the grand total, respectively.
In this example, we also define a local symbol &LASTPAGE& to print the grand total on the last page.
/: SUMMING &SUMTAB-AMOUNT& INTO &SUMTAB-TOTAL&
/: DEFINE &LASTPAGE& = u2018 u2018
2. At the end of the form main text (when printing the last text element of the main window), set the local textsymbol &LASTPAGE& to a different value, such as u2018Xu2019:
/: DEFINE &LASTPAGE& = u2018Xu2019
3. To print the carry forward amount in the TOP area of the subsequent page including the pre-text 'Carry forward' and a tab, we use the local text symbol &CARRY. The corresponding text element is also defined in the main window:
/E CARRY
* &u2019Carry forward:,,u2019CARRY&
(CALL FUNCTION WRITE_FORM EXPORTING ELEMENT = u2018CARRYu2019
TYPE = u2018TOPu2019)
4. Define the carry forward window on the current page as type VAR and position it at the end of the main window of the page. Print the carry forward amount there and define the local text symbol &CARRY& to print the amount again in the TOP area of the subsequent page. Use the local text symbol &LASTPAGE& to print the grand total on the last page. The carry forward window then contains the following text (define it as paragraph T1 with tab):
/: IF &LASTPAGE& = u2018Xu2019
T1 <H>Grand total:,,&SUMTAB-TOTAL&</>
/: ELSE
T1 <H>Carry forward:,,&SUMTAB-TOTAL&</>
/: DEFINE &CARRY& = &SUMTAB-TOTAL&
/: ENDIF
Max
Edited by: max bianchi on Nov 7, 2008 5:05 PM
30 - Subtotal Page 1 of 2 continued..
create sepe text for above one and in condition tabof text
click the -
>only before the end of main window
19 - Subtotal Page 2 of 2
49 - grand total
create sepe text for above one and in condition tabof text
click the -
> only after end of main window..
here text will trigger as per the condition...
Hi
Where?
Max
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Want to print the subtotal at end of each page and grand total at last page .
There is main window which has table loop so as soon as this loop continues the subtotal prints eg: shown below
Page 1
<Some windows>
<Main Window>
- Table Loop
- Sno Qty Material
1 10 M1
2 20 M2
-
Subtotal 30
-
Page 2
- Sno Qty Material
3 10 M3
4 3 M4
5 8 M5
-
Subtotal 21
-
-
Grand total 51
-
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.