on 2019 Oct 22 6:39 AM
Hello,
I have created OVP application using Consumption view CDS, with multiple chart cards. It was working.
Now I have requirement to add parameter to CDS which will be passed as filter criteria in where clause of CDS. But as soon as I added parameter to CDS , nothing is visible on charts. Metadata is reflecting parameter entity created , parameter is also coming in app, however nothing is visible on charts. I also changed the card settings, added "addODataSelect": true, but still no use.
CDS parameter (CDS is fetching data correctly, if I check data in data preview)

Odata Service(generated) Metadata

Card settings.

OVP Application, with blank cards. parameter is reflecting.

Request clarification before answering.
Iam doing almost the same. Overview Page with couple of Analyticals cards using CDS with parameters.
But for me, I see two blank cards but missing selection screen. The CDS parameters does not show up on the Filter area.
Here is my CDS:
And here is my output.
Can anyone provide any thoughts? #SAP Fiori Elements Overview Page #CDS with parameters
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi abhi1185
Were you able to resolve the issue? I am facing exactky the same problem.
Thanks
Raveesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
What may be happening that instead of passing the parameters as a key, it happens to me with filter, I use CDS models
$ filter = p_EKORG eq '' and p_LIFNR eq '108000' and p_MATKL eq '' and p_MATNR eq '' and p_EKGRP eq '' and p_WERKS eq '' and p_date_start eq datetime'2020-01-01T00: 00: 00 'and p_date_e eq datetime'2020-05-08T00: 00: 00 '
where I am using two models one for the filter and one for the data
"sap.ovp": { "globalFilterModel": "ZCDS_FILTROS_PROVEEDORES_CDS", "globalFilterEntityType": "zcds_filtros_proveedoresParameters", "enableLiveFilter": true, "considerAnalyticalParameters": false, "cards": { "card00": { "model": "ZSD_PROV_COND_COM_SRV", "template": "sap.ovp.cards.table", "settings": { "title": "{{card00_title}}", "subTitle": "{{card00_subTitle}}", "entitySet": "condComercialesSet", "addODataSelect": false } } } }
when from the chrome console it would have to show me / zcds_filters_providers (p_EKORG = '', p_LIFNR = '108000', p_MATKL = '', p_MATNR = '', p_EKGRP = '', p_WERKS = '', p_date_start = datetime'2020-01-01T00: 00: 00 '= p_date_end eq datetime '2020-05-08T00: 00: 00') / zcds_filters_providersSet
regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Main issue seems to be this one 'The caller violated a precondition for method call', which I think is coming as CDS is having parameters, which is not getting passed.
As for CDS with parameters , we need to use below URL format for fetching data passing parameter, so is generated OVP template is equipped to do so ?
/sap/opu/odata/sap/ZRMT_C_ASSIGNMENT_OVERVIEW_CDS/ZRMT_C_ASSIGNMENT_OVERVIEW(p_date='20191105')/Set
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Prasita,
I tried what is there in link, but facing some other issues.
Once I added parameters to my CDS, OData Metadata is looking something like this.
it is now having two entities
ZRMT_C_ASSIGNMENT_OVERVIEWResult

ZRMT_C_ASSIGNMENT_OVERVIEWParameters

Now in WEB IDe, I created one local annotations for selectionvariant

and changed card settings accordingly.

However now when I run the OVP application for first time, cards don't show any data, and then its goes to some kind of error.


Console shows lot of errors including errors related to identification annotations, I dont have any navigation defined from cards as of now, is it mandatory ?

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 18 | |
| 8 | |
| 6 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.