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: 

DBIF_RSQL_INVALID_RSQL error

Former Member
0 Kudos
416

hi experts,

What happened?
    Error in the ABAP Application Program

    The current ABAP program "/BMW/SAPLATL_TW_I336_INQUIRY" had to be terminated
     because it has
    come across a statement that unfortunately cannot be executed.

What can you do?
    Note down which actions and inputs caused the error.


    To process the problem further, contact you SAP system
    administrator.

    Using Transaction ST22 for ABAP Dump Analysis, you can look
    at and manage termination messages, and you can also
    keep them for a long time.
    Note which actions and input led to the error.

    For further help in handling the problem, contact your SAP administrator
    .

    You can use the ABAP dump analysis transaction ST22 to view and manage
    termination messages, in particular for long term reference.

Short text

    Error in module RSQL of the database interface.

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 "GET_ORDER_DATA" "(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 the SAP Open SQL statement violates a
    restriction imposed by the underlying database system of the ABAP
    system.

    Possible error causes:
     o The maximum size of an SQL statement was exceeded.
     o The statement contains too many input variables.
     o The input data requires more space than is available.
     o ...

    You can generally find details in the system log (SM21) and in the
    developer trace of the relevant work process (ST11).
    In the case of an error, current restrictions are frequently displayed
    in the developer trace.

How to correct the error
    The SAP Open SQL statement concerned must be divided into several
    smaller units.
    If the problem occurred due to the use of an excessively large table
    in an IN itab construct, you can use FOR ALL ENTRIES instead.
    When you use this addition, the statement is split into smaller units
    according to the restrictions of the database system used.


    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:

    "DBIF_RSQL_INVALID_RSQL" "CX_SY_OPEN_SQL_DB"
    "/BMW/SAPLATL_TW_I336_INQUIRY" or "/BMW/LATL_TW_I336_INQUIRYF03"
    "GET_ORDER_DATA"

    The exception must either be prevented, caught within proedure
    "GET_ORDER_DATA" "(FORM)", or its possible occurrence must be declared in the
    RAISING clause of the procedure.
    To prevent the exception, note the following:

Information on where terminated
    Termination occurred in the ABAP program "/BMW/SAPLATL_TW_I336_INQUIRY" - in
     "GET_ORDER_DATA".
    The main program was "SAPMSSY1 ".

    In the source code you have the termination point in line 108
    of the (Include) program "/BMW/LATL_TW_I336_INQUIRYF03".
    The termination is caused because exception "CX_SY_OPEN_SQL_DB" occurred in
    procedure "GET_ORDER_DATA" "(FORM)", but it was neither handled locally nor
     declared
    in the RAISING clause of its signature.

    The procedure is in program "/BMW/SAPLATL_TW_I336_INQUIRY "; its source code
     begins in line
    59 of the (Include program "/BMW/LATL_TW_I336_INQUIRYF03 ".

SELECT vbak~vbeln                                         "MOD-006

         vbap~posnr

         vbak~audat AS erdat                                "MOD-006

         vbak~auart

*        vbak~lifsk                                         "Del MOD-005

         vbak~vkorg

         vbak~bstnk

         vbak~kunnr

         vbak~cmfre

         vbak~vdatu

         vbuk~cmgst                                         "Ins MOD-005

         vbpa~kunnr

         vbap~pstyv

         vbap~abgru

         vbap~kbmeng

         vbap~werks

*TDR22042010 <<< add shipping point                         "MOD-007

         vbap~vstel                                         "MOD-007

*TDR22042010 >>> add shipping point                         "MOD-007

    FROM vbak

    INNER JOIN vbuk                                         "Ins MOD-005

      ON  vbuk~vbeln = vbak~vbeln                           "Ins MOD-005

    INNER JOIN vbap

      ON  vbap~vbeln = vbak~vbeln

    INNER JOIN vbpa

      ON  vbpa~vbeln = vbap~vbeln

    INTO TABLE gt_orders

    FOR ALL ENTRIES IN lt_vakpa

    WHERE vbak~vbeln = lt_vakpa-vbeln

     AND  NOT vbap~pstyv IN gt_hl_item_cat

     AND  vbpa~posnr = gc_posnr

     AND  vbpa~parvw = lc_ship_to                           "MOD-006

     AND  vbpa~kunnr = kunag.             "KUNAG contains 'ship to' party !!    "MOD-006

Contents of system fields

Name     Val.

SY-SUBRC 0
SY-INDEX 5703
SY-TABIX 3
SY-DBCNT 5
SY-FDPOS 4
SY-LSIND 0
SY-PAGNO 0
SY-LINNO 1
SY-COLNO 1
SY-PFKEY
SY-UCOMM
SY-TITLE CPIC and RFC Control
SY-MSGTY
SY-MSGID
SY-MSGNO 000
SY-MSGV1
SY-MSGV2
SY-MSGV3
SY-MSGV4
SY-MODNO 0
SY-DATUM 20130710
SY-UZEIT 174556
SY-XPROG /BMW/SAPLATL_TW_I336_INQUIRY
SY-XFORM /BMW/ATL_TW_I336_INQUIRY_STAT

1 ACCEPTED SOLUTION

manuelhildemaro_ramossanc
Active Participant
0 Kudos
233

Hi Mohammad.

Did you check the size(number of entries) of parameter gt_hl_item_cat ?

Regards,

Manuel H.

5 REPLIES 5

manuelhildemaro_ramossanc
Active Participant
0 Kudos
234

Hi Mohammad.

Did you check the size(number of entries) of parameter gt_hl_item_cat ?

Regards,

Manuel H.

0 Kudos
233

we have  8[9996*22] entries i found in gt_hl_item_cat

Table IT_8[9996x22]

\PROGRAM=/BMW/SAPLATL_TW_I336_INQUIRY\DATA=GT_HL_ITEM_CAT

Table reference: 3

TABH+  0(20) = 501E7E596A2B0000000000000000000000000000

TABH+ 20(20) = 03000000080000000C27000016000000FFFFFFFF

TABH+ 40(16) = 04030000A00B01000400C124C0000000

store        = 0x501E7E596A2B0000

ext1         = 0x0000000000000000

shmId        = 0     (0x00000000)

id           = 3     (0x03000000)

label        = 8     (0x08000000)

fill         = 9996  (0x0C270000)

leng         = 22    (0x16000000)

loop         = -1    (0xFFFFFFFF)

xtyp         = TYPE#000076

occu         = 4     (0x04000000)

accKind      = 1     (ItAccessStandard)

idxKind      = 0     (ItIndexNone)

uniKind      = 2     (ItUniNo)

keyKind      = 1     (default)

cmpMode      = 2     (cmpSingleMcmpR)

occu0        = 1

stMode       = 0

groupCntl    = 0

rfc          = 0

unShareable  = 0

mightBeShared = 0

0 Kudos
233

Hi Mohammad.

There is a limit to the maximum number of parameters. Should consider the limitations of database.

Check this with your basis or take a look in SCN.

I had a similiar problem with maximum number of parameters to use in a select-options.

Regards,

Manuel H.

former_member188827
Active Contributor
0 Kudos
233

Please check number of records in your internal tables. Also, make sure that gt_orders contains the fields in same sequence and with same data type as listed in select query field list.

Regards

venkateswaran_k
Active Contributor
0 Kudos
233

Dear Mohammad,

Use as follows

INTO CORRESPONDING FIELDS OF TABLE gt_orders

instead of  INTO TABLE gt_orders

Regards,

Venkat