Examples
Use
The examples show how you can use the Calculations tab of the table node to:
-
Display a grand total on values of one currency or quantity unit.
-
Calculate and display a subtotal on values of one currency or quality unit.
-
Number the items of a table consecutively and at the end display their total number.
To execute operations on values with different currencies or units, you must use program lines nodes. See also: Summing Up Different Currencies.
Prerequisites
All examples assume that you already display a table for which you now want to calculate either an additional total for a column or the number of items in the table.
The summing examples refer to a transparent table BUSINESS, whose line structure contains the following fields:
-
PRICE for the price and
-
CURRENCY for the currency.
CURRENCY is the currency field to which PRICE refers in the ABAP Dictionary.
You select the data from table BUSINESS in the application program and pass the internal table at the form interface using the parameter FT_BUSINESS. At the table node you read this internal table line by line into the work area WA_BUSINESS.