The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT line_id,
parent_ato_line_id,
ato_line_id,
perform_match
FROM bom_cto_order_lines_gt
WHERE bom_item_type = '1'
AND wip_supply_type <> 6;
SELECT config_item_id,
line_id,
link_to_line_id,
parent_ato_line_id,
gop_parent_ato_line_id,
ato_line_id,
top_model_line_id,
inventory_item_id,
ordered_quantity,
qty_per_parent_model,
ship_from_org_id,
plan_level,
wip_supply_type,
bom_item_type,
reuse_config,
perform_match,
config_creation,
option_specific,
oss_error_code
FROM bom_cto_order_lines_gt;
CTO_MATCH_CONFIG.Insert_into_bcol_gt(p_match_rec_of_tab =>p_cto_match_rec,
x_return_status =>x_return_status,
x_msg_count =>X_msg_count,
x_msg_data =>X_msg_data
);
oe_debug_pub.add('MATCH_CONFIGURED_ITEM:'||'success after CTO_MATCH_CONFIG.Insert_into_bcol_gt', 1);
SELECT 'Y'
INTO l_model_exists
FROM bom_cto_order_lines_gt
WHERE line_id = ato_line_id
AND top_model_line_id is not null
AND rownum = 1;
CTO_MATCH_CONFIG.Update_BCOLGT_with_match_flag
(
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data
);
oe_debug_pub.add('MATCH_CONFIGURED_ITEM:'||'success after CTO_MATCH_CONFIG.Update_BCOLGT_with_match_flag', 1);
SELECT ato_line_id
BULK COLLECT INTO
l_ato_line_tbl
FROM bom_cto_order_lines_gt
WHERE line_id =ato_line_id
AND top_model_line_id is not null
AND config_item_id is null
AND bom_item_type = '1'; --implies item not re-used
SELECT config_item_id,
perform_match
BULK COLLECT INTO
--during Ut make sure next statement
--over writes existing values , ifnot
--additional rows may get created during
--for MATCH 0n cases. remove comment after UT
p_cto_match_rec.config_item_id,
p_cto_match_rec.perform_match
FROM bom_cto_order_lines_gt
order by line_id; --Bugfix 6055375