Hola,
en lugar de joins internos, utiliza todas las 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.
si es útil, obtén algunos puntos.
Saludos