on 07-09-2008 9:19 AM
I have a requirement that while printing line items in Smartform I want to print page-wise totals i.e, I want to print total of the line items displayed in first page and second page should contain the totals of that page and the first page and last page should contain the grand total.
How to achieve it in the smartform?
Hi,
To print the pagewise totals:
write program lines after the end of the body section of the table to pass the table row just got processed and add the relevant field/fields.
then in the event tab of the table node check box footer at page break and also the box at end of main window.
in the footer section print the totals captured in the end of the body section.
This prints pagewise totals on each page and also at the end of table.
create another window positioning it correctly to print the grand total and make this window as Final window.
Print the total captured in the end of the body section previously
and with the conditions as below
SFSY-PAGE = 1
OR
SFSY-PAGE = SFSY-FORMPAGES.
This would print the grand total on first page and last page.
The final window is important as the final total will be processed at the end and the final window gets processed for each page in the end again.
This should surely solve your problem.
Regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
use this function module RZL_READ_DIR_LOCAL
Rgds
siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Try to use given code :
var fields = xfa.layout.pageContent(xfa.layout.page(this)-1, "field", 0);
var total = 0;
for (var i=0; i <= fields.length-1; i++) {
if (fields.item(i).name == "PRICE") {
total = total + fields.item(i).rawValue;
}
}
this.rawValue = total;
With Regards
Nikunj Shah
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi naveen,
it is possible in smartform
1. create the main window.
2. create the table.
3.loop at itab into wa_item at data level.
4. maintain the header data.
5. at the end of main area.
mantain a flowlogic .
here mantain logic as follows:
data: lv_pageno type sfsy-pagno.
6. create row type before the main area varible .
which mention the total text and the variables which hold for the total.
but main thing is put condition:
sfsy-pagno. ne lv_pageno.
sure it will work fine.
thanks
AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can do this:
1> Create a variable for summing the amount field.
2> At each loop pass you go on adding the amount.
3>At end of each page you just display the variable(where ever you are displaying it)
Reward points if helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Wherever you are printing the total value, in that particualr text element try the following :
In Conditions Tab of the same text element check the check box only after the end of main window.
Hope this will work.
Thanks.
Swati
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
In the saptechnical.com there is an example of creating the PO using smartforms.
www.saptechnical.com/Tutorials/Smartforms/PO/page1.htm - 40k
if you go through that example u can find the solution.
please reward me if helpful.
gupta
Edited by: gupta pullipudi on Jul 9, 2008 10:41 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.