
Archiving History Records for Stock Value Tables (MM-IM)
Definition
Object MM_HDEL for archiving history records for stock value tables in the MM Inventory Management component.
Use
The stock value tables MBEW, EBEW, and QBEW contain history records. For example, MBEWH is the history record for MBEW and EBEWH is the history record for EBEW. These history records can contain an entry with the relevant stock information for each period. The records are created whenever a change is made to any period-relevant information for the previous period. As a consequence, you cannot read the information for the previous period directly from tables MBEW, EBEW, and QBEW. Instead, you need to interpret and read the history records MBEWH, EBEWH, and QBEWH.
The write program RM07KOHDEL2 archives the following history records:
Selecting and Archiving History Records
You can select and archive the history records for stock value tables using the write program RM07KOHDEL2 and according to the following criteria:
R_MATNR
R_BWKEY
If you are valuating at plant level: Note that all plants must belong to the same company code. This is necessary, because the system determines the current period using the company code.
If you are valuating at company code level, then you can only enter one company code. Therefore, you must start a separate archiving session for each company code.
PERIOD LIMITS
The lower period limit defines the period after which the history records will be selected. If you do not enter a limit here, then the system starts with the oldest period.
Residence Time/Retention Period of Data in the System:
You cannot delete the data from the current period, the previous period, the period before last, or the data from the last period of the previous year.

If your periods correspond to the calendar months and the current period is 8, then you cannot delete the data from periods 6 and 7 of the current business year, or period 12 of the previous business year.
Testrun
Archive
DEL_ONLY
Deleting the Archived History Records
You can delete archived history records from the database using the delete program RM07KARC.