09-01-2010 10:07 AM
Hi Expert,
I get this error "Error in module RSQL of the database interface." when the below ABAP statement executed, do you know the root cuase? Thanks.
ABAP Code:
data lt_fact type TABLE OF /BIC/FZRT_C002.
data ls_Fact type /BIC/FZRT_C002.
*SELECT * INTO table lt_fact FROM /BIC/FZRT_C002 WHERE KEY_ZRT_C0021 in lt_RSDIMID and KEY_ZRT_C0022 in lt_caRSDIMID*.
Information in ST22.
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLZZ_FG" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
in
procedure "ZCA_GET_CUBE_STOCK" "(FUNCTION)", nor was it propagated by a RAISING
clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
The SQL statement generated from the SAP Open SQL statement violates a
restriction imposed by the underlying database system of the ABAP
system.
Possible error causes:
o The maximum size of an SQL statement was exceeded.
o The statement contains too many input variables.
o The input data requires more space than is available.
o ...
You can generally find details in the system log (SM21) and in the
developer trace of the relevant work process (ST11).
In the case of an error, current restrictions are frequently displayed
in the developer trace.
Best Regards,
Andrew
09-03-2010 2:41 PM
the IN for RANGES is designed for manual input, i.e. it should not become too large.
Usually it will dump, if the number of records is in the range of 1.000, because the resulting statement is too large.
Use FOR ALL ENTRIES instead.
09-01-2010 10:14 AM
Hi.
Probably the internal tables are too long to be used with IN.
This will result in a select that is too long for the database, and hence the dump.
How many entries do you have in lt_RSDIMID and in lt_caRSDIMID?
09-01-2010 10:43 AM
Hi,
the entries number is 2143x4(16).
Best Regards,
Andrew
09-01-2010 11:33 AM
>
> the entries number is 2143x4(16).
> Best Regards,
> Andrew
2143 records? on which table? you have two different internal tables, right?
anyway, you can solve the problem if you can change the logic to FOR ALL ENTRIES.
another option, and if you are filling these 2 internal tables from database tables, is to use JOINs instead.
09-03-2010 2:41 PM
the IN for RANGES is designed for manual input, i.e. it should not become too large.
Usually it will dump, if the number of records is in the range of 1.000, because the resulting statement is too large.
Use FOR ALL ENTRIES instead.
09-06-2010 8:58 AM
Hii
Lets check with select query with addition corresponding fields of itab...........
11-24-2013 9:31 AM
i have the same error but my first select is
SELECT QMNUM QMTXT QMDAT AUFNR OBJNR QMNAM QMART BTPLN IWERK BEBER INGRP EQUNR SERIALNR MATNR
INTO TABLE GT_VIQMEL
FROM VIQMEL
WHERE QMNUM IN S_QMNUM .
please tell me how to solve this error when i run 24000 raw this select dump.
ASAP
thanks
Eman elgammal.
06-04-2016 5:20 PM
Even I also Faced same kind of Error..
data var_sum type n LENGTH 3.
select sum( col ) from ztable INTO var_sum
where (filter condition).
Here in above query i try to store the sum of col into a variable of type numc.due to this i got the error.
Solution in my case :
data var_sum type i.
It may help to someone.
12-27-2022 4:03 AM
The table structure sequence might causing issue as well. best practice is to retrieve column follows the internal table column definition.