DBA Data[Home] [Help]

APPS.WSH_RCV_CORR_RTV_TXN_PKG SQL Statements

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

Line: 76

    x_update_det_rec IN OUT NOCOPY update_detail_rec_type,
    p_update_det_rec_idx IN NUMBER,
    x_rem_req_qty_rec IN OUT NOCOPY rem_req_qty_rec_type,
    x_unassign_det_tbl IN OUT NOCOPY wsh_util_core.id_tab_type,
    x_po_line_loc_tbl IN OUT NOCOPY wsh_util_core.id_tab_type,
    x_delivery_id_tab  IN OUT NOCOPY wsh_util_core.id_tab_type,
    x_wv_detail_tab    IN OUT NOCOPY wsh_util_core.id_tab_type,
    x_unassigned_lpn_id_tab       IN OUT NOCOPY wsh_util_core.id_tab_type,
    x_wv_recalc_del_id_tab       IN OUT NOCOPY wsh_util_core.id_tab_type,
    x_return_status OUT NOCOPY VARCHAR2)
  IS
  --{

  l_child_index      NUMBER;
Line: 99

  l_del_update_req_flag VARCHAR2(1);
Line: 107

    select wnd.delivery_id
    from  wsh_delivery_assignments_v wda,
          wsh_new_deliveries wnd
    where wda.delivery_detail_id = p_del_det_id
    and   wda.delivery_id = wnd.delivery_id;
Line: 116

    select parent_delivery_detail_id
    from   wsh_delivery_assignments_v
    where  delivery_detail_id = p_delivery_detail_id;
Line: 123

    select gross_weight,
           net_weight,
           volume,
           NVL(wv_frozen_flag,'Y') wv_frozen_flag
    from   wsh_delivery_details
    where  delivery_detail_id = p_delivery_detail_id;
Line: 160

        WSH_DEBUG_SV.log(l_module_name,'P_UPDATE_DET_REC_IDX',P_UPDATE_DET_REC_IDX);
Line: 163

        WSH_DEBUG_SV.log(l_module_name,'update recs recevied quantity ',x_update_det_rec.received_qty_tab(p_update_det_rec_idx));
Line: 164

        WSH_DEBUG_SV.log(l_module_name,'update recs record_changed_flag ',x_update_det_rec.record_changed_flag_tab(p_update_det_rec_idx));
Line: 265

        x_update_det_rec.received_qty_tab(p_matched_detail_index) := NULL;
Line: 266

        x_update_det_rec.received_qty2_tab(p_matched_detail_index) := NULL;
Line: 267

        x_update_det_rec.returned_qty_tab(p_matched_detail_index) := NULL;
Line: 268

        x_update_det_rec.returned_qty2_tab(p_matched_detail_index) := NULL;
Line: 269

        x_update_det_rec.shipment_line_id_tab(p_matched_detail_index) := NULL;
Line: 270

        x_update_det_rec.released_sts_tab(p_matched_detail_index) := 'X';
Line: 278

        x_update_det_rec.received_qty_tab(p_update_det_rec_idx) := x_matched_detail_rec.received_qty_tab(p_matched_detail_index);
Line: 280

        x_update_det_rec.requested_qty_tab(p_update_det_rec_idx) := least(x_matched_detail_rec.requested_qty_tab(p_matched_detail_index),
        x_matched_detail_rec.received_qty_tab(p_matched_detail_index));
Line: 283

        x_update_det_rec.received_qty2_tab(p_update_det_rec_idx) := x_matched_detail_rec.received_qty2_tab(p_matched_detail_index);
Line: 285

        x_update_det_rec.requested_qty2_tab(p_update_det_rec_idx) := least(x_matched_detail_rec.requested_qty2_tab(p_matched_detail_index),
        x_matched_detail_rec.received_qty2_tab(p_matched_detail_index));
Line: 323

      x_update_det_rec.record_changed_flag_tab(p_update_det_rec_idx) := 'Y';
Line: 324

      l_del_update_req_flag := 'Y';
Line: 333

      x_update_det_rec.received_qty_tab(p_update_det_rec_idx) := x_matched_detail_rec.received_qty_tab(p_matched_detail_index);
Line: 335

      x_update_det_rec.received_qty2_tab(p_update_det_rec_idx) := x_matched_detail_rec.received_qty2_tab(p_matched_detail_index);
Line: 337

      x_update_det_rec.record_changed_flag_tab(p_update_det_rec_idx) := 'Y';
Line: 338

      l_del_update_req_flag := 'Y';
Line: 343

    IF nvl(l_del_update_req_flag, 'N') = 'Y' THEN
    --{
      IF nvl(x_update_det_rec.received_qty_tab(p_update_det_rec_idx),0) = 0 THEN
      --{
        x_update_det_rec.received_qty_tab(p_update_det_rec_idx) := null;
Line: 355

      IF nvl(x_update_det_rec.received_qty2_tab(p_update_det_rec_idx),0) = 0 THEN
      --{
        x_update_det_rec.received_qty2_tab(p_update_det_rec_idx) := null;
Line: 371

        x_update_det_rec.wv_changed_flag_tab(p_update_det_rec_idx) := 'Y';
Line: 372

        x_update_det_rec.gross_weight_tab(p_update_det_rec_idx) := ROUND(l_qty_ratio*l_det_gr_weight,5);
Line: 373

        x_update_det_rec.net_weight_tab(p_update_det_rec_idx) := ROUND(l_qty_ratio*l_det_net_weight,5);
Line: 374

        x_update_det_rec.volume_tab(p_update_det_rec_idx) := ROUND(l_qty_ratio*l_det_volume,5);
Line: 445

    WSH_DEBUG_SV.log(l_module_name,'At the end - update recs recevied quantity ',x_update_det_rec.received_qty_tab(p_update_det_rec_idx));
Line: 446

    WSH_DEBUG_SV.log(l_module_name,'At the end - update recs record_changed_flag ',x_update_det_rec.record_changed_flag_tab(p_update_det_rec_idx));
Line: 532

    x_update_det_rec IN OUT NOCOPY update_detail_rec_type,
    p_update_det_rec_idx IN NUMBER,
    x_rem_req_qty_rec IN OUT NOCOPY rem_req_qty_rec_type,
    x_return_status OUT NOCOPY VARCHAR2)
  IS
  --{

  l_num_errors    NUMBER;
Line: 567

        WSH_DEBUG_SV.log(l_module_name,'P_UPDATE_DET_REC_IDX',P_UPDATE_DET_REC_IDX);
Line: 583

      x_update_det_rec.returned_qty_tab(p_update_det_rec_idx) := x_matched_detail_rec.returned_qty_tab(p_matched_detail_index);
Line: 585

      x_update_det_rec.returned_qty2_tab(p_update_det_rec_idx) := x_matched_detail_rec.returned_qty2_tab(p_matched_detail_index);
Line: 598

      IF (nvl(x_update_det_rec.returned_qty_tab(p_update_det_rec_idx), 0) = 0) THEN
      --{
        x_update_det_rec.returned_qty_tab(p_update_det_rec_idx) := null;
Line: 604

      IF (nvl(x_update_det_rec.returned_qty2_tab(p_update_det_rec_idx), 0) = 0) THEN
      --{
        x_update_det_rec.returned_qty2_tab(p_update_det_rec_idx) := null;
Line: 609

      x_update_det_rec.record_changed_flag_tab(p_update_det_rec_idx) := 'Y';
Line: 745

    l_update_det_rec update_detail_rec_type;
Line: 746

    l_update_det_rec_idx NUMBER := -1;
Line: 769

    select 'N'
    from   wsh_delivery_assignments_v wda,
           wsh_delivery_details wdd1,
           wsh_delivery_details wdd2
    where  wda.delivery_id = p_delivery_id
    and    wda.delivery_detail_id = wdd1.delivery_detail_id
    and    wda.delivery_detail_id = wdd2.delivery_detail_id
    and    (wdd1.fob_code is null
            or wdd2.fob_code is null
            or wdd1.fob_code <> wdd2.fob_code)
    and    rownum =1;
Line: 783

    select 'N'
    from   wsh_delivery_assignments_v wda,
           wsh_delivery_details wdd1,
           wsh_delivery_details wdd2
    where  wda.delivery_id = p_delivery_id
    and    wda.delivery_detail_id = wdd1.delivery_detail_id
    and    wda.delivery_detail_id = wdd2.delivery_detail_id
    and    (wdd1.freight_terms_code is null
            or wdd2.freight_terms_code is null
            or wdd1.freight_terms_code <> wdd2.freight_terms_code)
    and    rownum =1;
Line: 797

    select wdd.freight_terms_code, wdd.fob_code
    from   wsh_delivery_assignments_v wda,
           wsh_delivery_details wdd
    where  wda.delivery_id = p_delivery_id
    and    wda.delivery_detail_id = wdd.delivery_detail_id
    and    rownum =1;
Line: 824

    select 'N'
    from wsh_delivery_assignments_v
    where parent_delivery_detail_id = p_del_det_id
    and rownum=1;
Line: 831

    l_delete_lpn_id_tab  wsh_util_core.id_tab_type;
Line: 883

    l_update_det_rec_idx := l_update_det_rec.del_det_id_tab.count;
Line: 885

    g_del_cache_tbl.delete;
Line: 886

    g_del_ext_cache_tbl.delete;
Line: 893

        l_update_det_rec_idx := l_update_det_rec_idx + 1;
Line: 895

        l_update_det_rec.del_det_id_tab(l_update_det_rec_idx) := p_matched_detail_rec.del_detail_id_tab(l_index);
Line: 897

        l_update_det_rec.requested_qty_tab(l_update_det_rec_idx) := p_matched_detail_rec.requested_qty_tab(l_index);
Line: 899

        l_update_det_rec.shipped_qty_tab(l_update_det_rec_idx) := p_matched_detail_rec.shipped_qty_tab(l_index);
Line: 901

        l_update_det_rec.received_qty_tab(l_update_det_rec_idx) := p_matched_detail_rec.received_qty_tab(l_index);
Line: 903

        l_update_det_rec.returned_qty_tab(l_update_det_rec_idx) := p_matched_detail_rec.returned_qty_tab(l_index);
Line: 905

        l_update_det_rec.requested_qty2_tab(l_update_det_rec_idx) := p_matched_detail_rec.requested_qty2_tab(l_index);
Line: 907

        l_update_det_rec.shipped_qty2_tab(l_update_det_rec_idx) := p_matched_detail_rec.shipped_qty2_tab(l_index);
Line: 909

        l_update_det_rec.received_qty2_tab(l_update_det_rec_idx) := p_matched_detail_rec.received_qty2_tab(l_index);
Line: 911

        l_update_det_rec.returned_qty2_tab(l_update_det_rec_idx) := p_matched_detail_rec.returned_qty2_tab(l_index);
Line: 912

        l_update_det_rec.shipment_line_id_tab(l_update_det_rec_idx) := p_matched_detail_rec.shipment_line_id_tab(l_index);
Line: 914

        l_update_det_rec.record_changed_flag_tab(l_update_det_rec_idx) :=  'N';
Line: 915

        l_update_det_rec.wv_changed_flag_tab(l_update_det_rec_idx) :=  'N';
Line: 916

        l_update_det_rec.net_weight_tab(l_update_det_rec_idx) := null;
Line: 917

        l_update_det_rec.gross_weight_tab(l_update_det_rec_idx) := null;
Line: 918

        l_update_det_rec.volume_tab(l_update_det_rec_idx)       := null;
Line: 921

          WSH_DEBUG_SV.log(l_module_name,'requested qty(' || l_update_det_rec_idx|| ')', l_update_det_rec.requested_qty_tab(l_update_det_rec_idx));
Line: 922

          WSH_DEBUG_SV.log(l_module_name,'received qty(' || l_update_det_rec_idx|| ')', l_update_det_rec.received_qty_tab(l_update_det_rec_idx));
Line: 923

          WSH_DEBUG_SV.log(l_module_name,'returned qty(' || l_update_det_rec_idx|| ')', l_update_det_rec.returned_qty_tab(l_update_det_rec_idx));
Line: 924

          WSH_DEBUG_SV.log(l_module_name,'Shipped qty(' || l_update_det_rec_idx|| ')', l_update_det_rec.shipped_qty_tab(l_update_det_rec_idx));
Line: 966

            x_update_det_rec           => l_update_det_rec,
            p_update_det_rec_idx       => l_update_det_rec_idx,
            x_rem_req_qty_rec          => l_rem_req_qty_rec,
            x_unassign_det_tbl         => l_unassign_det_tbl,
            x_po_line_loc_tbl          => l_po_line_loc_tbl,
            x_delivery_id_tab          => l_delivery_id_tab,
            x_wv_detail_tab            => l_wv_detail_tab,
            x_unassigned_lpn_id_tab    => l_unassigned_lpn_id_tab,
            x_wv_recalc_del_id_tab     => l_wv_recalc_del_id_tab,
            x_return_status            => l_return_status);
Line: 996

            x_update_det_rec           => l_update_det_rec,
            p_update_det_rec_idx       => l_update_det_rec_idx,
            x_rem_req_qty_rec          => l_rem_req_qty_rec,
            x_return_status            => l_return_status);
Line: 1057

      WSH_DEBUG_SV.logmsg(l_module_name,'Before doing a bulk update');
Line: 1058

      WSH_DEBUG_SV.log(l_module_name,'received qty before the update', l_update_det_rec.received_qty_tab(1));
Line: 1059

      WSH_DEBUG_SV.log(l_module_name,'update rec count is', l_update_det_rec.received_qty_tab.count);
Line: 1060

      WSH_DEBUG_SV.log(l_module_name,'record_changed_flag', l_update_det_rec.record_changed_flag_tab(1));
Line: 1061

      WSH_DEBUG_SV.log(l_module_name,'del_detid', l_update_det_rec.del_det_id_tab(1));
Line: 1062

      WSH_DEBUG_SV.log(l_module_name,'shipped_qty_tab', l_update_det_rec.shipped_qty_tab(1));
Line: 1063

      WSH_DEBUG_SV.log(l_module_name,'shipped_qty2_tab', l_update_det_rec.shipped_qty2_tab(1));
Line: 1064

      WSH_DEBUG_SV.log(l_module_name,'received_qty_tab', l_update_det_rec.received_qty_tab(1));
Line: 1065

      WSH_DEBUG_SV.log(l_module_name,'returned_qty_tab', l_update_det_rec.returned_qty_tab(1));
Line: 1066

      WSH_DEBUG_SV.log(l_module_name,'shipment_line_id_tab', l_update_det_rec.shipment_line_id_tab(1));
Line: 1067

      WSH_DEBUG_SV.log(l_module_name,'wv_changed_flag_tab', l_update_det_rec.wv_changed_flag_tab(1));
Line: 1068

      WSH_DEBUG_SV.log(l_module_name,'net_weight_tab', l_update_det_rec.net_weight_tab(1));
Line: 1069

      WSH_DEBUG_SV.log(l_module_name,'gross_weight_tab', l_update_det_rec.gross_weight_tab(1));
Line: 1070

      WSH_DEBUG_SV.log(l_module_name,'volume_tab', l_update_det_rec.volume_tab(1));
Line: 1072

    forall i in l_update_det_rec.del_det_id_tab.first..l_update_det_rec.del_det_id_tab.last
      update wsh_delivery_details
      set requested_quantity      = l_update_det_rec.requested_qty_tab(i),
          requested_quantity2     = l_update_det_rec.requested_qty2_tab(i),
          shipped_quantity        = l_update_det_rec.shipped_qty_tab(i),
          shipped_quantity2       = l_update_det_rec.shipped_qty2_tab(i),
          received_quantity       = l_update_det_rec.received_qty_tab(i),
          received_quantity2      = l_update_det_rec.received_qty2_tab(i),
          returned_quantity       = l_update_det_rec.returned_qty_tab(i),
          returned_quantity2      = l_update_det_rec.returned_qty2_tab(i),
          rcv_shipment_line_id    = l_update_det_rec.shipment_line_id_tab(i),
          net_weight              = decode(l_update_det_rec.wv_changed_flag_tab(i),
                                           'Y',
                                           l_update_det_rec.net_weight_tab(i),
                                           net_weight
                                          ),
          gross_weight            = decode(l_update_det_rec.wv_changed_flag_tab(i),
                                           'Y',
                                           l_update_det_rec.gross_weight_tab(i),
                                           gross_weight
                                          ),
          volume                  = decode(l_update_det_rec.wv_changed_flag_tab(i),
                                           'Y',
                                           l_update_det_rec.volume_tab(i),
                                           volume
                                          ),
          last_update_date        = sysdate,
          last_updated_by         = fnd_global.user_id,
          last_update_login       = fnd_global.user_id
       where l_update_det_rec.record_changed_flag_tab(i) = 'Y'
       and   delivery_detail_id   = l_update_det_rec.del_det_id_tab(i);
Line: 1106

      WSH_DEBUG_SV.logmsg(l_module_name,'After the bulk update');
Line: 1107

      WSH_DEBUG_SV.log(l_module_name,'Number of Records updated', SQL%ROWCOUNT);
Line: 1116

      WSH_DEBUG_SV.log(l_module_name,'Calling DBI API.Detail Count-',l_update_det_rec.del_det_id_tab.count);
Line: 1118

    WSH_INTEGRATION.DBI_Update_Detail_Log
      (p_delivery_detail_id_tab => l_update_det_rec.del_det_id_tab,
       p_dml_type               => 'UPDATE',
       x_return_status          => l_dbi_rs);
Line: 1191

           IF nvl(l_lpn_empty_flag,'Y') = 'Y' THEN -- delete the lpn
           --{
             l_delete_lpn_id_tab(l_delete_lpn_id_tab.count + 1) := l_unassigned_lpn_id_tab(i);
Line: 1200

         IF (l_delete_lpn_id_tab.count > 0) THEN
         --{
           FORALL i IN l_delete_lpn_id_tab.FIRST..l_delete_lpn_id_tab.LAST
           DELETE wsh_delivery_assignments_v
           WHERE  delivery_detail_id = l_delete_lpn_id_tab(i);
Line: 1211

           FORALL i IN l_delete_lpn_id_tab.FIRST..l_delete_lpn_id_tab.LAST
           DELETE WSH_DELIVERY_DETAILS
           WHERE  delivery_detail_id = l_delete_lpn_id_tab(i);
Line: 1306

        p_update_flag       => 'Y',
        p_calc_wv_if_frozen => 'N',
        x_return_status     => l_return_status);
Line: 1339

        p_update_flag       => 'Y',
        p_calc_wv_if_frozen => 'N',
        x_return_status     => l_return_status);
Line: 1637

    l_update_rec update_detail_rec_type;
Line: 1638

    l_update_del_det_id NUMBER;
Line: 1639

    l_update_del_det_id_tab  wsh_util_core.id_tab_type;
Line: 1640

    l_update_del_det_req_qty NUMBER;
Line: 1641

    l_update_del_det_req_qty2 NUMBER;
Line: 1665

    select delivery_detail_id,
           requested_quantity,
           requested_quantity2
    from   wsh_delivery_details
    where  source_line_id = p_source_line_id
    and    po_shipment_line_id = p_po_line_loc_id
    and    released_status = 'X'
    and    routing_req_id is null
    and    source_code = 'PO'
    order by requested_quantity desc;
Line: 1681

    select delivery_detail_id,
           requested_quantity,
           requested_quantity2
    from   wsh_delivery_details
    where  source_line_id = p_source_line_id
    and    po_shipment_line_id = p_po_line_loc_id
    and   ( released_status = 'X'
            or
            ( released_status = 'L'
              and received_quantity is null
            )
          )
    and    routing_req_id is null
    and    source_code = 'PO'
    order by requested_quantity desc,
    decode (released_status,
                           'X',1,
                           'L',2);
Line: 1706

    select requested_quantity_uom
    from   wsh_delivery_details
    where source_line_id = p_source_line_id
    and   source_code = 'PO'
    and   po_shipment_line_id = p_po_line_loc_id;
Line: 1721

    select delivery_detail_id,
           requested_quantity,
           requested_quantity2,
           'N' record_changed_flag
    from   wsh_delivery_details
    where  source_line_id = p_source_line_id
    and    po_shipment_line_id = p_po_line_loc_id
    and    released_status in ('X', 'C', 'L')
    and    source_code = 'PO'
    and    requested_quantity > 0
    order by
    decode (released_status,
                           'X',1,
                           'C',2,
                           'L',3),
           delivery_detail_id desc
    for update of requested_quantity nowait;
Line: 1777

      fetch l_open_del_det_csr bulk collect into l_update_rec.del_det_id_tab,
                                               l_update_rec.requested_qty_tab,
                                               l_update_rec.requested_qty2_tab;
Line: 1787

      fetch l_all_del_det_csr bulk collect into l_update_rec.del_det_id_tab,
                                               l_update_rec.requested_qty_tab,
                                               l_update_rec.requested_qty2_tab;
Line: 1795

      WSH_DEBUG_SV.log(l_module_name,'count of update rec tables is', l_update_rec.del_det_id_tab.COUNT);
Line: 1798

    IF (l_update_rec.del_det_id_tab.COUNT < 1 ) THEN
    --{
      l_record_found := FALSE;
Line: 1868

      i := l_update_rec.del_det_id_tab.first;
Line: 1874

          WSH_DEBUG_SV.log(l_module_name,'Delivery Detail Id', l_update_rec.del_det_id_tab(i));
Line: 1876

          WSH_DEBUG_SV.log(l_module_name,'Delivery Detail Req Qty ', l_update_rec.requested_qty_tab(i));
Line: 1878

          WSH_DEBUG_SV.log(l_module_name,'Delivery Detail Req Qty 2', l_update_rec.requested_qty2_tab(i));
Line: 1881

        l_update_rec.record_changed_flag_tab (i) := 'N';
Line: 1882

        IF l_update_rec.requested_qty_tab(i) > abs(l_new_req_qty) THEN
        --{
          l_update_rec.requested_qty_tab(i) := l_update_rec.requested_qty_tab(i) + l_new_req_qty;
Line: 1887

            l_update_rec.requested_qty2_tab(i) := nvl(l_update_rec.requested_qty2_tab(i),0) +
            l_new_req_qty2;
Line: 1890

            IF (l_update_rec.requested_qty2_tab(i) < 0) THEN
            --{
              l_update_rec.requested_qty2_tab(i) := 0;
Line: 1898

          l_update_rec.record_changed_flag_tab (i) := 'Y';
Line: 1901

          l_update_del_det_id := l_update_rec.del_det_id_tab(i);
Line: 1902

          l_update_del_det_req_qty := l_update_rec.requested_qty_tab(i);
Line: 1903

          l_update_del_det_req_qty2 := l_update_rec.requested_qty2_tab(i);
Line: 1905

        ELSE -- l_update_rec.requested_qty_tab(i) <= abs(l_new_req_qty)
        --{
          --
          -- Debug Statements
          --
          IF l_debug_on THEN
            WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_DETAILS_PKG.LOCK_DETAIL_NO_COMPARE',WSH_DEBUG_SV.C_PROC_LEVEL);
Line: 1915

            p_delivery_detail_id => l_update_rec.del_det_id_tab(i));
Line: 1918

            WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_DETAILS_PKG.DELETE_DELIVERY_DETAILS',WSH_DEBUG_SV.C_PROC_LEVEL);
Line: 1921

          wsh_delivery_details_pkg.delete_delivery_details(
            p_delivery_detail_id => l_update_rec.del_det_id_tab(i),
            x_return_status      => l_return_status);
Line: 1936

          l_new_req_qty := l_new_req_qty + l_update_rec.requested_qty_tab(i);
Line: 1937

          IF (l_update_rec.requested_qty2_tab(i) IS NOT NULL) THEN
          --{
            l_new_req_qty2 := l_new_req_qty2 + l_update_rec.requested_qty2_tab(i);
Line: 1952

          WSH_DEBUG_SV.log(l_module_name,'Record Changed flag for the current record is', l_update_rec.record_changed_flag_tab(i));
Line: 1955

        i := l_update_rec.del_det_id_tab.NEXT(i);
Line: 1957

        IF NOT (l_update_rec.del_det_id_tab(i).EXISTS) THEN
        --{
          l_new_req_qty := 0; -- so that we can exit the loop.
Line: 1966

        WSH_DEBUG_SV.logmsg(l_module_name,'Before performing the update');
Line: 1967

        WSH_DEBUG_SV.log(l_module_name,'Delivery Detail Id is ', l_update_del_det_id);
Line: 1970

      IF l_update_del_det_id IS NOT NULL THEN
      --{
        IF l_debug_on THEN
          WSH_DEBUG_SV.logmsg(l_module_name,'Calling program unit WSH_DELIVERY_DETAILS_PKG.LOCK_DETAIL_NO_COMPARE',WSH_DEBUG_SV.C_PROC_LEVEL);
Line: 1977

          p_delivery_detail_id => l_update_del_det_id);
Line: 1979

        update wsh_delivery_details
        set requested_quantity  = l_update_del_det_req_qty,
            requested_quantity2 = nvl(l_update_del_det_req_qty2,requested_quantity2),
            last_update_date        = sysdate,
            last_updated_by         = fnd_global.user_id,
            last_update_login       = fnd_global.user_id
         where delivery_detail_id = l_update_del_det_id;
Line: 1987

          WSH_DEBUG_SV.logmsg(l_module_name,'After the update');
Line: 1990

        l_update_del_det_id_tab(1) := l_update_del_det_id;
Line: 1998

          WSH_DEBUG_SV.log(l_module_name,'Calling DBI API.Detail Count-', l_update_del_det_id_tab.count);
Line: 2000

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

          WSH_DEBUG_SV.log(l_module_name,'Need to recalculate weight and volume for del detail --- ',l_update_del_det_id);
Line: 2030

          p_detail_rows    => l_update_del_det_id_tab,
          p_override_flag  => 'Y',
          p_calc_wv_if_frozen => 'N',
          x_return_status     => l_return_status);
Line: 2047

        l_update_del_det_id := NULL;
Line: 2059

        l_update_rec.del_det_id_tab.delete;
Line: 2060

        l_update_rec.requested_qty_tab.delete;
Line: 2061

        l_update_rec.requested_qty2_tab.delete;
Line: 2065

        fetch l_rem_ret_qty_csr bulk collect into l_update_rec.del_det_id_tab,
                                                 l_update_rec.requested_qty_tab,
                                                 l_update_rec.requested_qty2_tab,
                                                 l_update_rec.record_changed_flag_tab;
Line: 2071

          WSH_DEBUG_SV.log(l_module_name,'Need to recalculate weight and volume for del detail --- ',l_update_del_det_id);
Line: 2078

        i := l_update_rec.del_det_id_tab.first;
Line: 2084

            WSH_DEBUG_SV.log(l_module_name,'Delivery Detail Id ('||i||')', l_update_rec.del_det_id_tab(i));
Line: 2086

            WSH_DEBUG_SV.log(l_module_name,'Delivery Detail Req Qty ('||i||')', l_update_rec.requested_qty_tab(i));
Line: 2088

            WSH_DEBUG_SV.log(l_module_name,'Delivery Detail Req Qty 2 ('||i||')', l_update_rec.requested_qty2_tab(i));
Line: 2091

          IF l_update_rec.requested_qty_tab(i) > abs(l_new_req_qty) THEN
          --{
            l_update_rec.requested_qty_tab(i) := l_update_rec.requested_qty_tab(i) + l_new_req_qty;
Line: 2094

            l_update_rec.record_changed_flag_tab(i) := 'Y';
Line: 2097

              l_update_rec.requested_qty2_tab(i) := nvl(l_update_rec.requested_qty2_tab(i),0) +
              l_new_req_qty2;
Line: 2100

              IF (l_update_rec.requested_qty2_tab(i) < 0) THEN
              --{
                l_update_rec.requested_qty2_tab(i) := 0;
Line: 2110

            l_update_del_det_id := l_update_rec.del_det_id_tab(i);
Line: 2111

            l_update_del_det_req_qty := l_update_rec.requested_qty_tab(i);
Line: 2112

            l_update_del_det_req_qty2 := l_update_rec.requested_qty2_tab(i);
Line: 2114

          ELSE -- l_update_rec.requested_qty_tab(i) <= abs(l_new_req_qty)
          --{
            l_new_req_qty := l_new_req_qty + l_update_rec.requested_qty_tab(i);
Line: 2117

            l_update_rec.requested_qty_tab(i) := 0;
Line: 2118

            l_update_rec.record_changed_flag_tab(i) := 'Y';
Line: 2120

            IF (l_update_rec.requested_qty2_tab(i) IS NOT NULL) THEN
            --{
              l_new_req_qty2 := l_new_req_qty2 + l_update_rec.requested_qty2_tab(i);
Line: 2123

              l_update_rec.requested_qty2_tab(i) := 0;
Line: 2138

          i := l_update_rec.del_det_id_tab.NEXT(i);
Line: 2141

        IF ( l_update_rec.del_det_id_tab.COUNT > 0 ) THEN
        --{
           --
           --
           FORALL i IN l_update_rec.del_det_id_tab.FIRST..l_update_rec.del_det_id_tab.LAST
             update wsh_delivery_details
             set    requested_quantity      =   l_update_rec.requested_qty_tab(i),
                    requested_quantity2     =   l_update_rec.requested_qty2_tab(i),
                    last_update_date        =   sysdate,
                    last_updated_by         =   fnd_global.user_id,
                    last_update_login       =   fnd_global.user_id
             where  delivery_detail_id      =   l_update_rec.del_det_id_tab(i)
             and    nvl(l_update_rec.record_changed_flag_tab(i), 'N') = 'Y';
Line: 2157

              WSH_DEBUG_SV.logmsg(l_module_name,'After the bulk update');
Line: 2158

              WSH_DEBUG_SV.log(l_module_name,'Number of Records updated', SQL%ROWCOUNT);
Line: 2166

             WSH_DEBUG_SV.log(l_module_name,'Calling DBI API.Detail Count-', l_update_rec.del_det_id_tab.count);
Line: 2168

           WSH_INTEGRATION.DBI_Update_Detail_Log
             (p_delivery_detail_id_tab =>  l_update_rec.del_det_id_tab,
              p_dml_type               => 'UPDATE',
              x_return_status          => l_dbi_rs);