Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Error reading InfoProvider for CDS View

0 Kudos

Hi,

I'm currently trying to handle a "Error reading InfoProvider for CDS View" error. I've already tried multiple solutions that I found on this forum, but so far nothing has helped me resolve this error.

I've built an analytical query on top of various basic CDS views, which work perfectly fine. However, when I try to build my query, I always get the error "Error reading InfoProvider for CDS View" in Eclipse and the query is not known when I check in the backend.

This is my query:

@AbapCatalog.sqlViewName: 'ZTEST'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'AnalyticalTestQuery'
@VDM.viewType: #COMPOSITE
@Analytics.query: true
@Analytics.dataCategory: #CUBE
@Analytics.dataExtraction.enabled: true
@OData.publish: true


define view Z_TEST
  with parameters
    @EndUserText.label: 'Billing Type'
    p_fkart : fkart, 
    @EndUserText.label: 'Sold-To Party'
    p_kunag : kunag,
    @Environment.systemField: #SYSTEM_DATE
    @EndUserText.label: 'Billing Date'
    p_date  : fkdat,
    @EndUserText.label: 'Material'
    p_matnr : matnr,
    @EndUserText.label: 'Item Category'
    p_pstyv : pstyv
  as select from Z_C_BASIC_TEST
{
  key BillingDocument,
  key BillingDocumentItem,
      BillingDocumentDate,
      Material,
      BillingDocumentItemText,
      OrderPrice,
      SoldToParty,
      SoldToPartyName,
      CurrencyCode,
      BillingQuantity,
      BillingQuantityUnit,
      QuantityCredit,
      QuantityUnit,
      SumQuantity,
      Difference
}
where BillingDocumentType       = $parameters.p_fkart
  and SoldToParty               = $parameters.p_kunag
  and BillingDocumentDate       = $parameters.p_date 
  and Material                  = $parameters.p_matnr
  and SalesDocumentItemCategory = $parameters.p_pstyv;

The fields OrderPrice, SumQuantity and Difference are calculated with different formulas in the underlying CDS view and are marked with @DefaultAggregation: #FORMULA.

The API release state of the CDS view is also set to RELEASED.

Could somebody please help me figure this out? I think I've tried everything, I found online..

Thanks 🙂

2 REPLIES 2

former_member199945
Active Contributor
0 Kudos

Hi,

Try like this -

Remove annotation @Analytics.dataCategory: #CUBE and

Make @VDM.viewType:# as Consumption and see the results.

Thanks

BhargavaReddy
Active Participant
0 Kudos

Hi,

Analytical query view must be create on top of CUBE view. but not in the same level.

that means annotations should be like

Z_TEST (Query view) :

@Analytics.query: true

Z_C_BASIC_TEST (CUBE View 😞

@VDM.viewType: #COMPOSITE

@Analytics.dataCategory: #CUBE

Thanks & Kind Regards,

Bhargava