on 2024 Dec 16 11:29 AM
I have two CDS entities A and B. B is an composition and has an Attribute BNAME.
In a list report-app i want to filter the result of A by BNAME (All A which have a certain BNAME) and then the rest should be as usual: Navigate to ObjectPage of A and display and edit.
The challenge is to get the filter attribute into entity A and the content of BNAME into a result column to be style guide conform.
STRING_AGG could have been an option, but ist not supported in my HANA 2022-System.
How do you archieve such a search over compositions ?
Request clarification before answering.
The disadvantages of unmanaged behaviour are too great. We have the search pattern in several places.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the idea. But i lose the extensibility and the possibility of a behaviour definition on entity A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can still have the behaviour definition just that it would be an unmanaged one
SAP ABAP RAP : Custom Entities with compositions relationship in a Fiori Elements App
STRING_AGG would only solve part of the challenge anyway.
as far as i can see, the problem has two parts:
Any ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
With BNAME added to A, the cardinality is bound to change and for the filter to work out of the box for BNAME it has to be added to A. I would suggest going for a custom entity in this case where you can handle the filter in your code. You would need a dummy field called BNAME in A. The value entered in the filter would be available in the implementation of the custom entity and can be used to filter B first and then select A based on that before populating the result.
Custom Entity
| User | Count |
|---|---|
| 17 | |
| 8 | |
| 7 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 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.