SAP Query and QuickViewer
|
This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production. |
Business users often need a list that no standard report provides: all expense claims of one employee, or the total per category. Writing an ABAP program for each request is slow, so SAP supplies tools with which a user, or an administrator on the user’s behalf, builds such a list by picking fields on a screen. The two best known are the QuickViewer, which a single person uses to build a quick list for themselves, and SAP Query, which an administrator sets up so that a whole group of users can run shared queries. Both belong to classic SAP GUI, the desktop client of SAP systems, and you meet them in older systems and in the code and documents of projects that grew up there. This page explains what each tool does, what an InfoSet and a user group are, how the tools relate to each other, and which newer mechanism takes their place. It is written for classic Standard ABAP release 8.16 on premise and Private Edition systems, where SAP GUI transactions exist. The pages read at write time are SAP’s own help pages for these tools; the ones found were published for older releases, and the transaction codes and screens they describe are the ones named here. SAP Query and the QuickViewer are not part of ABAP Cloud (ABAP for Cloud Development release 9.20, 2608); for new development the CDS-based approach in the last section is the one to learn. Every listing on this page needs an SAP system with SAP GUI or Fiori; nothing here was run in the local playground.
Before you read
-
Getting Started: what an SAP system, a program and a table are.
-
Classic Tools: SE80, SE38, SE11, SE37 and SE16: what a transaction code is and how the classic screens are opened.
-
Tables and Structures in the ABAP Dictionary: the database tables that these tools read.
-
Language Versions and Released APIs: how classic Standard ABAP differs from ABAP Cloud.
Key terms
-
Transaction code: a short name such as SQ01 that you type in the SAP GUI command field to open one screen.
-
SAP Query: the classic tool with which administrators define queries that a group of users can run and change.
-
QuickViewer: the classic tool (SQVI) with which one user builds a simple personal list without programming.
-
InfoSet: a view of one or more data sources, prepared by an administrator, from which queries take their fields.
-
User group: the set of users that may use a given set of InfoSets and queries.
-
Analytical query: a CDS-based query with measures and dimensions that Fiori reports read through an OData service.
Two tools for the same need
Both tools answer the same question, "show me these columns of these rows", but for different people.
-
The QuickViewer is for one person. You open it with transaction SQVI, name a QuickView, say where the data comes from, tick the fields you want as input fields and as output columns, and run it. SAP describes it as a tool for building basic lists without programming, aimed at relatively inexperienced users. A QuickView belongs to the user who created it: you can run only your own.
-
SAP Query is for a group. An administrator prepares the data sources and decides who may use them, and users then run, and with the right authorization create, queries through transaction SQ01. It supports more than basic lists: SAP also lists statistical reports and ranked lists. A query is available to the users of a user group.
The two are linked. From SQ01 the QuickView button creates a QuickView, and a QuickView can be converted into an SAP Query so that others can use it. That is the route by which a personal experiment becomes a shared report.
The transactions
| Transaction | What it opens |
|---|---|
SQ01 |
The SAP Query initial screen. It lists the queries stored for your user group and has buttons to create a QuickView or to start an InfoSet query. |
SQ02 |
The InfoSet maintenance screen, for the administrator who defines which data sources and fields a query may use. |
SQ03 |
The user group maintenance screen, where users are assigned to the groups that decide which InfoSets and queries they see. |
SQVI |
The QuickViewer initial screen, to create and run a personal QuickView directly. |
The help pages read for this page describe SQ01 and SQVI step by step. SQ02 and SQ03 are named there as the places where InfoSets and user groups are maintained, but the pages found describe the steps of those two screens only in general terms, so this page does not give click-by-click instructions for them.
InfoSets and user groups
An InfoSet is a prepared view of a data source, shaped around what users need to know. It decides which fields are offered and, in this way, what a query can show. A query always takes its fields from an InfoSet. Creating or changing an InfoSet needs a special authorization, so in practice an administrator or a developer does it.
A user group connects people to InfoSets and queries. Your administrator assigns you to at least one user group; the group decides which InfoSets and which saved queries you can reach. Executing an InfoSet query needs no extra authorization beyond the one for SQ01, but saving one does.
Building a QuickView
A QuickView needs no InfoSet and no user group: you name the data source directly. The following steps are those of SAP’s help page; they require an SAP system with SAP GUI and authorization for SQ01 or SQVI plus authorization to read the data. Not run here.
-
Open SQVI (or SQ01 and choose the QuickView button), enter a name and choose Create.
-
Enter a title and choose a data source type: a single database table, a table join (add at least two tables with Insert Table), a logical database, or an existing InfoSet of your user group.
-
Choose a display mode. Basis mode shows selection fields and list fields on separate tabs; Layout mode shows them as a tree on the left. The mode changes how you work, not the data.
-
Mark the selection fields, which become the input fields on the screen that you fill before the run, and the list fields, which become the columns of the result.
-
Choose Execute (F8), fill the selection screen that appears, and choose Execute (F8) again. The list fields appear as a table.
-
Store the QuickView before leaving, so that you can run it again after the next logon.
For the expense-claims example of this documentation, the data source would be the claim table, the selection fields the employee and the status, and the list fields the claim number, the status and the total amount. Whether the claim table exists in a given system is the system’s own matter; the table here is the one the examples of this section use.
Running an InfoSet query
An InfoSet query is the group tool at work. It requires an InfoSet assigned to your user group, which your administrator can create or reassign. Requires an SAP system; not run here.
-
Open SQ01 and choose the InfoSet Query button.
-
Select the InfoSet and confirm.
-
In the field list, choose fields for Selection (the filters) and Output (the columns).
-
Enter values in the Value column of the selection table, using the input help with F4 if needed.
-
Choose Execute (F8) and read the output screen.
Limits, and why newer systems prefer something else
These tools are convenient but old. They run only in SAP GUI, they produce a list on the screen or an export rather than a service, a QuickView is private to its owner, and the InfoSet sits outside the development objects that a modern project transports, tests and reviews as code. Starting new work on them is not recommended; read and maintain what already exists, and for new needs use the CDS-based route. A requester book that explains SAP Query as the standard way to build a report describes the classic situation, which remains valid for old systems but is not how ABAP Cloud and the Fiori programming model approach reporting.
Successors: CDS-based and analytical queries
The modern replacement starts one layer lower. Instead of an InfoSet, you describe the data once as a CDS view entity: the joins, the calculated columns and the aggregation are part of the view, and any consumer can read it, from ABAP SQL to a Fiori app. The listing below groups claims by status and totals the amounts, which is what a statistical QuickView or SAP Query would have produced. It requires an SAP system with ABAP Development Tools; not run here.
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Claim totals by status'
define view entity ZI_ExpClaimTotals
as select from zexp_claim
{
key status as Status,
currency_code as CurrencyCode,
@Semantics.amount.currencyCode: 'CurrencyCode'
sum( total_amount ) as TotalAmount,
count( * ) as ClaimCount
}
group by status, currency_code
On top of such views, SAP’s analytical reporting uses the Analytics annotation group described on CDS Annotations and Metadata Extensions, which marks data as measures and dimensions for the analytical engine. The user-facing tool is the Fiori app Custom Analytical Queries. SAP’s help page for it describes the steps as: open the app from the Fiori launchpad, open or create a query, add restricted and calculated measures, create user input filters and reorder fields, apply filters, then activate and preview the query. The page read does not say how the data source is chosen or whether publishing creates a service, so this page does not state either. It also does not say that the app replaces SAP Query or InfoSets; the successor relationship here is a reading of the roles the tools play, not a statement SAP makes on those pages.
| Need | Classic tool | Current approach |
|---|---|---|
A quick personal list |
QuickViewer (SQVI) |
A CDS view entity read in a Fiori list report, or an ABAP SQL query in ADT |
A shared report for a group |
SAP Query (SQ01, SQ02, SQ03) |
A CDS view with an access control, shown in a Fiori app |
Totals, filters and measures chosen by the user |
A statistical SAP Query |
Custom Analytical Queries on analytical CDS data |
Summary
-
The QuickViewer (SQVI) builds a simple personal list from a table, a join, a logical database or an InfoSet, without programming.
-
SAP Query (SQ01) serves a user group: an administrator maintains InfoSets (SQ02) and user groups (SQ03), and users run the queries they may see.
-
A QuickView is private to its owner and can be converted into an SAP Query to share it.
-
Both tools are classic SAP GUI tools of Standard ABAP systems and are not part of ABAP Cloud.
-
For new work, describe the data as a CDS view entity and report on it with a Fiori app such as Custom Analytical Queries.
-
Everything on this page requires an SAP system; none of it ran in the local playground.