最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

sapui5 - Smartfield value help does not show description - Stack Overflow

programmeradmin1浏览0评论

I have defined a CDS view which is used for the value help of a smartfield.

define view entity ZZHU_CDS_ORDERTYPE as select from tvak 
 left outer join tvakt on  tvak.auart = tvakt.auart
 {
  @Consumption.valueHelpDefinition: [{entity: { name: 'Z_C_SODOCTYPEVH',  
                                    element: 'OrderType'}  }] 
  @EndUserText.label: 'Sales Order Type'   
  @ObjectModel.filter.enabled: true   
  @ObjectModel.text.element: ['Text']   
  @UI.textArrangement: #TEXT_FIRST
  key tvak.auart  as OrderType,  
      tvakt.bezei as Text
}

The XML view with the smartfield looks like this:

   <sf:SmartField id="idOrderType" entitySet="ZZHU_CDS_ORDERTYPE" value="{OrderType}">
   <sf:configuration>
     <sf:Configuration id="_IDGenConfiguration2" displayBehaviour="idAndDescription" />
   </sf:configuration>
   </sf:SmartField>

And the annotation:

<EntityType Name="ZZHU_CDS_ORDERTYPEType" sap:label="Sales Order Type" sap:content-version="1">
 <Key>
  <PropertyRef Name="OrderType"/>
 </Key>
 <Property Name="OrderType" Type="Edm.String" Nullable="false" MaxLength="4" 
  sap:display-format="UpperCase" sap:filter-restriction="single-value" sap:text="Text" 
  sap:label="Sales Order Type" sap:quickinfo="Sales Document Type" sap:value- 
  list="standard"/>
 <Property Name="Text" Type="Edm.String" MaxLength="20" sap:label="Description" 
  sap:quickinfo="Sales Document Type Description"/>
</EntityType>

So nothing fancy at all, but I do not get the smartfield to display key AND description, it only displays the key. Any help is appreciated. Thanks!

发布评论

评论列表(0)

  1. 暂无评论