Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Runtime error: DBIF_RSQL_INVALID_RSQL Exception: CX_SY_OPEN_SQL_DB

Hi everyone,

I got the exception because of this statement:

-->SELECT gjahr

            belnr

            buzei

            ebeln

            ebelp

            vgabe

            dmbtr  " E0JSPINA 46549.

            wrbtr   " E0JSPINA 46549.

            waers

            hswae

            shkzg

            INTO TABLE p_i_ekbe

            FROM ekbe

            WHERE ebeln IN ra_ebeln

            AND   ebelp IN ra_ebelp

            AND   zekkn IN ra_zekkn

            AND   vgabe EQ '1'

            AND   gjahr IN ra_gjahr

            AND   belnr IN ra_belnr

            AND   buzei IN ra_buzei.


Inside the dump, in the Database Information section appears the following:


     Database Interface Information

     B      E      dbtran ERROR (set_input_da_spec): statement too big [dbtran.c#4854]

     B      E       marker count = 21590 > max. marker count = 10000 [dbtran.c#4854]

Related to the Select statement, I have the following:

-------------------------------------------------------------------------

FORM f_get_ekbe  USING    p_i_mkpf TYPE tt_mkpf

                  CHANGING p_i_ekbe TYPE tt_ekbe

> Here comes the Select >

-------------------------------------------------------------------------

DATA  tt_ekbe  TYPE STANDARD TABLE OF ty_ekbe,

-------------------------------------------------------------------------

BEGIN OF ty_ekbe,

     gjahr TYPE ekbe-gjahr,

     belnr TYPE ekbe-belnr,

     buzei TYPE ekbe-buzei,

     ebeln TYPE ekbe-ebeln,

     ebelp TYPE ekbe-ebelp,

     vgabe TYPE ekbe-vgabe,

     wrbtr TYPE ekbe-wrbtr,

     dmbtr TYPE ekbe-dmbtr,

     waers TYPE ekbe-waers,

     hswae TYPE ekbe-hswae,

     shkzg TYPE ekbe-shkzg,

END OF ty_ekbe.

--------------------------------------------------------------------------

Any thoughts?

Regards,

David Reza

replied

Hello,

The dump occurs due to the size of SQL statement. Unfortunately there is
a database limit as explained by SAP note 13607. According to this note, you
have exceeded the maximum number of host-variables allowed in an SQL
statement. With this type of entry, you should reduce the number of bind
variables used to a value less than or equal to 10000.

The issue is not with the number of records which will be returned by
the database, but with the size of the SELECT statement. Note that this
is not a restriction of the SAP system, but of the database. So we can
not influence this restrictions.

What you have to do is to replace individual values for interval ranges.
The SELECT statement generated by the system for such a query is much
larger than the statement which would be executed for an interval
selection (this will contain only two values: interval begin and
interval end).

More information can be found in the following SAP notes:
13607  Termination of an ABAP with DBIF_RSQL_INVALID_RSQL
635318 Open SQL: Size restrictions for commands

Regards,

David

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question