Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Reg Smartforms

Former Member
0 Likes
505

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

1 ACCEPTED SOLUTION
Read only

messier31
Active Contributor
0 Likes
480

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.

4 REPLIES 4
Read only

messier31
Active Contributor
0 Likes
481

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.

Read only

Former Member
0 Likes
480

Guys more help please

Read only

Former Member
0 Likes
480

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

Read only

Former Member
0 Likes
480

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