Symptom
Replication Flow of load type: Initial for an ODP SAPI object from a source SAP ECC system, fails with the following error:
Failed to retrieve package for consumer ID 06CD798700761FD09DF22A35B540CC24 (object <name> context SAPI) / Failed to fetch data package for consumer ID 06CD798700761FD09DF22A35B540CC24 (object <name> context SAPI). / Failed to retrieve package. / An exception with the type CX_SY_OPEN_SQL_DB was raised, but was not handled locally or declared in a RAISING clause. / An exception with the type CX_SY_OPEN_SQL_DB was raised, but was not handled locally or declared in a RAISING clause. /
The range of the statement to be passed to the database is too wide.
Environment
- SAP Datasphere
- ABAP-based source systems (SAP ECC, SAP S/4HANA)
Cause
A very large ABAP Open SQL statement with many filter conditions, is called on Datasphere's HANA Cloud database.
Errors like this usually occur if the ON-, WHERE- or HAVING SQL clause has at least one IN condition with an internal table (RANGE table, SELECT OPTION) that contains too many entries.
Resolution
Open SQL statement with many filter conditions called for data extraction from ODP SAPI objects on SAP Datasphere can be handled, by reducing the ODP package size.
Package size for such Replication Flows on SAP Datasphere is controlled by the ABAP runtime parameter ODP_MAX_PACKAGE_SIZE_IN_MB.
To resolve errors related to wide, large Open SQL Statements, set ODP_MAX_PACKAGE_SIZE_IN_MB to the default value of 10 per SAP Note 3260185 - ABAP Data Integration - Runtime Parameters (DHBAS_RUNTIME / LTBAS_RUNTIME)
Keywords
replication flow, ODP SAPI, initial, extraction, wide, statement, IN conditions, filter conditions, ODP_MAX_PACKAGE_SIZE_IN_MB , KBA , DS-DI-RF , Replication Flow Runtime , Problem
SAP Knowledge Base Article - Public