10-24-2007 9:25 AM
hi all,
could you tell me how to avail the content of a database table into an internal table. i want to access those contents out side of select-end select construct.
regards,
nikhil
10-24-2007 9:27 AM
Hi,
DATA: it_vbak TYPE STANDARD TABLE OF vbak.
SELECT *
FROM vbak INTO TABLE it_vbak.
Regards,
Raghavendra
10-24-2007 9:27 AM
Hi,
DATA: it_vbak TYPE STANDARD TABLE OF vbak.
SELECT *
FROM vbak INTO TABLE it_vbak.
Regards,
Raghavendra
10-24-2007 9:28 AM
ex:-
select * from mara into table itab.
loop at itab .
write:/itab-matnr,.....
endloop.
10-24-2007 9:29 AM
Hi,
You can use the SELECT....INTO TABLE itab....
construct to populate the internal table directly.
You need not give END SELECT if you r using INTO TABLE clause.
Reward points if helpful.
Thanks and Regards,
Litta.
10-24-2007 9:29 AM
Hi
u need to use select wuery to populate ur internal table like
select *
from vbak
into table lt_vbak.
and to access those contenets u can loop the internal table and access it like
loop at lt_vbak into wa_vbak.
write wa_vbak-vbeln.
endloop.
Message was edited by:
Vasudha L
10-24-2007 9:30 AM
Data : it_usr02 type table of USR02 initial size 0,
is_usr02 type USR02.
select * from USR02
into table it_usr02.
if sy-subrc = 0.
sort it_usr02 by bname.
endif.
loop at it_usr02 into is_usr02.
" here you can access or modify data
clear : is_usr02.
endloop.
Regards
Gopi