The following lines contain the word 'select', 'insert', 'update' or 'delete':
IS SELECT rowid
FROM wsh_delivery_details
WHERE delivery_detail_id = x_delivery_detail_id;
SELECT NVL(MAX(1),0) FROM DUAL
WHERE EXISTS ( SELECT 1 FROM WSH_DELIVERY_DETAILS
WHERE container_name = v_cont_name
AND container_flag = 'Y'
-- LPN reuse project
AND released_status = Decode(v_wms_flag,'Y','X',released_status));
WSH_DEBUG_SV.logmsg(l_module_name, 'AFTER INSERTING INTO WSH_DELIVERY_DETAILS' );
IS SELECT rowid
FROM wsh_delivery_details
WHERE delivery_detail_id = x_delivery_detail_id;
SELECT wsh_delivery_details_s.nextval
FROM sys.dual;
SELECT distinct ignore_for_planning
FROM wsh_delivery_details
WHERE
ship_set_id = c_p_set_id and
source_code = c_p_source_code and
source_header_id = c_p_source_header_id;
l_dff_update_flag VARCHAR2(1);
l_dff_tp_update_flag VARCHAR2(1);
p_update_flag => l_dff_update_flag,
x_return_status => l_dff_ret_status);
WSH_DEBUG_SV.log(l_module_name,' l_dff_tp_update_flag',l_dff_tp_update_flag);
IF ( l_dff_ret_status = WSH_UTIL_CORE.G_RET_STS_SUCCESS AND l_dff_update_flag = 'Y' ) THEN
l_delivery_details_info.attribute_category :=
nvl(p_delivery_details_info.attribute_category,l_dff_context );
p_update_flag => l_dff_tp_update_flag,
x_return_status => l_dff_tp_ret_status);
WSH_DEBUG_SV.log(l_module_name,' l_dff_tp_update_flag',l_dff_tp_update_flag);
IF ( l_dff_tp_ret_status = WSH_UTIL_CORE.G_RET_STS_SUCCESS AND l_dff_tp_update_flag = 'Y' ) THEN
l_delivery_details_info.tp_attribute_category :=
nvl(p_delivery_details_info.tp_attribute_category,l_dff_tp_context );
INSERT INTO wsh_delivery_details(
source_code,
source_header_id,
delivery_detail_id,
source_line_id,
customer_id,
sold_to_contact_id,
inventory_item_id,
item_description,
hazard_class_id,
country_of_origin,
classification,
ship_from_location_id,
ship_to_location_id,
ship_to_contact_id,
ship_to_site_use_id ,
deliver_to_location_id,
deliver_to_contact_id,
deliver_to_site_use_id ,
intmed_ship_to_location_id,
intmed_ship_to_contact_id,
ship_tolerance_above,
ship_tolerance_below,
requested_quantity,
shipped_quantity,
delivered_quantity,
requested_quantity_uom,
subinventory,
revision,
lot_number,
customer_requested_lot_flag,
serial_number,
locator_id,
date_requested,
date_scheduled,
master_container_item_id,
detail_container_item_id,
load_seq_number,
ship_method_code,
carrier_id,
freight_terms_code,
shipment_priority_code,
fob_code,
customer_item_id,
dep_plan_required_flag,
customer_prod_seq,
customer_dock_code,
cust_model_serial_number,
customer_job,
customer_production_line,
net_weight,
weight_uom_code,
volume,
volume_uom_code,
-- J: W/V Changes
unit_weight,
unit_volume,
filled_volume,
wv_frozen_flag,
tp_attribute_category,
tp_attribute1,
tp_attribute2,
tp_attribute3,
tp_attribute4,
tp_attribute5,
tp_attribute6,
tp_attribute7,
tp_attribute8,
tp_attribute9,
tp_attribute10,
tp_attribute11,
tp_attribute12,
tp_attribute13,
tp_attribute14,
tp_attribute15,
attribute_category, -- bug 1902467
attribute1,
attribute2,
attribute3,
attribute4,
attribute5,
attribute6,
attribute7,
attribute8,
attribute9,
attribute10,
attribute11,
attribute12,
attribute13,
attribute14,
attribute15,
created_by,
creation_date,
last_update_date,
last_update_login,
last_updated_by,
program_application_id,
program_id,
program_update_date,
request_id,
mvt_stat_status,
organization_id,
transaction_temp_id,
ship_set_id,
arrival_set_id,
ship_model_complete_flag,
top_model_line_id,
hold_code,
source_header_number,
source_header_type_id,
source_header_type_name,
cust_po_number,
ato_line_id,
src_requested_quantity,
src_requested_quantity_uom,
move_order_line_id,
cancelled_quantity,
quality_control_quantity,
cycle_count_quantity,
tracking_number,
movement_id,
shipping_instructions,
packing_instructions,
project_id,
task_id,
org_id,
oe_interfaced_flag,
split_from_delivery_detail_id,
inv_interfaced_flag,
source_line_number,
inspection_flag,
released_status,
container_flag,
container_type_code,
container_name,
fill_percent,
gross_weight,
master_serial_number,
maximum_load_weight,
maximum_volume,
minimum_fill_percent,
seal_code,
unit_number,
unit_price,
currency_code,
freight_class_cat_id,
commodity_code_cat_id,
preferred_grade, /* hverddin 26-jun-2000 start OPM changes */
src_requested_quantity2,
src_requested_quantity_uom2,
requested_quantity2,
shipped_quantity2,
delivered_quantity2,
cancelled_quantity2,
quality_control_quantity2,
cycle_count_quantity2,
requested_quantity_uom2,
-- HW OPMCONV - No need for sublot_number
-- sublot_number /* hverddin 26-jun-2000 end OPM changes */,
pickable_flag,
original_subinventory,
to_serial_number,
picked_quantity,
picked_quantity2,
/* H Integration: datamodel changes wrudge */
received_quantity,
received_quantity2,
source_line_set_id,
batch_id,
lpn_id,
/* J Inbound Logistics: New columns jckwok */
vendor_id ,
ship_from_site_id ,
line_direction ,
party_id ,
routing_req_id ,
shipping_control ,
source_blanket_reference_id ,
source_blanket_reference_num ,
po_shipment_line_id ,
po_shipment_line_number ,
returned_quantity ,
returned_quantity2 ,
rcv_shipment_line_id ,
source_line_type_code ,
supplier_item_number ,
/* J TP release : ttrichy*/
IGNORE_FOR_PLANNING ,
EARLIEST_PICKUP_DATE ,
LATEST_PICKUP_DATE ,
EARLIEST_DROPOFF_DATE ,
LATEST_DROPOFF_DATE ,
--DEMAND_SATISFACTION_DATE , --confirm name for this
REQUEST_DATE_TYPE_CODE ,
tp_delivery_detail_id ,
source_document_type_id ,
service_level,
mode_of_transport,
/* J Inbound Logistics: New columns asutar*/
po_revision_number,
release_revision_number
) VALUES
(l_delivery_details_info.source_code,
l_delivery_details_info.source_header_id,
wsh_delivery_details_s.nextval, --lpn conv
decode( l_delivery_details_info.container_flag , 'Y', wsh_delivery_details_s.currval, l_delivery_details_info.source_line_id),
l_delivery_details_info.customer_id,
l_delivery_details_info.sold_to_contact_id,
l_delivery_details_info.inventory_item_id,
l_delivery_details_info.item_description,
l_delivery_details_info.hazard_class_id,
l_delivery_details_info.country_of_origin,
l_delivery_details_info.classification,
l_delivery_details_info.ship_from_location_id,
l_delivery_details_info.ship_to_location_id,
l_delivery_details_info.ship_to_contact_id,
l_delivery_details_info.ship_to_site_use_id,
l_delivery_details_info.deliver_to_location_id,
l_delivery_details_info.deliver_to_contact_id,
l_delivery_details_info.deliver_to_site_use_id,
l_delivery_details_info.intmed_ship_to_location_id,
l_delivery_details_info.intmed_ship_to_contact_id,
l_delivery_details_info.ship_tolerance_above,
l_delivery_details_info.ship_tolerance_below,
l_delivery_details_info.requested_quantity,
l_delivery_details_info.shipped_quantity,
l_delivery_details_info.delivered_quantity,
nvl ( l_delivery_details_info.requested_quantity_uom,
decode ( l_delivery_details_info.container_flag, 'Y' , 'YY' , 'XX') ) ,
l_delivery_details_info.subinventory,
l_delivery_details_info.revision,
l_delivery_details_info.lot_number,
l_delivery_details_info.customer_requested_lot_flag,
l_delivery_details_info.serial_number,
l_delivery_details_info.locator_id,
l_delivery_details_info.date_requested,
l_delivery_details_info.date_scheduled,
l_delivery_details_info.master_container_item_id,
l_delivery_details_info.detail_container_item_id,
l_delivery_details_info.load_seq_number,
l_delivery_details_info.ship_method_code,
l_delivery_details_info.carrier_id,
l_delivery_details_info.freight_terms_code,
l_delivery_details_info.shipment_priority_code,
l_delivery_details_info.fob_code,
l_delivery_details_info.customer_item_id,
l_delivery_details_info.dep_plan_required_flag,
l_delivery_details_info.customer_prod_seq,
l_delivery_details_info.customer_dock_code,
l_delivery_details_info.cust_model_serial_number,
l_delivery_details_info.customer_job,
l_delivery_details_info.customer_production_line,
l_delivery_details_info.net_weight,
l_delivery_details_info.weight_uom_code,
l_delivery_details_info.volume,
l_delivery_details_info.volume_uom_code,
-- J: W/V Changes
l_delivery_details_info.unit_weight,
l_delivery_details_info.unit_volume,
l_delivery_details_info.filled_volume,
l_delivery_details_info.wv_frozen_flag,
l_delivery_details_info.tp_attribute_category,
l_delivery_details_info.tp_attribute1,
l_delivery_details_info.tp_attribute2,
l_delivery_details_info.tp_attribute3,
l_delivery_details_info.tp_attribute4,
l_delivery_details_info.tp_attribute5,
l_delivery_details_info.tp_attribute6,
l_delivery_details_info.tp_attribute7,
l_delivery_details_info.tp_attribute8,
l_delivery_details_info.tp_attribute9,
l_delivery_details_info.tp_attribute10,
l_delivery_details_info.tp_attribute11,
l_delivery_details_info.tp_attribute12,
l_delivery_details_info.tp_attribute13,
l_delivery_details_info.tp_attribute14,
l_delivery_details_info.tp_attribute15,
l_delivery_details_info.attribute_category, -- bug 1902467
l_delivery_details_info.attribute1,
l_delivery_details_info.attribute2,
l_delivery_details_info.attribute3,
l_delivery_details_info.attribute4,
l_delivery_details_info.attribute5,
l_delivery_details_info.attribute6,
l_delivery_details_info.attribute7,
l_delivery_details_info.attribute8,
l_delivery_details_info.attribute9,
l_delivery_details_info.attribute10,
l_delivery_details_info.attribute11,
l_delivery_details_info.attribute12,
l_delivery_details_info.attribute13,
l_delivery_details_info.attribute14,
l_delivery_details_info.attribute15,
FND_GLOBAL.USER_ID,
SYSDATE,
SYSDATE,
FND_GLOBAL.USER_ID,
FND_GLOBAL.USER_ID,
NULL,
NULL,
NULL,
l_delivery_details_info.request_id,
l_delivery_details_info.mvt_stat_status,
l_delivery_details_info.organization_id,
l_delivery_details_info.transaction_temp_id,
l_delivery_details_info.ship_set_id,
l_delivery_details_info.arrival_set_id,
l_delivery_details_info.ship_model_complete_flag,
l_delivery_details_info.top_model_line_id,
l_delivery_details_info.hold_code,
l_delivery_details_info.source_header_number,
l_delivery_details_info.source_header_type_id,
l_delivery_details_info.source_header_type_name,
l_delivery_details_info.cust_po_number,
l_delivery_details_info.ato_line_id,
l_delivery_details_info.src_requested_quantity,
l_delivery_details_info.src_requested_quantity_uom,
l_delivery_details_info.move_order_line_id,
l_delivery_details_info.cancelled_quantity,
l_delivery_details_info.quality_control_quantity,
l_delivery_details_info.cycle_count_quantity ,
l_delivery_details_info.tracking_number,
l_delivery_details_info.movement_id,
l_delivery_details_info.shipping_instructions,
l_delivery_details_info.packing_instructions,
l_delivery_details_info.project_id,
l_delivery_details_info.task_id,
l_delivery_details_info.org_id,
decode(l_delivery_details_info.source_code,'OE','N','X'),
l_delivery_details_info.split_from_detail_id,
nvl(l_delivery_details_info.inv_interfaced_flag, decode(l_delivery_details_info.pickable_flag,'Y','N','X')),
l_delivery_details_info.source_line_number,
-- Inspection is required only for 'OKE'
decode ( l_delivery_details_info.source_code, 'OKE' , nvl (l_delivery_details_info.inspection_flag , 'N') , 'N' ),
l_delivery_details_info.released_status,
l_delivery_details_info.container_flag,
l_delivery_details_info.container_type_code,
decode(l_delivery_details_info.container_flag,'Y',
nvl(p_container_info_rec.container_names(i), NVL(l_delivery_details_info.container_name,wsh_delivery_details_s.currval)),
l_delivery_details_info.container_name),
l_delivery_details_info.fill_percent,
l_delivery_details_info.gross_weight,
l_delivery_details_info.master_serial_number,
l_delivery_details_info.maximum_load_weight,
l_delivery_details_info.maximum_volume,
l_delivery_details_info.minimum_fill_percent,
l_delivery_details_info.seal_code,
l_delivery_details_info.unit_number,
l_delivery_details_info.unit_price,
l_delivery_details_info.currency_code,
l_delivery_details_info.freight_class_cat_id,
l_delivery_details_info.commodity_code_cat_id,
l_delivery_details_info.preferred_grade, /* hverddin start changes */
l_delivery_details_info.src_requested_quantity2,
l_delivery_details_info.src_requested_quantity_uom2,
l_delivery_details_info.requested_quantity2,
l_delivery_details_info.shipped_quantity2,
l_delivery_details_info.delivered_quantity2,
l_delivery_details_info.cancelled_quantity2,
l_delivery_details_info.quality_control_quantity2,
l_delivery_details_info.cycle_count_quantity2,
l_delivery_details_info.requested_quantity_uom2,
-- HW OPMCONV - No need for sublot_number
-- l_delivery_details_info.sublot_number /* hverddin end changes */,
l_delivery_details_info.pickable_flag,
l_delivery_details_info.original_subinventory,
l_delivery_details_info.to_serial_number,
l_delivery_details_info.picked_quantity,
l_delivery_details_info.picked_quantity2,
/* H Integration: datamodel changes wrudge */
l_delivery_details_info.received_quantity,
l_delivery_details_info.received_quantity2,
l_delivery_details_info.source_line_set_id,
l_delivery_details_info.batch_id,
--lpn conv
decode(l_delivery_details_info.container_flag , 'Y',
NVL(p_container_info_rec.lpn_ids(i),l_delivery_details_info.lpn_id),
l_delivery_details_info.lpn_id) ,
/* J Inbound Logistics: New columns jckwok */
l_delivery_details_info.vendor_id ,
l_delivery_details_info.ship_from_site_id ,
nvl(l_delivery_details_info.line_direction, 'O') ,
l_delivery_details_info.party_id ,
l_delivery_details_info.routing_req_id ,
l_delivery_details_info.shipping_control ,
l_delivery_details_info.source_blanket_reference_id ,
l_delivery_details_info.source_blanket_reference_num ,
l_delivery_details_info.po_shipment_line_id ,
l_delivery_details_info.po_shipment_line_number ,
l_delivery_details_info.returned_quantity ,
l_delivery_details_info.returned_quantity2 ,
l_delivery_details_info.rcv_shipment_line_id ,
l_delivery_details_info.source_line_type_code ,
l_delivery_details_info.supplier_item_number ,
/* J TP release : ttrichy */
nvl(l_delivery_details_info.IGNORE_FOR_PLANNING, 'N') ,
l_delivery_details_info.EARLIEST_PICKUP_DATE ,
l_delivery_details_info.LATEST_PICKUP_DATE ,
l_delivery_details_info.EARLIEST_DROPOFF_DATE ,
l_delivery_details_info.LATEST_DROPOFF_DATE ,
--l_delivery_details_info.DEMAND_SATISFACTION_DATE ,
l_delivery_details_info.REQUEST_DATE_TYPE_CODE ,
l_delivery_details_info.tp_delivery_detail_id ,
l_delivery_details_info.source_document_type_id ,
l_delivery_details_info.service_level ,
l_delivery_details_info.mode_of_transport ,
/* J IB : austar*/
l_delivery_details_info.po_revision_number,
l_delivery_details_info.release_revision_number
)
RETURNING delivery_detail_id BULK COLLECT INTO x_dd_id_tab;
WSH_DEBUG_SV.logmsg(l_module_name, 'AFTER INSERTING INTO WSH_DELIVERY_DETAILS');
WSH_INTEGRATION.DBI_Update_Detail_Log
(p_delivery_detail_id_tab => x_dd_id_tab,
p_dml_type => 'INSERT',
x_return_status => l_dbi_rs);
SELECT wsh_delivery_details_s.nextval
FROM sys.dual;
WSH_DEBUG_SV.logmsg(l_module_name, 'BEFORE INSERTING INTO WSH_DELIVERY_DETAILS' ||l_dd_id_tab.count );
INSERT INTO wsh_delivery_details(
source_code,
source_header_id,
source_line_id,
customer_id,
sold_to_contact_id,
inventory_item_id,
item_description,
hazard_class_id,
country_of_origin,
classification,
ship_from_location_id,
ship_to_location_id,
ship_to_contact_id,
ship_to_site_use_id ,
deliver_to_location_id,
deliver_to_contact_id,
deliver_to_site_use_id ,
intmed_ship_to_location_id,
intmed_ship_to_contact_id,
ship_tolerance_above,
ship_tolerance_below,
requested_quantity,
shipped_quantity,
delivered_quantity,
requested_quantity_uom,
subinventory,
revision,
lot_number,
customer_requested_lot_flag,
serial_number,
locator_id,
date_requested,
date_scheduled,
master_container_item_id,
detail_container_item_id,
load_seq_number,
ship_method_code,
carrier_id,
freight_terms_code,
shipment_priority_code,
fob_code,
customer_item_id,
dep_plan_required_flag,
customer_prod_seq,
customer_dock_code,
cust_model_serial_number,
customer_job,
customer_production_line,
net_weight,
weight_uom_code,
volume,
volume_uom_code,
-- J: W/V Changes
unit_weight,
unit_volume,
filled_volume,
wv_frozen_flag,
tp_attribute_category,
tp_attribute1,
tp_attribute2,
tp_attribute3,
tp_attribute4,
tp_attribute5,
tp_attribute6,
tp_attribute7,
tp_attribute8,
tp_attribute9,
tp_attribute10,
tp_attribute11,
tp_attribute12,
tp_attribute13,
tp_attribute14,
tp_attribute15,
attribute_category, -- bug 1902467
attribute1,
attribute2,
attribute3,
attribute4,
attribute5,
attribute6,
attribute7,
attribute8,
attribute9,
attribute10,
attribute11,
attribute12,
attribute13,
attribute14,
attribute15,
created_by,
creation_date,
last_update_date,
last_update_login,
last_updated_by,
program_application_id,
program_id,
program_update_date,
request_id,
mvt_stat_status,
organization_id,
transaction_temp_id,
ship_set_id,
arrival_set_id,
ship_model_complete_flag,
top_model_line_id,
hold_code,
source_header_number,
source_header_type_id,
source_header_type_name,
cust_po_number,
ato_line_id,
src_requested_quantity,
src_requested_quantity_uom,
move_order_line_id,
cancelled_quantity,
quality_control_quantity,
cycle_count_quantity,
tracking_number,
movement_id,
shipping_instructions,
packing_instructions,
project_id,
task_id,
org_id,
oe_interfaced_flag,
split_from_delivery_detail_id,
inv_interfaced_flag,
source_line_number,
inspection_flag,
released_status,
delivery_detail_id,
container_flag,
container_type_code,
container_name,
fill_percent,
gross_weight,
master_serial_number,
maximum_load_weight,
maximum_volume,
minimum_fill_percent,
seal_code,
unit_number,
unit_price,
currency_code,
freight_class_cat_id,
commodity_code_cat_id,
preferred_grade, /* start OPM changes */
src_requested_quantity2,
src_requested_quantity_uom2,
requested_quantity2,
shipped_quantity2,
delivered_quantity2,
cancelled_quantity2,
quality_control_quantity2,
cycle_count_quantity2,
requested_quantity_uom2,
-- HW OPMCONV - No need for sublot_number
-- sublot_number /* end OPM changes */,
pickable_flag,
original_subinventory,
to_serial_number,
picked_quantity,
picked_quantity2,
/* H Integration: datamodel changes wrudge */
received_quantity,
received_quantity2,
source_line_set_id,
batch_id,
transaction_id, ---- 2803570
lpn_id,
/* J Inbound Logistics: New columns jckwok */
vendor_id ,
ship_from_site_id ,
line_direction ,
party_id ,
routing_req_id ,
shipping_control ,
source_blanket_reference_id ,
source_blanket_reference_num ,
po_shipment_line_id ,
po_shipment_line_number ,
returned_quantity ,
returned_quantity2 ,
rcv_shipment_line_id ,
source_line_type_code ,
supplier_item_number ,
/* J TP release : ttrichy*/
IGNORE_FOR_PLANNING ,
EARLIEST_PICKUP_DATE ,
LATEST_PICKUP_DATE ,
EARLIEST_DROPOFF_DATE ,
LATEST_DROPOFF_DATE ,
--DEMAND_SATISFACTION_DATE , --confirm name for this
REQUEST_DATE_TYPE_CODE ,
tp_delivery_detail_id ,
source_document_type_id ,
service_level ,
mode_of_transport ,
/* J IB : asutar*/
po_revision_number,
release_revision_number,
replenishment_status --bug# 6689448 (replenishment project)
)
SELECT
decode(p_delivery_detail_rec.source_code,NULL,wdd.source_code,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.source_code),
decode(p_delivery_detail_rec.source_header_id,NULL,wdd.source_header_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.source_header_id),
decode(p_delivery_detail_rec.source_line_id,NULL,wdd.source_line_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.source_line_id),
decode(p_delivery_detail_rec.customer_id,NULL,wdd.customer_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.customer_id),
decode(p_delivery_detail_rec.sold_to_contact_id,NULL,wdd.sold_to_contact_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.sold_to_contact_id),
decode(p_delivery_detail_rec.inventory_item_id,NULL,wdd.inventory_item_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.inventory_item_id),
decode(p_delivery_detail_rec.item_description,NULL,wdd.item_description,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.item_description),
decode(p_delivery_detail_rec.hazard_class_id,NULL,wdd.hazard_class_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.hazard_class_id),
decode(p_delivery_detail_rec.country_of_origin,NULL,wdd.country_of_origin,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.country_of_origin),
decode(p_delivery_detail_rec.classification,NULL,wdd.classification,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.classification),
decode(p_delivery_detail_rec.ship_from_location_id,NULL,wdd.ship_from_location_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.ship_from_location_id),
decode(p_delivery_detail_rec.ship_to_location_id,NULL,wdd.ship_to_location_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.ship_to_location_id),
decode(p_delivery_detail_rec.ship_to_contact_id,NULL,wdd.ship_to_contact_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.ship_to_contact_id),
decode(p_delivery_detail_rec.ship_to_site_use_id,NULL,wdd.ship_to_site_use_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.ship_to_site_use_id),
decode(p_delivery_detail_rec.deliver_to_location_id,NULL,wdd.deliver_to_location_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.deliver_to_location_id),
decode(p_delivery_detail_rec.deliver_to_contact_id,NULL,wdd.deliver_to_contact_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.deliver_to_contact_id),
decode(p_delivery_detail_rec.deliver_to_site_use_id,NULL,wdd.deliver_to_site_use_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.deliver_to_site_use_id),
decode(p_delivery_detail_rec.intmed_ship_to_location_id,NULL,wdd.intmed_ship_to_location_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.intmed_ship_to_location_id),
decode(p_delivery_detail_rec.intmed_ship_to_contact_id,NULL,wdd.intmed_ship_to_contact_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.intmed_ship_to_contact_id),
decode(p_delivery_detail_rec.ship_tolerance_above,NULL,wdd.ship_tolerance_above,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.ship_tolerance_above),
decode(p_delivery_detail_rec.ship_tolerance_below,NULL,wdd.ship_tolerance_below,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.ship_tolerance_below),
decode(p_delivery_detail_rec.requested_quantity,NULL,wdd.requested_quantity,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.requested_quantity),
decode(p_delivery_detail_rec.shipped_quantity,NULL,wdd.shipped_quantity,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.shipped_quantity),
decode(p_delivery_detail_rec.delivered_quantity,NULL,wdd.delivered_quantity,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.delivered_quantity),
decode(p_delivery_detail_rec.requested_quantity_uom,NULL,nvl(wdd.requested_quantity_uom,decode(wdd.container_flag, 'Y' , 'YY' , 'XX')),FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.requested_quantity_uom),
decode(p_delivery_detail_rec.subinventory,NULL,wdd.subinventory,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.subinventory),
decode(p_delivery_detail_rec.revision,NULL,wdd.revision,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.revision),
decode(p_delivery_detail_rec.lot_number,NULL,wdd.lot_number,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.lot_number),
decode(p_delivery_detail_rec.customer_requested_lot_flag,NULL,wdd.customer_requested_lot_flag,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.customer_requested_lot_flag),
decode(p_delivery_detail_rec.serial_number,NULL,wdd.serial_number,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.serial_number),
decode(p_delivery_detail_rec.locator_id,NULL,wdd.locator_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.locator_id),
decode(p_delivery_detail_rec.date_requested,NULL,wdd.date_requested,FND_API.G_MISS_DATE,NULL,p_delivery_detail_rec.date_requested),
decode(p_delivery_detail_rec.date_scheduled,NULL,wdd.date_scheduled,FND_API.G_MISS_DATE,NULL,p_delivery_detail_rec.date_scheduled),
decode(p_delivery_detail_rec.master_container_item_id,NULL,wdd.master_container_item_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.master_container_item_id),
decode(p_delivery_detail_rec.detail_container_item_id,NULL,wdd.detail_container_item_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.detail_container_item_id),
decode(p_delivery_detail_rec.load_seq_number,NULL,wdd.load_seq_number,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.load_seq_number),
decode(p_delivery_detail_rec.ship_method_code,NULL,wdd.ship_method_code,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.ship_method_code),
decode(p_delivery_detail_rec.carrier_id,NULL,wdd.carrier_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.carrier_id),
decode(p_delivery_detail_rec.freight_terms_code,NULL,wdd.freight_terms_code,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.freight_terms_code),
decode(p_delivery_detail_rec.shipment_priority_code,NULL,wdd.shipment_priority_code,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.shipment_priority_code),
decode(p_delivery_detail_rec.fob_code,NULL,wdd.fob_code,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.fob_code),
decode(p_delivery_detail_rec.customer_item_id,NULL,wdd.customer_item_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.customer_item_id),
decode(p_delivery_detail_rec.dep_plan_required_flag,NULL,wdd.dep_plan_required_flag,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.dep_plan_required_flag),
decode(p_delivery_detail_rec.customer_prod_seq,NULL,wdd.customer_prod_seq,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.customer_prod_seq),
decode(p_delivery_detail_rec.customer_dock_code,NULL,wdd.customer_dock_code,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.customer_dock_code),
decode(p_delivery_detail_rec.cust_model_serial_number,NULL,wdd.cust_model_serial_number,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.cust_model_serial_number),
decode(p_delivery_detail_rec.customer_job,NULL,wdd.customer_job,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.customer_job),
decode(p_delivery_detail_rec.customer_production_line,NULL,wdd.customer_production_line,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.customer_production_line),
decode(p_delivery_detail_rec.net_weight,NULL,wdd.net_weight,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.net_weight),
decode(p_delivery_detail_rec.weight_uom_code,NULL,wdd.weight_uom_code,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.weight_uom_code),
decode(p_delivery_detail_rec.volume,NULL,wdd.volume,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.volume),
decode(p_delivery_detail_rec.volume_uom_code,NULL,wdd.volume_uom_code,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.volume_uom_code),
-- J: W/V Changes
decode(p_delivery_detail_rec.unit_weight,NULL,wdd.unit_weight,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.unit_weight),
decode(p_delivery_detail_rec.unit_volume,NULL,wdd.unit_volume,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.unit_volume),
decode(p_delivery_detail_rec.filled_volume,NULL,wdd.filled_volume,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.filled_volume),
decode(p_delivery_detail_rec.wv_frozen_flag,NULL,'N',FND_API.G_MISS_NUM,'N',p_delivery_detail_rec.wv_frozen_flag),
decode(p_delivery_detail_rec.tp_attribute_category,NULL,wdd.tp_attribute_category,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.tp_attribute_category),
decode(p_delivery_detail_rec.tp_attribute1,NULL,wdd.tp_attribute1,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.tp_attribute1),
decode(p_delivery_detail_rec.tp_attribute2,NULL,wdd.tp_attribute2,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.tp_attribute2),
decode(p_delivery_detail_rec.tp_attribute3,NULL,wdd.tp_attribute3,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.tp_attribute3),
decode(p_delivery_detail_rec.tp_attribute4,NULL,wdd.tp_attribute4,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.tp_attribute4),
decode(p_delivery_detail_rec.tp_attribute5,NULL,wdd.tp_attribute5,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.tp_attribute5),
decode(p_delivery_detail_rec.tp_attribute6,NULL,wdd.tp_attribute6,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.tp_attribute6),
decode(p_delivery_detail_rec.tp_attribute7,NULL,wdd.tp_attribute7,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.tp_attribute7),
decode(p_delivery_detail_rec.tp_attribute8,NULL,wdd.tp_attribute8,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.tp_attribute8),
decode(p_delivery_detail_rec.tp_attribute9,NULL,wdd.tp_attribute9,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.tp_attribute9),
decode(p_delivery_detail_rec.tp_attribute10,NULL,wdd.tp_attribute10,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.tp_attribute10),
decode(p_delivery_detail_rec.tp_attribute11,NULL,wdd.tp_attribute11,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.tp_attribute11),
decode(p_delivery_detail_rec.tp_attribute12,NULL,wdd.tp_attribute12,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.tp_attribute12),
decode(p_delivery_detail_rec.tp_attribute13,NULL,wdd.tp_attribute13,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.tp_attribute13),
decode(p_delivery_detail_rec.tp_attribute14,NULL,wdd.tp_attribute14,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.tp_attribute14),
decode(p_delivery_detail_rec.tp_attribute15,NULL,wdd.tp_attribute15,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.tp_attribute15),
decode(p_delivery_detail_rec.attribute_category,NULL,wdd.attribute_category,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.attribute_category), -- bug 1902467
decode(p_delivery_detail_rec.attribute1,NULL,wdd.attribute1,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.attribute1),
decode(p_delivery_detail_rec.attribute2,NULL,wdd.attribute2,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.attribute2),
decode(p_delivery_detail_rec.attribute3,NULL,wdd.attribute3,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.attribute3),
decode(p_delivery_detail_rec.attribute4,NULL,wdd.attribute4,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.attribute4),
decode(p_delivery_detail_rec.attribute5,NULL,wdd.attribute5,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.attribute5),
decode(p_delivery_detail_rec.attribute6,NULL,wdd.attribute6,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.attribute6),
decode(p_delivery_detail_rec.attribute7,NULL,wdd.attribute7,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.attribute7),
decode(p_delivery_detail_rec.attribute8,NULL,wdd.attribute8,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.attribute8),
decode(p_delivery_detail_rec.attribute9,NULL,wdd.attribute9,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.attribute9),
decode(p_delivery_detail_rec.attribute10,NULL,wdd.attribute10,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.attribute10),
decode(p_delivery_detail_rec.attribute11,NULL,wdd.attribute11,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.attribute11),
decode(p_delivery_detail_rec.attribute12,NULL,wdd.attribute12,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.attribute12),
decode(p_delivery_detail_rec.attribute13,NULL,wdd.attribute13,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.attribute13),
decode(p_delivery_detail_rec.attribute14,NULL,wdd.attribute14,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.attribute14),
decode(p_delivery_detail_rec.attribute15,NULL,wdd.attribute15,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.attribute15),
FND_GLOBAL.USER_ID,
SYSDATE,
SYSDATE,
FND_GLOBAL.USER_ID,
FND_GLOBAL.USER_ID,
NULL,
NULL,
NULL,
decode(p_delivery_detail_rec.request_id,NULL,wdd.request_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.request_id),
decode(p_delivery_detail_rec.mvt_stat_status,NULL,wdd.mvt_stat_status,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.mvt_stat_status),
decode(p_delivery_detail_rec.organization_id,NULL,wdd.organization_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.organization_id),
decode(p_delivery_detail_rec.transaction_temp_id,NULL,wdd.transaction_temp_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.transaction_temp_id),
decode(p_delivery_detail_rec.ship_set_id,NULL,wdd.ship_set_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.ship_set_id),
decode(p_delivery_detail_rec.arrival_set_id,NULL,wdd.arrival_set_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.arrival_set_id),
decode(p_delivery_detail_rec.ship_model_complete_flag,NULL,wdd.ship_model_complete_flag,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.ship_model_complete_flag),
decode(p_delivery_detail_rec.top_model_line_id,NULL,wdd.top_model_line_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.top_model_line_id),
decode(p_delivery_detail_rec.hold_code,NULL,wdd.hold_code,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.hold_code),
decode(p_delivery_detail_rec.source_header_number,NULL,wdd.source_header_number,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.source_header_number),
decode(p_delivery_detail_rec.source_header_type_id,NULL,wdd.source_header_type_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.source_header_type_id),
decode(p_delivery_detail_rec.source_header_type_name,NULL,wdd.source_header_type_name,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.source_header_type_name),
decode(p_delivery_detail_rec.cust_po_number,NULL,wdd.cust_po_number,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.cust_po_number),
decode(p_delivery_detail_rec.ato_line_id,NULL,wdd.ato_line_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.ato_line_id),
decode(p_delivery_detail_rec.src_requested_quantity,NULL,wdd.src_requested_quantity,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.src_requested_quantity),
decode(p_delivery_detail_rec.src_requested_quantity_uom,
NULL, wdd.src_requested_quantity_uom,
FND_API.G_MISS_CHAR, NULL,
p_delivery_detail_rec.src_requested_quantity_uom),
decode(p_delivery_detail_rec.move_order_line_id,NULL,wdd.move_order_line_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.move_order_line_id),
decode(p_delivery_detail_rec.cancelled_quantity,NULL,wdd.cancelled_quantity,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.cancelled_quantity),
decode(p_delivery_detail_rec.quality_control_quantity,NULL,wdd.quality_control_quantity,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.quality_control_quantity),
decode(p_delivery_detail_rec.cycle_count_quantity ,NULL,wdd.cycle_count_quantity ,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.cycle_count_quantity),
decode(decode(p_delivery_detail_rec.source_code,NULL,wdd.source_code,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.source_code),
'PO',(decode (decode(p_delivery_detail_rec.released_status,NULL,wdd.released_status,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.released_status) ,
'X',null,p_delivery_detail_rec.tracking_number ) ),null), --bugfix 3711663
decode(p_delivery_detail_rec.movement_id,NULL,wdd.movement_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.movement_id),
decode(p_delivery_detail_rec.shipping_instructions,NULL,wdd.shipping_instructions,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.shipping_instructions),
decode(p_delivery_detail_rec.packing_instructions,NULL,wdd.packing_instructions,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.packing_instructions),
decode(p_delivery_detail_rec.project_id,NULL,wdd.project_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.project_id),
decode(p_delivery_detail_rec.task_id,NULL,wdd.task_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.task_id),
decode(p_delivery_detail_rec.org_id,NULL,wdd.org_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.org_id),
decode(p_delivery_detail_rec.oe_interfaced_flag,NULL,decode(wdd.source_code,'OE','N','X'),FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.oe_interfaced_flag),
decode(p_delivery_detail_rec.split_from_detail_id,NULL,wdd.split_from_delivery_detail_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.split_from_detail_id),
decode(p_delivery_detail_rec.inv_interfaced_flag,NULL,decode(wdd.pickable_flag,'Y','N','X'),FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.inv_interfaced_flag),
decode(p_delivery_detail_rec.source_line_number,NULL,wdd.source_line_number,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.source_line_number),
decode(p_delivery_detail_rec.inspection_flag,NULL,decode(wdd.source_code,'OKE',nvl(wdd.inspection_flag,'N'),'N'),FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.inspection_flag),
decode(p_delivery_detail_rec.released_status,NULL,wdd.released_status,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.released_status),
l_dd_id_tab(i),
decode(p_delivery_detail_rec.container_flag,NULL,wdd.container_flag,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.container_flag),
decode(p_delivery_detail_rec.container_type_code,NULL,wdd.container_type_code,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.container_type_code),
decode(p_delivery_detail_rec.container_name,NULL,decode(wdd.container_flag,'Y',to_char(l_dd_id_tab(i)),null),FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.container_name),
decode(p_delivery_detail_rec.fill_percent,NULL,wdd.fill_percent,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.fill_percent),
decode(p_delivery_detail_rec.gross_weight,NULL,wdd.gross_weight,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.gross_weight),
decode(p_delivery_detail_rec.master_serial_number,NULL,wdd.master_serial_number,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.master_serial_number),
decode(p_delivery_detail_rec.maximum_load_weight,NULL,wdd.maximum_load_weight,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.maximum_load_weight),
decode(p_delivery_detail_rec.maximum_volume,NULL,wdd.maximum_volume,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.maximum_volume),
decode(p_delivery_detail_rec.minimum_fill_percent,NULL,wdd.minimum_fill_percent,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.minimum_fill_percent),
decode(p_delivery_detail_rec.seal_code,NULL,wdd.seal_code,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.seal_code),
decode(p_delivery_detail_rec.unit_number,NULL,wdd.unit_number,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.unit_number),
decode(p_delivery_detail_rec.unit_price,NULL,wdd.unit_price,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.unit_price),
decode(p_delivery_detail_rec.currency_code,NULL,wdd.currency_code,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.currency_code),
decode(p_delivery_detail_rec.freight_class_cat_id,NULL,wdd.freight_class_cat_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.freight_class_cat_id),
decode(p_delivery_detail_rec.commodity_code_cat_id,NULL,wdd.commodity_code_cat_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.commodity_code_cat_id),
decode(p_delivery_detail_rec.preferred_grade,NULL,wdd.preferred_grade,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.preferred_grade), /* hverddin start changes */
decode(p_delivery_detail_rec.src_requested_quantity2,NULL,wdd.src_requested_quantity2,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.src_requested_quantity2),
decode(p_delivery_detail_rec.src_requested_quantity_uom2,NULL,wdd.src_requested_quantity_uom2,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.src_requested_quantity_uom2),
decode(p_delivery_detail_rec.requested_quantity2,NULL,wdd.requested_quantity2,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.requested_quantity2),
decode(p_delivery_detail_rec.shipped_quantity2,NULL,wdd.shipped_quantity2,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.shipped_quantity2),
decode(p_delivery_detail_rec.delivered_quantity2,NULL,wdd.delivered_quantity2,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.delivered_quantity2),
decode(p_delivery_detail_rec.cancelled_quantity2,NULL,wdd.cancelled_quantity2,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.cancelled_quantity2),
decode(p_delivery_detail_rec.quality_control_quantity2,NULL,wdd.quality_control_quantity2,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.quality_control_quantity2),
decode(p_delivery_detail_rec.cycle_count_quantity2,NULL,wdd.cycle_count_quantity2,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.cycle_count_quantity2),
decode(p_delivery_detail_rec.requested_quantity_uom2,NULL,wdd.requested_quantity_uom2,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.requested_quantity_uom2),
-- HW OPMCONV - No need for sublot_number
-- decode(p_delivery_detail_rec.sublot_number,NULL,wdd.sublot_number,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.sublot_number), /* hverddin end changes */
decode(p_delivery_detail_rec.pickable_flag,NULL,wdd.pickable_flag,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.pickable_flag),
decode(p_delivery_detail_rec.original_subinventory,NULL,wdd.original_subinventory,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.original_subinventory),
decode(p_delivery_detail_rec.to_serial_number,NULL,wdd.to_serial_number,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.to_serial_number),
decode(p_delivery_detail_rec.picked_quantity,NULL,wdd.picked_quantity,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.picked_quantity),
decode(p_delivery_detail_rec.picked_quantity2,NULL,wdd.picked_quantity2,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.picked_quantity2),
/* H Integration: datamodel changes wrudge */
decode(p_delivery_detail_rec.received_quantity,NULL,wdd.received_quantity,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.received_quantity),
decode(p_delivery_detail_rec.received_quantity2,NULL,wdd.received_quantity2,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.received_quantity2),
decode(p_delivery_detail_rec.source_line_set_id,NULL,wdd.source_line_set_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.source_line_set_id),
decode(p_delivery_detail_rec.batch_id,NULL,wdd.batch_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.batch_id),
decode(p_delivery_detail_rec.transaction_id,NULL,wdd.transaction_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.transaction_id),
decode(p_delivery_detail_rec.lpn_id,NULL,wdd.lpn_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.lpn_id),
/* J Inbound Logistics: New columns jckwok */
decode(p_delivery_detail_rec.vendor_id,NULL,wdd.vendor_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.vendor_id),
decode(p_delivery_detail_rec.ship_from_site_id,NULL,wdd.ship_from_site_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.ship_from_site_id),
decode(p_delivery_detail_rec.line_direction,NULL,wdd.line_direction,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.line_direction),
decode(p_delivery_detail_rec.party_id,NULL,wdd.party_id,party_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.party_id),
decode(p_delivery_detail_rec.routing_req_id,NULL,wdd.routing_req_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.routing_req_id),
decode(p_delivery_detail_rec.shipping_control,NULL,wdd.shipping_control,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.shipping_control),
decode(p_delivery_detail_rec.source_blanket_reference_id,NULL,wdd.source_blanket_reference_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.source_blanket_reference_id),
decode(p_delivery_detail_rec.source_blanket_reference_num,NULL,wdd.source_blanket_reference_num,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.source_blanket_reference_num),
decode(p_delivery_detail_rec.po_shipment_line_id,NULL,wdd.po_shipment_line_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.po_shipment_line_id),
decode(p_delivery_detail_rec.po_shipment_line_number,NULL,wdd.po_shipment_line_number,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.po_shipment_line_number),
decode(p_delivery_detail_rec.returned_quantity,NULL,wdd.returned_quantity,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.returned_quantity),
decode(p_delivery_detail_rec.returned_quantity2,NULL,wdd.returned_quantity2,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.returned_quantity2),
decode(p_delivery_detail_rec.rcv_shipment_line_id,NULL,wdd.rcv_shipment_line_id,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.rcv_shipment_line_id),
decode(p_delivery_detail_rec.source_line_type_code,NULL,wdd.source_line_type_code,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.source_line_type_code),
decode(p_delivery_detail_rec.supplier_item_number,NULL,wdd.supplier_item_number,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.supplier_item_number),
/* J TP release : ttrichy*/
decode(p_delivery_detail_rec.IGNORE_FOR_PLANNING,NULL,wdd.IGNORE_FOR_PLANNING,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.IGNORE_FOR_PLANNING),
decode(p_delivery_detail_rec.EARLIEST_PICKUP_DATE,NULL,wdd.EARLIEST_PICKUP_DATE,FND_API.G_MISS_DATE,NULL,p_delivery_detail_rec.EARLIEST_PICKUP_DATE),
decode(p_delivery_detail_rec.LATEST_PICKUP_DATE,NULL,wdd.LATEST_PICKUP_DATE,FND_API.G_MISS_DATE,NULL,p_delivery_detail_rec.LATEST_PICKUP_DATE),
decode(p_delivery_detail_rec.EARLIEST_DROPOFF_DATE,NULL,wdd.EARLIEST_DROPOFF_DATE,FND_API.G_MISS_DATE,NULL,p_delivery_detail_rec.EARLIEST_DROPOFF_DATE),
decode(p_delivery_detail_rec.LATEST_DROPOFF_DATE,NULL,wdd.LATEST_DROPOFF_DATE,FND_API.G_MISS_DATE,NULL,p_delivery_detail_rec.LATEST_DROPOFF_DATE),
--decode(p_delivery_detail_rec.DEMAND_SATISFACTION_DATE,NULL,wdd.DEMAND_SATISFACTION_DATE,FND_API.G_MISS_DATE,NULL,p_delivery_detail_rec.DEMAND_SATISFACTION_DATE),
decode(p_delivery_detail_rec.REQUEST_DATE_TYPE_CODE,NULL,wdd.REQUEST_DATE_TYPE_CODE,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.REQUEST_DATE_TYPE_CODE),
decode(p_delivery_detail_rec.tp_delivery_detail_id,NULL,wdd.tp_delivery_detail_id,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.tp_delivery_detail_id),
decode(p_delivery_detail_rec.SOURCE_DOCUMENT_TYPE_ID,NULL,wdd.SOURCE_DOCUMENT_TYPE_ID,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.SOURCE_DOCUMENT_TYPE_ID),
decode(p_delivery_detail_rec.service_level,NULL,wdd.service_level,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.service_level),
decode(p_delivery_detail_rec.mode_of_transport,NULL,wdd.mode_of_transport,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.mode_of_transport),
/*WSH: IB ASUTAR*/
decode(p_delivery_detail_rec.po_revision_number,NULL,wdd.po_revision_number,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.po_revision_number),
decode(p_delivery_detail_rec.release_revision_number,NULL,wdd.release_revision_number,FND_API.G_MISS_NUM,NULL,p_delivery_detail_rec.release_revision_number),
decode(p_delivery_detail_rec.replenishment_status,NULL,wdd.replenishment_status,FND_API.G_MISS_CHAR,NULL,p_delivery_detail_rec.replenishment_status) --bug# 6719369 (replenishment project)
FROM WSH_DELIVERY_DETAILS wdd
WHERE delivery_detail_id = p_delivery_detail_id;
WSH_DEBUG_SV.logmsg(l_module_name, 'AFTER INSERTING INTO WSH_DELIVERY_DETAILS' );
WSH_INTEGRATION.DBI_Update_Detail_Log
(p_delivery_detail_id_tab => x_dd_id_tab,
p_dml_type => 'INSERT',
x_return_status => l_dbi_rs);
IS SELECT wsh_delivery_assignments_s.nextval
FROM sys.dual;
WSH_DEBUG_SV.logmsg(l_module_name, 'BEFORE DELIVERY ASSIGNMENT BULK INSERT'||l_da_id_tab.count);
INSERT INTO wsh_delivery_assignments
(delivery_id,
parent_delivery_id,
delivery_detail_id,
parent_delivery_detail_id,
creation_date,
created_by,
last_update_date,
last_updated_by,
last_update_login,
program_application_id,
program_id,
program_update_date,
request_id,
active_flag,
type,
delivery_assignment_id
) VALUES (
p_delivery_assignments_info.delivery_id,
p_delivery_assignments_info.parent_delivery_id,
p_dd_id_tab(i),
p_delivery_assignments_info.parent_delivery_detail_id,
SYSDATE,
FND_GLOBAL.USER_ID,
SYSDATE,
FND_GLOBAL.USER_ID,
FND_GLOBAL.USER_ID,
NULL,
NULL,
NULL,
p_delivery_assignments_info.request_id,
p_delivery_assignments_info.active_flag,
NVL(p_delivery_assignments_info.type, 'S'),
l_da_id_tab(i)
);
IS SELECT rowid
FROM wsh_delivery_details
WHERE delivery_detail_id = x_delivery_detail_id;
SELECT wsh_delivery_details_s.nextval
FROM sys.dual;
IS SELECT rowid
FROM wsh_delivery_details
WHERE delivery_detail_id = x_delivery_detail_id;
WSH_DEBUG_SV.logmsg(l_module_name, 'AFTER INSERTING INTO WSH_DELIVERY_DETAILS' );
PROCEDURE Delete_Delivery_Details (
p_rowid IN VARCHAR2 := NULL,
p_delivery_detail_id IN NUMBER := NULL,
p_cancel_flag IN VARCHAR2 DEFAULT NULL,
x_return_status OUT NOCOPY VARCHAR2
) IS
CURSOR get_del_detail(v_rowid VARCHAR2)
IS
SELECT wdd.delivery_detail_id,
wdd.inventory_item_id,
wdd.organization_id,
wdd.subinventory,
wdd.serial_number,
wdd.container_flag, -- bug 4416863
wdd.transaction_temp_id,
wda.delivery_id,
nvl(wdd.ignore_for_planning, 'N'), -- OTM R12
nvl(wdd.gross_weight, 0) -- OTM R12 : packing ECO
FROM wsh_delivery_details wdd, wsh_delivery_assignments wda
WHERE wdd.delivery_detail_id = wda.delivery_detail_id
and wdd.rowid = v_rowid;
SELECT wdd.delivery_detail_id,
wdd.inventory_item_id,
wdd.organization_id,
wdd.subinventory,
wdd.serial_number,
wdd.container_flag, -- bug 4416863
wdd.transaction_temp_id,
wda.delivery_id,
nvl(wdd.ignore_for_planning, 'N'), -- OTM R12
nvl(wdd.gross_weight, 0) -- OTM R12 : packing ECO
FROM wsh_delivery_details wdd, wsh_delivery_assignments wda
WHERE wdd.delivery_detail_id = wda.delivery_detail_id
and wdd.delivery_detail_id = v_delivery_detail_id;
l_call_update VARCHAR2(1);
l_module_name CONSTANT VARCHAR2(100) := 'wsh.plsql.' || G_PKG_NAME || '.' || 'DELETE_DELIVERY_DETAILS';
DELETE FROM wsh_freight_costs
WHERE delivery_detail_id = l_delivery_detail_id;
WSH_DEBUG_SV.log(l_module_name,'Rows deleted',SQL%ROWCOUNT);
UPDATE wsh_delivery_details
SET move_order_line_id = NULL ,
released_status = 'D',
requested_quantity = 0,
requested_quantity2 = 0,
src_requested_quantity = 0,
src_requested_quantity2 = 0,
cancelled_quantity = requested_quantity,
cancelled_quantity2 = requested_quantity2,
cycle_count_quantity = NULL,
cycle_count_quantity2 = NULL,
shipped_quantity = NULL,
shipped_quantity2 = NULL,
picked_quantity = NULL,
picked_quantity2 = NULL,
subinventory = NULL,
inv_interfaced_flag = NULL,
oe_interfaced_flag = NULL,
locator_id = NULL,
preferred_grade = NULL,
-- HW OPMCONV - No need for sublot_number
-- sublot_number = NULL,
lot_number = NULL,
revision = null ,
tracking_number = NULL,
-- J: W/V Changes
gross_weight = 0,
net_weight = 0,
volume = 0
WHERE delivery_detail_id = l_delivery_detail_id;
WSH_DEBUG_SV.log(l_module_name,'Rows Updated',SQL%ROWCOUNT);
l_dbi_dml_type := 'UPDATE';
DELETE FROM wsh_delivery_details
WHERE delivery_detail_id = l_delivery_detail_id;
WSH_DEBUG_SV.log(l_module_name,'Rows deleted from wsh_delivery_details',SQL%ROWCOUNT);
l_dbi_dml_type := 'DELETE';
DELETE FROM wsh_delivery_assignments
WHERE delivery_detail_id = l_delivery_detail_id;
WSH_DEBUG_SV.log(l_module_name,'Rows deleted from wsh_delivery_assignments',SQL%ROWCOUNT);
l_call_update := 'Y';
l_interface_flag_tab(1) := WSH_NEW_DELIVERIES_PVT.C_TMS_DELETE_REQUIRED;
l_call_update := 'N';
WSH_DEBUG_SV.log(l_module_name, 'l_call_update', l_call_update);
IF (l_call_update = 'Y') THEN
WSH_DEBUG_SV.log(l_module_name, 'l_delivery_id_tab', l_delivery_id_tab(1));
IF (l_call_update = 'Y') THEN
WSH_NEW_DELIVERIES_PVT.UPDATE_TMS_INTERFACE_FLAG(
p_delivery_id_tab => l_delivery_id_tab,
p_tms_interface_flag_tab => l_interface_flag_tab,
x_return_status => l_return_status);
WSH_DEBUG_SV.logmsg(l_module_name,'Error in WSH_NEW_DELIVERIES_PVT.UPDATE_TMS_INTERFACE_FLAG');
WSH_INTEGRATION.DBI_Update_Detail_Log
(p_delivery_detail_id_tab => l_detail_tab,
p_dml_type => l_dbi_dml_type,
x_return_status => l_dbi_rs);
wsh_util_core.default_handler('WSH_DELIVERY_DETAILS_PKG.DELETE_DELIVERY_DETAILS',l_module_name);
END Delete_Delivery_Details;
SELECT *
FROM WSH_DELIVERY_DETAILS
WHERE ROWID = p_rowid
FOR UPDATE OF DELIVERY_DETAIL_ID NOWAIT;
FND_MESSAGE.Set_Name('FND', 'FORM_RECORD_DELETED');
WSH_DEBUG_SV.log(l_module_name,'FORM_RECORD_DELETED');
(recinfo.last_update_date = p_delivery_details_info.LAST_UPDATE_DATE)
and
((recinfo.last_update_login = p_delivery_details_info.LAST_UPDATE_LOGIN)
or
((recinfo.last_update_login is null)
and (p_delivery_details_info.LAST_UPDATE_LOGIN is null)))
and
(recinfo.last_updated_by = p_delivery_details_info.LAST_UPDATED_BY)
and
((recinfo.program_application_id = p_delivery_details_info.PROGRAM_APPLICATION_ID)
or
((recinfo.program_application_id is null)
and (p_delivery_details_info.PROGRAM_APPLICATION_ID is null)))
and ((recinfo.program_id = p_delivery_details_info.PROGRAM_ID)
or
((recinfo.program_id is null)
and (p_delivery_details_info.PROGRAM_ID is null)))
and
((recinfo.program_update_date = p_delivery_details_info.PROGRAM_UPDATE_DATE)
or
((recinfo.program_update_date is null)
and (p_delivery_details_info.PROGRAM_UPDATE_DATE is null)))
and
((recinfo.request_id = p_delivery_details_info.REQUEST_ID)
or
((recinfo.request_id is null)
and (p_delivery_details_info.REQUEST_ID is null)))
and
(recinfo.requested_quantity = p_delivery_details_info.REQUESTED_QUANTITY)
and
((recinfo.shipped_quantity = p_delivery_details_info.SHIPPED_QUANTITY)
or
((recinfo.shipped_quantity is null)
and (p_delivery_details_info.SHIPPED_QUANTITY is null)))
and
((recinfo.delivered_quantity = p_delivery_details_info.DELIVERED_QUANTITY)
or
((recinfo.delivered_quantity is null)
and (p_delivery_details_info.DELIVERED_QUANTITY is null)))
and
(recinfo.requested_quantity_uom = p_delivery_details_info.REQUESTED_QUANTITY_UOM)
and
((recinfo.subinventory= p_delivery_details_info.SUBINVENTORY)
or
((recinfo.subinventory is null)
and (p_delivery_details_info.SUBINVENTORY is null)))
and
((recinfo.revision = p_delivery_details_info.REVISION)
or
((recinfo.revision is null)
and (p_delivery_details_info.REVISION is null)))
and
((recinfo.lot_number = p_delivery_details_info.LOT_NUMBER)
or
((recinfo.lot_number is null)
and (p_delivery_details_info.LOT_NUMBER is null)))
and
((recinfo.customer_requested_lot_flag = p_delivery_details_info.CUSTOMER_REQUESTED_LOT_FLAG)
or
((recinfo.customer_requested_lot_flag is null)
and (p_delivery_details_info.CUSTOMER_REQUESTED_LOT_FLAG is null)))
and
((recinfo.serial_number = p_delivery_details_info.SERIAL_NUMBER)
or
((recinfo.serial_number is null)
and (p_delivery_details_info.SERIAL_NUMBER is null)))
and
((recinfo.locator_id = p_delivery_details_info.locator_ID)
or
((recinfo.locator_id is null)
and (p_delivery_details_info.locator_ID is null)))
and
((recinfo.date_requested = p_delivery_details_info.DATE_REQUESTED)
or
((recinfo.date_requested is null)
and (p_delivery_details_info.DATE_REQUESTED is null)))
and
((recinfo.date_scheduled = p_delivery_details_info.DATE_SCHEDULED)
or
((recinfo.date_scheduled is null)
and (p_delivery_details_info.DATE_SCHEDULED is null)))
and
((recinfo.master_container_item_id = p_delivery_details_info.MASTER_CONTAINER_ITEM_ID)
or
((recinfo.master_container_item_id is null)
and (p_delivery_details_info.MASTER_CONTAINER_ITEM_ID is null)))
and
((recinfo.detail_container_item_id = p_delivery_details_info.DETAIL_CONTAINER_ITEM_ID)
or
((recinfo.detail_container_item_id is null)
and (p_delivery_details_info.DETAIL_CONTAINER_ITEM_ID is null)))
and
((recinfo.load_seq_number = p_delivery_details_info.LOAD_SEQ_NUMBER)
or
((recinfo.load_seq_number is null)
and (p_delivery_details_info.LOAD_SEQ_NUMBER is null)))
and
((recinfo.ship_method_code = p_delivery_details_info.SHIP_METHOD_CODE)
or
((recinfo.ship_method_code is null)
and (p_delivery_details_info.SHIP_METHOD_CODE is null)))
and
((recinfo.carrier_id = p_delivery_details_info.CARRIER_ID)
or
((recinfo.carrier_id is null)
and (p_delivery_details_info.CARRIER_ID is null)))
and
((recinfo.freight_terms_code = p_delivery_details_info.FREIGHT_TERMS_CODE)
or
((recinfo.freight_terms_code is null)
and (p_delivery_details_info.FREIGHT_TERMS_CODE is null)))
and
((recinfo.shipment_priority_code = p_delivery_details_info.SHIPMENT_PRIORITY_CODE)
or
((recinfo.shipment_priority_code is null)
and (p_delivery_details_info.SHIPMENT_PRIORITY_CODE is null)))
and
((recinfo.fob_code = p_delivery_details_info.FOB_CODE)
or
((recinfo.fob_code is null)
and (p_delivery_details_info.FOB_CODE is null)))
and
((recinfo.customer_item_id = p_delivery_details_info.CUSTOMER_ITEM_ID)
or
((recinfo.customer_item_id is null)
and (p_delivery_details_info.CUSTOMER_ITEM_ID is null)))
and
((recinfo.dep_plan_required_flag = p_delivery_details_info.DEP_PLAN_REQUIRED_FLAG)
or
((recinfo.dep_plan_required_flag is null)
and (p_delivery_details_info.DEP_PLAN_REQUIRED_FLAG is null)))
and
((recinfo.customer_prod_seq = p_delivery_details_info.CUSTOMER_PROD_SEQ)
or
((recinfo.customer_prod_seq is null)
and (p_delivery_details_info.CUSTOMER_PROD_SEQ is null)))
and
((recinfo.customer_dock_code = p_delivery_details_info.CUSTOMER_DOCK_CODE)
or
((recinfo.customer_dock_code is null)
and (p_delivery_details_info.CUSTOMER_DOCK_CODE is null)))
and
((recinfo.cust_model_serial_number = p_delivery_details_info.CUST_MODEL_SERIAL_NUMBER)
or
((recinfo.cust_model_serial_number is null)
and (p_delivery_details_info.CUST_MODEL_SERIAL_NUMBER is null)))
and
((recinfo.customer_job = p_delivery_details_info.CUSTOMER_JOB)
or
((recinfo.customer_job is null)
and (p_delivery_details_info.CUSTOMER_JOB is null)))
and
((recinfo.customer_production_line = p_delivery_details_info.CUSTOMER_PRODUCTION_LINE)
or
((recinfo.customer_production_line is null)
and (p_delivery_details_info.CUSTOMER_PRODUCTION_LINE is null)))
and
((recinfo.net_weight = p_delivery_details_info.NET_WEIGHT)
or
((recinfo.net_weight is null)
and (p_delivery_details_info.NET_WEIGHT is null)))
and
((recinfo.weight_uom_code = p_delivery_details_info.WEIGHT_UOM_CODE)
or
((recinfo.weight_uom_code is null)
and (p_delivery_details_info.WEIGHT_UOM_CODE is null)))
and
((recinfo.volume = p_delivery_details_info.VOLUME)
or
((recinfo.volume is null)
and (p_delivery_details_info.VOLUME is null)))
and
((recinfo.volume_uom_code = p_delivery_details_info.VOLUME_UOM_CODE)
or
((recinfo.volume_uom_code is null)
and (p_delivery_details_info.VOLUME_UOM_CODE is null)))
and
((recinfo.tp_attribute_category = p_delivery_details_info.TP_ATTRIBUTE_CATEGORY)
or
((recinfo.tp_attribute_category is null)
and (p_delivery_details_info.TP_ATTRIBUTE_CATEGORY is null)))
and
((recinfo.tp_attribute1 = p_delivery_details_info.TP_ATTRIBUTE1)
or
((recinfo.tp_attribute1 is null)
and (p_delivery_details_info.TP_ATTRIBUTE1 is null)))
and
((recinfo.tp_attribute2 = p_delivery_details_info.TP_ATTRIBUTE2)
or
((recinfo.tp_attribute2 is null)
and (p_delivery_details_info.TP_ATTRIBUTE2 is null)))
and
((recinfo.tp_attribute3 = p_delivery_details_info.TP_ATTRIBUTE3)
or
((recinfo.tp_attribute3 is null)
and (p_delivery_details_info.TP_ATTRIBUTE3 is null)))
and
((recinfo.tp_attribute4 = p_delivery_details_info.TP_ATTRIBUTE4)
or
((recinfo.tp_attribute4 is null)
and (p_delivery_details_info.TP_ATTRIBUTE4 is null)))
and
((recinfo.tp_attribute5 = p_delivery_details_info.TP_ATTRIBUTE5)
or
((recinfo.tp_attribute5 is null)
and (p_delivery_details_info.TP_ATTRIBUTE5 is null)))
and
((recinfo.tp_attribute6 = p_delivery_details_info.TP_ATTRIBUTE6)
or
((recinfo.tp_attribute6 is null)
and (p_delivery_details_info.TP_ATTRIBUTE6 is null)))
and
((recinfo.tp_attribute7 = p_delivery_details_info.TP_ATTRIBUTE7)
or
((recinfo.tp_attribute7 is null)
and (p_delivery_details_info.TP_ATTRIBUTE7 is null)))
and
((recinfo.tp_attribute8 = p_delivery_details_info.TP_ATTRIBUTE8)
or
((recinfo.tp_attribute8 is null)
and (p_delivery_details_info.TP_ATTRIBUTE8 is null)))
and
((recinfo.tp_attribute9 = p_delivery_details_info.TP_ATTRIBUTE9)
or
((recinfo.tp_attribute9 is null)
and (p_delivery_details_info.TP_ATTRIBUTE9 is null)))
and
((recinfo.tp_attribute10 = p_delivery_details_info.TP_ATTRIBUTE10)
or
((recinfo.tp_attribute10 is null)
and (p_delivery_details_info.TP_ATTRIBUTE10 is null)))
and
((recinfo.tp_attribute11 = p_delivery_details_info.TP_ATTRIBUTE11)
or
((recinfo.tp_attribute11 is null)
and (p_delivery_details_info.TP_ATTRIBUTE11 is null)))
and
((recinfo.tp_attribute12 = p_delivery_details_info.TP_ATTRIBUTE12)
or
((recinfo.tp_attribute12 is null)
and (p_delivery_details_info.TP_ATTRIBUTE12 is null)))
and
((recinfo.tp_attribute13 = p_delivery_details_info.TP_ATTRIBUTE13)
or
((recinfo.tp_attribute13 is null)
and (p_delivery_details_info.TP_ATTRIBUTE13 is null)))
and
((recinfo.tp_attribute14 = p_delivery_details_info.TP_ATTRIBUTE14)
or
((recinfo.tp_attribute14 is null)
and (p_delivery_details_info.TP_ATTRIBUTE14 is null)))
and
((recinfo.tp_attribute15 = p_delivery_details_info.TP_ATTRIBUTE15)
or
((recinfo.tp_attribute15 is null)
and (p_delivery_details_info.TP_ATTRIBUTE15 is null)))
and
((recinfo.attribute_category = p_delivery_details_info.ATTRIBUTE_CATEGORY)
or
((recinfo.attribute_category is null)
and (p_delivery_details_info.ATTRIBUTE_CATEGORY is null)))
and
((recinfo.attribute1 = p_delivery_details_info.ATTRIBUTE1)
or
((recinfo.attribute1 is null)
and (p_delivery_details_info.ATTRIBUTE1 is null)))
and
((recinfo.attribute_category = p_delivery_details_info.ATTRIBUTE_CATEGORY)
or
((recinfo.attribute_category is null)
and (p_delivery_details_info.ATTRIBUTE_CATEGORY is null)))
and
((recinfo.attribute2 = p_delivery_details_info.ATTRIBUTE2)
or
((recinfo.attribute2 is null)
and (p_delivery_details_info.ATTRIBUTE2 is null)))
and
((recinfo.attribute3 = p_delivery_details_info.ATTRIBUTE3)
or
((recinfo.attribute3 is null)
and (p_delivery_details_info.ATTRIBUTE3 is null)))
and
((recinfo.attribute4 = p_delivery_details_info.ATTRIBUTE4)
or
((recinfo.attribute4 is null)
and (p_delivery_details_info.ATTRIBUTE4 is null)))
and
((recinfo.attribute5 = p_delivery_details_info.ATTRIBUTE5)
or
((recinfo.attribute5 is null)
and (p_delivery_details_info.ATTRIBUTE5 is null)))
and
((recinfo.attribute6 = p_delivery_details_info.ATTRIBUTE6)
or
((recinfo.attribute6 is null)
and (p_delivery_details_info.ATTRIBUTE6 is null)))
and
((recinfo.attribute7 = p_delivery_details_info.ATTRIBUTE7)
or
((recinfo.attribute7 is null)
and (p_delivery_details_info.ATTRIBUTE7 is null)))
and
((recinfo.attribute8 = p_delivery_details_info.ATTRIBUTE8)
or
((recinfo.attribute8 is null)
and (p_delivery_details_info.ATTRIBUTE8 is null)))
and
((recinfo.attribute9 = p_delivery_details_info.ATTRIBUTE9)
or
((recinfo.attribute9 is null)
and (p_delivery_details_info.ATTRIBUTE9 is null)))
and
((recinfo.attribute10 = p_delivery_details_info.ATTRIBUTE10)
or
((recinfo.attribute10 is null)
and (p_delivery_details_info.ATTRIBUTE10 is null)))
and
((recinfo.attribute11 = p_delivery_details_info.ATTRIBUTE11)
or
((recinfo.attribute11 is null)
and (p_delivery_details_info.ATTRIBUTE11 is null)))
and
((recinfo.attribute12 = p_delivery_details_info.ATTRIBUTE12)
or
((recinfo.attribute12 is null)
and (p_delivery_details_info.ATTRIBUTE12 is null)))
and
((recinfo.attribute13 = p_delivery_details_info.ATTRIBUTE13)
or
((recinfo.attribute13 is null)
and (p_delivery_details_info.ATTRIBUTE13 is null)))
and
((recinfo.attribute14 = p_delivery_details_info.ATTRIBUTE14)
or
((recinfo.attribute14 is null)
and (p_delivery_details_info.ATTRIBUTE14 is null)))
and
((recinfo.attribute15 = p_delivery_details_info.ATTRIBUTE15)
or
((recinfo.attribute15 is null)
and (p_delivery_details_info.ATTRIBUTE15 is null)))
and
((recinfo.mvt_stat_status = p_delivery_details_info.mvt_stat_status)
or
((recinfo.mvt_stat_status is null)
and (p_delivery_details_info.mvt_stat_status is null)))
and
((recinfo.organization_id = p_delivery_details_info.organization_id)
or
((recinfo.organization_id is null)
and (p_delivery_details_info.organization_id is null)))
and
((recinfo.org_id = p_delivery_details_info.org_id)
or
((recinfo.org_id is null)
and (p_delivery_details_info.org_id is null)))
and
((recinfo.transaction_temp_id = p_delivery_details_info.transaction_temp_id)
or
((recinfo.transaction_temp_id is null)
and (p_delivery_details_info.transaction_temp_id is null)))
and
((recinfo.ship_set_id = p_delivery_details_info.ship_set_id)
or
((recinfo.ship_set_id is null)
and (p_delivery_details_info.ship_set_id is null)))
and
((recinfo.arrival_set_id = p_delivery_details_info.arrival_set_id)
or
((recinfo.arrival_set_id is null)
and (p_delivery_details_info.arrival_set_id is null)))
and
((recinfo.ship_model_complete_flag = p_delivery_details_info.ship_model_complete_flag)
or
((recinfo.ship_model_complete_flag is null)
and (p_delivery_details_info.ship_model_complete_flag is null)))
and
((recinfo.top_model_line_id = p_delivery_details_info.top_model_line_id)
or
((recinfo.top_model_line_id is null)
and (p_delivery_details_info.top_model_line_id is null)))
and
((recinfo.hold_code = p_delivery_details_info.hold_code)
or
((recinfo.hold_code is null)
and (p_delivery_details_info.hold_code is null)))
and
((recinfo.source_header_number = p_delivery_details_info.source_header_number)
or
((recinfo.source_header_number is null)
and (p_delivery_details_info.source_header_number is null)))
and
((recinfo.source_header_type_id = p_delivery_details_info.source_header_type_id)
or
((recinfo.source_header_type_id is null)
and (p_delivery_details_info.source_header_type_id is null)))
and
((recinfo.source_header_type_name = p_delivery_details_info.source_header_type_name)
or
((recinfo.source_header_type_name is null)
and (p_delivery_details_info.source_header_type_name is null)))
and
((recinfo.cust_po_number = p_delivery_details_info.cust_po_number)
or
((recinfo.cust_po_number is null)
and (p_delivery_details_info.cust_po_number is null)))
and
((recinfo.ato_line_id = p_delivery_details_info.ato_line_id)
or
((recinfo.ato_line_id is null)
and (p_delivery_details_info.ato_line_id is null)))
and
((recinfo.src_requested_quantity = p_delivery_details_info.src_requested_quantity)
or
((recinfo.src_requested_quantity is null)
and (p_delivery_details_info.src_requested_quantity is null)))
and
((recinfo.src_requested_quantity_uom = p_delivery_details_info.src_requested_quantity_uom)
or
((recinfo.src_requested_quantity_uom is null)
and (p_delivery_details_info.src_requested_quantity_uom is null)))
and
((recinfo.move_order_line_id = p_delivery_details_info.move_order_line_id)
or
((recinfo.move_order_line_id is null)
and (p_delivery_details_info.move_order_line_id is null)))
and
((recinfo.cancelled_quantity = p_delivery_details_info.cancelled_quantity)
or
((recinfo.cancelled_quantity is null)
and (p_delivery_details_info.cancelled_quantity is null)))
and
((recinfo.hazard_class_id = p_delivery_details_info.hazard_class_id)
or
((recinfo.hazard_class_id is null)
and (p_delivery_details_info.hazard_class_id is null)))
and
((recinfo.quality_control_quantity = p_delivery_details_info.quality_control_quantity)
or
((recinfo.quality_control_quantity is null)
and (p_delivery_details_info.quality_control_quantity is null)))
and
((recinfo.cycle_count_quantity = p_delivery_details_info.cycle_count_quantity)
or
((recinfo.cycle_count_quantity is null)
and (p_delivery_details_info.cycle_count_quantity is null)))
and
((recinfo.tracking_number = p_delivery_details_info.tracking_number)
or
((recinfo.tracking_number is null)
and (p_delivery_details_info.tracking_number is null)))
and
((recinfo.movement_id = p_delivery_details_info.movement_id)
or
((recinfo.movement_id is null)
and (p_delivery_details_info.movement_id is null)))
and
((recinfo.shipping_instructions = p_delivery_details_info.shipping_instructions)
or
((recinfo.shipping_instructions is null)
and (p_delivery_details_info.shipping_instructions is null)))
and
((recinfo.packing_instructions = p_delivery_details_info.packing_instructions)
or
((recinfo.packing_instructions is null)
and (p_delivery_details_info.packing_instructions is null)))
and
((recinfo.project_id = p_delivery_details_info.project_id)
or
((recinfo.project_id is null)
and (p_delivery_details_info.project_id is null)))
and
((recinfo.task_id = p_delivery_details_info.task_id)
or
((recinfo.task_id is null)
and (p_delivery_details_info.task_id is null)))
and
((recinfo.oe_interfaced_flag = p_delivery_details_info.oe_interfaced_flag)
or
((recinfo.oe_interfaced_flag is null)
and (p_delivery_details_info.oe_interfaced_flag is null)))
and
((recinfo.split_from_delivery_detail_id = p_delivery_details_info.split_from_detail_id)
or
((recinfo.split_from_delivery_detail_id is null)
and (p_delivery_details_info.split_from_detail_id is null)))
and
((recinfo.inv_interfaced_flag = p_delivery_details_info.inv_interfaced_flag)
or
((recinfo.inv_interfaced_flag is null)
and (p_delivery_details_info.inv_interfaced_flag is null)))
and
((recinfo.source_line_number = p_delivery_details_info.source_line_number)
or
((recinfo.source_line_number is null)
and (p_delivery_details_info.source_line_number is null)))
and
((recinfo.inspection_flag = p_delivery_details_info.inspection_flag)
or
((recinfo.inspection_flag is null)
and (p_delivery_details_info.inspection_flag is null)))
and
((recinfo.released_status = p_delivery_details_info.released_status)
or
((recinfo.released_status is null)
and (p_delivery_details_info.released_status is null)))
and
(recinfo.delivery_detail_id = p_delivery_details_info.DELIVERY_detail_ID)
and (recinfo.container_flag = p_delivery_details_info.container_flag)
and ((recinfo.container_type_code = p_delivery_details_info.container_type_code)
or
((recinfo.container_type_code is null)
and (p_delivery_details_info.container_type_code is null)))
and ((recinfo.container_name = p_delivery_details_info.container_name)
or
((recinfo.container_name is null)
and (p_delivery_details_info.container_name is null)))
and ((recinfo.fill_percent = p_delivery_details_info.fill_percent)
or
((recinfo.fill_percent is null)
and (p_delivery_details_info.fill_percent is null)))
and ((recinfo.gross_weight = p_delivery_details_info.gross_weight)
or
((recinfo.gross_weight is null)
and (p_delivery_details_info.gross_weight is null)))
and ((recinfo.master_serial_number = p_delivery_details_info.master_serial_number)
or
((recinfo.master_serial_number is null)
and (p_delivery_details_info.master_serial_number is null)))
and ((recinfo.maximum_load_weight = p_delivery_details_info.maximum_load_weight)
or
((recinfo.maximum_load_weight is null)
and (p_delivery_details_info.maximum_load_weight is null)))
and ((recinfo.maximum_volume = p_delivery_details_info.maximum_volume)
or
((recinfo.maximum_volume is null)
and (p_delivery_details_info.maximum_volume is null)))
and ((recinfo.minimum_fill_percent = p_delivery_details_info.minimum_fill_percent)
or
((recinfo.minimum_fill_percent is null)
and (p_delivery_details_info.minimum_fill_percent is null)))
and ((recinfo.seal_code = p_delivery_details_info.seal_code)
or
((recinfo.seal_code is null)
and (p_delivery_details_info.seal_code is null)))
and ((recinfo.unit_number = p_delivery_details_info.unit_number)
or
((recinfo.unit_number is null)
and (p_delivery_details_info.unit_number is null)))
and ((recinfo.unit_price = p_delivery_details_info.unit_price)
or
((recinfo.unit_price is null)
and (p_delivery_details_info.unit_price is null)))
and ((recinfo.currency_code = p_delivery_details_info.currency_code)
or
((recinfo.currency_code is null)
and (p_delivery_details_info.currency_code is null)))
and ((recinfo.freight_class_cat_id = p_delivery_details_info.freight_class_cat_id)
or
((recinfo.freight_class_cat_id is null)
and (p_delivery_details_info.freight_class_cat_id is null)))
and ((recinfo.commodity_code_cat_id = p_delivery_details_info.commodity_code_cat_id)
or
((recinfo.commodity_code_cat_id is null)
and (p_delivery_details_info.commodity_code_cat_id is null)))
/* OPM 09/11/00 added OPM attributes */
and
((recinfo.preferred_grade = p_delivery_details_info.PREFERRED_GRADE)
or
((recinfo.preferred_grade is null)
and (p_delivery_details_info.PREFERRED_GRADE is null)))
and
((recinfo.src_requested_quantity2 = p_delivery_details_info.SRC_REQUESTED_QUANTITY2)
or
((recinfo.src_requested_quantity2 is null)
and (p_delivery_details_info.SRC_REQUESTED_QUANTITY2 is null)))
and
((recinfo.src_requested_quantity_uom2 = p_delivery_details_info.SRC_REQUESTED_QUANTITY_UOM2)
or
((recinfo.src_requested_quantity_uom2 is null)
and (p_delivery_details_info.SRC_REQUESTED_QUANTITY_UOM2 is null)))
and
((recinfo.requested_quantity2 = p_delivery_details_info.REQUESTED_QUANTITY2)
or
((recinfo.requested_quantity2 is null)
and (p_delivery_details_info.REQUESTED_QUANTITY2 is null)))
and
((recinfo.shipped_quantity2 = p_delivery_details_info.SHIPPED_QUANTITY2)
or
((recinfo.shipped_quantity2 is null)
and (p_delivery_details_info.SHIPPED_QUANTITY2 is null)))
and
((recinfo.delivered_quantity2 = p_delivery_details_info.DELIVERED_QUANTITY2)
or
((recinfo.delivered_quantity2 is null)
and (p_delivery_details_info.DELIVERED_QUANTITY2 is null)))
and
((recinfo.cancelled_quantity2 = p_delivery_details_info.CANCELLED_QUANTITY2)
or
((recinfo.cancelled_quantity2 is null)
and (p_delivery_details_info.CANCELLED_QUANTITY2 is null)))
and
((recinfo.cycle_count_quantity2 = p_delivery_details_info.CYCLE_COUNT_QUANTITY2)
or
((recinfo.cycle_count_quantity2 is null)
and (p_delivery_details_info.CYCLE_COUNT_QUANTITY2 is null)))
and
((recinfo.requested_quantity_uom2 = p_delivery_details_info.REQUESTED_QUANTITY_UOM2)
or
((recinfo.requested_quantity_uom2 is null)
and (p_delivery_details_info.REQUESTED_QUANTITY_UOM2 is null)))
-- HW OPMCONV - Removed check for sublot
and
((recinfo.to_serial_number = p_delivery_details_info.TO_SERIAL_NUMBER)
or
((recinfo.to_serial_number is null)
and (p_delivery_details_info.TO_SERIAL_NUMBER is null)))
and
((recinfo.picked_quantity = p_delivery_details_info.PICKED_QUANTITY)
or
((recinfo.picked_quantity is null)
and (p_delivery_details_info.PICKED_QUANTITY is null)))
and
((recinfo.picked_quantity2 = p_delivery_details_info.PICKED_QUANTITY2)
or
((recinfo.picked_quantity2 is null)
and (p_delivery_details_info.PICKED_QUANTITY2 is null)))
/* H Integration: datamodel changes wrudge */
and
((recinfo.received_quantity = p_delivery_details_info.RECEIVED_QUANTITY)
or
( (recinfo.received_quantity is null)
and (p_delivery_details_info.RECEIVED_QUANTITY is null)))
and
((recinfo.received_quantity2 = p_delivery_details_info.RECEIVED_QUANTITY2)
or
( (recinfo.received_quantity2 is null)
and (p_delivery_details_info.RECEIVED_QUANTITY2 is null)))
and
((recinfo.source_line_set_id = p_delivery_details_info.SOURCE_LINE_SET_ID)
or
( (recinfo.source_line_set_id is null)
and (p_delivery_details_info.SOURCE_LINE_SET_ID is null)))
and
((recinfo.received_quantity2 = p_delivery_details_info.RECEIVED_QUANTITY2)
or
( (recinfo.received_quantity2 is null)
and (p_delivery_details_info.RECEIVED_QUANTITY2 is null)))
and
((recinfo.source_line_set_id = p_delivery_details_info.SOURCE_LINE_SET_ID)
or
( (recinfo.source_line_set_id is null)
and (p_delivery_details_info.SOURCE_LINE_SET_ID is null)))
/* J Inbound Logistics: New columns jckwok */
and
((recinfo.vendor_id = p_delivery_details_info.vendor_id)
or
( (recinfo.vendor_id is null)
and (p_delivery_details_info.vendor_id is null)))
and
((recinfo.ship_from_site_id = p_delivery_details_info.ship_from_site_id)
or
( (recinfo.ship_from_site_id is null)
and (p_delivery_details_info.ship_from_site_id is null)))
and
((nvl(recinfo.line_direction,'O') = nvl(p_delivery_details_info.line_direction,'O'))
or
( (recinfo.line_direction is null)
and (p_delivery_details_info.line_direction is null)))
and
((recinfo.party_id = p_delivery_details_info.party_id)
or
( (recinfo.party_id is null)
and (p_delivery_details_info.party_id is null)))
and
((recinfo.routing_req_id = p_delivery_details_info.routing_req_id)
or
( (recinfo.routing_req_id is null)
and (p_delivery_details_info.routing_req_id is null)))
and
((recinfo.shipping_control = p_delivery_details_info.shipping_control)
or
( (recinfo.shipping_control is null)
and (p_delivery_details_info.shipping_control is null)))
and
((recinfo.source_blanket_reference_id = p_delivery_details_info.source_blanket_reference_id)
or
( (recinfo.source_blanket_reference_id is null)
and (p_delivery_details_info.source_blanket_reference_id is null)))
and
((recinfo.source_blanket_reference_num = p_delivery_details_info.source_blanket_reference_num)
or
( (recinfo.source_blanket_reference_num is null)
and (p_delivery_details_info.source_blanket_reference_num is null)))
and
((recinfo.po_shipment_line_id = p_delivery_details_info.po_shipment_line_id)
or
( (recinfo.po_shipment_line_id is null)
and (p_delivery_details_info.po_shipment_line_id is null)))
and
((recinfo.po_shipment_line_number = p_delivery_details_info.po_shipment_line_number)
or
( (recinfo.po_shipment_line_number is null)
and (p_delivery_details_info.po_shipment_line_number is null)))
and
((recinfo.returned_quantity = p_delivery_details_info.returned_quantity)
or
( (recinfo.returned_quantity is null)
and (p_delivery_details_info.returned_quantity is null)))
and
((recinfo.returned_quantity2 = p_delivery_details_info.returned_quantity2)
or
( (recinfo.returned_quantity2 is null)
and (p_delivery_details_info.returned_quantity2 is null)))
and
((recinfo.rcv_shipment_line_id = p_delivery_details_info.rcv_shipment_line_id)
or
( (recinfo.rcv_shipment_line_id is null)
and (p_delivery_details_info.rcv_shipment_line_id is null)))
and
((recinfo.source_line_type_code = p_delivery_details_info.source_line_type_code)
or
( (recinfo.source_line_type_code is null)
and (p_delivery_details_info.source_line_type_code is null)))
and
((recinfo.supplier_item_number = p_delivery_details_info.supplier_item_number)
or
( (recinfo.supplier_item_number is null)
and (p_delivery_details_info.supplier_item_number is null)))
/* J TP release : ttrichy*/
and
((nvl(recinfo.IGNORE_FOR_PLANNING, 'N') = nvl(p_delivery_details_info.IGNORE_FOR_PLANNING, 'N')))
and
((recinfo.EARLIEST_PICKUP_DATE = p_delivery_details_info.EARLIEST_PICKUP_DATE)
or
( (recinfo.EARLIEST_PICKUP_DATE is null)
and (p_delivery_details_info.EARLIEST_PICKUP_DATE is null)))
and
((recinfo.LATEST_PICKUP_DATE = p_delivery_details_info.LATEST_PICKUP_DATE)
or
( (recinfo.LATEST_PICKUP_DATE is null)
and (p_delivery_details_info.LATEST_PICKUP_DATE is null)))
and
((recinfo.EARLIEST_DROPOFF_DATE = p_delivery_details_info.EARLIEST_DROPOFF_DATE)
or
( (recinfo.EARLIEST_DROPOFF_DATE is null)
and (p_delivery_details_info.EARLIEST_DROPOFF_DATE is null)))
and
((recinfo.LATEST_DROPOFF_DATE = p_delivery_details_info.LATEST_DROPOFF_DATE)
or
( (recinfo.LATEST_DROPOFF_DATE is null)
and (p_delivery_details_info.LATEST_DROPOFF_DATE is null)))
and
((recinfo.REQUEST_DATE_TYPE_CODE = p_delivery_details_info.REQUEST_DATE_TYPE_CODE)
or
( (recinfo.REQUEST_DATE_TYPE_CODE is null)
and (p_delivery_details_info.REQUEST_DATE_TYPE_CODE is null)))
and
((recinfo.tp_delivery_detail_id = p_delivery_details_info.tp_delivery_detail_id)
or
( (recinfo.tp_delivery_detail_id is null)
and (p_delivery_details_info.tp_delivery_detail_id is null)))
and
((recinfo.source_document_type_id = p_delivery_details_info.source_document_type_id)
or
( (recinfo.source_document_type_id is null)
and (p_delivery_details_info.source_document_type_id is null)))
-- J: W/V Changes
and
((recinfo.filled_volume = p_delivery_details_info.FILLED_VOLUME)
or
((recinfo.filled_volume is null)
and (p_delivery_details_info.FILLED_VOLUME is null)))
/* --- commented as wv frozen flag is not updateable field from UI.
and
((recinfo.wv_frozen_flag = p_delivery_details_info.WV_FROZEN_FLAG)
or
((recinfo.wv_frozen_flag is null)
and (p_delivery_details_info.WV_FROZEN_FLAG is null)))
*/
-- J IB : asutar
and
((recinfo.po_revision_number = p_delivery_details_info.po_revision_number)
or
((recinfo.po_revision_number is null)
and (p_delivery_details_info.po_revision_number is null)))
-- bug#6689448 ( Replenishment Project)
and
((recinfo.replenishment_status = p_delivery_details_info.replenishment_status)
or
((recinfo.replenishment_status is null)
and (p_delivery_details_info.replenishment_status is null)))
and
((recinfo.release_revision_number = p_delivery_details_info.release_revision_number)
or
((recinfo.release_revision_number is null)
and (p_delivery_details_info.release_revision_number is null)))
) THEN
--
IF l_debug_on THEN
WSH_DEBUG_SV.log(l_module_name,'Nothing has changed');
PROCEDURE Update_Delivery_Details(
p_rowid IN VARCHAR2 := NULL,
p_delivery_details_info IN WSH_GLBL_VAR_STRCT_GRP.Delivery_Details_Rec_Type,
x_return_status OUT NOCOPY VARCHAR2
) IS
-- J: W/V Changes
CURSOR get_dd_info IS
SELECT rowid,
gross_weight,
net_weight,
volume,
filled_volume,
fill_percent,
unit_weight,
unit_volume,
container_flag,
NVL(wv_frozen_flag,'Y'),
weight_uom_code,
volume_uom_code,
inventory_item_id,
--lpn conv
locator_id,
subinventory,
container_name,
requested_quantity, -- OTM R12
shipped_quantity, -- OTM R12
-- bug# 6719369 (replenishment project):
released_status,
replenishment_status
FROM wsh_delivery_details
WHERE delivery_detail_id = p_delivery_details_info.delivery_detail_id;
SELECT wda.delivery_id
FROM wsh_delivery_assignments wda,
wsh_new_deliveries wnd
WHERE wda.delivery_detail_id = p_delivery_detail_id
AND wda.delivery_id = wnd.delivery_id
AND wnd.tms_interface_flag IN
(WSH_NEW_DELIVERIES_PVT.C_TMS_CREATE_IN_PROCESS,
WSH_NEW_DELIVERIES_PVT.C_TMS_UPDATE_IN_PROCESS,
WSH_NEW_DELIVERIES_PVT.C_TMS_AWAITING_ANSWER,
WSH_NEW_DELIVERIES_PVT.C_TMS_ANSWER_RECEIVED)
AND NVL(wnd.ignore_for_planning, 'N') = 'N';
SELECT wdd.source_line_id,
wdd.requested_quantity,
wdd.requested_quantity2,
wda.delivery_id
FROM wsh_delivery_details wdd,
wsh_delivery_assignments wda
WHERE wdd.delivery_detail_id = p_delivery_details_info.delivery_detail_id
AND wdd.delivery_detail_id = wda.delivery_detail_id;
SELECT Description,
Container_Type_Code,
minimum_fill_percent,
maximum_load_weight,
internal_volume,
unit_weight,
unit_volume,
weight_uom_code,
volume_uom_code
FROM MTL_SYSTEM_ITEMS
WHERE inventory_item_id = v_cont_item_id
AND container_item_flag = 'Y'
AND organization_id = v_org_id
AND nvl(vehicle_item_flag,'N') = 'N';
l_module_name CONSTANT VARCHAR2(100) := 'wsh.plsql.' || G_PKG_NAME || '.' || 'UPDATE_DELIVERY_DETAILS';
SAVEPOINT s_before_update_dd;
WSH_WMS_LPN_GRP.g_update_to_containers := 'Y';
l_sync_tmp_rec.operation_type := 'UPDATE';
UPDATE wsh_delivery_details
SET
delivery_detail_id = p_delivery_details_info.delivery_detail_id,
unit_weight = l_unit_weight_item,
unit_volume = l_unit_volume_item,
source_code = p_delivery_details_info.source_code,
source_header_id = p_delivery_details_info.source_header_id,
source_line_id = p_delivery_details_info.source_line_id,
customer_id = p_delivery_details_info.customer_id,
sold_to_contact_id = p_delivery_details_info.sold_to_contact_id,
inventory_item_id = p_delivery_details_info.inventory_item_id,
item_description = l_item_description,
country_of_origin = p_delivery_details_info.country_of_origin,
classification = p_delivery_details_info.classification,
ship_from_location_id = p_delivery_details_info.ship_from_location_id,
ship_to_location_id = p_delivery_details_info.ship_to_location_id,
ship_to_contact_id = p_delivery_details_info.ship_to_contact_id,
deliver_to_location_id = p_delivery_details_info.deliver_to_location_id,
deliver_to_contact_id = p_delivery_details_info.deliver_to_contact_id,
intmed_ship_to_location_id = p_delivery_details_info.intmed_ship_to_location_id,
intmed_ship_to_contact_id = p_delivery_details_info.intmed_ship_to_contact_id,
ship_tolerance_above = p_delivery_details_info.ship_tolerance_above,
ship_tolerance_below = p_delivery_details_info.ship_tolerance_below,
requested_quantity = p_delivery_details_info.requested_quantity,
shipped_quantity = p_delivery_details_info.shipped_quantity,
delivered_quantity = p_delivery_details_info.delivered_quantity,
requested_quantity_uom = p_delivery_details_info.requested_quantity_uom,
subinventory = p_delivery_details_info.subinventory,
revision = p_delivery_details_info.revision,
lot_number = p_delivery_details_info.lot_number,
customer_requested_lot_flag = p_delivery_details_info.customer_requested_lot_flag,
serial_number = p_delivery_details_info.serial_number,
locator_id = p_delivery_details_info.locator_id,
date_requested = p_delivery_details_info.date_requested,
date_scheduled = p_delivery_details_info.date_scheduled,
master_container_item_id = p_delivery_details_info.master_container_item_id,
detail_container_item_id = p_delivery_details_info.detail_container_item_id,
load_seq_number = p_delivery_details_info.load_seq_number,
ship_method_code = p_delivery_details_info.ship_method_code,
carrier_id = p_delivery_details_info.carrier_id,
freight_terms_code = p_delivery_details_info.freight_terms_code,
shipment_priority_code = p_delivery_details_info.shipment_priority_code,
fob_code = p_delivery_details_info.fob_code,
customer_item_id = p_delivery_details_info.customer_item_id,
dep_plan_required_flag = p_delivery_details_info.dep_plan_required_flag,
customer_prod_seq = p_delivery_details_info.customer_prod_seq,
customer_dock_code = p_delivery_details_info.customer_dock_code,
cust_model_serial_number = p_delivery_details_info.cust_model_serial_number,
customer_job = p_delivery_details_info.customer_job,
customer_production_line = p_delivery_details_info.customer_production_line,
net_weight = p_delivery_details_info.net_weight,
weight_uom_code = p_delivery_details_info.weight_uom_code,
volume = p_delivery_details_info.volume,
volume_uom_code = p_delivery_details_info.volume_uom_code,
-- J: W/V Changes
filled_volume = p_delivery_details_info.filled_volume,
tp_attribute_category = p_delivery_details_info.tp_attribute_category,
tp_attribute1 = p_delivery_details_info.tp_attribute1,
tp_attribute2 = p_delivery_details_info.tp_attribute2,
tp_attribute3 = p_delivery_details_info.tp_attribute3,
tp_attribute4 = p_delivery_details_info.tp_attribute4,
tp_attribute5 = p_delivery_details_info.tp_attribute5,
tp_attribute6 = p_delivery_details_info.tp_attribute6,
tp_attribute7 = p_delivery_details_info.tp_attribute7,
tp_attribute8 = p_delivery_details_info.tp_attribute8,
tp_attribute9 = p_delivery_details_info.tp_attribute9,
tp_attribute10 = p_delivery_details_info.tp_attribute10,
tp_attribute11 = p_delivery_details_info.tp_attribute11,
tp_attribute12 = p_delivery_details_info.tp_attribute12,
tp_attribute13 = p_delivery_details_info.tp_attribute13,
tp_attribute14 = p_delivery_details_info.tp_attribute14,
tp_attribute15 = p_delivery_details_info.tp_attribute15,
attribute_category = p_delivery_details_info.attribute_category,
attribute1 = p_delivery_details_info.attribute1,
attribute2 = p_delivery_details_info.attribute2,
attribute3 = p_delivery_details_info.attribute3,
attribute4 = p_delivery_details_info.attribute4,
attribute5 = p_delivery_details_info.attribute5,
attribute6 = p_delivery_details_info.attribute6,
attribute7 = p_delivery_details_info.attribute7,
attribute8 = p_delivery_details_info.attribute8,
attribute9 = p_delivery_details_info.attribute9,
attribute10 = p_delivery_details_info.attribute10,
attribute11 = p_delivery_details_info.attribute11,
attribute12 = p_delivery_details_info.attribute12,
attribute13 = p_delivery_details_info.attribute13,
attribute14 = p_delivery_details_info.attribute14,
attribute15 = p_delivery_details_info.attribute15,
last_update_date = p_delivery_details_info.last_update_date,
last_updated_by = p_delivery_details_info.last_updated_by,
last_update_login = p_delivery_details_info.last_update_login,
program_application_id = p_delivery_details_info.program_application_id,
program_id = p_delivery_details_info.program_id,
program_update_date = p_delivery_details_info.program_update_date,
request_id = p_delivery_details_info.request_id,
mvt_stat_status = p_delivery_details_info.mvt_stat_status,
organization_id = p_delivery_details_info.organization_id,
transaction_temp_id = p_delivery_details_info.transaction_temp_id,
ship_set_id = p_delivery_details_info.ship_set_id,
arrival_set_id = p_delivery_details_info.arrival_set_id,
ship_model_complete_flag = p_delivery_details_info.ship_model_complete_flag,
top_model_line_id = p_delivery_details_info.top_model_line_id,
hold_code = p_delivery_details_info.hold_code,
source_header_number = p_delivery_details_info.source_header_number,
source_header_type_id = p_delivery_details_info.source_header_type_id,
source_header_type_name = p_delivery_details_info.source_header_type_name,
cust_po_number = p_delivery_details_info.cust_po_number,
ato_line_id = p_delivery_details_info.ato_line_id,
src_requested_quantity = p_delivery_details_info.src_requested_quantity,
src_requested_quantity_uom = p_delivery_details_info.src_requested_quantity_uom,
move_order_line_id = p_delivery_details_info.move_order_line_id,
cancelled_quantity = p_delivery_details_info.cancelled_quantity,
hazard_class_id = p_delivery_details_info.hazard_class_id,
quality_control_quantity = p_delivery_details_info.quality_control_quantity,
cycle_count_quantity = p_delivery_details_info.cycle_count_quantity,
tracking_number = p_delivery_details_info.tracking_number,
movement_id = p_delivery_details_info.movement_id,
shipping_instructions = p_delivery_details_info.shipping_instructions,
packing_instructions = p_delivery_details_info.packing_instructions,
project_id = p_delivery_details_info.project_id,
task_id = p_delivery_details_info.task_id,
org_id = p_delivery_details_info.org_id,
oe_interfaced_flag = p_delivery_details_info.oe_interfaced_flag,
split_from_delivery_detail_id = p_delivery_details_info.split_from_detail_id,
inv_interfaced_flag = p_delivery_details_info.inv_interfaced_flag,
source_line_number = p_delivery_details_info.source_line_number,
inspection_flag = p_delivery_details_info.inspection_flag,
released_status = p_delivery_details_info.released_status,
container_flag = p_delivery_details_info.container_flag,
container_type_code = l_container_type_code,
container_name = p_delivery_details_info.container_name,
fill_percent = p_delivery_details_info.fill_percent,
gross_weight = p_delivery_details_info.gross_weight,
master_serial_number = p_delivery_details_info.master_serial_number,
maximum_load_weight = l_maximum_load_weight,
maximum_volume = l_maximum_volume,
minimum_fill_percent = l_minimum_fill_percent,
seal_code = p_delivery_details_info.seal_code,
unit_number = p_delivery_details_info.unit_number,
unit_price = p_delivery_details_info.unit_price,
currency_code = p_delivery_details_info.currency_code,
freight_class_cat_id = p_delivery_details_info.freight_class_cat_id,
commodity_code_cat_id = p_delivery_details_info.commodity_code_cat_id,
preferred_grade = p_delivery_details_info.preferred_grade, /* OPM 09/11/000 start */
src_requested_quantity2 = p_delivery_details_info.src_requested_quantity2,
src_requested_quantity_uom2 = p_delivery_details_info.src_requested_quantity_uom2,
requested_quantity2 = p_delivery_details_info.requested_quantity2,
shipped_quantity2 = p_delivery_details_info.shipped_quantity2,
delivered_quantity2 = p_delivery_details_info.delivered_quantity2,
cancelled_quantity2 = p_delivery_details_info.cancelled_quantity2,
quality_control_quantity2 = p_delivery_details_info.quality_control_quantity2,
cycle_count_quantity2 = p_delivery_details_info.cycle_count_quantity2,
requested_quantity_uom2 = p_delivery_details_info.requested_quantity_uom2,
-- HW OPMCONV - No need for sublot_number
-- sublot_number = p_delivery_details_info.sublot_number,
/* OPM 09/11/00 end */
to_serial_number = p_delivery_details_info.to_serial_number,
picked_quantity = p_delivery_details_info.picked_quantity,
picked_quantity2 = p_delivery_details_info.picked_quantity2,
/* H Integration: datamodel changes wrudge */
received_quantity = p_delivery_details_info.received_quantity,
received_quantity2 = p_delivery_details_info.received_quantity2,
source_line_set_id = p_delivery_details_info.source_line_set_id,
lpn_id = p_delivery_details_info.lpn_id,
/* J Inbound Logistics: New columns jckwok */
vendor_id = p_delivery_details_info.vendor_id ,
ship_from_site_id = p_delivery_details_info.ship_from_site_id ,
line_direction = nvl(p_delivery_details_info.line_direction, 'O') ,
party_id = p_delivery_details_info.party_id ,
routing_req_id = p_delivery_details_info.routing_req_id ,
shipping_control = p_delivery_details_info.shipping_control ,
source_blanket_reference_id = p_delivery_details_info.source_blanket_reference_id ,
source_blanket_reference_num = p_delivery_details_info.source_blanket_reference_num,
po_shipment_line_id = p_delivery_details_info.po_shipment_line_id ,
po_shipment_line_number = p_delivery_details_info.po_shipment_line_number ,
returned_quantity = p_delivery_details_info.returned_quantity ,
returned_quantity2 = p_delivery_details_info.returned_quantity2 ,
rcv_shipment_line_id = p_delivery_details_info.rcv_shipment_line_id ,
source_line_type_code = p_delivery_details_info.source_line_type_code ,
supplier_item_number = p_delivery_details_info.supplier_item_number ,
/* J TP release : ttrichy*/
IGNORE_FOR_PLANNING = nvl(p_delivery_details_info.IGNORE_FOR_PLANNING,'N'),
EARLIEST_PICKUP_DATE = p_delivery_details_info.EARLIEST_PICKUP_DATE ,
LATEST_PICKUP_DATE = p_delivery_details_info.LATEST_PICKUP_DATE ,
EARLIEST_DROPOFF_DATE = p_delivery_details_info.EARLIEST_DROPOFF_DATE ,
LATEST_DROPOFF_DATE = p_delivery_details_info.LATEST_DROPOFF_DATE ,
--DEMAND_SATISFACTION_DATE = p_delivery_details_info.DEMAND_SATISFACTION_DATE , --confirm name for this
REQUEST_DATE_TYPE_CODE = p_delivery_details_info.REQUEST_DATE_TYPE_CODE ,
tp_delivery_detail_id = p_delivery_details_info.tp_delivery_detail_id,
source_document_type_id = p_delivery_details_info.source_document_type_id,
/*J: W/V Changes */
wv_frozen_flag = decode(l_frozen_flag,NULL,wv_frozen_flag,l_frozen_flag),
service_level = p_delivery_details_info.service_level,
mode_of_transport = p_delivery_details_info.mode_of_transport,
/* J IB: asutar*/
po_revision_number = p_delivery_details_info.po_revision_number,
release_revision_number = p_delivery_details_info.release_revision_number,
batch_id = p_delivery_details_info.batch_id, --X-dock
replenishment_status = p_delivery_details_info.replenishment_status --bug# 6689448 (replenishment project)
WHERE rowid = l_rowid;
WSH_INTEGRATION.DBI_Update_Detail_Log
(p_delivery_detail_id_tab => l_detail_tab,
p_dml_type => 'UPDATE',
x_return_status => l_dbi_rs);
p_update_flag => 'Y',
p_fill_pc_basis => NULL,
x_fill_percent => l_cont_fill_pc,
x_return_status => l_return_status
);
wsh_container_actions.Update_child_inv_info(
p_container_id =>
p_delivery_details_info.delivery_detail_id,
P_locator_id => p_delivery_details_info.locator_id
,
P_subinventory => p_delivery_details_info.subinventory,
X_return_status => l_return_status
);
l_interface_flag_tab(1) := WSH_NEW_DELIVERIES_PVT.C_TMS_UPDATE_REQUIRED;
WSH_NEW_DELIVERIES_PVT.UPDATE_TMS_INTERFACE_FLAG(
p_delivery_id_tab => l_delivery_id_tab,
p_tms_interface_flag_tab => l_interface_flag_tab,
x_return_status => l_return_status);
WSH_DEBUG_SV.logmsg(l_module_name,'Error in WSH_NEW_DELIVERIES_PVT.UPDATE_TMS_INTERFACE_FLAG');
ROLLBACK TO s_before_update_dd;
ROLLBACK TO s_before_update_dd;
ROLLBACK TO s_before_update_dd;
wsh_util_core.default_handler('WSH_DELIVERY_DETAILS_PKG.UPDATE_DELIVERY_DETAILS',l_module_name);
END Update_Delivery_Details;
IS SELECT rowid
FROM wsh_delivery_assignments
WHERE delivery_assignment_id = x_delivery_assignment_id;
IS SELECT wsh_delivery_assignments_s.nextval
FROM sys.dual;
SELECT rowid
FROM wsh_delivery_assignments
WHERE delivery_assignment_id = x_delivery_assignment_id;
PROCEDURE Delete_Delivery_Assignments
(p_rowid IN VARCHAR2,
p_delivery_assignment_id IN NUMBER,
x_return_status OUT NOCOPY VARCHAR2)
IS
CURSOR get_del_assignment_id_rowid (v_rowid VARCHAR2) IS
SELECT delivery_assignment_id
FROM wsh_delivery_assignments
WHERE rowid = v_rowid;
l_module_name CONSTANT VARCHAR2(100) := 'wsh.plsql.' || G_PKG_NAME || '.' || 'DELETE_DELIVERY_ASSIGNMENTS';
DELETE FROM wsh_delivery_assignments
WHERE delivery_assignment_id = l_delivery_assignment_id;
wsh_util_core.default_handler('WSH_DELIVERY_DETAILS_PKG_.DELETE_DELIVERY_ASSIGNMENTS',l_module_name);
END Delete_Delivery_Assignments;
PROCEDURE Update_Delivery_Assignments(
p_rowid IN VARCHAR2 := NULL,
p_delivery_assignments_info IN Delivery_Assignments_Rec_Type,
x_return_status OUT NOCOPY VARCHAR2
) IS
CURSOR get_rowid IS
SELECT rowid
FROM wsh_delivery_assignments
WHERE delivery_assignment_id = p_delivery_assignments_info.delivery_assignment_id;
l_module_name CONSTANT VARCHAR2(100) := 'wsh.plsql.' || G_PKG_NAME || '.' || 'UPDATE_DELIVERY_ASSIGNMENTS';
UPDATE wsh_delivery_assignments
SET
delivery_id = p_delivery_assignments_info.delivery_id,
parent_delivery_id = p_delivery_assignments_info.parent_delivery_id,
delivery_detail_id = p_delivery_assignments_info.delivery_detail_id,
parent_delivery_detail_id = p_delivery_assignments_info.parent_delivery_detail_id,
last_update_date = p_delivery_assignments_info.last_update_date,
last_updated_by = p_delivery_assignments_info.last_updated_by,
last_update_login = p_delivery_assignments_info.last_update_login,
program_application_id = p_delivery_assignments_info.program_application_id,
program_id = p_delivery_assignments_info.program_id,
program_update_date = p_delivery_assignments_info.program_update_date,
request_id = p_delivery_assignments_info.request_id,
active_flag = p_delivery_assignments_info.active_flag,
delivery_assignment_id = p_delivery_assignments_info.delivery_assignment_id
WHERE rowid = l_rowid;
wsh_util_core.default_handler('WSH_DELIVERY_DETAILS_PKG.UPDATE_DELIVERY_ASSIGNMENTS',l_module_name);
END Update_Delivery_Assignments;
SELECT *
FROM wsh_delivery_assignments
WHERE rowid = p_rowid
FOR UPDATE OF delivery_assignment_id NOWAIT;
FND_MESSAGE.Set_Name('FND','FORM_RECORD_DELETED');
AND (Recinfo.last_update_date = p_delivery_assignments_info.last_update_date)
AND (Recinfo.last_updated_by = p_delivery_assignments_info.last_updated_by)
AND ( (Recinfo.last_update_login = p_delivery_assignments_info.last_update_login)
OR ( (Recinfo.last_update_login IS NULL)
AND (p_delivery_assignments_info.last_update_login IS NULL)))
AND ( (Recinfo.program_application_id = p_delivery_assignments_info.program_application_id)
OR ( (Recinfo.program_application_id IS NULL)
AND (p_delivery_assignments_info.program_application_id IS NULL))))
THEN
x_return_status := WSH_UTIL_CORE.G_RET_STS_SUCCESS;
does a SELECT using FOR UPDATE NOWAIT
Created: Harmonization Project. Patchset I
----------------------------------------------------------------------- */
PROCEDURE Lock_Detail_No_Compare(
p_delivery_detail_id IN NUMBER, -- default null in spec
p_delivery_id IN NUMBER -- default null in spec
)
IS
CURSOR c_lock_details_of_dlvy(p_dlvy_id NUMBER) IS
SELECT wdd.delivery_detail_id
FROM wsh_delivery_details wdd, wsh_delivery_assignments wda
WHERE wdd.delivery_detail_id = wda.delivery_detail_id
AND wda.delivery_id = p_dlvy_id
FOR UPDATE OF wdd.delivery_detail_id NOWAIT;
SELECT delivery_detail_id
FROM wsh_delivery_details
WHERE delivery_detail_id = p_delivery_detail_id
FOR UPDATE NOWAIT;
SELECT delivery_detail_id
,source_code
,source_header_id
,source_line_id
,customer_id
,sold_to_contact_id
,inventory_item_id
,item_description
,hazard_class_id
,country_of_origin
,classification
,ship_from_location_id
,ship_to_location_id
,ship_to_contact_id
,ship_to_site_use_id
,deliver_to_location_id
,deliver_to_contact_id
,deliver_to_site_use_id
,intmed_ship_to_location_id
,intmed_ship_to_contact_id
,hold_code
,ship_tolerance_above
,ship_tolerance_below
,requested_quantity
,shipped_quantity
,delivered_quantity
,requested_quantity_uom
,subinventory
,revision
,lot_number
,customer_requested_lot_flag
,serial_number
,locator_id
,date_requested
,date_scheduled
,master_container_item_id
,detail_container_item_id
,load_seq_number
,ship_method_code
,carrier_id
,freight_terms_code
,shipment_priority_code
,fob_code
,customer_item_id
,dep_plan_required_flag
,customer_prod_seq
,customer_dock_code
,cust_model_serial_number
,customer_job
,customer_production_line
,net_weight
,weight_uom_code
,volume
,volume_uom_code
,tp_attribute_category
,tp_attribute1
,tp_attribute2
,tp_attribute3
,tp_attribute4
,tp_attribute5
,tp_attribute6
,tp_attribute7
,tp_attribute8
,tp_attribute9
,tp_attribute10
,tp_attribute11
,tp_attribute12
,tp_attribute13
,tp_attribute14
,tp_attribute15
,attribute_category
,attribute1
,attribute2
,attribute3
,attribute4
,attribute5
,attribute6
,attribute7
,attribute8
,attribute9
,attribute10
,attribute11
,attribute12
,attribute13
,attribute14
,attribute15
,created_by
,creation_date
,sysdate
,FND_GLOBAL.LOGIN_ID
,FND_GLOBAL.USER_ID
,program_application_id
,program_id
,program_update_date
,request_id
,mvt_stat_status
,NULL -- released_flag
,organization_id
,transaction_temp_id
,ship_set_id
,arrival_set_id
,ship_model_complete_flag
,top_model_line_id
,source_header_number
,source_header_type_id
,source_header_type_name
,cust_po_number
,ato_line_id
,src_requested_quantity
,src_requested_quantity_uom
,move_order_line_id
,cancelled_quantity
,quality_control_quantity
,cycle_count_quantity
,tracking_number
,movement_id
,shipping_instructions
,packing_instructions
,project_id
,task_id
,org_id
,oe_interfaced_flag
,split_from_delivery_detail_id
,inv_interfaced_flag
,source_line_number
,inspection_flag
,released_status
,container_flag
,container_type_code
,container_name
,fill_percent
,gross_weight
,master_serial_number
,maximum_load_weight
,maximum_volume
,minimum_fill_percent
,seal_code
,unit_number
,unit_price
,currency_code
,freight_class_cat_id
,commodity_code_cat_id
,preferred_grade
,src_requested_quantity2
,src_requested_quantity_uom2
,requested_quantity2
,shipped_quantity2
,delivered_quantity2
,cancelled_quantity2
,quality_control_quantity2
,cycle_count_quantity2
,requested_quantity_uom2
-- HW OPMCONV - No need for sublot_number
-- ,sublot_number
,lpn_id
,pickable_flag
,original_subinventory
,to_serial_number
,picked_quantity
,picked_quantity2
,received_quantity
,received_quantity2
,source_line_set_id
,batch_id
,NULL -- ROWID
,transaction_id
,vendor_id
,ship_from_site_id
,nvl(line_direction, 'O')
,party_id
,routing_req_id
,shipping_control
,source_blanket_reference_id
,source_blanket_reference_num
,po_shipment_line_id
,po_shipment_line_number
,returned_quantity
,returned_quantity2
,rcv_shipment_line_id
,source_line_type_code
,supplier_item_number
,nvl(ignore_for_planning, 'N')
,earliest_pickup_date
,latest_pickup_date
,earliest_dropoff_date
,latest_dropoff_date
,request_date_type_code
,tp_delivery_detail_id
,source_document_type_id
,unit_weight
,unit_volume
,filled_volume
,wv_frozen_flag
,mode_of_transport
,service_level
,po_revision_number
,release_revision_number
,replenishment_status --bug# 6689448 (replenishment project)
FROM wsh_delivery_details
WHERE delivery_detail_id = p_delivery_detail_id;
does a SELECT using FOR UPDATE NOWAIT
Created: K: MDC
----------------------------------------------------------------------- */
PROCEDURE Lock_WDA_No_Compare(
p_delivery_detail_id IN NUMBER, -- default null in spec
p_delivery_id IN NUMBER -- default null in spec
)
IS
CURSOR c_lock_wda_of_dlvy(p_dlvy_id NUMBER) IS
SELECT delivery_detail_id
FROM wsh_delivery_assignments
WHERE delivery_id = p_dlvy_id
FOR UPDATE NOWAIT;
SELECT delivery_detail_id
FROM wsh_delivery_assignments
WHERE delivery_detail_id = p_delivery_detail_id
FOR UPDATE NOWAIT;