The following lines contain the word 'select', 'insert', 'update' or 'delete':
mtlRec MtlRecord; -- record to populate and insert
mtlRec.last_update_date := sysdate;
mtlRec.last_updated_by := param.environment.userID;
* This function is used to insert the record encapsulated in mtlRec to
* table MMTT and some furthur validation and processing.
*
* HISTORY:
* 30-DEC-2004 spondalu Bug 4093569: eAM-WMS Integration enhancements:
* Insert rebuild_item_id into mti.
*/
Function put(mtlRec MtlRecord, errMsg OUT NOCOPY VARCHAR2) return boolean IS
l_retStatus VARCHAR2(1);
INSERT INTO mtl_transactions_interface
(wip_supply_type,
final_completion_flag,
transaction_header_id,
transaction_interface_id,
transaction_mode,
-- lock_flag,
inventory_item_id,
subinventory_code,
primary_quantity,
transaction_quantity,
transaction_date,--10
organization_id,
acct_period_id,
last_update_date,
last_updated_by,
creation_date,
created_by,
transaction_source_id,
transaction_source_type_id,
transaction_type_id,
transaction_action_id,--20
wip_entity_type,
locator_id,
operation_seq_num,
department_id,
-- item_trx_enabled_flag,
-- item_description,
-- item_location_control_code,
-- item_restrict_subinv_code,
-- item_restrict_locators_code,
-- item_revision_qty_control_code, --30
revision,
-- item_primary_uom_code,
transaction_uom,
-- item_inventory_asset_flag,
-- allowed_units_lookup_code,
-- item_shelf_life_code,
-- item_shelf_life_days,
-- item_serial_control_code,
-- item_lot_control_code,
negative_req_flag,
-- posting_flag,
process_flag,
project_id,
task_id,
source_project_id,
source_task_id,
qa_collection_id,
source_code,
source_line_id,
source_header_id,
rebuild_item_id)
VALUES
(wip_constants.push, --always a push item
mtlRec.final_completion_flag,
mtlRec.transaction_header_id,
mtlRec.transaction_interface_id,
mtlRec.transaction_mode,
-- mtlRec.lock_flag,
mtlRec.inventory_item_id,
mtlRec.subinventory_code,
mtlRec.primary_quantity,
mtlRec.transaction_quantity,
mtlRec.transaction_date,--10
mtlRec.organization_id,
mtlRec.acct_period_id,
mtlRec.last_update_date,
mtlRec.last_updated_by,
mtlRec.creation_date,
mtlRec.created_by,
mtlRec.transaction_source_id,
mtlRec.transaction_source_type_id,
mtlRec.transaction_type_id,
mtlRec.transaction_action_id,--20
mtlRec.wip_entity_type,
mtlRec.locator_id,
mtlRec.operation_seq_num,
mtlRec.department_id,
-- mtlRec.item_trx_enabled_flag,
-- mtlRec.item_description,
-- mtlRec.item_location_control_code,
-- mtlRec.item_restrict_subinv_code,
-- mtlRec.item_restrict_locators_code,
-- mtlRec.item_revision_qty_control_code,
mtlRec.revision,
-- mtlRec.item_primary_uom_code,
mtlRec.transaction_uom,
-- mtlRec.item_inventory_asset_flag,
-- mtlRec.allowed_units_lookup_code,
-- mtlRec.item_shelf_life_code,
-- mtlRec.item_shelf_life_days,
-- mtlRec.item_serial_control_code,
-- mtlRec.item_lot_control_code,
mtlRec.negative_req_flag,
-- mtlRec.posting_flag,
mtlRec.process_flag,
mtlRec.project_id,
mtlRec.task_id,
mtlRec.source_project_id,
mtlRec.source_task_id,
mtlRec.qa_collection_id,
mtlRec.source_code,
mtlRec.source_line_id,
mtlRec.source_header_id,
mtlRec.rebuild_item_id);
select project_id, task_id
into l_locProjectID, l_locTaskID
from mtl_item_locations_kfv
where organization_id = p_orgID
and inventory_location_id = p_locatorID;
select project_id, task_id
into l_jobProjectID, l_jobTaskID
from wip_discrete_jobs
where organization_id = p_orgID
and wip_entity_id = p_wipEntityID;
select count(*)
into l_num
from pjm_project_parameters pp,
pjm_project_parameters jpp
where pp.organization_id = p_orgID
and pp.project_id = l_locProjectID
and jpp.organization_id = p_orgID
and jpp.project_id = l_jobProjectID
and pp.costing_group_id = jpp.costing_group_id
and pp.planning_group = jpp.planning_group;