Creating A Statistics List With The Sap Query Tool


To create a statistics list report by using the SAP Query tool, you follow these steps:

1.

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

2.

Ensure that you are in the standard query area by selecting Environment, Query Areas and then choosing Standard Area (Client-Specific).

3.

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

4.

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, allowing you to save the basic formatting specifications for your query, including the name (title) and any notes you want to store for the query. The only required field is Title. Click the Save button on the toolbar.

5.

Click the Next Screen button on the Application toolbar to navigate to the Select Field Group screen.

6.

When the Select Field Group screen appears, listing all the field groups available in your InfoSet, place a check mark next to each field group whose fields you want to include in your report. (In my example, I selected all of them.) Click the Next Screen button on the Application toolbar.

7.

When the Select Fields screen appears, giving you a list of 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 buttons to navigate between all the fields. For this example, include the following fields:

  • Airline Carrier ID

  • Arrival City

  • Airfare

  • Text: Flight Class

8.

Click the Next Screen button on the Application toolbar to continue. The Selections screen appears, listing all the fields you selected on the Select Fields screen, giving you the opportunity to add fields to your report's selection screen.

9.

Add to your report's selection screen any fields you want by placing a check mark next to each field.

10.

Click the Statistics button on the Application toolbar to create a statistics list in the SAP Query tool. The Statistics Line Structure screen appears, giving you an opportunity to define your compressed list report.

11.

Use the Statistics Line Structure screen to dictate how you want your report to appear, including sequence and summing specifications. You determine the statistics in this series of screens. Each statistic must have its own unique title, because you might generate several statistics. 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. Totals are always calculated for numeric fields. You can therefore determine average values, the number of selected records, and the percentage share.

12.

Press F8 to execute the report. As with almost all other reports in SAP, upon execution, you see the report's selection screen. The selection screen gives you an opportunity to specify any criteria for the output of your report. Notice that any fields indicated on the Selections screen are included on your selection screen, under the heading Program Selections.

13.

Click the F8 Execute button on the Application toolbar to display your finished report.

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. 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.

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 appears.




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