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

sivapuram_phanikumar
Active Participant
0 Kudos

Hi,

One of my program is giving dump by giving the above message at the following select statement:

SELECT mblnr mjahr zeile bwart matnr

werks lgort charg insmk sobkz

lifnr shkzg waers dmbtr bwtar

menge erfmg erfme ebeln ebelp

sjahr smbln smblp sgtxt ummat

umwrk umlgo umcha umsok kzbew

kzvbr kzzug

FROM mseg

INTO TABLE p_i_mseg

WHERE mblnr EQ p_wa_mkpf-mblnr

AND mjahr EQ p_wa_mkpf-mjahr.

The structure of internal table and the fields is similar and there will not be more records from the where clause of the statement.

Please suggest me wat to do to overcome the dump?

thanks in advance,

Phani.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

The dump will also give an additional more specific error message. Can you let us know what that is?

Rob

8 REPLIES 8

Former Member
0 Kudos

The dump will also give an additional more specific error message. Can you let us know what that is?

Rob

0 Kudos

Hi Rob,

Thanks for the prompt reply. Here is the detail of dump:

Runtime Errors DBIF_RSQL_INVALID_RSQL

Exception CX_SY_OPEN_SQL_DB

Date and Time 24.05.2007 15:18:56

Short text

Error in module RSQL of the database interface.

What happened?

Error in the ABAP Application Program

The current ABAP program "SAPLZRUV_GM_IDOC" had to be terminated because it has

come across a statement that unfortunately cannot be executed.

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_GET_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:

In a SELECT access, the read file could not be placed in the target

field provided.

Either the conversion is not supported for the type of the target field,

the target field is too small to include the value, or the data does not

have the format required for the target field.

Regards,

Phani

0 Kudos

Well, it says "In a SELECT access, the read file could not be placed in the target

field provided." So check that the fields in the internal table are not similar, but are identical to the ones being selected.

Rob

0 Kudos

Hi Rob,

Can you please explain me what to check in the internal table? Here is the structure of internal table for your kind reference...

mblnr LIKE mseg-mblnr, " Number of Material Document

mjahr LIKE mseg-mjahr, " Material Document Year

zeile LIKE mseg-zeile, " Item in Material Document

bwart LIKE mseg-bwart, " Movement Type

matnr LIKE mseg-matnr, " Material Number

werks LIKE mseg-werks, " Plant

lgort LIKE mseg-lgort, " Storage location

charg LIKE mseg-charg, " Batch number

insmk LIKE mseg-insmk, " Stock Type

sobkz LIKE mseg-sobkz, " Special Stock Indicator

lifnr LIKE mseg-lifnr, " Vendor Account Number

shkzg LIKE mseg-shkzg, " Debit/Credit Indicator

waers LIKE mseg-waers, " Currency Key

dmbtr LIKE mseg-dmbtr, " Amount in Local Currency

bwtar LIKE mseg-bwtar, " Valuation Type

menge LIKE mseg-menge, " Quantity

erfmg LIKE mseg-erfmg, " Quantity in Unit of Entry

erfme LIKE mseg-erfmg, " Unit of Entry

ebeln LIKE mseg-ebeln, " Purchase Order Number

ebelp LIKE mseg-ebelp, " Item No of Purchasing Doc.

sjahr like mseg-sjahr, " Material Document Year

smbln like mseg-smbln, " Material Document No.

SMBLP like mseg-smblp, " Item in Material Document

sgtxt LIKE mseg-sgtxt, " Item text

ummat LIKE mseg-ummat, " Receiving/Issuing Material

umwrk LIKE mseg-umwrk, " Receiving/Issuing Plant

umlgo LIKE mseg-umlgo, " Receiving/Issuing Storage Loc.

umcha LIKE mseg-umcha, " Receiving/Issuing Batch

umsok LIKE mseg-umsok, " Special Stock Indicator for

" Physical Stock Transfer

kzbew LIKE mseg-kzbew, " Movement indicator

kzvbr LIKE mseg-kzvbr, " Consumption Posting

kzzug LIKE mseg-kzzug

Regards,

Phani.

0 Kudos

What does the SELECT look like?

Sorry - you already posted it.

INTO CORRESPONDING should be better.

Rob

Message was edited by:

Rob Burbank

0 Kudos

Hi Rob,

Thank you very much... it solved the problem...

The issue was, I am using new editor, so while defining the field ERFME and referring it to the database field, i got the option MSEG-ERFMG... i didnt noticed that...:)

Regards,

Phani

Former Member
0 Kudos

use this and chk out if it works

INTO CORRESPONDING FIELDS OF TABLE p_i_mseg

as you might have changed the order of the fields

0 Kudos

Hi Chandra and Rob,

Even I have tried with INTO CORRESPONDING option also.... but no use...

Regards,

Phani