Application Development 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: 

copy content of table to internal table

nikhil_bose
Active Contributor
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

DATA: it_vbak TYPE STANDARD TABLE OF vbak.

SELECT *

FROM vbak INTO TABLE it_vbak.

Regards,

Raghavendra

5 REPLIES 5

Former Member
0 Kudos

Hi,

DATA: it_vbak TYPE STANDARD TABLE OF vbak.

SELECT *

FROM vbak INTO TABLE it_vbak.

Regards,

Raghavendra

Former Member
0 Kudos

ex:-

select * from mara into table itab.

loop at itab .

write:/itab-matnr,.....

endloop.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

gopi_narendra
Active Contributor
0 Kudos

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