Enter word you want search.

วันพุธที่ 4 พฤศจิกายน พ.ศ. 2552

Chapter 5. Creating QuickViews by Using QuickViewer



Understanding QuickViewer

Unlike the SAP Query tool, which is a complete reporting solution tool, the SAP QuickViewer tool, delivered with SAP version 4.6 and above, is a WYSIWYG (what you see is what you get) utility for quickly collecting data from an R/3 system. To define a report by using the QuickViewer, you simply enter texts (titles) and select fields and options to define the QuickView. With this tool, you create QuickViews, not reports. Users cannot share QuickViews as they can reports, but they can convert QuickViews to reports to use them with the SAP Query tool.

Like the other Query tools, the QuickViewer allows you to define reports without having any technical or programming knowledge. The QuickViewer is especially useful for new users and occasional system users. The QuickViewer is basically a single-screen version of the SAP Query tool. Although QuickViews are user dependent, you can convert a QuickView into a SAP Query report to make the information available to others.

QuickViews have the same functional attributes as queries. However, there are a number of differences between QuickViews and queries created using the SAP Query tool:
  • Basic lists QuickViews can define only basic lists, as opposed to the multiple-line queries and ranked or statistical lists that the SAP Query tool can create.
  • Security Security initial setup is simpler in the QuickViewer than in the SAP Query tool because no query group assignment is necessary with QuickViews.
  • User dependency Each user has his or her own personal list of QuickViews, and unless they are converted to SAP queries, QuickViews cannot be shared or exchanged among users.
  • Data source Unlike with the SAP Query tool, with the QuickViewer, you are not required to use an InfoSet. When you define a QuickView, you can specify its data source dynamically. You can use tables, database views, table joins, logical databases, and even InfoSets as the data sources for QuickViews.
  • Modes A similarity between the SAP Query tool and the QuickViewer is that each provides two modes for designing reports: a standard mode (called Basis mode) and a graphical mode (called Layout mode).
The QuickViewer emulates the SAP Query reporting tool on a single screen. It is divided into three major sections:
  • The top left lists the tables and data fields contained in the data source.
  • The bottom left is the Help application.
  • The right side of the screen is the QuickViewer main screen, where you design a QuickView. The main screen section has three tabbed sections that you use to specify a QuickView.
Creating a QuickView by Using QuickViewer

Creating a QuickView by using the QuickViewer tool is simple. You just follow these steps:

1. Navigate to the main screen of the SAP R/3 QuickViewer by using transaction SQVI (see Figure 5.1). (You can also open the QuickViewer's main screen by clicking the QuickViewer button on the main screen of the SAP Query tool or by choosing an application-specific role from the Easy Access menu.)


Figure 5.1. The main screen of the QuickViewer reporting tool looks very similar to the main screen of the SAP Query tool.


2. On the main screen, enter a name for your QuickView (for example, QUICKVIEW_1) and then click the Create button. A dialog box appears, asking you to select your data source (see Figure 5.2).


Figure 5.2. The selection of a data source at design time mirrors the process of creating a data source during configuration.


3. On the Create QuickView: Choose Data Source dialog box, insert a title (for example, Sample QuickView) and, if desired, insert comments (for example, the date it was created).

4. Identify where your data is coming from by selecting an option in the Data Source field (for example, a logical database). When you select a data source, the bottom of the screen changes to show suboptions specific to the data source (for example, a specific logical database). For this example, enter the logical database Flight Scheduling System (f1S).

5. At the bottom of the dialog box, choose to create the QuickView in Basis mode. When you are done making entries and selections in this dialog, click the green arrow Enter button.

6. Select the first tab on the main screen, the List Fld. Select tab, which lists the output fields. Select any fields on the right side of the screen, listed in the Available Fields grouping, by selecting the gray keys to the left of the field names, and then click the left-pointing single-arrow button between the two groupings. To move all fields in the data source so that they will be included in your report output, click the left-pointing double-arrow button (see Figure 5.3).


Figure 5.3. You indicate what fields you want to be output in your QuickView by using the Fields in List column section of the main screen.


7. Select the second tab, Sort Sequence, to dictate the sort order for the selected fields (see Figure 5.4). Indicate a desired order by selecting fields on the right side of the screen, in the Available Fields grouping, and then click the left-pointing single-arrow button between the two groupings. The selected fields appear in the Fields in List column, in the order in which they were selected. Use the radio buttons to the left of the fields to specify that you want the field to be sorted in ascending or descending order.

Figure 5.4. You can sort in ascending or descending order.


8. Select the third tab, Selection Fields, to indicate what fields to include on the QuickView's selection screen upon execution (see Figure 5.5). (Note that some fields already exist, as indicated by a lock icon, based on designations in the logical databasef1S in this caseselected for the QuickView.) Select fields on the right side of the screen, in the Available Fields grouping, and then click the left-pointing single-arrow button between the two groupings. The selected fields appear in the Selection Fields column. For example, Figure 5.5 shows that the Flight Class field has been added.

Figure 5.5. You can add fields to the selection screen to specify particular data upon execution.

9. Select the fourth tab, Data Source, to confirm that the QuickViewer is using the correct data source for this QuickView (see Figure 5.6).

Figure 5.6. You can display the details of your data source by clicking the Display button.


10. Note in the middle of the screen that you have different export options for the QuickView. SAP List Viewer is the default, but you can select a different option from the Export As drop-down box.
11. Click the Execute button on the Application toolbar to view the report's selection screen. If needed, further specify your selections on the selection screen.

12. Click the Execute button to see your completed QuickView, which should look similar to the QuickView shown in Figure 5.7.


Figure 5.7. The QuickView output looks similar to the output of an SAP query.


Modifying a QuickView

After you create a QuickView, only you have access to it, because it is user-dependent (unless you convert it to an SAP query). However, you can return to an existing QuickView and make changes by following these steps:

1. Navigate to the main screen of the SAP R/3 QuickViewer by using transaction SQVI. (You can also open the QuickViewer's main screen by clicking the QuickViewer button on the main screen of the SAP Query tool or by choosing an application-specific role from the Easy Access menu.)

2. Select an existing QuickView from the list (or type in its name) and then click the Change button. The QuickViewer: Initial screen appears.
3. Make any required changes to the QuickView.

4. Save your changes by clicking the Save button on the Application toolbar.


Using QuickViewer in Layout Mode

As mentioned earlier in this chapter, you can use the QuickViewer in Basis or Layout mode. Layout mode provides a graphical representation of the QuickView. To see a QuickView in Layout mode, follow these steps:
1. Navigate to the main screen of the SAP R/3 QuickViewer by using transaction SQVI. (You can also open the QuickViewer's main screen by clicking the QuickViewer button on the main screen of the SAP Query tool or by choosing an application-specific role from the Easy Access menu.)
2. Select an existing QuickView from the list (or type in its name) and then click the Change button. The QuickView main screen appears.

3. Select Goto, Layout Mode (or press F5). The screen displays graphically, as shown in Figure 5.8.


Figure 5.8. The QuickView output looks similar to the output of the SAP Query tool when displayed in Layout mode.


Converting a QuickView to a SAP Query
As mentioned earlier in this chapter, QuickViews are user-dependent, and other users cannot use them. If you have created a QuickView and you want to share it with others or add to it functionality that is not supported by QuickView, you can convert the QuickView to an SAP query. To do so, follow these steps:

1. Navigate to the main screen of the SAP R/3 Query tool by using transaction SQ01.

2. Select Query, Convert QuickView. A Convert QuickView dialog box, like the one shown in Figure5.9, appears. The very first alphabetical QuickView you have created appears in this dialog, as does your username.


Figure 5.9. All the QuickViews you have created are listed in the QuickView drop-down box.


3. Click the green check mark Enter button. New fields appear on the dialog box (see Figure 5.10). Enter a name for your SAP query. Your assigned query group is listed here as the default query group.

Figure 5.10. You must input a name for your converted QuickView and declare an InfoSet.


4. If the QuickView you want to convert was created using a logical database, a table, or a table join, input your choice for the InfoSet. The InfoSet is then generated automatically. Recall from Chapter 2 that the SAP Query tool's functionality is based on InfoSets. To be able to proceed in the SAP Query tool, you must define an InfoSet (data source) for this query.

5. Click the green check mark Enter button. Your QuickView is now in your list of SAP queries.

วันจันทร์ที่ 2 พฤศจิกายน พ.ศ. 2552

Chapter 4. The Fundamentals of Reporting with the SAP Query Tool



SAP Query Reporting in the Real World


Your First Official Report Request

For this example, you need to prepare a report that answers the question, "In your SAP solution, how many flights with Plane Type A319 are scheduled for arrival in the city of Frankfurt on the flight date June 1995?" (Although your SAP system may contain different information than this example, the report format should be the same.) This type of request is common in the sense that it asks for an answer based on multiple criteria.

The example presented in this chapter shows how you can use a single report multiple times to satisfy multiple needs without having to change the core report. To answer the question posed earlier, you execute a basic list SAP query report (which you should call DLS_Query_02, where DLS is your initials) that includes the fields you need for output in addition to some other fields. Figure 4.1 shows the output of this report.


Figure 4.1. The report output screen of the SAP Query tool, listing the fields used in the report to answer the question in this example.


When you review the report output, you can easily answer the question posed earlier. The answer in this example is 1. (Your answer may be different, depending on your system output.)


Best Naming Conventions for SAP Query Reporting

Because it is so easy to create reports, many companies end up with a library of thousands of reports, many of which are duplicates. To ensure that your organization is utilizing the reporting functionality in the most efficient manner possible, it is a good idea to set some guidelines. Following three rules will ensure a clean library and SAP environment, assist you in custom report identification, and help with upgrades, where applicable, because you can easily identify key reports and report creators:

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.


Figure 4.2. The Copy a Query dialog box allows you to enter a new name for your copied query.


3. Type in a new name for your copied SAP query in the To Query Name box and then press Enter. Be sure to follow the naming rules discussed earlier in this chapter when naming the copied query.

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).
Figure 4.3. The Delete Query dialog box allows you to delete existing queries.


3. When a Delete Query dialog box like the one shown in Figure 4.3 appears, confirm that you want to delete the query by pressing Enter. A message appears in the bottom left of the screen, letting you know that the query has been successfully deleted.


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.
Figure 4.4. Your report output will vary from what is shown here, based on your system's data, but the column format should appear the same.


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.

Figure 4.5. Your revised report output will vary from what is shown here, based on your system's data.


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.


To test all the skills you have learned in this chapter, you can try one final exercise: Make a copy of your existing SAP query and name it DLS_Query_04 (replacing DLS with your initials). Change the title of the query on the first screen of the SAP Query tool to reflect that it is SAP Query 4. In this copied version, add the following fields: Text:Maximum Capacity (as the first field in the report output), Text:Flight Class (to the right of the Flight Date field), and Smoker and Text:Smoker (as the last two fields in the report). Add totals to appear in the report for the Maximum Capacity and Weight of Luggage fields. Your finished output should look similar to what is shown in Figure 4.8.


Figure 4.8. In this example, some of my column data is blank; this will vary based on what is stored in the database.