cancel
Showing results for 
Search instead for 
Did you mean: 

Error while exposing CDS view to SAC

adenikiran
Discoverer
0 Kudos

Hello Community,

From online blogs, I understood below are the steps to expose a CDS view to cloud SAC.

Create a CDS composite view with cube data category.

Create a CDS consumption view with @Analytics.query: true and @OData.publish: true and make API State as released

Below are the steps I followed:

1) Created a custom table

2) Created composite view with below annotations based on above table

@AbapCatalog.sqlViewName: 'ZKAMDCCP'

@AbapCatalog.compiler.compareFilter: true

@AbapCatalog.preserveKey: true

@AccessControl.authorizationCheck: #NOT_REQUIRED

@EndUserText.label: 'Test CDS View'

@Analytics.dataExtraction.enabled: true

@VDM.viewType: #COMPOSITE

@Analytics: { dataCategory: #CUBE}

3) Created consumption view with below annotations

@AbapCatalog.sqlViewName: 'ZKAMDCNS'

@AbapCatalog.compiler.compareFilter: true

@AbapCatalog.preserveKey: true

@AccessControl.authorizationCheck: #NOT_REQUIRED

@EndUserText.label: 'Test CDS View- Consumption'

@OData.publish: true

@Analytics.dataExtraction.enabled: true

@VDM.viewType: #CONSUMPTION

@Analytics.query: true

4) Enabled API for consumption view

5) When I try to register this view in /IWFND/MAINT_SERVICE, getting below error

Query ZKAMDCNS could not be opened.

If I remove "@Analytics.query: true" from consumption view, able to register the view in /IWFND/MAINT_SERVICE and able to see data in SAP Gateway client.

What am I missing here ? Please advise.

Thanks in advance.

Accepted Solutions (0)

Answers (3)

Answers (3)

SeshaP
Participant
0 Kudos

Hi Kiran,

Run the created CDS view 2CZKAMDCNS in transcation RSRTS_ODP_DIS and see. Thiswill provide the details if the code has any syntax errors.

Thank you

adenikiran
Discoverer
0 Kudos

Hi Sesha,

When I search CDS view in RSRTS_ODP_DIS , and go to Check Metadata, I'm getting below error.

Do I need to define ODP ? if so, how do I do it ?

ODP <CDS Name> does not exist
SeshaP
Participant
0 Kudos

Hi Kiran,

Are you able to run the views in RSRT transaction check - 2CZKAMDCNS ?

SeshaP
Participant
0 Kudos

Hi,

Remove @OData.publish: true annotaiton in consumption view and check the view 2CZKAMDCNS in SAC, it will showup.

Thank you

adenikiran
Discoverer
0 Kudos

tried that Sesha/Prasanth.

Removed the Odata publish annotation, made API state as released but in SAC I can see the view name, but when I select it and click on ok, it shows same error : query not found.


and when I open this query in RSRT TCode, it’s opening a ABAP debugger window

PrasanthM
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Kiran,

Can you refer to the note https://me.sap.com/notes/2595552/E and check if this solves your issue?

Thanks,

Prasanth