Skip to content

Variants and Selections

Most queries allow entering selections before query execution. Selections limit the result set of the query to extract only records that match the selection.
A selection variant can be created in SAP, see SAP Help: Query Variants. The purpose of a variant is to minimize the necessity to enter selections when running a query.

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.
When creating a new variant in SAP after creating the extraction, click [ ] to load the new variant.

Variants-Section

The selections of the variant are not displayed in the Selection Screen section of the window. To see the definition of a variant, open the variant in SAP.

Tip

You can define the variant at runtime by using a corresponding parameter in the extraction URL, see Extraction Parameters.

Edit Selections

The Selection Screen in the main window of the component corresponds to the input screen in SAP.

Note

Some selection fields only have a technical name and no description. To understand which field corresponds to a field in SAP, open the input screen in SAP. Click on a selection field and press the function key F1 to display the technical name of the selection field.

Follow the steps below to edit selection fields and filter data:

  1. In the subsection Selection Screen, click [Edit] next to the field you want to edit. The window “Edit selection” opens.
    Sections
  2. Add one or more of the following filter types:
    • Click [Single] to compare the data to a single specified value.
    • Click [Range] to check if the data is (not) within a specified range of values.
    • Click [List] to check if the data is (not) part of a specified list of values.
  3. In the column Sign , select Include to add the filtered data to the output or select Exclude to remove the filtered data from the output.
    edit-selections
  4. In the column Option , select an operator. The operator filters data according to the table below.

    Operator Description
    (not) like pattern True if data values do (not) contain to the content of operand 1.
    (not) equal to True if data is (not) equal to the content of operand 1.
    at least True if data is greater than or equal to the content of operand 1.
    more than True if data is greater than the content of operand 1.
    at most True if data is less than or equal to the content of operand 1.
    less than True if data is less than the content of operand 1.
    (not) between True if data values do (not) lie between the values of operand 1 and operand 2.
    element of True if data values are part of operand 1. This option is only available for type List.
  5. In the column Value, enter values directly into the input fields Low and High or assign existing runtime parameters to the selection fields .

    Note

    When runtime parameters are available, you can use the icon button inside the input field to switch between static values ( ) and runtime parameters ( ).

  6. Click [OK] to confirm your input.

Note that edited selection fields overwrite the selection fields in the variant.

Tip

If you use multiple selection parameters, it is more efficient to create a variant in SAP.

Data Format

Use the following internal SAP representation for input:

  • 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.

Warning

Values accept only the internal SAP representation.
Input that does not use the internal SAP representation results in error messages.
Use the internal SAP representation.
Example:

ERPConnect.ABAPProgramException: RfcInvoke failed(RFC_ABAP_MESSAGE): Enter date in the format \_.\_.\_


Last update: July 15, 2024