on ‎2020 Sep 29 11:00 AM
Hi,
I am trying to create a simple CDS view and using annotation @Analytics.query: true (this is a prerequisite to use the view in SAC as 2C* object) as purpose is to expose this CDS view to SAC, but getting below error while activating, what is this error about and how to fix it?
Checked multiple blogposts but could not find the exact resolution.
Note- when I remove the annotation @Analytics.query: true from my code I do not get any error and the view gets activated successfully.
Prerequisite-
https://apps.support.sap.com/sap/support/knowledge/en/2595552
Code-
@AbapCatalog.sqlViewName: 'ZDEMO_S4'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@Analytics.query: true
@EndUserText.label: 'ZXDemo'
define view ZXDEMO as select from vbap{
vbeln as Order_No,
posnr as Item,
matnr as Material,
po_quan as PO_Qty
}
Error-
Error reading InfoProvider for CDS view 2CZDEMO_S4
Unknown CDS view: VBAP - only CDS view names allowed in FROM clause [Analytics]
Thanks and Regards,
Ravi
Request clarification before answering.
To create a model using CDS views in SAC, analytics.query: true annotation is not alone enough.
You also want to publish OData service in SAP GUI. And add Annotation, OData.pulish: true.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
how were you able to fix this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Rahul,
Yes, you need to create 2 layers of CDS views-
First build a Cube View and on top of it build a Consumption view.
Once both the views are active, you will find a 2C* object created in the system.
Regards,
Ravi
Is it worked after adding @analytics.dataCategory: #CUBE annotation?
| User | Count |
|---|---|
| 7 | |
| 7 | |
| 6 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.