首页 > 其他分享 >How to perform Lot Translate Transactions using Transaction Open Interface (MTI) (Doc ID 838305.1)

How to perform Lot Translate Transactions using Transaction Open Interface (MTI) (Doc ID 838305.1)

时间:2024-09-04 11:04:00浏览次数:3  
标签:838305.1 transaction Transactions -- Id Transaction Lot id


 
 
 
 
Click to add to Favorites To BottomTo Bottom

In this Document

  Goal
  Solution
  References

 

Applies to:

Oracle Inventory Management - Version 11.5.10.2 and later
Information in this document applies to any platform.
This document includes all versions of 11i and R12 and later

Goal

How to perform Lot Translate Transactions using Transaction Open Interface (MTL_TRANSACTIONS_INTERFACE)?

Solution

Lot Translate Transaction will translate a Lot Number to an another Lot number. This can be performed using Transaction Open Interface Feature (MTL_TRANSACTIONS_INTERFACE).

Lot Translate Transactions
Lot A ----------------------------------------------------> Lot B
(Starting Lot Number)                                   (Resultant Lot Number)



  • To Perform the Lot Translate Transactions, Two Set of records (Start record and Resultant record) has to be inserted in to the interface tables.
  • For Lot Translate Transactions, There will be only one Resultant Lot Number.
  • Lot translate can translate a single lot to another lot not multiple lots to a lot. If there is a requirement to perform lot translate for multiple lots they will have to perform the translation multiple times.
Specific Instructions for Lot Translate Tranactions to populate the below Mandatory Columns

PARENT_ID
  • This should be populated for both records (Start and Resultant records)
  • This must be equal to TRANSACTION_INTERFACE_ID of the start (parent) transaction (the one with negative quantity). This is vital for lot transactions.

TRANSACTION_BATCH_ID
  • Batch identifier. Should be the same for all the records.
  • It Should be a numeric value.
  • For convenience, this can be same as transaction_header_id.

TRANSACTION_BATCH_SEQ
  • Sequence number of the current record.
  • The Start Record (the one with negative quantity) should have the lowest value
  • The Resultant records should be higher than the Start Record.

TRANSACTION_QUANTITY
  • The transaction_quantity populated for the start and resultant MTI records should be equal
  • The transaction_quantity should be equal to the entire available to transact quantity of that lot in the org/item/sub/locator/LPN.



Example

Let us say there is a Lot "AA0000" with 10 Ea.
If we want to translate this Lot in to a new Lot say "AA0001"

Then MTL_TRANSACTIONS_INTERFACE (MTI) has to be populated as below

INTERFACE_IDHEADER_IDTXN_QUANTITYTXN_BATCH_IDTXN_BATCH_SEQPARENT_ID
100 100 -10 100 1 100
101 100  10 100 2 100



MTL_TRANSACTION_LOTS_INTERFACE (MTLI) would be:

INTERFACE_IDLOT_NUMBERTXN_QUANTITY
100 AA0000 -10
101 AA0001  10




Note: This note is applicable only  to WMS Organizations in 11i and both WMS and non-WMS organizations for R12.




/* Sample Insert Script For Lot Translation */

DECLARE
l_transaction_type_id NUMBER := 84;
l_transaction_action_id NUMBER := 42;
l_transaction_source_type_id NUMBER := 13;
l_org_id NUMBER := 1884;
l_txn_header_id NUMBER;
l_txn_if_id1 NUMBER;
l_txn_if_id2 NUMBER;
l_txn_if_id3 NUMBER;
l_parent_id NUMBER;
l_sysdate DATE;
l_item_id NUMBER :=727226;
l_user_id NUMBER;
l_distribution_account_id NUMBER;
l_exp_date DATE;

BEGIN

--For Lot Translate, there should be only one resultant lot.
--The transaction_quantity populated in MTI/MTLI should be the entire
--quantity that is available to transact for the org/sub/item/locator/LPN in
--that particular lot number.

--Get transaction_header_id for all the MTIs

SELECT APPS.mtl_material_transactions_s.NEXTVAL
INTO l_txn_header_id
FROM sys.dual;

--Get transaction_interface_id of the start record

SELECT APPS.mtl_material_transactions_s.NEXTVAL
INTO l_txn_if_id1
FROM sys.dual;

l_parent_id := l_txn_if_id1;
l_sysdate := SYSDATE;
l_user_id := -1;                    --substitute with a valid user_id
l_distribution_account_id := NULL;  --needed for lot translate
l_exp_date := NULL;                 --set if required

--Populate the MTI record for start (parent) record


INSERT INTO MTL_TRANSACTIONS_INTERFACE
(
transaction_interface_id,
transaction_header_id,
Source_Code,
Source_Line_Id,
Source_Header_Id,
Process_flag,
Transaction_Mode,
Lock_Flag,
Inventory_Item_Id,
revision,
Organization_id,
Subinventory_Code,
Locator_Id,
Transaction_Type_Id,
Transaction_Source_Type_Id,
Transaction_Action_Id,
Transaction_Quantity,
Transaction_UOM,
Primary_Quantity,
Transaction_Date,
Last_Update_Date,
Last_Updated_By,
Creation_Date,
Created_By,
distribution_account_id,
parent_id,
transaction_batch_id,
transaction_batch_seq,
lpn_id,
transfer_lpn_id
)
VALUES
(
l_txn_if_id1,                 --transaction_header_id
l_txn_header_id,              --transaction_interface_id
'INV',                        --source_code
-1,                           --source_header_id
-1,                           --source_line_id
1,                            --process_flag
3,                            --transaction_mode
2,                            --lock_flag
l_item_id,                    --inventory_item_id
null,                         --revision
l_org_id,                     --organization_id
'BULK',                       --subinventory_code
1181,                         --locator_id
l_transaction_type_id,        --transaction_type_id
l_transaction_source_type_id, --transaction_source_type_id
l_transaction_action_Id,      --l_transaction_action_id
-10,                          --transaction_quantity
'EA',                         --transaction_uom
-10,                          --primary_quantity
l_sysdate,                    --Transaction_Date
l_sysdate,                    --Last_Update_Date
l_user_id,                    --Last_Updated_by
l_sysdate,                    --Creation_Date
l_user_id,                    --Created_by
l_distribution_account_id,    --distribution_account_id
l_parent_id,                  --parent_id
l_txn_header_id,              --transaction_batch_id
1,                            --transaction_batch_seq (1 for parent the lowest)
NULL,                         --lpn_id (for source MTI)
NULL                          --transfer_lpn_id (for resultant MTIs)
);

--Insert MTLI corresponding to the start MTI record

INSERT INTO MTL_TRANSACTION_LOTS_INTERFACE(
transaction_interface_id
, Source_Code
, Source_Line_Id
, Process_Flag
, Last_Update_Date
, Last_Updated_By
, Creation_Date
, Created_By
, Lot_Number
, lot_expiration_date
, Transaction_Quantity
, Primary_Quantity
)
VALUES (
l_txn_if_id1                   --transaction_interface_id
, 'INV'                        --Source_Code
, -1                           --Source_Line_Id
, 'Y'                          --Process_Flag
, l_sysdate                    --Last_Update_Date
, l_user_id                    --Last_Updated_by
, l_sysdate                    --Creation_date
, l_user_id                    --Created_By
, 'AA0000'                     --Lot_Number
, l_exp_date                   --Lot_Expiration_Date
, -10                          --transaction_quantity
, -10                          --primary_quantity
);

--Get transaction_interface_id of resultant record

SELECT APPS.mtl_material_transactions_s.NEXTVAL
INTO l_txn_if_id2
FROM sys.dual;

--Populate the MTI record for resultant record

INSERT INTO MTL_TRANSACTIONS_INTERFACE
(
transaction_interface_id,
transaction_header_id,
Source_Code,
Source_Line_Id,
Source_Header_Id,
Process_flag,
Transaction_Mode,
Lock_Flag,
Inventory_Item_Id,
revision,
Organization_id,
Subinventory_Code,
Locator_Id,
Transaction_Type_Id,
Transaction_Source_Type_Id,
Transaction_Action_Id,
Transaction_Quantity,
Transaction_UOM,
Primary_Quantity,
Transaction_Date,
Last_Update_Date,
Last_Updated_By,
Creation_Date,
Created_By,
distribution_account_id,
parent_id,
transaction_batch_id,
transaction_batch_seq,
lpn_id,
transfer_lpn_id
)
VALUES
(
l_txn_if_id2,                    --transaction_header_id
l_txn_header_id,                 --transaction_interface_id
'INV',                           --source_code
-1,                              --source_header_id
-1,                              --source_line_id
1,                               --process_flag
3,                               --transaction_mode
2,                               --lock_flag
l_item_id,                       --inventory_item_id
null,                            --revision
l_org_id,                        --organization_id
'BULK',                          --subinventory_code
1181,                            --locator_id
l_transaction_type_id,           --transaction_type_id
l_transaction_source_type_id,    --transaction_source_type_id
l_transaction_action_Id,         --transaction_action_id
10,                              --transaction_quantity
'EA',                            --transaction_uom
10,                              --primary_quantity
l_sysdate,                       --Transaction_Date
l_sysdate,                       --Last_Update_Date
l_user_id,                       --Last_Updated_by
l_sysdate,                       --Creation_Date
l_user_id,                       --Created_by
l_distribution_account_id,       --distribution_account_id
l_parent_id,                     --parent_id
l_txn_header_id,                 --transaction_batch_id
2,                               --transaction_batch_seq (2 for child )
NULL,                            --lpn_id (for source MTI)
NULL                             --transfer_lpn_id (for resultant MTIs)
);

--Insert MTLI corresponding to the resulstant record

INSERT INTO MTL_TRANSACTION_LOTS_INTERFACE(
transaction_interface_id
, Source_Code
, Source_Line_Id
, Process_Flag
, Last_Update_Date
, Last_Updated_By
, Creation_Date
, Created_By
, Lot_Number
, lot_expiration_date
, Transaction_Quantity
, Primary_Quantity
)
VALUES (
l_txn_if_id2                     --transaction_interface_id
, 'INV'                          --Source_Code
, -1                             --Source_Line_Id
, 'Y'                            --Process_Flag
, l_sysdate                      --Last_Update_Date
, l_user_id                      --Last_Updated_by
, l_sysdate                      --Creation_date
, l_user_id                      --Created_By
, 'AA0001'                       --Lot_Number
, l_exp_date                     --Lot_Expiration_Date
, 10                             --transaction_quantity
, 10                             --primary_quantity
);
END;

/



References

BUG:5213502 - WANT TO INSERT LOT SPLIT TXNS VIA OPEN TRANSACTION INTERFACE
BUG:4494207 - GETTING ERROR ON A LOT TRANSLATE USING THE MTL_TRANSACTIONS_INTERFACE TABLE
BUG:7364573 - LOT TRANSLATE TRANSACTION VIA MTL_TRANSACTIONS_INTERFACE ERRORS
 
 
 

Was this document helpful?

 
 
 
 
     
 
 
 

Document Details

 
Email link to this documentOpen document in new windowPrintable Page
   
 
 
 
 
 
   
  HOWTO
  PUBLISHED
  23-Feb-2017
  24-May-2023
 
     
 
 

Related Products

 
Oracle Inventory Management  
     
 
 

Information Centers

 
    Oracle Catalog: Information Centers and Advisors for All Products and Services [50.2] Privacy and Security Feature Guidance for all Oracle Products (On Premise) [113.2]
     
 
 

Document References

 
  No References available for this document.  
     
 
 

Recently Viewed

 
How To Perform Lot Split/Translate Transaction In Inventory 12.1.1? [1113824.1]
Identifying the Latest Critical Patch Update for Oracle E-Business Suite Release 12.2 [2484000.1]
Advanced use of DBMS_JOB.SUBMIT ''interval'' Parameter [312547.1]
Oracle E-Business Suite Release 12.2 Information Center [1581299.1]
Oracle E-Business Suite Release 12.2 Technology Stack Documentation Roadmap [1934915.1]
  Show More
     
Didn't find w
 

标签:838305.1,transaction,Transactions,--,Id,Transaction,Lot,id
From: https://www.cnblogs.com/xiaoL/p/18396073

相关文章

  • 使用@Transactional引起P1级事故分析
    背景在最近的项目开发中,遇到了一个关于版本号递增出现重复数据的问题。我们使用了Redisson分布式锁来确保自定义版本号的唯一性。在创建版本号的方法中,我们使用了Redisson来锁住创建版本的代码,并在该方法上添加了Spring的声明式事务注解@Transactional。然而,在使用JMeter......
  • SAP B1 无对象表或者没有含自动增量的对象,如何通过SBO_SP_TransactionNotification控
       SAPB1中无对象或者没有含自动增量的对象表,在SBO_SP_TransactionNotification中object_type规则:-3+Tab键+@表名例如:创建无对象表IPS_OITM,则object_type值为:[-3@IPS_OITM]特别注意:如果用的是没有含自动增量的对象表,必须要在Name字段中输入值才会触发SBO控制的存储过程......
  • 工作 6 年,@Transactional 注解用的一塌糊涂
    接手新项目一言难尽,别的不说单单就一个@Transactional注解用的一塌糊涂,五花八门的用法,很大部分还失效无法回滚。有意识的在涉及事务相关方法上加@Transactional注解,是个好习惯。不过,很多同学只是下意识地添加这个注解,一旦功能正常运行,很少有人会深入验证异常情况下事务是否能......
  • 工作 6 年,@Transactional 注解用的一塌糊涂
    接手新项目一言难尽,别的不说单单就一个@Transactional注解用的一塌糊涂,五花八门的用法,很大部分还失效无法回滚。有意识的在涉及事务相关方法上加@Transactional注解,是个好习惯。不过,很多同学只是下意识地添加这个注解,一旦功能正常运行,很少有人会深入验证异常情况下事务是否能正确......
  • 工作 6 年,@Transactional 注解用的一塌糊涂
    接手新项目一言难尽,别的不说单单就一个@Transactional注解用的一塌糊涂,五花八门的用法,很大部分还失效无法回滚。有意识的在涉及事务相关方法上加@Transactional注解,是个好习惯。不过,很多同学只是下意识地添加这个注解,一旦功能正常运行,很少有人会深入验证异常情况下事务是否能......
  • 【OCPP】ocpp1.6协议第5.11章节Remote Start Transaction的介绍及翻译
    目录5.11RemoteStartTransaction-概述1.目的2.消息类型2.1RemoteStartTransaction.req2.2RemoteStartTransaction.conf3.流程描述4.状态和值域5.特殊情况5.11远程启动交易RemoteStartTransaction-原文译文5.11RemoteStartTransaction-概述在OCPP......
  • Spring事务(Transaction)
    1Spring事务简洁概况事务(Transaction)是基于关系型数据库(RDBMS)的企业应用的重要组成部分。在软件开发领域,事务扮演者十分重要的角色,用来确保应用程序数据的完整性和一致性。事务具有4个特性:原子性、一致性、隔离性和持久性,简称为ACID特性。原子性(Atomicity):一个事务是一......
  • 问:@Async和@Transaction可以一起使用吗?
     在Java中,@Async和@Transaction注解是可以一起使用的,但需要注意一些细节和潜在问题。 1.@Async和@Transactions注解@Async注解:用于异步执行方法。使用此注解的方法会在单独线程中执行,而不会阻塞调用线程。在需要执行耗时操作而不希望阻塞主线程时非常有用。......
  • Spring-transaction 事务
    1.事务介绍1.1简介事务,就是一组操作数据库的动作集合。事务是现代数据库理论中的核心概念之一。如果一组处理步骤或者全部发生或者一步也不执行,我们称该组处理步骤为一个事务。当所有的步骤像一个操作一样被完整地执行,我们称该事务被提交。由于其中的一部分或多步执行失败,导致......
  • Springboot 解决mongodb transaction WriteConflict问题
     参考原文:  https://segmentfault.com/a/1190000040457995?sort=newest问题:  使用Mongodb的事务:pringframework.data.mongodb.UncategorizedMongoDbException:Commandfailedwitherror112(WriteConflict):'WriteConflict'WriteConflicterror:thisoperationco......