SAP includes an Ad Hoc Query screen that allows you to define and output data as per your requirements.
The Ad Hoc Query screen provides the SAP List Viewer that helps you to create the required reports. The lower part of the Ad Hoc Query screen contains a preview of output in the SAP List Viewer. It enables you to use sample data to gain an impression of the appearance of the output list.
The Refresh function enables you to replace the sample data with the real data. The data is output to the SAP List Viewer on the Ad Hoc Query screen. This means that the definition and result of a query are both included in a single screen.
After you have output the real data, you can use the following SAP List Viewer functions on the Ad Hoc Query screen:
- Search for entries
- Calculate totals and subtotals
- Display the output list in Excel and then use all Excel functions
- Use the SAP List Viewer export and display options
Note
Definition and Formatting of Output
The output preview displays the layout of the output list before data is finally output. It also enables you to format the output list.
You can perform the following tasks once the output list is formatted:
The context menu for ranked lists and statistics enables you to determine whether additional columns, such as mean value, share in %, and total number, are output.
- Sort the list by one or more columns.
- Calculate totals for numeric columns in basic lists and calculate subtotals by using specific criteria (non-numeric columns).
- Delete all output fields at once.
- Initialize formatting.
- Determine the position of the currency column in basic lists or hide it completely.
Types of Output
You can select the type of output, which determines how data is displayed when output. You can choose from various types of list output and export functions. For example, you can output data for spreadsheets. In this case, a list is not output to the screen. Instead, the report is copied to a file that you can then edit by using a spreadsheet program.
Output and Export Settings
To specify various output and export settings in a single dialog box, choose Edit → Settings.
You can specify the following settings:
- Select the type of output list, such as basic list, ranked list, or statistics.
- Start a query through the standard selection screen of the logical database.
- Use selection conditions for output.
- Reference the currency and counter.
- Export to Crystal Reports.
- Specify field selection as a value or a text.
You can use the following tab pages to specify various output and export settings:
- Output tab page:
- On the Output tab page, you can select the type of output list (such as basic list, statistics, and ranked list) and the type of output (such as standard list, word processing, and spreadsheet). You can also determine whether the query is started through a selection screen. Ad Hoc Query uses the SAP List Viewer as the standard type of output.
- Stats/Ranked List tab page:
- On the Stats/ranked list tab page, you can determine the reference currency that is used to translate currency fields and the reference unit that is used to translate units of measurement. You can also specify the number of lines included in a ranked list.
- Crystal Reports tab page:
- On the Crystal Reports tab page, you can determine how data is exported to Crystal Reports if Crystal Reports is started directly from InfoSet Query. You can also create a Crystal Report each time data is exported. Alternatively, you can export data to an existing Crystal Report on your local PC.
- Default: Val/Text tab page:
- On the Default: Val/Text tab page, you can determine whether the value or text is used when a field is selected by drag and drop or by checkbox. You can override these defaults by using the context menu to select a field.
Output List
Output lists are of the following types:
- Basic list
- Statistics
- Ranked list
While basic lists enable you to output detailed overviews, statistics and ranked lists enable you to output aggregated data.
Output List – Examples
The following table shows examples of the different types of output lists:
Output List
| Output List | Example |
|---|---|
| Basic list | You want to output an overview of monthly salaries received by employees in an organizational unit. To do so, you use the required organizational unit as a selection criterion and output the name and monthly salary. You select basic list as your output type. When the output is defined in this way, the currency field is output automatically. |
| Statistics | Instead of an overview of individual salaries, you want to output monthly salary totals for each organizational unit. In this case, you use the required organizational units as selection criteria, and the organizational unit and monthly salary as output fields. You select statistics as your output type. The total of monthly salaries is output for each organizational unit. The number of values included in the total is output if you have defined output accordingly. A totals row is also output for each statistic. In this example, it contains the total of monthly salaries, and the total number of values included. |
| Ranked list | You want to determine the investment types that are most frequently selected as savings plans at your enterprise. To do so, you select all of the employees at your enterprise, and ranked list as your type of output list. You use the investment type as the only output field. The output list contains the investment types, which are sorted by the number of employees who selected the investment types. The number of rows output in ranked lists is limited. The rank and number columns are output automatically. |
