Tables/FM for opening/closing stock for material on given posting date

Hi All,
I had requirement of find the opening/closing stock for material on given posting date. The values we can find out using TCode - MB5B.
But I cannt use MB5B to extract data because I need to find detials for thousands of material.
Can you please adivce if their is any FM or tables through which i can find this detial on any given date apart from current date.
Thanks & Regards,

Hi,
[https://forums.sdn.sap.com/click.jspa?searchID=19631709&messageID=6593903]
[https://forums.sdn.sap.com/click.jspa?searchID=19631709&messageID=6630975]

Similar Messages

  • Crystal Query for Opening / Closing Stock

    Hi Experts,
    i need a query in crystal for Opening and Closing total Stock per date..
    i found this querys and need to join them, but o dont now how...
    thanks for any tips..
    Query 1
    =======================
    SELECT  distinct
    T0.[TransType], T0.[DocDate],  T0.[InQty], T0.[OutQty], T0.[Dscription], T0.[CalcPrice], T0.[ItemCode] FROM [dbo].[OINM]  T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode WHERE T0.[DocDate] >= {?DateInicial} and  T0.[DocDate] <= {?DateFinal} and T1.[Canceled] = 'N'
    Query 2
    =========================
    Declare @FromDate Datetime
    Declare @ToDate Datetime
    select @FromDate = min(S0.Docdate) from dbo.OINM S0 where S0.Docdate >={?Data1}
    select @ToDate = max(S1.Docdate) from dbo.OINM s1 where S1.Docdate <={?Data2}
    Select a.Itemcode, max(a.Dscription) as ItemName,
    sum(a.OpeningBalance) as OpeningBalance, sum(a.INq) as 'IN', sum(a.OUT) as OUT,
    ((sum(a.OpeningBalance) + sum(a.INq)) - Sum(a.OUT)) as Closing ,(Select i.InvntryUom from OITM i where i.ItemCode=a.Itemcode) as UOM
    from( Select N1.Itemcode, N1.Dscription, (sum(N1.inqty)-sum(n1.outqty))
    as OpeningBalance, 0 as INq, 0 as OUT
    From dbo.OINM N1

    try this
       Declare @ItmsGrpNam varchar(100)
    Declare @Whse nvarchar(10)
    Declare @Fromdate Datetime
    Declare @Todate DateTime
    select @FromDate = min(S0.Docdate) from dbo.OINM S0 where S0.Docdate >=[%0]
    select @ToDate = max(S1.Docdate) from dbo.OINM s1 where S1.Docdate <=[%1]
    select @Whse = Max(s3.Warehouse) from dbo.OINM S3 Where S3.Warehouse = [%2]
    Select  a.Itemcode, max(a.Dscription) as ItemName,
    (Select i.InvntryUom from OITM i where i.ItemCode=a.Itemcode) as UOM,
    sum(a.OpeningBalance) as OpeningBalance,
    ((sum(a.OpeningBalance) + sum(a.INq)) - Sum(a.OUT)) as Closing
    from( Select  N1.Itemcode, N1.Dscription, (sum(N1.inqty)-sum(n1.outqty))
    as OpeningBalance, 0 as INq, 0 as OUT From dbo.OINM N1 inner join OITM i on i.ItemCode = N1.ItemCode
    inner join OITB b on b.ItmsGrpCod = i.ItmsGrpCod
    Where N1.DocDate < @FromDate and N1.Warehouse = @Whse and  b.ItmsGrpNam = @ItmsGrpNam
    Group By N1.ItemCode,
    N1.Dscription Union All select N1.Itemcode, N1.Dscription, 0 as OpeningBalance,
    sum(N1.inqty) , 0 as OUT From dbo.OINM N1 inner join OITM i on i.ItemCode = N1.ItemCode
    inner join OITB b on b.ItmsGrpCod = i.ItmsGrpCod
    Where N1.DocDate >= @FromDate and N1.DocDate <= @ToDate
    and N1.Inqty >0  and N1.Warehouse = @Whse and  b.ItmsGrpNam = @ItmsGrpNam Group By N1.ItemCode,N1.Dscription
    Union All select  N1.Itemcode, N1.Dscription, 0 as OpeningBalance, 0 , sum(N1.outqty) as OUT
    From dbo.OINM N1 inner join OITM i on i.ItemCode = N1.ItemCode
    inner join OITB b on b.ItmsGrpCod = i.ItmsGrpCod
    Where N1.DocDate >= @FromDate
    and N1.DocDate <=@ToDate and N1.OutQty > 0 and N1.Warehouse = @Whse and  b.ItmsGrpNam = @ItmsGrpNam
    Group By N1.ItemCode,N1.Dscription) a, dbo.OITM I1 ,OITB b1
    where a.ItemCode=I1.ItemCode
    and I1.ItmsGrpCod = b1.ItmsGrpCod
    Group By a.Itemcode ,I1.ItmsGrpCod , b1.ItmsGrpNam 
    Having sum(a.OpeningBalance) + sum(a.INq) + sum(a.OUT) > 0
    Order By a.Itemcode 

  • Opening & Closing Stock in transit

    Hi All,
    I Developed an abap report for Yield Statement with opening & closing Stock Quantities.
    How to Find opening & Closing For transit Stock for 641 movement.I mean how to display the current transit stocks date wise at plant level without SLOC.
    I Knew that current transit stock would be in Marc Table & previous closings in March Tables.
    I'm looking for the date logic with respect to displaying opening & closing dates of transit stock.Be it Date Wise Or Month Wise.
    Any help would be greatly appreciated.
    Thanks & Regards,
    Ravi S

    Hi Ravi,
    Please find the Link below hope they are very useful to you
    [Stock|Re: closing stock of a particular date]
    [Stock|Tables/FM for opening/closing stock for material on given posting date]
    Thanks
    kalyan

  • Material opening and closing stock for a given day- Tables or FM

    Dear Friends
             i have to make a report  , related to Material opening and closing stock for a given day  , i check the T-Code- MB5B ,
    it is not giving correct date . is any functional module is available  ? . i checked some table like mbew , mard . it is also not giving correct requirement . Please help

    Hi
    Goto transaction MC.9, Give your Material and,Plant and the date which you need to know the closing stock. Do make sure that in the high and low values you are giving the same date there. I guess no such FM are available for this. You can refer the  [Link|https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=15856]  for some help.
    Regards
    Vinodh
    Edited by: Vinodh_AN on Dec 15, 2010 9:19 AM
    Edited by: Vinodh_AN on Dec 15, 2010 9:25 AM

  • How to find opening or closing stock for a plant

    hi experts,
                    can u help me to know is there any function module to know the opening and closing stocks of plant for particular period per each material type. Or the way to follow to find it

    Hi Kiran,
    You would like to findout opening and closing stock of a particular period and of a particular period....
    If we would like to findout opening and closing stock of material A as of 18 / 8 / 2008,
    then do like this.
    go to MBEW table .. there u get opening stock as on today. Today the date is 20/8/2008. from today's opening stock if we add / subtract the movements which have happened on 19/8/2008 and 18/8/2008 u'll get opening and closing stock as on 18/8/2008.
    U get the movements from MKPF ( material doc header) and MSEG (material doc item ) based on posting date. In MSEG u get movement type.
    If the movement type is 101, it means the stock is added.
    If the movement type is 102, it means the added stock is reversed.
    from today's opening stock deduct the stock with moverment type 101 and add the stock with movement type 102.
    This will give u opening stock as on 18/8/2008.
    To get closing stock of 18/8/2008 ..... the opening stock of 19/8/2008 is 18/8/2008's closing stock.

  • Bapi/function module to get opening or closing stock for a posting date

    I am creating a report where i need to get the opening stock value and closing stock value  for the given starting date and ending date respectively for the PP report.
    The T-code for that is MB5B.
    So,can any1 plzz tell me how i can get the stock value for a starting date/ending date...
    Is there any BAPI or function module to find this out..
    or any logic?
    Thanks.

    Hi Kiran,
    You would like to findout opening and closing stock of a particular period and of a particular period....
    If we would like to findout opening and closing stock of material A as of 18 / 8 / 2008,
    then do like this.
    go to MBEW table .. there u get opening stock as on today. Today the date is 20/8/2008. from today's opening stock if we add / subtract the movements which have happened on 19/8/2008 and 18/8/2008 u'll get opening and closing stock as on 18/8/2008.
    U get the movements from MKPF ( material doc header) and MSEG (material doc item ) based on posting date. In MSEG u get movement type.
    If the movement type is 101, it means the stock is added.
    If the movement type is 102, it means the added stock is reversed.
    from today's opening stock deduct the stock with moverment type 101 and add the stock with movement type 102.
    This will give u opening stock as on 18/8/2008.
    To get closing stock of 18/8/2008 ..... the opening stock of 19/8/2008 is 18/8/2008's closing stock.

  • Reg:Opening and Closing Stock For Plant

    Hi All,
      i want to calculate the opening stock and closing stock for plant wise for the given Posting Period Date.
    Am having the opening balance and closing balance for all months but i need it as month wise.
    considering this example,
    the date is from 15.01.2010 to 15.03.2010 and for one plant
    considering this example,
    am having the opening stock from as 15.01.2010  to 15.03.2010 as 10,000 and the closing stock as 15,000.
    but i need in month wise like below,
    from 15.01.2010 to 31.01.2010 what is the opening stock and closing stock?
    from 01.02.2010 to 28.02.2010 what is the opening stock and closing stock?
    from 01.03.2010 to 15.03.2010 what is the opening stock and closing stock?
    this is purely based on plant wise and not material wise?
    could anybody say clearly how can i acheive this scenario?
    i have referred MB5b,mc.9 transaction programs but still confused how to go with plant wise for a particular period?
    Thanks & Regards,
    Suresh
    Edited by: suresh suresh on Mar 24, 2010 10:15 AM

    Hi,
    Refer to link below:
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/c1/3766e7449a11d188fe0000e8322f96/frameset.htm
    Regards,
    Venkat.

  • Opening & closing balances for Vendor

    Hi Experts,
    I am doing a report where in i need to get the opening & closing balances for Vendor(s). I am using BSIK & BSAK tables. Are there any more tables involved and how do i carry out the calculations?
    Please help.
    Thanks
    Dany

    Hi,
    There are various t. code to check line items for vendor like: S_ALR_87012103 but Any table is not helping to check opening/closeing balance for vendor.
    Table BSIK and BSAK are having are records for open items and close items for vendor and system calculate the balance by using these tables.
    Regards,
    Vinod

  • CLOSING STOCK FOR A GIVEN PERIOD

    hi all,
    I have to design a report to find out the closing stock.How to find out closing stock for say 1st nov to 15th nov.In MBEW and MCHB , i am getting closing stock as on date. please help me out if there are any tables or any other way out through function modules.
    Regards,
    Devina

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

  • Authorization for opening & Closing posting periods - OB52

    Hi,
    Is there any way to set authorization for opening & closing of posting periods in OB52?
    My scenario:
    I have 2 company codes - A & B assigned to 2 different posting period variant - say PPA & PPB.
    The user belonging to CoCd A should not be able to open/close posting period of CoCd B and vice versa.
    Is this possible through any authorization settings?
    Request your help on this.
    Regards,
    Sridevi

    Hi Sridevi
    Please go through the following:
    You can assign authorization groups for permitted posting periods. This means that, for example, some posting periods can only be opened for particular users within monthly or annual closing. You can only assign the authorization group at document header level and it only affects period 1. The authorization object is called F_BKPF_BUP (Accounting document: Authorizations for posting periods). Read the corresponding chapter on "User maintenance" in the "Assigning authorizations" topic.
    "User maintenance"
    Due to the modular authorization concept of the system, you can define authorization profiles which are tailored to the workplace of your employees. You can, for example, assign authorization to a workplace in the Accounts Receivable, Accounts Payable or General Ledger Accounting areas.
    By assigning authorizations you define which business-related objects your employees are allowed to process and which editing functions are allowed.
    In the following activities for authorization management, you must carry out the following for employees who are to work with the system:
    Assign authorizations
    The authorizations are assigned by specifying permitted values for the pre-defined objects.
    Define profiles
    In the SAP system, authorizations are grouped together in workplace profiles. Therefore one or more profiles must be allocated to the individual employee in the master record.
    I hope this helps.
    Regards
    Kavitha

  • Storage location wise Opening/Closing Stock on posting date (mb5b)

    Hi,
    Report mb5b gives opening stock and closing stock as on date. In the selection screen, if we do not enter specific storage location then the opening/closing stock is displayed as sum of all storage location stocks for a given material.
    Where as if we enter storage location, it gives storage location specific output. (with Storage loc/batch stock radio button)
    My requirement is - without entering storage location in the initial screen, the system should display storage location specific opening/closing stock.
    To get this, presently I need to execute mb5b transaction individually for every storage location.
    Warm regards,
    MS

    Hi Madhavi
    This report you can have in T code MC.6 and another t code for opening and closing stock in t code MC.9
    Regards
    Vivek
    -- Reward if helpful
    Edited by: Supergene on Feb 28, 2008 3:17 PM

  • Table to get "stock of material on a past date "

    Hi Guru's,
    Can anyone tell me "how to get stock of material on a past date".
    Pls tell me from which Table you can fetch these values and in what logic.
    Any Input is highly appreciated.
    Thanks and Regards,
    Selva

    Hello,
    You can get the stock from the table MARDH, MCHBH period wise.
    this table is use for history stocks.
    Regards
    Bhima

  • How to get material's last posting date of issuing to production order?

    Hi,
    In my scenario, I need to get material's last posting date of issuing to production order (e.g. mov. typ. 261).
    I tried to select the material documents whose movement type is 261, and restrict the posting date from month to month each time, until the first material document is selected.
    But this method seems quite inefficient.
    What kind of algorithm is more effient to do this?
    Thanks
    Wesley

    Hi,
    select max( budat )
      from mkpf
      into gv_budat
      where mblnr in ( select mblnr
                         from aufm
                        where aufnr = gv_aufnr "(Prod. Order)
                            and  matnr = gv_matnr "(Issued Material)
                            and bwart = '261' ).
    Edited by: Azeem Ahmed Matte on Mar 12, 2010 12:33 PM

  • FM for Opening And Closing Stock for Material

    Dear All,
        I need to Calculate the opening and closing stock of the material. If there is any FM for the same just let me know and if not kindly let me know the way out.
    Regards
    Amit

    Hi!
    The closing stock can be found in the MARD table.
    And the opening stock should be always zero.
    I think you wanted to know the yearly/monthly closing/opening stocks, then you have to gather all material documents from MKPF, MSEG tables, and calculate the stock, using the actual stock and subtract/add (depends on the movement type) the material document's quantity, until the given date.
    I don't know any FMs for this, maybe someone could tell you one...
    Regards
    Tamá

  • Table and Field for Open Order Quantity for a Customer and Material

    Hi
    I created two sales orders 3 and 5 quantities, and delivered 1 qty in the second order.
    when I checked the table VBBE or VA05, I am able to see 3 and 4 qantities open.
    but I want to see the total 7 as open order qty, i.e, 3+4=7
    because both the orders are placed by the same customer and same material
    can u please tell me in which table exactly the total open order quantity for a customer and total open order quantity for a material is stored
    Madhu
    Edited by: madhubabu rao on Jul 1, 2008 1:49 PM

    HI,
    U can get the information in VA05 as there are columns like confirmed quantity and order quantty and status. U can use  summation button (add upto values) to get required information.
    Thx,
    Pramod

Maybe you are looking for

  • Reinstallation printer driver- Wizard stalls - HP officejet 6500 709n and Windows 7

    After windows 7 auto update of my driver, printer offline became its status. I uninstalled the driver, downloaded a new one and ran installation wizard. System checked, system prepartion were successful, but configurate product is stalled on 2/9 with

  • Error while printing message

    Hi I'm hoping someone can help me I have a Macbook and have been using a HP Deskjet D5560 printer with it since i bought it and now it will not let me print each time i go to print it says error while printing. I have gone into some settings and had

  • Why can't I install itunes?

    I tried installing an update to itunes. Something was wrong and I got the "Go to tools and select download only option" message. Did that, didn't work. So I went to download itunes. I selected the repair option, did nothing. So i completely removed i

  • Multiple audit records per one report refresh

    We use BO XI R3 on Windows with CMS on DB2. I need to create audit reports on BO report usage with following data: username, timestamp, duration, report name for DeskI and WebI reports. I use auditing on DesktopIntelligenceCacheServer and WebIntellig

  • MS SQL 2000 to Oracle 9R2

    Hi all! I'm try to connect from Oracle to MS SQL 2000 (all in WIN NT4) but get ORA-28508: invalid value OSTRA-KIEV.OFFICE for Heterogeneous Services initialization parameter HS_DB_DOMAIN My config files: listener.ora: LISTENER = (DESCRIPTION_LIST = (