My problem is from which table to fetch opening stock qty which belongs to from particulater Date to particular Date
For example i am running this report from 01.01.2011 to 30.03.2011 so my query i want opening stock for 01.01.2011 and subsequently.
i tried MB5B , same opening stock need my report,
If I'm not mistaking, this is a well-known shortcoming in SAP that "opening/closing" stock is not really stored anywhere in the database. If you read the documentation in MB5B, it says: "Starting with the current stock balance, the report uses the material documents to calculate the stock balance for the specified posting date."
Basically, in standard SAP at any given point in time we only know how much stock on hand we have right now.
From what I read in SD/MM forums, different companies are approaching this issue differently. We did the following - created a custom info structure with INVCO update to capture end of month stock. This structure was updated on monthly basis from GM documents to capture the current stock. So when the month ended, there was no more update for that month in info structure and, essentially, that was our "end of month" stock (beginning of month = end of previous month). There were some complications, e.g. if there were no GMs at all, we had to read the records back, but overall it worked perfectly. When implementing SAP, we transferred the beginning stock data from the legacy system using a custom program (direct update in info structure).
Discuss the requirements with your functional consultant and see what works best for you.