cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

list report search on composite entity

roman_schneider
Explorer
0 Kudos
542

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 ?  

 

 

 

 

Accepted Solutions (0)

Answers (3)

Answers (3)

roman_schneider
Explorer
0 Kudos

The disadvantages of unmanaged behaviour are too great.  We have the search pattern in several places.

 

 

roman_schneider
Explorer
0 Kudos

Thanks for the idea. But i lose the extensibility and the possibility of a behaviour definition on entity A

saurabh__khare38
Participant
0 Kudos

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

roman_schneider
Explorer
0 Kudos

STRING_AGG would only solve part of the challenge anyway.

as far as i can see, the problem has two parts:

  1. A field ist needed to Filter against.     Tried a _B.BNAME as FILTER in der View, but this will change cardinality and the navigation to the object page went wrong.   A SELECT DISTINCT does not change it
  2. A Result Column is needed to show the entity data. Do I have to display all BNAMEs for an A to be style guide conform or is the appropriate filter attribute sufficient? 

Any ideas? 

 

saurabh__khare38
Participant
0 Kudos

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