cancel
Showing results for 
Search instead for 
Did you mean: 

Activate the Consumption View, it throws error

0 Kudos
1,839

Hi Gurus

My objective is to write a Consumption CDS view Y4 on top of the BASIC CDS View Y3 and eventually consume it using Analysis for Excel (version AOFFICE25SP04P_1-80002421). We are on S4Hana 1610 with SAP_BW on 751 SP6.

HANA CDS View Y3

@AbapCatalog.sqlViewName: 'zy30'

@AccessControl.authorizationCheck: #NOT_REQUIRED

@Analytics.dataCategory: #CUBE

@Analytics.dataExtraction.enabled: true

@EndUserText.label: 'Y1'

@VDM.viewType: #BASIC

define view Y3 as select from acdoca {

key rldnr as Ledgr,

key rbukrs as CompCode,

key gjahr as FiscalYear,

key belnr as DocNum,

key docln as LineItem,

poper as Period,

racct as GLAccount,

matnr as Material,

werks as Plant,

zzricode as zzricode, timestamp,

@Semantics.currencyCode: 'true' rkcur,

@Semantics: { amount : {currencyCode: 'rkcur'} } ksl

} where rldnr = '0L'


BASIC CDS View Y3 displays the data correctly in Data Preview pane.

Consumption View Y4 has following code.

@AbapCatalog.sqlViewName:'zy40'

@AccessControl.authorizationCheck:#NOT_REQUIRED

@Analytics.query:true

@EndUserText.label:'Y4 - Display ACDOCA info'

@VDM.viewType:#CONSUMPTION

defineview Y4 asselectfrom Y3 {

key Ledgr,

key CompCode,

key FiscalYear,

key DocNum,

key LineItem,

Period,

GLAccount,

Material,

Plant,

zzricode,

timestamp,

@AnalyticsDetails.query.axis:#FREE rkcur,

@AnalyticsDetails.query.axis:#ROWS

@Semantics:{amount:{currencyCode:'rkcur'}} ksl // Field you want to make as Measure

}

This code throws error during activation.

The errors say:

Could not resolve field KSL (ODP ZY30)

Error while processing select entry number 13 (at Line 21 Column 7) [Analytics]


Reference

Syntax related to KSL as Measure was followed using the SAP knowledge URLs below.

https://answers.sap.com/questions/288123/measures-not-coming-in-analysis-office.html

https://answers.sap.com/questions/564289/error-reading-infoprovider-for-cds-view.html

https://blogs.sap.com/2017/05/12/consumption-of-cds-views-in-analysis-for-office/

Accepted Solutions (0)

Answers (0)