Skip to Content

ABAP CDS + OData + Fiori Smart Template; View parameters are not welcome?

Nov 29, 2016 at 11:32 PM


avatar image

Hi all,

I'm currently developing an application using a Smart Template and some CDS Views.

Since I need to perform some calculations (blame COEJ/COSR tables and their column-based periods!), I'm using view parameters and some artistry to get the job done.

So the top of my consumption view looks like this:

Problem is: the parameters are created as a separate Entity Set on the OData Service, which leads the Smart Template to restrict my choice of OData Collection to the parameters' Entity Set, while automatically defining the navigation to the Results Entity Set.

(if I remove the parameters and hardcode them on the select statement, I end up with a fully working List Report with all the data I expect to see)

This means that the Parameters' Entity Set will be used for the List Report (thus showing only the 3 parameters as columns of the Smart Table) and the Results' Entity Set will be used for the Object Page.

What I intended was to have Parameters show on the Smart Filter Bar (and included in the Variant Management control as well); working like filters, so to say.

Are there annotations I'm missing that can act as a workaround? I've seen the @Consumption.derivation ones but don't seem to fully understand them?

Am I asking for more than the Smart Template app can chew? Should I give up on the (very) limited ABAP CDS Views and move to HANA CDS Views for the calculations (plus an .xsodata)?

Thanks in advance,


screenshot-5.png (3.0 kB)
screenshot-1.png (15.2 kB)
screenshot-2.png (15.6 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

5 Answers

Wead Ye
Dec 13, 2016 at 03:28 AM

Hi Nuno

Almost the same problem,

Have you got a solution?

Best Regards,


10 |10000 characters needed characters left characters exceeded
Nuno Pinto Jan 16, 2017 at 02:23 PM

Hi Wead,

Unfortunately not. Didn't find a straight through solution, so ended up building an OData service manually. Passed the CDS View parameters as filters and then on the DPC_EXT class of the OData service called the CDS View with using those filters as... parameters. Not pretty, but it worked.

Good luck.

Best regards,


Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Nuno,

Any news on this topic?

I have got the same requirement and looking to come up with an elegant solution... Seems nothing has changed in List Report behavior.

Thanks, Vlad


Hi Nuno,

How did you keep all annotations for List Report application when you redefined your OData service in GW?


Pratheek KV
May 04, 2017 at 10:37 AM


I dont know if I quiet get the issue, but you can have a look at the UI annotation SELECTION VARIANT. This might be of help.

This is used to pass Filters from UI for Smart Template App's



10 |10000 characters needed characters left characters exceeded
Eric Nause Aug 03, 2017 at 11:12 PM

Hi Nuno,

I ran into a less complex variant of this same issue, whereas I had a single parameter in my CDS view for the language key used to read several texts. I was able to solve it with the following annotations:

define view {my_view_name}
    with parameters 
        @Environment.systemField : #SYSTEM_LANGUAGE 
        @Consumption.hidden: true

the result was such that when the OData was regenerated (when activating the View), there was no longer a separate Entity Set for the view parameter and the parameter was not visible at all and was set to the user's logon language at runtime.

In your case, I guess perhaps you could add 3 view fields, somehow map them to your 3 parameters via @Consumption.derivation annotations, and use the 3 view fields as filter criteria. I haven't tried this though, so you'll have to play around with it if no-one else has a solution.



10 |10000 characters needed characters left characters exceeded
Severin de Beaulieu Jan 11 at 04:55 PM


I have the same issue. I'll try with manual OData service, but it's a shame.

Has anyone found a solution?



10 |10000 characters needed characters left characters exceeded