【转载】MM03表 Material Valuation MBEW表、MBEWH表数据更新逻辑

无论移动平均价(Moving Average Price MAP)是否有更改,MBEWH表都会更新。

MBEWH表记录了MBEW表的历史数据,而MBEW是物料评估(Material Valuation)表。

MBEW表记录了当前的物料价格,当物料价格被重估(比如更新物料当前移动平均价)时,SAP系统会将当前价格写入MBEWH表中,而将新价格写入MBEW中。

当前的价格总是记录在表MBEW中,当某一期间(Period)的第一项操作更新了物料数量或价值,则SAP系统会向表MBEWH写入一条记录,以第一项操作之前的余额、价格控制为标准。

在MBEWH表中代表上一期间记录的数字储存在“当前期间”LFMON字段中。

例:当在3期间发生第一笔过账(比如收货),则系统会在MBEWH表中的“当前期间”LFMON字段写入数字2,数量和价值更新到“总库存(Total Stock)”和“总价值(Total Value)”字段,并且等于发生在3期间的数量和价值。

若在连续几个期间内未发生过账,则表MBEWH不会为每个期间创建记录。

表MBEW、MBEWH与MCHBH的区别:

MBEW:查看当前账期的移动平均价

MBEWH:查看历史账期的移动平均价

表MBEWH记录了所有的库存价值,而表MCHBH则只代表了未限制库存的价值。

如何查看当前移动平均价:

事务代码:S_P00_07000139

每次物料重估后的最新移动平均价。

附:Note 193554 
Summary 
As of Release 4.5, stock and valuation fields that refer to the previous period or those dating back even farther, are not stored in those tables in which the current stock data is stored (MBEW, MARD, MCHB, and so on) but in so-called history tables (MBEWH, MARDH, MCHBH, and so on.). 
(Also compare release note for period closing as of Release 4.5) 
These history tables can have one entry per period. The values of such an entry refer to the end of the period. For the current period, there are no entries in the history tables. An entry is not written in this history table for every period. If stock-relevant or valuation-relevant data change, the system might generate an entry in the history table. 
Furthermore, the fields LFMON ('Current Period (Booking period)') and LFGJA ('Fiscal Year of the Current Period') in the stock tables are no longer automatically set to the current period by the period closing program. The period is only transferred to the new period during the first movement. At the same time, the relevant history entries are also generated.

Example: 
Material 4711 has a stock of 10 pieces at the end of period 01 
In period 02, a goods receipt of 5 pieces occurs. 
Now, an entry is added in the history table for period 01 with a stock of 10 pieces. Simultaneously, the current stock is increased to 15 pieces and the 'Current Period' field (LFMON) is set to 02. 
In period 02, an additional goods receipt occurs with 2 pieces. 
The history table is not affected by this operation since an entry already exists for period 01. The current stock is increased to 17 pieces. 
In period 04, a goods issue of 4 pieces occurs. 
Now, the system adds an entry for period 03 with a stock of 17 pieces in the history table. Simultaneously, the current stock is decreased to 13 pieces and the 'Current Period' field (LFMON) is changed from 02 to 04. 
Since no goods movement has occurred in period 03, there is no entry for period 02 in the history table.

Thus, the following applies:

1. The stock in the stock table describes the situation since the last goods movement which changed this segment. The period of this movement appears in the fields LFMON and LFGJA. All stocks for periods which are earlier than the periods given in the fields LFMON and LFGJA relate to the current stocks and can be found in the stock tables.

2. If for a previous period n, no entry exists in the history table, then the values of this period correspond to the values of the period n+1.

Since the 2nd rule can be used recursively, under consideration of the two above rules the values can be determined for any periods of that period in which Release 4.5 or a higher release were implemented.

Please note: Since the history tables are not created retroactively, the history entries only exist in their completed form from the time from which users work with the new period closing program. The periods for which the period closing program has run for the first time with history records are listed in the table MARV for every company code in the fields GJA_40C and MON_40C. For technical reasons it is possible that there are also entries in the history tables with an older period. Nevertheless, these entries are not available without gaps for all stocks. 
This algorithm is also implemented in function modules MBEW_EXTEND, MARD_EXTEND and so on. These function modules are used in the standard SAP programs in order to determine the values of the previous period and to extend tables with the reference structure MBEW, MARD and so on correspondingly.

If you have your own programs which use the prior-period values from the tables MARD, MBEW etc., you should call up the relevant EXTEND component after reading the data from the table. This then returns the data as though no change had taken place in the previous logic. You can then remove the prior-period values from the known fields.

Additional key words 
MBEWH, MARDH, MCHBH, stock information, previous period stock, previous month stock

  • 1
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: Sap物料主数据包括:MARA (Material Master General Data), MARC (Plant Data for Material), MAKT (Material Descriptions), MAVV (Material-Vendor), MVKE (Sales Data for Material), MBEW (Material Valuation), MARD (Material Stock), MBEWH (Material Valuation History), MBEWA (Material Valuation Aging), MCHB (Batch Management Data)和MARAX (Material Attributes). ### 回答2: SAP物料主数据主要有以下几个: 1. MARA:MARA是存储物料主数据的基本,它包含了物料的基本信息,如物料号、物料描述、物料类型、基本计量单位等。 2. MARC:MARC是存储物料主数据的工厂数据,它与MARA通过物料号进行关联,包含了物料在各个工厂中的特定信息,如库存地点、生产版本、价格控制等。 3. MARD:MARD是存储物料主数据的仓库数据,它与MARA通过物料号进行关联,包含了物料在各个仓库中的特定信息,如批号管理、可用库存等。 4. MAKT:MAKT是存储物料主数据的描述,它与MARA通过物料号进行关联,用于存储物料的语言文本描述,如物料名称、物料描述等。 5. MARM:MARM是存储物料主数据的计量单位,它与MARA通过物料号进行关联,包含了物料的计量单位信息,如基本计量单位、销售计量单位、采购计量单位等。 这些是SAP系统中用于存储和维护物料主数据的基本,通过它们的关联和数据提取可以构建全面准确的物料主数据,并在系统中进行物料管理、采购、销售、库存等各项操作。 ### 回答3: SAP物料主数据主要包括以下几个: 1. MARA:物料主数据通用层(一般属性),包含物料的基本信息,如物料号、物料描述、计量单位、物料类别等。 2. MAKT:物料主数据描述,用于保存物料的描述信息,如物料名称、物料文本等。 3. MARM:物料单位转换,记录物料在不同计量单位之间的转换关系,如基本计量单位、销售计量单位、采购计量单位等。 4. MARD:物料主数据存储地点层,保存物料在不同仓库或存储地点的库存信息,如库存数量、批次、锁定库存等。 5. MARC:物料主数据企业层,存储与公司相关的物料信息,如销售数据、采购数据、MRP设置等。 6. MBEW:物料主数据账务层,用于记录物料的账务信息,如价值、成本等。 7. MLAN:物料主数据语言,用于存储物料描述的多语言文本。 8. MSTE:物料主数据标志,用于记录物料状态的标志,如删除标志、冻结标志等。 以上是常见的SAP物料主数据,通过这些的信息,可以对物料的基本信息、描述、单位转换、库存、企业设置、账务以及语言等进行管理和定制。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值