无论移动平均价(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

MBEWH表数据更新逻辑相关推荐

  1. SAP MM 销售订单库存与普通库存之间相互转换过账后对于EBEWH以及MBEWH表的更新

    SAP MM 销售订单库存与普通库存之间相互转换过账后对于EBEWH以及MBEWH表的更新 1,DEMO数据 物料号:1300009995 工厂:2160 销售订单号/item号:0010097627 ...

  2. SAP库存历史库存表更新逻辑

    https://blog.csdn.net/zhongguomao/article/details/50418113 库存数据的保存 根据库存类型的不同,库存信息保存在不同的表中,具体而言见下表 库存 ...

  3. SAP MM 销售订单库存与普通库存之间相互转换过账后对于EBEWH以及MBEWH表的更新...

    SAP MM 销售订单库存与普通库存之间相互转换过账后对于EBEWH以及MBEWH表的更新 1,DEMO数据 物料号:1300009995 工厂:2160 销售订单号/item号:0010097627 ...

  4. 性能优化技巧 - 组表数据更新

    组表是集算器提供的高性能存储格式,其原理在于将数据事先排序并以压缩方式紧致存储,好处是占用空间更小,可利用有序进行快速定位. 但这种存储方式在数据更新时会遇到麻烦,这是因为新数据也要和历史数据一起排序 ...

  5. SAP MM库存历史库存表更新逻辑

    库存数据的保存 根据库存类型的不同,库存信息保存在不同的表中,具体而言见下表 库存类型 当前库存 历史库存 库存金额 历史库存金额 工厂级别库存 MARC MBEW MARCH MBEW MBEWH ...

  6. 清华刘洋:论文写作,信息为表,逻辑为骨,思想为心

    报告:刘   洋 撰文:张   虎 导读 在2021年6月2日下午举办的青源学术年会论坛上,清华大学计算机系教授.智能产业研究院副院长刘洋老师就如何撰写高质量科技论文,提出了"信息为表,逻辑 ...

  7. SAP MCH1表和MCHA表更新逻辑

    SAP MCH1表和MCHA表更新逻辑 笔者所在的A项目里,批次是在material level 唯一, 意味着不同物料号可以有相同的批次号,只要物料号+批次号组合是唯一的即可. SE11 看MCH1 ...

  8. hbase数据库介绍,HBASE的特点,表结构逻辑视图,Row Key,列族,时间戳,Cell

    HBASE数据库 1. Hbase基础 1.1 hbase数据库介绍 1.简介nosql hbase是bigtable的开源java版本.是建立在hdfs之上,提供高可靠性.高性能.列存储.可伸缩.实 ...

  9. oracle将一个表数据更新时间,Oracle批量更新,将一个表的数据批量更新另一表

    [问题]现在有两个千万级别的结构相同数据不同数据表T_SMS_PHONENO(目的表),T_SMS_PHONENO2(源表),根据源表数据更新目的表的数据. [分析]根据经验,更新方法一般有以下几种: ...

最新文章

  1. Java Web中的jsp技术
  2. BZOJ2169 连边(动态规划)
  3. CVPR 2020 《Context-Aware Group Captioning via Self-Attention and Contrastive Features》论文笔记(数据集)
  4. 【Spring】SpringMVC 作用域传值的 4 种方式
  5. MySQL 去除重复的方法
  6. OpenCV 发起 Spatial AI挑战赛
  7. mysql分析表_MySQL分析表有什么用
  8. 详细记录一次npm i canvas报错的解决过程
  9. EditPlus for python
  10. python获取子窗口句柄
  11. 【WPF学习手记】WPF超链接使用
  12. 微信小程序图书管理系统
  13. 相关性系数及其python实现
  14. 海量数据下的舆情分析,该如何搭建?
  15. 文学随笔:《错过独白》
  16. 【R1CS to QAP】
  17. 【华为OJ】【067-求最小公倍数】
  18. 基于STM32的动态天气时钟毕业设计
  19. 腾讯云WebIM和阿里百川即时通讯使用总结
  20. 文件上传一句话木马getshell

热门文章

  1. 如何避免订单重复支付?
  2. 如何在1年内从产品助理到产品高管?
  3. 【干货】七步,让你的网页表单更亲切
  4. 为何 epoll 的 ET 模式一定要设置为非阻塞IO
  5. 南京秦淮灯会亮灯迎春 明城墙内外“飘”年味
  6. 在指定位置上方出现通用jquery悬浮提示框插件全站通用
  7. JSONP简单入门介绍
  8. 【Spring实战4】04---装配Bean(自动装配)
  9. Condition_number
  10. 从C#2.0的角度看.NET 2.0类型系统