cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine end of an internal table in main window in Smart form

Former Member
0 Kudos

Hei Experts,

I've two internal tables in my smartform main window. Between these two tables, 'm giving command to go to the las page format as both the tables are to be printed on two different page formats.

It's working fine. But the problem is, AT THE END OF FIRST TABLE, I've to display 'Total/Subtotal'. Currently I've put these totals in a window and given the condition 'only on page 'NEXT_PAGE' where the first internal table is getting printed. But if NEXT_PAGE sprawls across two or more pages, these totals will appear on all such pages.

Question is, how to determine the end of the first internal table in the main window??

Plaese suggest....thnx in advance...

Regards,

Rudresh

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Resolved

Former Member
0 Kudos

Hello,

The steps you must follow are:

1. Create a table in the smartform (FIRST TABLE) to loop into the internal table with the information

2. Double-click the table just created.

3. Then go to "Calculations" tab, here you have diferent columns. If you want to calculate a total, you should fill:

Operation --> Sum Total,

Field Name --> WA-FIELDNAME (this FIELDNAME is the one that has the quantity.)

Target Field Name --> a global variable in which the total will be acummulated.

Time --> A After Loop

Reset --> - (none)

For Field Name --> - (none)

At the end of the loop you have in Target Field Name the TOTAL. If you wish to calcute subtotals base on some field, another step is needed.

I hope it will help you.

Former Member
0 Kudos

Hei Experts,

I've resolved my problem by putting the total text/summary text between the two tables in the main window itself. It's working fine....

Regards,

Rudresh