Skip to Content
1
May 24, 2018 at 12:40 PM

CollectionRoot for value list of external service is not working with ValueListProvider

794 Views Last edit May 24, 2018 at 01:30 PM 2 rev

Hi,

I have the following question. In my service Y_TEST_SRV I want to define a value list for the a certain field:

<Property Name="Country" sap:label="Country" MaxLength="5"  Type="Edm.String"/>

Usually this is no problem if the value list is the an entity set in the same service. But now I want to refer to an external service. The values come from a CDS view Y_Country which is exposed using auto exposure to a Gateway service Y_COUNTRY_CDS:

The problem is that the value help provider in UI5 doesn't access the Y_COUNTRY_CDS service - I can't see anything in the Gateway trace. The Gateway Service Y_COUNTRY_CDS works fine and the following shows a perfect result:

GET  /sap/opu/odata/sap/Y_COUNTRY_CDS/Y_Country

From my understanding the annotations above should be Ok according to following specification: https://github.com/SAP/openui5/blob/master/src/sap.ui.core/test/sap/ui/core/demokit/sample/ViewTemplate/scenario/data/com.sap.vocabularies.Common.v1.xml

When I look in ValueHelpProvider-dbg.js I can see that the MetadataAnalyzer tries to get the Metadata of service Y_TEST_SRV and not COUNTRY_CDS.

So the problem must be either the ValueListProvider or the annotations...

I used UI5 following UI5 controls:
  • sap.ui.comp.smartform.SmartForm
  • sap.ui.comp.smartform.Group
  • sap.ui.comp.smartform.GroupElement
  • sap.ui.comp.smartfield.SmartField

UI5 version was SAPUI5 Distribution 1.54.3 (built at 2018-04-11T14:56).


Best Regards,
Tobias

Attachments

announbenannt.png (175.8 kB)