The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT source_line_id,
source_code,
organization_id,
inventory_item_id, --bug#6407943
original_subinventory subinventory,
date_scheduled,
ship_set_id,
ship_to_site_use_id,
intmed_ship_to_location_id,
customer_id,
src_requested_quantity, --Bug#6077222
src_requested_quantity_uom, --Bug#6077222
freight_terms_code,
fob_code,
ship_method_code,
carrier_id,
requested_quantity,
requested_quantity_uom,
source_line_set_id, -- Bug 2181132
ship_tolerance_above,-- Bug 2181132
ship_tolerance_below,-- Bug 2181132
request_date_type_code,
container_flag,
earliest_pickup_date,
latest_pickup_date,
earliest_dropoff_date,
latest_dropoff_date,
mode_of_transport,
service_level,
decode(p_delivery_detail_id,
FND_API.G_MISS_NUM, FND_API.G_MISS_NUM,
delivery_detail_id) delivery_detail_id,
'Y' cache_flag,
project_id,
task_id
FROM wsh_delivery_details
WHERE source_line_id = p_source_line_id
AND source_code = p_source_code
AND delivery_detail_id = DECODE(p_delivery_detail_id, FND_API.G_MISS_NUM,
delivery_detail_id, p_delivery_detail_id)
AND released_status in ('R', 'N', 'X')
AND rownum = 1
ORDER BY decode (released_status,
'R', 1,
'N', 2,
'X', 3,
4);
SELECT source_line_id,
source_code,
organization_id,
inventory_item_id, --bug#6407943
original_subinventory subinventory,
date_scheduled,
ship_set_id,
ship_to_site_use_id,
intmed_ship_to_location_id,
customer_id,
src_requested_quantity, --Bug#6077222
src_requested_quantity_uom, --Bug#6077222
freight_terms_code,
fob_code,
ship_method_code,
carrier_id,
requested_quantity,
requested_quantity_uom,
source_line_set_id, -- Bug 2181132
ship_tolerance_above,-- Bug 2181132
ship_tolerance_below,-- Bug 2181132
request_date_type_code,
container_flag,
earliest_pickup_date,
latest_pickup_date,
earliest_dropoff_date,
latest_dropoff_date,
mode_of_transport,
service_level,
decode(p_delivery_detail_id,
FND_API.G_MISS_NUM, FND_API.G_MISS_NUM,
delivery_detail_id) delivery_detail_id,
'Y' cache_flag,
project_id,
task_id
FROM wsh_delivery_details
WHERE source_line_id = p_source_line_id
AND source_code = p_source_code
AND delivery_detail_id = DECODE(p_delivery_detail_id, FND_API.G_MISS_NUM,
delivery_detail_id, p_delivery_detail_id)
AND released_status in ('B', 'Y', 'S')
AND rownum = 1
ORDER BY decode (released_status,
'B', 1,
'Y', 2,
'S', 3,
4);
x_update_allowed OUT NOCOPY VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2)
IS
update_not_allowed EXCEPTION;
l_update_allowed VARCHAR2(1) := 'Y';
RAISE update_not_allowed;
x_update_allowed => l_update_allowed,
x_return_status => l_rs);
IF (l_update_allowed = 'N')
OR (l_rs IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
RAISE update_not_allowed;
x_update_allowed => l_update_allowed,
x_return_status => l_rs);
IF (l_update_allowed = 'N')
OR (l_rs IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
IF l_debug_on THEN
WSH_DEBUG_SV.log(l_module_name,'Change_Scheduled_Date returned Error');
RAISE update_not_allowed;
x_update_allowed => l_update_allowed,
x_return_status => l_rs);
IF (l_update_allowed = 'N')
OR (l_rs IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
RAISE update_not_allowed;
x_update_allowed => l_update_allowed,
x_return_status => l_rs);
IF (l_update_allowed = 'N')
OR (l_rs IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
RAISE update_not_allowed;
x_update_allowed => l_update_allowed,
x_return_status => l_rs);
IF (l_update_allowed = 'N')
OR (l_rs IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
RAISE update_not_allowed;
x_update_allowed => l_update_allowed,
x_return_status => l_rs);
IF (l_update_allowed = 'N')
OR (l_rs IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
RAISE update_not_allowed;
x_update_allowed => l_update_allowed,
x_return_status => l_rs);
IF(l_update_allowed = 'N')
OR (l_rs IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
RAISE update_not_allowed;
x_update_allowed := l_update_allowed;
WSH_DEBUG_SV.log(l_module_name,'x_update_allowed',x_update_allowed);
WHEN update_not_allowed THEN
x_update_allowed := l_update_allowed;
WSH_DEBUG_SV.logmsg(l_module_name,'UPDATE_NOT_ALLOWED exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:UPDATE_NOT_ALLOWED');
x_update_allowed IN OUT NOCOPY VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2) IS
update_not_allowed EXCEPTION;
WSH_DEBUG_SV.log(l_module_name,'X_UPDATE_ALLOWED',X_UPDATE_ALLOWED);
WSH_DEBUG_SV.log(l_module_name,'x_update_allowed',x_update_allowed);
x_update_allowed := 'N';
x_update_allowed IN OUT NOCOPY VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2) IS
update_not_allowed EXCEPTION;
WSH_DEBUG_SV.log(l_module_name,'X_UPDATE_ALLOWED',X_UPDATE_ALLOWED);
WSH_USA_QUANTITY_PVT.Update_Ordered_Quantity(
p_changed_attribute => p_attributes_rec,
p_source_code => p_source_code,
p_action_flag => 'U',
p_wms_flag => p_wms_flag,
x_return_status => x_return_status);
WSH_DEBUG_SV.log(l_module_name,'x_update_allowed',x_update_allowed);
WHEN update_not_allowed THEN
x_update_allowed := 'N';
WSH_DEBUG_SV.logmsg(l_module_name,'UPDATE_NOT_ALLOWED exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:UPDATE_NOT_ALLOWED');
x_update_allowed := 'N';
x_update_allowed IN OUT NOCOPY VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2)
IS
-- HW OPMCONV - Added Qty2
--bug# 6689448 (replenishment project): added wdd.replenishment_status
cursor c_delivery_detail is
select wdd.delivery_detail_id, wdd.released_status,
wdd.move_order_line_id, wdd.ship_from_location_id,
wdd.subinventory, wda.parent_delivery_detail_id,
wda.delivery_id, wdd.inventory_item_id,
wdd.serial_number, wdd.transaction_temp_id,
wdd.requested_quantity, wdd.picked_quantity,
wdd.requested_quantity2, wdd.picked_quantity2,
wdd.net_weight, wdd.gross_weight, wdd.volume,
wdd.weight_uom_code, wdd.volume_uom_code,
wdd.original_subinventory, wdd.pickable_flag ,
NVL(wnd.status_code, 'OP'), NVL(wnd.planned_flag, 'N'), NVL(wnd.tms_interface_flag, 'NS'),
wdd.replenishment_status
from wsh_delivery_details wdd, wsh_delivery_assignments wda, wsh_new_deliveries wnd
where wdd.source_line_id = p_attributes_rec.source_line_id
and wdd.source_code = p_source_code
and wdd.delivery_detail_id = wda.delivery_detail_id
and wda.delivery_id = wnd.delivery_id(+)
order by decode(wdd.released_status, 'Y', 1, 2);
SELECT wnd.status_code,wsp.export_screening_flag
FROM wsh_delivery_details wdd, wsh_delivery_assignments wda, wsh_new_deliveries wnd,
wsh_shipping_parameters wsp
WHERE wdd.source_code = p_source_code
AND wdd.source_line_id = p_attributes_rec.source_line_id
AND wdd.delivery_detail_id = wda.delivery_detail_id
AND wda.delivery_id = wnd.delivery_id
AND wnd.organization_id = wsp.organization_id
AND ( NVL(wnd.status_code, 'OP') IN ('SR','SA') OR
wsp.export_screening_flag IN ('C','A') );
SELECT description, hazard_class_id, primary_uom_code, weight_uom_code,
unit_weight, volume_uom_code, unit_volume , decode(mtl_transactions_enabled_flag,'Y','Y','N') pickable_flag
FROM mtl_system_items
WHERE inventory_item_id = c_p_inventory_item_id
AND organization_id = c_p_organization_id;
SELECT 'N'
FROM wsh_delivery_details
WHERE source_line_id = p_attributes_rec.source_line_id
AND source_code = p_source_code
AND released_status IN ('S','Y','C','B');
SELECT 'N'
FROM wsh_delivery_details wdd, wsh_delivery_assignments wda
WHERE wdd.source_line_id = p_attributes_rec.source_line_id
AND wdd.source_code = p_source_code
AND wdd.released_status <> 'D'
AND wdd.delivery_detail_id = wda.delivery_detail_id
AND wda.parent_delivery_detail_id IS NOT NULL;
SELECT primary_uom_code
from mtl_system_items
where inventory_item_id = c_item_id
and organization_id = c_organization_id ;
update_not_allowed EXCEPTION;
l_delete_dds WSH_UTIL_CORE.Id_Tab_Type ; -- to delete overpicked delivery lines
item_update_not_allowed EXCEPTION;
WSH_DEBUG_SV.log(l_module_name,'X_UPDATE_ALLOWED',X_UPDATE_ALLOWED);
WSH_DEBUG_SV.logmsg(l_module_name, 'Item Update is not allowed as it is associated to OPM organization.');
RAISE item_update_not_allowed;
WSH_DEBUG_SV.logmsg(l_module_name, 'Item Update is not allowed as it is associated to OPM organization.');
RAISE item_update_not_allowed;
FETCH c_det_status INTO x_update_allowed;
WSH_DEBUG_SV.logmsg(l_module_name, 'Item Update is not allowed as there are Detail(s) that are already Pick Released ');
RAISE item_update_not_allowed;
FETCH c_packed_det INTO x_update_allowed;
WSH_DEBUG_SV.logmsg(l_module_name, 'Item Update is not allowed as there are Detail(s) that are packed into Containers ');
RAISE item_update_not_allowed;
WSH_DEBUG_SV.logmsg(l_module_name, 'Update is not allowed as there is a Delivery that belongs to tpw/carrier manifesting Organization with status '||l_del_status);
WSH_DEBUG_SV.logmsg(l_module_name, 'Update is not allowed as export compliance screening is enabled at delivery creation/delivery creation and ship confirm '||l_export_screening_flag);
RAISE item_update_not_allowed;
WSH_DEBUG_SV.logmsg(l_module_name, 'Update is not allowed as there is a difference in primary UOM for old and new item');
RAISE item_update_not_allowed;
WSH_DEBUG_SV.logmsg(l_module_name, 'Update is not allowed as there is a difference in UOM conversions for old and new item');
RAISE item_update_not_allowed;
WSH_DEBUG_SV.logmsg(l_module_name, 'Update is not allowed as there are no shipping parameters defined for the org: '||l_final_org_id);
RAISE item_update_not_allowed;
FND_MESSAGE.SET_NAME('WSH', 'WSH_WMS_UPDATE_NOT_ALLOWED');
RAISE update_not_allowed;
l_delete_dds( l_delete_dds.count+1 ) := l_del_det;
p_delete_reservations => 'N',
p_txn_source_line_id => p_attributes_rec.source_line_id,
p_delivery_detail_id => l_del_det, -- X-dock
x_return_status => x_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data
);
RAISE update_not_allowed;
RAISE update_not_allowed;
RAISE update_not_allowed;
RAISE update_not_allowed;
RAISE update_not_allowed;
RAISE update_not_allowed;
RAISE update_not_allowed;
RAISE update_not_allowed;
WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WMS_REPLENISHMENT_PUB.UPDATE_DELIVERY_DETAIL' ,WSH_DEBUG_SV.C_PROC_LEVEL);
WMS_REPLENISHMENT_PUB.UPDATE_DELIVERY_DETAIL(
p_delivery_detail_id => l_del_det,
p_primary_quantity => 0, --- WMS will delete the records from WMS table.
x_return_status => x_return_status);
WSH_DEBUG_SV.logmsg(l_module_name, 'UNEXPECTED ERROR FROM WMS_REPLENISHMENT_PUB.UPDATE_DELIVERY_DETAIL');
RAISE item_update_not_allowed;
UPDATE wsh_delivery_details
SET subinventory = NULL,
lot_number = NULL,
locator_id = NULL,
revision = NULL,
move_order_line_id = NULL,
-- HW OPMCONV. No need for sublot anymore
-- sublot_number = NULL,
preferred_grade = NULL,
shipped_quantity = NULL,
cycle_count_quantity = NULL,
shipped_quantity2 = NULL,
cycle_count_quantity2 = NULL,
picked_quantity = NULL,
picked_quantity2 = NULL,
serial_number = NULL,
transaction_temp_id = NULL,
batch_id = NULL,
transaction_id = NULL, --- 2803570
inventory_item_id = DECODE(l_change_item, 'Y', p_attributes_rec.inventory_item_id, inventory_item_id),
item_description = DECODE(l_change_item, 'Y', l_item_rec.description, item_description),
unit_weight = DECODE(l_change_item, 'Y', l_item_rec.unit_weight, unit_weight),
weight_uom_code = DECODE(l_change_item, 'Y', l_item_rec.weight_uom_code, weight_uom_code),
net_weight = DECODE(l_change_item, 'Y', l_new_weight, net_weight),
gross_weight = DECODE(l_change_item, 'Y', l_new_weight, gross_weight),
unit_volume = DECODE(l_change_item, 'Y', l_item_rec.unit_volume, unit_volume),
volume_uom_code = DECODE(l_change_item, 'Y', l_item_rec.volume_uom_code, volume_uom_code),
volume = DECODE(l_change_item, 'Y', l_new_volume, volume),
wv_frozen_flag = DECODE(l_change_item, 'Y', 'N', wv_frozen_flag),
pickable_flag = DECODE(l_change_item, 'Y', l_item_rec.pickable_flag, pickable_flag),
hazard_class_id = DECODE(l_change_item, 'Y', l_item_rec.hazard_class_id, hazard_class_id),
released_status = DECODE(released_status,'X', DECODE(l_change_item, 'Y', DECODE(l_item_rec.pickable_flag, 'N', 'X', 'R'), 'X'),
'B', 'B', DECODE(l_change_item, 'Y', DECODE(l_item_rec.pickable_flag, 'N', 'X', 'R'), 'R')),
inv_interfaced_flag = DECODE(l_change_item, 'Y', DECODE(l_item_rec.pickable_flag, 'N','X','N'), inv_interfaced_flag),
requested_quantity2 = p_attributes_rec.ordered_quantity2,
requested_quantity_uom2= p_attributes_rec.ordered_quantity_uom2,
replenishment_status = decode(l_change_replenish_status,'Y',NULL,replenishment_status) ----bug# 6689448 (replenishment project)
WHERE delivery_detail_id = l_del_det;
WSH_DEBUG_SV.log(l_module_name,'Rows updated:',SQL%ROWCOUNT);
RAISE item_update_not_allowed;
WSH_INTEGRATION.DBI_Update_Detail_Log
(p_delivery_detail_id_tab => l_detail_tab,
p_dml_type => 'UPDATE',
x_return_status => l_dbi_rs);
IF l_delete_dds.count > 0 THEN
WSH_INTERFACE.Delete_Details(
p_details_id => l_delete_dds,
x_return_status => x_return_status
);
RAISE update_not_allowed;
WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_NEW_DELIVERIES_PVT.UPDATE_TMS_INTERFACE_FLAG',WSH_DEBUG_SV.C_PROC_LEVEL);
WSH_NEW_DELIVERIES_PVT.Update_TMS_Interface_Flag
(p_delivery_id_tab => l_delivery_id_tab,
p_tms_interface_flag_tab => l_tms_interface_flag_tab,
x_return_status => l_return_status);
WSH_DEBUG_SV.log(l_module_name,'Return Status from WSH_NEW_DELIVERIES_PVT.Update_Tms_interface_flag',l_return_status);
RAISE item_update_not_allowed;
RAISE update_not_allowed;
WSH_USA_INV_PVT.delete_reservation (
p_query_input => l_resv_tbl(i),
x_return_status => x_return_status);
RAISE update_not_allowed;
WHEN item_update_not_allowed THEN
x_update_allowed := 'N';
WSH_DEBUG_SV.logmsg(l_module_name,'UPDATE_NOT_ALLOWED exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:UPDATE_NOT_ALLOWED');
WHEN update_not_allowed THEN
x_update_allowed := 'N';
WSH_DEBUG_SV.logmsg(l_module_name,'UPDATE_NOT_ALLOWED exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:UPDATE_NOT_ALLOWED');
x_update_allowed := 'N';
x_update_allowed IN OUT NOCOPY VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2)
IS
cursor c_delivery_detail is
select delivery_detail_id, ship_from_location_id
from wsh_delivery_details
where source_line_id = p_attributes_rec.source_line_id
and source_code = p_source_code;
update_not_allowed EXCEPTION;
WSH_DEBUG_SV.log(l_module_name,'X_UPDATE_ALLOWED',X_UPDATE_ALLOWED);
RAISE update_not_allowed;
WHEN update_not_allowed THEN
x_update_allowed := 'N';
WSH_DEBUG_SV.logmsg(l_module_name,'UPDATE_NOT_ALLOWED exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:UPDATE_NOT_ALLOWED');
x_update_allowed := 'N';
x_update_allowed IN OUT NOCOPY VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2)
IS
-- Bug 2846006
-- Cursor to check if delivery details exist for a source line
-- but different released status
-- Bug 2995052 : Ship Set can be assigned to a order line even if it contains
-- back order and ready to release delivery details.
cursor c_get_released_status is
select count(distinct(decode(released_status,'B','R',released_status)))
from wsh_delivery_details
where source_line_id = p_attributes_rec.source_line_id
and source_code = p_source_code
and released_status NOT IN ('X','D');
select delivery_detail_id, released_status, move_order_line_id
from wsh_delivery_details
where source_line_id = p_attributes_rec.source_line_id
and source_code = p_source_code
and released_status NOT IN ('X', 'D')
order by decode(released_status, 'Y', 1, 2);
update_not_allowed EXCEPTION;
WSH_DEBUG_SV.log(l_module_name,'X_UPDATE_ALLOWED',X_UPDATE_ALLOWED);
RAISE update_not_allowed;
RAISE update_not_allowed;
Raise update_not_allowed;
l_trolin_tbl(1).OPERATION := INV_GLOBALS.G_OPR_UPDATE;
RAISE update_not_allowed;
WHEN update_not_allowed THEN
x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
x_update_allowed := 'N';
WSH_DEBUG_SV.logmsg(l_module_name,'UPDATE_NOT_ALLOWED exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:UPDATE_NOT_ALLOWED');
x_update_allowed := 'N';
x_update_allowed IN OUT NOCOPY VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2)
IS
l_mandatory_flag VARCHAR2(1) := NULL;
update_not_allowed EXCEPTION;
select wdd.delivery_detail_id, wdd.ship_from_location_id,
wda.delivery_id, wda.parent_delivery_detail_id,
wdd.released_status, wnd.service_level service_level, wnd.mode_of_transport mode_of_transport,
wnd.carrier_id carrier_id, wnd.ship_method_code ship_method_code
from wsh_delivery_details wdd, wsh_delivery_assignments_v wda, wsh_new_deliveries wnd
where wdd.source_line_id = p_source_line_id
and wdd.source_code = p_source_code
and wdd.delivery_detail_id = wda.delivery_detail_id
and wda.delivery_id = wnd.delivery_id
UNION
select wdd.delivery_detail_id, wdd.ship_from_location_id,
wda.delivery_id, wda.parent_delivery_detail_id,
wdd.released_status, wddp.service_level service_level, wddp.mode_of_transport mode_of_transport,
wddp.carrier_id carrier_id, wdd.ship_method_code ship_method_code
from wsh_delivery_details wdd, wsh_delivery_assignments_v wda, wsh_delivery_details wddp
where wdd.source_line_id = p_source_line_id
and wdd.source_code = p_source_code
and wdd.delivery_detail_id = wda.delivery_detail_id
and wda.parent_delivery_detail_id = wddp.delivery_detail_id
and wda.delivery_id is null;
select parent_delivery_detail_id
from wsh_delivery_assignments_v
where delivery_detail_id = p_child_id;
WSH_DEBUG_SV.log(l_module_name,'X_UPDATE_ALLOWED',X_UPDATE_ALLOWED);
RAISE update_not_allowed;
RAISE update_not_allowed;
FND_MESSAGE.SET_NAME('WSH', 'WSH_WMS_UPDATE_NOT_ALLOWED');
RAISE update_not_allowed;
RAISE update_not_allowed;
RAISE update_not_allowed;
l_delivery_ids.delete;
RAISE update_not_allowed;
RAISE update_not_allowed;
RAISE update_not_allowed;
RAISE update_not_allowed;
l_del_in_rec.action_code := 'UPDATE';
WSH_INTERFACE_GRP.Create_Update_Delivery(p_api_version_number => 1.0,
p_init_msg_list => FND_API.G_FALSE,
p_commit => FND_API.G_FALSE,
p_in_rec => l_del_in_rec,
p_rec_attr_tab => l_delivery_info_tab,
x_del_out_rec_tab => l_del_out_rec_tab,
x_return_status => x_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data);
RAISE update_not_allowed;
RAISE update_not_allowed;
RAISE update_not_allowed;
l_detail_in_rec.action_code := 'UPDATE';
WSH_INTERFACE_GRP.Create_Update_Delivery_Detail(
p_api_version_number => 1.0,
p_init_msg_list => FND_API.G_FALSE,
p_commit => FND_API.G_FALSE,
x_return_status => x_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
p_detail_info_tab => l_detail_info_tab,
p_IN_rec => l_detail_in_rec,
x_OUT_rec => l_detail_out_rec);
RAISE update_not_allowed;
WSH_CONTAINER_ACTIONS.Update_Cont_Hierarchy(
p_del_detail_id => dd.parent_delivery_detail_id,
p_delivery_id => NULL,
p_container_instance_id => l_parent_container,
x_return_status => x_return_status);
RAISE update_not_allowed;
WHEN update_not_allowed THEN
x_update_allowed := 'N';
WSH_DEBUG_SV.logmsg(l_module_name,'UPDATE_NOT_ALLOWED exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:UPDATE_NOT_ALLOWED');
x_update_allowed := 'N';
x_update_allowed IN OUT NOCOPY VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2)
IS
-- this is because source_line_set_id may or may not be populated
-- in that case match using source line id
-- query is driven by released status and souce header id.
-- line_set_id can be NULL or MISS_NUM also , when we need to match
-- using source_line_id
CURSOR c_get_released_status is
SELECT delivery_detail_id
FROM wsh_delivery_details
WHERE (source_line_id = p_attributes_rec.source_line_id
OR source_line_set_id = p_attributes_rec.source_line_set_id)
AND source_code = p_source_code
AND source_header_id = p_attributes_rec.source_header_id
AND released_status IN ('Y', 'C')
AND container_flag = 'N'
AND rownum = 1;
update_not_allowed EXCEPTION;
WSH_DEBUG_SV.log(l_module_name,'X_UPDATE_ALLOWED',X_UPDATE_ALLOWED);
FND_MESSAGE.SET_NAME('WSH', 'WSH_UPDATE_TOL_NOT_ALLOWED');
RAISE update_not_allowed;
x_update_allowed := 'Y';
WSH_DEBUG_SV.log(l_module_name,'Update Allowed'||x_update_allowed);
WHEN update_not_allowed THEN
x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
x_update_allowed := 'N';
x_update_allowed := 'N';