Skip to Content

Reg: Error in RSQL module of database interface

Dear All,

I am getting this error.

Error in RSQL module of database interface. While i am giving the excise invoice date(j_1exchdr-exdat) more than 120 days i am getting this error.

SELECT VBRK~VBELN VBRK~FKART VBRK~WAERK VBRK~KNUMV VBRK~FKDAT
       VBRK~KURRF VBRK~KUNAG VBRK~FKSTO
       VBRP~POSNR VBRP~FKIMG VBRP~NETWR VBRP~VGBEL VBRP~MATNR
        VBRP~ARKTX VBRP~MATKL VBRP~WERKS VBRP~LGORT
      INTO CORRESPONDING FIELDS OF TABLE ITAB
  FROM VBRK
   INNER JOIN VBRP
    ON VBRK~VBELN = VBRP~VBELN
    WHERE VBRK~VBELN IN VBELN
    AND VBRK~FKART IN FKART
    AND VBRK~FKDAT IN FKDAT
    AND VBRK~FKSTO NE 'X'
    AND VBRP~MATKL IN MATKL
    AND VBRP~WERKS IN WERKS
    AND VBRP~LGORT IN LGORT.

what should i have to do? can i change this select query into selct for all entries what should i have to do?

Thanks,

Sankar M

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Nov 21, 2008 at 09:00 AM

    What is the error exactly? Can you give short dump heading and section "error analysis" please.

    Thomas

    Add comment
    10|10000 characters needed characters exceeded

    • Runtime Errors DBIF_RSQL_INVALID_RSQL

      Exceptn CX_SY_OPEN_SQL_DB

      Date and Time 21.11.2008 15:24:50

      ShrtText

      Error in RSQL module of database interface.

      What happened?

      Error in ABAP application program.

      The current ABAP program "Z_EXCISE_DET11H1" had to be terminated because one of

      the

      statements could not be executed.

      This is probably due to an error in the ABAP program.

      Error analysis

      An exception occurred. This exception will be dealt with in more detail

      below. The exception, assigned to the class 'CX_SY_OPEN_SQL_DB', was not

      caught, which

      led to a runtime error. The reason for this exception is:

      The SQL statement generated from the SAP Open SQL Statement violates a

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

      Possible errors:

      o The maximum size of an SQL statement has been exceeded.

      o The statement contains too many input variables.

      o The space needed for the input data exceeds the available memory.

      o ...

      You can usually find details in the system log (SM21) and in the

      developer trace of the work process (ST11).

      If an error occurs the developer trace often informs you about the

      current restrictions.

      Missing Handling of System Exception

      Program Z_EXCISE_DET11H1

      Trigger Location of Exception

      Program Z_EXCISE_DET11H1

      Include Z_EXCISE_DET11H1

      Row 112

      Module Name START-OF-SELECTION

      Source Code Extract

      Line SourceCde

      82 FKART FOR VBRK-FKART,

      83 FKDAT FOR VBRK-FKDAT,

      84 VBELN FOR VBRK-VBELN, " OBLIGATORY DEFAULT '90002130',

      85 MATKL FOR VBRP-MATKL OBLIGATORY," OBLIGATORY DEFAULT '01' NO INTERVALS NO-EX

      86 LGORT FOR VBRP-LGORT NO INTERVALS NO-EXTENSION. "OBLIGATORY DEFAULT '1110'

      87

      88 SELECT J_1IEXCHDR~RDOC

      89 FROM J_1IEXCHDR

      90 INTO CORRESPONDING FIELDS OF TABLE EXCISEDOCNO

      91 WHERE

      92 J_1IEXCHDR~TRNTYP = 'DLFC' AND

      93 J_1IEXCHDR~SRGRP IN SRGRP AND

      94 J_1IEXCHDR~EXDAT IN EXDAT AND

      95 J_1IEXCHDR~EXNUM IN EXNUM.

      96

      97 LOOP AT EXCISEDOCNO.

      98 VBELN-SIGN ='I'.

      99 VBELN-OPTION = 'EQ'.

      100 VBELN-LOW = EXCISEDOCNO-RDOC.

      101 APPEND VBELN.

      102 ENDLOOP.

      103

      104 LOOP AT EXCISEDOCNO.

      105 IF J_1IEXCHDR-TRNTYP = 'CEIV' .

      106 DELETE EXCISEDOCNO.

      107 MODIFY EXCISEDOCNO.

      108 ENDIF.

      109 ENDLOOP.

      110 *ENDLOOP.

      111

      >>>>> SELECT VBRKVBELN VBRKFKART VBRKWAERK VBRKKNUMV VBRK~FKDAT

      113 VBRKKURRF VBRKKUNAG VBRK~FKSTO

      114 VBRPPOSNR VBRPFKIMG VBRPNETWR VBRPVGBEL VBRP~MATNR

      115 VBRPARKTX VBRPMATKL VBRPWERKS VBRPLGORT

      116 INTO CORRESPONDING FIELDS OF TABLE ITAB

      117 FROM VBRK

      118

      119 INNER JOIN VBRP

      120 ON VBRPVBELN = VBRKVBELN

      121 WHERE VBRK~VBELN IN VBELN

      122 AND VBRK~FKART IN FKART

      123 AND VBRK~FKDAT IN FKDAT

      124 AND VBRK~FKSTO NE 'X'

      125 AND VBRP~MATKL IN MATKL

      126 AND VBRP~WERKS IN WERKS

      127 AND VBRP~LGORT IN LGORT.

      128

      129

      130

      131

  • avatar image
    Former Member
    Nov 21, 2008 at 09:02 AM

    Dear Shankar,

    Are you getting error only if date is gt 120 days??

    if yes then

    This is happening probably due to large number of data selection.Also you are not using primary index selection for both the tables.

    Try selectiing data individually.select first from header table(vbrk) then use for all entries and select data from vbrp.

    If you use primary key then only it will help to greater extent.

    Also when you are using non primary key fields you should filter values which are less distinct.

    for eg: WERKS is common for most of the entries so it should come first.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 24 at 07:43 AM
    -1

    Check on the query if there is a missed ojbect from your structure .

    Add comment
    10|10000 characters needed characters exceeded