Symptom
- While trying to load the entityset A_ProductBasicText of the OData service API_PRODUCT_SRV in excel, you get the following error message:
Data could not be retrieved from the database.
Check the database server or contact your database administrator. Make sure the external database is available, and then try the operation again.
- The following request fails
URI: /sap/opu/odata/sap/API_PRODUCT_SRV/A_ProductBasicText
Found error messages on the system:
The range of the statement to be passed to the database is too wide
An exception with the type CX_SY_OPEN_SQL_DB was raised, but was not handled locally or declared in a RAISING clause.
Environment
SAP S/4HANA Cloud Public Edition
Excel
Reproducing the Issue
1. Open Excel -> Data -> Get Data -> From Other Sources -> From OData Feed
2. Enter URI: https://<hostname>/sap/opu/odata/sap/API_PRODUCT_SRV/?saml2=disabled, click OK.
3. Use Basic authentication and enter the user and password, and click Connect
4. Select A_ProductBasicText and load
Cause
The problem is that there are a lot of records in your system under A_ProductBasicText and with current implementation the SQL statement becomes too large to query this. But we have now changed the way SQL statements are formed and now it can handle such huge data.
For now, you can use the filter option to query data in packets.
Resolution
You may face this issue only for below entities:
A_ProductBasicText, A_ProductInspectionText, A_ProductPurchaseText, A_ProductPlantText and A_ProductSalesText
And the fix will be applicable to all above entities. You will get this fix with SAP S/4HANA Cloud Public Edition 2008 release.
For now, please use the filter option to query data in packets.
Keywords
READ_STXH_COMPLEX, CL_RSTX_TABLE_VIEW, CL_API_PRODUCT_MPC_EXT, SQL, A_ProductBasicText, A_ProductInspectionText, A_ProductPurchaseText, A_ProductPlantText, A_ProductSalesText , KBA , LO-MD-MM , Material Master , Problem