Creating a Subtotaled Statistics List with the SAP Query Tool


To create a subtotaled statistics list report with the SAP Query tool, follow these steps:

1.

Navigate to the Maintain Queries Initial screen by using transaction code /nSQ01.

2.

In the Query field, enter a name for the query you are creating (for example, DLS_Exercise_12B, where DLS is your initials) and then click the Create button.

3.

When the InfoSets of User Group ZTEST window appears, listing all the available InfoSets (that is, data sources) for your query group, select the ZTEST InfoSet and then press Enter. The Create Query Title Format screen appears. Enter a title and then click the Save button on the toolbar.

4.

To navigate to the next screen in the SAP query creation process, click the Next Screen (white navigational arrow) button on the Application toolbar. The Select Field Groups screen appears, listing all the field groups available within the InfoSet. Place a check mark next to each field group from which you want to include fields in your report (I selected them all). Click the Next Screen button on the Application toolbar.

5.

When the Select Fields screen appears, listing all the available fields within the selected field groups, place a check mark next to each field that you want to include in your report. You can use the Page Up and Page Down arrows to navigate between all the fields. For this example, include the following fields:

  • Airline Carrier ID

  • Arrival City

  • Airfare

  • Text: Flight Class

6.

Click the Next Screen button on the application toolbar to continue.

7.

When the Selections screen appears, listing all the fields you selected on the Select Fields screen, add any of the fields to the selection screen that will be presented when you execute your report. You can add any fields you want to the selection screen by placing a check mark next to each field. For this example I have not added any.

8.

Click the Statistics button on the application toolbar to create a statistics list in the SAP Query tool.

9.

When the Statistics Line Structure screen appears, define your compressed list report, as shown in Figure 12.5. 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. Indicate the Text option for each of the fields. Indicate a subtotal for the Airline Carrier ID field (refer to Figure 12.5).

Figure 12.5. By activating the Su checkbox on the Statistics Line Structure screen, you can display the subtotals row as well as displaying the total.


10.

Press the F8 button on your keyboard to execute the report. As with almost all other reports in SAP, upon execution, you are presented with the report's selection screen.

11.

Click the F8 Execute button on the Application toolbar to display your finished report. Your report output should appear similar to that shown in Figure 12.6, but keep in mind that the actual values vary by organization.



Figure 12.6. If you are using currency conversions, after the statistics, you see an overview that states which currency conversions were performed, as well as the date and exchange rate on which the conversions were based.





SAP Query Reporting
SAP Query Reporting
ISBN: 0672329026
EAN: 2147483647
Year: 2006
Pages: 161

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net