Skip to Content
1
Former Member
May 08, 2013 at 02:32 PM

DBIF_RSQL_INVALID_RSQL because of routine selection

183 Views

We have created a generic datasource for extracting a particular huge table from R/3 to BW. Due to the fact that the correspondence table does not have data fields that could use for delta extraction (DFKKOPK), we use an abap routine selection in the infopackage (based on a DSO table which has the header data) and we have enabled the more than 1000 records option for selection. This datasource has been working fine for low data load. Recently it tried to select about 18.500 records but returned the following error in the source system;


Runtime Errors DBIF_RSQL_INVALID_RSQL

Exception CX_SY_OPEN_SQL_DB

Our database is DB6 (DB2 9.7) on AIX system.

The error has to do with the sql statement on ECC system. Having searched in the sap forum i came across the following page, which states that you may overcome the sql statement limitation if you use the "FOR ALL ENTRIES" statement instead.

http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/840ad679-0601-0010-cd8e-9989fd650822#q-28

But this has to do with the way the ECC standard function module process the extraction on the ECC side.

For more information I am enclosing the part of the routine where we define selection for the infopackage.

....

select FC_OPBEL from /BIC/AZDFKKKO00

into table lt_doc

where

CREATEDON >= zdate and

/BIC/ZFLGLIT <> 'Y'.

read table l_t_range with key

fieldname = 'OPBEL'.

l_idx = sy-tabix.

l_t_range-fieldname = 'OPBEL'.

l_t_range-sign = 'I'.

l_t_range-option = 'EQ'.

loop at lt_doc into l_t_range-low.

append l_t_range .

endloop.

....

Is there a way to overcome the sql limitation and be able to proceed with the extraction??

P.S.I am aware of the ALE delta and the extraction based on table join(tables and headers), but due to the fact that we have used the similar logic for DTP extraction (based on selection routine) where we don't have any other option , please provide solutions on how to counter the sql error.