We need to create a customer table :-
CREATE TABLE XX_STOCK
( sl_no number,
organization_name varchar2(30),
organization_id number,
item varchar2(20),
item_id number,
uom varchar2(3),
subinventory varchar2(10),
quantity number,
lot varchar2(30),
txn_date date,
ucost number
);
We need to populate customer table with proper data. Then we need to insert all the data in interface tables. If items are lot enabled we need also to populate lot interface data.
INSERT INTO MTL_TRANSACTIONS_INTERFACE
( process_flag ,
validation_required ,
transaction_mode ,
lock_flag ,
last_update_date ,
last_updated_by ,
creation_date ,
created_by ,
inventory_item_id ,
organization_id ,
transaction_quantity ,
primary_quantity ,
transaction_uom ,
transaction_date ,
subinventory_code ,
transaction_action_id ,
transaction_type_id ,
transaction_interface_id ,
source_code ,
source_line_id ,
source_header_id ,
distribution_account_id ,
transaction_cost )
select
1 ,
1 ,
3 ,
2 ,
txn_date ,
1114 ,
txn_date ,
1114 ,
item_id ,
organization_id ,
quantity ,
quantity ,
UOM ,
txn_date ,
subinventory ,
27 ,
42 ,
sl_no ,
'Stock_upload' ,
sl_no ,
-1 ,
3723 ,
ucost
FROM XX_STOCK;
INSERT INTO MTL_TRANSACTION_LOTS_INTERFACE ( TRANSACTION_INTERFACE_ID ,
LAST_UPDATE_DATE ,
LAST_UPDATED_BY ,
CREATION_DATE ,
CREATED_BY ,
LOT_NUMBER ,
TRANSACTION_QUANTITY ,
PROCESS_FLAG ,
SOURCE_CODE ,
SOURCE_LINE_ID
)
SELECT
sl_no ,
txn_date ,
1114 ,
txn_date ,
1114 ,
lot ,
quantity ,
1 ,
'Stock_upload' ,
sl_no
FROM XX_STOCK;
Launch Material Transaction from Inventory Interface Manager.
N:- Inventory>Setup>Transaction>Interface Managers
It will launch 'Process transaction interface' and 'Process transaction interface' will call 'Inventory transaction worker'
CREATE TABLE XX_STOCK
( sl_no number,
organization_name varchar2(30),
organization_id number,
item varchar2(20),
item_id number,
uom varchar2(3),
subinventory varchar2(10),
quantity number,
lot varchar2(30),
txn_date date,
ucost number
);
We need to populate customer table with proper data. Then we need to insert all the data in interface tables. If items are lot enabled we need also to populate lot interface data.
INSERT INTO MTL_TRANSACTIONS_INTERFACE
( process_flag ,
validation_required ,
transaction_mode ,
lock_flag ,
last_update_date ,
last_updated_by ,
creation_date ,
created_by ,
inventory_item_id ,
organization_id ,
transaction_quantity ,
primary_quantity ,
transaction_uom ,
transaction_date ,
subinventory_code ,
transaction_action_id ,
transaction_type_id ,
transaction_interface_id ,
source_code ,
source_line_id ,
source_header_id ,
distribution_account_id ,
transaction_cost )
select
1 ,
1 ,
3 ,
2 ,
txn_date ,
1114 ,
txn_date ,
1114 ,
item_id ,
organization_id ,
quantity ,
quantity ,
UOM ,
txn_date ,
subinventory ,
27 ,
42 ,
sl_no ,
'Stock_upload' ,
sl_no ,
-1 ,
3723 ,
ucost
FROM XX_STOCK;
INSERT INTO MTL_TRANSACTION_LOTS_INTERFACE ( TRANSACTION_INTERFACE_ID ,
LAST_UPDATE_DATE ,
LAST_UPDATED_BY ,
CREATION_DATE ,
CREATED_BY ,
LOT_NUMBER ,
TRANSACTION_QUANTITY ,
PROCESS_FLAG ,
SOURCE_CODE ,
SOURCE_LINE_ID
)
SELECT
sl_no ,
txn_date ,
1114 ,
txn_date ,
1114 ,
lot ,
quantity ,
1 ,
'Stock_upload' ,
sl_no
FROM XX_STOCK;
Launch Material Transaction from Inventory Interface Manager.
N:- Inventory>Setup>Transaction>Interface Managers
It will launch 'Process transaction interface' and 'Process transaction interface' will call 'Inventory transaction worker'
thanks for sharing man!
ReplyDelete