Upload
sapgak
View
188
Download
3
Embed Size (px)
DESCRIPTION
Material Stock and Valuation History tables
Citation preview
Generated by Jive on 2014-07-07+02:001
Material Stock and Valuation History tables -how to read them
All stock and valuation tables in SAP have as well history tables since release 45. All those tables have thesame name as the standard tables, but with a H at the end.
Standard table History table Function module
Material Valuation MBEW MBEWH MBEW_EXTEND
Storage Location Data forMaterial
MARD MARDH MARD_EXTEND
Batch Stocks MCHB MCHBH MCHB_EXTEND
Project Stock Valuation QBEW QBEWH QBEW_EXTENDSpecial Stocks withCustomer
MSKU MSKUH MSKU_EXTEND
Special Stocks withVendor
MSLB MSLBH MSLB_EXTEND
Sales Order StockValuation
EBEW EBEWH EBEW_EXTEND
Special Stocks fromVendor
MKOL MKOLH MKOL_EXTEND
Project Stock MSPR MSPRH MSPR_EXTENDMaterial Master Plantdata
MARC MARCH MARC_EXTEND
and some more
This was implemented to speed up the period closing.
But how these tables are updated is for many users cumbersome, they expect to see a record for each monthin those history tables, but SAP does it differently. SAP explains the logic in Note 193554 - Stock/valuation dataof previous periods still we can see in many discussions that this note was not fully understood.
SAP does not update the history table when you execute MMPV to close the MM period.The History tables are updated with first movement after a period closure.If there is no movement for several months, then you will not see any history record for all those months thathave past.SAP writes only a history record for the month preceding a change in stock or value.All the periods between 2 records in a history table had the same stock/value all the time, hence you can takethe value for those periods from the record following these missing periods.
Material Stock and Valuation History tables - how to read them
Generated by Jive on 2014-07-07+02:002
Here we see 8 history records for the valuation data MBEW of one material in one plant, created over a timespan of 5 years:many would expect to see 60 records for 5 years, but we had only 8 months with changes in those 5 years,hence only 8 history records were created.
And as proof a screen shot from MB51 Material Document list for the same material and plant:
Material Stock and Valuation History tables - how to read them
Generated by Jive on 2014-07-07+02:003
You can see that the first movement to this material happened on May 22, 2007. This event triggered thecreation of the history record for period 004 2007.The history record tells you that the stock and value for this material was zero at the end of April 2007
The next month with movements was December 2007, which caused a history record for November 2007
The movement from April 8, 2008 triggered the creation of 2 history records: for period 003 2008, and becausethere was a year change in between a record for period 12 2007
The movement type 301K (marked yellow) did not trigger any update in MBEWH table, because consignmentstock has no value, hence no change to valuation, which means MBEW table is not affected.
Finally we have movements in May 2011, and the first movement caused the creation of year end records of2009 and 2010 and for the previous month 04 2011.
Material Stock and Valuation History tables - how to read them
Generated by Jive on 2014-07-07+02:004
If you need to develop own ABAP reports with month end stock then you have to make use of function modulesthat understand this complex logic. The name of these function modules is starting with the table namefollowed by _EXTEND (see table)
To retrieve previous period data for all materials in valuation area ZRAG the coding should be like that
select * from mbew into table mbew_tab where bwkey = 'ZRAG'.
call function 'MBEW_EXTEND' exporting xvper = 'X' tables mbew_tab = mbew_tab.
Please read the SAP Note 415349 - Usage of modules XXXX_EXTEND for previous period values for detailedinformation because the function modules are not released.