Former Member
Oct 20, 2011 at 02:10 AM

# ALV Sorting and Subtotal

82 Views

Hi Experts,

In ALV, Is it possible to include into the subtotal line a value from a grouped column example as below?

Material Mix | Material Grade | Qty | Amount | Average Selling Price

Subtotal Line 1 A A1 100 2400 24

Subtotal Line 2 A A1 170 4500 26.47

Subtotal Line 3 A A1 250 6533 26.132

Subtotal Header A A1 620 13433 21.67

Where:

The Subtotal Lines are summed up Quantities and Amounts from Material Grouped Classification Mix and Material Grade (CL04)

The Average Selling Price subtotal Header is from 13433 / 620 = 21.67. And this value should be under the Average selling Price Column also.

Can it be done also in the Total Line sample?

Material Mix | Material Grade | Qty | Amount | Average Selling Price

Subtotal Line 1 A A1 100 2400 24

Subtotal Line 2 A A1 170 4500 26.47

Subtotal Line 3 A A1 250 6533 26.132

Subtotal Header A A1 620 13433 21.67

Subtotal Line 4 B B1 800 15000 18.75

Subtotal Header B B1 800 15000 18.75

Total 1420 28433 20.02

Where:

Total Qty is the total of Subtotal Header 620 + 800 = 1420 and Total Amount 13433 + 15000 = 28433 and the Total Average Selling Price is 28433 / 1420 = 20.02