Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

To get average of netwr based on matnr

Hi,

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?

Regards,

Darpana.

Tags:
Former Member
Former Member replied

Hi,

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.

endat.

endloop.

revrt back if any issues,

Regards,

Naveen

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question