cancel
Showing results for 
Search instead for 
Did you mean: 

OData service unable to pass MD parameter

yyeung
Newcomer
0 Kudos
852

Hi,

We are trying to pull data through Odata service to powerBI and was able to successfully do this with a key figure, but if we try with any master data then it throws an error

OData Version 3 and 4, Error: The remote server returned an error: (400) Bad Request. (<masterdata name> are invalid calculation levels)

We have tried with different master data fields and the same error shows up. Any idea?

The URL we are using is like this:

https://[system].api.scmibp.ondemand.com/sap/opu/odata/IBP/EXTRACT_ODATA_SRV/[planningarea]?$select=[masterdata],[keyfigure]

Thanks in advance.

Accepted Solutions (0)

Answers (3)

Answers (3)

kendw17
Explorer
0 Kudos

https://help.sap.com/docs/SAP_INTEGRATED_BUSINESS_PLANNING/da797ae2bf6246d58abd417f24915d55/45a6271e...     This help document says /IBP/EXTRACT_ODATA_SRV was designed for  SAP Analytics Cloud.   For PowerBI and other application use SAP_COM_0720 and /IBP/PLANNING_DATA_API_SRV for key figures and IBP/MASTER_DATA_API_SRV for master data.  

You must set up SAP_COM_0720 similar to how you configured SAP_COM_0143.  But SAP_COM_0720 needs the additional global parameter RELEVANT_MDT_FOR_MD_API.  It can be set using wild cards like ???*,???* where ??? are the prefixes for you different planning areas master data types.  Or you can list each full name of the master data type to limit it to just a few master data types.

Use the link you get from the communication arrangement for ..../IBP/MASTER_DATA_API_SRV and you will get a list of all the master data tables that match the RELEVANT_MDT_FOR_MD_API.   Pick the ones you want and then transform the data.

For key figure data type a query like

..IBP/PLANNING_DATA_API_SRV/CBS4P700?$select=PRDID,LOCID,PERIODID3_TSTAMP,KEYFIGURE1,KEYFIGURE2, etc..  

You can use relative time filter too like

&$filter= PERIODID3_REL ge 0 and PERIODID3_REL le 5 and PRDID eq 'xxxxx'

 

 

alannahngaire
Explorer
0 Kudos

The trick I used is not using an ODATA service and instead building odata queries in the Business Analytics work center. This video (first 20 minutes) is the best way to manage analytics in Power BI. https://www.youtube.com/watch?v=I67Et6PW8WM, I then use power query to filter and maintain the data I need. I find the ODATA service for Power BI to be not worth using.

AyanBishnu
Active Contributor
0 Kudos

Hi yyeung

OData can fetch master data from IBP to power BI very easily. I have done that multiple times.

Below I am giving 2 URL structure that is working presently for me

https://[system]-api.scmibp1.ondemand.com/sap/opu/odata/IBP/EXTRACT_ODATA_SRV/TSP?$select=PRDID,LOCID,UOMID&$filter=MASTER_DATA_TYPE eq '[MASTERDATA]'

https://[system]-api.scmibp1.ondemand.com/sap/opu/odata/IBP/EXTRACT_ODATA_SRV/TSP?$select=PRDID,LOCID,LOCFR&$filter=MASTER_DATA_TYPE eq '[MASTERDATA]'&saml2=disabled

Hope this helps

kendw17
Explorer
0 Kudos
It is 2024 now. I am running power BI from May 2024. This query works in Chrome but not in Power BI
kendw17
Explorer
0 Kudos
In Power BI the query doesn't work. Adding &$filter=MASTER_DATA_TYPE eq '[MASTERDATA]' or &$filter=MASTER_DATA_TYPE eq '[MASTERDATA]'&saml2=disabled didn't help.