Skip to Content
Former Member
Jan 04, 2010 at 05:28 PM

Generic program for calculating subtotals


Dear All,

I have created a big sales ALV report for the company which collects the data from lot of tables.

Now the problem is, the report that I have created is Invoice-wise item-wise report. And every user and management do not want that item-wise report. As they need the same report like

1. Region-wise & Customer-wise, (e.g. North region, X customer) sales report.

2. Customer-wise, product-wise

3. Region-wise, customer-wise, product-wise.

4. Product-wise categorization

etc. and many more.

Although the report can be generated by putting the Subtotal (in ALV generated report) on the desired columns. But main problem with that is that Subtotal increase the number of rows drastically which does not look good.

To explain in detail:

Inv. No Item Material Qty. Value Customer Region

90001 10 A 10 1000 X 10

90001 10 B 20 1500 X 10

90002 10 A 50 6000 X 10

In Basic ALV, I have only two rows. But when I do the subtotal according to Regio-wise Customer-wise Material-wise,the number of rows will become 6.

But as per the given scenario, the number of rows should be only 2.

Region Customer Material Qty Value

10 X A 60 6000

10 X B 20 1500

So my requirement is how can I make such report in which user specify the columns against which he need the subtotals and rest all value & column related columns should add up WITHOUT ADDITION IN NUMBER OF ROWS.

If still you do not understand the problem then tell I will explain it more.

Kind Regards,