(GLUE-1905) Advanced Data Selection

Advanced data selection enhances possibilities to filter data during the extraction process. At its core, this functionality allows to programmatically edit the internal table that holds the select options generated from the Glue variant screen. This option might be useful when some of the filtering parameters are dynamic or known only at run-time.

Please note that Advanced data selection is an option for expert users, who may use it if the data selection in the standard Glue variant isn't sufficient. This option requires ABAP knowledge.


For the purpose of Advanced data selection, the SAP object-oriented enhancement technique called BAdI (Business Add-In) is used.

Using BAdI, you can inject your custom data selection logic into the extraction process through the /DVD/GL_EXT_VAR_SELOPT Enhancement spot. You must create the Enhancement implementation that implements /DVD/GL_IF_SELECTION_DEF interface.

To trigger the Enhancement implementation during the runtime, use the same value as you used in your Enhancement Implementation Filter. Value from this filter must be inserted into the Select-Options with sign "$" as a prefix. 

For more information, use the official SAP step list on How to Implement a BAdI.

Step list for the creation of custom data selection

These instructions include the Creation of a new BAdI implementation in SAP SE19 and using this implementation in the Glue variant.

Create a new enhancement implementation

  1. Use the transaction SE19 and create new Enhancement spot implementation for the Enhancement spot /DVD/GL_EXT_VAR_SELOPT by clicking Create Impl.
  2. Specify Enhancement Implementation name and Short Text. Confirm. (Don't fill Composite Enhancement Implementation)
  3. Specify BAdI Implementation name, Implementation Class name and select "/DVD/GL_SELECTION_DEFINITION" as a BAdI Definition.
    The BAdI Definition defines the interface of the Implementation Class. In this case the filled BAdI Definition "/DVD/GL_SELECTION_DEFINITION" uses automatically the interface "/DVD/GL_IF_SELECTION_DEF".
    The Enhancement spot may have multiple implementations.
  4. Click Continue.
  5. Enhanced Implementation Elements screen comes up. At this point, the new BAdI enhancement implementation is created.
  6. Open your BAdI Implementation by clicking on it under the left menu BAdI Implementations and double click the Implementing Class item.
    After you double-click on the method, you will be redirected to ABAP Workbench where you can add your custom logic for data selection.
  7. Define a filter value which is used to connect data selection of the variant with your BAdI implementation created in the ABAP Workbench. 

    Step list

    1. Double click on Filter Val. item
    2. Click Combination to create a new row
    3. Double-click on the new row and enter the values




Use the BAdI Implementation in Glue variant

You can use the BAdI filter value in the select-option of the Glue variant. You can insert this value into any selection field, but always put "$" as a prefix. The "$" sign indicates that custom BAdI logic is used.

Please note that the filter value is case-sensitive.