Sunteți pe pagina 1din 69

BOPF-CDS Integration DML Operation in Fiori --> BOPF x CDS

Transactional Capability into Fiori App achieved by


BOPF

Put the BOPF annotations in the CDS view


@objectModel --view level annotation
4 basic elements from Fiori -2.0;

List Report (LR)


................. Object Page (OP)
Analytical List Page (ALP)
Overview Page(OVP)

Create, Del. button will be added to Fiori app

F4 help is possible through associations in CDS views


[ ]

3 different types of Fiori Elements available:


List report: Allows users to filter and work with
large amounts of data.
Object page: Shows all facets of a single
business object.
Overview page: Immediate domain specific
How-to define CDS View/Entity to generate a BO with Header and Item:
Association from ROOT to ITEM would be annotated as:

@ObjectModel.association.type: [ #TO_COMPOSITION_CHILD ]

Other possible values are: #TO_COMPOSITION_PARENT, #TO_COMPOSITION_ROOT


--

//BOPF Association to SO Header

@objectmodel.association.type: [#TO_COMPOSITION_PARENT ,#TO_COMPOSITION_ROOT ]

_SalesOrder[1:inner].SoldToParty,
--
----------Currency Conversion Function is available in ABAP CDS:

currency_conversion( amount => vbap.netwr,source_currency => vbap.waerk, target_currency => cast('USD'as abap.cuky ), exchange_rate_date

=> vbak.audat ) as NetValUSD

--
SAP - ABAP Programming Model for SAP Fiori

*_I_* type:ddls

*_C_* type:ddls

CTRL+U Unlock Editor

TADIR in SE16; PGMID = ‘R3TR’, OBJECT = ‘DDLS’;


@objectmodel.datacategory:#TEXT --if you want language specific like 'spras' --one key element is language
@objectmodel.representativekey: ' ' - is use if you want to join this view to another view - anchor to any
association will point to this key field - set in both views before joining
@objectmodel.text.element: ['keycolumn'] -- inside the select fields -- above keys to show their name
--'ll showup as prompts in analytics
@Analytics.datacategory: #basic; #consumption if text view: @objectmodel.datacategory: #TEXT
@analytics.dataextraction.enabled: true - if you want to merge basic view w/ another view
- Dimension view is used to join to form a cube, not used in Cube Category
@VDM.Viewtype: #Basic / #Cube --Cube will have more redundancy of data than fact category-no keys n Cube
@semantics.text:
...... true No data extraction in Cube Category, Cube allows more data redundancy
@Semantics.quantity.unitOfMeasure: 'DistanceUnit' --should match alias name below
@DefaultAggregation: #SUM
.......
*spfli.distance as Distance,
@Semantics.unitOfMeasure: true
....... @semantics.currency: true
*spfli.distid as DistanceUnit,
_Composite View_:- Add as many keys & columns as possible, include columns from view's other associations _
Type "_ "and code completion, will add associations into view
Checking Composite View before Consumption View: in ECC - Display Transient Provider Preview
T-code: RSRTS_ODP_DIS You test Cubes in this T-Code
Consumption View:
Dimensions: Rows:- @analyticsdetails.query.axis: #ROWS
Measures: Columns: @analyticsdetails.query.axis: #COLUMNS
You don't need to annotate as measures as they've been annotated before in either basic or composite views
Consumption filter:- goes ABOVE column, you want to have a filter ON
@Consumption.filter: {selectionType: #SINGLE, multipleSelections: false, mandatory: true }
If you add a formula 3 annotations:
1. @analyticsdetails.query.axis: #columns
2. @Endusertext.label: ' short name'
3. @Defaultaggregation: #Formula
Note: Association and Join; you cannot use association table in WHERE clause
You join and later perform associations, then you'll be able to use only Joined tables in WHERE Clause
You can add same association twice, if you want to use more than 1 column from the associated table
Composite View:
-- Enhance Basic Views, by adding more keys -- ---Grab more columns from some other associations
-- Add an association followed by period: eg..
-- When U expose foreign key associations in the select list, you have to expose them down in associations too
Consumption view: @consumption.filter:{ code_completion(selectionType,,,, }
Use of Filters, classify as Rows & Columns: Dimension:-Row s Measures:-Columns
@analytics.query: true @analyticsdetails.query.axis
@odata.publish: true @consumption.filter:{ }
@vdm.viewType: #CONSUMPTION @formula
@analyticsdetails.query.axis: #ROWS
You don't need to add same annotations to the one's you already added before, they'll appear by default
@consumption.filter: {selectionType: #SINGLE, multipleSelections: false, mandatory: true }
You do the formulas/calculations in Consumption view, good for 'averages' formulae
Note: If the given alias, is long - then include @endusertext.label: 'Available Seats'
Formulas - measures - @analyticsdetails.query.axis: #COLUMNS
@DefaultAggregation: #FORMULA
@analyticsdetails.query.axis: #COLUMNS
@endusertext.label: 'Available Seats'
Note: Evaluation of formulas are done at aggregate level not at detail level (conumption view) [Averages ]
Composite View/Cube Testing; RSRTS_ODP_DIS
Conusmption/Query Testing: RSRT (Query Monitor) -- Query Display: HTML
You have to include 2c before the DDL SQL Name : 2cZSHAPQUERY (Airport Query CDS)
If, you don't designate the Axis as Rows or columns, then they will be under Free Characterisics
When you extend the view always give an alias, as you don't want to include same column name
Always, extend the view, if it's already published and at later point, you want to join a table (association)
Consumption View: @UI: { identification:[ {position:10},{label: ' ' } ]
@analytics.query: true }
@VDM.Viewtype: # Consumption
Inside Select:
@AnalyticsDetails.query.display: #KEY_TEXT
@AnalyticsDetails.query.axis: #ROWS (dimensions) #Columns (Measures) #FREE (anywhere to move)
Annotations for below explanation:
@EndUserText.label: 'Average Weight Per Flight'
@AnalyticsDetails.exceptionAggregationSteps.exceptionAggregationBehavior: #AVG
@AnalyticsDetails.exceptionAggregationSteps.exceptionAggregationElements: [ 'Airline',
' 'Flight Connection', 'FlightDate' ]
@AnalyticsDetails.query.formula: '$projection.WeightOfLuggage'
@AnalyticsDetails.query.decimals: 0
0 as AverageWeightPerFlight
------
–> there are 3 ways of Creating Gateway service with CDS view( As far as I know).
1. Import CDS view via SEGW–>DATA MODEL–>IMPORT–>DDIC Structure
2. While creating CDS View add annotation @Odata.Publish: true and from
/IWFND/MAINT_SERVICE –> select and activate the service.
3. Map CDS View via Business entity as you mentioned in this blog.
-------
Case -- When--Then--Else--End ---> Every Case Block should have this -- imp. in nested cases
Annotations - Core & Generic
Associations Filter Expression: _association[ column = 'value' ] as Name:follow association to the filtered value
---->You'll be able to see the filtered values only when you right click and follow association
3 ways to expose CDS Views to OData Service -- 1,2 --> SEGW 3. CDS view
1. Import DDIC Structure (SQL view) 2. By reference CDS Entity 3. Annotation

Ref. Data View Approach


2 & 3 types only from NW 7.5 n above
4/11/2018 Create an analytical model based on ABAP CDS views | SAP Blogs

SQL functions in CDS view:


concat(concat('/webapp/images/',Products.Product),'.jpg')
==>key cast( snwd_bpa.node_key as SEPM_BP_UUID preserving type ) as BusinessPartnerUUID, --
cast needed to a data element with appropriate labels for a business partner UUID
Products
Products Industries
Industries Support
Support Training
Training Community
Community Developer
Developer Partner
Partner
-- "key" indicates that this field uniquely identifies a row; needed e.g. for analytics

About
About

Home / Community / Blogs + Actions


ONE

Create an analytical model based on ABAP


CDS views
March 18, 2018 | 946 Views |

Felipe de Mello Rodrigues


more by this author

ABAP Development
SAP HANA | SAP S/4HANA | abap cds | analytical model | analytics | annotations | cds view | core data services | cube

share
0 share
4 tweet share
0 like
9

Follow

SAP HANA combines OLAP and OLTP processing in a single in-memory


database, transactional and analytical can live together in the same place and

https://blogs.sap.com/2018/03/18/create-an-analytical-model-based-on-abap-cds-views/ 1/18
4/11/2018 Create an analytical model based on ABAP CDS views | SAP Blogs

this means you have access to the exact information you need in real time.

With this new approach an interesting question emerges, since we have the
transactional and analytical worlds combined in a single database, is there any
difference in the development approach when we talk about data models
constructed over ABAP CDS (Core Data Services)?

The answer is Yes and in this article I try to clarify these different concepts with
a good example of how you should construct an Analytical model based on
ABAP CDS views.

Transactional vs. Analytical


One of the biggest advantages of constructing data models with ABAP CDS is
that you can design views thinking about both paradigms, depending on your
requirements you can apply different development techniques focusing in one
of the scenarios.

Analytical models are recommended for reporting purposes when you need
to use advantage of aggregations to expose results across different areas
(e.g. by time, by location, by responsible). These models are conceived over
Facts and Dimensions and these views contain the basic data used to
conduct detailed analyses and derive business values.

Imagine as an example a sales report which provides results based on


customer, product, date and sales person. The Fact is the sales itself and it
holds values that we can measure (e.g. number of sales and total amount of
sales), the filters by customer, product, time and sales person are the
Dimensions and these dimensions can have Attributes or Texts attached
(e.g. customer name, address and PRODUCT DESCRIPTION ) and when
we connect all of them we have a Cube and consequently an analytical model
ready for consumption.

https://blogs.sap.com/2018/03/18/create-an-analytical-model-based-on-abap-cds-views/ 2/18
4/11/2018 Create an analytical model based on ABAP CDS views | SAP Blogs

On top of this analytical model we need to construct a Query adapting the


data in the way we want to expose to the user. The cube must be constructed
in a way it can be reused and consumed by several different Queries, for
example, with the sales model above we can generate the following metrics in
different queries:

Sales by year quarter;


Sales by products with cost above $100;
Sales by customer located in a specific city;
Average of sales amount per number of sales;
Uplift on sales from prior year.

Each query will fulfill an specific purpose and it could be designed for different
applications (e.g. Reports, KPIs, etc.).

Important Note: This article won’t focus extensively on Business Intelligence


(BI) concepts, if you still have questions about the subject I advise you to
perform an extra search with all the topics discussed so far.

Dimensions
Facts
Attributes
Texts
Cubes
Analytical Queries

https://blogs.sap.com/2018/03/18/create-an-analytical-model-based-on-abap-cds-views/ 3/18
4/11/2018 Create an analytical model based on ABAP CDS views | SAP Blogs

The real focus of this article is actually to translate those BI concepts to the
universe of ABAP CDS views and with this statement in mind we can proceed
to our next topic.

Adapting Business Intelligence concepts in ABAP


CDS
If you already worked with ABAP CDS in the past you definitely heard
about annotations. One of the main purposes of Core Data Services is to
allow the creation of semantically rich data models and annotations are the
main component to support this task.

There are annotations related with different areas like configuration of UI


applications, Enterprise Search, OData service publishing and Analytics. The
official documentation and list of all annotations available can be seen in the
link below:

CDS Annotations

Since the focus of this article is to talk about analytic models we’re going to
focus in two groups of annotations:

Analytics and AnalyticsDetails

Analytics provide support to adapt ABAP CDS views and enable


multidimensional data consumption taking advantage of data aggregation.
AnalyticsDetails support the adaptation of analytical query layout with
changes in the aggregation behavior, planning or formulas to calculate
metrics.

The process to adapt CDS views is pretty simple, if you want to declare a
Dimension, Fact, Aggregation Level or Cube you must include the following
annotation in the header of your CDS view:

@Analytics.dataCategory: #VALUE

Replace #VALUE by one of the categories commented before:

#CUBE
#AGGREGATIONLEVEL
#DIMENSION

https://blogs.sap.com/2018/03/18/create-an-analytical-model-based-on-abap-cds-views/ 4/18
4/11/2018 Create an analytical model based on ABAP CDS views | SAP Blogs

#FACT above a measure object in CUBE data category


Cube Data Category --> @DefaultAggregation: #SUM
Pay attention because Cubes must contain at least one measurable attribute,
measure_object
to define a field as a measure you need to place this annotation on the top of
the field:

@DefaultAggregation: #SUM

Changes in the default aggregation are possible but the most common
scenario is configured with a #SUM aggregation.

When we talk about a Query there is a slight difference in the


process because you should include a different annotation in the header of
your CDS view: Always consume data from CUBE

@Analytics.query: true

Queries must select data from cubes because of the aggregation pattern
defined previously, if you try to consume data from a different view the system
will return an error during the activation.

Now you should be able to identify the basic steps to create ABAP CDS
analytical views but still without any idea of how you should connect all of
these different views to create an analytical model. In the next section we still
start to practice with a real development.

Creating an analytical model with ABAP CDS


As usual I like to explore SAP flight demo tables in my EXERCISES and for
this article I’m going to create a data model on top of the Single Flight
Booking table (SBOOK). For the purpose of this demo a simple data model
containing a few measures and dimensions is enough to demonstrate the
concepts discussed so far. Let’s check the proposed data model in the card
below:

Flights Bookings
Fact
Measures Total number of bookings
Total price of bookings
Total weight of luggage

https://blogs.sap.com/2018/03/18/create-an-analytical-model-based-on-abap-cds-views/ 5/18
4/11/2018 Create an analytical model based on ABAP CDS views | SAP Blogs

Date
Dimension Airline
Connection
Customer
TRAVEL AGENCY

There are a lot of options left to explore in SBOOK table but since I don’t want
to over complicate the EXERCISE I’m not going to explore its full potential.
When you replicate this demo try to play around identifying more fields that
could potentially add business value and feel free to attach them into the
current data model.

With the analytical model planned we can finally start the development
Time Dimension:
of ABAP CDS views. For the date dimension we don’t need to develop a
custom view because the standard view I_CalendarDate provides support I_CalendarDate
with association to all relevant attributes (e.g. year, quarter, month and week)
but we need to implement the rest of the dimensions creating custom CDS
views. Have a look in the source codes for each one of them below:
@Analytics.dataCategory: #DIMENSION
DIMENSION: Airline @VDM.Viewtype: #BASIC

@AbapCatalog.sqlViewName: 'ZDIMEAIRLINE'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Airline'

@Analytics.dataCategory: #DIMENSION
1. Airline
define view Z_Dimension_Airline
as select from scarr
Z_Dimension_Airline
{
@ObjectModel.text.element: [ 'AirlineName' ]
key carrid as Airline, @ObjectModel.text.element:
@Semantics.text: true
carrname as AirlineName,

@Semantics.currencyCode: true
currcode as Currency
}

DIMENSION: Connection
2. Connection
Z_Dimension_Connection

https://blogs.sap.com/2018/03/18/create-an-analytical-model-based-on-abap-cds-views/ spfli association to 1 6/18


concat(cityfrom,concat(' --> ', cityto)) as Destination,
4/11/2018 Create an analytical model based on ABAP CDS views | SAP Blogs

@AbapCatalog.sqlViewName: 'ZDIMECONNECT'
@AbapCatalog.compiler.compareFilter: true @Analytics.dataCategory: #DIMENSION
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Flight Connection' @VDM.viewType: #BASIC

@Analytics.dataCategory: #DIMENSION

@ObjectModel.representativeKey: 'FlightConnection'

define view Z_Dimension_Connection


as select from spfli
association [0..1] to Z_Dimension_Airline as _Airline on $projection.A
{
@ObjectModel.foreignKey.association: '_Airline'
key carrid as Airline,

@ObjectModel.text.element: [ 'Destination' ]
key connid as FlightConnection,

@Semantics.text: true
concat(cityfrom,
concat(' -> ', cityto)) as Destination,

_Airline
}

3. Z_Dimension_Customer
DIMENSION: Customer@Analytics.dataCategory: #DIMENSION
@VDM.viewType: #BASIC
scustom assoc. to I_Country
@AbapCatalog.sqlViewName: 'ZDIMECUSTOMER'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Flight Customer'

@Analytics.dataCategory: #DIMENSION

define view Z_Dimension_Customer


as select from scustom
association [0..1] to I_Country as _Country on $projection.Country = _
{
@ObjectModel.text.element: [ 'CustomerName' ]
key id as Customer,

@Semantics.text: true
name as CustomerName,

@ObjectModel.foreignKey.association: '_Country'
@Semantics.address.country: true
country as Country,

@Semantics.address.city: true
city as City,

_Country
}

https://blogs.sap.com/2018/03/18/create-an-analytical-model-based-on-abap-cds-views/ 7/18
4/11/2018 Create an analytical model based on ABAP CDS views | SAP Blogs

4. Z_Dimension_TravvelAgency
DIMENSION: Travel Agency
stravelag assoc. to I_Country

@AbapCatalog.sqlViewName: 'ZDIMETRVAGENCY'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'TRAVEL AGENCY'
@Analytics.dataCategory: #DIMENSION
@Analytics.dataCategory: #DIMENSION @VDM.viewType: #BASIC
define view Z_Dimension_TravelAgency
as select from stravelag
association [0..1] to I_Country as _Country on $projection.Country = _
{
@ObjectModel.text.element: [ 'TravelAgencyName' ]
key agencynum as TravelAgency, County Details:- found in Entity
@Semantics.text: true I_Country
name as TravelAgencyName,

@ObjectModel.foreignKey.association: '_Country'
@Semantics.address.country: true
country as Country,

@Semantics.address.city: true
city as City,

_Country
}

Important Notes:

1. All dimensions must have an @Analytics.dataCategory: @Analytics.dataCategory


#DIMENSION classification in the header of the view. @ObjectModel.text.element
2. Associations with texts and names are executed through
@objectModel.foreignKey.association
annotation @ObjectModel.text.element.
@ObjectModel.reprensatativeKey
3. Associations of external attributes are determined by foreign key using
annotation @ObjectModel.foreignKey.association. @semantics.
4. Dimensions with composite keys needs a definition of a single field as a
representative key, this configuration is achieved through
annotation @ObjectModel.representativeKey. (header/top level) used when a composite key is
5. Annotation @Semantics helps to define text and address fields.
used in join

With all dimensions prepared we can move on to the development of our


cube.

CUBE: Flight Bookings Measures are left out; we'll put 'em in a CUBE

https://blogs.sap.com/2018/03/18/create-an-analytical-model-based-on-abap-cds-views/ 8/18
Time Dimension
4/11/2018 Create an analytical model based on ABAP CDS views | SAP Blogs
I_CalendarDate
@AbapCatalog.sqlViewName: 'ZCUBEFLIGHTBOOK'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Flight Bookings'
@vdm.viewtype #basic Cube:
Z_Cube_FlightBookings
@Analytics.dataCategory: #CUBE

define view Z_Cube_FlightBookings


sbook association to 1
as select from sbook
association [0..1] to I_CalendarDate as _CalendarDate on $ 2 3 4 5
association [0..1] to Z_Dimension_Airline as _Airline on $
association [0..1] to Z_Dimension_Connection as _Connection on $
and $
association [0..1] to Z_Dimension_Customer as _Customer on $
association [0..1] to Z_Dimension_TravelAgency as _TravelAgency on $
@Analytics.dataCategory: #CUBE
{ @VDM.viewType: #Composite
/** DIMENSIONS **/

@EndUserText.label: 'Airline'
@ObjectModel.foreignKey.association: '_Airline'
carrid as Airline,

@EndUserText.label: 'Connection'
@ObjectModel.foreignKey.association: '_Connection'
connid as FlightConnection,

@EndUserText.label: 'Flight Date'


@ObjectModel.foreignKey.association: '_CalendarDate'
fldate as FlightDate,

@EndUserText.label: 'Book No.'


bookid as BookNumber,

@EndUserText.label: 'Customer'
@ObjectModel.foreignKey.association: '_Customer'
customid as Customer,

Note: If you include outside assoc.


@EndUserText.label: 'TRAVEL AGENCY'
@ObjectModel.foreignKey.association: '_TravelAgency' @objectmodel.foreignkey.assoc.
agencynum as TravelAgency,
Column below should be aliased
@EndUserText.label: 'Flight Year'
_CalendarDate.CalendarYear,

@EndUserText.label: 'Flight Month'


_CalendarDate.CalendarMonth,

@EndUserText.label: 'Customer Country'


@ObjectModel.foreignKey.association: '_CustomerCountry' association column as foreignkey
_Customer.Country as CustomerCountry,
alias compulsory
@EndUserText.label: 'Customer City'
_Customer.City as CustomerCity,

@EndUserText.label: 'Travel Agency Country'


@ObjectModel.foreignKey.association: '_TravelAgencyCountry' ------>> association column as foreignkey
_TravelAgency.Country as TravelAgencyCountry, aias
@EndUserText.label: 'Travel Agency Customer City'
_TravelAgency.City as TravelAgencyCity,

https://blogs.sap.com/2018/03/18/create-an-analytical-model-based-on-abap-cds-views/ 9/18
4/11/2018 Create an analytical model based on ABAP CDS views | SAP Blogs

/** MEASURES **/

@EndUserText.label: 'Total of Bookings'


@DefaultAggregation: #SUM --> why this column alias for '1'
1 as TotalOfBookings,

@EndUserText.label: 'Weight of Luggage'


@DefaultAggregation: #SUM
@Semantics.quantity.unitOfMeasure: 'WeightUOM' -- reference field should match
luggweight as WeightOfLuggage,

@EndUserText.label: 'Weight Unit'


@Semantics.unitOfMeasure: true
wunit as WeightUOM, -- reference field
@EndUserText.label: 'Booking Price'
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'Currency'
forcuram as BookingPrice,

@EndUserText.label: 'Currency'
@Semantics.currencyCode: true
forcurkey as Currency,

// Associations
_Airline,
_CalendarDate,
_CalendarDate._CalendarMonth,
_CalendarDate._CalendarYear,
_Connection,
_Customer,
_Customer._Country as _CustomerCountry,
_TravelAgency,
_TravelAgency._Country as _TravelAgencyCountry
}

Important Notes: Fact view will hold only facts, no dimensions


Mandatory Annotations for Cube:
Cube -- hold both, fact view is avoided
1. It’s not mandatory to construct a Fact view to consume it from inside of
1. @Analytics.dataCategory: #CUBE
a Cube, you can expose the table who holds the measures directly in
the cube to avoid an extra view and consequently an unnecessary
2.
level. Based on the documentation, fact views cannot have joins or @ObjectModel.foreignKey.Association
association and they must hold only measurable values, if you want to 3. @DefaultAggregation:
connect your dimensions in the same view you should definitely use a 4. @semantics
cube instead of a fact.
5. _associations --> exposed
2. All cubes must have an @Analytics.dataCategory:
#CUBE classification in the header of the view.
3. Associations of external attributes are determined by foreign key using
annotation @ObjectModel.foreignKey.association.
4. @DefaultAggregation annotation should be place before the fields
determined as measures.

https://blogs.sap.com/2018/03/18/create-an-analytical-model-based-on-abap-cds-views/ 10/18
4/11/2018 Create an analytical model based on ABAP CDS views | SAP Blogs

5. Annotation @Semantics helps to define text, currency, quantity and @semantics : text,currency,QTY, address
address fields.
6. All the associations are exposed in the bottom of the view to provide
access to Attributes and Texts during the query consumption. Before Query Development

1. RSTS_OPD_DIS
Before we proceed to the query development let’s have a quick look in the
2. ODP: 'sqlviewname' on top
transaction RSRTS_ODP_DIS (Transient Provider Preview). This transaction
is used to review associations, texts and hierarchies placed inside of the
analytical data model providing a detailed analysis for each one of the
attributes.

You can use this transaction to review any kind of analytical views but the
RSRTS_ODP_DIS
focus here is to review the cube only. Copy the name defined in the
annotation @AbapCatalog.sqlViewName, place it in ODP Name parameter
and execute the program.

In the right section of the screen we can see two types of icons, the left one
confirms that we have a valid dimension associated with the attribute
(based on a Foreign Key), the right one confirms that we have a text
association with this field.

All the attributes were validated (by foreign key and text) and since everything
looks fine we can move on to the query development.

https://blogs.sap.com/2018/03/18/create-an-analytical-model-based-on-abap-cds-views/ 11/18
4/11/2018 Create an analytical model based on ABAP CDS views | SAP Blogs

Final Query:
QUERY: Flight Bookings
@Analytics.query: true
@VDM.viewtype: #consumption
@AbapCatalog.sqlViewName: 'ZQUERYFLIGHTBOOK'
@OData.publish: true
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK define view Z_Query_FlightBookings
@EndUserText.label: 'Flight Bookings'
as select from Z_Cube_FlightBookings
@Analytics.query: true
@VDM.viewType: #CONSUMPTION

define view Z_Query_FlightBookings


as select from Z_Cube_FlightBookings
{
/** DIMENSIONS **/

@AnalyticsDetails.query.display: #KEY_TEXT
@AnalyticsDetails.query.axis: #FREE
Airline,
@AnalyticsDetails.query.display: #KEY_TEXT
@AnalyticsDetails.query.axis: #FREE
FlightConnection,
@AnalyticsDetails.query.display: #KEY
@AnalyticsDetails.query.axis: #FREE
FlightDate,
@AnalyticsDetails.query.display: #KEY_TEXT
@AnalyticsDetails.query.axis: #FREE
Customer,
@AnalyticsDetails.query.display: #KEY_TEXT
@AnalyticsDetails.query.axis: #FREE
TravelAgency,
@AnalyticsDetails.query.display: #KEY
@AnalyticsDetails.query.axis: #FREE
CalendarYear,
@AnalyticsDetails.query.display: #TEXT
@AnalyticsDetails.query.axis: #FREE
CalendarMonth,
@AnalyticsDetails.query.display: #TEXT
@AnalyticsDetails.query.axis: #FREE
CustomerCountry,
@AnalyticsDetails.query.display: #KEY
@AnalyticsDetails.query.axis: #FREE
CustomerCity,
@AnalyticsDetails.query.display: #TEXT
@AnalyticsDetails.query.axis: #FREE
TravelAgencyCountry,
@AnalyticsDetails.query.display: #KEY
@AnalyticsDetails.query.axis: #FREE
TravelAgencyCity,
@AnalyticsDetails.query.display: #KEY
@AnalyticsDetails.query.axis: #FREE
Currency,
@AnalyticsDetails.query.display: #KEY
@AnalyticsDetails.query.axis: #FREE
WeightUOM,

/** MEASURES **/

TotalOfBookings,

https://blogs.sap.com/2018/03/18/create-an-analytical-model-based-on-abap-cds-views/ 12/18
4/11/2018 Create an analytical model based on ABAP CDS views | SAP Blogs

WeightOfLuggage,
BookingPrice,

@EndUserText.label: 'Average Weight Per Flight'


@AnalyticsDetails.exceptionAggregationSteps.exceptionAggregationBeh avior:#AVG
@AnalyticsDetails.exceptionAggregationSteps.exceptionAggregationElem ments:['Airline',' FlightConnection','Flig
@AnalyticsDetails.query.formula: '$projection.WeightOfLuggage'
@AnalyticsDetails.query.decimals: 0 htDate']
0 as AverageWeightPerFlight
}

@analyticsdetails.exceptionaggregationsteps.exceptionAggregationBehavior: #AVG
Important Notes:

1. All queries must have an @Analytics.query: true classification in the


header of the view.
2. Annotation @AnalyticsDetails is used all over the query providing
--> @AnalyticsDetails.query.display:
support for the following tasks:
1. Display (Key or Text) and axis control (Free, Columns or Rows) @AnalyticsDetails.query.axis:
of dimensions.
2. Exception aggregation behavior.
3. Query formulas.
3. All the three main measures were exposed in the bottom of the query
but there is an extra metric based on an average aggregation behavior,
the query formula will use the weight of luggage as measure and apply
the aggregation to calculate the average during the run-time.

Since there is a calculated field in the query level there is no option to test the
aggregation and formula using HANA Studio data preview, to achieve this
functionality we need to test our query through a front-end application which
supports this task.

Testing the Analytical Query


It is possible to execute tests directly through transaction RSRT (Query
Monitor) but I would like to show you an alternative way using View
Browser Fiori application available in the standard role
SAP_BR_ANALYTICS_SPECIALIST (Analytics Specialist).

https://blogs.sap.com/2018/03/18/create-an-analytical-model-based-on-abap-cds-views/ 13/18
4/11/2018 Create an analytical model based on ABAP CDS views | SAP Blogs

Search the query, select the record and click in the button Show Content.

The report screen shows all the 4 metrics (3 measures and 1 formula) and all
of the dimensions in the left side available for selection. Check that Booking
Price shows * as result, this happens because we have multiple currencies
and the system cannot aggregate them without the Currency dimension
exposed.

Let’s fix this issue moving Currency from Dimensions to Rows area. This is
the expected outcome:

https://blogs.sap.com/2018/03/18/create-an-analytical-model-based-on-abap-cds-views/ 14/18
4/11/2018 Create an analytical model based on ABAP CDS views | SAP Blogs

Now we can play with different dimensions checking the results across
different areas, check some examples below:

By Airline:

By Customer Country:

https://blogs.sap.com/2018/03/18/create-an-analytical-model-based-on-abap-cds-views/ 15/18
4/11/2018 Create an analytical model based on ABAP CDS views | SAP Blogs

By Year:

UI5 and BI front-end applications


Examples of UI5 applications which make use of ABAP CDS analytical
queries:

Smart Business Applications


KPI modeller
APF (Analysis Path Framework)
Fiori Elements
Overview Pages (Analytical cards)
Analytical List Pages
Custom applications with analytical UI controls

https://blogs.sap.com/2018/03/18/create-an-analytical-model-based-on-abap-cds-views/ 16/18
4/11/2018 Create an analytical model based on ABAP CDS views | SAP Blogs

Analytical Tables
Charts

Most part of the SAP BI front-end applications already provide support to


ABAP CDS analytical queries, some examples:

SAP BusinessObjects Web Intelligence (WebI) WebI on ABAP CDS anal. queries
SAP Analysis for Microsoft O ce
SAP Lumira

So this is the end! Hope you enjoyed the content.

In my next post I’m going to move back to the Fiori Elements subject and
reuse the data model created in this article to explore how we can work with
an Analytical List Page.

Alert Moderator

2 Comments

Young Hwan Kim

March 20, 2018 at 12:46 am

Nice blog. Looking forward your next blog.

Michelle Crapo

https://blogs.sap.com/2018/03/18/create-an-analytical-model-based-on-abap-cds-views/ 17/18
4/11/2018 Create an analytical model based on ABAP CDS views | SAP Blogs

March 20, 2018 at 1:54 pm


TWO

Nice! PART II - FIORI on Analytical Models from above


Michelle

Add Comment

Share & Follow


Privacy Terms of Use Legal Disclosure Copyright Trademark Sitemap Newsletter

https://blogs.sap.com/2018/03/18/create-an-analytical-model-based-on-abap-cds-views/ 18/18
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

Products
Products Industries
Industries Support
Support Training
Training Community
Community Developer
Developer Partner
Partner

About
About

Home / Community / Blogs + Actions

Create an Analytical List Page using ABAP


CDS views and annotations
April 4, 2018 | 571 Views |

Felipe de Mello Rodrigues


more by this author

SAP Fiori for SAP S/4HANA


SAP Fiori | SAPUI5 | abap cds | Analytical List Page | annotations | core data services | Fiori Element

share
0 share
2 tweet share
0 like
6

Follow

Analytical List Page is a powerful Fiori Element available since SAPUI5


innovation version 1.48, this template provides the ability to create an

https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 1/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

analytical dashboard with KPIs, charts, tables and also a drill-down navigation
to a detail page.

You can find all the relevant information about Analytical List Pages in Analytical List Pages
the SAP Fiori Design Guideline. I’ll try to resume the content of the
guidelines explaining the basic concepts behind this template, starting by the
structure of the ALP which is composed by three main areas:
ALP
Page Title
Page Header
Page Content

We also have a drill-down navigation that can be configured to redirect the


user to an Object Page (configured internally through annotations) or a
Cross-app navigation (based on a semantic object, action and parameters).
Let’s check in details each one of these components.

Page Title
Contains the variant management and a section of global KPI tags, it’s
possible to display a maximum of three KPIs per application.

Pressing a KPI tag provides access to the KPI card which contains a chart
with additional information, the KPI card is based on the same template of the

https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 2/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

analytical card provided by Overview Pages.

The header of the KPI card displays more information about the current value,
target, deviation and how the KPI has evolved over time, all of these concepts
are based on the Trend-Criticality Calculation, if you never heard about this
subject before I advise you to have a quick look in this article:

Create KPIs with data points and criticality calculation in a SAP Fiori
Overview Page

Page Header
Basically composed by the filter area which allows users to filter the result set.
Two types of filters are supported: compact lters and visual lters. Users
can toggle between the two filter modes anytime.

https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 3/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

Visual filters are composed by a title and an interactive chart, there are three
types available at the moment: bar chart, line chart and donut chart. When
the user selects one point in the chart the content area is filtered based on the
selected value, in the case of a hybrid view the chart and table are filtered at
the same time.

Page Content
Consists of either a hybrid view (combination of a chart and a table), a chart-
only view, or a table-only view. This is the main working area, where users can
interact with both the chart and table visualizations, remember that chart
visualization increases the joy of use and enables users to spot relevant data
more quickly.

The analytical list page always comes with the three views, so it means the
user can toggle between the different layouts anytime.

Based on all the information presented so far we can think about a basic
layout for our demo application. The idea is to construct an application on top
of a Flight Bookings report, this means all the components will show
information related with flights (e.g. Country, Airline, Flight Date, Bookings).

https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 4/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

With this statement in mind we can define the relevant objects for each area of
the ALP:

Page Title
KPI Card with Weight of Luggage by Country.
Page Header
Visual Filter with Total of Bookings by Year.
Page Content (Hybrid view)
Chart with Total of Bookings by Year and Airline.
Table with Total of Bookings and Weight of Luggage by Airline.
Drill-down navigation
Object page with a simple form with the Airline, Total of
Bookings and Weight of Luggage.

All the technical steps to construct our application can be found in the SAP
Help. We basically need to configure the App Descriptor and the Annotation
file inside our UI5 application, but in this demo I decided to explain an
alternative way declaring all the annotations in the ABAP CDS layer, this
strategy reduces the configuration work in the UI5 app.

To facilitate the understanding of all the concepts I’m going to start with the
ABAP CDS development explaining each one of the items in details before we
expose the whole CDS view. After we finish this first section I’m going to
explain the remaining steps of configuration inside of the UI5 application.

ABAP CDS
To avoid spending time with the data model definition we’re going to construct
a query on top of the analytical model delivered in my last article, if you didn’t
check it yet I advise you to have a look before you continue this reading:

Create an analytical model based on ABAP CDS views

The analytical query has the ability to aggregate data based only in the
exposed dimensions, this is an essential functionality for analytical
applications, also, we can declare all the UI annotations responsible for the
coordination of the front-end in a single CDS view. Let’s start the development
thinking only in the relevant fields for the query output.

Query (without annotations)

https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 5/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

Let’s construct a draft of the CDS view in a simple form (without the
annotations), this way we can focus only in the relevant dimensions, measures
and the exposure of the OData service.

We should read data from the cube Z_Cube_FlightBookings and select the
following fields:

Dimensions:
Airline
CustomerCountry
CalendarYear
Key Figures:
TotalOfBookings
WeightOfLuggage

This is the expected outcome:

@AbapCatalog.sqlViewName: 'ZQUERYFLIGHTALP'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Flight (Analytical List Page)'

@Analytics.query: true
@VDM.viewType: #CONSUMPTION
@OData.publish: true

define view Z_Query_Flight_ALP


as select from Z_Cube_FlightBookings
{
@AnalyticsDetails.query.display: #KEY_TEXT
Airline,

@AnalyticsDetails.query.display: #KEY_TEXT
CustomerCountry,

CalendarYear,

TotalOfBookings,

WeightOfLuggage
}

Don’t forget to place the annotation @Analytics.query: true to transform this


CDS view in an analytical query and use the power of aggregation, as I
mentioned before, this item is essential for this kind of application. Also, place
the @OData.publish: true in the header to publish an OData service project
automatically based on the structure of our CDS view.

Now we populated all the relevant fields and we can start to fill the relevant
annotations for each one of the ALP sections.
https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 6/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

Page Title (KPIs)


In this section we want only a KPI tag and card, check below the set of
annotations expected to achieve this functionality.

KPI Card

Let’s translate this diagram and publish the relevant annotations in the header
of our CDS view.

@UI.selectionPresentationVariant: {
qualifier: 'KPIWeightByCountry',
presentationVariantQualifier: 'KPIWeightByCountry',
selectionVariantQualifier: 'KPIWeightByCountry'
}

@UI.presentationVariant: {
qualifier: 'KPIWeightByCountry',
text: 'KPI: Weight of Luggage per Country',
visualizations: [{
type: #AS_CHART,
qualifier: 'ChartWeightByCountry'
},{
type: #AS_DATAPOINT,
qualifier: 'WeightOfLuggage'
}]
}

@UI.selectionVariant: {
qualifier: 'KPIWeightByCountry',
text: 'KPI Weight By Country'
}

https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 7/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

@UI.chart: {
qualifier: 'ChartWeightByCountry',
chartType: #COLUMN,
dimensions: [ 'CustomerCountry' ],
measures: [ 'WeightOfLuggage' ],
dimensionAttributes: [{
dimension: 'CustomerCountry',
role: #CATEGORY
}],
measureAttributes: [{
measure: 'WeightOfLuggage',
role: #AXIS_1
}]
}

And this annotation on the top of our key figure to generate a Data Point
(Weight of Luggage).

@UI.dataPoint.title: 'Weight of Luggage'


WeightOfLuggage

Important Note: The Descriptor Settings are configured in the manifest.json


file inside the UI5 application. We’ll check this configuration in details in the
final section of this article.

Page Header (Visual Filter)


To include an attribute in the filter we usually work with the
@UI.SelectionFields annotation, but to work with a visual filter we have some
extra steps to configure. Check the relevant set of annotations expected for
the visual filter below:

Visual Filter

https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 8/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

Let’s translate this diagram and publish the relevant annotations in the header
of our CDS view.

@UI.presentationVariant: {
qualifier: 'FilterBookingsByYear',
text: 'Filter: Bookings by Year',
visualizations: [{
type: #AS_CHART,
qualifier: 'ChartBookingsByYear'
}]
}

@UI.chart: {
qualifier: 'ChartBookingsByYear',
chartType: #DONUT,
dimensions: [ 'CalendarYear' ],
measures: [ 'TotalOfBookings' ],
dimensionAttributes: [{
dimension: 'CalendarYear',
role: #CATEGORY
}],
measureAttributes: [{
measure: 'TotalOfBookings',
role: #AXIS_1
}]
}

And this annotation on the top of our dimension (Calendar Year).

@UI.selectionField.position: 10
CalendarYear

Important Note: CommonValueList cannot be configured inside the CDS


view, so we’re going to adapt this annotation directly in the annotation file

https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 9/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

inside the UI5 application. We’ll check this configuration in details in the final
section of this article.

Page Content (Hybrid view)


Since we are working with a Hybrid View we should prepare annotations for
the chart and table, check below the expected set of annotations for each one
of them.

Chart Table

Let’s translate these diagrams and publish the relevant annotations in the
header of our CDS view.

@UI.selectionPresentationVariant: {
qualifier: 'Default',
presentationVariantQualifier: 'Default',
selectionVariantQualifier: 'Default'
}

@UI.presentationVariant: {
qualifier: 'Default',
visualizations: [{
type: #AS_CHART,
qualifier: 'ChartDefault'
}]
}

@UI.selectionVariant: {
qualifier: 'Default',
text: 'Default'
}

@UI.chart: {
qualifier: 'ChartDefault',
chartType: #COLUMN,
dimensions: [ 'CalendarYear', 'Airline' ],
measures: [ 'TotalOfBookings' ],
dimensionAttributes: [{
dimension: 'CalendarYear',
role: #SERIES

https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 10/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

},{
dimension: 'Airline',
role: #CATEGORY
}],
measureAttributes: [{
measure: 'TotalOfBookings',
role: #AXIS_1
}]
}

To create a table we need to include annotations for each one of the columns,
place these annotations on the top of the fields (Airline, TotalOfBookings and
WeightOfLuggage):

@UI.lineItem.position: 10
Airline,

@UI.lineItem.position: 20
TotalOfBookings,

@UI.lineItem.position: 30
WeightOfLuggage

Important Note: The Descriptor Settings are configured in the manifest.json


file inside of the UI5 application. We’ll check this configuration in details in the
final section of this article.

Let’s aggregate all of these pieces of code and construct the final version of
our CDS view, this is the expected result:

@AbapCatalog.sqlViewName: 'ZQUERYFLIGHTALP'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Flight (Analytical List Page)'

@Analytics.query: true
@VDM.viewType: #CONSUMPTION
@OData.publish: true

@UI.selectionPresentationVariant: [{
qualifier: 'KPIWeightByCountry',
presentationVariantQualifier: 'KPIWeightByCountry',
selectionVariantQualifier: 'KPIWeightByCountry'
},{
qualifier: 'Default',
presentationVariantQualifier: 'Default',
selectionVariantQualifier: 'Default'
}]

@UI.presentationVariant: [{
qualifier: 'KPIWeightByCountry',
https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 11/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

text: 'KPI: Weight of Luggage per Country',


visualizations: [{
type: #AS_CHART,
qualifier: 'ChartWeightByCountry'
},{
type: #AS_DATAPOINT,
qualifier: 'WeightOfLuggage'
}]
},{
qualifier: 'FilterBookingsByYear',
text: 'Filter: Bookings by Year',
visualizations: [{
type: #AS_CHART,
qualifier: 'ChartBookingsByYear'
},{
type: #AS_DATAPOINT,
qualifier: 'TotalOfBookings'
}]
},{
qualifier: 'Default',
visualizations: [{
type: #AS_CHART,
qualifier: 'ChartDefault'
}]
}]

@UI.selectionVariant: [{
qualifier: 'KPIWeightByCountry',
text: 'Default'
},{
qualifier: 'Default',
text: 'Default'
}]

@UI.chart: [{
qualifier: 'ChartWeightByCountry',
chartType: #COLUMN,
dimensions: [ 'CustomerCountry' ],
measures: [ 'WeightOfLuggage' ],
dimensionAttributes: [{
dimension: 'CustomerCountry',
role: #CATEGORY
}],
measureAttributes: [{
measure: 'WeightOfLuggage',
role: #AXIS_1
}]
},{
qualifier: 'ChartBookingsByYear',
chartType: #DONUT,
dimensions: [ 'CalendarYear' ],
measures: [ 'TotalOfBookings' ],
dimensionAttributes: [{
dimension: 'CalendarYear',
role: #CATEGORY
}],
measureAttributes: [{
measure: 'TotalOfBookings',
role: #AXIS_1
}]
},{
https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 12/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

qualifier: 'ChartDefault',
chartType: #COLUMN,
dimensions: [ 'CalendarYear', 'Airline' ],
measures: [ 'TotalOfBookings' ],
dimensionAttributes: [{
dimension: 'CalendarYear',
role: #SERIES
},{
dimension: 'Airline',
role: #CATEGORY
}],
measureAttributes: [{
measure: 'TotalOfBookings',
role: #AXIS_1
}]
}]

define view Z_Query_Flight_ALP


as select from Z_Cube_FlightBookings
{
@AnalyticsDetails.query.display: #KEY_TEXT
@UI.lineItem.position: 10
Airline,

@AnalyticsDetails.query.display: #KEY_TEXT
CustomerCountry,

@UI.selectionField.position: 10
CalendarYear,

@UI.lineItem.position: 20
TotalOfBookings,

@UI.dataPoint.title: 'Weight of Luggage'


@UI.lineItem.position: 30
WeightOfLuggage
}

If you don’t have access to ABAP CDS you can still configure all of your
annotations locally (inside the UI5 application). This CDS view generates the
following output in the XML format:

<Annotations Target="Z_QUERY_FLIGHT_ALP_CDS.Z_QUERY_FLIGHT_ALPType">
<Annotation Term="UI.Chart" Qualifier="ChartDefault">
<Record Type="UI.ChartDefinitionType">
<PropertyValue Property="ChartType" EnumMember="UI.ChartTyp
<PropertyValue Property="Dimensions">
<Collection>
<PropertyPath>Airline</PropertyPath>
<PropertyPath>CalendarYear</PropertyPath>
</Collection>
</PropertyValue>
<PropertyValue Property="DimensionAttributes">
<Collection>
<Record Type="UI.ChartDimensionAttributeType">
<PropertyValue Property="Dimension" PropertyPat
<PropertyValue Property="Role" EnumMember="UI.C

https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 13/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

</Record>
<Record Type="UI.ChartDimensionAttributeType">
<PropertyValue Property="Dimension" PropertyPat
<PropertyValue Property="Role" EnumMember="UI.C
</Record>
</Collection>
</PropertyValue>
<PropertyValue Property="Measures">
<Collection>
<PropertyPath>TotalOfBookings</PropertyPath>
</Collection>
</PropertyValue>
<PropertyValue Property="MeasureAttributes">
<Collection>
<Record Type="UI.ChartMeasureAttributeType">
<PropertyValue Property="Measure" PropertyPath=
<PropertyValue Property="Role" EnumMember="UI.C
</Record>
</Collection>
</PropertyValue>
</Record>
</Annotation>
<Annotation Term="UI.Chart" Qualifier="ChartBookingsByYear">
<Record Type="UI.ChartDefinitionType">
<PropertyValue Property="ChartType" EnumMember="UI.ChartTyp
<PropertyValue Property="Dimensions">
<Collection>
<PropertyPath>CalendarYear</PropertyPath>
</Collection>
</PropertyValue>
<PropertyValue Property="DimensionAttributes">
<Collection>
<Record Type="UI.ChartDimensionAttributeType">
<PropertyValue Property="Dimension" PropertyPat
<PropertyValue Property="Role" EnumMember="UI.C
</Record>
</Collection>
</PropertyValue>
<PropertyValue Property="Measures">
<Collection>
<PropertyPath>TotalOfBookings</PropertyPath>
</Collection>
</PropertyValue>
<PropertyValue Property="MeasureAttributes">
<Collection>
<Record Type="UI.ChartMeasureAttributeType">
<PropertyValue Property="Measure" PropertyPath=
<PropertyValue Property="Role" EnumMember="UI.C
</Record>
</Collection>
</PropertyValue>
</Record>
</Annotation>
<Annotation Term="UI.Chart" Qualifier="ChartWeightByCountry">
<Record Type="UI.ChartDefinitionType">
<PropertyValue Property="ChartType" EnumMember="UI.ChartTyp
<PropertyValue Property="Dimensions">
<Collection>
<PropertyPath>CustomerCountry</PropertyPath>
</Collection>
</PropertyValue>
https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 14/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

<PropertyValue Property="DimensionAttributes">
<Collection>
<Record Type="UI.ChartDimensionAttributeType">
<PropertyValue Property="Dimension" PropertyPat
<PropertyValue Property="Role" EnumMember="UI.C
</Record>
</Collection>
</PropertyValue>
<PropertyValue Property="Measures">
<Collection>
<PropertyPath>WeightOfLuggage</PropertyPath>
</Collection>
</PropertyValue>
<PropertyValue Property="MeasureAttributes">
<Collection>
<Record Type="UI.ChartMeasureAttributeType">
<PropertyValue Property="Measure" PropertyPath=
<PropertyValue Property="Role" EnumMember="UI.C
</Record>
</Collection>
</PropertyValue>
</Record>
</Annotation>
<Annotation Term="UI.DataPoint" Qualifier="WeightOfLuggage">
<Record>
<PropertyValue Property="Value" Path="WeightOfLuggage" />
<PropertyValue Property="Title" String="Weight of Luggage"
</Record>
</Annotation>
<Annotation Term="UI.LineItem">
<Collection>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="Airline" />
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="TotalOfBookings"
</Record>
<Record Type="UI.DataField">
<PropertyValue Property="Value" Path="WeightOfLuggage"
</Record>
</Collection>
</Annotation>
<Annotation Term="UI.PresentationVariant" Qualifier="Default">
<Record>
<PropertyValue Property="Text" String="" />
<PropertyValue Property="Visualizations">
<Collection>
<AnnotationPath>@UI.Chart#ChartDefault</AnnotationP
</Collection>
</PropertyValue>
</Record>
</Annotation>
<Annotation Term="UI.PresentationVariant" Qualifier="FilterBookings
<Record>
<PropertyValue Property="Text" String="Filter: Bookings by Y
<PropertyValue Property="Visualizations">
<Collection>
<AnnotationPath>@UI.Chart#ChartBookingsByYear</Annot
</Collection>
</PropertyValue>
</Record>
https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 15/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

</Annotation>
<Annotation Term="UI.PresentationVariant" Qualifier="KPIWeightByCou
<Record>
<PropertyValue Property="Text" String="KPI: Weight of Luggag
<PropertyValue Property="Visualizations">
<Collection>
<AnnotationPath>@UI.DataPoint#WeightOfLuggage</Annot
<AnnotationPath>@UI.Chart#ChartWeightByCountry</Anno
</Collection>
</PropertyValue>
</Record>
</Annotation>
<Annotation Term="UI.SelectionFields">
<Collection>
<PropertyPath>CalendarYear</PropertyPath>
</Collection>
</Annotation>
<Annotation Term="UI.SelectionPresentationVariant" Qualifier="Defau
<Record>
<PropertyValue Property="Text" String="" />
<PropertyValue Property="SelectionVariant" Path="@UI.Select
<PropertyValue Property="PresentationVariant" Path="@UI.Pre
</Record>
</Annotation>
<Annotation Term="UI.SelectionPresentationVariant" Qualifier="KPIWe
<Record>
<PropertyValue Property="Text" String="" />
<PropertyValue Property="SelectionVariant" Path="@UI.Select
<PropertyValue Property="PresentationVariant" Path="@UI.Pre
</Record>
</Annotation>
<Annotation Term="UI.SelectionVariant" Qualifier="Default">
<Record>
<PropertyValue Property="Text" String="Default" />
</Record>
</Annotation>
<Annotation Term="UI.SelectionVariant" Qualifier="KPIWeightByCountry
<Record>
<PropertyValue Property="Text" String="KPI Weight By Country
</Record>
</Annotation>
<Annotation Term="Communication.Contact">
<Record>
<PropertyValue Property="adr">
<Collection>
<Record>
<PropertyValue Property="type" EnumMember="Comm
<PropertyValue Property="country" Path="Custome
</Record>
</Collection>
</PropertyValue>
</Record>
</Annotation>
<Annotation Term="Communication.Address">
<Record>
<PropertyValue Property="type" EnumMember="Communication.Co
<PropertyValue Property="country" Path="CustomerCountry" />
</Record>
</Annotation>
</Annotations>

https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 16/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

Just adapt these XML annotations in your UI5 application and you’ll achieve
the same results.

UI5 application (Web IDE)


Before you start your UI5 application don’t forget to activate your OData
service in the SAP Gateway, use transaction /IWFND/MAINT_SERVICE to
activate and /IWFND/GW_CLIENT to test your service.

After the service activation we can start the application development, open
your Web IDE account and from the Workspace folder, right click and select
the option New -> Project from Template. Check the following steps:

1. Select Analytical List Page as the template.

2. Fill the project name, title, namespace and description.

https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 17/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

3. Select the OData service Z_QUERY_FLIGHT_ALP_CDS.

4. Select the remote annotation file to expose the annotations generated


through the ABAP CDS view, this file contains the XML output demonstrated in
the previous section.

5. Define the template configuration:

OData Collection: Z_QUERY_FLIGHT_ALP

https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 18/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

Quali er: Default


Table Type: Responsive
Auto Hide: TRUE

Note: Don’t forget to place Default as the qualifier, since we defined this
name in our ABAP CDS view we need to configure this name in the template
customization.

6. Press Finish to conclude the Web IDE wizard. This is the structure of your
project after you conclude all the steps.

Inside of the App descriptor (manifest.json) we can find the relevant code for
the Analytical List Page (sap.ui.generic.app), this snippet of code is

https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 19/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

generated automatically based on our previous configuration through the Web


IDE wizard.

"sap.ui.generic.app": {
"_version": "1.3.0",
"pages": {
"AnalyticalListPage|Z_QUERY_FLIGHT_ALP": {
"entitySet": "Z_QUERY_FLIGHT_ALP",
"component": {
"name": "sap.suite.ui.generic.template.AnalyticalListPag
"list": true,
"settings": {
"tableType": "ResponsiveTable ",
"multiSelect": false,
"qualifier": "Default",
"autoHide": true,
"showGoButtonOnFilterBar": false,
"condensedTableLayout": false,
"keyPerformanceIndicators": {}
}
},
"pages": {
"ObjectPage|Z_QUERY_FLIGHT_ALP": {
"entitySet": "Z_QUERY_FLIGHT_ALP",
"component": {
"name": "sap.suite.ui.generic.template.ObjectPag
}
}
}
}
}
}

We still have some pending configurations to include in the App descriptor


(manifest.json) and in our local annotation file (annotation.xml). These are
the remaining items we must configure inside the application:

KPI tag and card in the manifest.json;


Visual lter in the annotation.xml;
Object page layout in the annotation.xml.

KPI (manifest.json)
Place this snippet of code inside the keyPerformanceIndicators attribute:

"keyPerformanceIndicators": {
"WeightByCountry": {
"model": "kpi",
"entitySet": "Z_QUERY_FLIGHT_ALP",
"qualifier": "KPIWeightByCountry"
https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 20/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

}
}

Don’t forget to create a new model called kpi pointing to your data souce, in
my example the model references the mainService data source but you could
use a different source if you want.

Visual Filter (annotation.xml)


Configure a Common.ValueList annotation for the property CalendarYear.
For this task you can use the annotation modeler or configure directly in the
XML code.

Using the annotation modeler select a new Target for the property
CalendarYear.

https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 21/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

Include a new Common.ValueList annotation and fill the following


parameters:

CollectionPath: Z_QUERY_FLIGHT_ALP
PresentationVariantQuali er: FilterBookingByYear

This XML code is generated by the Annotation Modeler:

<Annotations Target="Z_QUERY_FLIGHT_ALP_CDS.Z_QUERY_FLIGHT_ALPType/Cale
<Annotation Term="Common.ValueList">
<Record Type="Common.ValueListType">
<PropertyValue Property="CollectionPath" String="Z_QUERY_FL
<PropertyValue Property="Parameters"/>
<PropertyValue Property="PresentationVariantQualifier" Stri
</Record>
</Annotation>
</Annotations>

Object Page (annotation.xml)


Include a new group of Facet annotations and fill the following parameters:

UI.CollectionFacet
ID: MainSection
Label: Details (i18n string)
UI.ReferenceFacet
Target: @UI.lineItem

https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 22/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

This XML code is generated by the Annotation Modeler:

<Annotation Term="UI.Facets">
<Collection>
<Record Type="UI.CollectionFacet">
<PropertyValue Property="ID" String="MainSection"/>
<PropertyValue Property="Label" String="{@i18n&gt;DETAILS}"
<PropertyValue Property="Facets">
<Collection>
<Record Type="UI.ReferenceFacet">
<PropertyValue Property="Target" AnnotationPath
</Record>
</Collection>
</PropertyValue>
</Record>
</Collection>
</Annotation>

Testing the Analytical List Page


Finally we finished the configuration and now we can start to play with all the
functionalities discussed so far, check below a quick presentation of this demo
application.

https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 23/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

This is the end! I know this is a quite complex subject but I hope you’re able to
understand the basic concepts around the ALP and enjoyed the content! See
you next time!

Alert Moderator

2 Comments

Mahaboob Pathan

April 10, 2018 at 3:18 pm

https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 24/25
4/14/2018 Create an Analytical List Page using ABAP CDS views and annotations | SAP Blogs

Hi,

Very useful and Lots of information to start with….

Thank you..

Vural Aycicek

April 11, 2018 at 8:17 am

Hi,

thanks a lot. Looking forward your next blog.:))

Add Comment

Share & Follow


Privacy Terms of Use Legal Disclosure Copyright Trademark Sitemap Newsletter

https://blogs.sap.com/2018/04/04/create-an-analytical-list-page-using-abap-cds-views-and-annotations/ 25/25
4/15/2018 Create KPIs with data points and criticality calculation in a SAP Fiori Overview Page | SAP Blogs

THREE
KPI_n_FIORI
Products
Products Industries
Industries Support
Support Training
Training Community
Community Developer
Developer Partner
Partner

About
About

Home / Community / Blogs + Actions

Create KPIs with data points and criticality


calculation in a SAP Fiori Overview Page
January 22, 2018 | 1,092 Views |

Felipe de Mello Rodrigues


more by this author

SAP Fiori for SAP S/4HANA


SAP Fiori | SAPUI5 | abap cds | criticality | data point | kpi | overview page | ovp | Trend-Criticality Calculation

share
0 share
8 tweet share
0 like
2

Follow

Nowadays, most part of the organizations make use of Key Performance


Indicators (a.k.a KPIs) to evaluate their success in different activities relevant

https://blogs.sap.com/2018/01/22/create-kpis-with-data-points-and-criticality-calculation-in-a-sap-fiori-overview-page/ 1/19
4/15/2018 Create KPIs with data points and criticality calculation in a SAP Fiori Overview Page | SAP Blogs

with their business. A KPI is a measurable value that demonstrates how


effectively a company is achieving its objectives.

When we relate KPIs with the SAP Fiori experience the first thing that comes
to our minds is the use of SAP Smart Business Applications and the KPI
Modeller (more information available here), but what most part of the
developers don’t know is that this is not the only path available to publish KPIs
in an SAP Fiori application.

We know already that Fiori Elements can generate UIs at runtime based on
metadata annotations and predefined templates, but one of the most
interesting functionalities (and not so widespread) is the ability to publish KPIs
using the @UI.dataPoint annotation.

With a measurable field (number, price, quantity or percentage) you can define
a threshold and evaluate how the indicator has been performing and display
the result in a range of different colors and symbols. This concept is defined as
Trend-Criticality Calculation and you can check the official documentation
here.

The focus of this post is to explain only the Criticality calculation inside an
Overview Page application, but since there are different Fiori
Elements providing support to the annotation @UI.dataPoint is possible to

https://blogs.sap.com/2018/01/22/create-kpis-with-data-points-and-criticality-calculation-in-a-sap-fiori-overview-page/ 2/19
4/15/2018 Create KPIs with data points and criticality calculation in a SAP Fiori Overview Page | SAP Blogs

adapt the same concepts for different kind of developments (e.g. KPI in the
header of an Object Page).

This post covers not only Fiori and UI5 concepts but also ABAP CDS, if you
are not familiar with these concepts I advise you to check my previous posts
or to have a look in SAP official documentation.

What do I need to know about Criticality?


In a criticality calculation we need to provide the following data:

Improvement direction
Threshold (low and high values)

Depending on the selected direction we must define multiple low and high
values, let’s check in details the available directions and the expected
threshold values:

#TARGET: Your key figure must stay inside a specific target in the
center of your threshold, deviations in any directions will reflect a bad
performance of the indicator.
Example of an use case: Headcount.

#MINIMIZE: Your key figure must stay in the lowest part of the
threshold to indicate a good performance, deviation in the opposite
direction will reflect as bad performance.
Example of an use case: Work Incidents.

https://blogs.sap.com/2018/01/22/create-kpis-with-data-points-and-criticality-calculation-in-a-sap-fiori-overview-page/ 3/19
4/15/2018 Create KPIs with data points and criticality calculation in a SAP Fiori Overview Page | SAP Blogs

#MAXIMIZE: Your key figure must stay in the highest part of the
threshold to indicate a good performance, deviation in the opposite
direction will reflect as bad performance.
Example of an use case: Sales.

Now that you are able to identify the available scenarios we can start the
development of our demo. To construct our application we will use data from
SFLIGHTS standard view and create a KPI to check the seating occupancy for
each one of the scheduled flights in the system. Comparing the number of
occupied seats against the maximum seats available in the plane is possible
to generate a percentage value and evaluate the position with a criticality
calculation.

The improvement direction in this case must be #MAXIMIZE because the


airline wants to sell all the seats available in the plane, if the indicator is
showing entries with red color it basically means they need to focus sales in
those particular flights with a low occupancy.

The UI5 application will be based on an Overview Page template with a List
card with progress bar. When we combine a data point annotation with this
card template the framework populates automatically the colors and
completion of the bar.

https://blogs.sap.com/2018/01/22/create-kpis-with-data-points-and-criticality-calculation-in-a-sap-fiori-overview-page/ 4/19
4/15/2018 Create KPIs with data points and criticality calculation in a SAP Fiori Overview Page | SAP Blogs

As usual, I’m splitting this post in 3 sections:

1. ABAP CDS
2. OData Project
3. UI5 Project (Web IDE)

ABAP CDS
Create the view ZDEMO_CRITICALITY_OVP and select data from the view
SFLIGHTS. The following fields are expected as the result:

FlightCode: The union of the airline code (CARRID) and the


connection number (CONNID). This field should be available inside the
list card and in the global filter of the Overview Page.
FlightDate: Date of the flight, configured as a secondary data point in
the list card.
Destination: The arrival city, expected in the result of the card as well.
Occupancy: A percentage result based on the calculation of the
maximum seats (SEATSMAX) against the occupied seats
(SEATSOCC). This field should be configured as a data point to
become a KPI about seating occupancy. Extra configurations determine
only 2 fractional digits, expected values between 0 and 100, and a
criticality calculation with a maximize direction with the following range
of colors:
RED from 0 to 25.
YELLOW from 26 to 60.
GREEN from 61 to 100.
Percentage: Just a unit of measure to associate directly with the
occupancy field.

@AbapCatalog.sqlViewName: 'ZDEMOCRITOVP'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Criticality OVP'

@OData.publish: true

define view ZDEMO_CRITICALITY_OVP


as select from sflights as Flight
{
@EndUserText.label: 'Flight Code'
@UI: {
selectionField.position: 10,
lineItem.position: 10
}
key concat(carrid, connid) as FlightCode,

https://blogs.sap.com/2018/01/22/create-kpis-with-data-points-and-criticality-calculation-in-a-sap-fiori-overview-page/ 5/19
4/15/2018 Create KPIs with data points and criticality calculation in a SAP Fiori Overview Page | SAP Blogs

@UI: {
lineItem: {
type: #AS_DATAPOINT,
importance: #HIGH,
position: 20
},
dataPoint: {
title: 'Flight Date'
}
}
key fldate as FlightDate,

@UI.lineItem.position: 20
cityto as Destination,

@UI: {
lineItem: {
type: #AS_DATAPOINT,
importance: #HIGH,
position: 10
},
dataPoint: {
title: 'Flight Date',
valueFormat.numberOfFractionalDigits: 2,
minimumValue: 0,
maximumValue: 100,
criticalityCalculation: {
improvementDirection: #MAXIMIZE,
deviationRangeLowValue: 25,
toleranceRangeLowValue: 60
}
}
}
@Semantics.quantity.unitOfMeasure: 'Percentage'
division(seatsocc * 100, seatsmax, 2) as Occupancy,

@Semantics.unitOfMeasure: true
cast(' % ' as abap.unit(3)) as Percentage
}

Important points about the annotations used in this CDS view:

@OData.publish: Used to publish the OData service automatically


without the need to create an OData project through transaction SEGW.
@EndUserText.label: This annotation provides a label to the field.
@UI.selectionField: This annotation determines the position of the field
in the global filter of the Overview Page.
@UI.lineItem: This annotation determines the position of the fied inside
the cell of our list card.
@UI.dataPoint: This annotation holds the criticality calculation of our
KPI. Notice that we use #MAXIMIZE as the improvement direction, so
we just need to fill deviationRangeLowValue and
toleranceRangeLowValue to determine the threshold (as described by

https://blogs.sap.com/2018/01/22/create-kpis-with-data-points-and-criticality-calculation-in-a-sap-fiori-overview-page/ 6/19
4/15/2018 Create KPIs with data points and criticality calculation in a SAP Fiori Overview Page | SAP Blogs

SAP documentation). Also, there is a configuration for decimal places


and the minimum and maximum values expected for the field.
@Semantics.quantity and @Semantics.unitOfMeasure: These
annotations define a relation between a quantity field and its respective
unit.

This is the expected outcome:

OData Project
There are 2 ways to create your OData project consuming ABAP CDS views:

Create a new project through SEGW transaction and include your CDS
views by Reference. Just right click on the Data Model folder and select
Reference -> Data Source.

https://blogs.sap.com/2018/01/22/create-kpis-with-data-points-and-criticality-calculation-in-a-sap-fiori-overview-page/ 7/19
4/15/2018 Create KPIs with data points and criticality calculation in a SAP Fiori Overview Page | SAP Blogs

Include the @OData.publish annotation in the header of your CDS


view, the system will create your OData project automatically based on
the field structure and annotations.

@OData.publish: true

define view ZDEMO_CRITICALITY_OVP


as select from sflights as Flight
{
...
}

Remember always to activate the OData service in the Front-end server (SAP
Gateway server) through the transaction /IWFND/MAINT_SERVICE.

UI5 Project (Web IDE)


The process to create an UI5 application through Web IDE is pretty simple
and straightforward, just follow the steps below to create an Overview Page
with a list card with progress bar.

Right click in your Workspace folder and click New -> Project from Template.

Template Selection: Create a new project based on a Overview Page.

https://blogs.sap.com/2018/01/22/create-kpis-with-data-points-and-criticality-calculation-in-a-sap-fiori-overview-page/ 8/19
4/15/2018 Create KPIs with data points and criticality calculation in a SAP Fiori Overview Page | SAP Blogs

Basic Information: Define the project name as zdemo_criticality_ovp.

Data Connection: Select your system and OData project.

Annotation Selection: Select the remote annotation provided by the ABAP


CDS exposure.

https://blogs.sap.com/2018/01/22/create-kpis-with-data-points-and-criticality-calculation-in-a-sap-fiori-overview-page/ 9/19
4/15/2018 Create KPIs with data points and criticality calculation in a SAP Fiori Overview Page | SAP Blogs

Note #1: All the annotations published in our ABAP CDS view will flow to the
UI5 application through this remote
source ZDEMO_CRITICALITY_OVP_CDS_VAN. Later on you can see the
same annotations inside the XML file inside the localService folder.

Template Customization: Define a namespace, data source, entity type, app


title and description. The rest of the configuration doesn’t affect this demo.

Finish the wizard and conclude the creation of your Overview Page.

Now we need to configure a List card inside of our application, right click in the
main folder of your project, click New -> Card.

https://blogs.sap.com/2018/01/22/create-kpis-with-data-points-and-criticality-calculation-in-a-sap-fiori-overview-page/ 10/19
4/15/2018 Create KPIs with data points and criticality calculation in a SAP Fiori Overview Page | SAP Blogs

Configure Datasource: Select the existing data source and continue.

Select a Card: Select a List card template, no need to mark the extra
configuration in the bottom.

https://blogs.sap.com/2018/01/22/create-kpis-with-data-points-and-criticality-calculation-in-a-sap-fiori-overview-page/ 11/19
4/15/2018 Create KPIs with data points and criticality calculation in a SAP Fiori Overview Page | SAP Blogs

Template Customization: Select the entity set, provide a title and fill the card
properties with the following data:

List Type: Extended


List Flavor: Bar
Sort By: Flight Date
Sort Order: Descending

Finish the wizard and conclude the creation of your new card.

Note #2: The list flavor must be set as Bar to allow the use of progress bar
and provide support to data points with criticality calculation.

Note #3: The list type must be set as Extended to provide extra space for all
of our fields.

Note #4: The sort order was just configured like this to increase our chances
to find flights with low occupancy during the tests.

Now the application is concluded and we can start the tests, just filter by Flight
Code to navigate across different KPI results. Since we configured a sort by
Flight Date the chances to find flights with low occupancy are higher. Check
some examples below:

https://blogs.sap.com/2018/01/22/create-kpis-with-data-points-and-criticality-calculation-in-a-sap-fiori-overview-page/ 12/19
4/15/2018 Create KPIs with data points and criticality calculation in a SAP Fiori Overview Page | SAP Blogs

SQ0015 (Singapore)

AZ0555 (Frankfurt)

https://blogs.sap.com/2018/01/22/create-kpis-with-data-points-and-criticality-calculation-in-a-sap-fiori-overview-page/ 13/19
4/15/2018 Create KPIs with data points and criticality calculation in a SAP Fiori Overview Page | SAP Blogs

LH0402 (New York)

https://blogs.sap.com/2018/01/22/create-kpis-with-data-points-and-criticality-calculation-in-a-sap-fiori-overview-page/ 14/19
4/15/2018 Create KPIs with data points and criticality calculation in a SAP Fiori Overview Page | SAP Blogs

LH2402 (Berlin)

https://blogs.sap.com/2018/01/22/create-kpis-with-data-points-and-criticality-calculation-in-a-sap-fiori-overview-page/ 15/19
4/15/2018 Create KPIs with data points and criticality calculation in a SAP Fiori Overview Page | SAP Blogs

Alert Moderator

https://blogs.sap.com/2018/01/22/create-kpis-with-data-points-and-criticality-calculation-in-a-sap-fiori-overview-page/ 16/19
4/15/2018 Create KPIs with data points and criticality calculation in a SAP Fiori Overview Page | SAP Blogs

5 Comments

Dipanwita Sarkar

January 23, 2018 at 5:43 am

The blog was very subjective and it clears the idea about SAP.

Jocelyn Dart

January 25, 2018 at 6:30 am

Great work Felipe! I’ve added your blog to our SAP Fiori elements wiki

https://wiki.scn.sap.com/wiki/display/Fiori/Fiori+elements

I’d love to see more blogs from you on Fiori elements topics … as you are interested in
analytics you might like to do something on the Analytical List Page perhaps?

Felipe de Mello Rodrigues Post author

January 26, 2018 at 2:05 am

Hi Jocelyn,

Thanks for the feedback!

I’m actually with this idea in mind since the release of version 1.48. I’ve
been planning to deliver two new posts for the next months, first one
focused only in ABAP CDS development for analytical purposes
(dimensions, texts, cubes and queries) and the second post about
Analytical List Page (probably consuming the data model created in the first
article).

https://blogs.sap.com/2018/01/22/create-kpis-with-data-points-and-criticality-calculation-in-a-sap-fiori-overview-page/ 17/19
4/15/2018 Create KPIs with data points and criticality calculation in a SAP Fiori Overview Page | SAP Blogs

I think it would be good to explain how to generate a proper data model for
an Analytical application before we discuss how to configure the front-end
application.

Best Regards,

Felipe

Felipe de Mello Rodrigues Post author

April 4, 2018 at 6:36 am

Hi Jocelyn Dart,

Hope you’re well.

As we discussed previously, I’ve been working with those two articles about
ABAP CDS analytical views and the Analytical List Page during the last
months.

I just released the last article about ALP a few minutes ago, so I would like
to share with you and see if they are aligned with your expectations. These
are the links:

Create an analytical model based on ABAP CDS views


Create an Analytical List Page using ABAP CDS views and annotations

Hope you like it.

Cheers,

Felipe

Jocelyn Dart

April 5, 2018 at 7:35 am

Fantastic work Felipe!!! I’m adding them to the Fiori Elements


Wiki

They will be much appreciated by many of our readers I know!

https://wiki.scn.sap.com/wiki/display/Fiori/Fiori+elements

https://blogs.sap.com/2018/01/22/create-kpis-with-data-points-and-criticality-calculation-in-a-sap-fiori-overview-page/ 18/19
4/15/2018 Create KPIs with data points and criticality calculation in a SAP Fiori Overview Page | SAP Blogs

Add Comment

Share & Follow


Privacy Terms of Use Legal Disclosure Copyright Trademark Sitemap Newsletter

https://blogs.sap.com/2018/01/22/create-kpis-with-data-points-and-criticality-calculation-in-a-sap-fiori-overview-page/ 19/19

S-ar putea să vă placă și