Most reports allow entering selections before report execution. Selections limit the result set of the report so as to extract only records that match the selection.
A selection variant can be created in SAP at the input screen of an ABAP report. The purpose of a variant is to save selection settings on your input screen. This minimizes the need to enter selections each time you run a report.
Note: Manual selections and variants can be combined. Manual selections overwrite any selections in the variant.
Choose a Variant #
Choose a variant from the drop-down-list Variant (1). If you create a new variant in SAP after the report extraction was created, click the [Refresh] button next to the drop-down list to access the new variant.
Note: The selections of the variant are not displayed in the Selection Screen section of the window. To see the definition of a variant, take a look at the report’s variant in SAP.
Edit Selections #
This section corresponds to the report’s input screen in SAP. Some selection fields only have a technical name and no description. To understand which field corresponds to a field in SAP, take a look at the report’s input screen in SAP. Click on a selection field and press function key F1. This displays the technical name of a selection field.
- Click the [Edit] button next to the selection you want to edit (2). The window “Edit Selection” opens.
- Choose if the selection is to be included or excluded (3) from the extracted data.
- Select an operator (Equal, GreaterThan, etc.) from the Option drop-down list (4).
Tip: Use the In operator when mapping list parameters to selections. - Enter the selection in the respective Low and High fields. The High field is active for input when the between or not between operator was selected.
- Optional: click [Add Selection] (5) to add conditions.
- Click [OK] (6) to confirm the selections.
Tip: If you use multiple selection parameters, create a variant in SAP. Use the variant instead of entering selections.
Data Format #
Warning! Values must use the internal SAP representation:
Date: The date 01.01.1999 has the internal representation 19990101 (YYYYMMDD)
Year period: The year period 001.1999 has the internal representation 1999001 (YYYYPPP)
Numbers: Numbers must contain the leading zeros, e.g., customer number 1000 has the internal representation 0000001000.
Input that does not use the internal SAP representation results in error messages e.g.:
ERPConnect.ABAPProgramException: RfcInvoke failed(RFC_ABAP_MESSAGE): Enter date in the format _._._