‎2009 Jul 08 12:46 PM
how to fetch dat from view?
i am writing
select single a b c from view_name into wa_xyz .
then it is showing some error...
plz help me
‎2009 Jul 08 12:49 PM
use
data : begin of wa_stru,
a,
b,
c,
end of wa_stru.
select a b c into wa_stru
from view
where cond.
this for structure.
data : it_stru type standard table of wa_stru.
select a b c into table it_stru
from view
where cond.
it is same as we use tables.
Edited by: sarbpreet multani on Jul 8, 2009 5:24 PM
‎2009 Jul 08 12:51 PM
‎2009 Jul 08 12:51 PM
what error.
Possible solutions - guessing
declare
tables:<view_name>.
or
select single a b c from view_name into (wa_xyz-a, wa_xyz-b,wa_xyz-c).
‎2009 Jul 08 12:55 PM
Hi,
Please let me know the error.
SELECT SINGLE * FROM view name INTO WA_area WHERE condition.
Regards,
Aditya
‎2009 Jul 08 1:55 PM
Hi,
Try using
select single a b c
from view_name
into corresponding fields of wa_xyz .
.
Hope this helps.
Regards,
Dhasarathy.
‎2009 Jul 08 2:41 PM
HI,
Try this and compare with your scenario.
eg:
Tables: caufv. " Caufv is a database view
data: itab like caufv occurs 0 with header line.
select * from caufv into table itab.
In your case if you are selcting the required fields from the table please check the order of the fields being fetched with that of the internal table.
Regards,
Satish
‎2009 Jul 16 3:41 AM
Hi puja!
you cannot use select statement to retrieve data from view.
use the FM - VIEW_GET_DATA.
Store the values into internal table and then do your process.
Regards,
Sakthi.