Show TOC

Options for Line Layout: Totals and CountingLocate this document in the navigation structure

Use

Integration

In the Basic List Line Structure screen, you determine the totals fields to be displayed using the options Totals and Counter.

Total

The Total option calculates the grand total of a specified numeric field. This means that each time the field is read in a dataset, the field's value is added to the sum total. The grand total is displayed at the end of the basic list. With control levels, you can also display subtotals. A subtotal contains all values of a field that are assigned to a particular control level, that is a particular sort string.

Special features:

  • If you are totaling a particular field, the total is output in the same column as the field, that is with the same output length. For this reason, the output length may be too short for the total and cause overflow. ABAP identifies these overflows by placing an asterisk in front of the affected value when it is output.

    To avoid overflows like this when outputting totals, you can simply increase the output length of the field. You do this in the Output Options field.

  • If you total values using a field that contains amounts in different currencies, the totals are created according to currency.

    Currency-specific summation also applies when you specify the output of the currency amount field without a unit. Then, several currencies (without a currency) appear in the totals lines. For this reason, you should always output currency amounts with a currency.

  • The same applies to quantity fields. If you specify summation for a quantity field, this is performed according to the units involved and results in a distribution in the totals lines.

Counting Fields

The Counter option causes the counter number for a particular field to be increased by 1 every time that this field is found within the data set currently being read. The resulting counter total is displayed in much the same manner as a grand total at the end of the basic list. Just as with sum totals, counter subtotals can be displayed for individual control levels. These counter subtotals show how many values have been assigned to a particular control level.

Note

If the both the Total and Counter checkboxes have been selected for a numeric field, the counter number is always equal to the number of addends for that field. The Counter option can also be selected for non-numerical fields.