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: 

Runtime error - DBIF_RSQL_INVALID_RSQL

Former Member
0 Kudos

Hello,

When i am executing my program one system, it working fine for the below select statement. But while testing the same in another system we are having a runtime error 'DBIF_RSQL_INVALID_RSQL' 'RSQL error 13 when accessing table "EBAN ".

the select statement is as follows:

SELECT

menge

lfdat

matnr

FROM eban

INTO CORRESPONDING FIELDS OF TABLE i_pr_items

WHERE bsart EQ c_bsart1

AND bstyp EQ c_bstyp1

AND loekz EQ space

AND werks IN s_plant

AND matnr IN s_matnr

AND ebakz NE c_check.

can anyone help me in this please.

thanks a lot

regards

Nitin

9 REPLIES 9

Former Member
0 Kudos

Hi

<b>I guess the Internal table - i_pr_items[] is not compatible here.</b>

<u>Please paste the declaration of i_pr_items internal table as well.

Also, paste the detailed Shortdump from ST22 transaction.</u>

Hope this will help.

Please reward suitable points.

Regards

- Atul

0 Kudos

Hi Atul,

thanks for the response.

declaration of internal table: i_pr_items TYPE STANDARD TABLE OF t_pr_items,

the details error in ST22:

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 "F_SELECT_PR_MATERIALS" "(FORM)", 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 ABAP/4 Open SQL violates a

restriction imposed by the database system used in R/3.

You can usually find details in the system log and in developer

trace. The following error scenarios may be database-specific:

-


ORACLE

-


The maximum size of an SQL statement has been exceeded. In Oracle

6.* this is 8 KB, in Oracle 7.* 64 KB.

The Native SQL statement generated from an ABAP/4 Open SQL statement

must not take up more than the permitted space.

THANKS A LOT

Regards,

Nitin

0 Kudos

Hi

Also paste the declaration of t_pr_items table.

Hope this will help.

Please reward suitable points.

Regards

- Atul

0 Kudos

TYPES: BEGIN OF t_pr_items,

matnr LIKE eban-matnr,

menge LIKE eban-menge,

lfdat LIKE eban-lfdat,

END OF t_pr_items.

Former Member
0 Kudos

One of these 3 fields menge lfdat matnr declaration is not compatible in the internal table with the database fields, pls show declaration

0 Kudos

Hi,

declaration of types:

TYPES: BEGIN OF t_pr_items,

matnr LIKE eban-matnr,

menge LIKE eban-menge,

lfdat LIKE eban-lfdat,

END OF t_pr_items.

thanks

Former Member
0 Kudos

can you check how many entries are populated in ur select options s_matnr and s_plant , it should not exceed more than 1630

Former Member
0 Kudos

hi,

i think the varaiables, select-options, parameters used in the where condition is not of the type of the field they are compared with. just declare those variables of type of the field to whihc it is compared

Former Member
0 Kudos

I think you are passing too many entries in either S_MATNR or S_PLANT.

there is a limit to overall length of where clause passed to DB.

workaround would be

- either split your s_matnr into smaller chunks (define ranges, pass <=300...400 entries from s_matnr to the range, then select appending internal table, do it until you process all entries in s_matnr.).

- or, if you do not use intervals in your s_matnr (just single values) - use select for all entries in s_matnr where matnr = s_matnr-low.