cancel
Showing results for 
Search instead for 
Did you mean: 

Analytic CDS consumption view call via OData

kalpesh_pandey
Contributor
0 Kudos

Hi, We have a Analytic query created in CDS view which is exposed as OData. But we are not able to call as we have done it for other consumption views. This analytic query has Parameter as well as one filter defined as mandatory.

We are on S4HANA 1610. I tried different options as given below.

1. /sap/opu/odata/sap/ZOTCSD_C_SALESQ002_CDS/ZOTCSD_C_SALESQ002Results?$filter=CalYearMonth eq '03.2019'

Error is specify a value for variable display currency.

2. /sap/opu/odata/sap/ZOTCSD_C_SALESQ002_CDS/ZOTCSD_C_SALESQ002(P_DisplayCurrency='USD')/Results?$filter=CalYearMonth eq '03.2019'

Same type of options I tried in other non Analytic CDS views and it worked fine. In Entitysets I see ZOTCSD_C_SALESQ002 and ZOTCSD_C_SALESQ002Results . Normally I have seen ZOTCSD_C_SALESQ002Set type but this time for analytic query it has Results.

Below is CDS view details.

@Analytics.query: true

@VDM.viewType: #CONSUMPTION

@OData.publish: true

define view ZOTCSD_C_SALESQ002 with parameters @Consumption.defaultValue: 'USD' P_DisplayCurrency : vdm_v_display_currency

as select from ZOTCSD_P_Sales (P_DisplayCurrency : $parameters.P_DisplayCurrency)

{ @EndUserText.label: 'Calendar Year/Month'

@Consumption.filter: {selectionType: #RANGE, multipleSelections: true, mandatory: true} @AnalyticsDetails.query.display: #KEY_TEXT

@AnalyticsDetails.query.variableSequence: 10

CalYearMonth,

***Rest of the CDS view below***

Thanks,

Kalpesh

Accepted Solutions (0)

Answers (0)