I am currently working on reconciling quantity data between table MBEWH and MCHBH as we would like to expand our analytics to inlcude batch detail. While trying to reconcile the historic quantities between MBEWH and MCHBH we had several instances where it appears historic records were not appropriately updated.
My current understanding of the way historic records are written to MCHBH is as follows:
A given material is loaded into the system during period 01 with a balance of 10units. That balance is the current balance and until there is a subsequent movement MCHBH will not show any records for this material as the data will be present in MCHB. In period 04 an additional 10units are added to inventory. At this point a historic record is created for periods 02-03 in table MCHBH for a balance of 10units in each of those periods.
Now, I have selected a specific material at a specific plant and attempted to reconcile for period January-August of 2014 by totalling the batch detail from MBEWH and reconciling to the total material balance noted in MBEWH. I noted there were 2 batches for this material in period 01 of 2014 totaling 233.354 KG's:
I then ran table MBEWH for the same material, plant, period and year, noting the total stock to be 1,086.11 KG's. A difference of 852.756 KG's
To attempt to identify any reconciling items I ran MB51 for the same material, plant for all history through period 01 of 2014. I noted there were 3 batches which had balances that were sitting in inventory at the end of period 01 of 2014 - Please note I put the export into a pivot table to total the bathces for easier reconciling. Additionally since MB51 pulls in data based on the EUN, I reconciled the DR to KG's using the correct conversion factor for this material from table MARM.
Based on the above, the reconciling items appears to be a single batch that was in inventory at the end of period 01. Based on my understanding of how MCHBH is updated, if there were no subsequent movements after period 01 then the balance of this batch would be the current balance and historic records would not exist, in which case I would use a script that would determine that no additional movements occurred and would automatically populate a record in my output. However, I obtained additional details for this specific batch from MB51 and noted that there were subsequent movements, and therefore a record SHOULD have been created in the system:
It appears that there was no movement for this material/batch between 08-2013 and 03-2014. However, when the material/batch moved in 03-2014, historical records should have been created in MCHBH for the periods 08-2013 thru 02-2014, specifically period 01-2014 which is the period I am attempting to reconcile. I have tried this exercise with multiple other materials and noted the same issue, sporadically in various periods there is one batch that is not included in the historic data within MCHBH.
Any help in understanding why I am not able to reconcile these two tables would be appreciated.