Skip to Content

Fiori elements – Status Icons and Semantic Colors

Continuing my series on Fiori elements … you’ll find more blogs in the Fiori elements wiki.

A simple way to add a little emphasis and pizazz to your Fiori elements apps is to add status icons and semantic colors to a text field.  Here we show how to do this using a List Report column as the example.

When you want to attract your business users’ attention, UI.Criticality is one of the easiest annotations you can use to add some visual bling to your Fiori elements apps.  It’s a great option for adding a status icon and a little semantic colour to a simple text or date field.

In this example status icons and semantic colors have been added to the text property Overall Status.  The original property text values Paid, Cancelled, New, and Delivered have been transformed with a status icon and semantic color.

Accessibility note: Notice that we automatically apply a different color *and* a different icon rather than relying on color alone.  This means that even users with red-green color-blindness can easily distinguish the criticality of different statuses. You can find more background on this topic in the success criterion of the Web Content Accessibility Guidelines.

Tip: What do we mean by semantic color? Certain colors have intrinsic meaning in many countries and cultures. In business some of the most recognized colors are those often referred to as “traffic light” colors:

  • Red meaning stop or negative
  • Yellow meaning be careful or warning,
  • Green meaning go or positive

And we add a 4th Grey meaning neutral.

There are 3 easy steps to using the criticality annotation:

  • Know how the criticality value maps to status icons and semantic colours
  • Map the criticality value to your target field
  • Add the UI.Criticality annotation to your target field

Let’s get to it!

Understanding Criticality Values

There are 4 possible criticality values. These map to status icons and semantic colors as follows:

Criticality Value Meaning Colour Icon
0 Neutral Grey
1 Negative Red  
2 Critical Yellow  
3 Positive Green  


Map the Criticality Value to your Target Field

Often the simplest way to map your criticality value to your target field is to map it to a separate calculated field of the same OData Service entity.

For example, if you are using a ABAP CDS View exposed as an OData Service, you could map the values of a text property OverallStatus of the entity SalesOrder to a new field Criticality by adding a simple CASE statement in your CDS View such as this:

Tip: Always make sure you activate and test your OData Service before adding the new value to your Fiori elements app.

Add the Criticality Annotation to your Target Field

All you need to do now is to add the criticality annotation to your target field in your Fiori element app.  You can do this:

  • In a Metadata extension of your CDS View
    • The recommended approach
  • Inline in your CDS View
    • Possible but not recommended – an easy option for sandpit scenarios
  • In the local annotations file of your Fiori element app
    • Possible & a useful option if you don’t have access to change the OData Service or you are reusing an existing OData Service in a new app and don’t want to impact any existing apps

For example if your Target Field is set up as a UI.DataField of a Fiori element List Report app, you can add your criticality annotation in a metadata extension of the CDS View like this:

Or in the SAP Cloud Platform Web IDE you can add the criticality to your local annotations file using the Annotation Modeler to assign the Criticality property as highlighted in this example:

Or directly using the XML editor of your local annotations XML file like this:

Now just run your app!


Take your Fiori elements app to the Next Level

If you are interested in Fiori elements you might also like to look at some of our videos on Youtube such as:

If you want to find out more on how to use the Annotation Modeler, you might like to look at some of our Annotation Modeler in SAP Web IDE videos on Youtube.

If you are going to SAP Teched 2017 and Interested in learning more about Fiori elements you might like to attend these sessions:

  • DX201 What’s New with SAP Fiori Elements
  • S4H276 Build a List Report SAP Fiori App: ABAP Programming Model for SAP S/4HANA
  • S4H279 Build Transactional SAP Fiori App: ABAP Programming Model for SAP S/4 HANA
  • DX264 Overview Page in SAP Fiori Elements
  • DX266 SAP Fiori Elements – Analytical List Page

And you can find more information on Developing apps with SAP Fiori elements in the SAPUI5 SDK and on the ABAP Programming Model for Fiori in the SAP Help Portal.

Screenshots shown on:

  • ABAP Development Tools on Eclipse Neon
  • Web IDE Version: 170720 
  • SAPUI5 version 1.46.11

Brought to you by S/4HANA RIG

You must be Logged on to comment or reply to a post.
  • Thanks, Jocelyn Dart Very usefull post!

    But I have one problem: when using BOPF DRAFT 2.0
    If you open object in change mode, then these fields always take the grey value (like criticality value = 0). In the “display” mode, everything displayed correctly

    Is this standard behavior?


    • Oops sorry somehow that answer went missing… yes that’s correct. When you are in Draft mode the data is technically being held in a separate database table so it doesn’t form part of the main CDS view and calculated fields such as criticality won’t be calculated until the draft data is Saved.

      Once you Save your data it is active and the semantic colours will show.

  • Hello,

    Thanks for your insigth on it 🙂

    But…. I’ve pass over 3h to discover that this feature is not available in the analytical table. So I would like o ask you, why it is not the same ? In the analytical scenario, this feature should be very usefull ?

    Probably I missed something 😉

    Kind regards,


    • Hi Joseph,

      It’s definitely available in the analytical table – I’ve seen this used.

      Why exactly do you think it’s not available?




      • Hello Jocelyn,

        In fact, in my scenario, I have a CDS view which provide annotation (just the minimum). The main annotations iare supported by an annotation.xml file from my Fiori element List report.

        After reading your blog I set the right properties into the annotation’s file and I drive the list report with my CDS with this annotation :

        @DefaultAggregation: #SUM

        When I set that, the list report is an analytical table, and in that case, the icon/colors annotation does not work. When I remove it, the list report is a responsive table, and in this case it works.

        I’m wrong somewhere ?




        • Hi Joseph,

          I came to the same result. Changing the list settings in the manifest.json to Grid oder Analytical leads to unavailability of semantic colors.

          The same happens when setting @Analytics.query: true. The service then gets its information from the query result, which is not capable to  display semantic colors.

          Might be a similiar reason for Grid/Analytical Table annotations first problem. Real pity. Would be awesome if this could be implemented. 



          • Hi folks, Good news is that this is coming in a future SAPUI5 release so keep watch on the SAPUI5 release “What’s New” updates.



          • Hi Jocelyn

            Same for me, it does not work with Analytical Table, even in Web IDE.

            Do you have more information with what release it will work in combination with Analytical Table?


            Best regards


          • Hi Jocelyn Dart ,

            using semantic colors inside the Analytical Table of a Fiori Elements Analytical List Page still seems to be impossible. While a responsive table works fine, the analytical table shows no coloring at all with UI5 1.60 or 1.73.

            This is particulary annoying, as the Fiori design guidelines suggest using semantic coloring inside the table [1]. Is there any news on this?




          • Actually, the analytical table interprets the criticality annotation. However, it does not automatically request the additional field containing the criticality value. That’s why the annotated field stays gray-ish.

            What solves the issue, are separate presentation variants for chart and table. The table variant should request at least the required criticality fields. Always requesting the criticality fields does not work though, as it interferes with the aggregation.

          • Is this issue resolved with the latest UI5 version? If so from which UI5 version it is available?

            At the moment the criticality does not have any importance on our Analytical table of SAP FE ALP report.


            Vijay Jala

  • Hello Jocelyn,

    Is there any standard CDS example available which can be reffered for DATA POINT.

    I tried placing a Data point in Header Facet but its not working.



    • Hi Ashutosh

      We keep improving the documentation in the SAPUI5 SDK for how to work with Fiori elements – see this description of DataPoints in the current documentation.

      Also announced at SAP TechEd 2018 – see session “What’s new in Fiori Elements” was the new Visual Editor (expanding on the current UI Adaptation Editor) that will enable WYSWYG changes and push down to CDS. This will gradually expand over time to include more floorplans & options over time

      So that should also help.

      In the meantime my best suggestion would be to look at the coding of the standard delivered Fiori apps in S/4HANA for ideas. 🙂


      • Hi Jocelyn Dart

        Inserting a DataPoint into the Object Page Header works fine by annotating any field with


        But how to show a Header FieldGroup and a DataPoint side-by-side? The YouTube video you linked just adds two DataPoints and I am unsure how to reproduce the SDK annotation result by using CDS – there is no qualifier for DataPoints. I tried the following:

        @UI.facet: [
                       purpose: #HEADER,
                       type: #FIELDGROUP_REFERENCE,
                       targetQualifier: 'Supplier',
                       position: 10,
                       importance: #HIGH
                       purpose: #HEADER,
                       type: #DATAPOINT_REFERENCE,
                       targetElement: 'Status'
                       position: 20,
                       importance: #HIGH
        @UI.dataPoint: { title: 'Status' }
        @UI.fieldGroup: [{qualifier: 'Supplier', position: 10, importance: #HIGH }]

        But this shows only the field group, no status data point.

        Is there a reference, or is it even possible?


  • Hello Jocelyn,

    thanks for this nice post 🙂

    I try to do the same in my list report. Here I want a status description (with criticality and without icon).

    But I have a custumer rule to get description status who depend of two different fields. So I added some features in Class OO DPC_EXT and that works only when I add my fields in the list report (ui.lineitem). When I remove them I lost my criticality status because OData (I think) do not consume them and I have not this fields in my DPC_EXT.

    Do you know how hide this fields but get it OData request ?

    Thank you very much.

      • Thanks Alexandre – I’ve added the blog series into the Fiori elements wiki

        Oh and a small note if you have future questions – please post them to  That makes it easier for everyone to find them and participate in getting the answer You can always use the Jocelyn Dart  mention option to let me know.

  • Hi Jocelyn,

    I have a list report using HANA xsodata service. I followed the steps as per this blog but the semantic colors/ icons do not show up . Also, List report is not analytical type.

    are there any limitations for xsodata vs ABAP CSD views  ?



    • Hi Tanveer,

      Good question – yes there certainly are limitations when using HANA xsodata services, as they do not currently support many of the annotations we need for Fiori elements.

      This is one of the many reasons why S/4HANA uses ABAP CDS Views everywhere and not HANA CDS Views.  As ABAP CDS Views let us use the power of HANA underneath, while adding the advantages of annotations, metadata extensions, software lifecycle maintenance etc.

      There are very few scenarios now where we still recommend HANA views – and those are usually very complex analytics such as needed by Machine Learning.

      So as much as possible try to learn and use ABAP CDS Views as per the ABAP Programming Model for SAP Fiori. You will find more tutorials and links in the Fiori elements wiki to get you started.



    • Hi Hiroyuki,

      Can you explain your business use case in a little more detail? There might be an alternative approach I can suggest.

      We only permit settings that are included as part of the Fiori design guidelines.

      The guidelines usually suggest an alternative for different use cases.

      E.g. This is the reference for semantic colors which has a link to how Fiori uses colours to represent different value states such as error, warning, etc.




        Hi dart


        Thanks for the response

        My requirement is using CDS I display the table as list report in FIORI.

        there is field which will be blank or X.

        if it is plank I would like to display it an just a green icon of a test as COMPLETED in green colour.

        So I can across your post but this displays the field value along with a green box with which the user isn’t satisfied.

        So would like to know the feasibility.

  • Hi Jocelyn,

    Hope you’re well. I was hoping you could advise on a matter which is unrelated to the topic of this post. It relates to the usage of KPI tags in the Analytical List Page. I’ve noticed on site ( it is possible to create KPI tags at both the header of the analytical list page as well as the body of the analytical list page…


    I’ve managed to recreate a KPI tag at the header level but I’m trying to understand how to insert KPI tags into the ‘Project Section’ displayed in the analytical list? I’ve tried looking online but couldn’t find any resources. Any suggestions?

    Many Thanks


    • HI Qaiser

      If you have a query that is NOT related to the post, please raise a separate question in  If it’s not related to the query I may not know anything about it.  And it’s very hard to answer complex queries. from blog comments. Also as you can see like most of us I only get to help out in SAP Community in my rare spare time. So putting in vastly increases the likelihood of getting an answer.

      Appreciate your understanding in this


  • Hi Jocelyn,

    Hope you are doing good!

    Can we able to set the Criticality for the custom column values as below in case statement.


    <Cond> value ‘String1’

    <Cond> value ‘String2’


    <Cond> value ‘String3’

    end as StringCol

    I have to set the Criticality Value for StringCol instead of ending with Criticality.

    Kindly let me know your Inputs.



    • Hi Shiva

      Ok I would recommend asking about this in the ABAP topic area as well.

      If I’m understanding what you are trying to do, i.e. use a Case statement to derive your StringCol field, and then add criticality on top of that…

      Typically you would need a hierarchy of CDS Views to do this, i.e. an original CDS View which calculates/derives the StringCol value, and then a consumption view on top of that assigns a criticality to your derived StringCol value.  It’s the consumption view on top that you use for your SAP Fiori app.

      I’m not an ABAP CDS View expert… however my understanding is that this is needed to deal with the way data is aggregated and persisted.

      Perhaps someone in the ABAP topic can give you a more elegant solution

      All the best


  • Hi Jocelyn,

    Very useful blog!

    I do not require @UI: {lineitem ….

    annotation. Is there any other annotation as well where I can mention the criticality.


    Thanks and regards,

    Priyanka Sadana