Hi,
I found this query and it's almost the same on SAP forecast by month but some data are not tally.
SELECT Itemcode,
[1] as [Jan],[2] as [Feb],[3] as [Mar],
[4] as [Apr],[5] as [May],[6] as [Jun],
[7] as [Jul],[8] as [Aug],[9] as [Sep],
[10] as [Oct],[11] as [Nov],[12] as [Dec]
From (SELECT t1.itemcode,t1.Quantity , month(t0.docdate) as 'Month' FROM ordr T0 inner join RDR1 t1 on T0.docentry=t1.DocEntry WHERE Year(T0.DocDate)='2014'
) S
Pivot (SUm(S.quantity) FOR [Month] IN ([4],[5],[6],[7],[8],[9],[10],[11],[12],[1],[2],[3])) P
Thanks,
Raphael