DBA Data[Home] [Help]

APPS.WSH_USA_CATEGORIES_PVT SQL Statements

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

Line: 8

  SELECT         source_line_id,
                 source_code,
                 organization_id,
                 inventory_item_id,  --bug#6407943
                 original_subinventory subinventory,
                 date_scheduled,
                 ship_set_id,
                 ship_to_site_use_id,
                 intmed_ship_to_location_id,
                 customer_id,
		 src_requested_quantity, --Bug#6077222
                 src_requested_quantity_uom, --Bug#6077222
                 freight_terms_code,
                 fob_code,
                 ship_method_code,
                 carrier_id,
                 requested_quantity,
                 requested_quantity_uom,
                 source_line_set_id, -- Bug 2181132
                 ship_tolerance_above,-- Bug 2181132
                 ship_tolerance_below,-- Bug 2181132
                 request_date_type_code,
                 container_flag,
                 earliest_pickup_date,
                 latest_pickup_date,
                 earliest_dropoff_date,
                 latest_dropoff_date,
                 mode_of_transport,
                 service_level,
                 decode(p_delivery_detail_id,
                        FND_API.G_MISS_NUM, FND_API.G_MISS_NUM,
                        delivery_detail_id) delivery_detail_id,
                 'Y' cache_flag,
                 project_id,
                 task_id
  FROM  wsh_delivery_details
  WHERE source_line_id = p_source_line_id
  AND   source_code = p_source_code
  AND   delivery_detail_id = DECODE(p_delivery_detail_id, FND_API.G_MISS_NUM,
                                    delivery_detail_id, p_delivery_detail_id)
  AND   released_status in ('R', 'N', 'X')
  AND rownum = 1
  ORDER BY decode (released_status,
                   'R', 1,
                   'N', 2,
                   'X', 3,
                    4);
Line: 58

  SELECT         source_line_id,
                 source_code,
                 organization_id,
                 inventory_item_id,  --bug#6407943
                 original_subinventory  subinventory,
                 date_scheduled,
                 ship_set_id,
                 ship_to_site_use_id,
                 intmed_ship_to_location_id,
                 customer_id,
		 src_requested_quantity, --Bug#6077222
                 src_requested_quantity_uom, --Bug#6077222
                 freight_terms_code,
                 fob_code,
                 ship_method_code,
                 carrier_id,
                 requested_quantity,
                 requested_quantity_uom,
                 source_line_set_id, -- Bug 2181132
                 ship_tolerance_above,-- Bug 2181132
                 ship_tolerance_below,-- Bug 2181132
                 request_date_type_code,
                 container_flag,
                 earliest_pickup_date,
                 latest_pickup_date,
                 earliest_dropoff_date,
                 latest_dropoff_date,
                 mode_of_transport,
                 service_level,
                 decode(p_delivery_detail_id,
                        FND_API.G_MISS_NUM, FND_API.G_MISS_NUM,
                        delivery_detail_id) delivery_detail_id,
                 'Y' cache_flag,
                 project_id,
                 task_id
  FROM  wsh_delivery_details
  WHERE source_line_id = p_source_line_id
  AND   source_code = p_source_code
  AND   delivery_detail_id = DECODE(p_delivery_detail_id, FND_API.G_MISS_NUM,
                                    delivery_detail_id, p_delivery_detail_id)
  AND   released_status in ('B', 'Y', 'S')
  AND rownum = 1
  ORDER BY decode (released_status,
                   'B', 1,
                   'Y', 2,
                   'S', 3,
                    4);
Line: 477

  x_update_allowed    OUT NOCOPY   VARCHAR2,
  x_return_status     OUT NOCOPY   VARCHAR2)
IS
  update_not_allowed  EXCEPTION;
Line: 484

  l_update_allowed  VARCHAR2(1) := 'Y';
Line: 522

    RAISE update_not_allowed;
Line: 541

           x_update_allowed => l_update_allowed,
           x_return_status  => l_rs);
Line: 543

  IF     (l_update_allowed = 'N')
     OR (l_rs IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
    RAISE update_not_allowed;
Line: 551

           x_update_allowed => l_update_allowed,
           x_return_status  => l_rs);
Line: 553

  IF     (l_update_allowed = 'N')
     OR (l_rs IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
    IF l_debug_on THEN
       WSH_DEBUG_SV.log(l_module_name,'Change_Scheduled_Date returned Error');
Line: 558

    RAISE update_not_allowed;
Line: 567

           x_update_allowed => l_update_allowed,
           x_return_status  => l_rs);
Line: 569

    IF     (l_update_allowed = 'N')
      OR (l_rs IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
     RAISE update_not_allowed;
Line: 578

           x_update_allowed => l_update_allowed,
           x_return_status  => l_rs);
Line: 580

  IF     (l_update_allowed = 'N')
     OR (l_rs IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
    RAISE update_not_allowed;
Line: 590

           x_update_allowed => l_update_allowed,
           x_return_status  => l_rs);
Line: 592

  IF     (l_update_allowed = 'N')
     OR (l_rs IN (WSH_UTIL_CORE.G_RET_STS_ERROR,
                  WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
    RAISE update_not_allowed;
Line: 604

      x_update_allowed => l_update_allowed,
      x_return_status  => l_rs);
Line: 607

  IF     (l_update_allowed = 'N')
     OR (l_rs IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
    RAISE update_not_allowed;
Line: 615

             x_update_allowed => l_update_allowed,
             x_return_status  => l_rs);
Line: 617

    IF(l_update_allowed = 'N')
       OR (l_rs IN (WSH_UTIL_CORE.G_RET_STS_ERROR, WSH_UTIL_CORE.G_RET_STS_UNEXP_ERROR)) THEN
      RAISE update_not_allowed;
Line: 622

  x_update_allowed := l_update_allowed;
Line: 626

      WSH_DEBUG_SV.log(l_module_name,'x_update_allowed',x_update_allowed);
Line: 631

    WHEN update_not_allowed THEN
      x_update_allowed := l_update_allowed;
Line: 636

          WSH_DEBUG_SV.logmsg(l_module_name,'UPDATE_NOT_ALLOWED exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
Line: 637

          WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:UPDATE_NOT_ALLOWED');
Line: 659

        x_update_allowed    IN OUT NOCOPY VARCHAR2,
        x_return_status     OUT    NOCOPY VARCHAR2) IS

update_not_allowed        EXCEPTION;
Line: 708

      WSH_DEBUG_SV.log(l_module_name,'X_UPDATE_ALLOWED',X_UPDATE_ALLOWED);
Line: 773

       WSH_DEBUG_SV.log(l_module_name,'x_update_allowed',x_update_allowed);
Line: 782

      x_update_allowed := 'N';
Line: 797

  x_update_allowed    IN OUT NOCOPY     VARCHAR2,
  x_return_status     OUT NOCOPY        VARCHAR2) IS

update_not_allowed        EXCEPTION;
Line: 823

      WSH_DEBUG_SV.log(l_module_name,'X_UPDATE_ALLOWED',X_UPDATE_ALLOWED);
Line: 839

      WSH_USA_QUANTITY_PVT.Update_Ordered_Quantity(
                         p_changed_attribute => p_attributes_rec,
                         p_source_code       => p_source_code,
                         p_action_flag       => 'U',
                         p_wms_flag          => p_wms_flag,
                         x_return_status     => x_return_status);
Line: 850

       WSH_DEBUG_SV.log(l_module_name,'x_update_allowed',x_update_allowed);
Line: 856

     WHEN update_not_allowed THEN
      x_update_allowed := 'N';
Line: 860

           WSH_DEBUG_SV.logmsg(l_module_name,'UPDATE_NOT_ALLOWED exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
Line: 861

           WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:UPDATE_NOT_ALLOWED');
Line: 868

      x_update_allowed := 'N';
Line: 883

  x_update_allowed    IN OUT NOCOPY     VARCHAR2,
        x_return_status     OUT NOCOPY        VARCHAR2)
IS
-- HW OPMCONV - Added Qty2
--bug# 6689448 (replenishment project): added wdd.replenishment_status
cursor c_delivery_detail is
select wdd.delivery_detail_id, wdd.released_status,
       wdd.move_order_line_id, wdd.ship_from_location_id,
       wdd.subinventory, wda.parent_delivery_detail_id,
       wda.delivery_id, wdd.inventory_item_id,
       wdd.serial_number, wdd.transaction_temp_id,
       wdd.requested_quantity, wdd.picked_quantity,
       wdd.requested_quantity2, wdd.picked_quantity2,
       wdd.net_weight, wdd.gross_weight, wdd.volume,
       wdd.weight_uom_code, wdd.volume_uom_code,
       wdd.original_subinventory, wdd.pickable_flag ,
      NVL(wnd.status_code, 'OP'), NVL(wnd.planned_flag, 'N'), NVL(wnd.tms_interface_flag, 'NS'),
      wdd.replenishment_status
from wsh_delivery_details wdd, wsh_delivery_assignments wda, wsh_new_deliveries wnd
where wdd.source_line_id = p_attributes_rec.source_line_id
and wdd.source_code = p_source_code
and wdd.delivery_detail_id = wda.delivery_detail_id
and wda.delivery_id = wnd.delivery_id(+)
order by decode(wdd.released_status, 'Y', 1, 2);
Line: 909

SELECT wnd.status_code,wsp.export_screening_flag
FROM   wsh_delivery_details wdd, wsh_delivery_assignments wda, wsh_new_deliveries wnd,
       wsh_shipping_parameters wsp
WHERE  wdd.source_code = p_source_code
AND    wdd.source_line_id = p_attributes_rec.source_line_id
AND    wdd.delivery_detail_id = wda.delivery_detail_id
AND    wda.delivery_id = wnd.delivery_id
AND    wnd.organization_id = wsp.organization_id
AND   ( NVL(wnd.status_code, 'OP') IN ('SR','SA')  OR
        wsp.export_screening_flag IN ('C','A') );
Line: 920

SELECT description, hazard_class_id, primary_uom_code, weight_uom_code,
       unit_weight, volume_uom_code, unit_volume , decode(mtl_transactions_enabled_flag,'Y','Y','N') pickable_flag
FROM   mtl_system_items
WHERE  inventory_item_id = c_p_inventory_item_id
AND    organization_id = c_p_organization_id;
Line: 927

SELECT 'N'
FROM   wsh_delivery_details
WHERE  source_line_id = p_attributes_rec.source_line_id
AND    source_code = p_source_code
AND    released_status IN ('S','Y','C','B');
Line: 934

SELECT 'N'
FROM   wsh_delivery_details wdd, wsh_delivery_assignments wda
WHERE  wdd.source_line_id = p_attributes_rec.source_line_id
AND    wdd.source_code = p_source_code
AND    wdd.released_status <> 'D'
AND    wdd.delivery_detail_id = wda.delivery_detail_id
AND    wda.parent_delivery_detail_id IS NOT NULL;
Line: 944

SELECT  primary_uom_code
from    mtl_system_items
where   inventory_item_id = c_item_id
and     organization_id = c_organization_id ;
Line: 978

update_not_allowed        EXCEPTION;
Line: 992

l_delete_dds      WSH_UTIL_CORE.Id_Tab_Type ; -- to delete overpicked delivery lines
Line: 1037

item_update_not_allowed        EXCEPTION;
Line: 1065

      WSH_DEBUG_SV.log(l_module_name,'X_UPDATE_ALLOWED',X_UPDATE_ALLOWED);
Line: 1136

                 WSH_DEBUG_SV.logmsg(l_module_name, 'Item Update is not allowed as it is associated to OPM organization.');
Line: 1138

             RAISE item_update_not_allowed;
Line: 1150

                 WSH_DEBUG_SV.logmsg(l_module_name, 'Item Update is not allowed as it is associated to OPM organization.');
Line: 1152

             RAISE item_update_not_allowed;
Line: 1163

     FETCH c_det_status INTO x_update_allowed;
Line: 1168

           WSH_DEBUG_SV.logmsg(l_module_name, 'Item Update is not allowed as there are Detail(s) that are already Pick Released ');
Line: 1170

        RAISE item_update_not_allowed;
Line: 1176

     FETCH c_packed_det INTO x_update_allowed;
Line: 1181

           WSH_DEBUG_SV.logmsg(l_module_name, 'Item Update is not allowed as there are Detail(s) that are packed into Containers ');
Line: 1183

        RAISE item_update_not_allowed;
Line: 1195

               WSH_DEBUG_SV.logmsg(l_module_name, 'Update is not allowed as there is a Delivery that belongs to tpw/carrier manifesting Organization with status '||l_del_status);
Line: 1198

               WSH_DEBUG_SV.logmsg(l_module_name, 'Update is not allowed as export compliance screening is enabled at delivery creation/delivery creation and ship confirm '||l_export_screening_flag);
Line: 1201

        RAISE item_update_not_allowed;
Line: 1216

           WSH_DEBUG_SV.logmsg(l_module_name, 'Update is not allowed as there is a difference in primary UOM for old and new item');
Line: 1218

        RAISE item_update_not_allowed;
Line: 1250

           WSH_DEBUG_SV.logmsg(l_module_name, 'Update is not allowed as there is a difference in UOM conversions for old and new item');
Line: 1252

        RAISE item_update_not_allowed;
Line: 1284

               WSH_DEBUG_SV.logmsg(l_module_name, 'Update is not allowed as there are no shipping parameters defined for the org: '||l_final_org_id);
Line: 1286

           RAISE item_update_not_allowed;
Line: 1345

             FND_MESSAGE.SET_NAME('WSH', 'WSH_WMS_UPDATE_NOT_ALLOWED');
Line: 1348

             RAISE update_not_allowed;
Line: 1411

            l_delete_dds( l_delete_dds.count+1 ) := l_del_det;
Line: 1430

                                p_delete_reservations  =>  'N',
                                p_txn_source_line_id   =>  p_attributes_rec.source_line_id,
                                p_delivery_detail_id   =>  l_del_det, -- X-dock
                                x_return_status        =>  x_return_status,
                                x_msg_count            =>  l_msg_count,
                                x_msg_data             =>  l_msg_data
                                );
Line: 1442

                        RAISE update_not_allowed;
Line: 1461

                 RAISE update_not_allowed;
Line: 1475

                 RAISE update_not_allowed;
Line: 1489

                 RAISE update_not_allowed;
Line: 1503

                 RAISE update_not_allowed;
Line: 1523

               RAISE update_not_allowed;
Line: 1535

               RAISE update_not_allowed;
Line: 1567

                       RAISE update_not_allowed;
Line: 1582

                   WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WMS_REPLENISHMENT_PUB.UPDATE_DELIVERY_DETAIL' ,WSH_DEBUG_SV.C_PROC_LEVEL);
Line: 1584

               WMS_REPLENISHMENT_PUB.UPDATE_DELIVERY_DETAIL(
                    p_delivery_detail_id => l_del_det,
                    p_primary_quantity   => 0, --- WMS will delete the records from WMS table.
	            x_return_status      => x_return_status);
Line: 1591

       	               WSH_DEBUG_SV.logmsg(l_module_name,  'UNEXPECTED ERROR FROM WMS_REPLENISHMENT_PUB.UPDATE_DELIVERY_DETAIL');
Line: 1626

                      RAISE item_update_not_allowed;
Line: 1645

           UPDATE wsh_delivery_details
           SET subinventory =  NULL,
             lot_number = NULL,
             locator_id = NULL,
             revision = NULL,
             move_order_line_id = NULL,
-- HW OPMCONV. No need for sublot anymore
--           sublot_number = NULL,
             preferred_grade = NULL,
             shipped_quantity = NULL,
             cycle_count_quantity = NULL,
             shipped_quantity2 = NULL,
             cycle_count_quantity2 = NULL,
             picked_quantity = NULL,
             picked_quantity2 = NULL,
             serial_number = NULL,
             transaction_temp_id = NULL,
             batch_id  = NULL,
             transaction_id = NULL,  ---  2803570
	     inventory_item_id      = DECODE(l_change_item, 'Y', p_attributes_rec.inventory_item_id, inventory_item_id),
             item_description       = DECODE(l_change_item, 'Y', l_item_rec.description, item_description),
             unit_weight            = DECODE(l_change_item, 'Y', l_item_rec.unit_weight, unit_weight),
             weight_uom_code        = DECODE(l_change_item, 'Y', l_item_rec.weight_uom_code, weight_uom_code),
             net_weight             = DECODE(l_change_item, 'Y', l_new_weight, net_weight),
             gross_weight           = DECODE(l_change_item, 'Y', l_new_weight, gross_weight),
             unit_volume            = DECODE(l_change_item, 'Y', l_item_rec.unit_volume, unit_volume),
             volume_uom_code        = DECODE(l_change_item, 'Y', l_item_rec.volume_uom_code, volume_uom_code),
             volume                 = DECODE(l_change_item, 'Y', l_new_volume, volume),
             wv_frozen_flag         = DECODE(l_change_item, 'Y', 'N', wv_frozen_flag),
             pickable_flag          = DECODE(l_change_item, 'Y', l_item_rec.pickable_flag, pickable_flag),
             hazard_class_id        = DECODE(l_change_item, 'Y', l_item_rec.hazard_class_id, hazard_class_id),
	     released_status        = DECODE(released_status,'X', DECODE(l_change_item, 'Y', DECODE(l_item_rec.pickable_flag, 'N', 'X', 'R'), 'X'),
                                                  'B', 'B', DECODE(l_change_item, 'Y', DECODE(l_item_rec.pickable_flag, 'N', 'X', 'R'), 'R')),
             inv_interfaced_flag    = DECODE(l_change_item, 'Y', DECODE(l_item_rec.pickable_flag, 'N','X','N'), inv_interfaced_flag),
              requested_quantity2 = p_attributes_rec.ordered_quantity2,
             requested_quantity_uom2= p_attributes_rec.ordered_quantity_uom2,
             replenishment_status = decode(l_change_replenish_status,'Y',NULL,replenishment_status)  ----bug# 6689448 (replenishment project)
            WHERE delivery_detail_id = l_del_det;
Line: 1687

              WSH_DEBUG_SV.log(l_module_name,'Rows updated:',SQL%ROWCOUNT);
Line: 1707

                  RAISE item_update_not_allowed;
Line: 1727

     WSH_INTEGRATION.DBI_Update_Detail_Log
       (p_delivery_detail_id_tab => l_detail_tab,
        p_dml_type               => 'UPDATE',
        x_return_status          => l_dbi_rs);
Line: 1752

     IF l_delete_dds.count > 0 THEN
       WSH_INTERFACE.Delete_Details(
       p_details_id      =>    l_delete_dds,
       x_return_status   =>    x_return_status
       );
Line: 1759

         RAISE update_not_allowed;
Line: 1821

              WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_NEW_DELIVERIES_PVT.UPDATE_TMS_INTERFACE_FLAG',WSH_DEBUG_SV.C_PROC_LEVEL);
Line: 1823

           WSH_NEW_DELIVERIES_PVT.Update_TMS_Interface_Flag
            (p_delivery_id_tab        => l_delivery_id_tab,
             p_tms_interface_flag_tab => l_tms_interface_flag_tab,
             x_return_status          => l_return_status);
Line: 1830

                 WSH_DEBUG_SV.log(l_module_name,'Return Status from WSH_NEW_DELIVERIES_PVT.Update_Tms_interface_flag',l_return_status);
Line: 1832

              RAISE item_update_not_allowed;
Line: 1858

         RAISE update_not_allowed;
Line: 1893

         WSH_USA_INV_PVT.delete_reservation (
           p_query_input     => l_resv_tbl(i),
           x_return_status    => x_return_status);
Line: 1899

           RAISE update_not_allowed;
Line: 2066

 WHEN item_update_not_allowed THEN
      x_update_allowed := 'N';
Line: 2075

          WSH_DEBUG_SV.logmsg(l_module_name,'UPDATE_NOT_ALLOWED exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
Line: 2076

          WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:UPDATE_NOT_ALLOWED');
Line: 2080

    WHEN update_not_allowed THEN
      x_update_allowed := 'N';
Line: 2084

          WSH_DEBUG_SV.logmsg(l_module_name,'UPDATE_NOT_ALLOWED exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
Line: 2085

          WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:UPDATE_NOT_ALLOWED');
Line: 2115

      x_update_allowed := 'N';
Line: 2129

  x_update_allowed    IN OUT NOCOPY     VARCHAR2,
  x_return_status     OUT NOCOPY        VARCHAR2)
IS

cursor c_delivery_detail is
select delivery_detail_id, ship_from_location_id
from wsh_delivery_details
where source_line_id = p_attributes_rec.source_line_id
and source_code = p_source_code;
Line: 2143

update_not_allowed        EXCEPTION;
Line: 2172

      WSH_DEBUG_SV.log(l_module_name,'X_UPDATE_ALLOWED',X_UPDATE_ALLOWED);
Line: 2207

          RAISE update_not_allowed;
Line: 2233

    WHEN update_not_allowed THEN
      x_update_allowed := 'N';
Line: 2237

          WSH_DEBUG_SV.logmsg(l_module_name,'UPDATE_NOT_ALLOWED exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
Line: 2238

          WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:UPDATE_NOT_ALLOWED');
Line: 2258

      x_update_allowed := 'N';
Line: 2273

  x_update_allowed    IN OUT NOCOPY     VARCHAR2,
  x_return_status     OUT NOCOPY        VARCHAR2)
IS
-- Bug 2846006
-- Cursor to check if delivery details exist for a source line
-- but different released status
-- Bug 2995052 : Ship Set can be assigned to a order line even if it contains
--               back order and ready to release delivery details.
cursor c_get_released_status is
select count(distinct(decode(released_status,'B','R',released_status)))
from wsh_delivery_details
where source_line_id = p_attributes_rec.source_line_id
and source_code = p_source_code
and released_status NOT IN ('X','D');
Line: 2290

select delivery_detail_id, released_status, move_order_line_id
from wsh_delivery_details
where source_line_id = p_attributes_rec.source_line_id
and source_code = p_source_code
and released_status NOT IN ('X', 'D')
order by decode(released_status, 'Y', 1, 2);
Line: 2312

update_not_allowed        EXCEPTION;
Line: 2333

    WSH_DEBUG_SV.log(l_module_name,'X_UPDATE_ALLOWED',X_UPDATE_ALLOWED);
Line: 2359

        RAISE update_not_allowed;
Line: 2381

          RAISE update_not_allowed;
Line: 2400

            Raise update_not_allowed;
Line: 2420

          l_trolin_tbl(1).OPERATION := INV_GLOBALS.G_OPR_UPDATE;
Line: 2441

            RAISE update_not_allowed;
Line: 2463

    WHEN update_not_allowed THEN
      x_return_status := WSH_UTIL_CORE.G_RET_STS_ERROR;
Line: 2466

      x_update_allowed := 'N';
Line: 2469

          WSH_DEBUG_SV.logmsg(l_module_name,'UPDATE_NOT_ALLOWED exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
Line: 2470

          WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:UPDATE_NOT_ALLOWED');
Line: 2479

      x_update_allowed := 'N';
Line: 2493

  x_update_allowed    IN OUT NOCOPY     VARCHAR2,
  x_return_status     OUT NOCOPY        VARCHAR2)
IS

l_mandatory_flag             VARCHAR2(1) := NULL;
Line: 2525

update_not_allowed        EXCEPTION;
Line: 2528

select wdd.delivery_detail_id, wdd.ship_from_location_id,
       wda.delivery_id, wda.parent_delivery_detail_id,
       wdd.released_status, wnd.service_level service_level, wnd.mode_of_transport mode_of_transport,
       wnd.carrier_id carrier_id, wnd.ship_method_code ship_method_code
from wsh_delivery_details  wdd, wsh_delivery_assignments_v wda, wsh_new_deliveries wnd
where wdd.source_line_id = p_source_line_id
and wdd.source_code = p_source_code
and wdd.delivery_detail_id = wda.delivery_detail_id
and wda.delivery_id = wnd.delivery_id
UNION
select wdd.delivery_detail_id, wdd.ship_from_location_id,
       wda.delivery_id, wda.parent_delivery_detail_id,
       wdd.released_status, wddp.service_level service_level, wddp.mode_of_transport mode_of_transport,
       wddp.carrier_id carrier_id, wdd.ship_method_code ship_method_code
from wsh_delivery_details  wdd, wsh_delivery_assignments_v wda, wsh_delivery_details wddp
where wdd.source_line_id = p_source_line_id
and wdd.source_code = p_source_code
and wdd.delivery_detail_id = wda.delivery_detail_id
and wda.parent_delivery_detail_id = wddp.delivery_detail_id
and wda.delivery_id is null;
Line: 2550

select parent_delivery_detail_id
from wsh_delivery_assignments_v
where delivery_detail_id = p_child_id;
Line: 2594

        WSH_DEBUG_SV.log(l_module_name,'X_UPDATE_ALLOWED',X_UPDATE_ALLOWED);
Line: 2756

           RAISE update_not_allowed;
Line: 2811

           RAISE update_not_allowed;
Line: 2825

            FND_MESSAGE.SET_NAME('WSH', 'WSH_WMS_UPDATE_NOT_ALLOWED');
Line: 2828

            RAISE update_not_allowed;
Line: 2850

              RAISE update_not_allowed;
Line: 2864

              RAISE update_not_allowed;
Line: 2868

            l_delivery_ids.delete;
Line: 2879

               RAISE update_not_allowed;
Line: 2898

              RAISE update_not_allowed;
Line: 2912

              RAISE update_not_allowed;
Line: 2937

                   RAISE update_not_allowed;
Line: 2959

                l_del_in_rec.action_code := 'UPDATE';
Line: 2961

                WSH_INTERFACE_GRP.Create_Update_Delivery(p_api_version_number => 1.0,
                                                         p_init_msg_list      => FND_API.G_FALSE,
                                                         p_commit             => FND_API.G_FALSE,
                                                         p_in_rec             => l_del_in_rec,
                                                         p_rec_attr_tab       => l_delivery_info_tab,
                                                         x_del_out_rec_tab    => l_del_out_rec_tab,
                                                         x_return_status      => x_return_status,
                                                         x_msg_count          => l_msg_count,
                                                         x_msg_data           => l_msg_data);
Line: 2974

                   RAISE update_not_allowed;
Line: 2995

                  RAISE update_not_allowed;
Line: 3023

                      RAISE update_not_allowed;
Line: 3044

                   l_detail_in_rec.action_code := 'UPDATE';
Line: 3046

                   WSH_INTERFACE_GRP.Create_Update_Delivery_Detail(
                      p_api_version_number      => 1.0,
                      p_init_msg_list          => FND_API.G_FALSE,
                      p_commit                => FND_API.G_FALSE,
                      x_return_status         => x_return_status,
                      x_msg_count             => l_msg_count,
                      x_msg_data              => l_msg_data,
                      p_detail_info_tab       => l_detail_info_tab,
                      p_IN_rec                => l_detail_in_rec,
                      x_OUT_rec               => l_detail_out_rec);
Line: 3058

                      RAISE update_not_allowed;
Line: 3072

                      WSH_CONTAINER_ACTIONS.Update_Cont_Hierarchy(
                                         p_del_detail_id => dd.parent_delivery_detail_id,
                                         p_delivery_id => NULL,
                                         p_container_instance_id => l_parent_container,
                                         x_return_status => x_return_status);
Line: 3079

                         RAISE update_not_allowed;
Line: 3102

    WHEN update_not_allowed THEN
      x_update_allowed := 'N';
Line: 3107

          WSH_DEBUG_SV.logmsg(l_module_name,'UPDATE_NOT_ALLOWED exception has occured.',WSH_DEBUG_SV.C_EXCEP_LEVEL);
Line: 3108

          WSH_DEBUG_SV.pop(l_module_name,'EXCEPTION:UPDATE_NOT_ALLOWED');
Line: 3133

      x_update_allowed := 'N';
Line: 3150

  x_update_allowed    IN OUT NOCOPY     VARCHAR2,
  x_return_status     OUT NOCOPY        VARCHAR2)
IS

-- this is because source_line_set_id may or may not be populated
-- in that case match using source line id
-- query is driven by released status and souce header id.
-- line_set_id can be NULL or MISS_NUM also , when we need to match
-- using source_line_id
CURSOR c_get_released_status is
SELECT delivery_detail_id
  FROM wsh_delivery_details
 WHERE (source_line_id = p_attributes_rec.source_line_id
OR source_line_set_id = p_attributes_rec.source_line_set_id)
   AND source_code = p_source_code
   AND source_header_id = p_attributes_rec.source_header_id
   AND released_status IN ('Y', 'C')
   AND container_flag = 'N'
   AND rownum = 1;
Line: 3171

update_not_allowed  EXCEPTION;
Line: 3202

        WSH_DEBUG_SV.log(l_module_name,'X_UPDATE_ALLOWED',X_UPDATE_ALLOWED);
Line: 3241

        FND_MESSAGE.SET_NAME('WSH', 'WSH_UPDATE_TOL_NOT_ALLOWED');
Line: 3244

        RAISE update_not_allowed;
Line: 3249

    x_update_allowed := 'Y';
Line: 3253

      WSH_DEBUG_SV.log(l_module_name,'Update Allowed'||x_update_allowed);
Line: 3258

  WHEN update_not_allowed THEN
    x_return_status  := WSH_UTIL_CORE.G_RET_STS_ERROR;
Line: 3260

    x_update_allowed := 'N';
Line: 3271

    x_update_allowed := 'N';