‎2006 Dec 28 6:32 AM
hi every body
i had declared the internal table as
DATA: k_oib TYPE table of roib_def_index_gm.
DATA:k_oib TYPE table of oib_defaults_display.
***and selected like this
SELECT single * FROM oib_def_index_gm
INTO table k_oib
WHERE matnr = l_material
AND werks = i_plant
AND lgort = '0001'.
and used read
read table k_oib index 1.
i am error in select statement that table is not defined and it giving error in read table also it is not working.
pls give solutions.
‎2006 Dec 28 6:34 AM
Hi,
I think ur data declaration is not correct .
Check for roib_def_index_gm , it doesnt look like a table.
‎2006 Dec 28 6:34 AM
Where have you declared the tables and where is the select? Are they both in the same class?
‎2006 Dec 28 6:35 AM
‎2006 Dec 28 6:39 AM
‎2006 Dec 28 6:40 AM
Hi ,
You have declared table k_oib twice and u require a workarea for readig internal table
‎2006 Dec 28 6:40 AM
Hi,
You are selecting from oib_def_index_gm table but declaration on
DATA: k_oib TYPE table of roib_def_index_gm.
DATA:k_oib TYPE table of oib_defaults_display.
Replace the lines by
DATA: k_oib TYPE table of oib_def_index_gm .
Before that check oib_def_index_gm is existing in dictionary.
‎2006 Dec 28 6:44 AM
‎2006 Dec 28 6:45 AM
first check if table oib_def_index_gm. exists in dictionary as i m not able to find this table and if it exists then write follwoing code -
DATA: k_oib TYPE table of oib_def_index_gm.
***and selected like this
SELECT single * FROM oib_def_index_gm
INTO table k_oib
WHERE matnr = l_material
AND werks = i_plant
AND lgort = '0001'.
and used read
read table k_oib index 1.
‎2006 Dec 28 6:49 AM
all tables exits in db.
it giving an error as
read dbtab is not supported in oo context
‎2006 Dec 28 6:54 AM
Hi,
Just copy paste this code and comment the previous code and check whether it is working.
<b>DATA: k_oib TYPE table of oib_def_index_gm ,
w_oib type oib_def_index_gm .</b>
SELECT single * FROM oib_def_index_gm
INTO table k_oib
WHERE matnr = l_material
AND werks = i_plant
AND lgort = '0001'.
and used read
read table k_oib <b>into w_oib</b> index 1.
‎2006 Dec 28 6:54 AM
Hi,
Try declaring a workarea:
data: wa_oib type roib_def_index_gm.
Then try using the read statement as:
read table k_oib into wa_oib index 1.
Regards,
Kalpana