Executing Queries Online

To execute a query online, select Query followed by Execute or Execute with variant. If you select Execute with variant, you see a dialog box where you can enter the variant name.

A variant is a saved set of selection criteria for a query or the report generated by the query. If you specify a variant when starting a query, the system uses the values in the variant for the query selection criteria.

You enter variants on the selection screen and save them under any name. For each query, you can create any number of variants. To create a variant, select Goto ® Maintain variants.

With queries from the global area you can create system variants. For further information, see Query Work Areas.

For further information about variants, please refer to the appropriate sections in the ABAP User Manual or to the online documentation Getting started with R/3.

For each query, you can define a standard variant which is always used when you choose Execute. If you select Exec. with variant, the system sets the standard variant as the default value (see Assigning Title, Format, and Notes ).

When you start a query, the system displays the selection screen where you can enter your selection conditions - just like when starting a report. Below is an example of a selection screen.

Selection screens normally consist of two parts:

These program parameters may consist of any of the following:

When you have entered the selections, choose Execute to display your list.

If you want to output the list to a printer instead of the screen, proceed as follows:

  1. Start the query as described above.
  2. On the report selection screen, choose Execute and print.

You then see a screen where you can specify the print options.

For a description of the different options, refer to the ABAP User Manual and the online documentation Getting started with R/3.

You can also display the list on the screen first and then select Print.