Negative Stock in "Stock in Transit"
虽然不允许Negative Stock(OMJ1),MARC-XMCNG也不允许,
但在途库存仍然变成负数。MARD-UMLME, MCHB-CUMLM Stock in transfer (from one storage location to another)
该情况仅主要发生在IDOC Posting(例如message type WMMBXY), BAPI_GOODSMVT_CREATE BAPI, 或多个用户一起在线操作。
该情况的业务场景主要涉及2步的库存转移storage location to storage location (移动类型313,315)或2步的plant to plant(移动类型303,305)
产生负数的一个原因在于late block已打开(OMJI).但库存移动315在同一个roll area, 接下来的IDOC读取缓存数据而不是读数据表,而这个IDOC恰恰与前一个IDOC要更新的物料是一个.
Note 67267: For goods movements that are updated via function module MB_CREATE_GOODS_MOVEMENTS, the prefetch for the material master is
performed with reset BUFFER although the late material block is set for goods movements.
解决方法如下:
1. 选择将2步移动改为1步移动. 移动类型311(unrestricted to unrestricted, storage location to storage location)或301(plant to plant)
2. 或者做modification, Note 194070.主要是将"clear KZRFB” (Indicator: reset buffer for Material_Pre_Fetch)保留.
KZRFB.*>>>> START OF DELETION <<<<<
CLEAR KZRFB.
ENDIF.
*>>>> END OF DELETION <<<<<<<
3. 参考note 369518
LOOP.
....
CALL FUNCTION func1 DESTINATION 'NONE'. -->the system opens a new roll area.
CALL FUNCTION RFC_CONNECTION_CLOSE. --->function module closes the roll area of the function module
....
ENDLOOP.