Application Development and Automation 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: 
Read only

Insert

Former Member
0 Likes
1,058

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

8 REPLIES 8
Read only

Former Member
0 Likes
1,025

Hi Use following code :

select f1 f2 ... from z_header into table it_tab .

Reward points if helpful.

Regards.

Srikanta Gope

Read only

former_member378318
Contributor
0 Likes
1,025

SELECT * FROM Z_HEADER INTO TABLE IT_ITAB.

Read only

Former Member
0 Likes
1,025
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

Read only

Former Member
0 Likes
1,025

hi

good

use select statement.

thanks

mrutyun^

Read only

Former Member
0 Likes
1,025

Thanks for the reply,

I tried doing this and i m getting the following error:

" it_tab are not unicode convertible.

Thanks

Rajeev Gupta

Read only

0 Likes
1,025

paste your code please..

Read only

0 Likes
1,025

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

Read only

0 Likes
1,025

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.