cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ValueList annotation not yelding correct result

jacek_zebrowski3
Explorer
0 Kudos
1,517

Hello Experts!

Im struggling with providing value help based on standard SAP service - i have annotation as follows: [see code below:

the problem is that C_BOMMaterialsMalFuncManageType has 2 key fields so i expect search help to return 2 values to SmartfilterBar managed entityset namely TechObjIsEquipOrFuncnlLoc and TechnicalObject as 1st field is not searchable via search help i market it as ParameterOut. This construct seems not to be working - is it because i only use OData V2 ?
can you please provide any hint on debugging this ?

<Annotations Target="EAM_MALFUNCTION_MANAGE.C_BOMMaterialsMalFuncManageType/TechnicalObject" xmlns="http://docs.oasis-open.org/odata/ns/edm">  
                <Annotation Term="Common.ValueList">
                    <Record>
                        <PropertyValue Property="Label" String="Technical Object Value Help" />
                        <PropertyValue Property="CollectionPath" String="C_TechnicalObjectForEditVH" />
                        <PropertyValue Property="SearchSupported" Bool="true" />
                        <PropertyValue Property="Parameters">
                            <Collection>
                                <Record Type="Common.ValueListParameterInOut">
                                    <PropertyValue Property="LocalDataProperty" PropertyPath="TechnicalObject" />
                                    <PropertyValue Property="ValueListProperty" String="TechnicalObject" />
                                </Record>
                                <Record Type="Common.ValueListParameterOut">
                                    <PropertyValue Property="LocalDataProperty" PropertyPath="TechObjIsEquipOrFuncnlLoc" />
                                    <PropertyValue Property="ValueListProperty" String="TechObjIsEquipOrFuncnlLoc" />
                                </Record>
                                <Record Type="Common.ValueListParameterDisplayOnly">
                                    <PropertyValue Property="ValueListProperty" String="TechnicalObjectLabel" />
                                </Record>
                            </Collection>
                        </PropertyValue>
                    </Record>
                </Annotation>
            </Annotations>

Accepted Solutions (0)

Answers (2)

Answers (2)

jacek_zebrowski3
Explorer
0 Kudos

Right now i have the following definition - and it still does not work as desired.

            <Annotations Target="EAM_MALFUNCTION_MANAGE.C_BOMMaterialsMalFuncManageType/TechnicalObject" xmlns="http://docs.oasis-open.org/odata/ns/edm">  
    <Annotation Term="Common.ValueList">
     <Record>
      <PropertyValue Property="Label" String="Technical Object Value Help For Edit"/>
      <PropertyValue Property="CollectionPath" String="C_TechnicalObjectForEditVH"/>
      <PropertyValue Bool="true" Property="SearchSupported"/>
      <PropertyValue Property="Parameters">
       <Collection>
        <Record Type="Common.ValueListParameterInOut">
         <PropertyValue Property="LocalDataProperty" PropertyPath="TechnicalObject"/>
         <PropertyValue Property="ValueListProperty" String="TechnicalObject"/>
        </Record>
        <Record Type="Common.ValueListParameterInOut">
         <PropertyValue Property="LocalDataProperty" PropertyPath="TechObjIsEquipOrFuncnlLoc"/>
         <PropertyValue Property="ValueListProperty" String="TechObjIsEquipOrFuncnlLoc"/>
        </Record>
        <Record Type="Common.ValueListParameterInOut">
         <PropertyValue Property="LocalDataProperty" PropertyPath="TechnicalObject"/>
         <PropertyValue Property="ValueListProperty" String="TechnicalObjectLabel"/>
        </Record>
        <Record Type="Common.ValueListParameterDisplayOnly">
         <PropertyValue Property="ValueListProperty" String="FunctionalLocationLabelName"/>
        </Record>
        <Record Type="Common.ValueListParameterDisplayOnly">
         <PropertyValue Property="ValueListProperty" String="TechnicalObjectDescription"/>
        </Record>
        <Record Type="Common.ValueListParameterDisplayOnly">
         <PropertyValue Property="ValueListProperty" String="Equipment"/>
        </Record>
       </Collection>
      </PropertyValue>
     </Record>
    </Annotation>
soumya_r
Participant
0 Kudos

Hi Jacek,

you can make the ValueListParameterInOut for the second key element as well if you need this property for all the operations. Make ValueListParameterDisplayOnly if you would like to filter based only on one key field. When there is no value sent to this property, CDS value help will filter only based on either of key elements values. if you need this property in filter query only, ValueListParameterIn can make multiple filter configurations.

hope it can solve your problem.

Thanks,

Soumya

davidfj
Associate
Associate
0 Kudos

Thank you, very useful.