Database/table update rules

Source: Internet
Author: User

As of release 4.5, stock fields and valuation fields relating to the previous period or to an earlier period are stored in history tables (for example, mbewh, mardh, mchbh ), and no longer in those tables in which the current stock data is stored (for example, mbew, MARD, mchb ).

These history tables can contain one entry for each period. an entry is created in the History Table only if the stock-relevant data or valuation-relevant data changes. the value of the entry relates to the end of the period. the history tables do not contain any entries for the current period.

 

Example

Scenario
At the start of period 02, there are 10 pieces of material 4711 in stock.

Goods receept
5 pieces are already ed in period 02.

System Response
The system records a stock of 10 pieces in the History Table for period 01. At the same time, the system increases the current stock to 15 pieces.

Goods receept
2 more pieces are already ed in period 02.

System Response
The History Table is unaffected by this event because an entry already exists for period 01. The system increases the current stock to 17 pieces.

Goods issue
4 pieces are withdrawn from stock in period 04.

System Response
The system records a stock of 17 pieces in the History Table for period 03. at the same time, the system has CES the current stock to 13 pieces. (The History Table does not contain an entry for period 02 because there were no goods movements in period 03 .)

Rules

1. If the history table does not contain an entry for the previous period, the values for the previous period are the same as those for the current period.

2. If the history table does not contain an entry for a period n that precedes the previous period, the values for period N are the same as those for period N + 1.

Since the second rule can be applied recursively, it is possible to determine (in accordance with both rules) the values for any periods as of the period in which release 4.5 or a subsequent release was implemented.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.