SAP MM 并非奇怪现象之MB5B报表里期初库存余额或者期末库存余额为负数?

简介: SAP MM 并非奇怪现象之MB5B报表里期初库存余额或者期末库存余额为负数?

SAP MM 并非奇怪现象之MB5B报表里期初库存余额或者期末库存余额为负数?



笔者在做某个项目的进销存报表优化的的时候,发现了一个奇怪现象:MB5B查某个日期或某个期间的库存的时候,发现有负的库存余额!




以物料为号1400005012为例,MB5B,


image.png



image.png




期初金额与期末金额都是负数?尼玛,这不科学啊!某一天的物料库存余额怎么能为负数呢?笔者很是好奇与不解。于是去上网查资料,发现有不少同行都有发现这个现象! 笔者还发现了某外国同行写的一篇BLOG, 看了这个BLOG,笔者茅塞大开。



如下文字来自互联网该同行的BLOG, 与诸多同行朋友共勉。



https://blogs.sap.com/2008/06/08/mb5b-offers-negative-results-when-executed-per-posting-date/



Many users see negative results when they execute the transaction MB5B for a specific posting date, even when the negative stocks have not been allowed in the customizing.



We need to consider that, at the time of the goods issue, the system only validates whether sufficient stock is available in the complete posting period, and not on a specific posting date.


The stock and value information is kept in the tables on a period basis.


The table entries relate to the complete posting period, and not to a specific posting date.


If there is stock enough in a posting period, the system will indeed allow the posting, even if it does not make sense according to the specific date within the period.


If we were posting the goods issue in a different period in which we do not have stock, the system would indeed send an error message, but if the postings occur in the same period with different dates, the system will not issue any error.


For example, we can have the following situation:

屏幕快照 2021-12-25 下午10.16.15.png


Stock in the period 04/2008

0 PC

 屏幕快照 2021-12-25 下午10.16.50.png


Goods movements in the period 05/2008:



Movement

Posting date

Date of entry

Quantity

Goods Receipt

20.05.2008

20.05.2008

10 PC

Goods Issue

10.05.2008

21.05.2008

10 PC



The system allows this goods issue to be posted with a posting date before than the posting date in the goods receipt because on the period 05/2008 we have stock enough to save this goods movement. The system checks for stock in the whole period, and not to specific dates within the period.


If negative stocks are not allowed in the system, this goods issue could not have been executed with posting date in the previous month (04/2008), because in this period we do not have stock. In this case the system sends the error message M7021 reporting a deficit of stock at Storage Location level in the previous period (M7 021 “Deficit of SL Unrestr. prev. + Quantity: Material, Plant, Storage Location”).


 


In the stocks tables (MARC, MARD, MBEW) the system will never allow negative stocks if you make the settings for negative stocks NOT allowed in Customizing for Inventory Management by using transaction “OMJ1”.



Reports like MB5B (Stock on posting date) can offer negative results when executed for dates previous to the goods receipt, but this is only a reporting issue: if the program is correctly executed for the complete period (month/year), it should never show negative values.


For the example we were discussing before:


MB5B executed with a selection date within the month like 10.05.2008:


image.png

 


Will indeed offer negative stocks:

image.png





However, when executed for the complete posting period with selection date from the 01.05.2008 to the 31.05.2008, the negative stocks are no longer listed:

image.png





So you will need to consider if it makes sense to post a material movement with a posting date lower than acquisition date.


If you do the goods issue posting corresponding to the real goods issue date in your stock, this incidence will be avoided.


相关文章
|
6月前
|
BI
SAP ABAP 报表几个事件的先后执行顺序和作用
SAP ABAP 报表几个事件的先后执行顺序和作用
50 0
|
1月前
|
BI 数据库
SAP ABAP ALV 报表单击某列后执行某段 ABAP 逻辑的实现方式 - hotspot 行为实现试读版
SAP ABAP ALV 报表单击某列后执行某段 ABAP 逻辑的实现方式 - hotspot 行为实现试读版
27 0
|
6月前
|
存储 JSON 搜索推荐
如何在 SAP ABAP ALV 报表里以交通灯的方式显示某一列的值试读版
如何在 SAP ABAP ALV 报表里以交通灯的方式显示某一列的值试读版
73 0
|
3月前
|
供应链 BI
SAP SCM 标准报表 /SAPAPO/SPPFIXREQ 的作用介绍
SAP SCM 标准报表 /SAPAPO/SPPFIXREQ 的作用介绍
21 0
|
5月前
|
BI
利用 ALV 实现增删改查系列之四:如何捕捉 SAP ABAP ALV 报表行项目删除时抛出的事件试读版
利用 ALV 实现增删改查系列之四:如何捕捉 SAP ABAP ALV 报表行项目删除时抛出的事件试读版
49 0
|
6月前
|
SQL BI 应用服务中间件
SAP ABAP 报表进度显示控件的使用详解试读版
SAP ABAP 报表进度显示控件的使用详解试读版
77 0
|
6月前
|
监控 安全
关于在执行 SAP ERP MM 模块 Post Goods Issue 时修改 Material Cost 的讨论
关于在执行 SAP ERP MM 模块 Post Goods Issue 时修改 Material Cost 的讨论
81 0
|
6月前
|
BI 数据库
27 行代码开发一个最简单的 SAP ALV 报表试读版
27 行代码开发一个最简单的 SAP ALV 报表试读版
85 1
|
1月前
|
前端开发 搜索推荐 开发者
SAP UI5 sap.m.Column 控件的 minScreenWidth 属性介绍
SAP UI5 sap.m.Column 控件的 minScreenWidth 属性介绍
27 0
|
1月前
|
JavaScript 前端开发 开发者
SAP UI5 控件 sap.m.ListBase 的 inset 属性的作用介绍
SAP UI5 控件 sap.m.ListBase 的 inset 属性的作用介绍
15 0