08-16-2007 4:26 PM
Hi Gurus,
I need to get data from one of my custom table z_header into one of my internal table it_tab.
What would be the easiest way of doing that.
Thanks
Rajeev Gupta
08-16-2007 4:29 PM
Hi Use following code :
select f1 f2 ... from z_header into table it_tab .
Reward points if helpful.
Regards.
Srikanta Gope
08-16-2007 4:30 PM
08-16-2007 4:32 PM
data: lt_tab type table of z_header,
ls_tab type z_header.
select * from z_header into table lt_tab.
if sy-subrc eq 0.
loop at lt_tab into ls_tab.
* do your data manupulation here.
endloop.
endif.
A
08-16-2007 4:37 PM
08-16-2007 4:40 PM
Thanks for the reply,
I tried doing this and i m getting the following error:
" it_tab are not unicode convertible.
Thanks
Rajeev Gupta
08-16-2007 4:42 PM
08-16-2007 5:51 PM
HI,
Data : itab like standard table of z_header,
wa like z_header.
select * from z_header into table itab.
if sy-subrc eq 0.
loop at itab into wa.
write wa.
endloop.
endif.
Thansk
mahesh
08-16-2007 10:21 PM
Try it like this:
Data : itab like standard table of z_header,
wa like line of itab.
select * from z_header into table itab.
if sy-subrc eq 0.
loop at itab into wa.
You should print each field of wa separately
write: wa-field1, wa-field2, wa-field3.
endloop.
endif.
See if that works.