Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Exception: CX_SY_OPEN_SQL_DB

Former Member
0 Kudos

The program cancels with the following mistake in the select of the table EBAN:

Mistakes time execution: DBIF_RSQL_INVALID_RSQL

Exception: CX_SY_OPEN_SQL_DB

The SELECT is this:

SELECT *

FROM eban

INTO TABLE t_eban

WHERE ekgrp IN s_ekgrp AND

werks IN s_werks AND

ekorg IN s_ekorg AND

bsart IN s_bsart AND

banfn IN r_banfn AND

matnr IN s_matnr AND

matnr IN r_matnr AND

dispo IN s_dispo AND

ebeln IN s_ebeln AND

frgzu IN s_frgzu AND

statu IN s_statu AND

preis IN s_preis.

The Aim(Lens) is to modify the select extracting of the conditions the tables r_banfn and r_matnr, after the select to add the necessary thing to eliminate of the table t_eban the records that do not exist in the tables before mentioned.

Since I can do to eliminate these records?.

Thank you very much.

1 ACCEPTED SOLUTION

venkata_ramisetti
Active Contributor
0 Kudos

Hi Alejando,

Looks like the internal table T_EBAN declaration is causing this exception.

If you use SELECT *, the you have to declare all tables in the internal table like below.

DATA: BEGIN OF T_EBAN OCCURS 0.

INCLUDE STRUCTURE EBAN.

DATA: END OF T_EBAN.

Thanks

Ramakrishna

3 REPLIES 3

venkata_ramisetti
Active Contributor
0 Kudos

Hi Alejando,

Looks like the internal table T_EBAN declaration is causing this exception.

If you use SELECT *, the you have to declare all tables in the internal table like below.

DATA: BEGIN OF T_EBAN OCCURS 0.

INCLUDE STRUCTURE EBAN.

DATA: END OF T_EBAN.

Thanks

Ramakrishna

Former Member
0 Kudos

The problem may be that the SQL statement that you are executing is too large. This can happen if your are filling r_banfn and r_matnr programmatically. You put in too many entries and you get this error. You might check to see if you can use "FOR ALL ENTRIES" instead.

Rob

venkata_ramisetti
Active Contributor
0 Kudos

Hi Alejandro,

Rob is correct.

Looks like the issue is not because of data declaration, but because of RANGE field.

Please check the below forum post, where the sdner had similar issue.

Thanks

Ramakrishna