智能字段注释 - valuehelp 下拉列表 - 不显示描述

smartfield annotation - valuehelp dropdown - does not show description

我有一个问题,智能字段(build in xml view using WebIDE)不显示关键字段的描述,而是只在下拉列表中显示关键字段列。

示例:1(1),期望值是 1(地方税)。

我的服务是 built 使用 tcode : SEGW 并使用 WebIDE 开发 ui 和下拉列表的注释作为固定列表。

我看到了一个解决方案 smartfield annotation - valuehelp dropdown,但我无法将 sap:text 添加到我在 SEGW 中的服务。

问题:

Issue Screenshot

WebIDE 中的注释:

        </Annotations>
        <Annotations Target="Metadata.ET_FV60Header/Pmethod">
            <Annotation Term="Common.Text" String="Text1"/>
            <Annotation Term="Common.ValueListWithFixedValues" Bool="true"/>
            <Annotation Term="Common.ValueList">
                <Record>
                    <PropertyValue Property="CollectionPath" String="VH_PmtMethSet"/>
                    <PropertyValue Property="Parameters">
                        <Collection>
                            <Record Type="Common.ValueListParameterInOut">
                                <PropertyValue Property="LocalDataProperty" PropertyPath="Pmethod"/>
                                <PropertyValue Property="ValueListProperty" String="Zlsch"/>
                                <Annotation Term="Common.Label" String="Text1"/>
                            </Record>
                            <Record Type="Common.ValueListParameterDisplayOnly">
                                <PropertyValue Property="ValueListProperty" String="Text1"/>
                            </Record>
                        </Collection>
                    </PropertyValue>
                </Record>
            </Annotation>
        </Annotations>

我能够通过使用以下方法将 属性“sap:text”添加到我在 SAP 中的实体定义来解决问题;

  1. 打开对应的ZCL*MPC_EXT class using tcode SE80 or SE24.
  2. 重新定义上面class下的方法“DEFINE”。对于通过 tcode 创建的服务,可以在此方法中的此处添加其他属性:SEGW.

Code to be added under DEFINE method

** ET_Entity 是我的值帮助实体数据模型名称(不是实体集) ** FIELD_ID 是我们要在下拉列表中显示描述的上述实体下的键 属性 。 ** FIELD_DESC 是包含描述的 属性。

实体元数据:

Entity Data definition for Value Help( as Drop Down list )

您可以通过直接在 WebIDE 中添加进一步的注释(针对“助手”实体集的特定 属性)来执行相同的操作,如下所示:

    <Annotations Target="Metadata.VH_PmtMeth/Zlsch">
        <Annotation Term="Common.Text" Path="Text1"/>
    </Annotations>