Archive

Posts Tagged ‘MB5B’

Material beginning stock

March 19th, 2009

If you go through MB5B, you can see beginning stock, receiving / issuing, and ending stock of a specified material in specified plant / storage location. Now, if you need to get that beginning stock of a specified date, sometimes it becomes quite tricky.  I don’t know if SAP provides any function module to read that beginning stock.. I made several trials but never got a correct result that runs correctly for every material.  So, what I did was turning ST05 and run MB5B to see what it really does in the program. It turned out that the program actually “traceback” the stock from the current condition! It doesn’t read any history table (MARDH or MBEWH). I thought that method will take me forever to get the result, but I was wrong! It turned out to be the fastest way compared with all the other methods I tried by reading the history tables!

Here’s my code to get that beginning stock of a material:

Read more…

vera ABAP