Need to convert ABAP boolean type in true/false for UI5 dropdown through CDS annotation. Is there any CDS Annotation that can help me in this?
Asked
Active
Viewed 1,771 times
0
-
1Please provide a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). See also [how to better ask your question](https://stackoverflow.com/help/how-to-ask). – Sandra Rossi Oct 03 '19 at 12:08
-
casting it to `boole_d` will turn the selection into a "Yes"/"No" drop down. Does this suffice? – Jorg Oct 03 '19 at 12:30
-
Hi @SandraRossi, actually the scene is to consume smartfilter functionality of UI5. for which i already wrote the cds, but for one particular field whose domain is Boolean I want to reflect the true false suggestions with drop down. But i am unable to do that. Somewhere someone wrote something about Boolean conversion to True/False conversion through Annotations but forgot to mention how? I searched but i didn't find anything. – Tanuj sharma Oct 03 '19 at 13:20
-
@Jorg will you please elaborate me little more about your suggestion. – Tanuj sharma Oct 03 '19 at 13:24
-
That was it. A smart table will convert a field of that type to display Yes or No, and adds a filter with a Yes/No drop down. You don't need an annotation to do that – Jorg Oct 03 '19 at 13:33
-
1If it worked as you wanted, I could convert it into an answer for others – Jorg Oct 04 '19 at 04:34
-
@Jorg thanks and yes you can convert it as an answer.. but the thing is in drop down I am getting the domain field values rather than yes/no. – Tanuj sharma Oct 06 '19 at 04:52