03-28-2021 8:19 PM
I have a CDS with Annotation to generate OData Service. When I query the CDS View for a specific set of field values I am returned with 2 like records and the values for each record are correct. Say $100 and $200.
When I query the OData Service for the same set of field values I am returned one record and the value is $0.
I am currently debugging and tracing the Service, but have not been able to find out what might be causing this difference. There is only one client so the service is not in any way pointing somewhere else.
Could anyone give me any insight/thoughts/reasons when the Source CDS View and the Actual OData service might return different values? Thanks!
03-29-2021 3:03 AM
This was corrected by a CDS View Change.
The CDS View was correctly outputting the results with multiple records as the source table had the value field as part of the table key. But, the OData Service result was incorrectly resulting in a zero value.
What corrected the problem was adding a SUM(Value) to the CDS View under the Consumption CDS View.
Still does not explain why the Service would return a different value than the CDS View.
But now it is working... Hope that helps.