Stock Aging Query/Report

Dear all,
We are on SAP B1 2007 PL42 and using Moving average as our cost valuation method.
It doesn't have an inbuilt stock aging report, I have searched through the forum but none of the queries arebshowing the correct aging of stocks. Could anyone have a query/report/addon for stock aging?
Kind Regards,
Asif

Hi,
Try this one,with warehouse code as input parameter
select b.code, b.name, b.Wh, b.Bal, b.Val,
isnull(case when b.days <30 then b.bal end,0)'0-30 Days' ,
isnull(case when b.days between 30 and 60 then b.bal end,0) '30-60 Days',
isnull(case when b.days between 60 and 90 then b.bal end,0) '60-90 Days',
isnull(case when b.days between 90 and 120 then b.bal end,0) '90-120 Days',
isnull(case when b.days between 120 and 150 then b.bal end,0) '120-150 Days',
isnull(case when b.days between 150 and 180 then b.bal end,0) '150-180 Days',
isnull(case when b.days >180 then b.bal end,0) 'Above 180 Days'
from (
select a.code,a.name,a.wh,a.bal,a.val,datediff(dd,dt,getdate())'days'
from (
select max(t0.itemcode)'Code',max(t0.Dscription)'Name',
max(t0.Warehouse)'Wh',
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
where t0.warehouse='[%1]'
group by t0.itemcode
)a
)b order by code

Similar Messages

  • Stock Aging Analysis Report by Serial Number

    Hi Experts,
    Is it right to create a Stock Analysis Report for all materials based on Serial Numbers? Because I have now developed a Stock Aging Report which will display the values of stock aging based on Goods Receipt created however, when I base it on Goods Receipt and Serial Numbers, the number won't tally. Please explain what happened? Is this approach not feasible?
    Please help.
    Thanks a lot for your answers!

    Hi @Bijoy,
    We are now experiencing a lot of issues regarding tracking the stock by serial numbers because the current stock aging report only applies to a FIFO stock system. There are also stocks that are transferred from Location to another Location (Sto Loc to Sto Loc2) and they wanted their stocks' aged to be based on the first Storage Location Posted. Please tell me if this is feasible.
    Thanks a Lot!

  • Stock Ageing Query With Stock Value

    Dear Experts,
    Greeting for the day...!
    I am using Batch wise stock, so consumption done by batch wise.
    Please forward me the query for the Product Code, Products Name, Batch No, Batch Qty (Under respective ageing days), Batch Amount (Under respective ageing days).
    The parameter will be from date & to date & group.
    Thanks in advance.
    Regards
    Datta Kharat

    Hi,
    Please check this thread:
    http://scn.sap.com/thread/3372541
    Thanks & Regards,
    Nagarajan

  • Age Analysis report

    Hello Experts !!!!
    My Client requires a Stock Age analysis report .
    It is a trading company of steel .
    my client wants to know that how old my stock is in warehouse or how much is 30 days old ,60 days old ,90 days old.
    Below is my query
    SELECT  T0.ITEMCODE , T0.DSCRIPTION,T2.U_WT,SUM(T0.QUANTITY)AS QUANTITY,T1.DOCDATE,
    CASE WHEN Datediff(day, T1.DOCDATE,GETDATE())<30 THEN SUM(T0.QUANTITY) END '<30 Days(Qty)',
    CASE WHEN Datediff(day, T1.DOCDATE,GETDATE())<30 THEN SUM(T0.QUANTITY)*T2.U_WT END '<30 Days(MT)',
    CASE WHEN Datediff(day, T1.DOCDATE,GETDATE())>30 AND Datediff(day, T1.DOCDATE,GETDATE())<60 THEN  SUM(T0.QUANTITY) END '<60 Days(Qty)',
    CASE WHEN Datediff(day, T1.DOCDATE,GETDATE())>30 AND Datediff(day, T1.DOCDATE,GETDATE())<60 THEN  SUM(T0.QUANTITY)*T2.U_WT END '<60 Days(MT)',
    CASE WHEN Datediff(day, T1.DOCDATE,GETDATE())>60 AND Datediff(day, T1.DOCDATE,GETDATE())<90 THEN  SUM(T0.QUANTITY) END '<90 Days(Qty)',
    CASE WHEN Datediff(day, T1.DOCDATE,GETDATE())>60 AND Datediff(day, T1.DOCDATE,GETDATE())<90 THEN  SUM(T0.QUANTITY)*T2.U_WT END '<90 Days(MT)',
    CASE WHEN Datediff(day, T1.DOCDATE,GETDATE())>90 AND Datediff(day, T1.DOCDATE,GETDATE())<120 THEN  SUM(T0.QUANTITY) END '<120 Days(Qty)',
    CASE WHEN Datediff(day, T1.DOCDATE,GETDATE())>90 AND Datediff(day, T1.DOCDATE,GETDATE())<120 THEN  SUM(T0.QUANTITY) END '<120 Days(MT)'
    FROM PDN1 T0 INNER JOIN OPDN T1 ON T0.DOCENTRY =T1.DOCENTRY INNER JOIN OITM T2 ON T0.ITEMCODE=T2.ITEMCODE
    GROUP BY T0.ITEMCODE , T0.DSCRIPTION,T1.DOCDATE,T2.U_WT
    but problem is that i am able to track when goods were arrived in warehouse .But i am enable to track how much went out warehouse.
    " MY CLIENT WANTS THE REPORT GOODS RECEIPT NOTE WISE REPORT.  " that how much qty has been delivered against a particular Goods receipt note. But we havn't provided any reference to delivery of goods receipt note .
    Experts Thanx in advance.
    Krishna Vamsi

    Hello Krishna Vamsi,
    Try this:
    SELECT T1.ITEMCODE,T1.ItemName,T1.U_WT,SUM(IsNull(T0.INQty,0)-IsNull(T0.OutQty,0)) AS QUANTITY,T0.DOCDATE,
    CASE WHEN Datediff(dd, T0.DOCDATE,GETDATE())<30 THEN SUM(IsNull(T0.INQty,0)-IsNull(T0.OutQty,0)) END '<30 Days(Qty)',
    CASE WHEN Datediff(dd, T0.DOCDATE,GETDATE())<30 THEN SUM(IsNull(T0.INQty,0)-IsNull(T0.OutQty,0))*T1.U_WT END '<30 Days(MT)',
    CASE WHEN Datediff(dd, T0.DOCDATE,GETDATE())>30 AND Datediff(dd, T0.DOCDATE,GETDATE())<60 THEN SUM(IsNull(T0.INQty,0)-IsNull(T0.OutQty,0)) END '<60 Days(Qty)',
    CASE WHEN Datediff(dd, T0.DOCDATE,GETDATE())>30 AND Datediff(dd, T0.DOCDATE,GETDATE())<60 THEN SUM(IsNull(T0.INQty,0)-IsNull(T0.OutQty,0))*T1.U_WT END '<60 Days(MT)',
    CASE WHEN Datediff(dd, T0.DOCDATE,GETDATE())>60 AND Datediff(dd, T0.DOCDATE,GETDATE())<90 THEN SUM(IsNull(T0.INQty,0)-IsNull(T0.OutQty,0)) END '<90 Days(Qty)',
    CASE WHEN Datediff(dd, T0.DOCDATE,GETDATE())>60 AND Datediff(dd, T0.DOCDATE,GETDATE())<90 THEN SUM(IsNull(T0.INQty,0)-IsNull(T0.OutQty,0))*T1.U_WT END '<90 Days(MT)',
    CASE WHEN Datediff(dd, T0.DOCDATE,GETDATE())>90 AND Datediff(dd, T0.DOCDATE,GETDATE())<120 THEN SUM(IsNull(T0.INQty,0)-IsNull(T0.OutQty,0)) END '<120 Days(Qty)',
    CASE WHEN Datediff(dd, T0.DOCDATE,GETDATE())>90 AND Datediff(dd, T0.DOCDATE,GETDATE())<120 THEN SUM(IsNull(T0.INQty,0)-IsNull(T0.OutQty,0)) END '<120 Days(MT)'
    FROM dbo.OINM T0
    INNER JOIN dbo.OITM T1 ON T0.ITEMCODE=T1.ITEMCODE
    GROUP BY T1.ITEMCODE,T1.ItemName,T0.DOCDATE,T1.U_WT
    Thanks,
    Gordon

  • Stock statement query--- help

    Have any one got the stock statement query report in the folowing format....
    1.ItemCode
    2.Item Description
    3.Item Price
    4.Opening
    5.Receipts
    6.Issues
    7.Closing
    8. Value
    The selection criteria are:
    3.Posting Date
    from wh
    to wh
    help me in making stock statement query
    regards,
    Vignesh

    Hi
    Check This
    select w0.itemcode, i0.docdate, w0.whscode, w0.onhand - isnull (sum (i0.inqty - i0.outqty), 0), 0
    from oitw w0 left outer join oinm i0 on w0.itemcode = i0.itemcode and w0.whscode = i0.warehouse
    where i0.docduedate >= [%0]
    group by w0.itemcode, w0.whscode, w0.onhand, i0.docdate
    having w0.itemcode = [%1] and w0.onhand - isnull (sum (i0.inqty - i0.outqty), 0) >= 0
    union
    select w0.itemcode, i0.docdate, w0.whscode, 0, -(w0.onhand - isnull (sum (i0.inqty - i0.outqty), 0))
    from oitw w0 left outer join oinm i0 on w0.itemcode = i0.itemcode and w0.whscode = i0.warehouse
    where i0.docduedate >= [%0]
    group by w0.itemcode, w0.whscode, w0.onhand, i0.docdate
    having w0.itemcode = [%1] and w0.onhand - isnull (sum (i0.inqty - i0.outqty), 0) < 0
    or
    SELECT T0.ITEMCODE, T0.DSCRIPTION,T0.OPENQTY, T0.OPENVALUE, T0.INQTY, T0.INQTY*T0.PRICE AS 'RCPT VAL', T0.OUTQTY,T0.OUTQTY*T0.PRICE AS 'ISS. VAL', T0.INQTY-T0.OUTQTY AS 'CLOSING STOCK QTY',((T0.INQTY-T0.OUTQTY)*(T0.CALCPRICE)) AS 'CLOSING STOCK VAL' FROM OINM T0 WHERE T0.DOCDATE >=[%0] AND T0.DOCDATE <=[%1]
    Thanks
    Kevin
    Edited by: Kevin Shah on Oct 23, 2010 5:37 PM

  • Batch transaction stock aging report

    Hi Experts,
    Can you some one help me with query which give stock aging report base on Batch wise transactions (IBT1).
    Item Code,    Item description  Batch#(Qty which are >0),  Batch Qty,  Stock "IN" creation Date,
    Thanks for your help.
    Regards,
    Suresh

    Dear parneeth,
    As requested please try this Query to fulfill your requirement.
    SELECT T0.docnum,
    T2.BatchNum,T2.ItemCode,T2.Quantity,
    T2.ItemName,T0.CardName as Supplier,
    T2.SuppSerial,T2.IntrSerial,T2.ExpDate,T2.PrdDate,T2.InDate,T2.Located,
    convert(varchar(8000),T2.Notes)
    FROM OPDN T0 INNER JOIN PDN1 T1 ON T0.DocEntry=T1.DocEntry
    inner join
    OIBT T2 on T1.ItemCode = t2.ItemCode and T0.objtype=T2.basetype and T2.baseentry=T1.Docentry
    inner join
    oitm T5 on T1.Itemcode=T5.Itemcode
    WHERE
    T2.quantity>0
    group by T0.docnum,T2.BatchNum,T2.ItemCode,T2.Quantity,
    T2.ItemName,T0.CardName,
    T2.SuppSerial,T2.IntrSerial,T2.ExpDate,T2.PrdDate,T2.InDate,T2.Located,
    convert(varchar(8000),T2.Notes),T1.Linetotal,T1.Quantity
    REGARDS
    MANGESH PAGDHARE.
    Edited by: MANGESH  PAGDHARE on Jan 9, 2012 6:31 PM

  • Stock Ageing Report in BIW

    Hi Friends,
    We have a requirement to create stock ageing report in BIW.
    If i create the report based on the material documnet date which is coming in 0IC_C03 cube,i will get correct ageing as far as manufacturing plant is concerned.
    But we have defined the sales depots also as plants in our R/3,so if i take the material doc date from the ic_c03 cube,my ageing will be wrong for my sales depots because here it will consider the documnet(material) received into the depot date and will not consider the material manufacture(updated into system by 101 movement).
    So in my depots,i will get the wrong ageing based on the material received date and not the manuf date.
    So how do i go about this issue.
    Awaiting your inputs..
    Thanks & Regards
    Sudhakar M

    Hi
    You can look for some standard date fileds in MM03 transaction under Production for material manufacturing data and map this field in BW to fetch data and use the field in your query for ageing
    Assign points if useful
    Regards
    N Ganesh

  • Stock Aging report Whwise & IT group wise

    Hi All,
    I want query for stock aging report Warehouse wise and Itemgroup wise in 0-45, 46-90 and greater then 90 days with value,
    Thanks in advance.
    Thanks & regards,

    Hi,
    Check this...
    SELECT distinct T0.ITEMCODE, T1.itemName,T0.ONHAND as 'Total Qty', T1.ManBtchNum,T1.ManSerNum,
    CASE WHEN Datediff (day,T1.LastPurDat, Getdate ()) <45 THEN T0.ONHAND END '<45 Days (Qty)',
    CASE WHEN Datediff (day,T1.LastPurDat, Getdate ()) <45 THEN T0.ONHAND * T0.Avgprice END  '<45 Days (Value)',
    CASE WHEN Datediff (day,T1.LastPurDat, Getdate ())>45 AND Datediff (day,T1.LastPurDat, Getdate ()) <90 THEN T0.ONHAND END '<45 T0 90 Days (Qty)',
    CASE WHEN Datediff (day,T1.LastPurDat, Getdate ())>45 AND Datediff (day,T1.LastPurDat, Getdate ()) <90 THEN T0.ONHAND * T0.Avgprice END  '<45 T0 90 Days (Value)',
    CASE WHEN Datediff (day,T1.LastPurDat, Getdate ()) >90 THEN T0.ONHAND END '>90 Days (Qty)',
    CASE WHEN Datediff (day,T1.LastPurDat, Getdate ())>90 THEN T0.ONHAND * T0.Avgprice END  '>90 Days (Value)'
    FROM OITW T0 INNER JOIN OITM T1 ON T0.ITEMCODE = T1.ITEMCODE
    INNER JOIN OITB T2 ON T1.ITMSGRPCOD=T2.ITMSGRPCOD
    left join ibt1 t3 on t3.itemcode = t0.whscode
    WHERE T0.ONHAND >0 AND T0.WhsCode = '[%0]' AND T2.ItmsGrpNam ='[%1]'
    Thanks
    Sachin

  • Urgent: Regarding Stock Ageing report

    hi,
    i want to have stock ageing report in which i want to have the deatils :-
    This is the material which is present in the palnt from dis <b>date</b> and further details of it consumption. plzz tell the <b>tcode</b> for it.
    plzz help me out as it is most urgent to me..
    regards,
    ric.s
    Message was edited by:
            ric .s

    Hi
    The report MC.9 shows Last movement date/Last receipt date / Last issue date.
    In period to analyze give appropriate date range
    Or
    check  MSEG & MARD table to get details about material documents with date
    Vishal...

  • Standard Report for stock Aging

    Hello all,
    can anyone plz let us know that is there any standard report in SAP for stock aging? actually i have to see the materials quantity whose 311 movement not done after 321 and also from how many days it is pending.
    Kindly help and tell how can i find those materials quantity, while user also do 311 for partial quantity?
    Regards.

    Hi  @ABAP@
    Check the followings...
    MB24 - Reservations for Material
    MB25 - Reservations for Account Assignment
    MB51 - Material Document List
    MB52 - List of Warehouse Stocks on Hand MB53 - Display Plant Stock Availability
    MB54 - Consignment Stocks
    MB56 - Analyze Batch Where-Used List
    MB57 - Build Up Batch Where-Used List
    MB58 - Consgmt and Ret. Packag. at Customer
    MB59 - Material Document List
    MB5B - Stocks for Posting Date
    MB5C - Pick-Up List
    MB5L - List of Stock Values: Balances
    MB5M - ShL.exp/prod.date
    MB5S - Display List of GR/IR Balances
    MB5W - List of Stock Values
    MB9A - Analyze Archived Material Documents
    MBAL - Material Documents: Read Archive
    MBGR - Display Material Documents by Movement Reason
    MBSI - Find Inventory Sampling
    MBSM - Display Cancelled Material Documents
    MMBE - Stock Overview
    MD07 - Current Material Overview
    MR51 - Material Line Items
    MRKO - Settle Consignment/Pipeline Liabilities
    MB5T - Stock in transit CC

  • Stock ageing report

    Hi all,
            I am developing stock ageing report i would not able to find Below fields in existing cube, kindly guide me how i can get those fields data in BI. whether i can create generic extraction or ? please give yr suggestion.
    Fields:
    vendor sub range
    consignment no
    Return flag(Returnable)
    And also GR data and GR qty already data availble how to find last GR date based on user input.Please sugges me.
    Last GR date  
    Last GR qty
    Thanks & Regards,
    R. Saravanan

    Try extractor 2LIS_03_BF. Or table MSEG.

  • Facing Issue with Stock Ageing report

    In Blocked Stock Ageing report Output, I am facing following issues
    1. Stock is correct but once we include the "Reason For Movement" then the aging is getting wrong  and in some cases value is coming Negative.
    2. In some cases "Reason For Movement" is coming in ‘#’, but this is a mandatory field. Hence cannot be blank.
    Note:
    1. Overall stock is coming correct.
    2. Reason Movement chat. is in free char
    3. Report is based 0IC_C03.

    Hi Nadeem,
    Reason for Movement is loading from  what attribute?  check in RSRV for that attribute.
    RSRV-->All Elementary Tests ->Master Data ->Compare Size of P-, Q- with X- and Y- Tables respectively .
    If it has any error then  correct that error in RSRV. It  will solve your problem.
    Regards,
    Rajesh

  • How to Calculate the Stock aging report in BW

    Dear All,
    Please let me know the process to calculating the Stock Aging report in BW.
    And what are date field need to be consider and what are customer exits used to populated different agings in Stock like 0-30 days etc.
    Thanks
    Regards,
    Sai

    Hello,
    I would be very happy if you send me some sample code to implement this in User exits.
    I mean which ABAP statements are useful in this case. I think we need to implement the following logic for User Exit variable.
    1. At run time, retieve the SSN data from BW dabase
    2. Convert the first 5 digets into *****
    3. Make it available to report in BEX.
    Thanks
    VNM

  • Stock ageing report with batch Management active

    Hi Experts,
    My client wants a Stock ageing report and batch management is active
    According to my client, Inventory ageing report should show stock quantities and stock value as follows,
    1. Below one year
    2. Between one and two years
    3. Above two years
    What are the table and fields to be considered for this report.
    Thanks
    NDS

    What steps do you mean? taking an ABAP course and doing it yourself, or stepping to an ABAPer and let him know what he shall do?
    you asked for a stock report, not for a movement report.
    If I go into my warehouse and looking at all the stuff sitting there and want a report that should tell me how old this stuff is, then i am not intrested if there was a goods receipt movement.
    However I would like to know the last movement date. In this case you have to look into table S032 or into the movements MSEG (with MKPF as header table)

  • Stock ageing report in inventory management

    Hi,
    iam working in stock ageing report my requirment is i for developing stock ageing i have chars for plant and material ,and other 2 chars but i dont have cal day i have only creation on date means posting date only availble .my current layout is :
    Plant
    Plant   Material     0 u2013 30 Days  30 u2013 60 Days 60 u2013 90 Days  90 u2013 180 Days   > 180 Days     
    Expired     Blocked     Restricted
    above is mentioned is my current layout.
    but now user will be want  they want see 0-30 below month also mean july- august same as 30-60 also.
    Report to display always 2 months data at a time. Previous month closing and current month ongoing                                        
    this is my requirement please hpe help on this.
    thanks in advance.
    Deva

    As you already noticed not only the input (GR) but the output (GI) is also important.
    The date of the GR is only one thing, but after that you received the goods in your SLoc you cannot make difference between stocks received at different times.
    As your stock is not distinguished in the system as per the GR date you cannot say that which sub-stock has been consumed during GI.
    So, without batch management you cannot achieve your goal in standard system.
    Of course, physically you can realize your idea by putting labels on different batches - this would mean batch management physically and not in SAP.
    If you use warehouse management you can use a workaround: the GR date is stored in the quants and this makes possible to track the age of the stock without batch management. Please check:
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/c6/f83b5e4afa11d182b90000e829fbfe/frameset.htm
    Regards,
    Csaba

Maybe you are looking for

  • How do I use an used iphone with an exsisting AT, How do I use an used iphone with an exsisting AT

    How do I set up an used iphone to an exsisting AT&T account

  • How do I create a hyperlink to a specific section of a flash website?

    Ok, I have no experience coding in flash, I just want to create links to specific parts of a flash website (website that were created by other people, not that I am building). In other words, I just want to create the hyperlink that will open a certa

  • IMPDP commit=y parameter?

    Hi All, The commit=y in old exp has helped me a lot when I have limited disk space allotted to undo TS. I can not believe it was deprecated in EXPDP? Is this true? I am going to load 100Gb size of dump and i only have limited disk space like 120G. Ho

  • How can I Convert HD video to SD DVD

    Final cut Studio is a new tool for me. I've make a 3 minutes video montage in HD 720p and when I try to downconvert in SD M2V, the footage look very bad with a lot of aliasing and pixelisation. I've try many setup with the best quality in Compressor

  • Audit Tool for tracking

    Hi, Is there any audit tool which can provide us with the details fo the transaction code being used by a particular user along with the data being accessed / activity being performed by using the said t-code. Kindly let me know as soon as possible.