Show TOC

CriticalityLocate this document in the navigation structure

Get information about how to use data points to display criticality on SAP Fiori UIs.

A more usable variant of the UI annotation @UI.dataPoint also contains information about the criticality, the trend, and the name of a person responsible.

You can use the sub-annotation @dataPoint.criticality to express if a value is positive or negative, for example.

You can use the sub-annotation @dataPoint.trend to express if a value has decreased or increased, for example.

In this case, the properties targetValue, criticality, and trend are already evaluated in the CDS view. In the CDS view, the target value is already calculated, and if the current value thus is negative or positive, and if the current value has improved or declined, for example. These values are only referred to from the @UI.dataPoint annotation.

Data can be defined as being either positive, critical, or negative. These data can be statuses, for example.

You can use the following sub-annotation to highlight criticality:
  • UI.dataPoint.criticality

    You define this UI annotation at view level. It refers to the elements that are to be used in the chart. Additionally, you can provide a title and description.

    The table below lists the values that are valid for the UI annotation @UI.dataPoint.criticality, and shows how these values are visualized on the UI:
    Table 1: Values and Visualization of Criticality

    Value

    Description

    Visualization in Color

    1

    Negative

    Red

    2

    Critical

    Yellow

    3

    Positive

    Green

    Sample Code
    ...
    define view ZExample_SalesOrdersByCustomer as select from ... as so {  
      key so.buyer_guid as BuyerGuid,
    
      @Semantics.currencyCode: true
      so.currency_code as CurrencyCode, 
      
      @UI.dataPoint: {
        title: 'Gross Amount',
        targetValueElement: 'TargetAmount',  	-- Reference to element
        criticality: 'AmountCriticality',  	-- Reference to element
        trend: 'AmountTrend',        		-- Reference to element
      }
      @Semantics.amount.currencyCode: 'CurrencyCode'
      so.actual_amount as ActualAmount,
      
      @Semantics.amount.currencyCode: 'CurrencyCode'
      so.target_amount as TargetAmount,  
      
      so.criticality as AmountCriticality,   
     
      so.trend as AmountTrend
    }