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 runtime error

Former Member
0 Likes
673

Hello,

i have this program that goes ok when i activate it, but when running i get the following dump (it says the problem is on the select statement), and i really don“t know what causes it, anyone can help me please?.

RSQL error 23 when accessing table "BSIS ".

here is my code:

DATA: BEGIN OF t_data OCCURS 0,

date(10),

bukrs LIKE bsis-bukrs,

gsber LIKE bsis-gsber,

hkont LIKE bsis-hkont,

descr LIKE t087j-txt50,

wrbtr LIKE bsis-wrbtr,

END OF t_data.

DATA: BEGIN OF t_data2 OCCURS 0,

date(10),

bukrs LIKE bsis-bukrs,

gsber LIKE bsis-gsber,

hkont LIKE bsis-hkont,

wbrtr LIKE bsis-wrbtr,

END OF t_data2.

LOOP AT t_data.

SELECT

budat

bukrs

gsber

hkont

wrbtr

INTO table t_data2

FROM BSIS

WHERE hkont EQ t_data-hkont

AND bukrs EQ t_data-bukrs.

ENDLOOP.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
646

Problem at select query,

you defined internal table t_data2,here you declared date field as date(10)

you are selecting data from BSIS Table,here data field length is 8 ,type mismatching.

once you get the data into internal table,move the data into one more internal table,before moving concatenate date field as desired format then move it.

DATA: BEGIN OF t_data OCCURS 0,

date(10),

bukrs LIKE bsis-bukrs,

gsber LIKE bsis-gsber,

hkont LIKE bsis-hkont,

descr LIKE t087j-txt50,

wrbtr LIKE bsis-wrbtr,

END OF t_data.

DATA: BEGIN OF t_data2 OCCURS 0,

budat like bsis-budat,

bukrs LIKE bsis-bukrs,

gsber LIKE bsis-gsber,

hkont LIKE bsis-hkont,

wbrtr LIKE bsis-wrbtr,

END OF t_data2.

LOOP AT t_data.

SELECT

budat

bukrs

gsber

hkont

wrbtr

INTO table t_data2

FROM BSIS

WHERE hkont EQ t_data-hkont

AND bukrs EQ t_data-bukrs.

ENDLOOP.

Thanks

Seshu

4 REPLIES 4
Read only

Former Member
0 Likes
646

There is no error. Goto SE11 and check whether u r able to view BSIS table entries or report to Basis

Read only

Former Member
0 Likes
646

HI,

1) the number of fields in the internal table are not same as what you are getting in the select.

2) the data type of the fields in the inernal table are not same.

So check the fileds, sequenece, data types of ur internal table

.. Check the date(10) try to change the data type to BSIS-BUDAT.

3) if you still get that error.. then do this. " For some tables we will get these errors and you can solve it by using this code

data : t_data2 like standard table of bsis.

select * from bsis into tabl t_data2..

Thanks

Mahesh

Read only

Former Member
0 Likes
647

Problem at select query,

you defined internal table t_data2,here you declared date field as date(10)

you are selecting data from BSIS Table,here data field length is 8 ,type mismatching.

once you get the data into internal table,move the data into one more internal table,before moving concatenate date field as desired format then move it.

DATA: BEGIN OF t_data OCCURS 0,

date(10),

bukrs LIKE bsis-bukrs,

gsber LIKE bsis-gsber,

hkont LIKE bsis-hkont,

descr LIKE t087j-txt50,

wrbtr LIKE bsis-wrbtr,

END OF t_data.

DATA: BEGIN OF t_data2 OCCURS 0,

budat like bsis-budat,

bukrs LIKE bsis-bukrs,

gsber LIKE bsis-gsber,

hkont LIKE bsis-hkont,

wbrtr LIKE bsis-wrbtr,

END OF t_data2.

LOOP AT t_data.

SELECT

budat

bukrs

gsber

hkont

wrbtr

INTO table t_data2

FROM BSIS

WHERE hkont EQ t_data-hkont

AND bukrs EQ t_data-bukrs.

ENDLOOP.

Thanks

Seshu

Read only

Former Member
0 Likes
646

thanks for your answers, i did like seshu told me and works fine. But now, the internal table t_data2 contains only a few rows, checking the bsis table it must have at least 7 or 8 rows for each general ledger account in the internal table t_data (t_data-hkont). At the end of the loop, the rows in t_data2 belong only to the last row in t_data. How can i solve it?

null