on 2024 Sep 21 6:19 PM
Hello,
We have published a CDS view called z_iledelivdocitem as OData V2 and OData V4 services.
An error is raised when we try to get the number of records with the OData V4 service by calling the following url:
https://xxxx:44300/sap/opu/odata4/sap/cdi_cds/cdi_cds/sap/z_iledelivdocitem/0001/Facts/$count
The error message is :
"error": {
"code": "/IWBEP/CM_V4_RUNTIME/040",
"message": "Provider application did not return count",
"@SAP__common.ExceptionCategory": "Provider_Application_Error",
"innererror": {
"ErrorDetails": {
"@SAP__common.Application": {
"ComponentId": "BW-WHM-DBA-ODA",
"ServiceRepository": "CDI_CDS",
"ServiceId": "Z_ILEDELIVDOCITEM",
"ServiceVersion": "0001"
}
...
}
when we add the $sap-ds-debug=true parameter to the url, the exception raised is :
Exception /IWBEP/CX_V4_RUNTIME occured in Class /IWBEP/CL_V4_RESPONSE_INFO_PRO Method VALIDATE_INT and Line 182
IF ( is_todo_list_request-return-count = abap_true ) AND ( ms_done_list-return-count = abap_false ).
RAISE EXCEPTION TYPE /iwbep/cx_v4_runtime
EXPORTING
textid = /iwbep/cx_v4_runtime=>todo_list_return_count
exception_category = /iwbep/cx_gateway=>gcs_excep_categories-provider
http_status_code = /iwbep/cx_gateway=>gcs_http_status_codes-sv_not_implemented.
ENDIF.
$count works fine with the OData V2 service with this url :
https://xxxx:44300/sap/opu/odata/sap/Z_ILEDELIVDOCITEM_CDS/Z_ILEDELIVDOCITEM/$count
SAP documentation indicates that $count is supported for two versions of OData.
$count Option | SAP Help Portal
Help appreciated!
Request clarification before answering.
Hello,
OData is not created from SEGW transaction, it is created through CDS annotations which automatically creates OData.
PS4 version is S/4 HANA 2021 FPS01 and we are upgrading to S/4 HANA 2023 FPS01.
/Facts/$count=true doesn't work.
/Facts works well.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
47 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.