Skip to Content

Why does my cds view with parameters and odata publishing not work?

Dear community,

I have created a simple CDS view.

@AbapCatalog.sqlViewName: 'ZZ_MYVIEW_S'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Summary view'
@OData.publish: true


define view ZZ_MYVIEW
//with parameters p_type: abap.char(1)
as select from ZZ_PARENTVIEW {
    key date,
    key time,
    key state,
    count (*) as cnt
}
//where type = '1'
group by date, time, state;

Now I want to select only a certain type of entries from the parent view (field "type"). The version with "where type = '1'" works, but is somehow not flexible enough. So I wanted to change the code, using a parameter "p_type". When I remove the comment from the line "with parameters", I get the following error:

"OData exposure not supported for view parameters without DDIC data element"

Does anyone has an idea, what this means? And how I can fix this?

(PS: I use Netweaver 7.50)

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 18, 2017 at 02:40 PM

    Hi, did you find any solutions to this ?

    Best Regards,

    Gokhan

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 03 at 09:00 AM

    Create a Datatype (in our case DATS) and use this one.

    Add comment
    10|10000 characters needed characters exceeded