‎2008 Sep 30 5:53 PM
Hi,
In the smartform
my customer has 10 records ( 1 field is amount ) of O/P in two pages.
in first page I Have 5 records and second has 5.
i want the total of amount in all the records of first page
and print in a window in the second page
How to solve this
regards
Lakshmi
‎2008 Sep 30 6:02 PM
Hi,
Create gobal variable and keep on adding amounts for all records in this variable.. Now when ever there is page change print this variable in total window and clear this variable so that it will now have total only for page two.
Hope this makes sense.
Enjoy SAP
Pankaj Singh.
‎2008 Sep 30 6:02 PM
Hi,
Create gobal variable and keep on adding amounts for all records in this variable.. Now when ever there is page change print this variable in total window and clear this variable so that it will now have total only for page two.
Hope this makes sense.
Enjoy SAP
Pankaj Singh.
‎2008 Oct 01 10:48 AM
‎2008 Oct 01 10:52 AM
hey,
You will be looping the data in the first page then you can declare a field globally and uyou can add to that thus you can print the amount in the first page.
Regards,
Midhun Abraham
‎2008 Oct 01 10:53 AM
Hi,
First create a global varibale in the global declaration part for storing the total of the fields.
Create a new window type" Final window" in the page and pass the variable in that window.
Use of Final Window :
You may want to display or query values on the first page that are determined only during processing. For example, you may want to name the grand total in the letter text of an invoice. However, this amount is determined only after listing all individual items. Or you may want to query on the first page within a condition the total number of pages, which the system calculates only after processing all pages.
In such a case, you use the final window: Processing first skips all windows of this type in the tree and works its way to the end of the tree. Only after the actual processing is finished, the final windows are processed in the order in which they appear in the tree (from top to bottom). Now any information is available that is known only at the end of the form processing.
This may be hepful. Rewards me if useful.
Regards,
Partha