Application Development and Automation 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: 
Read only

RSQL error

Former Member
0 Likes
866

Hello! There are no syntax errors in the program when I check but getting the following error with a dump on the select statement given below . Id anyone familiar with this type of error?

<b><u>RSQL error 23 when accessing table "RBKP ". </u> </b>

SELECT belnr

bukrs

budat

gjahr

usnam

lifnr

blart

tcode

FROM RBKP

INTO TABLE irbkp

WHERE bukrs in co_code

and stblg eq space

and budat in s_docdt

and lifnr ne space.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
820

hi Syed,

co_code or s_docdt takes 400 to 500 records if that exceeds Program Dumps. Please check for the same in Debug mode.

Regards,

Santosh

6 REPLIES 6
Read only

alejandro_bindi
Active Contributor
0 Likes
820

Does co_code contain many individual Company Codes or s_budat many individual dates?

Keep in mind that the IN statement is translated in background to many OR conditions. When there are many, it generates a dump. Try with a few Company codes.

Read only

0 Likes
820

Here is the output from co_code internal table

I |BT |0010|0040

It does not seem to have too many entires. Moreover there are select statement prior to the one that is causing the dump that seem to be running fine (see below, th eone that is runnign fine) with the co_code in them

SELECT belnr

bukrs

gjahr

monat

usnam

blart

tcode

INTO TABLE ibkpf

FROM bkpf

WHERE bukrs IN co_code

AND gjahr IN fis_year

AND monat IN period

  • AND TCODE IN tra n_cod

AND blart IN doc_type

AND usnam in username

AND stblg eq space.

Read only

Former Member
0 Likes
821

hi Syed,

co_code or s_docdt takes 400 to 500 records if that exceeds Program Dumps. Please check for the same in Debug mode.

Regards,

Santosh

Read only

0 Likes
820

in that case you can correct that error in this way .

if not  co_code[] is initial.                              
 v_low  = 1.                                              
 v_high = 400.                                  
   DESCRIBE TABLE  co_code LINES v_lines.
  DO.                                                      
    APPEND LINES OF  co_code FROM v_low TO v_high TO r_temp. 
SELECT belnr
bukrs
budat
gjahr
usnam
lifnr
blart
tcode
FROM RBKP
INTO TABLE irbkp
WHERE bukrs in r_temp
and stblg eq space
and budat in s_docdt
and lifnr ne space.           

      COMMIT WORK.                                        
      v_low  = v_high  + 1.                                 
      v_high = v_high  + 400.                             
      IF v_low > v_lines.                                 
          EXIT.                                            
      ENDIF.                                             
        CLEAR   r_temp.                             
        REFRESH r_temp.                         
  ENDDO.                                              
endif.   

Read only

0 Likes
820

how about s_docdt ??? how many entries does it hold ???

If s_docdt also has limited records do this way

SELECT belnr

bukrs

budat

gjahr

usnam

lifnr

blart

tcode

FROM RBKP

INTO <b>CORRESPONDING FIELDS OF</b> TABLE irbkp

WHERE bukrs in co_code

and stblg eq space

and budat in s_docdt

and lifnr ne space.

Message was edited by:

Santosh Kumar Patha

Read only

0 Likes
820

I think s_docdt is the culprit. Thanls for your help!