Hi Rakhee,
Is your Code something similar to this?
select matnr
werks
lgort
labst
from mard
into table it_mard
where matnr in s_matnr.
if not it_mard[] is initial.
select matnr
werks
lgort
charg
from MCHB
into table it_mchb
for all entries in it_mard
where matnr = it_mard-matnr
and werks = it_mard-werks
and lgort = it_mard-lgort.
endif.
loop at it_mchb.
move-corrsponding it_mchb to it_final.
read table it_mard with key matnr = it_mchb-matnr
werks = it_mchb-werks
lgort = it_mchb-lgort.
if sy-subrc = 0.
move-corresponding it_mard to it_final.
append it_final.
clear it_final.
endif.
endloop.
Regards,
ravi
Yes it is correct...if you refer to my code in your earlier post you can replace the code in second select to get the data from MARD..the rest can remain the same to give you the percentage.
Please note to reward points for all helpful answers...
Thanks and Regards
Anurag
Hi,
YOu can write lik e below also,
SELECT MARDMATNR MARDLABST MCHB~CHARG
INTO TABLE IT_MARD_MCHB
FROM MARD INNER JOIN MCHB
ON MARDMATNR = MCHBMATNR AND
MARDWERKS = MCHBWERKS AND
MARDLGORT = MCHBLGORT.
Thanks,
Ramakrishna
Add a comment