You try to retrieve a report via an OData statement. The statement returns no data or wrong data (e.g. missing entries, too many entries etc).
When running the report via the web browser the report returns data as expected.
- SAP Business ByDesign
- SAP Cloud for Customer
When you run an OData query for a report, the OData query will always consider the Initial selection of a report, not the default one. The Initial selection of your report may have more or less variables in the selection than the default one in the browser, so OData may show more or less entries.
For example: you may have defined a report selection, with a variable on Employee Responsible = My User Name. You have made this selection the default, so when you open it in the browser, this variable is considered by default.
However in the selection Initial, this variable is not maintained. Hence when you run an OData query for this report, the data will not be filtered by your user and the result will be different from the browser report.
You can overwrite variables in the Initial selection by passing OData filters in the query (operator $filter). Alternatively, you would need to add missing filters to your OData query so that all variables are the same in the browser and the OData report.
If you would like to change the Initial selection in the browser report, you have the following options:
- For standard reports, create a copy of the report via the Business Analytics work center and the Design Reports view. Any default values that you maintain in step 5 of the report wizard, will be part of the Initial selection.
- For custom reports, edit your report with the report wizard and adjust the default values in step 5. The default values maintained here will be part of the Initial selection.
For further details on setting up your OData report query, you can also check the OData blog here.
odata, report, wrong data, missing, odata not working, analytics , KBA , AP-RC-ANA , C4C, ByD, Travel: Analytics Tools & Frameworks , How To