DBA Data[Home] [Help]

APPS.WSH_TMS_RELEASE SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 172

    SELECT wti.trip_interface_id,
           wti.group_id, --Bug7717569
           wt.trip_id,
           wti.tp_plan_name,
           wt.tp_trip_number,
           wti.planned_flag,
           wt.planned_flag                   wsh_planned_flag,
           wt.status_code                    wsh_status_code,
           wt.name,
           wti.vehicle_item_id,
           wti.vehicle_organization_id,
           wti.vehicle_num_prefix,
           wti.vehicle_number,
           wti.carrier_id                    carrier_id,
           wt.ship_method_code,
           wt.route_id,
           wt.routing_instructions,
           wti.service_level,
           wti.mode_of_transport,
           wti.freight_terms_code,
           wt.seal_code,
           wt.shipments_type_flag,
           'N'                               wsh_ignore_for_planning,
           wt.booking_number,
           wt.vessel,
           wt.voyage_number,
           wt.port_of_loading,
           wt.port_of_discharge,
           wt.carrier_contact_id,
           wt.shipper_wait_time,
           wt.wait_time_uom,
           wt.carrier_response,
           wt.operator,
           wti.vehicle_item_name,
           wti.interface_action_code,
           wt.attribute_category,
           wt.attribute1,
           wt.attribute2,
           wt.attribute3,
           wt.attribute4,
           wt.attribute5,
           wt.attribute6,
           wt.attribute7,
           wt.attribute8,
           wt.attribute9,
           wt.attribute10,
           wt.attribute11,
           wt.attribute12,
           wt.attribute13,
           wt.attribute14,
           wt.attribute15
      FROM wsh_trips_interface          wti,
           wsh_trips                    wt
     WHERE wti.group_id = p_group_id --p_group_id is the input parameter
       AND wti.interface_action_code  IN (G_TMS_RELEASE_CODE,G_TMS_DELETE_CODE)
       AND wt.tp_plan_name(+)         = wti.tp_plan_name
  ORDER BY wti.trip_interface_id;
Line: 232

    SELECT wti.trip_interface_id,
           wti.group_id, --Bug7717569
           wt.trip_id,
           wti.tp_plan_name,
           wt.tp_trip_number,
           wti.planned_flag,
           wt.planned_flag                   wsh_planned_flag,
           wt.status_code                    wsh_status_code,
           wt.name,
           wti.vehicle_item_id,
           wti.vehicle_organization_id,
           wti.vehicle_num_prefix,
           wti.vehicle_number,
           wti.carrier_id                    carrier_id,
           wt.ship_method_code,
           wt.route_id,
           wt.routing_instructions,
           wti.service_level,
           wti.mode_of_transport,
           wti.freight_terms_code,
           wt.seal_code,
           wt.shipments_type_flag,
           'N'                               wsh_ignore_for_planning,
           wt.booking_number,
           wt.vessel,
           wt.voyage_number,
           wt.port_of_loading,
           wt.port_of_discharge,
           wt.carrier_contact_id,
           wt.shipper_wait_time,
           wt.wait_time_uom,
           wt.carrier_response,
           wt.operator,
           wti.vehicle_item_name,
           wti.interface_action_code,
           wt.attribute_category,
           wt.attribute1,
           wt.attribute2,
           wt.attribute3,
           wt.attribute4,
           wt.attribute5,
           wt.attribute6,
           wt.attribute7,
           wt.attribute8,
           wt.attribute9,
           wt.attribute10,
           wt.attribute11,
           wt.attribute12,
           wt.attribute13,
           wt.attribute14,
           wt.attribute15
      FROM wsh_trips_interface          wti,
           wsh_trips                    wt
     WHERE wti.tp_plan_name >= nvl(p_tp_plan_low,wti.tp_plan_name)
       AND  wti.tp_plan_name <= nvl(p_tp_plan_high,wti.tp_plan_name)
       AND wti.interface_action_code  IN (G_TMS_RELEASE_CODE,G_TMS_DELETE_CODE)
       AND wt.tp_plan_name(+)         = wti.tp_plan_name
  ORDER BY wti.trip_interface_id;
Line: 293

    SELECT wti.trip_interface_id,
           wti.group_id, --Bug7717569
           wt.trip_id,
           wti.tp_plan_name,
           wt.tp_trip_number,
           wti.planned_flag,
           wt.planned_flag                   wsh_planned_flag,
           wt.status_code                    wsh_status_code,
           wt.name,
           wti.vehicle_item_id,
           wti.vehicle_organization_id,
           wti.vehicle_num_prefix,
           wti.vehicle_number,
           wti.carrier_id                    carrier_id,
           wt.ship_method_code,
           wt.route_id,
           wt.routing_instructions,
           wti.service_level,
           wti.mode_of_transport,
           wti.freight_terms_code,
           wt.seal_code,
           wt.shipments_type_flag,
           'N'                               wsh_ignore_for_planning,
           wt.booking_number,
           wt.vessel,
           wt.voyage_number,
           wt.port_of_loading,
           wt.port_of_discharge,
           wt.carrier_contact_id,
           wt.shipper_wait_time,
           wt.wait_time_uom,
           wt.carrier_response,
           wt.operator,
           wti.vehicle_item_name,
           wti.interface_action_code,
           wt.attribute_category,
           wt.attribute1,
           wt.attribute2,
           wt.attribute3,
           wt.attribute4,
           wt.attribute5,
           wt.attribute6,
           wt.attribute7,
           wt.attribute8,
           wt.attribute9,
           wt.attribute10,
           wt.attribute11,
           wt.attribute12,
           wt.attribute13,
           wt.attribute14,
           wt.attribute15
      FROM wsh_trips_interface          wti,
           wsh_trips                    wt
     WHERE wti.interface_action_code  IN (G_TMS_RELEASE_CODE,G_TMS_DELETE_CODE)
       AND wt.tp_plan_name(+)         = wti.tp_plan_name
       AND wti.group_id in
       (SELECT wti.group_id FROM  wsh_new_del_interface wndi,
         wsh_del_legs_interface wdli,
         wsh_trip_stops_interface wtsi,
         wsh_trips_interface wti,
         wsh_new_deliveries wnd
     where wndi.interface_action_code IN (G_TMS_RELEASE_CODE,G_TMS_DELETE_CODE)
     AND wdli.delivery_interface_id = wndi.delivery_interface_id
     AND wdli.pick_up_stop_interface_id = wtsi.stop_interface_id
     AND wtsi.trip_interface_id = wti.trip_interface_id
     AND wnd.delivery_id = wndi.delivery_id
     AND wndi.name >= nvl(p_del_name_low,wndi.name)
     AND wndi.name <= nvl(p_del_name_high,wndi.name)
     AND wnd.organization_id = NVL(l_organization_id,wnd.organization_id)
     AND wnd.initial_pickup_date >= nvl(l_del_pickup_date_low,wnd.initial_pickup_date)
     AND wnd.initial_pickup_date <= nvl(l_del_pickup_date_high,wnd.initial_pickup_date))
  ORDER BY wti.trip_interface_id;
Line: 368

    SELECT wti.trip_interface_id,
           wti.group_id, --Bug7717569
           wt.trip_id,
           wti.tp_plan_name,
           wt.tp_trip_number,
           wti.planned_flag,
           wt.planned_flag                   wsh_planned_flag,
           wt.status_code                    wsh_status_code,
           wt.name,
           wti.vehicle_item_id,
           wti.vehicle_organization_id,
           wti.vehicle_num_prefix,
           wti.vehicle_number,
           wti.carrier_id                    carrier_id,
           wt.ship_method_code,
           wt.route_id,
           wt.routing_instructions,
           wti.service_level,
           wti.mode_of_transport,
           wti.freight_terms_code,
           wt.seal_code,
           wt.shipments_type_flag,
           'N'                               wsh_ignore_for_planning,
           wt.booking_number,
           wt.vessel,
           wt.voyage_number,
           wt.port_of_loading,
           wt.port_of_discharge,
           wt.carrier_contact_id,
           wt.shipper_wait_time,
           wt.wait_time_uom,
           wt.carrier_response,
           wt.operator,
           wti.vehicle_item_name,
           wti.interface_action_code,
           wt.attribute_category,
           wt.attribute1,
           wt.attribute2,
           wt.attribute3,
           wt.attribute4,
           wt.attribute5,
           wt.attribute6,
           wt.attribute7,
           wt.attribute8,
           wt.attribute9,
           wt.attribute10,
           wt.attribute11,
           wt.attribute12,
           wt.attribute13,
           wt.attribute14,
           wt.attribute15
      FROM wsh_trips_interface          wti,
           wsh_trips                    wt
     WHERE wti.interface_action_code  IN (G_TMS_RELEASE_CODE,G_TMS_DELETE_CODE)
       AND wt.tp_plan_name(+)         = wti.tp_plan_name
  ORDER BY wti.trip_interface_id;
Line: 428

    SELECT wtsi.stop_interface_id,
           wtsi.stop_id, -- will be populated after create or update, not from GC3
           wtsi.tp_stop_id,
           wtsi.stop_location_id,
           wtsi.stop_sequence_number,
           wtsi.planned_arrival_date,
           wtsi.planned_departure_date,
           wtsi.departure_gross_weight,
           wtsi.departure_net_weight,
           wtsi.weight_uom_code,
           wtsi.departure_volume,
           wtsi.volume_uom_code,
           wtsi.departure_seal_code,
           wtsi.departure_fill_percent,
           wtsi.wkend_layover_stops,
           wtsi.wkday_layover_stops,
           wtsi.shipments_type_flag,
           wtsi.trip_interface_id,
           wtsi.timezone_code,
           'C' dml_action,           -- indicates if stop has to be created or updated
           null tp_attribute_category,
           null tp_attribute1,
           null tp_attribute2,
           null tp_attribute3,
           null tp_attribute4,
           null tp_attribute5,
           null tp_attribute6,
           null tp_attribute7,
           null tp_attribute8,
           null tp_attribute9,
           null tp_attribute10,
           null tp_attribute11,
           null tp_attribute12,
           null tp_attribute13,
           null tp_attribute14,
           null tp_attribute15,
           null attribute_category,
           null attribute1,
           null attribute2,
           null attribute3,
           null attribute4,
           null attribute5,
           null attribute6,
           null attribute7,
           null attribute8,
           null attribute9,
           null attribute10,
           null attribute11,
           null attribute12,
           null attribute13,
           null attribute14,
           null attribute15
      FROM wsh_trip_stops_interface     wtsi,
           wsh_trips_interface          wti
     WHERE wti.group_id = p_group_id --p_group_id is the input parameter
       AND wtsi.trip_interface_id      = wti.trip_interface_id
       AND wtsi.interface_action_code  = G_TMS_RELEASE_CODE
       AND wti.interface_action_code   = G_TMS_RELEASE_CODE
  ORDER BY wtsi.trip_interface_id,wtsi.stop_sequence_number ;
Line: 490

    SELECT wtsi.stop_interface_id,
           wtsi.stop_id, -- will be populated after create or update, not from GC3
           wtsi.tp_stop_id,
           wtsi.stop_location_id,
           wtsi.stop_sequence_number,
           wtsi.planned_arrival_date,
           wtsi.planned_departure_date,
           wtsi.departure_gross_weight,
           wtsi.departure_net_weight,
           wtsi.weight_uom_code,
           wtsi.departure_volume,
           wtsi.volume_uom_code,
           wtsi.departure_seal_code,
           wtsi.departure_fill_percent,
           wtsi.wkend_layover_stops,
           wtsi.wkday_layover_stops,
           wtsi.shipments_type_flag,
           wtsi.trip_interface_id,
           wtsi.timezone_code,
           'C' dml_action,           -- indicates if stop has to be created or updated
           null tp_attribute_category,
           null tp_attribute1,
           null tp_attribute2,
           null tp_attribute3,
           null tp_attribute4,
           null tp_attribute5,
           null tp_attribute6,
           null tp_attribute7,
           null tp_attribute8,
           null tp_attribute9,
           null tp_attribute10,
           null tp_attribute11,
           null tp_attribute12,
           null tp_attribute13,
           null tp_attribute14,
           null tp_attribute15,
           null attribute_category,
           null attribute1,
           null attribute2,
           null attribute3,
           null attribute4,
           null attribute5,
           null attribute6,
           null attribute7,
           null attribute8,
           null attribute9,
           null attribute10,
           null attribute11,
           null attribute12,
           null attribute13,
           null attribute14,
           null attribute15
      FROM wsh_trip_stops_interface     wtsi,
           wsh_trips_interface          wti
     WHERE wti.tp_plan_name >= nvl(p_tp_plan_low,wti.tp_plan_name)
       AND  wti.tp_plan_name <= nvl(p_tp_plan_high,wti.tp_plan_name)
       AND wtsi.trip_interface_id      = wti.trip_interface_id
       AND wtsi.interface_action_code  = G_TMS_RELEASE_CODE
       AND wti.interface_action_code   = G_TMS_RELEASE_CODE
  ORDER BY wtsi.trip_interface_id,wtsi.stop_sequence_number ;
Line: 553

    SELECT wtsi.stop_interface_id,
           wtsi.stop_id, -- will be populated after create or update, not from GC3
           wtsi.tp_stop_id,
           wtsi.stop_location_id,
           wtsi.stop_sequence_number,
           wtsi.planned_arrival_date,
           wtsi.planned_departure_date,
           wtsi.departure_gross_weight,
           wtsi.departure_net_weight,
           wtsi.weight_uom_code,
           wtsi.departure_volume,
           wtsi.volume_uom_code,
           wtsi.departure_seal_code,
           wtsi.departure_fill_percent,
           wtsi.wkend_layover_stops,
           wtsi.wkday_layover_stops,
           wtsi.shipments_type_flag,
           wtsi.trip_interface_id,
           wtsi.timezone_code,
           'C' dml_action,           -- indicates if stop has to be created or updated
           null tp_attribute_category,
           null tp_attribute1,
           null tp_attribute2,
           null tp_attribute3,
           null tp_attribute4,
           null tp_attribute5,
           null tp_attribute6,
           null tp_attribute7,
           null tp_attribute8,
           null tp_attribute9,
           null tp_attribute10,
           null tp_attribute11,
           null tp_attribute12,
           null tp_attribute13,
           null tp_attribute14,
           null tp_attribute15,
           null attribute_category,
           null attribute1,
           null attribute2,
           null attribute3,
           null attribute4,
           null attribute5,
           null attribute6,
           null attribute7,
           null attribute8,
           null attribute9,
           null attribute10,
           null attribute11,
           null attribute12,
           null attribute13,
           null attribute14,
           null attribute15
      FROM wsh_trip_stops_interface     wtsi,
           wsh_trips_interface          wti
     WHERE wtsi.trip_interface_id      = wti.trip_interface_id
       AND wtsi.interface_action_code  = G_TMS_RELEASE_CODE
       AND wti.interface_action_code   = G_TMS_RELEASE_CODE
       AND wti.group_id in
       (SELECT wti.group_id FROM  wsh_new_del_interface wndi,
         wsh_del_legs_interface wdli,
         wsh_trip_stops_interface wtsi,
         wsh_trips_interface wti,
         wsh_new_deliveries wnd
     where wndi.interface_action_code IN (G_TMS_RELEASE_CODE,G_TMS_DELETE_CODE)
     AND wdli.delivery_interface_id = wndi.delivery_interface_id
     AND wdli.pick_up_stop_interface_id = wtsi.stop_interface_id
     AND wtsi.trip_interface_id = wti.trip_interface_id
     AND wnd.delivery_id = wndi.delivery_id
     AND wndi.name >= nvl(p_del_name_low,wndi.name)
     AND wndi.name <= nvl(p_del_name_high,wndi.name)
     AND wnd.organization_id = NVL(p_organization_id,wnd.organization_id)
     AND wnd.initial_pickup_date >= nvl(l_del_pickup_date_low,wnd.initial_pickup_date)
     AND wnd.initial_pickup_date <= nvl(l_del_pickup_date_high,wnd.initial_pickup_date))
  ORDER BY wtsi.trip_interface_id,wtsi.stop_sequence_number ;
Line: 630

    SELECT wtsi.stop_interface_id,
           wtsi.stop_id, -- will be populated after create or update, not from GC3
           wtsi.tp_stop_id,
           wtsi.stop_location_id,
           wtsi.stop_sequence_number,
           wtsi.planned_arrival_date,
           wtsi.planned_departure_date,
           wtsi.departure_gross_weight,
           wtsi.departure_net_weight,
           wtsi.weight_uom_code,
           wtsi.departure_volume,
           wtsi.volume_uom_code,
           wtsi.departure_seal_code,
           wtsi.departure_fill_percent,
           wtsi.wkend_layover_stops,
           wtsi.wkday_layover_stops,
           wtsi.shipments_type_flag,
           wtsi.trip_interface_id,
           wtsi.timezone_code,
           'C' dml_action,           -- indicates if stop has to be created or updated
           null tp_attribute_category,
           null tp_attribute1,
           null tp_attribute2,
           null tp_attribute3,
           null tp_attribute4,
           null tp_attribute5,
           null tp_attribute6,
           null tp_attribute7,
           null tp_attribute8,
           null tp_attribute9,
           null tp_attribute10,
           null tp_attribute11,
           null tp_attribute12,
           null tp_attribute13,
           null tp_attribute14,
           null tp_attribute15,
           null attribute_category,
           null attribute1,
           null attribute2,
           null attribute3,
           null attribute4,
           null attribute5,
           null attribute6,
           null attribute7,
           null attribute8,
           null attribute9,
           null attribute10,
           null attribute11,
           null attribute12,
           null attribute13,
           null attribute14,
           null attribute15
      FROM wsh_trip_stops_interface     wtsi,
           wsh_trips_interface          wti
     WHERE wtsi.trip_interface_id      = wti.trip_interface_id
       AND wtsi.interface_action_code  = G_TMS_RELEASE_CODE
       AND wti.interface_action_code   = G_TMS_RELEASE_CODE
  ORDER BY wtsi.trip_interface_id,wtsi.stop_sequence_number ;
Line: 692

    SELECT wdli.delivery_leg_interface_id,
           wdli.delivery_interface_id,
           wtsi_pu.stop_location_id     pickup_stop_location_id, -- pickup stop location
           wtsi_pu.stop_sequence_number pickup_stop_sequence,    -- pickup stop sequence
           wtsi_do.stop_location_id     dropoff_stop_location_id,-- dropoff stop location
           wtsi_do.stop_sequence_number dropoff_stop_sequence,   -- dropoff stop sequence
           wtsi_pu.trip_interface_id,                        -- trip_interface_id
           wdli.delivery_leg_id,
           wdli.delivery_id,
           wdli.pick_up_stop_interface_id,
           wdli.drop_off_stop_interface_id,
           wnd.weight_uom_code  weight_uom,
           wnd.volume_uom_code  volume_uom,
           wnd.organization_id,           -- Organization id, used for deriving default UOM
           wnd.tms_version_number,        -- used before locking the delivery and rollback updates
           wndi.tms_version_number otm_tms_version_number,  -- OTM sent Version number
           wnd.initial_pickup_location_id,-- used while logging exceptions
           wnd.ultimate_dropoff_location_id,-- used for internal Locations
           'N'  processed_flag,            -- used to indicate which deliveries have to be assigned
           wnd.tms_interface_flag          -- used to check whether tms version check can be avoided.
      FROM wsh_del_legs_interface       wdli,
           wsh_new_del_interface        wndi,
           wsh_trip_stops_interface     wtsi_pu,
           wsh_trip_stops_interface     wtsi_do,
           wsh_trips_interface          wti,
           wsh_new_deliveries           wnd
     WHERE wti.group_id = p_group_id --p_group_id is the input parameter
       AND wti.interface_action_code       = G_TMS_RELEASE_CODE
       AND wtsi_pu.trip_interface_id       = wti.trip_interface_id
       AND wtsi_pu.stop_interface_id       = wdli.pick_up_stop_interface_id
       AND wtsi_pu.interface_action_code   = G_TMS_RELEASE_CODE
       AND wtsi_do.trip_interface_id       = wti.trip_interface_id
       AND wtsi_do.stop_interface_id       = wdli.drop_off_stop_interface_id
       AND wtsi_do.interface_action_code   = G_TMS_RELEASE_CODE
       -- OTM R12 no need to have outer join
       AND wnd.delivery_id                 = wdli.delivery_id
       AND wndi.delivery_id                = wdli.delivery_id
       AND wdli.interface_action_code      = G_TMS_RELEASE_CODE
       --AND wnd.delivery_id(+)              = wdli.delivery_id
       --AND wnd.delivery_id                 = wndi.delivery_id
       -- OTM R12
       -- Fix Bug 5134725
       --AND nvl(wnd.tms_version_number,-99) = nvl(wndi.tms_version_number,-99) -- version number check
  ORDER BY wtsi_pu.trip_interface_id,wdli.sequence_number;
Line: 739

    SELECT wdli.delivery_leg_interface_id,
           wdli.delivery_interface_id,
           wtsi_pu.stop_location_id     pickup_stop_location_id, -- pickup stop location
           wtsi_pu.stop_sequence_number pickup_stop_sequence,    -- pickup stop sequence
           wtsi_do.stop_location_id     dropoff_stop_location_id,-- dropoff stop location
           wtsi_do.stop_sequence_number dropoff_stop_sequence,   -- dropoff stop sequence
           wtsi_pu.trip_interface_id,                        -- trip_interface_id
           wdli.delivery_leg_id,
           wdli.delivery_id,
           wdli.pick_up_stop_interface_id,
           wdli.drop_off_stop_interface_id,
           wnd.weight_uom_code  weight_uom,
           wnd.volume_uom_code  volume_uom,
           wnd.organization_id,           -- Organization id, used for deriving default UOM
           wnd.tms_version_number,        -- used before locking the delivery and rollback updates
           wndi.tms_version_number otm_tms_version_number,  -- OTM sent Version number
           wnd.initial_pickup_location_id,-- used while logging exceptions
           wnd.ultimate_dropoff_location_id,-- used for internal Locations
           'N'  processed_flag,            -- used to indicate which deliveries have to be assigned
           wnd.tms_interface_flag          -- used to check whether tms version check can be avoided.
      FROM wsh_del_legs_interface       wdli,
           wsh_new_del_interface        wndi,
           wsh_trip_stops_interface     wtsi_pu,
           wsh_trip_stops_interface     wtsi_do,
           wsh_trips_interface          wti,
           wsh_new_deliveries           wnd
     WHERE wti.tp_plan_name >= nvl(p_tp_plan_low,wti.tp_plan_name)
       AND  wti.tp_plan_name <= nvl(p_tp_plan_high,wti.tp_plan_name)
       AND wti.interface_action_code       = G_TMS_RELEASE_CODE
       AND wtsi_pu.trip_interface_id       = wti.trip_interface_id
       AND wtsi_pu.stop_interface_id       = wdli.pick_up_stop_interface_id
       AND wtsi_pu.interface_action_code   = G_TMS_RELEASE_CODE
       AND wtsi_do.trip_interface_id       = wti.trip_interface_id
       AND wtsi_do.stop_interface_id       = wdli.drop_off_stop_interface_id
       AND wtsi_do.interface_action_code   = G_TMS_RELEASE_CODE
       -- OTM R12 no need to have outer join
       AND wnd.delivery_id                 = wdli.delivery_id
       AND wndi.delivery_id                = wdli.delivery_id
       AND wdli.interface_action_code      = G_TMS_RELEASE_CODE
       --AND wnd.delivery_id(+)              = wdli.delivery_id
       --AND wnd.delivery_id                 = wndi.delivery_id
       -- OTM R12
       -- Fix Bug 5134725
       --AND nvl(wnd.tms_version_number,-99) = nvl(wndi.tms_version_number,-99) -- version number check
  ORDER BY wtsi_pu.trip_interface_id,wdli.sequence_number;
Line: 787

    SELECT wdli.delivery_leg_interface_id,
           wdli.delivery_interface_id,
           wtsi_pu.stop_location_id     pickup_stop_location_id, -- pickup stop location
           wtsi_pu.stop_sequence_number pickup_stop_sequence,    -- pickup stop sequence
           wtsi_do.stop_location_id     dropoff_stop_location_id,-- dropoff stop location
           wtsi_do.stop_sequence_number dropoff_stop_sequence,   -- dropoff stop sequence
           wtsi_pu.trip_interface_id,                        -- trip_interface_id
           wdli.delivery_leg_id,
           wdli.delivery_id,
           wdli.pick_up_stop_interface_id,
           wdli.drop_off_stop_interface_id,
           wnd.weight_uom_code  weight_uom,
           wnd.volume_uom_code  volume_uom,
           wnd.organization_id,           -- Organization id, used for deriving default UOM
           wnd.tms_version_number,        -- used before locking the delivery and rollback updates
           wndi.tms_version_number otm_tms_version_number,  -- OTM sent Version number
           wnd.initial_pickup_location_id,-- used while logging exceptions
           wnd.ultimate_dropoff_location_id,-- used for internal Locations
           'N'  processed_flag,            -- used to indicate which deliveries have to be assigned
           wnd.tms_interface_flag          -- used to check whether tms version check can be avoided.
      FROM wsh_del_legs_interface       wdli,
           wsh_new_del_interface        wndi,
           wsh_trip_stops_interface     wtsi_pu,
           wsh_trip_stops_interface     wtsi_do,
           wsh_trips_interface          wti,
           wsh_new_deliveries           wnd
     WHERE wti.interface_action_code       = G_TMS_RELEASE_CODE
       AND wtsi_pu.trip_interface_id       = wti.trip_interface_id
       AND wtsi_pu.stop_interface_id       = wdli.pick_up_stop_interface_id
       AND wtsi_pu.interface_action_code   = G_TMS_RELEASE_CODE
       AND wtsi_do.trip_interface_id       = wti.trip_interface_id
       AND wtsi_do.stop_interface_id       = wdli.drop_off_stop_interface_id
       AND wtsi_do.interface_action_code   = G_TMS_RELEASE_CODE
       -- OTM R12 no need to have outer join
       AND wnd.delivery_id                 = wdli.delivery_id
       AND wndi.delivery_id                = wdli.delivery_id
       AND wdli.interface_action_code      = G_TMS_RELEASE_CODE
       AND wti.group_id in
       (SELECT wti.group_id FROM  wsh_new_del_interface wndi,
         wsh_del_legs_interface wdli,
         wsh_trip_stops_interface wtsi,
         wsh_trips_interface wti,
         wsh_new_deliveries wnd
     where wndi.interface_action_code IN (G_TMS_RELEASE_CODE,G_TMS_DELETE_CODE)
     AND wdli.delivery_interface_id = wndi.delivery_interface_id
     AND wdli.pick_up_stop_interface_id = wtsi.stop_interface_id
     AND wtsi.trip_interface_id = wti.trip_interface_id
     AND wnd.delivery_id = wndi.delivery_id
     AND wndi.name >= nvl(p_del_name_low,wndi.name)
     AND wndi.name <= nvl(p_del_name_high,wndi.name)
     AND wnd.organization_id = NVL(p_organization_id,wnd.organization_id)
     AND wnd.initial_pickup_date >= nvl(l_del_pickup_date_low,wnd.initial_pickup_date)
     AND wnd.initial_pickup_date <= nvl(l_del_pickup_date_high,wnd.initial_pickup_date))
  ORDER BY wtsi_pu.trip_interface_id,wdli.sequence_number;
Line: 844

    SELECT wdli.delivery_leg_interface_id,
           wdli.delivery_interface_id,
           wtsi_pu.stop_location_id     pickup_stop_location_id, -- pickup stop location
           wtsi_pu.stop_sequence_number pickup_stop_sequence,    -- pickup stop sequence
           wtsi_do.stop_location_id     dropoff_stop_location_id,-- dropoff stop location
           wtsi_do.stop_sequence_number dropoff_stop_sequence,   -- dropoff stop sequence
           wtsi_pu.trip_interface_id,                        -- trip_interface_id
           wdli.delivery_leg_id,
           wdli.delivery_id,
           wdli.pick_up_stop_interface_id,
           wdli.drop_off_stop_interface_id,
           wnd.weight_uom_code  weight_uom,
           wnd.volume_uom_code  volume_uom,
           wnd.organization_id,           -- Organization id, used for deriving default UOM
           wnd.tms_version_number,        -- used before locking the delivery and rollback updates
           wndi.tms_version_number otm_tms_version_number,  -- OTM sent Version number
           wnd.initial_pickup_location_id,-- used while logging exceptions
           wnd.ultimate_dropoff_location_id,-- used for internal Locations
           'N'  processed_flag,            -- used to indicate which deliveries have to be assigned
           wnd.tms_interface_flag          -- used to check whether tms version check can be avoided.
      FROM wsh_del_legs_interface       wdli,
           wsh_new_del_interface        wndi,
           wsh_trip_stops_interface     wtsi_pu,
           wsh_trip_stops_interface     wtsi_do,
           wsh_trips_interface          wti,
           wsh_new_deliveries           wnd
     WHERE wti.interface_action_code       = G_TMS_RELEASE_CODE
       AND wtsi_pu.trip_interface_id       = wti.trip_interface_id
       AND wtsi_pu.stop_interface_id       = wdli.pick_up_stop_interface_id
       AND wtsi_pu.interface_action_code   = G_TMS_RELEASE_CODE
       AND wtsi_do.trip_interface_id       = wti.trip_interface_id
       AND wtsi_do.stop_interface_id       = wdli.drop_off_stop_interface_id
       AND wtsi_do.interface_action_code   = G_TMS_RELEASE_CODE
       -- OTM R12 no need to have outer join
       AND wnd.delivery_id                 = wdli.delivery_id
       AND wndi.delivery_id                = wdli.delivery_id
       AND wdli.interface_action_code      = G_TMS_RELEASE_CODE
     ORDER BY wtsi_pu.trip_interface_id,wdli.sequence_number;
Line: 889

    SELECT stop_id,stop_location_id,stop_sequence_number,
           physical_stop_id,physical_location_id,departure_gross_weight,departure_net_weight,
           departure_volume,weight_uom_code,volume_uom_code,departure_seal_code,
           departure_fill_percent,
           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
      FROM wsh_trip_stops
     WHERE trip_id = p_trip_id;
Line: 935

    SELECT wdl.delivery_id, wnd.organization_id,wnd.tms_version_number
      FROM wsh_delivery_legs wdl,
           wsh_new_deliveries wnd
     WHERE wdl.pick_up_stop_id = p_stop_id
       AND wnd.delivery_id = wdl.delivery_id
     UNION
    SELECT wdl.delivery_id, wnd.organization_id,wnd.tms_version_number
      FROM wsh_delivery_legs wdl,
           wsh_new_deliveries wnd
     WHERE wdl.drop_off_stop_id = p_stop_id
       AND wnd.delivery_id = wdl.delivery_id
     UNION
    SELECT wdl.delivery_id, wnd.organization_id,wnd.tms_version_number
      FROM wsh_delivery_legs wdl,
           wsh_new_deliveries wnd,
           wsh_trip_stops wts
     WHERE wdl.drop_off_stop_id = wts.stop_id
       AND wnd.delivery_id = wdl.delivery_id
       AND wts.physical_stop_id = p_stop_id;
Line: 958

    SELECT delivery_leg_id
      FROM wsh_delivery_legs
     WHERE delivery_id = p_delivery_id;
Line: 964

    SELECT freight_cost_interface_id,
           freight_cost_id,
           freight_cost_type_id,
           freight_cost_type_code,
           unit_amount,
           uom,
           total_amount,
           currency_code,
           delivery_id
      FROM wsh_freight_costs_interface
     WHERE delivery_id = p_delivery_id
       AND interface_action_code = G_TMS_RELEASE_CODE;
Line: 978

    SELECT wc.currency_code, wti.carrier_id
      FROM wsh_trips_interface wti,
           wsh_carriers wc
     WHERE wti.trip_interface_id = p_trip_interface_id
       AND wti.carrier_id = wc.carrier_id;
Line: 986

    SELECT freight_cost_type_id
      FROM wsh_freight_cost_types
     --WHERE name = 'OTM Freight Cost'
     WHERE name = c_name
     AND freight_cost_type_code = c_fc_type_code;
Line: 997

  SELECT wti.trip_interface_id,
        wndi.delivery_interface_id,
       wdli.delivery_leg_interface_id,
       wtsi.stop_interface_id,
       wfci.freight_cost_interface_id
  from wsh_trips_interface wti ,
  wsh_trip_stops_interface wtsi ,
  wsh_del_legs_interface wdli ,
  wsh_freight_costs_interface wfci,
  wsh_new_del_interface wndi
  where  wti.trip_interface_id   =  c_trip_interface_id --Bug7717569
  and wdli.delivery_interface_id = wndi.delivery_interface_id
  and wndi.delivery_interface_id = wfci.delivery_interface_id (+)
  and wndi.interface_action_code = 'TMS_RELEASE'
  and wdli.pick_up_stop_interface_id = wtsi.stop_interface_id
  and wtsi.trip_interface_id = wti.trip_interface_id
  FOR UPDATE NOWAIT;
Line: 1110

          SELECT fnd_date.chardt_to_date(p_del_pickup_date_low)
          INTO l_del_pickup_date_low
          FROM dual;
Line: 1117

          SELECT fnd_date.chardt_to_date(p_del_pickup_date_high)
          INTO l_del_pickup_date_high
          FROM dual;
Line: 1153

  l_unassigned_delivery_id_tab.DELETE;
Line: 1154

  l_unassigned_dlvy_version_tab.DELETE;
Line: 1158

  l_trip_info_tab.DELETE;
Line: 1159

  l_stop_info_tab.DELETE;
Line: 1160

  l_dleg_info_tab.DELETE;
Line: 1162

  l_dock_appt_tab.DELETE;
Line: 1379

    DELETE from wsh_interface_errors wie
     WHERE wie.interface_table_name = 'WSH_NEW_DEL_INTERFACE'
       AND wie.interface_id in (
           select wdli.delivery_interface_id
             from wsh_trip_stops_interface wtsi,
                  wsh_del_legs_interface wdli
            where wtsi.trip_interface_id = l_del_wti_tab(i)
              and wtsi.stop_interface_id = wdli.pick_up_stop_interface_id
              and wtsi.interface_action_code = G_TMS_RELEASE_CODE
              and wdli.interface_action_code = G_TMS_RELEASE_CODE)
       AND wie.interface_action_code = G_TMS_RELEASE_CODE;
Line: 1393

    DELETE from WSH_EXCEPTIONS we
     WHERE we.delivery_id in (
             select wdli.delivery_id
              from  wsh_trip_stops_interface wtsi,
                        wsh_del_legs_interface wdli
             where  wtsi.trip_interface_id = l_del_wti_tab(i)
               and  wtsi.stop_interface_id = wdli.pick_up_stop_interface_id
               and  wtsi.interface_action_code = G_TMS_RELEASE_CODE
               and  wdli.interface_action_code = G_TMS_RELEASE_CODE)
         and we.status = 'OPEN'
         and we.exception_name IN ('WSH_OTM_SHIPMENT_ERROR','WSH_OTM_INVALID_LOC');
Line: 1434

    l_dleg_local_tab.DELETE;
Line: 1435

    l_stop_local_tab.DELETE;
Line: 1436

    l_dlvy_id_tab.DELETE;
Line: 1716

      IF l_trip_info_tab(i).interface_action_code = G_TMS_DELETE_CODE THEN--{

        DECLARE
          l_delivery_tab         WSH_TMS_RELEASE.delivery_tab;
Line: 1813

      END IF;--} -- interface_action_code is DELETE
Line: 1866

        l_in_rec.action_code := 'UPDATE';
Line: 1876

        WSH_DEBUG_SV.logmsg(l_module_name,'Calling WSH_TRIPS_GRP.Create_Update_Trip:'||l_in_rec.action_code);
Line: 1879

      WSH_TRIPS_GRP.Create_Update_Trip(
        p_api_version_number =>  1.0,
        p_init_msg_list      =>  FND_API.G_TRUE,
        p_commit             =>  FND_API.G_FALSE,
        x_return_status      =>  l_rs,
        x_msg_count          =>  l_msg_count,
        x_msg_data           =>  l_msg_data,
        p_trip_info_tab      =>  l_trip_input_tab,
        p_In_rec             =>  l_in_rec,
        x_Out_tab            =>  l_trip_output_tab);
Line: 1894

          WSH_DEBUG_SV.log(l_module_name, 'Create Update Trip Failed: l_return_status', l_return_status);
Line: 1903

      ELSIF l_in_rec.action_code = 'UPDATE' THEN -- trip_id is already known
        l_trip_id := l_trip_info_tab(i).trip_id;
Line: 1908

        WSH_DEBUG_SV.logmsg(l_module_name,'Create_Update_Trip,return status:'||l_rs);
Line: 1926

      l_stop_delete_tab      WSH_UTIL_CORE.id_tab_type; -- stops to be deleted
Line: 1958

      l_stop_local_tab.DELETE;
Line: 2191

            l_del_attrs.DELETE;
Line: 2273

            l_stop_action_prms.action_code := 'DELETE';
Line: 2297

                WSH_DEBUG_SV.log(l_module_name, 'Delete Trip Stop Failed: l_return_status', l_return_status);
Line: 2343

          l_stop_attrs.DELETE;
Line: 2353

            l_stop_in_rec.action_code := 'UPDATE';
Line: 2534

            WSH_DEBUG_SV.logmsg(l_module_name,'Before Calling Create_update_Stop,count:'||l_stop_attrs.count);
Line: 2537

          wsh_trip_stops_grp.Create_Update_Stop(
            p_api_version_number     =>    1.0,
            p_init_msg_list          =>    FND_API.G_FALSE,
            p_commit                 =>    FND_API.G_FALSE,
            p_in_rec                 =>    l_stop_in_rec,
            p_rec_attr_tab           =>    l_stop_attrs,
            x_stop_out_tab           =>    l_stop_out_tab,
            x_return_status          =>    l_rs,
            x_msg_count              =>    l_msg_count,
            x_msg_data               =>    l_msg_data,
            x_stop_wt_vol_out_tab    =>    l_stop_wt_vol_out_tab);
Line: 2554

              WSH_DEBUG_SV.log(l_module_name, 'Create Update Trip Stop Failed: l_return_status', l_return_status);
Line: 2566

            WSH_DEBUG_SV.logmsg(l_module_name,'Return Status after Create_Update_stop'||l_rs);
Line: 2567

            WSH_DEBUG_SV.logmsg(l_module_name,'Stop id after Create_Update_stop'||l_stop_local_tab(stop_rec).stop_id);
Line: 2573

          SELECT wtsi.dock_name, wnd.organization_id, wtsi.start_time, wtsi.end_time
          FROM   wsh_del_legs_interface       wdli,
                 wsh_new_del_interface        wndi,
                 wsh_new_deliveries           wnd,
                 wsh_trip_stops_interface     wtsi,
                 wsh_trips_interface          wti
          WHERE  wti.group_id = c_group_id
          AND    wti.interface_action_code       = G_TMS_RELEASE_CODE
          AND    wtsi.trip_interface_id          = wti.trip_interface_id
          AND    wtsi.stop_interface_id          = wdli.pick_up_stop_interface_id
          AND    wtsi.interface_action_code      = G_TMS_RELEASE_CODE
          AND    wnd.delivery_id                 = wdli.delivery_id
          AND    wndi.delivery_id                = wdli.delivery_id
          AND    wdli.interface_action_code      = G_TMS_RELEASE_CODE
          AND    wtsi.stop_interface_id = c_stop_interface_id;
Line: 2689

              select stop_id,stop_location_id,stop_sequence_number,
                     physical_stop_id,physical_location_id
                from wsh_trip_stops
               where stop_id = l_stop_local_tab(stop_rec).stop_id;
Line: 2740

      l_delivery_id_tab.DELETE;
Line: 2741

      l_del_attrs.DELETE;
Line: 2943

      l_del_attrs.DELETE;
Line: 3085

      l_del_index.DELETE;
Line: 3106

            l_unassigned_delivery_id_tab.DELETE(l_del_index(i_del));
Line: 3107

            l_unassigned_dlvy_version_tab.DELETE(l_del_index(i_del));
Line: 3174

        l_dleg_id_tab.DELETE;
Line: 3186

          DELETE FROM wsh_freight_costs
           WHERE delivery_id = l_dleg_id_tab(k)
             AND freight_cost_type_id = l_frcost_type_id;
Line: 3192

          DELETE FROM wsh_freight_costs
           WHERE delivery_id = l_dlvy_id_tab(j)
             AND freight_cost_type_id = l_frcost_type_id;
Line: 3383

                  SELECT user_conversion_type
                    FROM gl_daily_conversion_types
                   WHERE conversion_type = p_curr_conv_type;
Line: 3512

              WSH_DEBUG_SV.logmsg(l_module_name, 'Calling WSH_FREIGHT_COSTS_GRP.Create_Update_Freight_Costs');
Line: 3515

             WSH_FREIGHT_COSTS_GRP.Create_Update_Freight_Costs
              (p_api_version_number =>  1.0,
               p_init_msg_list      =>  FND_API.G_TRUE,
               p_commit             =>  FND_API.G_FALSE,
               p_freight_info_tab   =>  l_freight_info_tab,
               p_in_rec             =>  l_in_rec,
               x_out_tab            =>  l_out_tab,
               x_return_status      =>  l_rs,
               x_msg_count          =>  l_msg_count,
               x_msg_data           =>  l_msg_data);
Line: 3533

                WSH_DEBUG_SV.log(l_module_name, 'Create_Update_Freight_Costs Failed: l_return_status', l_return_status);
Line: 3562

    SELECT wts.stop_id stop_id
    FROM   wsh_trips wt,
           wsh_trip_stops wts
    WHERE  wt.trip_id = c_trip_id
    AND    wt.trip_id = wts.trip_id
    ORDER  BY wts.stop_sequence_number DESC;
Line: 3570

    SELECT wnd.delivery_id, wdd.delivery_detail_id
    FROM   wsh_new_deliveries wnd,
           wsh_delivery_legs wdl,
           wsh_delivery_assignments wda, wsh_delivery_details wdd
    WHERE  wdl.drop_off_stop_id = c_drop_off_stop_id
    AND    wdl.delivery_id = wnd.delivery_id
    AND    WSH_UTIL_VALIDATE.CHECK_WMS_ORG(wnd.organization_id) = 'Y'
    AND    wnd.delivery_id = wda.delivery_id
    AND    wda.delivery_detail_id = wdd.delivery_detail_id
    FOR UPDATE OF wnd.loading_sequence, wdd.load_seq_number NOWAIT;
Line: 3594

	l_del_tab.DELETE;
Line: 3595

	l_del_det_tab.DELETE;
Line: 3606

            UPDATE wsh_new_deliveries
            SET    loading_sequence = l_loading_sequence,
                   last_update_date   = SYSDATE,
                   last_updated_by    = FND_GLOBAL.USER_ID,
                   last_update_login  = FND_GLOBAL.LOGIN_ID
            WHERE  delivery_id = l_del_tab(i);
Line: 3614

            UPDATE wsh_delivery_details
            SET    load_seq_number = l_loading_sequence,
                   last_update_date   = SYSDATE,
                   last_updated_by    = FND_GLOBAL.USER_ID,
                   last_update_login  = FND_GLOBAL.LOGIN_ID
            WHERE  delivery_detail_id = l_del_det_tab(i);
Line: 3667

	  fnd_msg_pub.delete_msg();
Line: 3728

          WSH_DEBUG_SV.logmsg(l_module_name,'Before Inserting in Interface error,count:'||l_dleg_local_tab.count );
Line: 3909

                  l_upd_dlvy_tms_tab(l_upd_dlvy_tms_tab.COUNT + 1) := l_dleg_local_tab(rec).tms_interface_flag;  --update to the old status.
Line: 3950

    fnd_msg_pub.delete_msg();
Line: 3968

      l_delivery_info_tab.DELETE;
Line: 4019

  WSH_NEW_DELIVERIES_PVT.update_tms_interface_flag
               ( p_delivery_id_tab        => l_upd_dlvy_id_tab,
		 p_tms_interface_flag_tab => l_upd_dlvy_tms_tab,
		 x_return_status          => l_return_status);
Line: 4025

        WSH_DEBUG_SV.log(l_module_name, 'update_tms_interface_flag  : l_return_status : ', l_return_status);
Line: 4201

  SELECT wti.trip_interface_id
    FROM wsh_trips_interface wti
   WHERE wti.tp_plan_name = p_tp_plan_name
     AND wti.interface_action_code = G_TMS_RELEASE_CODE;
Line: 4259

    Delete from wsh_freight_costs_interface wfci
     where wfci.delivery_interface_id in (
           select wdli.delivery_interface_id
             from wsh_trip_stops_interface wtsi,
                  wsh_del_legs_interface wdli
            where wtsi.trip_interface_id = l_trip_interface_id_tab(i)
              and wtsi.stop_interface_id = wdli.pick_up_stop_interface_id
              and wtsi.interface_action_code = G_TMS_RELEASE_CODE
              and wdli.interface_action_code = G_TMS_RELEASE_CODE)
       and wfci.interface_action_code = G_TMS_RELEASE_CODE;
Line: 4277

      DELETE from WSH_EXCEPTIONS we
       WHERE we.delivery_id in (
             select wdli.delivery_id
              from  wsh_trip_stops_interface wtsi,
                        wsh_del_legs_interface wdli
             where  wtsi.trip_interface_id = l_trip_interface_id_tab(i)
               and  wtsi.stop_interface_id = wdli.pick_up_stop_interface_id
               and  wtsi.interface_action_code = G_TMS_RELEASE_CODE
               and  wdli.interface_action_code = G_TMS_RELEASE_CODE)
         and we.status = 'OPEN'
         and we.exception_name IN ('WSH_OTM_SHIPMENT_ERROR','WSH_OTM_INVALID_LOC');
Line: 4295

      UPDATE WSH_EXCEPTIONS we
         SET status = 'CLOSED'
       WHERE we.delivery_id in (
             select wdli.delivery_id
               from wsh_trip_stops_interface wtsi,
                    wsh_del_legs_interface wdli
              where wtsi.trip_interface_id = l_trip_interface_id_tab(i)
                and wtsi.stop_interface_id = wdli.pick_up_stop_interface_id
                and wtsi.interface_action_code = G_TMS_RELEASE_CODE
                and wdli.interface_action_code = G_TMS_RELEASE_CODE)
                and we.exception_name IN ('WSH_OTM_SHIPMENT_ERROR','WSH_OTM_INVALID_LOC')
                and we.status = 'OPEN';
Line: 4319

    Delete from wsh_interface_errors wie
     where wie.interface_table_name = 'WSH_NEW_DEL_INTERFACE'
       and wie.interface_id in (
           select wdli.delivery_interface_id
             from wsh_trip_stops_interface wtsi,
                  wsh_del_legs_interface wdli
            where wtsi.trip_interface_id = l_trip_interface_id_tab(i)
              and wtsi.stop_interface_id = wdli.pick_up_stop_interface_id
              and wtsi.interface_action_code = G_TMS_RELEASE_CODE
              and wdli.interface_action_code = G_TMS_RELEASE_CODE)
       and wie.interface_action_code = G_TMS_RELEASE_CODE;
Line: 4336

    Delete from wsh_interface_errors wie
     where wie.interface_table_name = 'WSH_TRIP_STOPS_INTERFACE'
       and wie.interface_id in (
           select wtsi.stop_interface_id
            from wsh_trip_stops_interface wtsi
           where wtsi.trip_interface_id = l_trip_interface_id_tab(i)
             and wtsi.interface_action_code = G_TMS_RELEASE_CODE)
       and wie.interface_action_code = G_TMS_RELEASE_CODE;
Line: 4350

    Delete from wsh_interface_errors wie
     where wie.interface_table_name = 'WSH_TRIPS_INTERFACE'
       and wie.interface_id = l_trip_interface_id_tab(i)
       and wie.interface_action_code = G_TMS_RELEASE_CODE;
Line: 4360

    Delete from wsh_new_del_interface wndi
     where wndi.delivery_interface_id in (
           select wdli.delivery_interface_id
             from wsh_trip_stops_interface wtsi,
                  wsh_del_legs_interface wdli
            where wtsi.trip_interface_id = l_trip_interface_id_tab(i)
              and wtsi.stop_interface_id = wdli.pick_up_stop_interface_id
              and wtsi.interface_action_code = G_TMS_RELEASE_CODE
              and wdli.interface_action_code = G_TMS_RELEASE_CODE)
       and wndi.interface_action_code = G_TMS_RELEASE_CODE;
Line: 4376

    Delete from wsh_del_legs_interface wdli
     where wdli.pick_up_stop_interface_id in (
           select wtsi.stop_interface_id
             from wsh_trip_stops_interface wtsi
            where wtsi.trip_interface_id = l_trip_interface_id_tab(i)
              and wtsi.interface_action_code = G_TMS_RELEASE_CODE)
       and    wdli.interface_action_code = G_TMS_RELEASE_CODE;
Line: 4389

    Delete from wsh_trip_stops_interface wtsi
     where wtsi.trip_interface_id = l_trip_interface_id_tab(i)
       and wtsi.interface_action_code = G_TMS_RELEASE_CODE;
Line: 4400

    Delete from wsh_trips_interface wti
     where wti.trip_interface_id = l_trip_interface_id_tab(i)
       and wti.INTERFACE_ACTION_CODE = G_TMS_RELEASE_CODE;
Line: 4620

        INSERT INTO WSH_INTERFACE_ERRORS (
          INTERFACE_ERROR_ID,
          INTERFACE_ERROR_GROUP_ID,
          INTERFACE_TABLE_NAME,
          INTERFACE_ID,
          INTERFACE_ACTION_CODE,
          MESSAGE_NAME,
          ERROR_MESSAGE,
          CREATION_DATE,
          CREATED_BY,
          LAST_UPDATE_DATE,
          LAST_UPDATED_BY)
          VALUES (
          WSH_INTERFACE_ERRORS_S.nextval,
          p_group_id, --l_groups(i),
          'WSH_NEW_DEL_INTERFACE', --l_table_names(i),
          l_dlvy_id_tab(i),--l_interface_ids(i),
          G_TMS_RELEASE_CODE,
          l_message_name,
          l_message,
          SYSDATE,
          FND_GLOBAL.USER_ID,
          SYSDATE,
          FND_GLOBAL.USER_ID);
Line: 4682

    SELECT wdl.delivery_id,
           wnd.tms_version_number,
           wnd.organization_id,
           wnd.name,
           wnd.status_code
      FROM wsh_delivery_legs wdl,
           wsh_trip_stops    wts,
           wsh_new_deliveries wnd
     WHERE wdl.pick_up_stop_id = wts.stop_id
       AND wts.trip_id = p_trip_id
       AND wdl.delivery_id = wnd.delivery_id(+);
Line: 4696

    SELECT wdl.delivery_id,
           wnd.tms_version_number,
           wnd.organization_id,
           wnd.name,
           wnd.status_code
      FROM wsh_delivery_legs wdl,
           wsh_trip_stops    wts,
	   wsh_trips wt,
	   wsh_new_deliveries wnd
     WHERE wdl.pick_up_stop_id = wts.stop_id
       AND wts.trip_id = wt.trip_id
       AND wt.tp_plan_name = p_tp_plan_name
       AND wdl.delivery_id = wnd.delivery_id(+);
Line: 4801

SELECT wdl.delivery_leg_id,
       wdl.pick_up_stop_id         pick_up_stop_id,
       wdl.drop_off_stop_id        drop_off_stop_id,
       wts_pu.stop_location_id     pickup_stop_location_id,
       wts_pu.stop_sequence_number pickup_stop_sequence,
       wts_do.stop_location_id     dropoff_stop_location_id,
       wts_do.stop_sequence_number dropoff_stop_sequence,
       wts_pu.trip_id              trip_id
  FROM wsh_delivery_legs wdl,
       wsh_trip_stops wts_pu,
       wsh_trip_stops wts_do
 WHERE wdl.delivery_id = p_delivery_id
   AND wdl.pick_up_stop_id = wts_pu.stop_id
   AND wdl.drop_off_stop_id = wts_do.stop_id ;
Line: 4858

      l_del_attrs.DELETE;
Line: 5072

  l_update_stop          VARCHAR2(1);
Line: 5210

            l_update_stop := 'Y';
Line: 5223

                l_update_stop := 'N';
Line: 5232

              WSH_DEBUG_SV.logmsg(l_module_name, 'L_UPDATE_STOP FLAG:'||l_update_stop);
Line: 5235

            IF l_update_stop = 'Y' THEN--{
              -- Update the Stop Location for current stop to match delivery location
              -- x_stop_tab matches l_stop_tab
              --l_stop_tab(i).stop_location_id := l_dropoff_location_id;
Line: 5243

            ELSE -- l_update_stop = N, when other deliveries use physical location

              -- Assign current Stop record to the new stop table
              l_index := l_new_stop_tab.count + 1;
Line: 5260

              FOR stop_update IN x_stop_tab.FIRST..x_stop_tab.LAST
              LOOP
                IF x_stop_tab(stop_update).stop_sequence_number >= l_stop_tab(i).stop_sequence_number
                THEN
                  -- This will ensure dummy and physical stops are created together
                  -- Physical and other higher stops (with higher SSN are pushed out by 1)
                  x_stop_tab(stop_update).stop_sequence_number
                   :=  x_stop_tab(stop_update).stop_sequence_number + 1;
Line: 5270

            END IF;--} -- l_update_stop condition
Line: 5329

    SELECT upgrade_tz_id
    FROM fnd_timezones_b
    WHERE  timezone_code = c_timezone_code;