Skip to Content
0
Jan 18, 2021 at 05:56 PM

Using RANGE table in SELECT statement

482 Views

Hello,

I am getting a short dump -> Err.tmpo.ejec. DBSQL_STMNT_TOO_LARGE Excep. CX_SY_OPEN_SQL_DB

in the following code:

SELECT * FROM pcl2
INTO TABLE lt_pcl2
WHERE relid EQ 'B2'
AND srtfd IN rl_srtfd <------cause of the error
AND srtf2 EQ '00'.

The error occurs because the range table rl_srtfd has 32664 rows, which are too many to be processed in the SELECT statement.

I'm not sure what is the limit because I've tried the program with only 10000 rows in rl_srtfd and it didn't give a dump.

How should I proceed to solve this? How do I know the limit of the size of rl_srtfd?

Thank you all in advance.