I am using MSEG table to calculate the closing stock and opening stock where in for the same i need to fetch the data way back from 2007 so an alternative for the same the i am trying to use MBEW and MBEWH..
Read every record from MBEWH and add them to the same table. Sort them on Product and on Date. To every record of the same product except for the first, add a FROM-DATE that is equal to the Date of the previous record.
Set the FROM-DATE of the first record to a date before SAP was installed or something.
Use INTERVALMATCH() to map your calendar to the stock values.
Note that MBEW contains stock valuations only. The actual stock situations are stored in MARD-MSKU-MSLB.