cancel
Showing results for 
Search instead for 
Did you mean: 

SmartField ValueHelp via xml annotation not populating for ValueListParameterInOut parameter

rpanneel
Participant
0 Kudos

Hello,

When I add XML annotations in the define method of the MPC_EXT class my ValueHelp is correctly showing, but there is only one issue that I keep having. I have a couple of SmartFields in a form, in this case Network and Activity. These two properties exist on the same main entity and both have their own entity (and entityset) which is used by the value help.

When I open the Activity valuehelp I expect to see in the filter of this value help dialog both the value for Network and the current Activity which is in the main form. But I only see the Network filled in, as you can see below:

I would expect to see them both filled in. My metadata annotation for this property/entity is the following:

      <Annotations Target="ZMY_SERVICE_SRV.MainEntity/Activity"
        xmlns="http://docs.oasis-open.org/odata/ns/edm">
        <Annotation Term="com.sap.vocabularies.Common.v1.ValueList">
          <Record>
            <PropertyValue Property="CollectionPath" String="NetworkActivitySet"/>
            <PropertyValue Property="SearchSupported" Bool="true"/>
            <PropertyValue Property="Parameters">
              <Collection>
                <Record Type="com.sap.vocabularies.Common.v1.ValueListParameterInOut">
                  <PropertyValue Property="LocalDataProperty" PropertyPath="Activity"/>
                  <PropertyValue Property="ValueListProperty" String="Activity"/>
                </Record>
                <Record Type="com.sap.vocabularies.Common.v1.ValueListParameterIn">
                  <PropertyValue Property="LocalDataProperty" PropertyPath="Network"/>
                  <PropertyValue Property="ValueListProperty" String="Network"/>
                </Record>
                <Record Type="com.sap.vocabularies.Common.v1.ValueListParameterDisplayOnly">
                  <PropertyValue Property="ValueListProperty" String="Description"/>
                </Record>
                <Record Type="com.sap.vocabularies.Common.v1.ValueListParameterDisplayOnly">
                  <PropertyValue Property="ValueListProperty" String="Network"/>
                </Record>
              </Collection>
            </PropertyValue>
          </Record>
        </Annotation>
      </Annotations>

For the sake of simplicity the properties Activity and Network both exist with the same name on the MainEntity and on the ValueHelp entity.

I also tried to put it by explicitly setting the Activity parameter as bot ValueListParameterIn and ValueListParameterOut but this doesn't change the content in the valuehelp.

Has somebody encountered this before? Weird thing that the valuehelp nicely fills the Network property, but not the Activity-property. Also moving the property Activity back to the main entity just works fine. So I have the feeling that I am overlooking something or maybe it is not designed to work like this?

The UI5 version is 1.71.24

Thanks!

Kind regards,

Robin

Accepted Solutions (0)

Answers (0)