智能字段注释 - valuehelp 下拉菜单 - 不显示描述 [英] smartfield annotation - valuehelp dropdown - does not show description

查看:31
本文介绍了智能字段注释 - valuehelp 下拉菜单 - 不显示描述的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,即智能字段(使用 WebIDE 在 xml 视图中构建)不显示关键字段的描述,而是只在两个下拉列表列中显示关键字段.

I have a problem where the smartfield (build in xml view using WebIDE) does not show the description of the key field instead just shows the key field in both the dropdown list columns.

示例:1(1) 并且期望值为 1(地方税).

example : 1(1) and the expectation is 1( local tax ) .

我的服务是使用 tcode:SEGW 构建的,并使用 WebIDE 将下拉列表的 ui 和注释开发为固定列表.

My service is built using tcode : SEGW and using WebIDE to develop the ui and annotation for the dropdown as a fixed list.

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

I see a solution smartfield annotation - valuehelp dropdown , but I am unable to add the sap:text to my service in SEGW.

问题:

问题截图

WebIDE 中的注释:

Annotation in 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 中的实体定义;

I was able to solve the problem by adding the property "sap:text" to my entity definition in SAP using the following;

  1. 使用 tcode SE80 或 SE24 打开相应的 ZCL*MPC_EXT 类.
  2. 重新定义方法DEFINE";在上面的类下.可以在此方法中为通过 tcode 创建的服务添加其他属性:SEGW.

DEFINE 方法下添加的代码

** ET_Entity 是我的 Value Help 实体数据模型名称(不是实体集)** FIELD_ID 是上述实体下的关键属性,我们希望在下拉列表中向其显示描述.** FIELD_DESC 是包含描述的属性.

** ET_Entity is my Value Help Entity data model name ( not entity set) ** FIELD_ID is the key property under the above entity to which we want to display the description in the dropdown list. ** FIELD_DESC is the property that contains the description.

实体元数据:

价值帮助的实体数据定义(作为下拉列表)

这篇关于智能字段注释 - valuehelp 下拉菜单 - 不显示描述的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆