Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Opening and closing stock

0 Kudos

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,

help me

3 REPLIES 3

brad_bohn
Active Contributor
0 Kudos

Why can't you follow the logic from MB5B?

0 Kudos

i already debug MB5B. but i cont get opening stock how can i get opening stock in MB5B.

give me solution

Edited by: pcpsuresh on May 4, 2011 6:44 AM

Jelena
Active Contributor
0 Kudos

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.