Tiven Wang
Wang Tiven April 18, 2019
425 favorite favorites
bookmark bookmark
share share

App developers can use SAP Fiori elements to create SAP Fiori applications based on OData services and annotations that don’t need JavaScript UI coding . The resulting app uses predefined views and controllers that are provided centrally. This means no application-specific view instances are required. The SAPUI5 runtime interprets metadata and annotations of the underlying OData service and uses the corresponding views for the SAP Fiori app at startup.

本文所使用的 SAP UI5 Version 是 1.52

本文中的 Annotations 的 namespace UI 皆为缩写,在 Fiori App 的 Annotation 文件中配置别名如下

<edmx:Reference Uri="/sap/bc/ui5_ui5/ui2/ushell/resources/sap/ushell/components/factsheet/vocabularies/UI.xml">
  <edmx:Include Alias="UI" Namespace="com.sap.vocabularies.UI.v1"/>
</edmx:Reference>

Fields

ABAP CDS Annotations

Filter Field Selection

UI.SelectionFields Annotation 表示哪些字段可以用作 Select Filters

<Annotation Term="UI.SelectionFields">
  <Collection>
    <PropertyPath>DeliveryCalendarYear</PropertyPath>
    <PropertyPath>SoldToParty</PropertyPath>
    <PropertyPath>Product</PropertyPath>
    <PropertyPath>MainProductCategory</PropertyPath>
    <PropertyPath>DeliveryCalendarQuarter</PropertyPath>
    <PropertyPath>SalesOrderOverallStatus</PropertyPath>
  </Collection>
</Annotation>

至于字段各种搜索帮助怎么配置,可以参见 SmartFilterBar 的 Annotation 配置。

Visual Filter

除了使用标准的 Smart Filter Bar 之外,SAP Fiori Element 的 Analytical List Page 为了增加分析界面的既视性,还增加了 Visual Filter 即各种交互式图表。

配置 Visual Filter 费了一番周折。

Analytic Cards

Analytic Cards

Semantic Coloring

Criticality 临界 Thresholds 阈值

Smart Controls

Defining CDS Annotations for Metadata-Driven UIs

SmartChart setup

Controls in the sap.ui.comp library (smart controls) focus strongly on SAP Fiori elements.

如果要对一个 SmartChart 的 Model 增加额外的 Filter 的话可以在事件 beforeRebindChart 的监听函数里

onBeforeRebindChart: function(oEvent) {
  oEvent.getParameters().bindingParams.filters.push(new sap.ui.model.Filter("SoldToParty", sap.ui.model.FilterOperator.EQ, "100000005"));
}

SmartVariantManagement

Personalization Dialog

https://sapui5.hana.ondemand.com/#/topic/03265b0408e2432c9571d6b3feb6b1fd.html

Doing Component Reuse in Fiori Elements

Implement Fuzzy Search Help with UI5 Annotation for Fiori Application

https://help.sap.com/doc/saphelp_nw75/7.5.5/en-US/8a/8415c033d441b2b079a53aff129463/frameset.htm

https://wiki.scn.sap.com/wiki/display/Fiori/Fiori+elements

Similar Posts

Comments

Back to Top