on 2022 Oct 05 8:07 AM
Hi all,
we are currently working on a Fiori Elements Application. Therefore we are using a virtual element to calculate the current stock for a material. In the implementation of the virtual field we are calling a BAPI which returns the available stock quantity. Now we have the requirement in our list report to filter the stock quantities in the virtual field.
I read the question from che.eky, which shows that directly filtering virtual fields is not possible - only applying the filter on persistent fields (https://answers.sap.com/questions/13163381/cds-virtual-element-filter-doubt-clarification.html)
The question was asked about 2 years ago. So my question is: Is it still the case that virtual elements cannot be filtered? Is there any possibility to implement filtering on a virtual field because as I mentioned before this is a requirement we need for our application.
I am aware of the possibility of realizing the stock determination via CDS Views. However, we want to do this using the BAPI, because the standard transactions using this BAPI and any changes in the availability check also covered from the BAPI.
Thanks in advance!
Best regards
Dominik
Request clarification before answering.
I'm facing the same issue: it's a completely no-sense topic.
You found the documentation: "Implementing Filtering for Virtual Elements" (https://help.sap.com/docs/ABAP_PLATFORM_NEW/fc4c71aa50014fd1b43721701471913d/9019018679ea491cb55ce7e...).
thinking there's explained how to apply a filter on a virtual element. Next reading...
"Filtering on virtual elements requires the transformation of the given filter condition into a corresponding condition that does not use any virtual elements for the filter."
"The filter for virtual elements must be implemented in the related ABAP class. For each filter operator, the filtering must be transformed to a filter for the elements from which the virtual element is calculated."
To summarize: to filter a virtual element you have to transform the filter into a filter of non-virtual elements.
Useless.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 17 | |
| 8 | |
| 8 | |
| 6 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.