I have an analytics datasource which I can fetch with a technical user like this:
https://my12345.sapbydesign.com/sap/byd/odata/analytics/ds/Proprju05.svc/Proprju05?$format=json&$top...
The result looks similar to this example:
{
"d": {
"results": [
{
"__metadata": {
"uri": "https://my12345.sapbydesign.com/sap/byd/odata/analytics/ds/Proprju05.svc/Proprju05('.1~.2~00000000000000000000000000000000')",
"type": "Proprju05Svc.Proprju05Type"
},
"ID": ".1~.2~00000000000000000000000000000000",
"C_x1ANxF82c2f26a1d167": "",
"C_AssiEmpUuid": null,
"C_BaslSrvspUuid": "00163E04-D815-1ED3-9FA4-E85F332378DC",
"C_PrResEmpUuid": "00163E02-541F-1EE2-ACFB-16362DD60CEF",
"C_PrRiskLevel": "",
"C_PrStatusBlo": false,
"C_PrStatusLfc": "4",
"Mdav": "PROBSTB",
"NodeId": "00163E04D8151ED39FA4E85F333518DC",
"Count": 1
}
]
}
}
I would like to query the result list with a filter, like this:
https://my12345.sapbydesign.com/sap/byd/odata/analytics/ds/Proprju05.svc/Proprju05?$format=json&$top... eq 00163E02-541F-1EE2-ACFB-16362DD60CEF
That returns an errors message:
{
"error": {
"code": "005056952A631EE0ABDEF9EEC5E1A35A",
"message": {
"lang": "en",
"value": "Property 00163E02-541F-1EE2-ACFB-16362DD60CEF not found in type Proprju05Type"
}
}
}
I also tried to put the ID in quotes:
https://my12345.sapbydesign.com/sap/byd/odata/analytics/ds/Proprju05.svc/Proprju05?$format=json&$top... eq '00163E02-541F-1EE2-ACFB-16362DD60CEF'
That returns this error:
{
"error": {
"code": "005056952A631ED0B0FE2236FCAB4627",
"message": {
"lang": "en",
"value": "Invalid parametertype used at function 'eq'"
}
}
}
What I'm doing wrong?
How can I filter the results by 'C_PrResEmpUuid'?
Request clarification before answering.
Dear reiz,
Please find our analysis as below:
1) Since you are trying to filter data based on UUID field, you have to use OData Query in below format:
https://my12345.sapbydesign.com/sap/byd/odata/analytics/ds/Proprju05.svc/Proprju05?format=json&$top=... eq guid'00000000-0001-1DEF-BAD7-B5F31A26CC36')
NOTE:
-> here we have to use keyword "guid" along with value within single quote
-> You can use feature "Build OData Queries" which is available in main page
-> Small bracket is optional, but recommended to use
2) The other query, where you are trying to find the metadata is not correct and we could not reproduce same error message, please use same feature "Build OData Queries" or use below Query:
https://my12345.sapbydesign.com/sap/byd/odata/analytics/ds/Proprju05.svc/$metadata
Please check and let us know if you have any further concerns.
Regards,
Saurav Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Robert,
Please check the report metadata via oData and here is the parameter type for the field you would like to use.
Metadeta oData Query: https://my[your system URL].sapbydesign.com/sap/byd/odata/ana_businessanalytics_analytics.svc/$metadata?entityset=RP[your report ID]QueryResults.
You can also use the Build Odata Queries feature to check the report metadata.
When you check the metadata, please search for the field you used in your link and the parameter type.
Please check the below blog which might be helpful for you:-
https://blogs.sap.com/2015/03/10/odata-for-sap-business-bydesign-analytics/
Thanks,
Dhanya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dhanya,
When I try to query this here:
https://my12345.sapbydesign.com/sap/byd/odata/ana_businessanalytics_analytics.svc/$metadata?entityse...I'm getting back:
<?xml version="1.0" encoding="utf-8"?>
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code>00145E5B1CC71EE0ACBD05859C58015A</code>
<message xml:lang="en">In the context of Data Services an unknown http error occured</message>
</error>
Hi Robert,
can you please check the report ID that you are using in the pattern shared by Dhanya?
There is one data source with ID "Proprju05" (workcenter view Business Analytics -> Design Data Sources), but in my system there are several *reports* (workcenter view Business Analytics -> Design Reports) with different IDs starting with "Proprju05...".
As pointed out by Saurav and Dhanya, the "Build OData Queries" feature is very helpful in both views.
Best regards
Michael
| User | Count |
|---|---|
| 14 | |
| 12 | |
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.