To get average of netwr based on matnr
I have a requirement to print average of netwr (net value) for similar matnr (materials) for a particular range of vbeln (Slaes order).
The problem i am having is how will i take the condition 'Similar Materials' and then get the average.
How should i go about this requirement?
suppose u have data in the internal table itab.
data: begin of itab occurs 0,
matnr type matnr,
netwr type netwr_g,
end of itab.
data: n type i,
sort itab by matnr.
loop at itab.
n = n + 1.
at end of matnr.
avg = sum / n.
*move this avg to another internal table.
n = 0.
revrt back if any issues,