SAP Query Reporting in the Real World
Your First Official Report Request

Best Naming Conventions for SAP Query Reporting
1. When you create custom reports that you intend to reuse for yourself, use a naming convention such as DLS_ReportName, replacing DLS with your initials.
2. When you create custom reports that you do not intend to reuse (designed for single-inquiry lookup), use a naming convention such as DELETE_DLS01, replacing DLS with your initials. Routinely delete reports whose names have the prefix DELETE_ to ensure that your library remains clean and efficient.
3. When you create custom reports that are standards for your organization (and that will be used by multiple users), use a common prefix to identify them as major reports that can be used by anyone. For example, you could follow the convention ABC_Report04, where ABC is an abbreviation of your company's name.
SAP Query Maintenance Functions
Copying Existing SAP Queries (Same Client, Same Query Group)
Follow these steps to copy a query:
1. Navigate to the main screen of the SAP Query tool by using transaction code SQ01 and select from the list the query you want to copy (or type the query's name in the Query box at the top of the screen).
2. Click the white copy button on the Application toolbar. A dialog box like the one shown in Figure 4.2 appears.
4. When your copied SAP query appears in the same user group as the original, change the long report title (description) of the copied query to distinguish it from the original.
Copying or Moving Existing SAP Queries (Same Client, Different Query Group)
Follow these steps to copy a query to a new query group:
1. Navigate to the main screen of the SAP Query tool by using transaction code SQ01 and select from the list the query you want to copy (or type the query's name in the Query box at the top of the screen).
2. On a scrap of paper, write the name of the query and the name of the query group in which it currently resides.
3. Press Shift+F7 to view a list of all query groups to which you are assigned.
4. Double-click the query group you want to move the query to. You are now on the main screen of the SAP Query tool, and the query group is listed on the top left of the screen.
5. Click the white Copy button on the Application toolbar.
6. When a dialog box like the one shown in Figure 4.2 appears, take a look at your scrap of paper and type the query and query group names into the form.
7. Type a new name for your copied SAP query in the To Query Name box, ensuring that the Query (User) Group lists the new query group name to which you are moving the query.
8. Press Enter. Your copied SAP query, with its new name, appears in the new query group, along with the original query group.
9. Be sure to change the long report title (description) of the copied query to distinguish it from the original (as needed), and be sure to follow the naming rules discussed earlier in this chapter when naming the copied query
10. If you want to move and not copy a query, return to the original query group by pressing Shift+F7 and then delete the copied query as described in the following section.
Deleting SAP Queries
To delete an SAP query, follow these steps:
1. Navigate to the main screen of the SAP Query tool by using transaction code SQ01 and select from the list the query you want to delete (or type the query's name in the Query box at the top of the screen).
2. Select the trash can Delete button on the Application toolbar (see Figure 4.3).
Working on Your Existing
Now that you have learned how easy it is to create queries, copy them, and delete them, you need some real-world practice with editing and making changes to a query that already exists. Here is your opportunity to practice receiving report requests, performing maintenance, and editing them.
As your first exercise, create an SAP query from scratch and name it DLS_Query_03 (replacing DLS with your initials). The query should contain the following output: flight class, airline carrier ID, arrival city, maximum capacity, plane type, and airfare. Your finished output should be similar to what is shown in Figure 4.4.

Navigating Through an Existing SAP Query
After a query is created, quite often you need to return to it and make modifications. You have a couple options for editing existing queries and the related navigation:
- You can navigate to the main screen of the SAP Query tool by using transaction code SQ01 and select from the list the query you want to copy (or type the query's name in the Query box at the top of the screen).
- You can click the Change button to open your existing SAP query for editing. You are then presented with the first of the five basic screens of the SAP Query tool.
- You can navigate between the screens of the SAP Query tool by using the directional arrows at the top left of the screen and by clicking the Basic List button on the Application toolbar to get to the last screen.
- You can navigate between the five basic screens of the SAP Query tool by using menu paths. From any screen in the SAP Query tool, you can select Goto, Field Selection, and then select one of the first four screens to jump directly to it. You can access the last screen, the Basic List screen, by selecting Goto, Basic
Modifying an Existing Query: Adding Fields
Now that you have mastered navigating an existing query, you can move on to the next exercise: Modify the SAP query you created in the preceding exercise (refer to Figure 4.4) by implementing the following changes: Add a Weight of Luggage field between the Plane Type and Airfare fields. Also add the Flight Date and Destination Airport fields at the end of the report. Your finished output should appear similar to Figure 4.5.

Now that you have finished editing your query, you can move on to your next exercise: Modify your query by removing the output of the Flight Class, Airline Carrier ID, and Arrival City fields, but continue to indicate that you want to sort on the Flight Class field (see Figure 4.6). Your finished output should look similar to what is shown in Figure 4.7.
Figure 4.6. You use the Basic List screen of the SAP Query tool to define the report output.Figure 4.7. My sample report output when displayed in the SAP List Viewer auto-sizes each column to fit its contents.
ไม่มีความคิดเห็น:
แสดงความคิดเห็น