Skip to Content
0
Former Member
Mar 20, 2009 at 01:03 PM

not appending

18 Views

Hi all,

Pls help on below sample code.

It is not appending all the data from table marc.

only last entry is filling in the internal table . Pls check

tables : mara.

select-options : matnr for mara-matnr.

data : begin of itab occurs 0,

matnr like mara-matnr,

ernam like mara-ernam,

end of itab.

data : begin of mtab occurs 0,

werks like marc-werks,

end of mtab.

data : wa like itab.

select matnr from mara into table itab where matnr in matnr.

loop at itab.

select werks from marc into table mtab where matnr = itab-matnr.

append mtab.

endloop.

Pls check