The following lines contain the word 'select', 'insert', 'update' or 'delete':
select fob_code,
freight_terms_code
from wsh_delivery_details
where source_line_id = p_source_line_id
and source_header_id = p_source_header_id
and po_shipment_line_id = p_po_shipment_line_id
and source_code = 'PO'
and rownum =1;
x_line_rec.shipping_details_updated_on.extend;
x_line_rec.shipping_details_updated_on.extend;
x_line_rec.shipping_details_updated_on(l_tab_count) := p_po_line_rec.shipping_details_updated_on;
x_line_rec.shipping_details_updated_on(l_tab_count) := x_line_rec.shipping_details_updated_on(p_prev_line_rec_index);
select SHIPMENT_NUM,
RECEIPT_NUM,
BILL_OF_LADING,
CARRIER_ID,
EXPECTED_RECEIPT_DATE,
SHIPPED_DATE,
PACKING_SLIP,
FREIGHT_TERMS_CODE,
WAYBILL_AIRBILL_NUMBER,
NUM_OF_CONTAINERS,
GROSS_WEIGHT,
GROSS_WEIGHT_UOM_CODE,
NET_WEIGHT,
NET_WEIGHT_UOM_CODE,
TARE_WEIGHT,
TARE_WEIGHT_UOM_CODE,
asn_type
from rcv_fte_headers_v
where shipment_header_id = p_shipment_header_id;
select shipment_line_id,
item_id,
item_revision,
item_description,
quantity_shipped,
quantity_received,
packing_slip,
secondary_quantity_shipped,
secondary_quantity_received,
container_num,
truck_num,
asn_lpn_id,
shipment_header_id
from rcv_fte_lines_v
where shipment_line_id = p_shipment_line_id;
SELECT
oh.sold_to_org_id,
oh.sold_to_contact_id,
oh.ship_to_contact_id,
oh.ship_to_org_id,
oh.deliver_to_contact_id,
oh.deliver_to_org_id,
ol.intmed_ship_to_contact_id,
ol.shipping_method_code,
ol.cust_production_seq_num,
ol.customer_dock_code,
ol.cust_model_serial_number,
ol.customer_job,
ol.customer_production_line,
ol.ship_model_complete_flag,
ol.top_model_line_id,
oh.cust_po_number,
ol.ato_line_id,
oh.shipping_instructions,
ol.packing_instructions,
decode(item_identifier_type,
'CUST',
ol.ordered_item_id,
NULL
) customer_item_id,
ol.intmed_ship_to_org_id
FROM
oe_order_headers_all oh,
oe_order_lines_all ol,
oe_drop_ship_sources od
WHERE
od.header_id = oh.header_id AND
od.line_id = ol.line_id AND
oh.header_id = ol.header_id AND
od.line_location_id = p_line_rec.po_shipment_line_id(index_num);
SELECT organization_id,
nvl(shipment_direction,'O') shipment_direction,
name,
initial_pickup_location_id,
status_code
FROM wsh_new_deliveries wnd
WHERE delivery_id = p_delivery_id;
SELECT lpn_id,
tracking_number,
container_name
FROM wsh_delivery_details
WHERE delivery_detail_id = p_delivery_detail_id;
SELECT wdd.delivery_detail_id,
wda.parent_delivery_detail_id
FROM wsh_delivery_details wdd,
wsh_delivery_assignments wda,
wsh_wms_sync_tmp wwst
WHERE wwst.delivery_id = p_delivery_id
AND nvl(wda.type,'S') IN ('S','O')
AND wdd.delivery_detail_id = wda.delivery_detail_id
AND wwst.operation_type='VENDOR_MRG'
AND wwst.temp_col IS NULL
AND wdd.delivery_detail_id = wwst.delivery_detail_id
AND wda.parent_delivery_detail_id IS NOT NULL
ORDER BY wda.parent_delivery_detail_id;
UPDATE wsh_delivery_assignments_v
SET delivery_id = l_delivery_id,
last_update_date = SYSDATE,
last_updated_by = FND_GLOBAL.USER_ID,
last_update_login = FND_GLOBAL.LOGIN_ID
WHERE delivery_detail_id = p_delivery_detail_id_tbl(i);
SELECT wdd.delivery_detail_id
INTO l_new_parent_wdd_id
FROM wsh_delivery_Details wdd,
wsh_delivery_assignments wda
WHERE wda.delivery_id = l_delivery_id
AND wda.delivery_detail_id = wdd.delivery_detail_id
AND NVL(wda.type,'S') IN ('S','O')
AND wdd.lpn_id = l_lpn_id;
UPDATE wsh_delivery_assignments
SET parent_delivery_detail_id = l_new_parent_wdd_id
WHERE delivery_detail_id = l_tmp_wdd_id_tbl(i);
l_temp_tbl.delete ;
SELECT count(1) INTO l_query_count
FROM wsh_delivery_assignments
WHERE delivery_id = p_delivery_id
AND parent_delivery_detail_id = l_parent_wdd_id
AND nvl(type,'S') IN ('S','O');
DELETE FROM wsh_delivery_assignments
WHERE delivery_detail_id = l_parent_wdd_id;
DELETE FROM wsh_delivery_details
WHERE delivery_detail_id = l_parent_wdd_id;
WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_INTEGRATION.DBI_UPDATE_DETAIL_LOG',WSH_DEBUG_SV.C_PROC_LEVEL);
l_temp_tbl.delete;
WSH_INTEGRATION.DBI_Update_Detail_Log(
p_delivery_detail_id_tab => l_temp_tbl,
p_dml_type => 'DELETE',
x_return_status => l_return_status
);
l_tmp_wdd_id_tbl.delete;
WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_NEW_DELIVERY_ACTIONS.update_freight_terms',WSH_DEBUG_SV.C_PROC_LEVEL);
WSH_NEW_DELIVERY_ACTIONS.update_freight_terms
(
p_delivery_id => p_delivery_id,
p_action_code => 'UNASSIGN',
x_return_status => l_return_status,
x_freight_terms_code => l_dlvy_freight_terms_code
);
WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_NEW_DELIVERY_ACTIONS.update_freight_terms',WSH_DEBUG_SV.C_PROC_LEVEL);
WSH_NEW_DELIVERY_ACTIONS.update_freight_terms
(
p_delivery_id => l_delivery_id,
p_action_code => 'ASSIGN',
x_return_status => l_return_status,
x_freight_terms_code => l_dlvy_freight_terms_code
);
SELECT wt.trip_id, wt.name, wt.lane_id,
NVL(wdl.reprice_Required,'N') reprice_required
FROM wsh_trips wt,
wsh_trip_stops wts,
wsh_delivery_legs wdl
WHERE wdl.delivery_id = p_delivery_id
AND wdl.pick_up_stop_id = wts.stop_id
AND wt.trip_id = wts.trip_id
AND wt.lane_id IS NOT NULL;
SELECT 1
FROM wsh_trip_stops wts1,
wsh_trip_stops wts2
WHERE wts2.stop_id = p_stop_id
AND wts2.trip_id = wts1.trip_id
AND wts1.physical_stop_id = p_stop_id
AND wts1.status_code IN ('OP','AR')
AND NVL(wts1.shipments_type_flag,'O') IN ('M','O');
SELECT wnd.name delivery_name,
wnd.status_code delivery_statusCode,
wnd.ultimate_dropoff_location_id,
wnd.asn_shipment_header_id,
wnd.rcv_shipment_header_id,
pu_stop.stop_id pu_stop_id,
pu_Stop.status_code pu_stop_statusCode,
NVL(pu_stop.shipments_type_flag,'O') pu_stop_shipTypeFlag,
do_stop.stop_id do_stop_id,
do_stop.stop_location_id do_stop_locationId,
do_Stop.status_code do_stop_statusCode,
NVL(do_stop.shipments_type_flag,'O') do_stop_shipTypeFlag,
pu_stop.trip_id trip_id
FROM wsh_trip_stops pu_stop,
wsh_trip_stops do_stop,
wsh_delivery_legs wdl,
wsh_new_deliveries wnd
WHERE wnd.delivery_id = p_delivery_id
AND wdl.delivery_id = wnd.delivery_id
AND NVL(wnd.shipment_direction,'O') NOT IN ('O','IO')
AND wdl.pick_up_stop_id = pu_stop.stop_id
AND wnd.initial_pickup_location_id = pu_stop.stop_location_id
AND wdl.drop_off_stop_id = do_stop.stop_id;
SELECT next_leg_do_stop.status_code do_stop_statusCode,
NVL(next_leg_do_stop.shipments_type_flag,'O') do_stop_shipTypeFlag,
next_leg_do_stop.stop_location_id do_stop_locationId,
next_leg_do_stop.stop_id do_stop_id,
next_leg_pu_stop.status_code pu_stop_statusCode,
NVL(next_leg_pu_stop.shipments_type_flag,'O') pu_stop_shipTypeFlag,
next_leg_pu_stop.stop_location_id pu_stop_locationId,
next_leg_pu_stop.stop_id pu_stop_id,
NVL(wnd.shipment_direction,'O') shipment_direction,
wnd.status_code dlvy_status_code,
wnd.ultimatE_dropoff_location_id dlvy_ultimate_doLocationId,
next_leg_pu_stop.trip_id trip_id --3410681
FROM wsh_trip_stops next_leg_do_stop,
wsh_trip_stops next_leg_pu_stop,
wsh_trip_stops curr_leg_do_stop,
wsh_delivery_legs next_leg,
wsh_delivery_legs curr_leg,
wsh_new_deliveries wnd
WHERE next_leg.drop_off_stop_id = next_leg_do_stop.stop_id
--AND st1.status_code = 'OP'
AND next_leg.pick_up_stop_id = next_leg_pu_stop.stop_id
AND next_leg_pu_stop.stop_location_id = curr_leg_do_stop.stop_location_id
AND next_leg.delivery_id = curr_leg.delivery_id
AND curr_leg_do_stop.stop_id = p_stop_id
AND curr_leg.drop_off_stop_id = p_stop_id
AND wnd.delivery_id = curr_leg.delivery_id
AND wnd.delivery_id = p_delivery_id;
SELECT NVL(wnd.planned_flag,'N') planned_flag,
NVL(ignore_for_planning,'N') ignore_for_planning
FROM wsh_new_deliveries wnd
WHERE wnd.delivery_id = p_delivery_id;
SELECT count(stop_id)
FROM wsh_trip_stops
WHERE trip_id = p_trip_id
AND status_code <> 'CL';
SELECT primary_uom_code
FROM mtl_system_items
WHERE inventory_item_id = v_inventory_item_id
AND organization_id = v_organization_id;
select
--lpn_id
parent_lpn_id,
parent_license_plate_number
from
wms_lpn_histories
where
--parent_lpn_id is null and
source_header_id = p_shipment_header_id
and source_type_id = 1
and lpn_context = p_lpn_context
start with parent_lpn_id = p_lpn_id
connect by prior parent_lpn_id = lpn_id;
SELECT wnd.routing_response_id
FROM wsh_new_deliveries wnd,
wsh_delivery_assignments_v wda
WHERE wnd.delivery_id = wda.delivery_id
AND wda.delivery_detail_id = p_delivery_detail_id
AND wnd.routing_response_id IS NOT NULL;