Closing Stock = Opening + Purchases - Sales

Hi,
I want the closing stock account in assets stock to maintain the reflections from purchases and sales........just like customers reconciliation to accounts rec, i need this account to  mmaintain purchases and sales value, so that i can get the accurate stock at the end of the year.... how is it possible ?? If there is no solution for the said equation, whats the alternative companies were using in ??
Thank you..
Suresh

ggg

Similar Messages

  • Auto closing of open Purchase Orders

    hai all
    My requirement is to find all the Auto closing of open Purchase Orders which donu2019t have any more use in business transaction
    using BAPI.pls send me one sample report
    regards
    Asish.

    Hi Lebogang
    Go to the open items list under sales or purchasing reports, select PO's on the top right and then highlight all the PO's you want to close. Then right click on the grey area on top of the report and select close. This will close all at once.
    Kind regards
    Peter Juby

  • Error while closing the open purchase order for MRP run

    HI expets,
                     We are facing issue while closing the old purchase order(18.12.2007) for MRP run, if we are clicking delivery completed for the particular line item ,system is showing the error NET PRICE MUST BE GREATER THAN ZEROthough we have made GR and IR aganist the line item an value is also showing in the purchase order history tab, but in the condition tab there is no value showing for the particular line item .Kindly suggest the way forward.
    regards
    Karthick sundaram

    one thing for sure, you cannot proceed without maintaining proper conditions in the PO.
    Why they are not there or not anymore there is probably caused by customizing or vendor master data changes.

  • MB5B Report table for Open and Closing stock on date wise

    Hi Frds,
    I am trying get values of Open and Closing stock on date wise form the Table MARD and MBEW -Material Valuation but it does not match with MB5B reports,
    Could anyone suggest correct table to fetch the values Open and Closing stock on date wise for MB5B reports.
    Thanks
    Mohan M

    Hi,
    Please check the below links...
    Query for Opening And  Closing Stock
    Inventory Opening and Closing Stock
    open stock and closing stock
    Kuber

  • Opening balance and closing stock balance

    Hi,
    What is the way to calculate opening balance and closing stock balance.
    Thanks
    krishna

    have a look Calculate Opening and Closing Stock
    Opening and closing balance
    Opening Stock and Closing Stock fields and Calculation

  • Opening and Closing Stock Calculation In SAP BPC 10.0 NW

    Hello Experts,
    Need your guidance on this calculation.
    BI Cube: Receipts and Issues only Available on day basis
    BPC Report / Cube Context
    Product = Product1, Product2,
    Account = receipts, Issues, Opening Stock, Closing stock,
    Flow = Other
    Audittrail = Input
    UOM = QTY
    rptcurrency = LC
    Category = Actual
    TIme = All Periods (Monthly)
    Plant = Plant1, Plant2, Plant3, Plant4
                                       In the Cube I don't Have Opening Stock, without Which I cannot calculate Closing stock.
    Scenario: If I Enter Manually Opening stock for all products at some starting point, say In Year 2008 Jan.  How To take this closing stock of this month automatically to next month opening stock and So on and so forth to following Periods? Is it possible through "Carry Forward Business rule" in this case, as Closing stock is a calculated value using Member dimension Formula. I am having receipts and issues in Account dimension.
    Dimension Formula used:    Closing Stock = Opening Stock+Receipts- Issues.
    Please find attachment of the report screen shot.
    Thanking you
    Praveen

    Hello Vadim,
    1. The Cube storage Type is "Periodic".
    2. Acctype of the account dimension is "AST"
    3. Time Dimension Is based on Month.
    ID
    Description
    RELEVANT
    Base Period
    CLOSED
    Level
    Month Number
    Period
    TIMEID
    Year
    Calendar
    2006.01
    2006 Apr
    1
    MONTH
    1
    APR
    20060100
    2006
    2006.Q1
    2006.02
    2006 May
    2
    MONTH
    2
    MAY
    20060200
    2006
    2006.Q1
    2006.03
    2006 June
    3
    MONTH
    3
    JUN
    20060300
    2006
    2006.Q1
    2006.04
    2006 July
    4
    MONTH
    4
    JUL
    20060400
    2006
    2006.Q2
    2006.05
    2006 August
    5
    MONTH
    5
    AUG
    20060500
    2006
    2006.Q2
    2006.06
    2006 September
    6
    MONTH
    6
    SEP
    20060600
    2006
    2006.Q2
    2006.07
    2006 October
    7
    MONTH
    7
    OCT
    20060700
    2006
    2006.Q3
    2006.08
    2006 November
    8
    MONTH
    8
    NOV
    20060800
    2006
    2006.Q3
    2006.09
    2006 December
    9
    MONTH
    9
    DEC
    20060900
    2006
    2006.Q3
    2006.10
    2007 Jan
    10
    MONTH
    10
    JAN
    20061000
    2006
    2006.Q4
    2006.11
    2007 Feb
    11
    MONTH
    11
    FEB
    20061100
    2006
    2006.Q4
    2006.12
    2007 Mar
    12
    MONTH
    12
    MAR
    20061200
    2006
    2006.Q4
    2006.Q1
    2006 Q1
    3
    QUARTER
    3
    Q1
    2006
    2006.TOTAL
    2006.Q2
    2006 Q2
    6
    QUARTER
    6
    Q2
    2006
    2006.TOTAL
    2006.Q3
    2006 Q3
    9
    QUARTER
    9
    Q3
    2006
    2006.TOTAL
    2006.Q4
    2006 Q4
    12
    QUARTER
    12
    Q4
    2006
    2006.TOTAL
    2006.TOTAL
    2006
    12
    YEAR
    12
    TOTAL
    2006
    Thank You
    Praveen

  • Z table for Closing Stock

    Hi ,
    My  requirement is to make Z table for closing stock.
    As ours is a pharma firm  and we have implemented SAP in Aug 2008.
    Now for  closing stk  we are using S033 and MSEG table to get opening stk
    SELECT SUM( mzubb ) SUM( magbb ) INTO (w_dr_menge , w_cr_menge)
            FROM s033
           WHERE sptag < so_fkdat-low
             AND werks = werks
             AND matnr = matnr.
      w_opening_balance = w_dr_menge - w_cr_menge.
    and for closing stk = opening stk - sale + receive.
    Now the problem is  when we want to retrieve data for closing stk for last month ,it is checking all the records since Aug 2008  for opening stk and it is taking too much time to retrieve data.
    Can anyone plz suggest any alternative for thsi problem.
    I will really appriciate your help.
    Regards,
    Archana

    Hi
    done this before. for sure you will experience an performance problem in your current setup. what we did is we create a program that calculates the ending inventory of the month then beginning inventory of the following month we are executing this in every end of the month. In that case when we need to access the previous month the ztable must be use. make sure that your program can do rerun of the ending and beginning of stock because there are chances of previous posting of reversals.
    Thanks,
    Best regards,
    Etrafanob

  • Report including open purchase order quantity for one storage location

    Hello gurus,
    I am looking for a report giving me the total/available stock and the open purchase order quantity for all materials stored in a certain storage location.
    I.e. like this:
    Plant 0001, storage loc. 01
    Material        stock        open purchase order quantity
    100000        200 pcs.   50pcs.
    Is there such a report in SAP standard?
    Thanks
    Alicia

    hI
    U want the report like this ,
    MAterial stock availablein storage location and with Open PO quantity for the same material.???
    This report u can get in 2 different transaction . the n u can combine and create one custom transaction .
    One is for materil stock in storage location is MB52 or MB5B
    THen ME2N for open PO quantity for that material.

  • Close open Purchase order

    Dear Experts,
      My client has change the release procedure, but they have not closed the open Purchase orders, now we are trying to close the open PO system is not allowing us to close the Open Po , complete delivery indicator is in grey mode , Can any body help  me How i wll i close the Open Purchase orders
    Thanks
    Hirwani

    Hi Hirwani,
    I have seen this a few times before.
    I found other customer has  similar problem as the release strategy has changed           
    after creation of the SES please review the  explanation from developer           
    :(whose release code is 03 )                                                                               
    When you try to revoke the acceptance of the service entry sheets                 
    in ML81N or ML81, the 'Enter release code' pop  up window appears, but            
    entering the code that is determined via the menu path Goto -> Entry              
    Sheet -> Release Strategy (which is the 03), the SES remains the same.            
    Nothing changes. The status does not vary and no error or warning                 
    message is issued.                                                                               
    Checking the customizing for the release strategy, the release code               
    03 should have never been assigned to the SES 800024272 as the values             
    for the relevant characteristics were not included under that code.               
    I do not know how it was managed to accept the SES.                                                                               
    Now, when you try to revoke it, it seems that no release                          
    strategy can be determined, not even including the values RCARESANO               
    and 012 between the valid values for the characteristics of the release           
    code 03 (RCARESANO as valid value for SUPERVISOR_SERVICIOS                        
    (CESSR-ERNAM)and 012 as valid value for GRUPO_COMPRAS (CESSR-EKGRP)).                                                                               
    The only Possibility is to change now the SES so that the release                 
    strategy can be re-determined by the system.This is the Only possible             
    way that the system can  redetermine the Release Strategy , but it will           
    not be possible to do so as the SES is already accepted with the Old              
    strategy and it does not admit any further changes.                               
    To be able to change it you would need to revoke the SES first,                   
    but this Will also not be possible as the Release Strategy was changed            
    and the system still applies the old rules for determining the Release.           
    Solution to our Problem                                                                               
    The Only way to revoke the SES is to Restore back the Old Strategy that           
    was prior to 03 in the customizing.So now what will happen is that by             
    applying the Old Rules the System will be able to revoke the SES that#s           
    using the Old one. Once the necessary SES are revoked then go back to             
    customizing and apply the new strategy as it was did now, and                     
    Change the SES and save , the new value of the Release Strategy will get          
    updated in the table ESSR and the field frgsx will now have 03.                                                                               
    Problems associated if the Release strategy is changed                                                                               
    Actually the release strategy is not supposed to be changed when there     
    are some documents in the System that uses it and even if you change the   
    Strategy the Old records will not get AUTOMATICALLY UPDATED by the        
    system.The Release Strategy routine has to run again to update the         
    values. This is Possible by changing the document SES ,                    
    This change will happen only if the SES is not accepted and if its         
    accepted then you need to revoke and to revoke you need to restore the     
    old strategy , revoke and then change the SES , and have to go back to     
    customizing and Start using the New strategy from now on by doing so the   
    Routine will update the old record with the new strategy.                 
    You may want to use CEKKO-BADAT(Requisition Date) or any other
    structure in CEBAN or CEKKO and create a new release strategy    
    to differentiate the old release strategy.
    Alternatively using the corresponding user exit to redermine the BAdI might help but my first suggestion would be the best.
    Purchase requisition                                                 
                           M06E0002 - for item wise release                
                           M06E0005 - for overall release                                                                               
    External purchasing document                                         
                           M06E0004
    Hope this is of help to you,
    Kind Regards,
    Matthew

  • Closing Stock For Each Period in Inventory Infocube

    Hello Guru's,
    Can we have closing stock of each material  for entire period in Invnetory Infocube ? or through any logic or transformation routine can we create this keyfigure  at infocube level ?
    I know that to get Closing Stock  ( Opening Stock + Goods Receipt - Goods Issue), we have to have Opening Stock as well for each month. in 0IC_C03 infocube, we only have Goods Receipt Qty and Goods Issue Qty keyfigures. We don't have Opening Stock and Closing Stock keyfigures as those are calculation which works during run time of query but still we want to have this information at Infocube Level.
    Do please let me know your thought as i appreciate your help in advance.
    Regards,
    Komik Shah

    hi,
    I will check that t code.
    thanks and regards,
    Devina

  • Standard reports for materials begning,purchase,sale,closing stock

    Dear Experts,
    Is there any standard report for
    Opening stock
    Purchase
    Sale
    Closing stock
    in terms of QTY and value for all materials.
    regards
    RR

    Hi
    you can use MB5B (with Non hierarchial Display) and MB5L
    br, Ajay M

  • Opening and closing stock with sales order and with out sales order

    hello,
    any body please help me my client want to check opening stock and and closing stock in areport.
    material contains batch and some material with sales order and some are with out sales order. my client is asking this in a single layout. please tell me isthere any teport or bapi or function module to get this report.
    this is very uregent. and layout is requesting like opening stock, production stock, sales stock and closing stock.
    please guide me to get this report.
    Thanks & Regads
    Bhakta

    Transaction MB5B
    For sales order related use specila stock as E and use radio button indicator in stock type
    For stock w/o sales order, use special stock indiactor as "space' and stock type valuated stock.
    to get a perticular month,opening stock/closing stock enter the start date/end date as month start and end date.
    See the o/p which will give the stock as required by you

  • Inventory opening and closing stock with value report

    Hi All,
    Is it possible to get details of both opening and closing stock with value of each items of last financial year (2009-10) in inventory report?
    Mizan

    Hi..
    you can  try this query
    Declare @FromDate Datetime
    Declare @ToDate Datetime
    set @FromDate =
        (Select min(S0.Docdate) from OINM S0 where S0.Docdate >='[%0]')
    set @ToDate =
        (Select max(S1.Docdate) from OINM S1 where S1.Docdate <='[%1]')
    select * from
        SELECT T0.itemcode,
        min(T0.Dscription) as 'Item Description',
        min(B1.ItmsGrpNam) as 'Item Group', W1.Whscode, C1.Location,
        (isnull((
            Select sum(isnull(inqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode
            and O1.Warehouse=W1.Whscode
            and O1.docdate<@FromDate ),0)-
        isnull((
            Select sum(isnull(outqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode
            and O1.Warehouse=W1.Whscode
            and O1.docdate<@FromDate),0)
        ) as [Opening Stock],
        isnull((
            Select sum(isnull(inqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode
            and O1.Warehouse=W1.Whscode
            and O1.docdate>=@FromDate
            and O1.docdate<=@ToDate and O1.inqty>0
            and O1.transtype in (20,18)),0
        ) as [Purchase Quantity],
        isnull((
            Select sum(isnull(outqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
            and O1.docdate>=@FromDate and O1.docdate<=@ToDate
            and O1.outqty>0 and O1.transtype in (21,19)),0
        ) as [Purchase Return Quantity],
       isnull((
            Select sum(isnull(outqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
            and O1.docdate>=@FromDate and O1.docdate<=@ToDate and O1.outqty>0
            and O1.transtype in (13,15)),0
        ) as [sale Quatity],
        (isnull
            Select sum(isnull(inqty,0))
            from OINM O1
            where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
            and O1.docdate<=@ToDate),0
            isnull((
                Select sum(isnull(outqty,0))
                from OINM O1
                where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode
                and O1.docdate<=@ToDate),0)
        ) as [Closing Stock]
        FROM OINM T0
        INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode
        INNER JOIN OITW T2 ON T1.ItemCode = T2.ItemCode
        INNER JOIN OITB B1 ON T1.ItmsGrpCod=B1.ItmsGrpCod
        INNER JOIN OWHS W1 ON T2.WhsCode = W1.WhsCode
        INNER JOIN OLCT C1 ON W1.Location=C1.Code
        Group by T1.itemcode, T0.Itemcode, W1.WhsCode, C1.Location
    ) a
    where (a.[Opening Stock]
            +a.[Purchase Quantity]
            + a.[Purchase Return Quantity]
            +a.[sale Quatity]+a.[Closing Stock]
           ) !=0
    Regards,
    Bhavank

  • Opening and closing stock figure

    Hi Experts,
    How can i get the opening stock figure and closing stock figure for one month in SAP Buiness one 8.8?

    Hi,
    I found this on the forum; try this:
    DECLARE @FromDate DateTime
    DECLARE @ToDate DateTime
    /* SELECT T0.DocDate FROM OINM T0 where T0.DocDate >=[%0] */
    SET @FromDate = [%0]
    /* SELECT T0.DocDate FROM OINM T0 where T0.DocDate <=[%0] */
    SET @ToDate = [%1]
    Select X.DocDate, X.ItemCode,
    ((Select isnull(sum(InQty-OutQty),'0')From OINM T0 Where T0.ItemCode=X.ItemCode And
    (T0.DataSource='I' or T0.DataSource='N') And T0.DocDate < X.DocDate)) As 'OpeningStock',
    IsNull(max(X.price),0) as 'OpeningUnitPrice',
    ((Select isnull(sum(InQty-OutQty),'0')From OINM T0 Where T0.ItemCode=X.ItemCode And
    (T0.DataSource='I' or T0.DataSource='N') And T0.DocDate < X.DocDate)) *
    IsNull(max(X.price),0) AS 'OPENING VALUE',
    IsNull(sum(X.InQty),0) As 'Received Qty',
    IsNull(max(X.price),0) as 'Purchase  Unit Price',
    IsNull(sum(X.InQty),0) *
    IsNull(max(X.price),0) as 'PURCHASE VALUE',
    IsNull(sum(X.OutQty),0) As 'Consumed Qty',
    IsNull(max(X.price),0) as 'Sale Unit Price',
    IsNull(sum(X.OutQty),0) *
    IsNull(max(X.price),0) AS 'SALE VALUE',
    ((Select isnull(sum(InQty-OutQty),'0') From OINM T0 Where T0.ItemCode=X.ItemCode And
    (T0.DataSource='I' or T0.DataSource='N') And T0.DocDate < X.DocDate)+
    (Select isNULL(sum(T0.InQty),'0') From OINM T0 Where T0.ItemCode=X.ItemCode And T0.DocDate<=X.DocDate And
    (T0.DataSource='I' or T0.DataSource='N') And T0.DocDate = X.DocDate)-
    (Select isNULL(sum(T0.OutQty),'0') From OINM T0 Where T0.ItemCode=X.ItemCode And T0.DocDate<=X.DocDate And
    (T0.DataSource='I' or T0.DataSource='N') And T0.DocDate = X.DocDate)) As 'ClosingStock',
    ((((Select isnull(sum(InQty-OutQty),'0')From OINM T0 Where T0.ItemCode=X.ItemCode And
    (T0.DataSource='I' or T0.DataSource='N') And T0.DocDate < X.DocDate)) *
    IsNull(max(X.price),0)) + (IsNull(sum(X.InQty),0) * IsNull(max(X.price),0)) - (IsNull(sum(X.OutQty),0) *
    IsNull(max(X.price),0))) as 'Final Balance Value'
    FROM OINM X Where ItemCode=X.ItemCode And
    (X.DataSource='I' or X.DataSource='N')
    Group by X.DocDate,X.ItemCode
    Order by X.DocDate
    Hope this helps.
    Thanks,
    Joseph

  • Sales and Closing Stock By Item Group

    Dear all,
    Can anybody give me modified query for the following code. I need Item Group wise sales & Stock.
    As of this query data values are not getting perfect,opening stock and  Closing stock values are not getting prefect.
    Some items are not getting,which item code is starting form 5%.
    *Start of the Query *
    select * from ( SELECT T0.Itemcode, min(T0.Dscription) as 'Item Description', W1.Whscode,
    (isnull((Select sum(isnull(inqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&lt;@FromDate and O1.transtype in (59,20,18,16,14,67,-2)),0) - isnull((Select sum(isnull(outqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&lt;@FromDate and O1.transtype in (21,19,60,15,67,-2,13)),0)) as [Opening Stock],
    (isnull((Select sum(isnull(inqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.inqty&gt;0 and o1.Price &gt;0 and O1.transtype in (20,18)),0))-(isnull((Select sum(isnull(outqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.outqty&gt;0 and o1.Price &gt;0 and O1.transtype in (19)),0)) as [Purchase Quantity],
    (isnull((Select sum(isnull(inqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.inqty&gt;0 and o1.Price = 0 and O1.transtype in (20,18)),0))-(isnull((Select sum(isnull(outqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.outqty&gt;0 and o1.Price = 0 and O1.transtype in (19)),0)) as [Purchase FOC Qty],
    ( isnull((Select sum(isnull(outqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.outqty&gt;0 and O1.Price&gt;0 and O1.transtype in (13,15)),0)) as [Sale Qty],
    (isnull((Select sum(isnull(inqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.inqty&gt;0 and O1.Price&gt;0 and O1.transtype in (14,16)),0))as [Return Qty],
    ( isnull((Select sum(isnull(outqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.outqty&gt;0 and O1.Price&gt;0 and O1.transtype in (13,15)),0))- (isnull((Select sum(isnull(inqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.inqty&gt;0 and O1.Price&gt;0 and O1.transtype in (14,16)),0))as [NetSale Qty],
    (isnull((Select sum(isnull(outqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.outqty&gt;0 and O1.Price=0 and O1.transtype in (13,15)),0))-(isnull((Select sum(isnull(inqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.inqty&gt;0 and O1.Price=0 and O1.transtype in (14,16)),0))as [FOC Quantity],
    (isnull((Select sum(isnull(inqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.inqty&gt;0 and O1.transtype in (59)),0)) as [StockIN Quantity],
    (isnull((Select sum(isnull(outqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.outqty&gt;0 and O1.transtype in (60)),0)) as [StockOUT Quantity],
    (isnull((Select sum(isnull(inqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&lt;=@ToDate and O1.transtype in (59,20,18,16,14,67,-2)),0) - isnull((Select sum(isnull(outqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&lt;=@ToDate and O1.transtype in (21,19,60,15,67,-2,13)),0)) as [Closing Stock]
    FROM OINM T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode INNER JOIN OITW T2 ON T1.ItemCode = T2.ItemCode INNER JOIN OITB B1 ON T1.ItmsGrpCod=B1.ItmsGrpCod INNER JOIN OWHS W1 ON T2.WhsCode = W1.WhsCode INNER JOIN OLCT C1 ON W1.Location=C1.Code and T0.ItemCode Like '5%' and W1.WhsCode not in ( 'WH-DEMO', 'WH-AHM-R','WH-MUM-R','WH-NDL-R')
    Group by T2.MinStock ,T1.itemcode, T0.Itemcode, W1.WhsCode, C1.Location) a
    End of the Query*

    Hi,
    Starting Query ****
    select * from ( SELECT T0.Itemcode, min(T0.Dscription) as 'Item Description', W1.Whscode,
    (isnull((Select sum(isnull(inqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&lt;@FromDate and O1.transtype in (59,20,18,16,14,67,-2)),0) - isnull((Select sum(isnull(outqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&lt;@FromDate and O1.transtype in (21,19,60,15,67,-2,13)),0)) as [Opening Stock],
    (isnull((Select sum(isnull(inqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.inqty&gt;0 and o1.Price &gt;0 and O1.transtype in (20,18)),0))-(isnull((Select sum(isnull(outqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.outqty&gt;0 and o1.Price &gt;0 and O1.transtype in (19)),0)) as [Purchase Quantity],
    (isnull((Select sum(isnull(inqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.inqty&gt;0 and o1.Price = 0 and O1.transtype in (20,18)),0))-(isnull((Select sum(isnull(outqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.outqty&gt;0 and o1.Price = 0 and O1.transtype in (19)),0)) as [Purchase FOC Qty],
    ( isnull((Select sum(isnull(outqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.outqty&gt;0 and O1.Price&gt;0 and O1.transtype in (13,15)),0)) as [Sale Qty],
    (isnull((Select sum(isnull(inqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.inqty&gt;0 and O1.Price&gt;0 and O1.transtype in (14,16)),0))as [Return Qty],
    ( isnull((Select sum(isnull(outqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.outqty&gt;0 and O1.Price&gt;0 and O1.transtype in (13,15)),0))- (isnull((Select sum(isnull(inqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.inqty&gt;0 and O1.Price&gt;0 and O1.transtype in (14,16)),0))as [NetSale Qty],
    (isnull((Select sum(isnull(outqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.outqty&gt;0 and O1.Price=0 and O1.transtype in (13,15)),0))-(isnull((Select sum(isnull(inqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.inqty&gt;0 and O1.Price=0 and O1.transtype in (14,16)),0))as [FOC Quantity],
    (isnull((Select sum(isnull(inqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.inqty&gt;0 and O1.transtype in (59)),0)) as [StockIN Quantity],
    (isnull((Select sum(isnull(outqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&gt;=@FromDate and O1.docdate&lt;=@ToDate and O1.outqty&gt;0 and O1.transtype in (60)),0)) as [StockOUT Quantity],
    (isnull((Select sum(isnull(inqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&lt;=@ToDate and O1.transtype in (59,20,18,16,14,67,-2)),0) - isnull((Select sum(isnull(outqty,0)) from OINM O1 where O1.itemcode=T1.itemcode and O1.Warehouse=W1.Whscode and O1.docdate&lt;=@ToDate and O1.transtype in (21,19,60,15,67,-2,13)),0)) as [Closing Stock]
    FROM OINM T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode INNER JOIN OITW T2 ON T1.ItemCode = T2.ItemCode INNER JOIN OITB B1 ON T1.ItmsGrpCod=B1.ItmsGrpCod INNER JOIN OWHS W1 ON T2.WhsCode = W1.WhsCode INNER JOIN OLCT C1 ON W1.Location=C1.Code and T0.ItemCode Like '5%' and W1.WhsCode not in ( 'WH-DEMO', 'WH-AHM-R','WH-MUM-R','WH-NDL-R')
    Group by T2.MinStock ,T1.itemcode, T0.Itemcode, W1.WhsCode, C1.Location) a
    End Query ************
    This is correct and complete query i using for reporting
    Thanks & Regards,
    Rajeev

Maybe you are looking for

  • Publishing to wrong location

    When I am trying to publish my site via the new iWeb 09 integrated FTP publisher I am getting some weird results. I just want to publish my site to the public directory of my webspace (/public_html/ or just "/") but for some reason iWeb keeps publish

  • 11g: treeTable child record selection

    Hi, I have a (pseudo) model, where entity A is self-referenced and also parent of B, so: A 1 - * A A 1 - * B I'd like to load all As into treeTable, which is not a ploblem. When a record in the treeTable is selected, I need to load detail Bs in a sep

  • How much is it to pay for screen repairment

    how much is it to pay for screen repairment ? on iphone 4 .

  • Drill Down error with more than one dimension

    Hello I'm using AWM 10.2.0.3.0A with Oracle 10.2.0.1.0 and i can't perform drill down operation when i have more than one dimension in the same axis. That is, when i have two dimensions, a can't perform drill down on both dimenions at the same time,

  • Configure sender RFC

    HI EXPERTS my Scenario is RFC TO FILE 1.when i am sending bapi from sap system to xi system i  was getting error was : jco server couldnot fine the function /GLB/RGT_STOCK_ENQUIRY so wt my mistke  plz help me thanks upendra