Skip to Content
avatar image
Former Member

Pass input parameters of an ABAP CDS View to a BEx query / Transient provider

Hello experts,

I have created an ABAP CDS view with an input parameter and I want to pass the input parameter to a BEx query but I am facing a runtime error.

The view:

"

@AbapCatalog.sqlViewName: 'ZCDS1'

@AccessControl.authorizationCheck: #NOT_REQUIRED

@ClientDependent: false

@Analytics.query: true

@Analytics.hidden: false

@Analytics.dataCategory: #CUBE

@Analytics.dataExtraction.enabled: true

@VDM.viewType: #CONSUMPTION


DEFINE VIEW ZCDS1_DDL

WITH PARAMETERS p_year:/SAPSLL/NRYEAR

{..... // some fields selection here... // ....}

WHERE [TableName].Year = :p_year "

The view gets successfully activated. When I make a testrunin ADT in Eclipse it works properly with the selection screen.

However, in transaction rsrts_odp_dis, when I try to run the transient provider/bex query generated for this CDS view, I get the following error:

" The parser produced the error: "ZCDS1" is a database entity with parameters, but a "(" is missing after the name.

Error reading the data of InfoProvider 2CZCDS1"

The parameter is not displayed under Key part / Data part / Unit / Key figures:

The CDS view can be successfully consumed in BEx if I remove the input parameters.

This is on NetWeaver ABAP 7.40 SP16.

Thank you for your comments.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Jan 10, 2017 at 12:49 PM

    Hi Georgi,

    we don't support views which are a CUBE (@Analytics.dataCategory: #CUBE) and at the same time a query

    @Analytics.query: true .

    You should remove the later annotation @Analytics.query: true. Then you should get a proper transient InfoProvider. Notice that for each InfoProvider there exists a default query (query name in RSRT 2C<SQL-viewname>/!2C<SQL-viewname>.

    You can test if you click "standard query" in TA RSRTS_ODP_DIS. If you need a more complex query, you have to define a separate query view.

    But in principle parameters are supported on CUBE-level

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 10, 2017 at 02:10 PM

    Hi Stefaan,

    Thank you for the feedback. However, removing "@Analytics.query: true" did not solve the problem. I tested, as you suggest, in TA RSRTS_ODP_DIS as a standard query but I got the very same error message as from the post above. I tried both with and without buffer.

    I tried removing all the Analytics annotations except "@Analytics.dataCategory: #CUBE" and it still fails the test with the same error text.

    The view works fine if I remove the parameters part.

    What could be the problem?

    Thanks!

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 10, 2017 at 02:27 PM

    Could it be because it is not on 7.5 SP4 or higher? I am running on 7.4 SP16

    Based on this discussion:

    https://answers.sap.com/questions/96176/abap-cds-views-analytics-annotations-requirements.html

    Add comment
    10|10000 characters needed characters exceeded