FM To Find Opening Stock

Is There Any FM To Find Opening Stock in Given Date

Hi Sreedhar,
Check BAPI_MATERIAL_AVAILABILITY.
This function needs to imput Plant, Material number, Unit (usually ST) and Check rule (this is comming from customizing).
You need to append first entry into WMDVSX table with REQ_DATE = your datum to which you need to know how many
stocks are confirmed by Disposition. After executing you just read the first entry in the table WMDVEX, in the field
COM_QTY you can find the quantity confirmed. This works in many of our programs well

Similar Messages

  • How To Find Opening Stock And Value For a Material

    Hi Experts,
    How To Find Opening Stock And Value For a Material  in Given Dates
    Moderator Message: Search.
    Edited by: kishan P on Sep 15, 2010 4:05 PM

    Thanks For Answering.....
    But I Need Any Function Module To Get Opening Stock And Value For Given Material With in Dates.

  • Find opening stock as on date storage locationwise.

    Hi,
      Whether below mentioned logic is correct to find out storage locationwise stock.If its wrong please reply.
    TABLES : WB2_V_MKPF_MSEG2,MACKW.
      RANGES : O_DATE FOR SY-DATUM.
      DATA : BEGIN OF ITAB OCCURS 0.
            INCLUDE STRUCTURE WB2_V_MKPF_MSEG2.
      DATA : MTART TYPE MACKW-MTART.
      DATA : END OF ITAB.
      DATA : BEGIN OF IT_COL OCCURS 0,
               MATNR_I TYPE WB2_V_MKPF_MSEG2-MATNR_I,
               LGORT_I TYPE WB2_V_MKPF_MSEG2-LGORT_I,
               MENGE_I TYPE WB2_V_MKPF_MSEG2-MENGE_I,
               MEINS_I TYPE WB2_V_MKPF_MSEG2-MEINS_I,
               LGOBE TYPE T001L-LGOBE,
           END OF IT_COL.
      SELECT-OPTIONS:  S_BUKRS FOR WB2_V_MKPF_MSEG2-BUKRS_I,
                     S_WERKS FOR WB2_V_MKPF_MSEG2-WERKS_I,
                     S_MATNR FOR WB2_V_MKPF_MSEG2-MATNR_I,
                     S_MTART FOR MACKW-MTART,
                     S_BUDAT FOR WB2_V_MKPF_MSEG2-BUDAT
                     NO-EXTENSION NO INTERVALS.
    O_DATE-SIGN = 'I'.
    O_DATE-OPTION = 'BT'.
    O_DATE-LOW = '19780218'.
    O_DATE-HIGH = S_BUDAT-LOW - 1.
    APPEND O_DATE.
    START-OF-SELECTION.
    SELECT * FROM WB2_V_MKPF_MSEG2 AS A INNER JOIN MACKW
       AS B ON B~MATNR = A~MATNR_I AND B~WERKS = A~WERKS_I
       INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE
       A~MATNR_I IN S_MATNR AND A~WERKS_I IN S_WERKS AND
       A~BUKRS_I IN S_BUKRS AND
       A~BUDAT IN O_DATE AND
       B~MTART IN S_MTART.
      SORT ITAB BY  BUDAT WERKS_I MTART  MATNR_I .
      LOOP AT ITAB.
        IF ITAB-SHKZG_I = 'H'.
          ITAB-MENGE_I = ITAB-MENGE_I * -1.
        ENDIF.
        MODIFY ITAB.
      ENDLOOP.
    LOOP AT ITAB.
        MOVE : ITAB-MATNR_I TO IT_COL-MATNR_I,
               ITAB-LGORT_I TO IT_COL-LGORT_I,
               ITAB-MENGE_I TO IT_COL-MENGE_I.
        COLLECT IT_COL.
      ENDLOOP.
    LOOP AT IT_COL.
    WRITE : / IT_COL-LGORT_I,IT_COL-MATNR_I,IT_COL-MENGE_I.
    ENDLOOP.
    Regards,
    Bathri.
    Edited by: Bathrinath Sankaranarayanan on Jun 5, 2009 7:36 PM
    Edited by: Bathrinath Sankaranarayanan on Jun 5, 2009 7:38 PM
    Moderator message - Please ask a specific question - like I expect results that look like this, but I get this. You are the one that can test this. People on the forum can't do much more than desk check your code for you.
    Post locked
    Edited by: Rob Burbank on Jun 5, 2009 1:41 PM

    Sure - write a program.
    Rob

  • 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.

  • How to create a query to see Opening stock and closing stock as on particul

    Hi All,
    How to create a query to see Opening stock and closing stock as on particul.
    Regards
    Albaik

    Hi,
    In BI 0IC_C03 will provide u the  required information and also having standard queries provided by the SAP.
    Plz find the list of Queries provided by the SAP.
    =======================================================================================================
    Inventory turnover      0IC_C01_Q0001
    Range of coverage - quantity      0IC_C01_Q0002
    Range of Coverage - Value      0IC_C01_Q0003
    Range of coverage of finished goods - quantity      0IC_C01_Q0004
    Range of Coverage of Finished Goods - Value      0IC_C01_Q0005
    Range of coverage of raw materials - quantity      0IC_C01_Q0006
    Range of Coverage of Raw Materials - Value      0IC_C01_Q0007
    Obsolete Stock on Hand      0IC_C01_Q0008
    Period-dependent requirement coverage      0IC_C01_Q0009
    Value of stock on hand      0IC_C01_Q0010
    Quantity of stock on hand      0IC_C01_Q0011
    Material consumption      0IC_C01_Q0012
    Material Movements      0IC_C01_Q0013
    Consignment stock: receipts and issues      0IC_C01_Q0014
    Valuated stock: receipts and issues      0IC_C01_Q0015
    Material stock and movements      0IC_C01_Q0016
    Material Movements (Healthcare)      0IC_C01_Q0020
    Material Consumption (Healthcare)      0IC_C01_Q0021
    Material Availability      0IC_C01_Q0022
    Inventory Turnover Frequency (Value)      0IC_C01_Q0023
    Consignment Stock Received and Issued per Unit      0IC_C01_Q0024
    Material Consumption (Quantity)      0IC_C02_Q0001
    Valuated Stock Receipts and Issues (Quantity)      0IC_C02_Q0002
    Range of Valuated Stock (Quantity)      0IC_C02_Q0003
    Inventory Turnover      0IC_C02_Q0004
    Receipt and Issue Consignment Stock at Customer      0IC_C03_Q0001
    Receipt and Issue Quality Inspection Stock      0IC_C03_Q0002
    Vendor Consignment Stock Receipt and Issue      0IC_C03_Q0003
    Receipt and Issue Stock in Transit      0IC_C03_Q0004
    Receipt and Issue of Blocked Stock      0IC_C03_Q0005
    Valuated Stock      0IC_C03_Q0006
    Stock in Quality Inspection      0IC_C03_Q0007
    Stock in Transit      0IC_C03_Q0008
    Blocked Stock      0IC_C03_Q0009
    Vendor Consignment Stock      0IC_C03_Q0010
    Consignment Stock at Customer      0IC_C03_Q0011
    Stock Overview      0IC_C03_Q0012
    Stock Overview (as of 3.1 Content)      0IC_C03_Q0013
    Quantities of Valuated Project Stock (as of 3.1 Content)      0IC_C03_Q0014
    Valuated Stock (as of 3.1 Content)      0IC_C03_Q0015
    Quantities of Valuated Sales Order Stock (as of 2.1 Cont.)      0IC_C03_Q0016
    Inventory Turnover      0IC_C03_Q0017
    Days' Supply      0IC_C03_Q0018
    SUS: Vendor Consignment Stock      0IC_C03_Q0019
    Scrap      0IC_C03_Q0020
    Inventory Aging      0IC_C03_Q0021
    Stock Overview - extended      0IC_C03_Q0022
    Demand Supply Match      0IC_C03_Q0023
    Warehouse Stock Analytics – Inventory Turnover      0IC_C03_Q0024
    Warehouse Analytics - Obsolescence and Variance      0IC_C03_Q0025
    Stock Overview: Materials      0IC_C03_Q0030
    Average Stock Value Over Time      0IC_C03_Q0031
    Stock Overview Over Time      0IC_C03_Q0032
    Range of Coverage Over Time      0IC_C03_Q0033
    ==================================================================================================
    Regards
    Ram.
    Edited by: Ramakanth Deepak Gandepalli on Jan 18, 2010 8:06 AM

  • Opening stock Balance Table

    Hi,
    I am writing FS for the following fields
    In selection screen i am selecting
    Material
    Posting date
    Plant
    Output
    Opening stock stock
    GR
    Issue
    Balance
    Closing Stock
    My problem is from which table to fetch  opening stock qty  which belongs to 3months back
    For example i am running this report from Jan09 to March 09 so my query i want opening stock for the month of Jan09 and subsequently reduction in stock after each issue.so from which table i can get this information.
    Need your expertise help
    Regards
    Vivek

    Hi Vivek,
    To Calculate Opening Stock & Closing stock there are different procedures.
    It just depends of\n the client requirements & usage of the material.
    For example, we have different types of stocks, like, Through Pipeline, Special, Unristricted, quality, safety,
    and many types of stocks.... so all these types are indicated in MSEG tabe in SOBTZ field,...
    Now Comimg to your Query, You need to calculate OPENING & CLOSING STOCK.
    We have a similiar standard report in MB5B Tcode..
    to get the same results in your report do like this...
    For valuated stock go to the MARDH, MBEWH, MCHBH tables But I Prefer MBEWH.
    here in MBEWH give the month & year and you get the result in LBKUM field...
    For Special stock, You need to go to another table like MKOLH,,(I forgot still 2 more) and
    give the month & year inputs and you will get the result in SLABS field.
    and remaining MB5B refers to its deetails lists with different Movement types,
    whcih you can get clearly from MSEG Table...
    Hope you can write the select Queries accordingly.
    If you want to find the Stock for a particluar date, It is not available in any table as I know,
    Rather you need to do calculations like this.
    1. Select the stock (Menge) till date from MSEG and add all with different movement types,
    Its a logic need to ask to your functional consultant,
    like 101 added to stock, 601 sales, 102 rejeted, 602 added back to stock,... transfers, 261,,, like this.
    But take a little time, get all these by using MKPF & MSEG tables... thats it.
    Or----
    2.Tables are MSEG , MKPF ... use Debit / Credit indicator ( Do not go woth any static Movement types ) and u have to consider all stock related table
    MBEW , EBEW etc..., to get the stcok on particular date .
    Please refer to Std. Tcode FBL5N for reference.
    Thanks & regards,
    Dileep .C

  • Opening stock for stock provided to vendor

    Hi Gurus,
    I m trying to get opening stock for stock at subcontracter. I m using 0TOTALSTCK in the Query and I'm getting wrong values as compare with MB5B. I dont know how to show the opening stock and closing stock in the Query for this special stock (the indicator is "O").
    MB5B is showing opening stock when you select the special stock and enter the date, but in my Inventory Cube and Query i see something else. I checked the initilisaiton and movements in the cube, everything is OK.
    But still my Query is getting wrong values.
    Could you help me to find out?
    Thanks,
    Zeynep

    hii
    In BW cube does not have the field of Opening stock or closing stock as it works on the function module at the background.
    U will get the closing stock in the query designer as the TOTSTOCk field name. Also u have the receipt & issue field there. So u can calculate the Opening Stock figure by using the Formulae & these available fields.
    Thanks
    Neha

  • Regardig opening stock

    hi experts,
    i m an abaper ,i dnt have a functional consultant rt now.i have to develope a report on opening stock of raw materials on date wise basis..which table sud i use so that i can get the date wise opening stock or will i use some logic for that ...plz help me with eg. if possible.
    plz dnt gve this type of answer like tc mb5b and tc mb51.
    null

    Hi,
    SAP does not maintain day wise stock tables. It maintains period closing stock in tables like MBEWH, MARDH, MCHB and current stock in tables like MBEW, MARD, MCHB.
    These tables provide various views stock
    Mard, Mardh - plant,Storage location, material
    Mbew, Mbewh - Plant, material, valuation type
    Mchb, mchbh - Plant, material, storagelocation, batch.
    If you want to calculate stock for a given date, possible approach would be to find the period closing stock(1) relative to the given date(A), and net the material movements(2) from MSEG and MKPF from next day(A+1) to the given date and add the net to closing stock (1) + (2).
    For example if plant = 1000, material is 100000
    given date is 2.3.2007.
    See in history stock whether there is a latest closing stock.
    if your latest closing is Jan 2007. Have this stock as (1).
    Net of quantities(2) from MSEG and MKPF stock movement from 1.2.2007 to 2.3.2007. Add this with (1) and you will have stock on that day.
    Hope this helps.
    Thanks and regards,
    S. Chandra Mouli.

  • How to loading the opening stock balance into Infocube 0IC_C03

    Dear Expers,
    I have referenced SDN a expert's documentation, but I canu2019t go on at page 10 .
    Check: How Tou2026 [Handle Inventory Management Scenarios in BW|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f83be790-0201-0010-4fb0-98bd7c01e328]
    (1)original text:
    Loading the opening stock balance (InfoSource 2LIS_03_BX) into InfoCube
    0IC_C03. In the InfoPackage, choose the upload mode u201CCreate opening balanceu201D
    (see screenshot).
    Question:
    How to find option that upload mode u201CCreate opening balanceu201D?
    i'm  use to customize infopackage.  i  can not use default infopackage, when i click the defualt infopackage, will error prompt: Data target '0DF_C07' removed from list of loadable targets; not loadable
    (2) I actived BI Contnet (0IC_C03), I seen that the data flow  as following:
    Datasource(2LIS_03_BX)->transformation->Infosource(2LIS_03_BX_TR)-> transformation->Infocube(0IC_C03)
    Datasource(2LIS_03_BF)->transformation->Infosource(2LIS_03_ BF TR)-> transformation->Infocube(0ICC03)
    Datasource(2LIS_03_UM)->transformation->Infosource(2LIS_03_UM TR)-> transformation->Infocube(0ICC03)
    Quesiton: I donu2019t  know whatu2019s version, neither like BW 7.X nor like BW 3.X,
    Why have infosource in BW 7.X, how to use infosource load data to target?
    Currently, I canu2019t create transfer rule and upate rule for this datasource & infosource.
    Do  I  need to create a  customize ODS?
    Thank you very much , if you will answer me above two questions.
    Best Regards
    Steve

    >
    stevezhuang wrote:
    > Dear Expers,
    >
    > I have referenced SDN a expert's documentation, but I canu2019t go on at page 10 .
    >
    > Check: How Tou2026 [Handle Inventory Management Scenarios in BW|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f83be790-0201-0010-4fb0-98bd7c01e328]
    >
    > (1)original text:
    > Loading the opening stock balance (InfoSource 2LIS_03_BX) into InfoCube
    > 0IC_C03. In the InfoPackage, choose the upload mode u201CCreate opening balanceu201D
    > (see screenshot).
    >
    > Question:
    > How to find option that upload mode u201CCreate opening balanceu201D?
    >  i'm  use to customize infopackage.  i  can not use default infopackage, when i click the defualt infopackage, will error prompt: Data target '0DF_C07' removed from list of loadable targets; not loadable
    >
    >
    >
    > (2) I actived BI Contnet (0IC_C03), I seen that the data flow  as following:
    > Datasource(2LIS_03_BX)->transformation->Infosource(2LIS_03_BX_TR)-> transformation->Infocube(0IC_C03)
    >
    > Datasource(2LIS_03_BF)->transformation->Infosource(2LIS_03_ BF TR)-> transformation->Infocube(0ICC03)
    >
    > Datasource(2LIS_03_UM)->transformation->Infosource(2LIS_03_UM TR)-> transformation->Infocube(0ICC03)
    >
    > Quesiton: I donu2019t  know whatu2019s version, neither like BW 7.X nor like BW 3.X,
    > Why have infosource in BW 7.X, how to use infosource load data to target?
    > Currently, I canu2019t create transfer rule and upate rule for this datasource & infosource.
    > Do  I  need to create a  customize ODS?
    >
    >
    > Thank you very much , if you will answer me above two questions.
    >
    >
    > Best Regards
    > Steve
    You don't need to worry about 0DF_C07 as it was defence cube not activated during your Business Content Activaiton.
    YOu can create your own infopackage for 2LIS_03_BX and there will be option generate intial status.
    This loading will create your Opening Balance.
    you need to compress this with NO Marker UPDATE option unchecked(as you will have to update hte marker).
    After this load movements 2LIS_03_BF and reval 2LIS_03_UM. Compress this with NO MARKER UPDATE option checked.
    Regards,
    RK

  • Query:Opening STock value

    hi all,
    we want to get the value of opening stock
    opening stock value on 1st of each month.
    for e.g
    Goods are received and issued upto 10th of september.stock is updated.
    on 10th sep we want to get the opening stock for 1st sep.
    report fileds that client want are:
    Month Opening        Received                Issued               Qty        Value         Qty    Value          Qty      Val                
    120         200            50     70                40       30                
    How to get such report.
    Thanks
    Neetu

    I started query Profiler,clicked on run....
    but it is showing many lines.
    how i can find the appropriate sql query.
    For eg. I started SQL profiler,then i run sap-->>Inventory Adut report.
    from where to get the query running behind Inventory adit report in SQL profiler
    Thanks,
    Neetu

  • Table name for opening stock value

    Hi,
    Can some body tell me the table name & the field name for opening stock value,
    (This is when you pass the date through LSMW at initial stage and it gets sits in which table)
    For ex. MB5B
    rgds
    Sonu

    There are many stock tables in SAP.
    if you load unrestricted use stock with value, then the quantity is going to MARD, quantity and value to MBEW.
    if material is batch managed, then stock per batch is going to MCHB, but still MARD and MBEW are updated.
    if you load non-valuated stock (material type UNBW), then only MARD is updated, no MBEW entry.
    and much more cases for consignment, sales order stock etc etc.
    If you try to find the values more than a month after the upload, and your materials had movements, then the old stock quantity at period closing is transfered to the history tables MARDH, MBEWH.
    If you load in the beginning of a month, then SAP calculates the opening stock by using the end of period stock and add/subs the material movements.Then you will not find the opening stock as a single number in any table.

  • Material open stock evaluation

    Hi,
    Based on plant, storage location and batch, material unrestricted usage quantity is 100pc(MMBE transaction). And Schd.for delivery  quantity is  25 PC i.e. this material has been used in schedule lines which are confirmed but not delivered. Because of this when I am trying to create the delivery using this material for 100Pcs it is not allowing me as only 75pcs are available.
    Now my problem is where does this Schd.for delivery quantity is stored? Is there any function module to find what is the actual open stock quantity available?
    This is an urgent issue.
    Thanks in advance,
    Savitha

    Hi,
    check in the table MARD
    fields
    SPEME         INSME         RETME
    Hope it helps.
    Regards,
    Sonika

  • Opening Stock and Closing Stock Calculation

    Hi,
         My report requirement is to display the material, opening stock for the lower date, closing stock for the higher date and the in between all stock operations..how to fetch the opening stock and closing stock for a particular  material ???.. what are the tables and fields for calculating them??..
    Thanks,
    Sri
    Edited by: Sri on Feb 13, 2009 8:33 AM

    Hi
    We have done a similar reports. One showing opening stock/Closing stock and another one showing all the transactions for a particular day. What we did was we developed a program to fetch data from MARD table for unrestricted, blocked & Qulaity stock(Our requirement talks only about these 3 stocks). And we scheduled the program exactly at system time 00.00 hrs with A class job.(today's closing day stock is nothing but tomorrow's opening stock)
      And for the second report which needs to pick all the transaction for a particular day, we picked it from MB51 entries. It is nothing but query between MKPF and MSEG.
    I hope this helps.

  • Who has a find Open Path plug-in for CS4 Illustrator on WinXP and a close path also?

    Can anyone lead me to a plug-ins for finding open paths and closing them in CS4 on WinXP?
    Thanks

    Just a thought, but, have you tried using Live Paint?

  • How to find open orders with amount and open deliveries?

    Hi All,
    I want to find out the open orders with open amount and open deliveries for a particular customer.
    We need this for credit check purpose.
    Kindly guide us for this.
    Regards,
    Satish.

    Hi,
    To find out open order:
    data: c_bef_pgi(1) TYPE c VALUE 'A',
    RANGES: rg_wbstk FOR vbuk-wbstk."range for wbstk
      rg_wbstk-sign = 'I'.
      rg_wbstk-option = 'EQ'.
      rg_wbstk-low = 'C'.
      APPEND rg_wbstk.
      rg_wbstk-low = 'A'.
      APPEND rg_wbstk.
    1.first put query on vbak table
    2.Put query on vbuk table as
          SELECT vbeln bestk lfstk gbstk FROM vbuk
                  INTO TABLE it_vbuk_open
                  FOR ALL ENTRIES IN it_vbak
                  WHERE vbeln = it_vbak-vbeln AND
                        bestk IN rg_wbstk AND
                        lfstk = c_bef_pgi.
    so this wil give u open orders.
    3. Then according to vbuk, get the details from vbap.
    To find open delivery
    1. First put query on vbak table
    2. Put query on vbfa as
      SELECT vbelv posnv vbeln posnn vbtyp_n vbtyp_v FROM vbfa
                 INTO TABLE it_vbfa
                 FOR ALL ENTRIES IN it_vbak
                 WHERE vbelv = it_vbak-vbeln AND
                       vbtyp_n = 'J' AND
                       vbtyp_v = 'C'.
    3.Then from VBfa,get the details from LIkp
    4.Then put entry on vbuk as
    *entries from vbuk
          SELECT vbeln wbstk fkstk gbstk FROM vbuk
                 INTO TABLE it_vbuk_del
                 FOR ALL ENTRIES IN it_likp
                 WHERE vbeln = it_likp-vbeln AND
                       wbstk IN rg_wbstk AND
                       fkstk = c_bef_pgi.
    Thanks & Regards,
    Anagha Deshmukh

Maybe you are looking for