我们在 SAP Fiori Elements 应用的本地注解里,能看到大量如下以 Common 和 UI 为前缀的注解属性:
![](https://img.laitimes.com/img/__Qf2AjLwojIjJCLyojI0JCLicmbw5SZjZ2N4UTZ3E2YjV2MwIjYiZmZ0gDMmNWYlV2MzUDM38CX5d2bs92Yl1iclB3bsVmdlR2LcNWaw9CXt92Yu4GZjlGbh5yYjV3Lc9CX6MHc0RHaiojIsJye.png)
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
<edmx:Reference Uri="../../catalogservice;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_COMMON',Version='0001',SAP__Origin='LOCAL')/$value">
<edmx:Include Namespace="com.sap.vocabularies.Common.v1" Alias="Common"/>
</edmx:Reference>
<edmx:Reference Uri="../../catalogservice;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_UI',Version='0001',SAP__Origin='LOCAL')/$value">
<edmx:Include Namespace="com.sap.vocabularies.UI.v1" Alias="UI"/>
</edmx:Reference>
com.sap.vocabularies.Common.v1: Common terms for all SAP vocabularies
https://sap.github.io/odata-vocabularies/vocabularies/Common.htmlcom.sap.vocabularies.UI.v1:Terms for presenting data in user interfaces
https://sap.github.io/odata-vocabularies/vocabularies/UI.htmlSAP 为 Fiori Elements 定义的所有 OData vocabulary 注解,都能在这个链接里找到:
https://sap.github.io/odata-vocabularies/vocabulary-based annotations 有两种类型:
In-place: 是 OData 服务元数据的一部分。
Ex-place: 在 metadata document 之外,由一个注解提供类Annotation Provider Class,简称 APC 额外提供。APC 同 OData 服务的绑定关系,通过事物码 /IWBEP/REG_VOCAN 维护。
These annotations are available using a query to the SAP Gateway catalog service, /sap/opu/odata/IWFND/CATALOGSERVICE;v=2/. Entity Set: ‚Annotations‘.
例如下图所示: