Olá,
em vez de joins internos, utilize todas as entradas,
select matnr ersa ernam from mara into table it_mara
where matnr in s_matnr.
if it_mara[] is not initial.
select matnr werks pstat from marc into table it_marc
for all entries in it_mara where matnr = it_mara-matnr.
endif.
if it_marc[] is not initial.
select matnr vkorg vtweg from mvke into table it_mvke
for all entries in it_marc where matnr = it_marc-matnr.
endif.
se for útil, ganhe alguns pontos.
Saudações