This blog explains how to define default key display settings in analytical queries, ensuring user-friendly key visualization. Many Hierarchy Nodes and Dimensions have compounded keys that are shown as a long-concatenated keys during runtime. Sometimes its not needed to see the concatenated long key. To enhance readability, @AnalyticsDetails.query.keyDisplay annotation is use to specify the default display behaviour for key.
Annotation: @AnalyticsDetails.query.keyDisplay
Accepted Values:
#NOT_COMPOUND: Displays the key as a non-compounded characteristic value.#COMPOUND: Displays the key as a compounded characteristic value (concatenated long key).#CONTEXT_DEPENDENT: Displays the key based on its uniqueness. If the compounded key is unique due to drill-down selection, it will be shown as non-compounded
Example
@AccessControl.authorizationCheck: #NOT_ALLOWED
@EndUserText.label: ‘Query: Simple Example for Key display’
define transient view entity ZLR_PC_KEY_DISP
provider contract analytical_query
as projection on ZOQ_FLIGHT {
@AnalyticsDetails.query.axis: #ROWS
carrid,
@AnalyticsDetails.query: {
axis: #ROWS,
totals: #SHOW
}
@EndUserText.label: ‘ConnectionID Not Compound’
@AnalyticsDetails.query.keyDisplay: #NOT_COMPOUND
connid,
@AnalyticsDetails.query.axis: #FREE
@analytics.hidden: true
currency,
@Semantics.amount.currencyCode: ‘currency’
@EndUserText.label: ‘Booking total 2019’
paymentsum
}
where flyear = ‘2019’
and currency = ‘EUR’
Output
Release Info
This feature is available from Cloud release 2508
SAP Note: 3600690 – CDS: query display key settings
This blog explains how to define default key display settings in analytical queries, ensuring user-friendly key visualization. Many Hierarchy Nodes and Dimensions have compounded keys that are shown as a long-concatenated keys during runtime. Sometimes its not needed to see the concatenated long key. To enhance readability, @AnalyticsDetails.query.keyDisplay annotation is use to specify the default display behaviour for key.Annotation: @AnalyticsDetails.query.keyDisplayAccepted Values:#NOT_COMPOUND: Displays the key as a non-compounded characteristic value.#COMPOUND: Displays the key as a compounded characteristic value (concatenated long key).#CONTEXT_DEPENDENT: Displays the key based on its uniqueness. If the compounded key is unique due to drill-down selection, it will be shown as non-compoundedExample@AccessControl.authorizationCheck: #NOT_ALLOWED
@EndUserText.label: ‘Query: Simple Example for Key display’
define transient view entity ZLR_PC_KEY_DISP
provider contract analytical_query
as projection on ZOQ_FLIGHT {
@AnalyticsDetails.query.axis: #ROWS
carrid,
@AnalyticsDetails.query: {
axis: #ROWS,
totals: #SHOW
}
@EndUserText.label: ‘ConnectionID Not Compound’
@AnalyticsDetails.query.keyDisplay: #NOT_COMPOUND
connid,
@AnalyticsDetails.query.axis: #FREE
@analytics.hidden: true
currency,
@Semantics.amount.currencyCode: ‘currency’
@EndUserText.label: ‘Booking total 2019’
paymentsum
}
where flyear = ‘2019’
and currency = ‘EUR’OutputRelease InfoThis feature is available from Cloud release 2508SAP Note: 3600690 – CDS: query display key settings Read More Technology Blog Posts by SAP articles
#SAP
#SAPTechnologyblog