‎2007 Aug 07 9:50 PM
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.
‎2007 Aug 07 10:13 PM
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
‎2007 Aug 07 9:55 PM
There is no error. Goto SE11 and check whether u r able to view BSIS table entries or report to Basis
‎2007 Aug 07 10:04 PM
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
‎2007 Aug 07 10:13 PM
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
‎2007 Aug 08 5:01 PM
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