11-29-2016 11:32 PM - edited 02-03-2024 7:43 PM
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,
Nuno
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,
Nuno
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nuno
Almost the same problem,
Have you got a solution?
Best Regards,
Wead
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Request to follow the steps given in the link:
https://blogs.sap.com/2018/06/11/sap-fiori-list-report-utilizing-parametrized-cds/
It may help to solve the problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Has anyone found a solution?
Cheers,
Severin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have the same issue. I'll try with manual OData service, but it's a shame.
Has anyone found a solution?
Cheers,
Sev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
p_langu:sylangu
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.
Cheers,
Eric
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
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
Thanks,
Pratheek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.