Chapter 6. Using Reporting Selection Screens: Advanced Skills
Module-Specific Options on a Selection Screen
Depending on the data source (InfoSet) selected and the module
for which it is designatedHuman Capital Management (HCM), Accounts Payable,
Sales and Distribution, and so ondifferent options may be available. This book
covers many of them, but to best familiarize yourself with the items specific to
the reporting area you are interested in, you should begin with a basic list
report from within your area of interest and vary your selections to view the
result on your selection screen and on your report
output.
|
Using Multiple Selection Buttons
Figure 6.1. Each multiple selection button is a right-pointing arrow.
Single-Value Inclusions
Figure 6.2. By indicating Employee Groups 1, 2, and 5, I ensured that associates classified in those categories are included and that all others are excluded.
Range Inclusions
Figure 6.3. By indicating a consecutive range for the Multiple Selection option for the employee group, I ensured that associates classified in any of the Employee Groups 1, 2, 3, 4, 5, 6, and 7 are included in the report output.
Single-Value Exclusions
Figure 6.4. By indicating any values on the Single Vals tab (indicated by two red circles), I ensure that I will output all values except those where an employee group equals 3.
Range Exclusions
The Multiple Selection Dialog Box Toolbar
Figure 6.5. The toolbar options present in the Multiple Selection dialog box give you even more flexibility in excluding or excluding data.
Execute
Check
Selection Options
Insert Lines and Delete Lines
Delete
Help
Multiple Selection
Import from Text File
Restricting Values in a Report Based on an Existing List of Values
Pasting in Third-Party Values
Transferring Text From a Text File
Using Variants
How to Create a Variant for an SAP Query
1.
|
Begin at the main screen of the SAP Query tool, which you
reach by using transaction code SQ01.
Select the query for which you would like to create a variant by selecting
(highlighting) the gray bar to the left of the table or by typing the query name
in the box at the top of the screen. (The example used here uses a test HCM
query. To follow along, you can use an existing query of your own from any
application module.)
|
2.
|
Select Goto, Maintain Variants. The screen ABAP Variants -
Initial Screen, shown in Figure 6.6,
appears.
Figure 6.6. You use the screen ABAP Variants - Initial Screen to create variants for SAP queries. |
3.
|
Type a name for your variant (for example, DLS_Variant01, where you replace
DLS with your initials) and then click the Create
button. You are presented with the selection screen for the report for which you
decided to create a variant in step 1. This screen gives you the opportunity to
input selections that will be saved as a variant (see Figure 6.7).
Figure 6.7. This selection screen lets you input selections that will be saved as a variant. |
4.
|
Input values on the selection screen that you want to save.
Which specific values you input for the example are unimportant, but for the
sake of this example, input the Period field as of today and enter the value
1 in the Employee Group field. After inputting
any values you want to save, click the Save button on the Application toolbar.
The first time you save the variant, the Save Attributes screen, shown in Figure 6.8, appears. When you modify an
existing variant, you can click the Variant Attributes button to access this
screen.
Figure 6.8. The Save Attributes screen looks the same for all reporting variants. |
5.
|
The only required field for entry on the Save Attributes
screen is the Description field. Enter a description for your variant in this
field and then click the Save button to complete the variant creation process.
It is a good idea to use a description that describes the variant (refer to Figure 6.8).
|
6.
|
Click the green Back button to return to the Maintain
Variants screen.
|
7.
|
Click the green Back button again to return to the main SAP
Query tool screen.
|
Executing a Report with a Variant (Execute with Variant)
1.
|
Begin at the main screen of the SAP Query tool, which you
reach by using transaction code SQ01.
Select your report and then click the Execute with Variant button on the
Application toolbar. A dialog box that contains a drop-down field of all the
variants for the selected report appears.
|
2.
|
Select the variant you want to use and then press
Enter.
|
3.
|
Click the Execute button. The report executes, displaying the
saved variant.
|
Executing a Report with a Variant (Execute)
1.
|
Begin at the main screen of the SAP Query tool, which you
reach by using transaction code SQ01.
Select your report and then press F8 or click the Execute button. The report's
selection screen appears.
|
2.
|
On the Selection screen's Application toolbar, click the Get
Variant button (immediately to the right of the Execute button). A dialog box
containing a drop-down field of all variants for the selected report
appears.
|
3.
|
Select the variant you want to use and then press
Enter.
|
4.
|
Click the Execute button. The report executes, displaying the
selected variant.
|
Saving an SAP Query with a Variant
1.
|
|
2.
|
In the Special Attributes section of the Title, Format
screen, select the Variant drop-down box to see a list of all variants that
exist for the selected report.
|
3.
|
Select the variant you want to use and then press
Enter.
|
4.
|
Check the Execute Only with Variant check
box.
|
5.
|
Click the Save button and then press F8 or click
Execute.
|
6.
|
Click the Execute button. The report executes, displaying the
saved variant. Because it was saved with the query, every time it is executed,
the saved default variant will be used. The variant can be overwritten with new
values, or a new variant can be selected after execution; however, it will
always be presented as the default.
|
Editing a Variant for SAP Query (Directly on the Selection Screen)
1.
|
On the selection screen, change the values as desired and
then click the Save button on the Application toolbar. A confirmation box
appears, asking if you want to overwrite the existing
variant.
|
2.
|
Click Yes. The changes to your variant are
saved.
|
Editing a Variant for SAP Query (on the Maintain Variants Screen)
1.
|
Begin at the main screen of the SAP Query tool, which you
reach by using transaction code SQ01.
Select the query for which you would like to modify the variant by selecting
(highlighting) the gray bar to the left of the table or by typing the query name
in the box at the top of the screen.
|
2.
|
Select Goto, Maintain Variants. The screen ABAP Variants -
Initial Screen appears.
|
3.
|
Select your variant from the drop-down box and then click the
Change button. You are presented with the selection screen for the
report.
|
4.
|
Modify the values on the selection screen as you like and
then click the Save button on the Application toolbar.
|
5.
|
To modify the attributes, click the Variant Attributes button
and make the desired changes.
|
6.
|
Make any other modifications desired on this screen and then
click the Save button to complete the variant modification
process.
|
Advanced Functions for Variants
1.
|
Begin at the main screen of the SAP Query tool, which you
reach by using transaction code SQ01.
Select the query for which you would like to modify the variant by selecting
(highlighting) the gray bar to the left of the table or by typing the query name
in the box at the top of the screen.
|
2.
|
Select Goto, Maintain Variants. The screen ABAP Variants -
Initial Screen appears.
|
3.
|
Select your variant from the drop-down box and then click the
Change button. You are presented with the selection screen for the
report.
|
4.
|
Click the Variant Attributes button to view the available
options on the Save Attributes screen (refer to Figure 6.8).
|
Option
|
Description
|
---|---|
Variant Name
|
This field contains the name of the variant that is input on
the Maintain Variants screen during the creation process.
|
Description
|
This field contains the required description field that users
must populate with a description of the variant.
|
Created for Selection Screens
|
This field displays the number of the R/3 dynpro (screen) that
is displayed at runtime. It may also be recorded in trace or logging
information.
|
Only for Background Processing
|
If you select this check box, the variant can be executed only
in the background. If you do not select it, it can be run both in the background
and online.
|
Protect Variant
|
If you select this check box, the variant can only be changed
by the person who created it or who last changed it.
|
Only Display in Catalog
|
If you select this check box, the variant name appears in the
directory but not in the general input help.
|
System Variant (Automatic Transport)
|
This system variant is transported
automatically.
|
Option
|
Description
|
---|---|
Required Field
|
This attribute indicates that the designated field requires
entry on the selection screen prior to report execution.
|
Switch GPA Off
|
The field contents are ignored when the variant is
imported.
|
Save Field Without Values
|
If you select this field, the value of the corresponding field
on the selection screen is not affected when you start the program by using a
variant.
|
Selection Variable
|
If you select this field, the field on the selection screen is
assigned a value from a variant variable.
|
Hide Field 'BIS'
|
If you are using BIS, if you select this option, the
corresponding field is not displayed when the user starts the program using this
variant. However, you can still assign a value to the field in the
variant.
|
Hide Field
|
If you select this option, the corresponding field is not
displayed when the user starts the program using this variant. However, you can
still assign a value to the field in the variant.
|
Protect Field
|
If you select this option, the user cannot overwrite the value
in the field on the selection screen.
|
Things to Remember
-
The Multiple Selection dialog box has four key tabs.
-
The Import from Text File button allows you to restrict your report output to data contained in a third-party list or data source.
-
You can create a virtually unlimited number of variants for a single SAP query report.
-
You have multiple options when executing a report with a variant, including saving the variant in the SAP Query tool as a default for a specific query.
-
You can prevent users from modifying entries on a report's selection screen by using the Protect option.