SAP Fiori Element List Report Step By Step (2024)

Introduction

Fiori Element List reports is one of the standard sap Fiori floorplans which offers features like users can view a large set of items. User can search the relevant items using filters, sorting, and grouping as out of box feature of this floorplan. such reports support without or minimal code and configurations on the client-side. All you require an annotation-based OData service either via CDS view exposed with annotations or with vocabulary integrated into gateway layer while OData development.

you can explore more about the list report floor plan from here –https://experience.sap.com/fiori-design-web/list-report-floorplan-sap-fiori-element/.
All Fiori Element Floorplan UI is a metadata-driven approach to Fiori development.
UI controls get generated at the client-side while sensing annotations attached to an entity type in OData metadata.

Setup cloud platform destination for OData

Let’s get started with our sap cloud platform and setup a northwind public OData service for our list report development.
once you logged into your cloud platform neo account goto connectivity- > Destinations option of the left-hand side panel.

SAP Fiori Element List Report Step By Step (1)

now click on New Destination and fill all the required information as below.

SAP Fiori Element List Report Step By Step (2)


Let’s Start the development on SAP WEB IDE

Now go to you sap web ide and right-click on workspace -> new -> project from template ->

SAP Fiori Element List Report Step By Step (3)

Now click next and fill in the project-related basic information.

SAP Fiori Element List Report Step By Step (4)

Now click next and provide data connection details which you added in the destination of sap cloud platform.

SAP Fiori Element List Report Step By Step (5)

Now skip the annotation selection as the northwind v2 service by default doesn’t provide the annotation file from the backend. Go to the template customization section and select the entity type from the dropdown on which you want to create a list report app and click on the Finish button.

SAP Fiori Element List Report Step By Step (6)

Now application project file is created in your workspace with all required files to run this app. select the project and click on the run button and a popup will come to select the file to run here you can select flpSandbox.html to run the app in the browser.
once your app opens in a browser it does not open directly but with a tile, you can click your project name tile and let's open the app.

SAP Fiori Element List Report Step By Step (7)

Once your app opens up it will come as below screen by default hence we have not provided any annotations from the backend so we need some UI annotation configurations to load the columns.

SAP Fiori Element List Report Step By Step (8)

Now we can create UI annotation file for our project to configure the UI of the list report using the annotation modeler.

SAP Fiori Element List Report Step By Step (9)

Create Annotation file ->right click on web app >> new >> Annotation file >> rename option will be there and Odata service to which it needs to bind also be there.

Now open your annotation file in annotation modeler mode by default your entity will select which you chose during project creation.

SAP Fiori Element List Report Step By Step (10)

Now click on the + button on the Local Annotation node under your entity type and a popup will come for UI annotation option and here you can select LineItem annotations for the list report.

SAP Fiori Element List Report Step By Step (11)

Once LineItem added you can again select the + button on LineItem Node and select the data field node.

SAP Fiori Element List Report Step By Step (12)

Your DataField Node will contain a path for all the properties under your Entity Type and each time you can select the number of data fields the same way.
You can create a data field based on your column requirement of the list report column as each data field here will become a column in your List table.

SAP Fiori Element List Report Step By Step (13)

Now you can save your LineItem Annotations and re-run your app. This time your LineItem data fields will be loaded as a column by default and you can click on go to load the data in List table.

SAP Fiori Element List Report Step By Step (14)

For the Filter section on the list report, you can select filter fields also from entity type using- SelectionFields Annotation.

SAP Fiori Element List Report Step By Step (15)

Under SelectionField annotation you can select Item.

SAP Fiori Element List Report Step By Step (16)

Item will provide you all the available properties under the entity type so you can select the property provided as filterable from metadata. Now save your files and run your app again. you will see your app below.

SAP Fiori Element List Report Step By Step (17)


Adding Criticality colors to the Fiori element list report data field.

Adding Criticality color to any field data of thetable you can select the + button on any UI.DataField of LineItem in an annotation modeler.

SAP Fiori Element List Report Step By Step (18)

Adding criticality color to ReorderLevel Data field

SAP Fiori Element List Report Step By Step (19)

Now provide criticality values like Critical for orange color, Positive for the green color, Negative for red color, etc. Save and run the app again to see the changes.

SAP Fiori Element List Report Step By Step (20)

Developers can select Expression Type of Criticality from EnumMember to the path and provide values from the backend property of entity set based on some backend logic dynamically colors can possible.

I have just provided the Critical value to the ReorderLevel DataField.

SAP Fiori Element List Report Step By Step (21)


Adding Progress bar to the Fiori element list report data field

Adding the Progress bar to the list report requires annotation – UI.dataFieldForAnnotation. You can select this annotation as a part of UI.LineItem.

SAP Fiori Element List Report Step By Step (22)

Now you require one more annotation to provide as a target to above annotation so lets add UI.DataPoint annotation under your entity type -Local Annotation.

SAP Fiori Element List Report Step By Step (23)

Under UI.DataPoint annotation select – Value, TargetValue, Visualization properties.

SAP Fiori Element List Report Step By Step (24)

Now provide Entity type property name in value field based on which you want to create progress bar. Here i am selecting UnitsInStock Property.

SAP Fiori Element List Report Step By Step (25)

Save the annotations and run your app.

SAP Fiori Element List Report Step By Step (26)


Adding selection variants to the list report.

You can add selection variants in the Fiori element list report using UI.SelectionVariant annotations under Local Annotation of the entity type.

SAP Fiori Element List Report Step By Step (27)

Under Selection variant annotation add Text(it will become the label of tab) and SelectOptions properties.

SAP Fiori Element List Report Step By Step (28)

Under SelectOptions type provide Ranges and SelectionRangeType and provide String value of variant filter as it will become filter parameter value in batch read operations like$filter=CategoryId eq ‘1’.
Now add some Qualifier to UI.SelectionVariant.

SAP Fiori Element List Report Step By Step (29)

After adding annotation add some settings for list report in the manifest file of your app under pages->ListReport section like mention below.

SAP Fiori Element List Report Step By Step (30)

Property – “quickVariantSelectionX” will be required which provide variants starting from 0 indexing and a key will be your qualifier added for SelectionVariant.

Save the files and run the app.

SAP Fiori Element List Report Step By Step (31)

Category tab added on List report.

Changing List report from default single select to multi-select.

By default List report app behave as a single-row select type if you want to make list report to multi-select you can add a property of list report in the manifest as “multi-select”:true.

SAP Fiori Element List Report Step By Step (32)

App Changed to multi-row select

SAP Fiori Element List Report Step By Step (33)


Bold highlight any data field of list report

You can highlight any data field with bold text using Common.SemanticKey annotation under Local Annotation node.

SAP Fiori Element List Report Step By Step (34)

Add Item under SemanticKey.

SAP Fiori Element List Report Step By Step (35)

Provide any Entity type property for Item PropertyPath and run the app. For this Report, I have highlighted ProductName.

SAP Fiori Element List Report Step By Step (36)

Product Name column with bold text.

Our Basic app is ready to deliver with some more features using annotations only.

Conclusion

Thanks for reading.
I hope this blog helps you to understand the use of various UI annotations to develop an awesome Fiori application without code.

Although the NEO environment support by SAP has been deprecated from TRIAL accounts the development environment is still available for purchase licenses for web ide.

In the Above blog, I just wanted to demonstrate the use of UI annotation to develop a List report without any JS code or SAP UI5 API.

I will keep updating this blog post with more UI annotation use cases.

SAP Fiori Element List Report Step By Step (2024)
Top Articles
Latest Posts
Article information

Author: Mr. See Jast

Last Updated:

Views: 5904

Rating: 4.4 / 5 (75 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Mr. See Jast

Birthday: 1999-07-30

Address: 8409 Megan Mountain, New Mathew, MT 44997-8193

Phone: +5023589614038

Job: Chief Executive

Hobby: Leather crafting, Flag Football, Candle making, Flying, Poi, Gunsmithing, Swimming

Introduction: My name is Mr. See Jast, I am a open, jolly, gorgeous, courageous, inexpensive, friendly, homely person who loves writing and wants to share my knowledge and understanding with you.