12-28-2006 4:53 AM
hi experts,
please give me a sample code to join these 3 tables.
thanks.
sasi.
12-28-2006 5:00 AM
select a~matnr
a~mtart
b~werks
c~prodh
from ( mara as a join mard as b
on amatnr eq bmatnr )
inner join mvke as c
on amatnr eq cmatnr
into table i_mard
for all entries in i_yplnt
where a~mtart eq 'FERT' and
b~werks eq i_yplnt-pplnt.
Regards
Prabhu
12-28-2006 7:16 AM
select amatnr ambrsh amtart cwerks vvkorg vvtweg into table itab from mara as a inner join marc as c on amatnr = cmatnr inner join mvke as v on cmatnr = vmatnr.
Cheers.
12-28-2006 10:45 AM
hi,
instead of inner joins go for all entries,
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.
if helpful get some points.
regards