Delete adjacent lines in internal table

Question: Dear all,

In an internal table I need to delete duplicate lines, but the line that stays on the table should have the sum of quantity field.

Example:

Mat NR. Quantity
1 10
1 20

Result required:

Mat NR Quantity
1 30

Which is the best way (in terms of performance) to do this? Looping the table?

TIA

Ana

Answer:
Press F1 on the keyword COLLECT
Copyright ?2007 - 2008 www.jt77.com