Skip to Content
0

Inventory Aging Report Need Help

Sep 07, 2017 at 05:09 PM

51

avatar image

Hello SAP Gurus,

Can someone please help me with a query to have the following information in it?

I need an inventory report that lists all P/Ns and shows Qty., Price, Extended Price, and age, sorted by age (oldest first).

Thank you very much for any help you can provide.

Kind regards,

Larry

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Larry Tucker Sep 07, 2017 at 11:03 PM
0

Please disregard. I figured it out.

Cheers!!

Larry

Share
10 |10000 characters needed characters left characters exceeded
Larry Tucker Sep 07, 2017 at 10:28 PM
0

Hello SAP Gurus,

This is what I have so far, but is there a way to make it so that I can show the extended cost?

select b.code 'Item No.', b.name 'Description', b.Wh, b.ap 'Average Price', b.Bal 'Total Qty', b.Val 'Total Value',
isnull(case when b.days <30 then b.bal end,0)'0-30 Days (Qty)',
isnull(case when b.days between 30 and 60 then b.bal end,0) '30-60 Days (Qty)',
isnull(case when b.days between 60 and 90 then b.bal end,0) '60-90 Days (Qty)',
isnull(case when b.days between 90 and 120 then b.bal end,0) '90-120 Days (Qty)',
isnull(case when b.days between 120 and 150 then b.bal end,0) '120-150 Days (Qty)',
isnull(case when b.days between 150 and 180 then b.bal end,0) '150-180 Days (Qty)',
isnull(case when b.days >180 then b.bal end,0) 'Above 180 Days (Qty)'
from (
select a.code,a.name,a.wh,a.ap,a.bal,a.val,datediff(dd,dt,getdate())'days'
from (
select max(t0.itemcode)'Code',max(t0.Dscription)'Name',
max(t0.Warehouse)'Wh', max(t1.avgprice) 'ap',
sum(t0.inqty-t0.outqty)'Bal',sum(t0.transvalue)'Val',max(t0.docdate)'dt'
from oinm t0 inner join oitm t1 on t0.itemcode=t1.itemcode
inner join oitw t2 on t0.itemcode=t2.itemcode and t0.warehouse=t2.whscode
where t0.warehouse='[%1]'
group by t0.itemcode
)a
)b order by code
Share
10 |10000 characters needed characters left characters exceeded