cancel
Showing results for 
Search instead for 
Did you mean: 

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

felix_lemke
Explorer

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)

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member

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

0 Kudos

Hi, did you find any solutions to this ?

Best Regards,

Gokhan