at end of
hi,
i want to calculate the total stock of a material in a plant having more than storage location.
i am getting the values like this.
matnr lgort plant labst
x 1 100 100
x 2 100 25
y 1 100 30
y 3 100 67
i have used at end of matnr .
but i am not getting the desired o/p.
i have written the code like this :
LOOP AT it_mard.
st_mard = it_mard .
it_final-matnr = it_mard-matnr.
it_final-maktx = it_mard-maktx.
it_final-zmatsiz = it_mard-zmatsiz.
it_final-werks = it_mard-werks.
AT END OF matnr.
it_mard = st_mard.
v_sum = v_sum + it_mard-labst.
"it_final-labst = v_sum.
endat.
it_final-labst = v_sum.