Show TOC

Sorting: Example 1Locate this document in the navigation structure


  • You have defined the query S1 as described in Compiling Statistics.

  • You are in the Statistics screen sequence.


The following example defines a statistic showing sales figures for each airline carrier and flight connection. It outputs a sub-total for each airline carrier.


  1. On the Statistic Structure screen, define a statistic like the one in the following illustration:
  2. Use the Test function to test the statistic.


The following list is displayed:



By activating the Subtotal checkbox ( ST) on the Statistic Structure screen, you can display the subtotals row as well as displaying the total. When switching a sort string a sub-total line is created for this sort string respectively. The following three conditions have to be met:

  • Subtotals lines are only possible for fields by which you are sorting.

  • The fields in the statistics have to be fields with sorting. The sort sequence has to be ascending.

  • None of the subsequent fields in the statistic can have a smaller sort number.

New page (only for ABAP lists)

New Page (only for ABAP lists) You can set the option New page ( np) with sort fields. A page break is then inserted after each change of sort field. The same restrictions apply to the New page option that apply to the option Subtotal.