(GLUE-1902) Advanced Data Selection
Advanced data selection enhances possibilities to filter data during the extraction process.
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
- Use the transaction SE19 and create new Enhancement spot implementation for the Enhancement spot /DVD/GL_EXT_VAR_SELOPT by clicking Create Impl.
- Specify Enhancement Implementation name and Short Text. Confirm. (Don't fill Composite Enhancement Implementation)
- 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. - Click Continue.
- Enhanced Implementation Elements screen comes up. At this point, the new BAdI enhancement implementation is created.
- 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. - 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
- Double click on Filter Val. item
- Click Combination to create a new row
- 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.