The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT COUNT(1)
INTO dummy
FROM mtl_secondary_inventories
WHERE organization_id = x_organization_id
AND secondary_inventory_name = x_secondary_inventory_name
AND((x_rowid IS NULL)
OR(ROWID <> x_rowid));
PROCEDURE insert_row(
x_rowid IN OUT nocopy VARCHAR2
, x_secondary_inventory_name VARCHAR2
, x_organization_id NUMBER
, x_last_update_date DATE
, x_last_updated_by NUMBER
, x_creation_date DATE
, x_created_by NUMBER
, x_last_update_login NUMBER
, x_description VARCHAR2
, x_disable_date DATE
, x_inventory_atp_code NUMBER
, x_availability_type NUMBER
, x_reservable_type NUMBER
, x_locator_type NUMBER
, x_picking_order NUMBER
, x_dropping_order NUMBER
, x_material_account NUMBER
, x_material_overhead_account NUMBER
, x_resource_account NUMBER
, x_overhead_account NUMBER
, x_outside_processing_account NUMBER
, x_quantity_tracked NUMBER
, x_asset_inventory NUMBER
, x_source_type NUMBER
, x_source_subinventory VARCHAR2
, x_source_organization_id NUMBER
, x_requisition_approval_type NUMBER
, x_expense_account NUMBER
, x_encumbrance_account NUMBER
, x_attribute_category VARCHAR2
, x_attribute1 VARCHAR2
, x_attribute2 VARCHAR2
, x_attribute3 VARCHAR2
, x_attribute4 VARCHAR2
, x_attribute5 VARCHAR2
, x_attribute6 VARCHAR2
, x_attribute7 VARCHAR2
, x_attribute8 VARCHAR2
, x_attribute9 VARCHAR2
, x_attribute10 VARCHAR2
, x_attribute11 VARCHAR2
, x_attribute12 VARCHAR2
, x_attribute13 VARCHAR2
, x_attribute14 VARCHAR2
, x_attribute15 VARCHAR2
, x_preprocessing_lead_time NUMBER
, x_processing_lead_time NUMBER
, x_postprocessing_lead_time NUMBER
, x_demand_class VARCHAR2
, x_project_id NUMBER
, x_task_id NUMBER
, x_subinventory_usage NUMBER
, x_notify_list_id NUMBER
, x_depreciable_flag NUMBER
, x_location_id NUMBER
, x_status_id NUMBER
, x_default_loc_status_id NUMBER
, x_lpn_controlled_flag NUMBER
, x_default_cost_group_id NUMBER
/* As per bug 1584641 */
--, X_pick_methodology NUMBER
, x_pick_uom_code VARCHAR2
, x_cartonization_flag NUMBER
, x_planning_level NUMBER DEFAULT 2
, x_default_count_type_code NUMBER DEFAULT 2
, x_subinventory_type NUMBER DEFAULT 1--RCVLOCATORSSUPPORT
, x_enable_bulk_pick VARCHAR2 DEFAULT 'N'
, x_enable_locator_alias VARCHAR2 DEFAULT 'N'
, x_enforce_alias_uniqueness VARCHAR2 DEFAULT 'N'
) IS
CURSOR c IS
SELECT ROWID
FROM mtl_secondary_inventories
WHERE organization_id = x_organization_id
AND secondary_inventory_name = x_secondary_inventory_name;
INSERT INTO mtl_secondary_inventories
(
secondary_inventory_name
, organization_id
, last_update_date
, last_updated_by
, creation_date
, created_by
, last_update_login
, description
, disable_date
, inventory_atp_code
, availability_type
, reservable_type
, locator_type
, picking_order
, dropping_order
, material_account
, material_overhead_account
, resource_account
, overhead_account
, outside_processing_account
, quantity_tracked
, asset_inventory
, source_type
, source_subinventory
, source_organization_id
, requisition_approval_type
, expense_account
, encumbrance_account
, attribute_category
, attribute1
, attribute2
, attribute3
, attribute4
, attribute5
, attribute6
, attribute7
, attribute8
, attribute9
, attribute10
, attribute11
, attribute12
, attribute13
, attribute14
, attribute15
, preprocessing_lead_time
, processing_lead_time
, postprocessing_lead_time
, demand_class
, project_id
, task_id
, subinventory_usage
, notify_list_id
, depreciable_flag
, location_id
, status_id
, default_loc_status_id
, lpn_controlled_flag
, default_cost_group_id
/* As per bug 1584641 */
-- ,pick_methodology
, pick_uom_code
, cartonization_flag
, planning_level
, default_count_type_code
, subinventory_type
, enable_bulk_pick
, enable_locator_alias
, enforce_alias_uniqueness
)
VALUES (
x_secondary_inventory_name
, x_organization_id
, x_last_update_date
, x_last_updated_by
, x_creation_date
, x_created_by
, x_last_update_login
, x_description
, x_disable_date
, x_inventory_atp_code
, x_availability_type
, x_reservable_type
, x_locator_type
, x_picking_order
, x_dropping_order
, x_material_account
, x_material_overhead_account
, x_resource_account
, x_overhead_account
, x_outside_processing_account
, x_quantity_tracked
, x_asset_inventory
, x_source_type
, x_source_subinventory
, x_source_organization_id
, x_requisition_approval_type
, x_expense_account
, x_encumbrance_account
, x_attribute_category
, x_attribute1
, x_attribute2
, x_attribute3
, x_attribute4
, x_attribute5
, x_attribute6
, x_attribute7
, x_attribute8
, x_attribute9
, x_attribute10
, x_attribute11
, x_attribute12
, x_attribute13
, x_attribute14
, x_attribute15
, x_preprocessing_lead_time
, x_processing_lead_time
, x_postprocessing_lead_time
, x_demand_class
, x_project_id
, x_task_id
, x_subinventory_usage
, x_notify_list_id
, x_depreciable_flag
, x_location_id
, x_status_id
, x_default_loc_status_id
, x_lpn_controlled_flag
, x_default_cost_group_id
/* As per bug 1584641 */
--, X_pick_methodology
, x_pick_uom_code
, x_cartonization_flag
, x_planning_level
, x_default_count_type_code
, x_subinventory_type
, x_enable_bulk_pick
, x_enable_locator_alias
, x_enforce_alias_uniqueness
);
This Procedure Caters to the insertion of records in the
table MTL_MATERIAL_STATUS_HISTORY. */
/* Commenting this code because for status history we want to capture from where
status was updated (Desktop or Mobile) and so we will make a call to this procedure
explicitly instead of calling it indirectly
Bug # 1695432
IF (INV_INSTALL.ADV_INV_INSTALLED(p_Organization_ID => NULL))
AND (X_Status_ID IS NOT NULL) THEN
Status_History ( X_Organization_ID,
NULL,
NULL,
NULL,
2,
X_Status_ID,
X_Secondary_Inventory_Name,
NULL,
X_Creation_Date ,
X_Created_By,
X_Last_Updated_By,
X_Last_Update_Date,
X_Last_Update_Login,
'Y',
'Y');
END insert_row;
SELECT *
FROM mtl_secondary_inventories
WHERE ROWID = x_rowid
FOR UPDATE OF organization_id NOWAIT;
fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
PROCEDURE update_row(
x_rowid VARCHAR2
, x_secondary_inventory_name VARCHAR2
, x_organization_id NUMBER
, x_last_update_date DATE
, x_last_updated_by NUMBER
, x_last_update_login NUMBER
, x_description VARCHAR2
, x_disable_date DATE
, x_inventory_atp_code NUMBER
, x_availability_type NUMBER
, x_reservable_type NUMBER
, x_locator_type NUMBER
, x_picking_order NUMBER
, x_dropping_order NUMBER
, x_material_account NUMBER
, x_material_overhead_account NUMBER
, x_resource_account NUMBER
, x_overhead_account NUMBER
, x_outside_processing_account NUMBER
, x_quantity_tracked NUMBER
, x_asset_inventory NUMBER
, x_source_type NUMBER
, x_source_subinventory VARCHAR2
, x_source_organization_id NUMBER
, x_requisition_approval_type NUMBER
, x_expense_account NUMBER
, x_encumbrance_account NUMBER
, x_attribute_category VARCHAR2
, x_attribute1 VARCHAR2
, x_attribute2 VARCHAR2
, x_attribute3 VARCHAR2
, x_attribute4 VARCHAR2
, x_attribute5 VARCHAR2
, x_attribute6 VARCHAR2
, x_attribute7 VARCHAR2
, x_attribute8 VARCHAR2
, x_attribute9 VARCHAR2
, x_attribute10 VARCHAR2
, x_attribute11 VARCHAR2
, x_attribute12 VARCHAR2
, x_attribute13 VARCHAR2
, x_attribute14 VARCHAR2
, x_attribute15 VARCHAR2
, x_preprocessing_lead_time NUMBER
, x_processing_lead_time NUMBER
, x_postprocessing_lead_time NUMBER
, x_demand_class VARCHAR2
, x_project_id NUMBER
, x_task_id NUMBER
, x_subinventory_usage NUMBER
, x_notify_list_id NUMBER
, x_depreciable_flag NUMBER
, x_location_id NUMBER
, x_status_id NUMBER
, x_default_loc_status_id NUMBER
, x_lpn_controlled_flag NUMBER
, x_default_cost_group_id NUMBER
/* As per bug 1584641 */
-- ,X_pick_methodology NUMBER
, x_pick_uom_code VARCHAR2
, x_cartonization_flag NUMBER
, x_planning_level NUMBER DEFAULT 2
, x_default_count_type_code NUMBER DEFAULT 2
, x_subinventory_type NUMBER DEFAULT 1--RCVLOCATORSSUPPORT
, x_enable_bulk_pick VARCHAR2 DEFAULT 'N'
, x_enable_locator_alias VARCHAR2 DEFAULT 'N'
, x_enforce_alias_uniqueness VARCHAR2 DEFAULT 'N'
) IS
l_status_id NUMBER;
SELECT status_id
INTO l_status_id
FROM mtl_secondary_inventories
WHERE ROWID = x_rowid;
UPDATE mtl_secondary_inventories
SET secondary_inventory_name = x_secondary_inventory_name
, organization_id = x_organization_id
, last_update_date = x_last_update_date
, last_updated_by = x_last_updated_by
, last_update_login = x_last_update_login
, description = x_description
, disable_date = x_disable_date
, inventory_atp_code = x_inventory_atp_code
, availability_type = x_availability_type
, reservable_type = x_reservable_type
, locator_type = x_locator_type
, picking_order = x_picking_order
, dropping_order = x_dropping_order
, material_account = x_material_account
, material_overhead_account = x_material_overhead_account
, resource_account = x_resource_account
, overhead_account = x_overhead_account
, outside_processing_account = x_outside_processing_account
, quantity_tracked = x_quantity_tracked
, asset_inventory = x_asset_inventory
, source_type = x_source_type
, source_subinventory = x_source_subinventory
, source_organization_id = x_source_organization_id
, requisition_approval_type = x_requisition_approval_type
, expense_account = x_expense_account
, encumbrance_account = x_encumbrance_account
, attribute_category = x_attribute_category
, attribute1 = x_attribute1
, attribute2 = x_attribute2
, attribute3 = x_attribute3
, attribute4 = x_attribute4
, attribute5 = x_attribute5
, attribute6 = x_attribute6
, attribute7 = x_attribute7
, attribute8 = x_attribute8
, attribute9 = x_attribute9
, attribute10 = x_attribute10
, attribute11 = x_attribute11
, attribute12 = x_attribute12
, attribute13 = x_attribute13
, attribute14 = x_attribute14
, attribute15 = x_attribute15
, preprocessing_lead_time = x_preprocessing_lead_time
, processing_lead_time = x_processing_lead_time
, postprocessing_lead_time = x_postprocessing_lead_time
, demand_class = x_demand_class
, project_id = x_project_id
, task_id = x_task_id
, subinventory_usage = x_subinventory_usage
, notify_list_id = x_notify_list_id
, depreciable_flag = x_depreciable_flag
, location_id = x_location_id
, status_id = x_status_id
, default_loc_status_id = x_default_loc_status_id
, lpn_controlled_flag = x_lpn_controlled_flag
, default_cost_group_id = x_default_cost_group_id
/* As per bug 1584641 */
-- , pick_methodology = X_pick_methodology
, pick_uom_code = x_pick_uom_code
, cartonization_flag = x_cartonization_flag
, planning_level = x_planning_level
, default_count_type_code = x_default_count_type_code
, subinventory_type = x_subinventory_type
, enable_bulk_pick = x_enable_bulk_pick
, enable_locator_alias = x_enable_locator_alias
, enforce_alias_uniqueness = x_enforce_alias_uniqueness
WHERE ROWID = x_rowid;
This Procedure Caters to the insertion of records in the
table MTL_MATERIAL_STATUS_HISTORY. */
/* Commenting this code because for status history we want to capture from where
status was updated (Desktop or Mobile) and so we will make a call to this procedure
explicitly instead of calling it indirectly
Bug # 1695432
IF (INV_INSTALL.ADV_INV_INSTALLED(P_Organization_ID => NULL)) AND
(X_Status_ID IS NOT NULL) AND
(X_Status_ID <> l_status_id) THEN
Status_History ( X_Organization_ID,
NULL,
NULL,
NULL,
2,
X_Status_ID,
X_Secondary_Inventory_Name,
NULL,
X_Last_Update_Date,
X_Last_Updated_By,
X_Last_Updated_By,
X_Last_Update_Date,
X_Last_Update_Login,
NULL
);
END update_row;
PROCEDURE delete_row(x_rowid VARCHAR2) IS
BEGIN
DELETE FROM mtl_secondary_inventories
WHERE ROWID = x_rowid;
END delete_row;
This Procedure Caters to the insertion of records in the
table MTL_MATERIAL_STATUS_HISTORY. */
PROCEDURE status_history(
x_organization_id NUMBER
, x_inventory_item_id NUMBER
, x_lot_number VARCHAR2
, x_serial_number VARCHAR2
, x_update_method NUMBER
, x_status_id NUMBER
, x_zone_code VARCHAR2
, x_locator_id NUMBER
, x_creation_date DATE
, x_created_by NUMBER
, x_last_updated_by NUMBER
, x_last_update_date DATE
, x_last_update_login NUMBER
, x_initial_status_flag VARCHAR2 DEFAULT NULL
, x_from_mobile_apps_flag VARCHAR2 DEFAULT NULL
) IS
p_status inv_material_status_pub.mtl_status_update_rec_type;
p_status.update_method := x_update_method;
/* p_Status.Last_Updated_By := X_Last_Updated_By; */
p_status.last_update_date := x_last_update_date;
p_status.last_update_login := x_last_update_login;
inv_material_status_pkg.insert_status_history(p_status);