You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

非RAP场景下Fiori Elements Object Page表格所需XML注解咨询

非RAP场景下Fiori Elements Object Page表格的XML注解配置(Gateway SEGW)

以采购订单(主实体PurchaseOrder)关联采购订单项(子实体PurchaseOrderItem)为例,需在SEGW项目的XML注解文件中完成以下配置:

1. 主实体(PurchaseOrder)的注解配置

需定义Object Page的结构,并将子实体关联配置为可展示的表格区域:

<Annotations Target="ZPO_SRV.PurchaseOrder">
    <!-- 标记父子实体的组合关系,Fiori Elements需此识别关联类型 -->
    <Annotation Term="Core.Composition" Path="to_Items"/>
    
    <!-- 配置Object Page的结构,添加包含订单项表格的Section -->
    <Annotation Term="UI.ObjectPage">
        <Record>
            <PropertyValue Property="Sections">
                <Collection>
                    <!-- 订单项表格对应的Section -->
                    <Record Type="UI.ObjectPageSection">
                        <PropertyValue Property="Title" String="采购订单项"/>
                        <PropertyValue Property="Facets">
                            <Collection>
                                <Record Type="UI.ReferenceFacet">
                                    <PropertyValue Property="Target" AnnotationPath="@UI.LineItem#PurchaseOrderItems"/>
                                </Record>
                            </Collection>
                        </PropertyValue>
                    </Record>
                </Collection>
            </PropertyValue>
        </Record>
    </Annotation>
    
    <!-- 关联子实体的LineItem配置,指向子实体的LineItem注解 -->
    <Annotation Term="UI.LineItem" Qualifier="PurchaseOrderItems">
        <Collection>
            <Record Type="UI.DataField">
                <PropertyValue Property="Value" Path="to_Items"/>
            </Record>
        </Collection>
    </Annotation>
</Annotations>

2. 子实体(PurchaseOrderItem)的注解配置

需定义表格要展示的列字段,包括标签、数据绑定等:

<Annotations Target="ZPO_SRV.PurchaseOrderItem">
    <!-- 定义表格的列集合 -->
    <Annotation Term="UI.LineItem">
        <Collection>
            <!-- 订单项编号列 -->
            <Record Type="UI.DataField">
                <PropertyValue Property="Label" String="订单项编号"/>
                <PropertyValue Property="Value" Path="ItemNumber"/>
            </Record>
            <!-- 物料编号列 -->
            <Record Type="UI.DataField">
                <PropertyValue Property="Label" String="物料编号"/>
                <PropertyValue Property="Value" Path="Material"/>
            </Record>
            <!-- 数量列 -->
            <Record Type="UI.DataField">
                <PropertyValue Property="Label" String="数量"/>
                <PropertyValue Property="Value" Path="Quantity"/>
            </Record>
            <!-- 金额列 -->
            <Record Type="UI.DataField">
                <PropertyValue Property="Label" String="金额"/>
                <PropertyValue Property="Value" Path="Amount"/>
            </Record>
        </Collection>
    </Annotation>
</Annotations>

关键配置说明

  • Core.Composition:标记主实体与子实体的组合关联,确保Fiori Elements正确识别父子数据关系,支持表格的联动加载。
  • UI.ObjectPage.Sections:将表格作为一个独立Section添加到Object Page中,可自定义Section标题。
  • UI.LineItem:子实体的该注解直接定义表格的列内容,每个UI.DataField对应一列,需指定字段的标签和绑定路径。

内容的提问来源于stack exchange,提问作者Bruno Franzini

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.20 13:57:34