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: 

RSQL ERROR 23 WHEN ACCESSING TABLE "BKPF"

0 Kudos

Can you tell me what is wrong with this statement. I get an ABAP runtime error.

DBIF_RSQL_INVALID_RSQL.

RSQL ERROR 23 WHEN ACCESSING TABLE "BKPF"

START-OF-SELECTION.

SELECT BUDAT BLDAT BLART XBLNR_ALT BKTXT XSNET WAERS FROM BKPF INTO

IT_BKPF

WHERE BUKRS = '0004'

AND BLDAT > '2007/01/01'.

14 REPLIES 14

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please try this.


SELECT BUDAT BLDAT BLART XBLNR_ALT BKTXT XSNET WAERS 
FROM BKPF 
INTO TABLE IT_BKPF
WHERE BUKRS = '0004'
AND BLDAT > '20070101'. 

Regards,

Ferry Lianto

former_member195698
Active Contributor
0 Kudos

Try,

SELECT BUDAT BLDAT BLART XBLNR_ALT BKTXT XSNET WAERS FROM BKPF INTO TABLE

IT_BKPF

WHERE BUKRS = '0004'

AND BLDAT > '20070101'.

Also check the fields in the internal table should be in the same sequence as in the Select Query ( BUDAT BLDAT BLART XBLNR_ALT BKTXT XSNET WAERS ).

Regards,

Abhishek

0 Kudos

Same problem, same message. any other thoughts?

0 Kudos

Try:

into corresponding fields of table it_bkpf

But also make sure you are using the correct date format as suggested by Ferry.

Rob

Message was edited by:

Rob Burbank

0 Kudos

How do you check the order? I also tried the into corresponding fields and it didn't fix it.

0 Kudos

Some time when there is a load on the system db then it gives such error.

Also there might be one other reason that some body might locked the table for some other operation.

Try to execute it after some time.

Thanks,

Srinivas

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please try this ... and check the syntax declaration of IT_BKPF,


DATA: BEGIN OF IT_BKPF OCCURS 0,
        BUDAT LIKE BKPF-BUDAT,
        BLDAT LIKE BKPF-BLDAT,
        BLART LIKE BKPF-BLART,
        XBLNR_ALT LIKE BKPF-XBLNR_ALT,
        BKTXT LIKE BKPF-BKTXT,
        XSNET LIKE BKPF-XSNET,
        WAERS LIKE BKPF-WAERS.
DATA: END OF IT_BKPF. 

SELECT BUDAT BLDAT BLART XBLNR_ALT BKTXT XSNET WAERS 
FROM BKPF 
INTO TABLE IT_BKPF
WHERE BUKRS = '0004'
AND BLDAT > '20070101'. 

Regards,

Ferry Lianto

0 Kudos

The problem is field XBLNR_ALT,

Even if u try to select this from the data browser it takes a lot of time. I dont know the reason behind it yet but Iam trying to find out. try doing without it.

rgds

Sameer

Former Member
0 Kudos

Jarrett,

Hope this code helps.

data : it_bkpf like bkpf occurs 0.

SELECT BUDAT BLDAT BLART XBLNR_ALT BKTXT XSNET WAERS FROM BKPF

into corresponding fields of table

IT_BKPF

WHERE BUKRS = '0004'

AND BLDAT > '20070101'.

Regards

Veera

0 Kudos

Same thing, the message I get is the Termination occurred in line 36 which is

and bldat > '20070101'

0 Kudos

Can you check in SE16 for the table BKPF the no.of entries in the table

for the condition BUKRS = '0004'

AND BLDAT > '20070101' ?

Is it giving dump there or taking too much time or the no. of entries are large ?

Regards,

aj

0 Kudos

Could you post some more details of the dump?

Rob

raymond_giuseppi
Active Contributor
0 Kudos

Look at system log via transaction SM21 to get more information on the error. Usually RSQL ERROR come from operation system.

"Mapping of field incorrect"

<i>Look also for OSS note with keyword "XBLNR_ALT" there are many recent (2007) notes.</i>

Regards

Former Member
0 Kudos

It was the same with me. My declaration for "TYPES" wasn't like my "SELECT".

I have a tip: In your "SELECT", select all fields that was declared in your "TYPES".

Example:

TYPES: BEGIN OF ty_bkpf,

   bukrs TYPE BKPF-BUKRS,

   belnr TYPE BKPF-BELNR,

   blart TYPE BKPF-BLART,
   budat TYPE BKPF-BUDAT.

TYPES: END OF ty_bkpf.

DATA: T_BKPF  TYPE TABLE OF ty_bkpf,

SELECT BUKRS BELNR BLART BUDAT

   INTO TABLE T_BKPF

   FROM BKPF

   WHERE MONAT = '11'

     AND GJAHR = '2013'.

Best Regards