on 12-17-2020 12:58 PM
Dear experts,
does anyone know how (and if) I can implement a full-text search in a value help in SAP Cloud Platform backend?
Look at the example:
By default, it works only in such a way that it returns only those values that start with a letter (or combination of letters) that a user types in the field. In this particular example, it returns "ABC" because I started with "AB".
But if I start with "BC", the value help will not suggest the same result ("ABC") anymore. Unfortunately, @Search and @Consumption annotations don't work, or at least I don't know how to make them work. Backend is on Cloud Platform (ABAP RAP), frontend - SAPUI5.
My question is: how do I implement a full-text search here? Is it achievable via backend, or is frontend should be involved as well?
The above example isn't very impressive, but in reality, I have a few fields as strings of words, where the most important part is in the middle of the string.
Regards,
Mykyta
Hi Mykyta,
Try searching using *BC. Searching using '*' works perfectly fine for me. However, mine is not a suggestive search as yours, I need to explicitly press Enter to get the search results.
I am using below sets of annotations at the field level
and using below annotation at the entity level
Thanks,
Aman Garg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay, @Search annotations actually work, I was just using them in the incorrect place - they should be enabled in a value help CDS view, not in a root interface view (like I tried initially). As soon as I applied @Search annotations in respective value help CDSes, dynamic text search started working:
I applied exactly the same annotations that aman9garg suggested in his answer above. I don't even have to search with '*' and press Enter, it works just fine during typing.
Regards,
Mykyta
User | Count |
---|---|
75 | |
10 | |
10 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.