on 06-19-2023 10:23 AM
Hi Experts,
How to pass parameters to CDS view ( Exposed via OData ) from PowerBI?
I am using powerBI for analysis on Standard Fiori App : Inventory KPI Analysis
In PowerBI, I am using this URL "/sap/opu/odata/sap/MMIM_STKKPITIMESERIESCOMPRN_SRV/?$format=xml" in "OData Feed" option. It fetches all the entities and tries to call them one by one. in few of the entities, PowerBI throws below error.
Error on PowerBI.
Error in /iwfnd/error_log
I found that Below CDS view is getting used and it has parameters.
Hi trushitpatel1727_6
try this: C_StkKPIGroupComparisonResults(P_StartDateOfPreviousPeriod='<startdate>',P_EndDateOfPreviousPeriod='<enddate>,P_StartDateOfReferencePeriod='<startdate2>,P_EndDateOfReferencePeriod='<enddate2>,P_PeriodType='<periodType').
You call the $metadata to see the parameters of the entity
Kind regards
Julian Danho
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Julian,
Thanks for the help.
What worked for me is adding "datetime" keyword and "Results" navigation as below
/sap/opu/odata/sap/MMIM_STKKPITIMESERIESCOMPRN_SRV
/C_StkKPIGroupComparisionQry(
P_StartDateOfPreviousPeriod=datetime'2021-06-01T00:00:00',
P_EndDateOfPreviousPeriod=datetime'2022-05-31T00:00:00',
P_StartDateOfReferencePeriod=datetime'2022-06-01T00:00:00',
P_EndDateOfReferencePeriod=datetime'2023-05-31T00:00:00',
P_PeriodType='M'
)/Results
Hi trushitpatel1727_6
yes because of the Edm Type. This is OData Microsoft standard - see SAP Docu.
The same is still the case for Edm.Guid. There you also need $filter=UUID eq guid'00000000-0000-0000-000000000000'.
Kind regards
Julian Danho
User | Count |
---|---|
82 | |
11 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.