cancel
Showing results for 
Search instead for 
Did you mean: 

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

ttrapp
Active Contributor

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/ViewTempl...

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

gregorw
Active Contributor

You're right, the documentation for CollectionRoot reads quite clear:

"Service root of the value list collection; null means local to this document"

So have you also filed an incident?

ttrapp
Active Contributor
0 Kudos
Yes, I think I should open an incident for UI5. I just wanted to ask whether my use of annotations was wrong before I open an incident.

Cheers,
Tobias

Accepted Solutions (1)

Accepted Solutions (1)

ttrapp
Active Contributor

I opened an OSS incident and got following answer:

I am sorry but I have to say that CollectionRoot is not supported at all currently. The SmartControls only work with CollectionPath.

An enhancement to bring in CollectionRoot support is not planned currently for a specific release.

We will clarify the dependencies and background information to this feature request and add it to the internal product backlog afterwards.

Unfortunately there is no information on when this request can be picked up and when it will be part of the UI5 delivery.

So will use RDS and include the missing CDS views.

Answers (0)