Closing Stock on Particular Date(MB5B Tcode)

Hi Experts,
I need closing stock as on some particular date. For e.g. closing stock as on 28.02.2014.
In my requirement i have to use that closing stock value for further calculations in a new customized report.I can see closing stock value by using MB5B tcode.
Please suggest some way to get closing stock as on some date so that i can use that in my Report.
Can i directly call MB5B transaction in my Report and get closing stock value?
Thanks & Regards,
Pankaj

Hello Pankaj,
In your Customised Report use MKPF and MSEG table
MKPF ----->  Material and date range as the input
Then Pass Material document number from MKPF to MSEG table
MSEG ----->  based on material document number from mkpf
Create Temporary  variable
values comes from the mseg where have credit and debit entries
if debit entry "S" then subtract the values of the Mseg table from the temporary variable1
if credit entry "H" then Add the values of the mseg table to the temporary variable2
finally Add the temporary variable1 and temporary variable 2 and get the total stock.

Similar Messages

  • Functional Specification For Opening And closing stock On Particular Date

    Dear Gurus,
    I am creating report for opening and closing stock on particular date in which batch and storage location should also be included. I want to know the tables and fields for the same.I have searched the forum and got report on month basis but I want this report on posting day basis.kindly suggest tables and fields. Thanks in Advance

    Dear sir,
    There are many other colums that client wants to add which are not present in MB5B transaction.columns which client wants to add are as follows...
    Material Number                                                   
    Material Description                                       
    Material Type                                                                        
    Material Group                                                                     
    External material Group                                                            
    Movement Type     
    Plant     
    Storage Location     
    Customer Number     
    Customer Name     
    Vendor Number     
    Vendor Name     
    Posting Date     Receipt Doc. Number
    Issue Doc. Number     
    Reference Issue Document Number     
    Opening Stock Quanity     
    Material Receipt Quantity     
    Material Issue Quantity     
    Material Closing Stock Quantity      
    Value Of Closing Stock
    And for this I want  tables and logic for the same. kindly provide the solution for the same.

  • 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

  • Any Standard FM  for material stocks on posting date  using  Tcode  MB5B

    Hi,
    I  need   Standard  FM  to get  material stocks on posting date  using   Tcode   :   MB5B
    Stock type  i am using  is  : Storage Location/Batch Stock
    the  Input   i am  providing  is    Material, Plant , Storage Location, selection  date From , selecDate To.
    Then   i need  to get  data  that it  provides   header  and  document  item level.
    Can u please tel me  how do i get  that  material stock data  on posting date and in which tables
    it will be populated in the database.
    ITs required  can u take view and post info
    Thanks & Regards
    sivakumar kasa
    Edited by: siva kumar kasa on Dec 21, 2010 2:30 PM
    Edited by: siva kumar kasa on Dec 22, 2010 7:15 AM

    hi Rehan,
    I have checked all settings also enhancement  but there is no as such control to restrict backposting within current period
    I think its self disipline action not to post backdated GI when GR is done on later date
    Vishal...

  • Vendor stock on particular date

    vendor stock on particular date..any std Tcode
    plz help
    mb5b,mblb,mc.9 wont work
    thanks
    ramesh reddy(vallur)

    ME2O
    Or
    ME2M & ME2L, choose , Item Category L, and choose selection parameter of your requirement.
    Choose MB5B,
    Choose radio Button Special stock and give special stock as O.It may help u.
    Edited by: sudhansu satapathy on Dec 16, 2011 11:46 AM
    Edited by: sudhansu satapathy on Dec 16, 2011 11:49 AM

  • Opening stock will be the closing stock of previous date

    Hi All,
    Good day. I am developing an ALV report that will show opening stock(LABST) as well as closing stock(Calculated) for a range of date and materials. Problem here is that from MARD table I am getting only the last opening stock, because it has no common date field with MSEG table. So, I have to calculate the opening stock as the closing stock of previous date. How can I calculate this? Is there any FM to get the opening stock ?
    Date          Material            Opening St       Closing St
    27.03.2009     2100002          91.000          191.00
    28.03.2009     2100002          191.000          123.00
    29.03.2009     2100002          123.000          103.00
    With regards,
    Tripod.
    Edited by: Tripod on Aug 23, 2011 12:13 PM

    Try not only to use MARD and MKPF/MSEG but also MARDH which contains closing stock of period preceding periods where movements happened. (ie. there is a record for May if a movement happened in June, and none for June if there was no movement in July, and no record exists for August as this is current period) - First look for MARD, MARDH records; and then only read MKPF/MSEG from last MARDH record found. (created back to 4.5A - [Material Master (Industry/Retail): Enhancements to Period Closing|http://help.sap.com/saphelp_45b/helpdata/en/35/b0e7ef87a62488e10000009b38f9b7/content.htm])
    Regards,
    Raymond

  • Negative closing stock on back date

    All SAP Gurus,
    We have made GR (MIGO) on todays posting date.
    And issued the material on yesterday's posting date (past date), (where there was no stock on that date).
    System allowed us to issue the material on past date, on which there was no stock.
    And now showing closing stock on previous date as negative.
    We want to avoid such negative closing stock.
    What configuarational changes we need to do?
    Regards,

    hi
    This is standard functionality .. u can not do anything in std. as there is no error message available for this
    u can do one thing In OMSY u can remove  remove the check mark in the ABp (Allow Back Posting) check box for your Company Code, to stop postings in the closed periods.
    or in MMRV  do not tick posting in previous period
    Vishal.....

  • Need stock on particular date entered on selection screen

    I am creating a stock in transit report and need stock on particular date entered by the user on selection screen.How do I calculate stock on a particular date?

    same thread...
    Re: Stock on a particulare date

  • Stock on particular date (performance issue)

    Hi Folks,
    I m calculating stock at all vendor on a particular date.
    But it takes very long and time_out occurs.
    I m calculating opening closing provided return and rejection based on movement types.
    The report hangs up at following particular Join.
    SELECT MKPFBUDAT MSEGBWART MSEGMATNR MSEGLIFNR SUM( MSEG~MENGE )
                  AS MENGE
                      INTO CORRESPONDING FIELDS OF TABLE IT_OPEN
                      FROM
                         MKPF INNER JOIN MSEG ON
                               MKPFMBLNR = MSEGMBLNR AND
                               MKPFMJAHR = MSEGMJAHR
                       WHERE MKPF~MJAHR = D_YEAR AND
                             MKPF~BUDAT GE D_DATE AND
                             MKPF~BUDAT LT S_BUDAT-LOW AND
                    MSEG~BWART IN ('541','542','543','544','551','702') AND
                             MSEG~XAUTO NE 'X' AND
                             MSEG~MATNR IN S_MATNR AND
                             MSEG~WERKS IN P_WERKS AND
                             MSEG~LIFNR IN P_LIFNR
                  GROUP BY LIFNR MATNR BUDAT BWART.
    Is there any way to increase performance by breaking this inner join into select statements or anyhow.
    Regards
    Sachin

    HI,
    On seeing your code, it seems like,
    SELECT MKPFBUDAT MSEGBWART MSEGMATNR MSEGLIFNR SUM( MSEG~MENGE )
    AS MENGE
    INTO CORRESPONDING FIELDS OF TABLE IT_OPEN
    FROM
    MKPF INNER JOIN MSEG ON
    MKPFMBLNR = MSEGMBLNR AND
    MKPFMJAHR = MSEGMJAHR
    WHERE MKPF~MJAHR = D_YEAR AND
    MKPF~BUDAT GE D_DATE AND
    MKPF~BUDAT LT S_BUDAT-LOW AND
    MSEG~BWART IN ('541','542','543','544','551','702') AND
    MSEG~XAUTO NE 'X' AND
    MSEG~MATNR IN S_MATNR AND
    <b>MSEG~WERKS EQ P_WERKS</b> AND
    <b>MSEG~LIFNR EQ P_LIFNR</b>
    GROUP BY LIFNR MATNR BUDAT BWART.
    Please see the code marked with bold as parameter passing in the select statement must be EQ and not IN.
    Secondly, remove the aggregate function SUM from the select. First select all the records into an internal table and either use control break statements or Collect to sum up the entries.
    Next, while selecting from the database use INTO TABLE IT_OPEN rather than into corresponding fields of table.
    Also remove the movement types from the select and restrict it inside the Loop and Endloop.
    Lakshminarayanan
    Please mark all helpful answers for points

  • Table to see stock on particular date

    Hello SAP Gurus,
       I know that through mb5b report you can see the stock on posting date.But guys can u  tell me that from which table and field it takes the data?

    Please look at transactions MCBE and MCBR.  They are part of the inventory standard analysis.  These will show total consumption for the selected time periods.
    There is a ton of data availablie via the Logistics Information System and I think it is the most under utilized functionality in SAP.  If consultants and users really learned how to use this functionality you could probably do away with 80% of your custom reports.
    You can also use flexiblie analysis against structure/table S032, (not S039), and create your own analysis and reports.  These can be highly customized and saved and reused.  Variants can be created and the results can be saved in personal reports, emailed or downloaded.
    Other structures you might find of use in your particular query would be
    S031 - Movements
    S032 - Stocks
    S033 - Movements (indiv. records)
    S034 - Movements (batches)
    S035 - Stocks (batches)
    S039 as suggested above provides primarily averages which is not what your looking for.
    Craig
    Edited by: Craig Snyder on Apr 30, 2008 1:26 AM

  • Inventory cube 0IC_C03 ,Stock on particular date

    Hi All,
       We are trying to get the stock on a particular date using cube 0IC_C03 ,but we are unable to get the total stock on a given date.
    1)Ex: I want stock on 01.12.2009 ,but in the query output I am getting  null values.
      I am only getting the total stock quantity on the loaded date for ex:04.01.2010(which is my data loading date in to the cube).
    2)And when we restrict 0calday with <=01.12.2009 ,i have to get the total stock till 01.12.2009
    Thanks&regards,
    Sunitha

    Hi,
    Check
    Treatment of historical full loads with Inventory cube
    Setting up material movement/inventory with limit locking time
    1)Ex: I want stock on 01.12.2009 ,but in the query output I am getting null values.
       I am only getting the total stock quantity on the loaded date for ex:04.01.2010(which is my data loading date in to the cube).
    For 2LIS_03_BX it will give the extracted date only
    2)And when we restrict 0calday with <=01.12.2009 ,i have to get the total stock till 01.12.2009
    try with below options.
    Use :
    0VALSTCKVAL   " for Value
    0VALSTCKQTY   " for Qty
    0CALMONTH        " for Month
    Use the above combinations in New Selections in columns and go it.
    For Qty Opening:
    New Selection bad drag abd drop following things
    0VALSTCKQTY   " for Qty
    0CALMONTH        " for Month and restrict with less then or equalto option variable (single value, user input)  and set the offeset
                                   value = -1 bcoz if user will give 12.2009 , so it will display 11.2009 closing stock, this is opening for 12.2009.
    For Qty Closing:
    New Selection bad drag abd drop following things
    0VALSTCKQTY   " for Qty
    0CALMONTH        " for Month and restrict with less then or equalto option variable (single value, user input) .
    In the same way build for Value and other Keyfigures on 0IC_C03.
    And
    Drag & drop
    0MATERAIL
    0PLANT  " Give some Input Variable.
    See the steps.
    Treatment of historical full loads with Inventory cube
    Setting up material movement/inventory with limit locking time
    If it is BI 7 then for BX in in DTP in Extraction Tab you need to select Extacrion mode = NON-Cumulative option.
    Thanks
    Reddy

  • Storage location wise opening, closing stock...date wise...report

    Hi all Experts,
    I am at client site and hav to provide a report containing opening, and closing stock (and issue qty if possible) storage location wise and date option wise.pls help
    regards
    vikas chhabra

    Hi,
    Use MB51 for date wise report
    OR
    Use MCL1, MCL5, MCL9, MCLD (If Warehouse Management you are using)
    OR
    You have to develop an own ABAP report.
    Regards,
    Biju K

  • Closing Stock as on date.

    Hi All,
    I need the information how to get the closing stock of items on a desired date.
    help me writing a query for that.
    I tried fro that but not able to get it.

    Hi,
    Try this
    select t1.ItemCode,max(t1.dscription) [Name],(sum(isnull(t1.InQty,0)) - sum(isnull(t1.OutQty,0)) ) [ClsStock],(sum(t1.transvalue)) [ClsValue]
    from OINM t1
    where t1.DocDate >= '[%0]' and t1.DocDate <= '[%1]'
    group by
    t1.ItemCode
    Regards,
    Bala

  • Stock on posting date-MB5B

    Hi! I'm looking for a function that works as MB5B, I need to calculate the stock on posting date, I used the debugger, but I couldn't find a function.
    Thanks!

    Hi,
       Thare is not so such function module for MB5B.I think that you can copy it to your Custom program and change it .
    regards,
    collysun

  • Stock on particular date

    How the system finds stock of material on specified date .
    Example In report MB5b system gives stock of material on date we have selected . If I select date 31 Mar 2010 then system displays stock as on 31 Mar . From which table it comes ?
    (In table MBEW we can get stock as on todays date)

    Hi,
    In MB5B, the system will first take in to account of all total valuated stock for the particular valuation area on system date.  This will be in the table S032.  Then it will take in to account total issues and receipts during the back date.  Then the difference will be added or subtracted accordingly from the present stock and value.
    Regards

Maybe you are looking for

  • # instead of initial value in reports

    Hi, I'm trying to solve the following problem: When I create a report in Query Analyzer, in some columns, instead of the initial value(spaces) for some fields, there is the  # sign. Do you know from where does this issue come from? Is there an option

  • MIGO BADI - Transfer Posting

    Dear forumers, I have a requirement as such:- Upon a transfer posting in the transaction MIGO, some data fields will need to be updated in RESB and another custom table based on certain conditions. This transfer posting will be for issuing / transfer

  • Newbie Struts ActionForm creation question in JDeveloper

    Hey guys, I am playing around with Struts and the JDeveloper functionality for that framework. So I am getting the hang of the diagramatic way of viewing the entire Web application by graphically creating the struts-config.xml file. That is great. Bu

  • Oracle JDBC (10g) reading clobs -- best practices

    What is the better approach using oracle 10g to save clobs: #1) This: PreparedStatement pstmt = conn.prepareStatement //Create the clob for insert Clobs Clobs = new Clobs(); CLOB TempClob = Clobs.CreateTemporaryCachedCLOB(conn); java.io.Writer writer

  • Regarding points of my current runnig courses

    Hello, I am currently doing courses in MVA. The courses contains self assessment test. I am trying to give those assessment. After given that the points are not increasing in my profile and there was not any indication that points that I have taken t