Skip to Content
Jun 27, 2019 at 07:50 AM

Add 'monthly total' to query


Hello SAP experts,

I just worked out a query which could give me total quantity consumed in issue for production (IGE1) by item, within a selected date range. But on top of that, it would be more helpful if it could also give me monthly totals (also by item) also within that selected date range.

Below is the current query that I worked out:

SELECT T0.[ItemCode], T0.[Dscription], SUM(T0.[Quantity]) FROM IGE1 T0 INNER JOIN OIGE T1 ON T0.[DocEntry] = T1.[DocEntry] WHERE T1.[DocDate] >=[%0] AND T1.[DocDate] <=[%1] GROUP BY T0.[ItemCode], T0.[Dscription]

Could someone please help to figure out how to add monthly total on top of this?

Much appreciated!! Thank you for your time!!