Skip to Content
0
Former Member
Nov 20, 2008 at 07:32 AM

For all entries program activated, but no output...

43 Views

Hi,

The following code activated wihout errors, but while executing no output appears....

REPORT ZFORALL3.

tables: mara,mast,stpo.

data: begin of itab1 occurs 0,

matnr like mara-matnr,

mtart like mara-mtart,

end of itab1.

data: begin of itab2 occurs 0,

matnr like mast-matnr,

stlnr like mast-stlnr,

end of itab2.

data: begin of itab3 occurs 0,

stlnr like stpo-stlnr,

idnrk like stpo-idnrk,

menge like stpo-menge,

end of itab3.

data: begin of itab occurs 0,

matnr like mast-matnr,

mtart like mara-mtart,

stlnr like stpo-stlnr,

idnrk like stpo-idnrk,

menge like stpo-menge,

end of itab.

select mtart from mara into table itab1 up to 100 rows.

select matnr from mast into table itab2 for all entries in itab1 where matnr = itab1-matnr.

select stlnr idnrk menge from stpo into table itab3 for all entries in itab2 where stlnr = itab2-stlnr.

loop at itab1.

move-corresponding itab1 to itab.

loop at itab2 where matnr = itab1-matnr.

move-corresponding itab2 to itab.

loop at itab3 where stlnr = itab2-stlnr.

move-corresponding itab3 to itab.

append itab.

endloop.

endloop.

endloop.

loop at itab.

write:/ itab-matnr,itab-mtart,itab-stlnr,itab-idnrk,itab-menge.

endloop.