Skip to Content
0
Former Member
May 24, 2008 at 12:00 AM

Program Output

38 Views

Please tell me the difference in output's of the below codes.

-


parameters:p_matnr like mara-matnr.

select * from mara into table i_mara from mara

where matnr = p_matnr.

if sy-subrc eq 0.

loop at i_mara into wa_mara.

write:/ wa_mara-matnr.

endloop.

endif.

-


select-options:s_matnr for mara-matnr.

select * from mara into table i_mara from mara

where matnr in s_matnr.

if sy-subrc eq 0.

loop at i_mara into wa_mara.

write:/ wa_mara-matnr.

endloop.

endif.

-


Now execute the two blocks of above code independently. Execute the program with out entering the materials and see the difference in outputs.