Entering content frameProcedure documentation Generating Statistics Locate the document in its SAP Library structure

Use

You generate statistics to enable you to display data in a summarized form. The following diagram shows a statistic for sales per airline carrier from the flight connections example.

This graphic is explained in the accompanying text

Prerequisites

You are assigned to a user group, QD, for example.

Procedure

Proceed as follows to generate the statistic shown above:

  1. Create a new query (S1) for the DEMO_FLBOOKING (flight bookings) InfoSet.
  2. Specify a title, the format, and some notes.
  3. Click on the Next Screen This graphic is explained in the accompanying text function to get to the Field Groups Selection screen, and add the Flight Plan and Flight Table field groups.
  4. Click on the Next Screen This graphic is explained in the accompanying text function to get to the Field Selection screen, and add the Carrier ID and Total number of confirmed bookings fields.
  5. Click on the Statistics pushbutton to switch to the Statistics series of screens.
  6. You determine the statistics in this series of screens. Each statistic must have its own unique title, since you may generate several statistics.

  7. Specify the sequence in which you want to output the fields and state whether you want them to be sorted in ascending or descending order.
  8. Totals are always calculated for numeric fields. You can therefore determine average values, the number of selected records, and the percentage share.

    This graphic is explained in the accompanying text

    For more information on sums in statistics and ranked lists and how to convert them, see Structure linkSums and Conversion.

  9. Use the Next Statistic function to create an extra statistic for the same query.
  10. You can define up to 9 statistics for each query.

    You create this second statistic definition on the Statistics 2 screen.

  11. Give all the fields the same value as in statistic 1 and type 3 into the Rnd column.
  12. The annual sales in DM were output in the first statistic. Placing a 3 in the Rnd column rounds the figures to the nearest thousand.

  13. Use the Test This graphic is explained in the accompanying text function to test the query.

The statistics are displayed one after the other.

After the statistics, you get an overview stating which currency conversions were performed, as well as the date and exchange rate on which the conversions were based.

The overview also provides information about quantity conversions and the conversion factor.

Additional Functions

Lead columns

Every statistic has lead columns. They are determined by the query itself. The Key color attribute is assigned automatically to all non-numeric fields. When you scroll horizontally, these fields always remain visible on the screen.

Subtotal

See: Structure linkSorting: Example 1

New page

See: Structure linkSorting: Example 2

Output length

When you define statistics, you can change the output length of the fields. This may be necessary, for example, when overflows occur as a result of summing numeric fields. To do this, specify the desired output length in the column Len on the Statistic Structure screen.

 

 

Leaving content frame