Creating A Ranked List By Using The Sap Query Tool


To create a ranked list by using the SAP Query tool, follow these steps:

1.

Navigate to the main screen of the SAP Query tool by using transaction code SQ01, select the query you want to work with (for example, DLS_QUERY_14, where DLS is your initials), and click the Change button.

2.

Navigate to the Select Field Groups screen and select the field group names that contain the fields you want to include in your report. (In my example, I selected all three.) Click the Next Screen button on the Application toolbar to access the Select Fields screen.

3.

Select the fields you want to include in your report: Airline Carrier ID, Flight Date, Maximum Capacity, and Total of Current Bookings.

4.

If the short names are not already displayed, select Edit, Short Names, Switch On/Off to turn them on. Enter the short name MAX for the Maximum Capacity field and the short name OCC for the Occupied Seats field.

5.

Create a calculated field that determines how many seats are free on each flight by taking the number of available seats (Maximum Capacity field) and subtracting the number of seats taken (Occupied Seats field). Position your cursor in the Occupied Seats field to base your calculated field on it.

6.

Select Edit, Local Field, Create. The Define Field dialog box appears. Input Free as the short name for your newly created local field and input the field description Free Seats, which will be the heading for the column in the report.

7.

Define the attributes for the new field. It should have the same attributes as the Occupied Seats field (OCC).

8.

Select the Calculation Formula option button at the bottom of the dialog box (it should be selected by default) and then enter the basic mathematical formula MAX OCC in the box to the right of it. This formula will start with the total maximum capacity for the flight and subtract the number of seats currently occupied to yield the number of available or free seats left over.

9.

Click the Continue button to close the Define Field dialog box and return to the Select Field Groups screen.

10.

Navigate to the Ranked List Structure screen by clicking the Ranked List button on the Application toolbar. The Ranked List Structure screen appears, allowing you to define your report output. Name your compressed list report Ranked_List_1.

11.

Use the Ranked List Structure screen to dictate how you want your report to appear, including rank number specifications. Assign a sequence number to each field that appears in the ranked list to determine the sequence in which they are output. Review the nine options available on this screen.

12.

Assign the sequence numbers, starting with 1 and in ascending order, without breaks. Indicate that you want to output the fields Airline Carrier ID, Flight Date, Free Seats, and Maximum Capacity. 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.

13.

Indicate that you want to rank on free seats.

14.

To execute the report and view the selection screen, press F8.

15.

Press F8 to display your finished report. Your report output should appear. Keep in mind that the actual values vary by organization.

Creating A Basic Query With The Infoset (Ad Hoc) Query Tool

To create a basic report with the InfoSet (Ad Hoc) Query tool, follow these steps:

1.

Log in to the area of your SAP client where your query reports will be created.

2.

Access the InfoSet (Ad Hoc) Query tool in one of the three possible ways:

  • Through an application-specific role, using the Easy Access menu

  • Via the SAP Query tool, by using transaction code SQ01 and then clicking the InfoSet Query button

  • Via transaction code /nPQAH

When you navigate to the InfoSet (Ad Hoc) Query tool main screen using any of these methods, you see a dialog box that prompts you to select your InfoSet (data source) from the designated environment (QUERY group).

3.

Select your InfoSet and then press Enter. The main screen of the InfoSet (Ad Hoc) Query tool appears. The main screen of the InfoSet (Ad Hoc) Query tool has three sections:

  • The actual InfoSet from which you select and choose your fields (top left)

  • A Selections section (top right)

  • A sample report display (bottom)

4.

To create an InfoSet (Ad Hoc) Query report, select the check box in the Output column next to each field you want to include in the output of your report.

5.

Notice that any field selected for layout is now displayed at the bottom of the screen (with bogus data) to assist you in seeing what your report will look like.

6.

Add fields to your Selections section (which functions as the report's selection screen) by selecting the appropriate check box in the Selection column next to each field you want to be able to select on (that is, specify) when executing your report. Any field(s) indicated for selection now appear on the top-right side of the screen. The Selections section works just as a standard selection screen works, allowing you to input values before execution to further specify your reporting output. (For example, you could specify to include only business class (Type C) flights in a report.)

7.

To proceed to your InfoSet (Ad Hoc) Query report output, click the Start Output button on the Application toolbar (or press the F8 key on your keyboard) to execute the report. By default, your report displays in the SAP List Viewer (previously known as the ABAP List Viewer [ALV]), from which you can easily drag and drop the columns and/or manipulate the look of the output.




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