DBA Data[Home] [Help]

APPS.INV_PICK_RELEASE_PVT SQL Statements

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

Line: 77

     SELECT sum(reservation_quantity - detailed_quantity)
       INTO l_quantity_reserved
         FROM  mtl_reservations
     WHERE demand_source_line_id = p_demand_line_id
           AND inventory_item_id = p_inventory_item_id
           AND organization_id = p_org_id
           AND nvl(staged_flag,'N') <> 'Y'
           AND demand_source_line_detail IS NULL;
Line: 118

      UPDATE mtl_material_transactions_temp
      SET wms_task_status = 1
      WHERE move_order_header_id = p_header_id;
Line: 124

        UPDATE mtl_material_transactions_temp
        SET wms_task_status = 1
        WHERE transaction_temp_id IN
            ( SELECT DISTINCT mmtt2.parent_line_id
              FROM mtl_material_transactions_temp  mmtt2
              WHERE move_order_header_id = p_header_id
              AND parent_line_id IS NOT NULL
            );
Line: 145

  SELECT move_order_typE
  FROM mtl_txn_request_headers mtrh, mtl_txn_request_lines mtrl
  WHERE mtrl.header_id = mtrh.header_id
   AND mtrl.line_id = p_mo_line_id;
Line: 151

  SELECT inventory_item_id,
                 organization_id,
                 requested_quantity,
                 requested_quantity_uom,
                 requested_quantity_uom2,
		         requested_quantity2, --MUOM Fulfillment Project
                 ship_tolerance_above,
                 ship_tolerance_below,
                 source_header_id,
                 source_line_set_id,
                 source_code,
         source_line_id
  FROM   wsh_delivery_details
  WHERE  move_order_line_id = p_mo_line_id;
Line: 510

    l_update_rsv_rec         inv_reservation_global.mtl_reservation_rec_type;
Line: 606

      SELECT reservation_id, serial_number
      FROM mtl_serial_numbers msn
      WHERE reservation_id =  rsv_id
        AND current_status = 3
        AND NOT EXISTS (Select serial_number
                        From mtl_serial_numbers_temp msnt
                        Where msn.serial_number between msnt.fm_serial_number and nvl(msnt.to_serial_number,msnt.fm_serial_number)
                        and (msn.group_mark_id = msnt.transaction_temp_id
                             OR msn.group_mark_id = msnt.group_header_id
                             )
                        ); -- Bug 8618236
Line: 629

           SELECT sum(primary_reservation_quantity)
                , sum(secondary_reservation_quantity)
             INTO g_item_non_inv_rsv(p_mo_line_rec.inventory_item_id)
                , g_item_sec_non_inv_rsv(p_mo_line_rec.inventory_item_id)
             FROM mtl_reservations
            WHERE organization_id = p_mo_line_rec.organization_id
              AND inventory_item_id = p_mo_line_rec.inventory_item_id
              AND supply_source_type_id <> INV_Reservation_GLOBAL.g_source_type_inv
              AND demand_source_line_detail IS NULL;
Line: 642

           SELECT nvl(sum(primary_reservation_quantity),0)
                , nvl(sum(secondary_reservation_quantity),0)
             INTO l_non_inv_reservations_qty
                , l_non_inv_sec_reservation_qty
             FROM mtl_reservations
            WHERE demand_source_line_id = p_demand_info.oe_line_id
              AND organization_id = p_mo_line_rec.organization_id
              AND inventory_item_id = p_mo_line_rec.inventory_item_id
              AND demand_source_type_id = p_demand_source_type
              AND supply_source_type_id <> INV_Reservation_GLOBAL.g_source_type_inv
              AND demand_source_line_detail IS NULL;
Line: 1112

                    l_update_rsv_rec                               := l_qry_rsv_rec;
Line: 1113

                    l_update_rsv_rec.primary_reservation_quantity  := l_update_rsv_rec.primary_reservation_quantity + l_quantity_to_reserve;
Line: 1114

                    l_update_rsv_rec.reservation_quantity          := NULL; -- Force update of reserved qty
Line: 1117

                       print_debug('update reservation', 'Inv_Pick_Release_PVT.Process_Reservations');
Line: 1119

                    inv_reservation_pub.update_reservation(
                      p_api_version_number         => 1.0
                    , p_init_msg_lst               => fnd_api.g_false
                    , x_return_status              => l_api_return_status
                    , x_msg_count                  => x_msg_count
                    , x_msg_data                   => x_msg_data
                    , p_original_rsv_rec           => l_qry_rsv_rec
                    , p_to_rsv_rec                 => l_update_rsv_rec
                    , p_original_serial_number     => l_dummy_sn
                    , p_to_serial_number           => l_dummy_sn
                    , p_validation_flag            => fnd_api.g_true
                    );
Line: 1134

                         print_debug('error in update reservation', 'Inv_Pick_Release_PVT.Process_Reservations');
Line: 1145

                      l_qry_rsv_rec_by_id.reservation_id := l_update_rsv_rec.reservation_id;
Line: 1175

                    inv_quantity_tree_pub.update_quantities(
                        p_api_version_number         => 1.0
                      , p_init_msg_lst               => fnd_api.g_false
                      , x_return_status              => l_api_return_status
                      , x_msg_count                  => x_msg_count
                      , x_msg_data                   => x_msg_data
                      , p_organization_id            => p_mo_line_rec.organization_id
                      , p_inventory_item_id          => p_mo_line_rec.inventory_item_id
                      , p_tree_mode          => inv_quantity_tree_pub.g_reservation_mode
                      , p_is_revision_control        => l_is_revision_control
                      , p_is_lot_control             => l_is_lot_control
                      , p_is_serial_control          => l_is_serial_control
                      , p_demand_source_type_id      => p_demand_source_type
                      , p_demand_source_header_id    => p_mso_line_id
                      , p_demand_source_line_id      => p_demand_info.oe_line_id
                      , p_demand_source_name         => p_demand_source_name
                      , p_revision                   => NULL
                      , p_lot_number                 => NULL
                      , p_lot_expiration_date        => l_exp_date
                      , p_subinventory_code          => NULL
                      , p_locator_id                 => NULL
                      , p_primary_quantity         => l_quantity_to_reserve
                       , p_secondary_quantity         => l_sec_quantity_to_reserve      -- Bug 7377744
                      , p_quantity_type         => inv_quantity_tree_pub.g_qr_same_demand
                      , x_qoh                        => l_qty_on_hand
                      , x_rqoh                       => l_qty_res_on_hand
                      , x_qr                         => l_qty_res
                      , x_qs                         => l_qty_sug
                      , x_att                        => l_qty_att
                      , x_atr                        => l_qty_available_to_reserve


                     , p_grade_code                 => l_grade_code
                     , x_sqoh                       => l_sec_qty_on_hand
                     , x_srqoh                      => l_sec_qty_res_on_hand
                     , x_sqr                        => l_sec_qty_res
                     , x_sqs                        => l_sec_qty_sug
                     , x_satt                       => l_sec_qty_att
                     , x_satr                       => l_sec_qty_available_to_reserve
                    );
Line: 1292

                    UPDATE mtl_reservations
                       SET primary_reservation_quantity = l_new_prim_rsv_quantity
                          ,reservation_quantity = l_new_rsv_quantity
                          ,secondary_reservation_quantity =  l_new_sec_rsv_quantity
                     WHERE reservation_id = l_org_wide_res_id;
Line: 1298

                    inv_rsv_synch.for_update(
                      p_reservation_id => l_org_wide_res_id
                    , x_return_status => l_api_return_status
                    , x_msg_count => x_msg_count
                    , x_msg_data => x_msg_data);
Line: 1306

                        print_debug('Error from inv_rsv_synch.for_update', 'Inv_Pick_Release_PVT.Process_Reservations');
Line: 1313

                        print_debug('Unexp. error from inv_rsv_synch.for_update', 'Inv_Pick_Release_PVT.Process_Reservations');
Line: 1334

                    l_update_rsv_rec.reservation_id             := NULL; -- cannot know
Line: 1335

                    l_update_rsv_rec.requirement_date           := SYSDATE;
Line: 1336

                    l_update_rsv_rec.organization_id            :=  p_mo_line_rec.organization_id;
Line: 1337

                    l_update_rsv_rec.inventory_item_id          :=p_mo_line_rec.inventory_item_id;
Line: 1338

                    l_update_rsv_rec.demand_source_type_id      := p_demand_source_type;
Line: 1339

                    l_update_rsv_rec.demand_source_name      := p_demand_source_name;
Line: 1341

                    l_update_rsv_rec.demand_source_header_id       := p_mso_line_id;
Line: 1342

                    l_update_rsv_rec.demand_source_line_id         := p_demand_info.oe_line_id;
Line: 1343

                    l_update_rsv_rec.demand_source_delivery        := NULL;
Line: 1344

                    l_update_rsv_rec.primary_uom_code              := l_primary_uom;
Line: 1345

                    l_update_rsv_rec.secondary_uom_code            := l_secondary_uom;
Line: 1346

                    l_update_rsv_rec.primary_uom_id                := NULL;
Line: 1347

                    l_update_rsv_rec.secondary_uom_id              := NULL;
Line: 1348

                    l_update_rsv_rec.reservation_uom_code          := NULL;
Line: 1349

                    l_update_rsv_rec.reservation_uom_id            := NULL;
Line: 1350

                    l_update_rsv_rec.reservation_quantity          := NULL;
Line: 1351

                    l_update_rsv_rec.primary_reservation_quantity  := l_quantity_to_reserve;
Line: 1352

                    l_update_rsv_rec.secondary_reservation_quantity  := l_sec_quantity_to_reserve;
Line: 1354

                    l_update_rsv_rec.autodetail_group_id           := NULL;
Line: 1355

                    l_update_rsv_rec.external_source_code          := NULL;
Line: 1356

                    l_update_rsv_rec.external_source_line_id       := NULL;
Line: 1357

                    l_update_rsv_rec.supply_source_type_id         := inv_reservation_global.g_source_type_inv;
Line: 1358

                    l_update_rsv_rec.supply_source_header_id       := NULL;
Line: 1359

                    l_update_rsv_rec.supply_source_line_id         := NULL;
Line: 1360

                    l_update_rsv_rec.supply_source_name            := NULL;
Line: 1361

                    l_update_rsv_rec.supply_source_line_detail     := NULL;
Line: 1362

                    l_update_rsv_rec.revision                      := NULL;
Line: 1363

                    l_update_rsv_rec.subinventory_code             := NULL;
Line: 1364

                    l_update_rsv_rec.subinventory_id               := NULL;
Line: 1365

                    l_update_rsv_rec.locator_id                    := NULL;
Line: 1366

                    l_update_rsv_rec.lot_number                    := NULL;
Line: 1367

                    l_update_rsv_rec.lot_number_id                 := NULL;
Line: 1368

                    l_update_rsv_rec.pick_slip_number              := NULL;
Line: 1369

                    l_update_rsv_rec.lpn_id                        := NULL;
Line: 1370

                    l_update_rsv_rec.attribute_category            := NULL;
Line: 1371

                    l_update_rsv_rec.attribute1                    := NULL;
Line: 1372

                    l_update_rsv_rec.attribute2                    := NULL;
Line: 1373

                    l_update_rsv_rec.attribute3                    := NULL;
Line: 1374

                    l_update_rsv_rec.attribute4                    := NULL;
Line: 1375

                    l_update_rsv_rec.attribute5                    := NULL;
Line: 1376

                    l_update_rsv_rec.attribute6                    := NULL;
Line: 1377

                    l_update_rsv_rec.attribute7                    := NULL;
Line: 1378

                    l_update_rsv_rec.attribute8                    := NULL;
Line: 1379

                    l_update_rsv_rec.attribute9                    := NULL;
Line: 1380

                    l_update_rsv_rec.attribute10                   := NULL;
Line: 1381

                    l_update_rsv_rec.attribute11                   := NULL;
Line: 1382

                    l_update_rsv_rec.attribute12                   := NULL;
Line: 1383

                    l_update_rsv_rec.attribute13                   := NULL;
Line: 1384

                    l_update_rsv_rec.attribute14                   := NULL;
Line: 1385

                    l_update_rsv_rec.attribute15                   := NULL;
Line: 1386

                    l_update_rsv_rec.ship_ready_flag               := 2;
Line: 1388

                    l_update_rsv_rec.detailed_quantity             := 0;
Line: 1392

                       l_update_rsv_rec.reservation_uom_code := p_mo_line_rec.uom_code;
Line: 1394

                            IF l_update_rsv_rec.reservation_uom_code = l_primary_uom THEN
                                l_update_rsv_rec.reservation_quantity := l_quantity_to_reserve;
Line: 1397

                                l_update_rsv_rec.reservation_quantity := l_qty_to_detail_unconv;
Line: 1400

                            IF l_update_rsv_rec.reservation_uom_code = l_primary_uom THEN
                                l_update_rsv_rec.reservation_quantity := l_quantity_to_reserve;
Line: 1402

                            ELSIF l_update_rsv_rec.reservation_uom_code = l_secondary_uom THEN
                                l_update_rsv_rec.reservation_quantity := l_sec_quantity_to_reserve;
Line: 1405

                                l_update_rsv_rec.reservation_quantity := inv_convert.inv_um_convert(item_id=> l_update_rsv_rec.inventory_item_id
                                                 , lot_number => l_update_rsv_rec.lot_number
                                                 , organization_id => l_update_rsv_rec.organization_id
                                                 , PRECISION => NULL -- use default precision
                                                 , from_quantity => l_quantity_to_reserve
                                                 , from_unit => l_primary_uom
                                                 , to_unit => l_update_rsv_rec.reservation_uom_code
                                                 , from_name => NULL -- from uom name
                                                 , to_name => NULL -- to uom name
                                                 );
Line: 1416

                                 IF l_update_rsv_rec.reservation_quantity = -99999 THEN
                                    -- conversion failed
                                    fnd_message.set_name('INV', 'CAN-NOT-CONVERT-TO-PRIMARY-UOM');
Line: 1436

                    , p_rsv_rec                    => l_update_rsv_rec
                    , p_serial_number              => l_dummy_sn
                    , x_serial_number              => l_dummy_sn
                    , p_partial_reservation_flag   => fnd_api.g_true
                    , p_force_reservation_flag     => fnd_api.g_false
                    , p_validation_flag            => 'Q'
                    , x_quantity_reserved          => l_qty_succ_reserved
                    , x_reservation_id             => l_org_wide_res_id
                    , p_over_reservation_flag      => 2  -- Bug 5365200 Passing p_over_reservation_flag to allow reservation of demand for overpicking case
                    );
Line: 1530

                        l_rsv_serials.DELETE;
Line: 1675

      SELECT subinventory_code
        INTO l_default_subinventory
        FROM mtl_item_sub_defaults
       WHERE inventory_item_id = p_mo_line_rec.inventory_item_id
         AND organization_id = p_mo_line_rec.organization_id
         AND default_type = 1;
Line: 1697

        SELECT locator_id
          INTO l_default_locator_id
          FROM mtl_item_loc_defaults
         WHERE inventory_item_id = p_mo_line_rec.inventory_item_id
           AND organization_id = p_mo_line_rec.organization_id
           AND subinventory_code = l_default_subinventory
           AND default_type = 1;
Line: 1743

          SELECT revision_sort
            INTO l_revision_rule
            FROM mtl_inv_picking_rules
           WHERE wms_rule_id = l_rule_id;
Line: 1766

          l_base_stmt := 'SELECT mir.revision FROM mtl_item_revisions mir '
                       ||' WHERE mir.organization_id = :org_id '
                       ||'   AND mir.inventory_item_id = :item_id '
                       ||'   AND mir.effectivity_date <= SYSDATE '
                       ||l_order_by;
Line: 1772

          l_stmt := 'SELECT revision FROM ('||l_base_stmt
                  ||' ) where rownum=1 ';
Line: 1815

       print_debug('Calling WSH_Interface.Update_Shipping_Attributes',
          'Inv_Pick_Release_PVT.Process_Unreservable_Items');
Line: 1818

    wsh_interface.update_shipping_attributes(
      p_source_code                => 'INV'
    , p_changed_attributes         => l_shipping_attr
    , x_return_status              => l_return_status
    );
Line: 1824

       print_debug('after update shipping attributes',
          'Inv_Pick_Release_Pvt.Process_Unreservable_Items');
Line: 1830

         print_debug('return error from update shipping attributes',
            'Inv_Pick_Release_Pvt.Process_Unreservable_Items');
Line: 1836

         print_debug('return error from update shipping attributes',
             'Inv_Pick_Release_Pvt.Process_Unreservable_Items');
Line: 1906

       print_debug('update move order line',
           'Inv_pick_release_pvt.process_unreservable_items');
Line: 1922

    UPDATE mtl_txn_request_lines
       SET quantity_detailed = p_mo_line_rec.quantity,
       quantity_delivered = p_mo_line_rec.quantity,
       pick_slip_number = l_pick_slip_number,
       pick_slip_date = sysdate,
       line_status = 5,
       status_date =sysdate                               -- BUG 6932648
     WHERE line_id = p_mo_line_rec.line_id;
Line: 2067

          SELECT *
            INTO l_locator
            FROM mtl_item_locations
           WHERE inventory_location_id = p_to_locator_id
             AND organization_id = p_mo_line_rec.organization_id
             AND subinventory_code = l_to_subinventory;
Line: 2074

             print_debug('after select l_locator', 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
Line: 2077

          SELECT *
            INTO l_org
            FROM mtl_parameters
           WHERE organization_id = p_mo_line_rec.organization_id;
Line: 2083

             print_debug('after select organization', 'Inv_Pick_Release_PVT.Process_Prj_Dynamic_Locator');
Line: 2086

          SELECT *
            INTO l_sub
            FROM mtl_secondary_inventories
           WHERE secondary_inventory_name = p_mo_line_rec.to_subinventory_code
             AND organization_id = p_mo_line_rec.organization_id;
Line: 2165

            UPDATE mtl_txn_request_lines
               SET to_locator_id = l_new_to_locator_id
             WHERE line_id = p_mo_line_rec.line_id;
Line: 2170

          End If; -- update mtrl
Line: 2362

      SELECT transaction_temp_id
           , subinventory_code
           , locator_id
           , transfer_subinventory
           , project_id
           , task_id
           , transfer_to_location
           , revision
        FROM mtl_material_transactions_temp
       WHERE move_order_line_id = p_mo_line_id
         AND pick_slip_number IS NULL;
Line: 2430

      SELECT *
        INTO l_demand_info
        FROM wsh_inv_delivery_details_v
       WHERE move_order_line_id = p_mo_line_rec.line_id
         AND move_order_line_id IS NOT NULL
         AND released_status = 'S';
Line: 2441

       SELECT /*+index (WDD WSH_DELIVERY_DETAILS_N7)*/
             wdd.source_header_id oe_header_id,
             wts.stop_id trip_stop_id,
             wdd.source_line_id oe_line_id,
             wda.delivery_id shipping_delivery_id,
             wdd.customer_id customer_id,
             NULL,   --ra.customer number
             wdd.ship_to_location_id ship_to_location,
             wdd.ship_from_location_id ship_from_location,
             wdd.shipment_priority_code shipment_priority_code,
             NULL, --ol.shipment_number shipment_number,
             wdd.ship_method_code freight_code,
             wdd.move_order_line_id move_order_line_id,
             wdd.released_status,
             wdd.delivery_detail_id
        INTO l_demand_info
            FROM wsh_delivery_details wdd, wsh_delivery_assignments_v wda,
             wsh_new_deliveries wnd, wsh_delivery_legs wlg, wsh_trip_stops wts
       WHERE wnd.delivery_id(+) = wda.delivery_id
         AND wlg.delivery_id(+) = wnd.delivery_id
         AND wts.stop_id(+) = wlg.pick_up_stop_id
         AND NVL(wlg.sequence_number,-1) =
        (SELECT NVL(min(g.sequence_number),-1)
           FROM wsh_delivery_legs g
          WHERE g.delivery_id(+) = wnd.delivery_id )
         AND wdd.delivery_detail_id = wda.delivery_detail_id
         AND wdd.move_order_line_id = p_mo_line_rec.line_id
         AND wdd.move_order_line_Id IS NOT NULL
          --AND nvl(wdd.shipment_direction,'O') in ( 'O' , 'IO')
         AND wdd.released_status = 'S';
Line: 2472

	SELECT /*+index (WDD WSH_DELIVERY_DETAILS_N7)*/
	wdd.source_header_id oe_header_id,
	wdd.source_line_id oe_line_id
	INTO l_demand_info.oe_header_id, l_demand_info.oe_line_id
	FROM wsh_delivery_details wdd
	WHERE wdd.move_order_line_id = p_mo_line_rec.line_id;
Line: 2621

              SELECT document_set_id
                INTO l_report_set_id
                FROM wsh_picking_batches
               WHERE NAME = l_request_number;
Line: 2764

        fnd_msg_pub.delete_msg();
Line: 2794

      SELECT NVL(SUM(primary_quantity), 0)
        ,NVL(sum(transaction_quantity),0)
        ,NVL(sum(secondary_transaction_quantity),0)
        ,COUNT(*)
        INTO l_quantity_detailed
            ,l_quantity_detailed_conv
            ,l_sec_quantity_detailed
            ,l_num_detail_recs
        FROM mtl_material_transactions_temp
       WHERE move_order_line_id = p_mo_line_rec.line_id;
Line: 2937

      UPDATE MTL_TXN_REQUEST_LINES
         SET quantity_detailed = NVL(p_mo_line_rec.quantity_delivered,0),
             secondary_quantity_detailed = NVL(p_mo_line_rec.secondary_quantity_delivered,0),
             txn_source_id = l_mso_header_id,
             txn_source_line_id = l_demand_info.oe_line_id,
             pick_slip_date = sysdate
       WHERE line_id = p_mo_line_rec.line_id;
Line: 2946

      /*update unsuggested qty as already org level rsv already created*/

      IF (l_demand_rsvs_ordered.COUNT > 0  AND l_rsv_qty_available > 0) THEN
        l_index  := l_demand_rsvs_ordered.LAST;
Line: 2964

                print_debug('Delete org level reservation', 'Inv_Pick_Release_PVT.Process_Reservations');
Line: 2966

            inv_reservation_pvt.delete_reservation(
                 p_api_version_number => 1.0
                ,p_init_msg_lst => fnd_api.g_false
                ,x_return_status => l_api_return_status
                ,x_msg_count    => x_msg_count
                ,x_msg_data    => x_msg_data
                ,p_rsv_rec => l_demand_rsvs_ordered(l_index)
                ,p_original_serial_number => l_dummy_sn
                ,p_validation_flag => fnd_api.g_true
            );
Line: 2979

                    print_debug('return error from delete_reservation', 'Inv_Pick_Release_Pvt.Process_Line');
Line: 2984

                    print_debug('return unexpected error from delete_reservation','Inv_Pick_Release_Pvt.Process_Line');
Line: 3020

          inv_quantity_tree_pub.update_quantities(
              p_api_version_number         => 1.0
            , p_init_msg_lst               => fnd_api.g_false
            , x_return_status              => l_api_return_status
            , x_msg_count                  => x_msg_count
            , x_msg_data                   => x_msg_data
            , p_organization_id            => p_mo_line_rec.organization_id
            , p_inventory_item_id          => p_mo_line_rec.inventory_item_id
            , p_tree_mode          => inv_quantity_tree_pub.g_reservation_mode
            , p_is_revision_control        => l_is_revision_control
            , p_is_lot_control             => l_is_lot_control
            , p_is_serial_control          => l_is_serial_control
            , p_demand_source_type_id      => l_demand_source_type
            , p_demand_source_header_id    => l_mso_header_id
            , p_demand_source_line_id      => l_demand_info.oe_line_id
            , p_demand_source_name         => NULL
            , p_revision                   => NULL
            , p_lot_number                 => NULL
            , p_lot_expiration_date        => l_exp_date
            , p_subinventory_code          => NULL
            , p_locator_id                 => NULL
            , p_primary_quantity           => -(l_rsv_qty_available)
            , p_secondary_quantity         => -(l_rsv_qty2_available) -- Bug 7377744
            , p_quantity_type              => inv_quantity_tree_pub.g_qr_same_demand
            , x_qoh                        => l_qty_on_hand
            , x_rqoh                       => l_qty_res_on_hand
            , x_qr                         => l_qty_res
            , x_qs                         => l_qty_sug
            , x_att                        => l_qty_att
            , x_atr                        => l_qty_available_to_reserve


              , p_grade_code                 => p_mo_line_rec.grade_code
              , x_sqoh                       => l_sec_qty_on_hand
              , x_srqoh                      => l_sec_qty_res_on_hand
              , x_sqr                        => l_sec_qty_res
              , x_sqs                        => l_sec_qty_sug
              , x_satt                       => l_sec_qty_att
              , x_satr                       => l_sec_qty_available_to_reserve
          );
Line: 3062

              print_debug('Error from update quantity tree',
             'Inv_Pick_Release_PVT.Process_Line');
Line: 3129

          UPDATE mtl_reservations
             SET primary_reservation_quantity = l_new_prim_rsv_quantity
                ,reservation_quantity = l_new_rsv_quantity
                ,secondary_reservation_quantity = l_new_sec_rsv_quantity -- Bug 6989438
           WHERE reservation_id = l_reservation_id;
Line: 3135

          inv_rsv_synch.for_update(
            p_reservation_id => l_reservation_id
          , x_return_status => l_api_return_status
          , x_msg_count => x_msg_count
          , x_msg_data => x_msg_data);
Line: 3143

              print_debug('Error from inv_rsv_synch.for_update','Inv_Pick_Release_PVT.Process_Reservations');
Line: 3150

              print_debug('Unexp. error from inv_rsv_synch.for_update','Inv_Pick_Release_PVT.Process_Reservations');
Line: 3157

      /*update unsuggested qty as already org level rsv already created*/
    END IF; --num recs = 0
Line: 3175

         SELECT NVL(SUM(ABS(primary_quantity)), 0),
                NVL(SUM(ABS(secondary_transaction_quantity)), 0)    -- Pushkar
           INTO l_reservation_detailed_qty,
                l_rsv_detailed_qty2
           FROM mtl_material_transactions_temp
          WHERE organization_id = p_mo_line_rec.organization_id
            AND reservation_id = l_demand_rsvs_ordered(l_res_ordered_index).reservation_id;
Line: 3271

        UPDATE mtl_reservations
           SET primary_reservation_quantity = l_new_prim_rsv_quantity
              ,reservation_quantity = l_new_rsv_quantity
         WHERE reservation_id = l_demand_rsvs_ordered(l_res_ordered_index).reservation_id;*/
Line: 3282

        inv_reservation_pub.update_reservation(
               p_api_version_number         => 1.0
             , p_init_msg_lst               => fnd_api.g_false
             , x_return_status              => l_api_return_status
             , x_msg_count                  => l_count
             , x_msg_data                   => l_message
             , p_original_rsv_rec           => l_original_rsv_record
             , p_to_rsv_rec                 => l_to_rsv_record
             , p_original_serial_number     => l_dummy_sn
             , p_to_serial_number           => l_dummy_sn
             , p_validation_flag            => fnd_api.g_true
        );
Line: 3297

                print_debug('error in update reservation', 'Inv_Pick_Release_PVT.Process_Reservations');
Line: 3304

        /* inv_rsv_synch.for_update(
              p_reservation_id => l_demand_rsvs_ordered(l_res_ordered_index).reservation_id
            , x_return_status => l_api_return_status
            , x_msg_count => x_msg_count
            , x_msg_data => x_msg_data);
Line: 3312

                print_debug('Error from inv_rsv_synch.for_update','Inv_Pick_Release_PVT.Process_Line');
Line: 3319

                print_debug('Unexp. error from inv_rsv_synch.for_update','Inv_Pick_Release_PVT.Process_Line');
Line: 3353

      UPDATE MTL_TXN_REQUEST_LINES
         SET quantity_detailed = l_quantity_detailed_conv,
             secondary_quantity_detailed = l_sec_quantity_detailed,
             txn_source_id = l_mso_header_id,
             txn_source_line_id = l_demand_info.oe_line_id,
             pick_slip_date = sysdate
       WHERE line_id = p_mo_line_rec.line_id;
Line: 3395

            SELECT NVL(SUM(ABS(primary_quantity)), 0)
                 , NVL(SUM(ABS(secondary_transaction_quantity)), 0)
              INTO l_reservation_detailed_qty
                 , l_rsv_detailed_qty2
              FROM mtl_material_transactions_temp
             WHERE organization_id = p_mo_line_rec.organization_id
               AND reservation_id = l_reservation_id;
Line: 3411

          inv_quantity_tree_pub.update_quantities(
                p_api_version_number         => 1.0
              , p_init_msg_lst               => fnd_api.g_false
              , x_return_status              => l_api_return_status
              , x_msg_count                  => x_msg_count
              , x_msg_data                   => x_msg_data
              , p_organization_id            => p_mo_line_rec.organization_id
              , p_inventory_item_id          => p_mo_line_rec.inventory_item_id
              , p_tree_mode                  => inv_quantity_tree_pub.g_reservation_mode
              , p_is_revision_control        => l_is_revision_control
              , p_is_lot_control             => l_is_lot_control
              , p_is_serial_control          => l_is_serial_control
              , p_demand_source_type_id      => l_demand_source_type
              , p_demand_source_header_id    => l_mso_header_id
              , p_demand_source_line_id      => l_demand_info.oe_line_id
              , p_demand_source_name         => NULL
              , p_revision                   => l_demand_rsvs_ordered(l_res_ordered_index).revision
              , p_lot_number                 => l_demand_rsvs_ordered(l_res_ordered_index).lot_number
              , p_lot_expiration_date        => l_exp_date
              , p_subinventory_code          => l_demand_rsvs_ordered(l_res_ordered_index).subinventory_code
              , p_locator_id                 => l_demand_rsvs_ordered(l_res_ordered_index).locator_id
              , p_primary_quantity           => -(l_reservation_detailed_qty - l_prev_rsv_detailed_qty)
              , p_secondary_quantity         => -(l_rsv_detailed_qty2        - l_prev_rsv_detailed_qty2) /* Bug 7377744 */
              , p_lpn_id                     => l_demand_rsvs_ordered(l_res_ordered_index).lpn_id /* Bug 7229711 */
              , p_quantity_type              => inv_quantity_tree_pub.g_qr_same_demand
              , x_qoh                        => l_qty_on_hand
              , x_rqoh                       => l_qty_res_on_hand
              , x_qr                         => l_qty_res
              , x_qs                         => l_qty_sug
              , x_att                        => l_qty_att
              , x_atr                        => l_qty_available_to_reserve
   /* Added following secondary qty related section for Bug 7377744 */
              , p_grade_code                 => p_mo_line_rec.grade_code
              , x_sqoh                       => l_sec_qty_on_hand
              , x_srqoh                      => l_sec_qty_res_on_hand
              , x_sqr                        => l_sec_qty_res
              , x_sqs                        => l_sec_qty_sug
              , x_satt                       => l_sec_qty_att
              , x_satr                       => l_sec_qty_available_to_reserve
            );
Line: 3453

              print_debug('Error from update quantity tree', 'Inv_Pick_Release_PVT.Process_Line');
Line: 3458

             print_debug('update reservation with quantity_detailed', 'Inv_Pick_Release_PVT.Process_Line');
Line: 3532

          UPDATE mtl_reservations
             SET reservation_quantity = greatest(reservation_quantity, l_rsv_detailed_qty_conv)  -- Bug Fix 5624514
              ,  primary_reservation_quantity = greatest(primary_reservation_quantity, l_reservation_detailed_qty)
	      ,  secondary_reservation_quantity = greatest(secondary_reservation_quantity, l_rsv_detailed_qty2)
              ,  detailed_quantity = l_reservation_detailed_qty
              ,  secondary_detailed_quantity = l_rsv_detailed_qty2
           WHERE reservation_id = l_reservation_id;
Line: 3668

            UPDATE mtl_material_transactions_temp
               SET pick_slip_number = l_pick_slip_number
                 , transaction_source_id = l_mso_header_id
                 , trx_source_line_id = l_demand_info.oe_line_id
                 , demand_source_header_id = l_mso_header_id
                 , demand_source_line = l_demand_info.oe_line_id
                 , transfer_to_location = l_dest_locator_id
               WHERE transaction_temp_id = l_mold_temp_id;
Line: 3704

                  SELECT document_set_id
                    INTO l_report_set_id
                    FROM wsh_picking_batches
                   WHERE NAME = l_request_number;
Line: 3755

    select quantity_detailed
         , secondary_quantity_detailed
      into l_quantity_detailed
         , l_sec_quantity_detailed
      from mtl_txn_request_lines
     WHERE line_id = p_mo_line_rec.line_id;
Line: 3762

    print_debug('2nd after select sec Quantity_detailed is '|| l_sec_quantity_detailed, 'Inv_Pick_Release_PVT.Process_Line');