Para oDataV4 , ocorre um erro ao tentar carregar os dados. Se procurar no SDN tem um post sobre esse erro e uma resposta que no V4 somente utilizando as annotations para analytics, link abaixo
=== VIEW ENTITY
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'TESTE'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
serviceQuality: #X,
sizeCategory: #S,
dataClass: #MIXED
}
define root view entity ZI_SZK1
as select from zszk_tab
{
key matnr as Matnr,
key status as Status,
waers as Waers,
@Semantics.amount.currencyCode: 'waers'
valor as Valor,
valor2 as Valor2
}
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Projectoi'
@Metadata.ignorePropagatedAnnotations: true
@Analytics.dataCategory: #CUBE
@UI.presentationVariant : [{
groupBy : [ 'Matnr' ],
total : [ 'Valor' ],
visualizations: [{
type: #AS_LINEITEM,
element: 'Valor'
}]
}]
=== PROJECTION
define root view entity ZC_SZK1
provider contract transactional_query
as projection on ZI_SZK1
{
@UI.facet: [
{
purpose: #STANDARD,
type: #IDENTIFICATION_REFERENCE,
targetQualifier: 'DPBP',
position: 10
}]
@UI.lineItem: [{ position: 10 }]
@UI.identification: [{ position: 10 }]
key Matnr,
@UI.lineItem: [{ position: 20 }]
@UI.identification: [{ position: 20 }]
key Status,
// @UI.lineItem: [{ position: 30 }]
// @UI.identification: [{ position: 30 }]
@Semantics.currencyCode: true
Waers,
@UI.lineItem: [{ position: 40 }]
@UI.identification: [{ position: 40 }]
@Semantics.amount.currencyCode: 'Waers'
@Aggregation.default: #SUM
Valor,
@UI.lineItem: [{ position: 50 }]
@UI.identification: [{ position: 50 }]
@Aggregation.default: #SUM
Valor2
}
No VS Code selecionar a opção de LIST REPORT PAGE, na seleção do tipo da tabela selecionar o Analytical