The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT DISTINCT 'Y'
FROM bom_bill_of_materials bo
WHERE bo.assembly_item_id = l_item_id
AND bo.organization_id = l_org_id;
SELECT 'Y'
FROM bom_inventory_components bc,
bom_bill_of_materials bo
WHERE bc.bill_sequence_id = bo.bill_sequence_id
AND bo.assembly_item_id = l_item_id
AND bo.organization_id = l_org_id
AND bc.component_item_id = l_comp_id;
SELECT count(1)
FROM bom_inventory_components bc,
bom_bill_of_materials bo
WHERE bc.bill_sequence_id = bo.bill_sequence_id
AND bo.assembly_item_id = l_item_id
AND bo.organization_id = l_org_id;
l_head_trans := 'UPDATE';
ELSIF (p_bill_detls_rec_type_in.transaction_type = 'UPDATE')
THEN
IF l_comp_dummy ='Y' THEN
l_head_trans := 'UPDATE';
l_comp_trans := 'UPDATE';
l_head_trans := 'UPDATE';
ELSIF (p_bill_detls_rec_type_in.transaction_type = 'DELETE')
THEN
l_comp_trans := 'DELETE';
l_head_trans := 'UPDATE';
l_head_trans := 'UPDATE';
l_head_trans := 'DELETE';
P_Last_Update_Date IN DATE := FND_API.G_MISS_DATE,
P_Last_Update_By IN NUMBER := FND_API.G_MISS_NUM
) IS
l_bom_header_rec Bom_Bo_Pub.Bom_Head_Rec_Type;
SELECT DISTINCT bc.last_update_date,
bc.last_updated_by
FROM bom_inventory_components bc,
bom_bill_of_materials bo
-- , mtl_system_items_b i
-- fixed bug 3631360
WHERE bc.bill_sequence_id = bo.bill_sequence_id
AND bo.assembly_item_id = l_item_id
AND bo.organization_id = l_org_id
AND bc.component_item_id = l_comp_id;
SELECT max(bc.item_num)
FROM bom_inventory_components bc,
bom_bill_of_materials bo
WHERE bc.bill_sequence_id = bo.bill_sequence_id
AND bo.assembly_item_id = item_id
AND bo.organization_id = org_id;
IS SELECT DISTINCT trunc(b.effectivity_date)
FROM bom_inventory_components b
, mtl_system_items_b inv
, bom_bill_of_materials bo
WHERE b.component_item_id = l_comp_inv_id
AND b.bill_Sequence_id = bo.bill_Sequence_id
AND inv.segment1 =l_header_segment
AND bo.assembly_item_id = inv.inventory_item_id;
IS SELECT DISTINCT b.effectivity_date
-- BUG 2993951 FIX:: trunc(b.effectivity_date)
FROM bom_inventory_components b
, bom_bill_of_materials bo
WHERE b.component_item_id = l_comp_inv_id
AND b.bill_Sequence_id = bo.bill_Sequence_id
AND bo.assembly_item_id =l_assembly_item_id
AND bo.ALTERNATE_BOM_DESIGNATOR is null
AND bo.organization_id = l_org_id;
SELECT concatenated_segments
FROM mtl_system_items_b_kfv
WHERE inventory_item_id = l_inv_itm_id
AND organization_id = l_org_id;
SELECT organization_code
--FROM org_organization_definitions
FROM mtl_parameters
WHERE organization_id = l_org_id;
IF (l_bill_details_rec_in.Component_trans_type = 'UPDATE') THEN
OPEN isLock(l_bill_details_rec_in.Assembly_item_id,
l_bill_details_rec_in.Header_org_id,
l_bill_details_rec_in.component_item_id);
IF (l_isLock.last_updated_by <> P_Last_Update_By)
AND (l_isLock.last_update_date <> P_last_Update_Date) THEN
IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error)
THEN
FND_MESSAGE.set_name('AMS', 'AMS_API_RECORD_NOT_FOUND');
/*** Getting the effectivity date from database for updates and deletes **/
IF l_bill_details_rec_in.Component_trans_type = 'UPDATE'
OR l_bill_details_rec_in.Component_trans_type = 'DELETE' THEN
OPEN get_effectivity_date(l_bill_details_rec_in.component_item_id,
l_bill_details_rec_in.assembly_item_id ---name);
/** Delete Group Name should be passed for deleting the Bill. After this user has to
query up for this delete_group in the forms under BOM and has to run the delete group
concurrent program after running Check group conc program **/
IF l_bill_details_rec_in.Component_trans_type = 'DELETE'
THEN
l_bom_component_tbl(1).delete_group_name := 'AMS-DELGRP';
l_bom_component_tbl(1).DG_Description := 'AMS - Delete Group For Components';
IF l_bill_details_rec_in.Header_trans_type = 'DELETE'
THEN
l_bom_header_rec.delete_group_name := 'AMS-HEADER' ;
l_bom_header_rec.DG_Description := 'AMS - Delete Group For The Bill' ;