Skip to Content
avatar image
Former Member

Find material Stock to given date

I have been asked to customize the standard report transaction MB5L. I have created ZPROGRAM for the report. I have an input field for date to get material stock till that date.How can i calculate material stock till the given date ?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Apr 12, 2007 at 02:03 PM

    get the data into an internal table... take one more and move only material and stock quantity to this table....

    now loop at itab2.

    collect itab2.

    endloop.

    loop at itab2.

    read table itab1 with key matnr = itab2-matnr.

    if sy-subrc = 0.

    move required data..........

    endif.

    endloop.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 12, 2007 at 02:04 PM

    HI,

    YOu can make use of the fm: MB_READ_MATERIAL_STOCKS

    Regards,

    Ravi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 12, 2007 at 02:08 PM

    Hi

    See the TCODE 'MB5B' program RM07MLBD, and take the logic for this.

    regards,

    ANJI

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 12, 2007 at 02:10 PM

    Hi,

    Please check this BAPI BAPI_MATERIAL_AVAILABILITY.

    Regards,

    Ferry Lianto

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Sentil ,

      Basically , you can do it by using MBEWH , MSEG+MKPF

      i.e : You can search for the material stock in MBEWH for 03/2007 and you can check the material movements from MSEG+MKPF for the given date 04/04/2007 .

      Hope this helps

      Caglar

  • Apr 12, 2007 at 02:57 PM

    Basically you will have to use

    An "historical" table with stock at end of periods

    - MBEWH Material Valuation: History

    - MARDH Material Master Storage Location Segment: History

    etc.

    A "flow" table for movement before last period recorded and date asked for

    - MSEG/MKPF Document Segment: Material

    - BSIM Secondary Index, Documents for Material

    <i>(Use MSEG/MKPF for quantities and BSIM for valuations its easier than matching the two files, valuation can vary without movement in MSEG and some movement in MSEG don't reflect in accounting)</i>

    Regards

    Add comment
    10|10000 characters needed characters exceeded