杂项问题事务抛出 "Negative Balances Not Allowed"

Miscellaneous Issue transaction throws "Negative Balances Not Allowed"

我正在将数据插入事务接口 table,然后 运行 并发程序 "Process Interface"。它错误地完成。在 Transaction Open Interface 中出现错误 Negative Balances Not Allowed

它用于批次控制项目,所以我也将数据插入 mtl_transaction_lots_interface。我插入的交易数量为负数,因为它是杂项问题交易。并发程序后连初级量都由正变负

我已经检查了所有项目属性。他们是正确的。此外,此项目也有现有数量。没有未处理的待处理交易,其作用类似于减少库存的预订。

请帮忙找出问题所在。

这是插入脚本:-

INSERT INTO mtl_transactions_interface ( transaction_interface_id,
                                         source_code,
                                         source_line_id,
                                         source_header_id,
                                         process_flag,
                                         validation_required,
                                         lock_flag,
                                         transaction_mode,
                                         last_update_date,
                                         last_updated_by,
                                         creation_date,
                                         created_by,
                                         last_update_login,
                                         inventory_item_id,
                                         organization_id,
                                         transaction_quantity,
                                         primary_quantity,
                                         transaction_uom,,
                                         transaction_date,
                                         subinventory_code,
                                         transaction_type_id,,
                                         transaction_source_id,
                                         distribution_account_id,
                                         reason_id,
                                         transaction_reference
                                       )
VALUES ( 1234567,
         TRIM( 'On_Hand_Conversion' ),
         1,
         1,
         1,
         1,
         2,
         3,
         SYSDATE,
         -1,
         SYSDATE,
         4994,
         -1,
         2505,
         342,
         -5,
         5,
         'COL',
         SYSDATE,
         '9D00',
         32,
         NULL,
         2227526,
         364,
         'TEST1' );

INSERT INTO mtl_transaction_lots_interface ( transaction_interface_id,
                                             lot_number,
                                             lot_expiration_date,
                                             transaction_quantity,
                                             last_update_date,
                                             last_updated_by,
                                             creation_date,
                                             created_by
                                           )
VALUES ( 1234567,
         '27390BU-000003',
         SYSDATE + 100,
         -5,
         SYSDATE,
         0,
         SYSDATE,
         0 );

问题现已解决。

子库存下该批次的现有量为零。 早些时候我只是检查手头的物品数量。

下面提到的 Oracle metalink 文档非常有用。

  1. 解决库存错误:不允许出现负余额(文档 ID 1916111.1)
  2. 使用物品和批次可用性功能查找手头 (CHECK_AVAIL) (Doc ID 387568.1)