here in this both select queries you are using same table but 2 select queries.only difference i could find is first select qury had werks andsecond has igort. if you want to use same table combine into same select query .
Select matnr , charg, vfdat from MCHA table
where MCHA-MATNR = itab -MATNR
AND mcha-lvorm = ‘ ’
AND WERKS = iv_werks
Select matnr , charg, vfdat from MCHA table
where MCHA-MATNR = itab-MATNR
AND mchA-lvorm = ‘ ’
AND lgort = iv_lgort.
single query
Select matnr , charg, vfdat from MCHA table
for all entires in ITAB "change
into table <your internal table> "changes
where MCHA-MATNR = itab -MATNR "use this ITAB as for all entries
AND mcha-lvorm = ‘ ’
AND WERKS = iv_werks
and lgort = iv_lgort.
if you want 2 select queries on table change the table name FROM and use for all entries.
Thanks