Skip to Content
0
Jan 24 at 10:14 AM

Using UI5 Smart Controls (ValueHelp) with SAP CAP

202 Views Last edit Jan 24 at 10:23 AM 5 rev

Hi all,

I am working on a CAP service and want consume it using UI5 Smart Controls. Smart Controls are only compatible with OData V2, so I am using the cds-odata-v2-adapter-proxy.

It is a simple data model:

screenshot-2023-01-24-at-112025.png


In order to use Smart Controls, the OData metadata document needs to contain a few key elements such as the "sap:" annotations (see UI5 documentation) - I found the respective part in the CAP documentation and updated my CAP service accordingly:

screenshot-2023-01-24-at-112124.png

The metadata document now looks like this:

screenshot-2023-01-24-at-112215.png

screenshot-2023-01-24-at-112226.png

screenshot-2023-01-24-at-112251.png

As far as I can see, that pretty much matches the example in the UI5 documentation (except "DESCR" is "name" in my example). Also, the CAP documentation (specific part for pre-defined types like "Currencies") states that "all SAP Fiori UIs [...] will automatically receive Value Help for currencies". However, my UI5 smart control does not display any ValueHelp (the SmartLabel works!):

screenshot-2023-01-24-at-111109.png

Does anyone have any ideas why the ValueHelp won't show up?