on 03-23-2021 7:33 AM
Hi experts. I've run into an odd error. I'm wondering if anyone has experienced this and knows how to resolve it.
I have a CAP Java application that connects to an on premise system using an oData V2 service.
I am able to send queries and get data back, but no matter what the query is, I always get the same response: it reads every single entity from the target table. For example, the following two queries provide an identical result:
CqnSelect maxEbelnQueryCloud = Select.from(PURCHASE_ORDER_SET);
CqnSelect maxEbelnQueryOnPrem = Select.from(PURCHASE_ORDER_SET).columns(c -> CQL.max(c.EBELN()).as("max"));
Could anyone provide any suggestions about what could be causing this?
Hi,
aggregation functions are not yet supported on CQN statements to remote OData APIs. Your selection of "CQL.max(c.EBELN()).as("max")" is currently simply ignored, which basically results in a "SELECT *", which is the same as your first statement.
The columns in the CQN are translated into an $select query on outgoing request. Therefore in columns we currently only support element references, which is basically the stuff thats actually also supported by a $select query parameter in OData.
Aggregation functions would require support for $apply, which is not yet considered in our remote OData implementation.
Best regards,
Marc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, it is not yet supported. There are currently no fixed plans to support it in the near future. You can track the feature details here for updates: https://cap.cloud.sap/docs/guides/using-services#querying-api-features
User | Count |
---|---|
75 | |
10 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.