You can configure standard list items and object list items in list reports.
This topic is currently only applicable to SAP Fiori elements for OData V2.
Both list items can display standard, numeric, and date fields.
Note the following:
-
UI.LineItem
is the default annotation term used to render a list item similar to a table. To render the list, theUI.LineItem
should contain onlyDataField
andDataFieldForAnnotation
elements. Any other kind ofDataFieldAbstract
is not supported. -
DataFieldForAnnotation
with aDataPoint
target is used for all fields shown on the right side of the list item.DataField
is used for these fields if no data points are defined. These fields are optional. -
The fields are sorted by their importance. However, if a data point exists, it will be used regardless of its importance. The default importance is taken as
Medium
for data fields and data points in which theUI.Importance
property has not been defined. -
The standard and object list items support the
UI.Criticality
property so that all data points have semantic coloring enabled. -
onListNavigationExtension
is enabled for internal navigation. For more information, see Example: Enable Internal Navigation to Different Detail Page.
You can define the annotation for the standard list item as follows:
<Annotation Term="UI.LineItem"> <Collection> <Record Type="UI.DataField"> <PropertyValue Property="Value" Path="ProductForEdit" /> <Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High" /> </Record> <Record Type="UI.DataField"> <PropertyValue Property="Value" Path="ProductCategory" /> <Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/Medium" /> </Record> <Record Type="UI.DataField"> <PropertyValue Property="Value" Path="ProductPictureURL" /> </Record> <Record Type="UI.DataFieldForAnnotation"> <PropertyValue Property="Target" AnnotationPath="@UI.DataPoint#Price" /> </Record> </Collection> </Annotation> <Annotation Term="UI.DataPoint" Qualifier="Price"> <Record> <PropertyValue Property="Value" Path="Price" /> <PropertyValue Property="Criticality" Path="PriceCriticality" /> </Record> </Annotation>
You need to update the manifest.json
file of the app as follows:
"pages": { "ListReport|STTA_C_MP_Product": { "entitySet": "STTA_C_MP_Product", "component": { "settings": { "isWorklist": true, "tableSettings": { type: "StandardList" }, "smartVariantManagement": false } } } }
Follow the guidelines mentioned in the following table for adding DataFields
and DataPoints
under the UI.LineItem
annotation:
Standard List Item Property |
Entity Annotation |
Location of the Property on the List Item UI |
Additional Comments |
---|---|---|---|
|
First data field of |
Top left |
|
|
Second data field of |
Bottom left |
|
|
First data point |
Top right |
If no data point exists, then the next data field is used, that is, the third data field. |
|
First data point or criticality, or first data point or |
Color |
If no data point exists, then the default state is set to |
|
First data field marked with the |
|
The order of this data field is not important. It can be placed anywhere under the |
You can define the annotation for an object list item as follows:
<Annotation Term="UI.LineItem"> <Collection> <Record Type="UI.DataField"> <PropertyValue Property="Label" String="Sales Order ID" /> <PropertyValue Property="Value" Path="SalesOrderID"/> <Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/> </Record> <Record Type="UI.DataField"> <PropertyValue Property="Value" Path="BusinessPartnerID"/> <Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/Medium"/> </Record> <Record Type="UI.DataField"> <PropertyValue Property="Value" Path="CurrencyCode"/> <Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/Low"/> </Record> <Record Type="UI.DataFieldForAnnotation"> <Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/High"/> <PropertyValue Property="Target" AnnotationPath="@UI.DataPoint#NetAmount" /> </Record> <Record Type="UI.DataFieldForAnnotation"> <PropertyValue Property="Target" AnnotationPath="@UI.DataPoint#GrossAmount" /> </Record> <Record Type="UI.DataFieldForAnnotation"> <Annotation Term="UI.Importance" EnumMember="UI.ImportanceType/Low"/> <PropertyValue Property="Target" AnnotationPath="@UI.DataPoint#TaxAmount" /> </Record> </Collection> </Annotation> <Annotation Term="UI.DataPoint" Qualifier="NetAmount"> <Record> <PropertyValue Property="Value" Path="NetAmount" /> <PropertyValue Property="Criticality" EnumMember="com.sap.vocabularies.UI.v1.CriticalityType/Positive" /> </Record> </Annotation> <Annotation Term="UI.DataPoint" Qualifier="GrossAmount"> <Record> <PropertyValue Property="Value" Path="GrossAmount" /> <PropertyValue Property="Criticality" EnumMember="com.sap.vocabularies.UI.v1.CriticalityType/Negative" /> </Record> </Annotation> <Annotation Term="UI.DataPoint" Qualifier="TaxAmount"> <Record> <PropertyValue Property="Value" Path="TaxAmount" /> <PropertyValue Property="Criticality" EnumMember="com.sap.vocabularies.UI.v1.CriticalityType/Critical" /> </Record> </Annotation>
You need to update the manifest.json
file of the app as follows:
"pages": { "ListReport|STTA_C_MP_Product": { "entitySet": "STTA_C_MP_Product", "component": { "settings": { "isWorklist": true, "tableSettings": { type: "ObjectList" }, "smartVariantManagement": false } } } }
Follow the guidelines in the following table for adding DataFields
and DataPoints
under the UI.LineItem
annotation:
Object List Item Property |
Entity Annotation |
Location of the Property on the List Item UI |
Additional Comments |
---|---|---|---|
|
First data field of |
Top left |
|
First |
Second data field of |
Middle left |
|
|
First data point |
Top right |
If no data point exists, then the next data field is used, that is, the third data field. |
|
First data point or criticality, or first data point or |
Color |
If no data point exists, then the default state is set to |
|
Second data point |
Middle right |
If no data point exists, then the next data field is used. That is, the third data field is used if one data point is provided, or the fourth data field is used if none is provided. |
Second |
Third data field |
Bottom left |
If the third data field is already used, the next available data field is used. For example, the fifth data field is used if no data points were provided, or the fourth data field is used if only one data point was provided. |
|
Third data point |
Bottom right |
If no data points exist, the next data field is used. That is, the fourth data field is used if two data points were provided, or the fifth data field is used if only one data point was provided, or sixth data field if none is provided. |