Overview page applications present information provided by an OData service and annotation files.
OData services and annotations are configured in the "sap.app"..."dataSources" section in the application manifest file. Each OData data source should be mapped to a SAPUI5 model, which is then referenced by the cards and the global filter configuration. Annotation files can be embedded in the OData metadata, or they can be referenced in the OData dataSource section.
Each OData type dataSources section must be exposed as an SAPUI5 model in the "sap.ui5"..."models" section. In addition, you should define a model for the i18n.properties file with i18n as the model name. If you want to use translated values in an annotation file, you must also provide an additional model for the i18n.properties file with @i18n as the model name. In the annotation file, you can reference a translation property in an annotation file using the following format:
{@i18n>@PropertyName}
For example, <PropertyValue Property="Label" String="{@i18n>@GeneralInfoFacetLabel}"/>, in the i18n.properties file, you should have a property with @PropertyName as the key. For example: # XTIT: Title @PropertyName=Property value.
Example
"sap.app": { ... "dataSources": { "ZCD204_EPM_DEMO_SRV": { "uri": "/sap/opu/odata/sap/ZCD204_EPM_DEMO_SRV/", "type": "OData", "settings": { "annotations": [ "localAnnotations_1" ], "localUri": "localService/ZCD204_EPM_DEMO_SRV/metadata.xml" } }, "localAnnotations_1": { "uri": "annotations/localAnnotations_1.xml", "type": "ODataAnnotation", "settings": { "localUri": "annotations/localAnnotations_1.xml" } } } ... }, ... "sap.ui5": { ... "models": { "i18n": { "type": "sap.ui.model.resource.ResourceModel", "uri": "i18n/i18n.properties" }, "ZCD204_EPM_DEMO_SRV": { "dataSource": "ZCD204_EPM_DEMO_SRV", "settings": {} }, "@i18n": { "type": "sap.ui.model.resource.ResourceModel", "uri": "i18n/i18n.properties" } }, ... }
Both transactional and analytic overview page cards use data exposed by OData services. This can be any service that supports the following SAP annotations:
The properties within the entity type which have been annotated with sap:semantics="aggregate" should have either of the following annotations:
For each property, use the annotation sap:label to set the short readable text suitable for labels and captions on the UI. The property represents the key of a dimension.
For each dimension, use the annotation sap:filterable="true" | "false" to specify if the dimension can be filtered. Furthermore, the property can be annotated with the sap:filter-restriction attribute, if a filter restriction exists. The attribute can take the following values:
sap:semantics: This can take several values in the context of a property. The main values we support are:
sap:unit: A path expression that identifies a property in the context of the entity type containing the currency code or unit of measure for a numeric value. This is used in conjunction with the sap:semantics to identify the property we would need to refer to in order to determine if the entity type represents an unit of measure or a currency code. For example, mounts in a currency or absolute measures must be represented as simple properties with an appropriate numeric Edm type, preferably Edm.Decimal. These numeric properties should refer to a string property containing the ISO currency or unit of measure with the sap:unit attribute.
sap:text: This would represent the value to be used for display purposes for an actual instance of the property. In the example below, it highlights the use of the values "India" and "Germany" instead of the abbreviation "IN" and "DE", respctively, for display purposes.
In the metadata document:
Actual data from backend:
Details about the above listed annovations can found in the article SAP Annotations for OData Version 2.0 on the SAP Community Network.