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: 

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

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

h_senden2
Active Contributor
0 Kudos

the same for the select statement on itab2 and stlnr

regards,

Hans

3 REPLIES 3

h_senden2
Active Contributor
0 Kudos

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

will not work, the itab1 structure contains matnr and mtart, and you only read the mtart.

regards,

Hans

h_senden2
Active Contributor
0 Kudos

the same for the select statement on itab2 and stlnr

regards,

Hans

Former Member
0 Kudos

Hi Hans,

My question has been solved ...... thnx for ur reply...