Skip to Content
author's profile photo Former Member
Former Member

Material stcok history

Hi friends

I want getting material stock history.

For example My matnr = 1000000 I want get between 2 date (01.01.2007 and 10.01.2007 ) stock movements of this material. Do you know any bapi or view for this? When ı doing this via sql Application running time is very long (45 min).

Thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 12:42 PM

    HI,

    look at the fucntion module MB_READ_MATERIAL_STOCKS

    Regards

    Sudheer

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 08, 2007 at 12:42 PM

    As there is no index (standard) with MATNR and date, try to reduce your request specifying MJAHR in your example 2007 especially if you never archived movements.

    regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 12:56 PM

    Hi,

    Check the TABle MARDH.

    If useful reward.

    Vasanth

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 12:59 PM

    Hi!

    You can run the standard SAP transactions in background also:

    MB51 - material documents

    MB52 - actual stock

    MB5B - material stock for date

    Choose Program -> Run in background and you can skip programming.

    But the following tables are containing the material movement documents:

    MKPF, MSEG, or use the view: WB2_V_MKPF_MSEG

    And the following table is for the actual stock:

    MARD

    Regards

    Tamá

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 02:11 PM

    I have changed source code of MB5B it is usefull. Thanks all person

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.