Opening stock of a material for each day for a month

Hi ,
Is it possible to get a opening stock of a material for each day for a month . For Example for the month of Feb From 01/02/2014 to 28/02/2014 i want to see the opening stock for each day .
Thanks .
Message was edited by: Jürgen L

If you give 01.02.2014 to 28.02.2014 in MB5B report, then you will got the opening stock for 01.02.2014 and closing stock for 28.02.2014...
the MB5B report designed like that
It will give you the opening stock for from date and closing stock for end date...
If you want to see the opening stock per each day, then you have to give the date each date in MB5B report...
Like as for opening for 02.02.2014, you have to enter the from date as 02.02.2014..
You can make your own report from copy the existing program RM07MLBD and you can add you additional code...
Make the program output will be for each day...

Similar Messages

  • How to get a opening stock of a material on a particular date

    Hi,
    Could you pls provide me the logic of how to get the opening stock of the material on a particular date. I searched the forum and found the logic to fetch the closing stock at a given period but not for a date.
    An immediate response would be really appreciated.
    Thanks
    Harris

    Dear,
    Please read following part of my code
    FORM GET_OPENING .
       IF IT_FINAL[] IS NOT INITIAL.
         SELECT *  FROM MARD
           INTO CORRESPONDING FIELDS OF TABLE IT_MARD
           FOR ALL ENTRIES IN IT_FINAL
           WHERE MATNR = IT_FINAL-MATNR
           AND   WERKS = '1000'.
         SELECT A~MBLNR A~MJAHR A~BUDAT B~WAERS B~ZEILE B~BWART B~MATNR B~WERKS B~LGORT B~CHARG B~SHKZG B~MENGE B~MEINS B~BUSTM B~XAUTO
           INTO CORRESPONDING FIELDS OF TABLE IT_MKPF
           FROM  MKPF AS A JOIN MSEG AS B
           ON A~MANDT = B~MANDT
           AND A~MBLNR = B~MBLNR
           AND A~MJAHR = B~MJAHR
           FOR ALL ENTRIES IN IT_FINAL
           WHERE B~MATNR = IT_FINAL-MATNR
           AND   A~BUDAT GE P_BUDAT-LOW
           AND   B~WERKS = '1000'.
       ENDIF.
       AKTDAT = SY-DATLO + 30.
       IF NOT ( P_BUDAT-HIGH IS INITIAL OR P_BUDAT-HIGH > AKTDAT ).
         LOOP AT IT_MKPF INTO WA_MKPF WHERE BUDAT > P_BUDAT-HIGH.
           MOVE-CORRESPONDING WA_MKPF TO IT_MKPF1.
           APPEND IT_MKPF1.
           DELETE IT_MKPF.
         ENDLOOP.
       ENDIF.
       SORT IT_MKPF1 BY WERKS MATNR SHKZG.
       LOOP AT IT_MKPF1.
         IF ( IT_MKPF1-XAUTO IS INITIAL ) OR
             ( IT_MKPF1-BUSTM <> 'MA02' AND  IT_MKPF1-BUSTM <> 'MA05' ) .
           MOVE-CORRESPONDING IT_MKPF1 TO IT_MAT.
           COLLECT IT_MAT.
         ELSE.
           DELETE IT_MKPF1.
         ENDIF.
       ENDLOOP.
       SORT IT_MKPF BY WERKS MATNR SHKZG DESCENDING.
       LOOP AT IT_MKPF INTO WA_MKPF.
         IF ( WA_MKPF-XAUTO IS INITIAL ) OR
            ( WA_MKPF-BUSTM <> 'MA02' AND
            WA_MKPF-BUSTM <> 'MA05' ).
           MOVE-CORRESPONDING WA_MKPF TO T_MAT.
           COLLECT T_MAT.
         ELSE.
           DELETE IT_MKPF.
         ENDIF.
       ENDLOOP.
       LOOP AT IT_MARD.
         CLEAR IT_MAT-MENGE.
         MOVE-CORRESPONDING IT_MARD TO FINAL.
         READ TABLE IT_MAT WITH KEY WERKS = IT_MARD-WERKS
                                    LGORT = IT_MARD-LGORT
                                    MATNR = IT_MARD-MATNR
                                    SHKZG = 'S'.
         FINAL-ENDMENGE = IT_MARD-LABST + IT_MARD-INSME + IT_MARD-SPEME + IT_MARD-EINME + IT_MARD-RETME - IT_MAT-MENGE.
         CLEAR IT_MAT-MENGE.
         READ TABLE IT_MAT WITH KEY WERKS = IT_MARD-WERKS
                                    LGORT = IT_MARD-LGORT
                                    MATNR = IT_MARD-MATNR
                                    SHKZG = 'H'.
         FINAL-ENDMENGE = FINAL-ENDMENGE + IT_MAT-MENGE.
         COLLECT FINAL.
       ENDLOOP.
       LOOP AT FINAL.
         CLEAR T_MAT-MENGE.
         READ TABLE T_MAT WITH KEY WERKS = FINAL-WERKS
                                    MATNR = FINAL-MATNR
                                    SHKZG = 'S'.
         MOVE T_MAT-MENGE TO FINAL-SOLL.
         CLEAR T_MAT-MENGE.
         READ TABLE T_MAT WITH KEY WERKS = FINAL-WERKS
                                    MATNR = FINAL-MATNR
                                    SHKZG = 'H'.
         MOVE T_MAT-MENGE TO FINAL-HABEN.
         FINAL-ANFMENGE = FINAL-ENDMENGE - FINAL-SOLL + FINAL-HABEN.
         MODIFY FINAL.
       ENDLOOP.
       LOOP AT FINAL.
         WA_FINAL1-MATNR = FINAL-MATNR.
         WA_FINAL1-MEINS = FINAL-MEINS.
         WA_FINAL1-OP_MENGE = FINAL-ANFMENGE.
         WA_FINAL1-RE_MENGE = FINAL-SOLL.
         WA_FINAL1-IS_MENGE = FINAL-HABEN.
         WA_FINAL1-CL_MENGE = FINAL-ENDMENGE.
    *  WA_FINAL-LGORT = FINAL-LGORT.
    *    READ TABLE IT_MAKT WITH KEY MATNR = FINAL-MATNR.
    *    MOVE IT_MAKT-MAKTX TO WA_FINAL-MAKTX.
         APPEND WA_FINAL1 TO IT_FINAL1.
       ENDLOOP.
    ENDFORM.                    " GET_OPENING

  • Blocked Stock and Frlag material for Deletion

    What is the diffrence between blocked stock and flagging material for deletion.
    Thank you

    Hi,
    Difference between Block stock and flag material for deletion is:
    Block stock will only come into picture if your client says that when ever they receive stock, before quality and physical check it should not create any accounting document..So what you will do is, you will receive stock as block stock with mvt 103...Once Check is done you will release your block stock with 104....
    Say for an e.g. Vendor has supplied you goods in your premises...Same time you have noticed that goods are damaged o rare of  poor quality...So you will post the stock as block stock...So once you post as a block stock, there won't be any accounting documents generated....
    Material flad for deletion means: That particluar material can not be used for further procurement..E.g..  may be client has stopped using that material....
    Hope it clears
    Utsav

  • Opening Stock Comapny - Plant - Material - Batch - Storage location Wise

    Dear Friends,
    I want to do the following report. I will explain the details to you. Pleaes suggest on how to go about it.
    1. Since you know that SAP stores stock in a summary form (Plant / Material wise). Our management wants the report on the following hierarchy. (Company - Plant - Material - Batch - Storage). Our management has suggested the following:
    a. Create a ZTABLE with the above columns including Quantity (which will contain closing stock quantity).
    b. In this calculate and store Closing stock for each month. 
    c. an insert / update program has to be created for uploading data in the ZTABLE (selection will contain date).
    for ex:
    When running the  program for 31st March 2008. system will take the closing stock stored in the ZTABLE for previous months + March Receipt - March issues. the result will be the closing stock for March 2008.
    d. Then a report will be prepared using the ZTABLE and other calculated fields.
    Can anyone give me the guideline as to how to go about it. Tables to be used and logic to be followed? Or if any other way the result can be achieved then nothing like it.
    The Managements final goal is to have any given date closing stock in the above hierarchy (minimizing the Performance issue... that is why the suggestion of ZTABLE)...
    Awaiting for your expert opinions.....
    Regards,
    Jitesh M Nair

    Figured out

  • SQL help: return number of records for each day of last month.

    Hi: I have records in the database with a field in the table which contains the Unix epoch time for each record. Letz say the Table name is ED and the field utime contains the Unix epoch time.
    Is there a way to get a count of number of records for each day of the last one month? Essentially I want a query which returns a list of count (number of records for each day) with the utime field containing the Unix epoch time. If a particular day does not have any records I want the query to return 0 for that day. I have no clue where to start. Would I need another table which has the list of days?
    Thanks
    Ray

    Peter: thanks. That helps but not completely.
    When I run the query to include only records for July using a statement such as following
    ============
    SELECT /*+ FIRST_ROWS */ COUNT(ED.UTIMESTAMP), TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY') + (ED.UTIMESTAMP/86400)), 'MM/DD') AS DATA
    FROM EVENT_DATA ED
    WHERE AGENT_ID = 160
    AND (TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY')+(ED.UTIMESTAMP/86400)), 'MM/YYYY') = TO_CHAR(SYSDATE-15, 'MM/YYYY'))
    GROUP BY TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY') + (ED.UTIMESTAMP/86400)), 'MM/DD')
    ORDER BY TO_CHAR((TO_DATE('01/01/1970','MM/DD/YYYY') + (ED.UTIMESTAMP/86400)), 'MM/DD');
    =============
    I get the following
    COUNT(ED.UTIMESTAMP) DATA
    1 07/20
    1 07/21
    1 07/24
    2 07/25
    2 07/27
    2 07/28
    2 07/29
    1 07/30
    2 07/31
    Some dates donot have any records and so no output. Is there a way to show the missing dates with a COUNT value = 0?
    Thanks
    Ray

  • Query to get a value for each day in a month

    Hi All,
    I'm needing a query (preferably without a loop or function) that can get a number representing each day of a given month.
    For example for the month of February, the result would be 1,2,3,....28
    Surely this can be done?
    Thanks!

    SQL> with a as (
      2  select trunc(sysdate,'Month') mon from dual)
      3  SELECT mon + LEVEL - 1 AS dates
      4  FROM a
      5  CONNECT BY LEVEL <= ADD_MONTHS (mon, 1)  - mon;
    DATES
    01-FEB-11
    02-FEB-11
    03-FEB-11
    04-FEB-11
    05-FEB-11
    06-FEB-11
    07-FEB-11
    08-FEB-11
    09-FEB-11
    10-FEB-11
    11-FEB-11
    DATES
    12-FEB-11
    13-FEB-11
    14-FEB-11
    15-FEB-11
    16-FEB-11
    17-FEB-11
    18-FEB-11
    19-FEB-11
    20-FEB-11
    21-FEB-11
    22-FEB-11
    DATES
    23-FEB-11
    24-FEB-11
    25-FEB-11
    26-FEB-11
    27-FEB-11
    28-FEB-11
    28 rows selected.or if u want it in one query,Then
    SQL> SELECT trunc(sysdate,'Month') + LEVEL - 1 AS dates
      2  FROM dual
      3  CONNECT BY LEVEL <= ADD_MONTHS (trunc(sysdate,'Month'), 1)  - trunc(sysdate,'Month');
    DATES
    01-FEB-11
    02-FEB-11
    03-FEB-11
    04-FEB-11
    05-FEB-11
    06-FEB-11
    07-FEB-11
    08-FEB-11
    09-FEB-11
    10-FEB-11
    11-FEB-11
    DATES
    12-FEB-11
    13-FEB-11
    14-FEB-11
    15-FEB-11
    16-FEB-11
    17-FEB-11
    18-FEB-11
    19-FEB-11
    20-FEB-11
    21-FEB-11
    22-FEB-11
    DATES
    23-FEB-11
    24-FEB-11
    25-FEB-11
    26-FEB-11
    27-FEB-11
    28-FEB-11
    28 rows selected.
    SQL> Regards
    Umesh

  • Mail on my MacBook Air will not open - have had no problems for 18 months

    My mail on the MacBook Air show 1 on the icon, but I cannot open it.  I have not had a problem for 18 months, no changes to anything.

    Hey lynnieg26,
    Thanks for the question. I understand that you are experiencing issues with Mail in OS X. Let’s see if we can isolate this issue further by following the steps in these resources:
    Mac OS X: How to troubleshoot a software issue
    http://support.apple.com/kb/ht1199
    Isolating an issue by using another user account
    http://support.apple.com/kb/TS4053
    Thanks,
    Matt M.

  • Is Vodafone UK going to stock the Blackberry Passport for pay monthly upgrades? not just for business but for personal/regular users?

    Hi 
    I was just wondering if there was any news about the Blackberry Passport being available to regular/personal contract holders on Vodafone UK.
    I have seen it mentioned that it will be stocked for business users but theres no news about anyone else.
    Please could someone give me a definitive answer as i would like to upgrade my Z10 for the Passport

    Hi @guyveric 
    I'd recommend contacting Vodafone UK to express interest! In the interim, make sure you bookmark the Official Pricing and Availability for BlackBerry Passport post found on Inside BlackBerry. Thanks! 
    Did someone help you? Click Like! Did a post solve your issue? Click Accept as Solution!
    Follow me on Twitter or Google+ and subscribe to the Inside BlackBerry Help Blog

  • Material Stock at storage location for particular date!

    Dear Friend,
    I need a table or bapi which gives stock for particular storage location on particular day. That is MMBE and if you go into detail list (shift+f7). I want same thing.
    I have tried in MARD table, but it gives stock of a material for most current date.
    Waiting for your early Reply.
    Regards,
    Bhavin Shah

    hi check:
    MB_ADD_PURCHASE_ORDER_QUANTITY
    Regards
    Ashok P

  • 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

  • Closing Stock of a Material

    If I know the Material Code and Plant then how can I determine the closing stock of that material for a particular date?
    I know that from the table MARD I can get the value of today's closing stock. But how can I know any other days closing stock.
    This is very urgent.
    Regards,
    Subhasish

    Hi
    Check this out.... <b>Though this is for Opening Stock</b>, you can have receipts and issues in that period for the material and then calculate the Closing Stock.
    *&      Form  GET_OPENING_STOCK
      ******* USE THIS LOGIC FOR GETTING OPENING STOCK OF A BATCH ******
      ********** THE WAY ITS DONE (TO SOME EXTENT) IN Trxn MB5B **********    
      **************** VERY USEFUL TO GET STOCK FASTER **************
    FORM GET_OPENING_STOCK .
      DATA: TOTAL TYPE P DECIMALS 3.
      CLEAR       OPTOT.
      REFRESH: IMARD, G_T_MSEG_LEAN.
      CLEAR:   IMARD, G_T_MSEG_LEAN.
    *- Select data from IMARD
      SELECT * FROM MARD INTO CORRESPONDING FIELDS OF TABLE IMARD
                                              WHERE WERKS = P_PLANT-LOW
                                              AND   MATNR = OPBAL-MATNR.
      IF SY-SUBRC = 0.
        READ TABLE IMARD INDEX 1.
        IF SY-SUBRC = 0.
          TOTAL = IMARD-LABST.
        ENDIF.
      ENDIF.
    *- Select data from MSEG and MKPF
      SELECT
                 MKPF~MBLNR
                 MKPF~MJAHR
                 MKPF~BLART
                 MKPF~BUDAT
                 MKPF~CPUDT
                 MSEG~MATNR
                 MSEG~WERKS
                 MSEG~LGORT
                 MSEG~CHARG
                 MSEG~SHKZG
                 MSEG~MENGE
               INTO CORRESPONDING FIELDS OF TABLE G_T_MSEG_LEAN
               FROM MKPF AS MKPF  JOIN MSEG AS MSEG
                        ON MKPFMANDT  =  MSEGMANDT  AND
                           MKPFMBLNR  =  MSEGMBLNR  AND
                           MKPFMJAHR  =  MSEGMJAHR
               WHERE MSEG~MATNR  =   OPBAL-MATNR
                 AND MSEG~WERKS  =   P_PLANT-LOW
                 AND MSEG~CHARG  =   OPBAL-BATCH
                 AND MKPF~BUDAT  GE  P_DATE-LOW.
      SORT  G_T_MSEG_LEAN    BY WERKS MATNR CHARG SHKZG DESCENDING.
      IF NOT G_T_MSEG_LEAN[] IS INITIAL.
        LOOP AT G_T_MSEG_LEAN.
          IF G_T_MSEG_LEAN-SHKZG = 'H'.
            TOTAL = TOTAL + G_T_MSEG_LEAN-MENGE.
          ELSE.
            TOTAL = TOTAL - G_T_MSEG_LEAN-MENGE.
          ENDIF.
        ENDLOOP.
    *- Assign Stock
        OPTOT = TOTAL.
      ENDIF.
    ENDFORM.                    " GET_OPENING_STOCK
    Regards,
    Raj

  • 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

  • Open PO and open stock

    what is Open Po and Open stock . and how they are managed pls explain with example

    open PO
    1) Ordered PO quantity is 100. among 100 supplier delivered 80 quantity. till need to supply 20, mean that PO is not still closed. that PO will be closed after he supplied the pending quantity. hence still the PO is open
    2) open stock.
    Open stock is the material inward
    Regards
    Karan
    Edited by: hi on Jan 18, 2012 6:06 AM

  • Variable to show ALL days of the month

    I have a data provider that looks like this:
    OID Name Occurence
    1 Lemons 20/10/2009
    2 Apples 21/10/2009
    3 Pearss 24/10/2009
    4 Lemons 20/10/2009
    5 Apples 21/10/2009
    I want produce a cross tab that INCLUDES the count for each day of the month even if an occurence has not happened on that date:
    Date 01/10 through to 30/10
    Lemons
    Apples
    Pears
    er how do I do this?

    Joe,
    Insert an extra dataprovider for all the days in the month with a dummy value. You can then add that dummy value in your
    crosstab and hide it.
    Cheers,
    Harry
    PS,
    Please post your mesage only once instead of 2 or 3 times.

  • When I open my MacBook Pro for the first time each day, I find condensation on the glass.  What can I do to prevent the condensation?

    When I open my MacBook Pro for the first time each day, I find condensation on the glass.  What can I do to prevent the condensation?

    This thread and all the followups are hilarious, if it weren't such a serious problem. OP, you may want to add a bit more information on how this drippy screen problem occurs: where do you live, what are the weather conditions, what are you doing with the Mac when it occurs, etc.
    Yes, extreme moisture, to the extent of causing visible condensation, is Very Bad News for any electronic device, and more so with one that isn't tropicalized like the Mac. Besides trying to avoid subjecting it to such extreme temperature changes, using some kind of desiccant to absorb close range moisture and avoidint its use until it dried out, I can suggest placing some kind of absorbent material between the display and the keyboard to prevent the moisture on the glass from finding its way into the computer. Like the protective poliethylene foam protector that came with the Mac when new. Or something like RadTech's ScreenSavrz: http://www.radtech.us/Products/NotebookScreenSavrz.aspx

Maybe you are looking for

  • Limitation on additional fields in VA03 on ECC6.0 ??

    Dear expert, I wanted to know is there any limitation on the number of custom fields that can be added on the additional data tabs in VA03 on ECC 6.0? If yes, then what is the max. number of fields that can be added ? Do we use EEWB for adding these

  • Flash just doesn't work right, period.

    Flash has multiple problems over ALL common browsers, including Chrome. Some browsers worse than others. Have the latest version. Videos stutter constantly. Videos just stop dead in their tracks. Restating gives me a few more minutes and then they ma

  • F-44 profit center clearing does not working

    By using T.Code o7F1 I have activated the field Profit Center Field in Additinal Selections Criteria for F-44 (Vendor Clearing), F-32 (Customer clearing) and F-03 (Gl Account Clearing). When I am doing clearng by giving profit center clearing option,

  • Is it possible add or remove contact from a Shared list via API?

    Hi Eloquan, i'm preatty new in Eloqua and i'm wondering if is possible add/remove contact from a Shared list via API... any help will be welcomed. M.

  • Keeping track of methods by name

    Is there a way that the java programming system would give a list of methods in a java file and list the methods used and unused?