The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT planning_make_buy_code
INTO l_make_buy
FROM mtl_system_items
WHERE inventory_item_id = p_line_rec.inventory_item_id
AND ORGANIZATION_ID = nvl(p_line_rec.ship_from_org_id,
l_org_id);
SELECT BILL_SEQUENCE_ID
INTO l_bill_seq_id
FROM BOM_BILL_OF_MATERIALS
WHERE ORGANIZATION_ID = nvl(p_line_rec.ship_from_org_id,l_org_id)
AND ASSEMBLY_ITEM_ID = p_line_rec.inventory_item_id
AND ALTERNATE_BOM_DESIGNATOR IS NULL;
SELECT arrival_set_id,
ato_line_id,
demand_class_code,
delivery_lead_time,
freight_carrier_code,
header_id,
inventory_item_id,
invoice_to_org_id,
item_type_code,
ordered_item,
line_id,
ordered_quantity,
order_quantity_uom,
request_date,
schedule_ship_date,
schedule_arrival_date,
ship_from_org_id,
ship_model_complete_flag,
ship_set_id,
ship_to_org_id,
schedule_status_code,
shipping_method_code,
sold_to_org_id,
top_model_line_id
FROM oe_order_lines
WHERE header_id = p_header_id
AND item_type_code <> OE_GLOBALS.G_ITEM_INCLUDED;
l_line_rec.operation := OE_GLOBALS.G_OPR_UPDATE;
SELECT ato_line_id , ship_set_id, arrival_set_id
INTO l_ato_line_id,l_ship_set_id,l_arrival_set_id
FROM oe_order_lines_all
WHERE line_id = l_line_id;
SELECT line_Id
INTO l_config_id
FROM OE_ORDER_LINES_ALL
WHERE ato_line_id=l_model_line_rec.line_id
AND top_model_line_id =l_model_line_rec.top_model_line_id
AND item_type_code = 'CONFIG';
l_line_rec.operation := OE_GLOBALS.G_OPR_UPDATE;
SELECT line_Id
INTO l_config_id
FROM OE_ORDER_LINES_ALL
WHERE top_model_line_id = l_line_tbl(1).top_model_line_id
AND item_type_code = 'CONFIG';
l_line_rec.operation := OE_GLOBALS.G_OPR_UPDATE;
l_line_rec.operation := OE_GLOBALS.G_OPR_UPDATE;
oe_debug_pub.add( 'CALLING UPDATE SET' ) ;
OE_Set_Util.Update_Set
(p_Set_Id => l_set_id,
p_Ship_From_Org_Id => l_Ship_From_Org_Id,
p_Ship_To_Org_Id => l_Ship_To_Org_Id,
p_Schedule_Ship_Date => l_Schedule_Ship_Date,
p_Schedule_Arrival_Date => l_Schedule_Arrival_Date,
p_Freight_Carrier_Code => l_Freight_Carrier_Code,
p_Shipping_Method_Code => l_Shipping_Method_Code,
p_shipment_priority_code => l_shipment_priority_code,
X_Return_Status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data
);
oe_debug_pub.add( 'AFTER CALLING UPDATE SET' ) ;
l_line_tbl(k).operation := OE_GLOBALS.G_OPR_UPDATE;
l_line_tbl(J).operation := OE_GLOBALS.G_OPR_UPDATE;
OE_Set_Util.Update_Set
(p_Set_Id => nvl(l_line_tbl(1).arrival_set_id,
l_line_tbl(1).ship_set_id),
p_Ship_From_Org_Id => l_line_tbl(1).Ship_From_Org_Id,
p_Ship_To_Org_Id => l_line_tbl(1).Ship_To_Org_Id,
p_Schedule_Ship_Date => l_line_tbl(1).Schedule_Ship_Date,
p_Schedule_Arrival_Date => l_line_tbl(1).Schedule_Arrival_Date,
p_Freight_Carrier_Code => l_line_tbl(1).Freight_Carrier_Code,
p_Shipping_Method_Code => l_line_tbl(1).Shipping_Method_Code,
p_shipment_priority_code => l_line_tbl(1).shipment_priority_code,
X_Return_Status => x_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data
);
oe_debug_pub.add( 'AFTER CALLING UPDATE SET' ) ;
l_out_line_tbl1(K).operation := OE_GLOBALS.G_OPR_UPDATE;
oe_debug_pub.add( 'NOW CALLING OE_ORDER_SCH_UTIL.UPDATE_LINE_RECORD' , 1 ) ;
OE_ORDER_SCH_UTIL.Update_line_record
( p_line_tbl => l_old_line_tbl1
, p_x_new_line_tbl => l_out_line_tbl1
, p_write_to_db => p_write_to_db
, p_recursive_call => FND_API.G_FALSE
, x_return_status => l_return_status);
oe_debug_pub.add( 'AFTER CALLING UPDATE_LINE_RECORD: ' || L_RETURN_STATUS , 1 ) ;
SELECT RESERVABLE_TYPE
INTO l_reservable_type
FROM MTL_SYSTEM_ITEMS
WHERE INVENTORY_ITEM_ID = l_line_tbl(j).inventory_item_id
AND ORGANIZATION_ID = l_line_tbl(j).ship_from_org_id;
SELECT revision_qty_control_code, lot_control_code,
serial_number_control_code
INTO l_revision_code, l_lot_code, l_serial_code
FROM mtl_system_items
WHERE inventory_item_id = l_line_tbl(j).inventory_item_id
AND organization_id = l_line_tbl(j).ship_from_org_id;
oe_debug_pub.add( 'RSCH: CALLING INVS UPDATE RESERVATION ' , 1 ) ;
inv_reservation_pub.update_reservation
( p_api_version_number => 1.0
, p_init_msg_lst => fnd_api.g_true
, x_return_status => l_return_status
, x_msg_count => l_msg_count
, x_msg_data => l_msg_data
, p_original_rsv_rec => l_rsv_tbl(M)
, p_to_rsv_rec => l_reservation_rec
, p_original_serial_number => l_dummy_sn -- no serial contorl
, p_to_serial_number => l_dummy_sn -- no serial control
, p_validation_flag => fnd_api.g_true
);
oe_debug_pub.add( 'AFTER CALLING INVS UPDATE_RESERVATION: ' || L_RETURN_STATUS , 1 ) ;
l_out_line_tbl1(K).operation := OE_GLOBALS.G_OPR_UPDATE;
oe_debug_pub.add('Now Calling OE_ORDER_SCH_UTIL.Update_line_record',1);
OE_ORDER_SCH_UTIL.Update_line_record
( p_line_tbl => l_old_line_tbl1
, p_x_new_line_tbl => l_out_line_tbl1
, p_write_to_db => p_write_to_db
, p_recursive_call => FND_API.G_FALSE
, x_return_status => l_return_status);
oe_debug_pub.add('After Calling Update_line_record: ' ||
l_return_status,1);
SELECT LINE_ID
FROM OE_ORDER_LINES_ALL
WHERE
HEADER_ID = p_header_id
AND item_type_code <> OE_GLOBALS.G_ITEM_INCLUDED
ORDER BY arrival_set_id,ship_set_id,line_number,shipment_number,nvl(option_number,-1);
SELECT 'VALID'
INTO l_dummy
FROM MTL_SYSTEM_ITEMS
WHERE INVENTORY_ITEM_ID = p_line_tbl(I).inventory_item_id
AND ORGANIZATION_ID = p_ship_from_org_id;
Procedure :Sch_Multi_selected_lines
This procedure is called when lines are multi-selected and
scheduling action is performed.
---------------------------------------------------------------*/
Procedure Sch_Multi_selected_lines
(p_line_list IN VARCHAR2,
p_line_count IN NUMBER,
p_action IN VARCHAR2,
x_atp_tbl OUT NOCOPY OE_ATP.Atp_Tbl_Type,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2)
IS
j Integer;
oe_debug_pub.add( 'GG: ENTERING SCH_MULTI_SELECTED_LINES' , 1 ) ;
l_line_rec.operation := OE_GLOBALS.G_OPR_UPDATE;
oe_debug_pub.add( 'EXITING SCH_MULTI_SELECTED_LINES WITH: ' || L_OUT_RETURN_STATUS , 1 ) ;
, 'Sch_Multi_selected_lines'
);
END Sch_Multi_selected_lines;