Hi Mandy,
Sorry if I have misunderstood, but you have the matnr for the select query from the file right?
and matnr is a key field in both tables. So there will not be any chance of duplication.
data wa_maktx TYPE maktx.
select single * from mara into mara where matnr = file01-matnr.
if sy-subrc = 0.
if mara-bismt = file01-bismt.
SELECT SINGLE maktx FROM makt INTO wa_maktx
WHERE matnr = file01-matnr AND spras = sy-langu.
if sy-subrc = 0 . " if you want to print only if both bismt and maktx is present
write :/2 file01-matnr, 25 file01-bismt, 40 mara-bismt, 50 file01-maktx, 80 wa_maktx.
endif.
endif.
endif.