Search This Blog

Saturday, March 17, 2018

Oracle Apps R12 Item Creation in Inventory master Org

CREATE TABLE XX_INV_ITEM_INTER_STG
(ITEM_CODE VARCHAR(30),
DESCRIPTION VARCHAR(2000),
UOM VARCHAR(30),
USER_ITEM_TYPE VARCHAR(30),
COST_OF_GOODS_ACT VARCHAR(100),
PROCESS_FLAG VARCHAR(1),
ERROR_MSG VARCHAR(2000),
ATTRIBUTE1 VARCHAR(240),
ATTRIBUTE2 VARCHAR(240),
ATTRIBUTE3 VARCHAR(240),
ATTRIBUTE4 VARCHAR(240),
ATTRIBUTE5 VARCHAR(240)
);

--truncate table XX_INV_ITEM_INTER_STG

commit

--select statement
SELECT organization_id, process_flag, set_process_id, transaction_type,segment1, description
,PRIMARY_UOM_CODE
,ITEM_TYPE
,COST_OF_SALES_ACCOUNT
,COSTING_ENABLED_FLAG
,INVENTORY_ASSET_FLAG
,PURCHASING_ENABLED_FLAG
,INVENTORY_ITEM_FLAG
,STOCK_ENABLED_FLAG
,INVOICEABLE_ITEM_FLAG
,INVOICE_ENABLED_FLAG FROM mtl_system_items_interface


--to insert single item and import item concurrent program
INSERT INTO mtl_system_items_interface
(organization_id, process_flag, set_process_id, transaction_type,segment1, description
,PRIMARY_UOM_CODE
,ITEM_TYPE
,COST_OF_SALES_ACCOUNT
,COSTING_ENABLED_FLAG
,INVENTORY_ASSET_FLAG
,PURCHASING_ENABLED_FLAG
,PURCHASING_ITEM_FLAG
,INVENTORY_ITEM_FLAG
,STOCK_ENABLED_FLAG
,INVOICEABLE_ITEM_FLAG
,INVOICE_ENABLED_FLAG)
 VALUES
(    1771,        -- organization_id
       1,        -- process_flag the value "1" mean the item ready to be imported.
       1,        -- set_process_id, this is group id and is used as the "Process Set" in the IOI report  submission
'CREATE',        -- transaction_type
'Test3',   -- segment1 the Item name that is displayed or printed.
'Demo of item creation'
,'KG'
,UPPER('FG')
,3351191
,'Y'
,'Y'
,'Y'
,'Y'
,'Y'
,'Y'
,'Y'
,'Y'
);

COMMIT


-------------------------Concurrent Program:--------------------------------------
Import Items in Inventory Super User
Select Organization 'Inventory Master Org'

All Organizations: No
Validate Items: Yes
Process Items : Yes
Delete Processed Rows : No
Process Set : 1
Create or Update Items: 1
Gather Statistics: No

---to  insert into interface table from the custom table created

INSERT INTO mtl_system_items_interface
(organization_id, process_flag, set_process_id, transaction_type,segment1, description
,PRIMARY_UOM_CODE
,ITEM_TYPE
,COST_OF_SALES_ACCOUNT
,COSTING_ENABLED_FLAG
,INVENTORY_ASSET_FLAG
,PURCHASING_ENABLED_FLAG
,PURCHASING_ITEM_FLAG
,INVENTORY_ITEM_FLAG
,STOCK_ENABLED_FLAG
,INVOICEABLE_ITEM_FLAG
,INVOICE_ENABLED_FLAG)
 SELECT
    1771,        -- organization_id
       1,        -- process_flag the value "1" mean the item ready to be imported.
       1,        -- set_process_id, this is group id and is used as the "Process Set" in the IOI report  submission
'CREATE',        -- transaction_type
ITEM_CODE,   -- segment1 the Item name that is displayed or printed.
DESCRIPTION
,UOM
,USER_ITEM_TYPE
,COST_OF_GOODS_ACT
,'Y'
,'Y'
,'Y'
,'Y'
,'Y'
,'Y'
,'Y'
,'Y'
 FROM XX_INV_ITEM_INTER_STG

 commit
 ----------------------------------------------------------------
 

No comments:

Post a Comment