DBA Data[Home] [Help]

APPS.WMS_CROSS_DOCK_PVT SQL Statements

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

Line: 21

   select to_char(sysdate,'MM/DD/YYYY HH:MM:SS') INTO l_ts from dual;
Line: 37

procedure insert_xdock_criteria(  p_move_order_line_id IN NUMBER
                                , p_crossdock_criterion_id   IN NUMBER
				, x_return_status     OUT nocopy VARCHAR2
				, x_msg_data          OUT nocopy VARCHAR2
				, x_msg_count         OUT nocopy NUMBER
) IS
BEGIN
l_mol_criteria_tb(  p_move_order_line_id) := p_crossdock_criterion_id ;
Line: 45

END insert_xdock_criteria;
Line: 48

/* Local procedure to insert record in MTL_SERIAL_NUMBERS_TEMP
input :
  lpn_id, serial_numbers(pl/sql table),inventory_item_id,transaction_temp_id

output : Success or Failur

This will also update MSN with transaction_temp_id as group mark id
*/
PROCEDURE insert_xdock_msnt
  (
    p_org_id                   IN NUMBER,
    p_item_id                  IN NUMBER,
    p_transaction_temp_id      IN NUMBER ,
    p_serial_number_table      IN ser_num_tab ,
    x_return_status            OUT   NOCOPY VARCHAR2,
    x_msg_count                OUT   NOCOPY NUMBER,
    x_msg_data                 OUT   NOCOPY VARCHAR2
)
IS
 l_user_id            NUMBER;
Line: 76

       mydebug('insert_xdock_msnt:Entered. ' );
Line: 77

       mydebug('insert_xdock_msnt:p_org_id:'||p_org_id  );
Line: 78

       mydebug('insert_xdock_msnt:p_item_id:'||p_item_id  );
Line: 79

       mydebug('insert_xdock_msnt:p_user_id:'||l_user_id  );
Line: 80

       mydebug('insert_xdock_msnt:p_transaction_temp_id:'||p_transaction_temp_id  );
Line: 81

       mydebug('insert_xdock_msnt:p_serial_number_table.count():' || p_serial_number_table.count);
Line: 85

     INSERT  INTO mtl_serial_numbers_temp
    (
      transaction_temp_id       ,
      last_update_date          ,
      last_updated_by           ,
      creation_date             ,
      created_by                ,
      fm_serial_number          ,
      to_serial_number          ,
      serial_prefix             ,
      vendor_serial_number      ,
      vendor_lot_number         ,
      parent_serial_number      ,
      origination_date          ,
      end_item_unit_number      ,
      territory_code            ,
      time_since_new            ,
      cycles_since_new          ,
      time_since_overhaul       ,
      cycles_since_overhaul     ,
      time_since_repair         ,
      cycles_since_repair       ,
      time_since_visit          ,
      cycles_since_visit        ,
      time_since_mark           ,
      cycles_since_mark         ,
      number_of_repairs         ,
      serial_attribute_category ,
      c_attribute1              ,
      c_attribute2              ,
      c_attribute3              ,
      c_attribute4              ,
      c_attribute5              ,
      c_attribute6              ,
      c_attribute7              ,
      c_attribute8              ,
      c_attribute9              ,
      c_attribute10             ,
      c_attribute11             ,
      c_attribute12             ,
      c_attribute13             ,
      c_attribute14             ,
      c_attribute15             ,
      c_attribute16             ,
      c_attribute17             ,
      c_attribute18             ,
      c_attribute19             ,
      c_attribute20             ,
      d_attribute1              ,
      d_attribute2              ,
      d_attribute3              ,
      d_attribute4              ,
      d_attribute5              ,
      d_attribute6              ,
      d_attribute7              ,
      d_attribute8              ,
      d_attribute9              ,
      d_attribute10             ,
      n_attribute1              ,
      n_attribute2              ,
      n_attribute3              ,
      n_attribute4              ,
      n_attribute5              ,
      n_attribute6              ,
      n_attribute7              ,
      n_attribute8              ,
      n_attribute9              ,
      n_attribute10
    )
    (
    SELECT
          p_transaction_temp_id      ,
          sysdate                    ,
          l_user_id                  ,
          sysdate                    ,
          l_user_id                  ,
          serial_number              ,
          serial_number              ,
          1                          ,
          vendor_serial_number       ,
          vendor_lot_number          ,
          parent_serial_number       ,
          origination_date           ,
          end_item_unit_number       ,
          territory_code             ,
          time_since_new             ,
          cycles_since_new           ,
          time_since_overhaul        ,
          cycles_since_overhaul      ,
          time_since_repair              ,
          cycles_since_repair            ,
          time_since_visit               ,
          cycles_since_visit             ,
          time_since_mark                ,
          cycles_since_mark              ,
          number_of_repairs              ,
          serial_attribute_category      ,
          c_attribute1                   ,
          c_attribute2                   ,
          c_attribute3                   ,
          c_attribute4                   ,
          c_attribute5                   ,
          c_attribute6                   ,
          c_attribute7                   ,
          c_attribute8                   ,
          c_attribute9                   ,
          c_attribute10                  ,
          c_attribute11                  ,
          c_attribute12                  ,
          c_attribute13                  ,
          c_attribute14                  ,
          c_attribute15                  ,
          c_attribute16                  ,
          c_attribute17                  ,
          c_attribute18                  ,
          c_attribute19                  ,
          c_attribute20                  ,
          d_attribute1                   ,
          d_attribute2                   ,
          d_attribute3                   ,
          d_attribute4                   ,
          d_attribute5                   ,
          d_attribute6                   ,
          d_attribute7                   ,
          d_attribute8                   ,
          d_attribute9                   ,
          d_attribute10                  ,
          n_attribute1                   ,
          n_attribute2                   ,
          n_attribute3                   ,
          n_attribute4                   ,
          n_attribute5                   ,
          n_attribute6                   ,
          n_attribute7                   ,
          n_attribute8                   ,
          n_attribute9                   ,
          n_attribute10
          FROM mtl_serial_numbers msn
          WHERE     msn.inventory_item_id = p_item_id
          AND       msn.current_organization_id  = p_org_id
          AND       msn.serial_number = p_serial_number_table(i)
    );
Line: 230

       mydebug('insert_xdock_msnt:Done with inserting MSNTs. ' );
Line: 235

        UPDATE mtl_serial_numbers
         SET group_mark_id    = p_transaction_temp_id,
             last_update_date = sysdate,
             last_updated_by  = l_user_id
        WHERE     inventory_item_id = p_item_id
        AND       current_organization_id  = p_org_id
        AND       serial_number = p_serial_number_table (i);
Line: 244

       mydebug('insert_xdock_msnt:Done with updating MSN. ' );
Line: 245

       mydebug('insert_xdock_msnt:Exiting..');
Line: 252

         mydebug('insert_xdock_msnt:EXCEPTION !!!. ' );
Line: 254

END insert_xdock_msnt;
Line: 391

	  SELECT mtrl.line_id,
	    mtrl.inventory_item_id,
	    msi.item_type,
	    mtrl.project_id,
	    mtrl.task_id,
	    mtrl.uom_code,
	    muom.uom_class,
	    mtrl.last_update_login,
	    mtrl.reference,
	    mtrl.reference_id,
	    mtrl.transaction_source_type_id
	    FROM mtl_txn_request_lines mtrl,
	    mtl_system_items msi,
	    mtl_units_of_measure muom
	    WHERE mtrl.lpn_id  = l_lpn_id   -- the MTRL is within the LPN
	    AND (mtrl.line_id = p_move_order_line_id OR p_move_order_line_id IS NULL)
	      AND mtrl.backorder_delivery_detail_id IS NULL  -- this LPN has not crossdocked yet
		AND (mtrl.quantity_detailed = 0 OR mtrl.quantity_detailed IS NULL) -- no MMTT is created for this LPN
		  AND (inspection_status = 2 OR inspection_status IS NULL)
		    AND wms_process_flag = 1
		    AND msi.inventory_item_id = mtrl.inventory_item_id
		    AND msi.organization_id = mtrl.organization_id
		    AND mtrl.uom_code = muom.uom_code;
Line: 417

	 SELECT line_id,
	   inventory_item_id,
	   backorder_delivery_detail_id,
	   crossdock_type,
	   to_subinventory_code,
	   to_locator_id,
	   wip_supply_type,
	   wip_entity_id,
	   operation_seq_num,
	   repetitive_schedule_id,
	   transaction_source_type_id
	   FROM
	   mtl_txn_request_lines mtrl
	   WHERE mtrl.lpn_id  = l_lpn_id   -- the MTRL is within the LPN
	   AND mtrl.line_id = NVL(p_move_order_line_id, mtrl.line_id)
	   AND mtrl.backorder_delivery_detail_id IS NOT NULL  -- also including lines planned crossdocked
	     AND (mtrl.quantity_detailed = 0 OR mtrl.quantity_detailed IS NULL) -- no MMTT is created for this LPN
	       AND NVL(inspection_status, 2) = 2
	       AND wms_process_flag = 1

         --BUG 5194761: If case of Item Load, p_move_order_line will be passed
         --and we need to pick up the MOL that may be split by the crossdock API.
         --So make use of the mtrl.reference_detail_id
         UNION
	 SELECT line_id,
	   inventory_item_id,
	   backorder_delivery_detail_id,
	   crossdock_type,
	   to_subinventory_code,
	   to_locator_id,
	   wip_supply_type,
	   wip_entity_id,
	   operation_seq_num,
	   repetitive_schedule_id,
	   transaction_source_type_id
	   FROM
	   mtl_txn_request_lines mtrl
	   WHERE mtrl.lpn_id  = l_lpn_id   -- the MTRL is within the LPN
	   AND p_move_order_line_id IS NOT NULL
           AND mtrl.reference_detail_id = p_move_order_line_id
	   AND mtrl.backorder_delivery_detail_id IS NOT NULL  -- also including lines planned crossdocked
	     AND (mtrl.quantity_detailed = 0 OR mtrl.quantity_detailed IS NULL) -- no MMTT is created for this LPN
	       AND NVL(inspection_status, 2) = 2
	       AND wms_process_flag = 1;
Line: 480

   l_mol_criteria_tb.DELETE;  --9695544
Line: 495

      SELECT Nvl(mp.crossdock_flag, 2),
	mp.default_crossdock_criteria_id,
	mp.default_crossdock_subinventory, -- default wip crossdocking sub
	mp.default_crossdock_locator_id, -- default wip crossdocking loc
	wsp.default_stage_subinventory,
	wsp.default_stage_locator_id
	INTO l_xdock_flag,
	l_default_xdock_criteria_id,
	l_default_xdock_sub, -- default wip crossdocking sub
	l_default_xdock_loc_id,-- default wip crossdocking loc
	l_default_ship_staging_sub,
	l_default_ship_staging_loc_id
	FROM mtl_parameters mp, wsh_shipping_parameters wsp
	WHERE mp.organization_id = wsp.organization_id (+)
	AND mp.organization_id = l_org_id;
Line: 555

	 SELECT location_id
	   INTO l_location_id
	   FROM rcv_supply
	   WHERE lpn_id = p_lpn
	   AND ROWNUM<2;
Line: 805

	       SELECT nvl(nvl(supply_subinventory, mp.default_crossdock_subinventory), wp.default_pull_supply_subinv),
		 nvl(nvl(supply_locator_id, mp.default_crossdock_locator_id), wp.default_pull_supply_locator_id)
		 INTO l_to_sub_code,
		 l_to_loc_id
		 FROM wip_requirement_operations wro,
		 mtl_txn_request_lines mtrl,
		 mtl_parameters mp,
		 wip_parameters wp
		 WHERE wro.organization_id = l_org_id
		 AND mp.organization_id = l_org_id
		 AND wp.organization_id = l_org_id
		 AND mtrl.line_id = l_line_id
		 AND wro.inventory_item_id = mtrl.inventory_item_id
		 AND wro.wip_entity_id  = mtrl.wip_entity_id
		 AND nvl(wro.operation_seq_num, -1)  = Nvl(mtrl.operation_seq_num, nvl(wro.operation_seq_num, -1))
		 AND nvl(wro.repetitive_schedule_id, -1)  = Nvl(mtrl.repetitive_schedule_id, nvl(wro.repetitive_schedule_id, -1));
Line: 838

		  SELECT default_pull_supply_subinv,
		    default_pull_supply_locator_id
		    INTO l_to_sub_code,
		    l_to_loc_id
		    FROM wip_parameters
		    WHERE organization_id = l_org_id;
Line: 865

             SELECT lpn_context
               INTO l_lpn_context
               FROM wms_license_plate_numbers
              WHERE lpn_id = l_lpn_id;
Line: 898

		SELECT delivery_id
		  INTO l_delivery_id
		  FROM wsh_delivery_assignments_v
		  WHERE delivery_detail_id = l_backorder_delivery_detail_id;
Line: 937

			 SELECT 2
			   , inv_salesorder.get_salesorder_for_oeheader(wdd.source_header_id)
			   , wdd.source_line_id
			   INTO l_source_type_id, l_source_header_id, l_source_line_id
			   FROM wsh_delivery_details wdd
			   WHERE wdd.delivery_detail_id = l_backorder_delivery_detail_id;
Line: 998

		     SELECT crossdock_criteria_id,
		       demand_ship_date
		       INTO l_xdock_criterion_id,
		       l_expected_delivery_time
		       FROM mtl_reservations
		       WHERE demand_source_line_detail = l_backorder_delivery_detail_id
		       AND supply_source_type_id  = inv_reservation_global.g_source_type_rcv
		       AND organization_id = l_org_id
		       AND inventory_item_id = l_inventory_item_id;
Line: 1344

	    UPDATE mtl_txn_request_lines
	      SET to_subinventory_code = l_to_sub_code,
	      to_locator_id = l_to_loc_id
	      WHERE line_id = l_line_id;
Line: 1351

	    UPDATE mtl_txn_request_lines
	      SET to_subinventory_code = Nvl(l_to_sub_code, l_default_ship_staging_sub),
	      to_locator_id = Nvl(l_to_loc_id, l_default_ship_staging_loc_id)
	      WHERE line_id = l_line_id;
Line: 1493

     l_update_rsv_rec			INV_Reservation_GLOBAL.MTL_RESERVATION_REC_TYPE;
Line: 1554

	SELECT serial_number
	  FROM mtl_serial_numbers
	  WHERE lpn_id = l_lpn_id;
Line: 1559

	SELECT fm_serial_number
	  FROM  mtl_serial_numbers_temp
	  WHERE transaction_temp_id=l_serial_temp_id ;
Line: 1564

    SELECT lpn_id, license_plate_number, parent_lpn_id, organization_id, subinventory_code, locator_id,
           tare_weight, tare_weight_uom_code, gross_weight, gross_weight_uom_code,
           container_volume, container_volume_uom, content_volume, content_volume_uom_code
    FROM   wms_license_plate_numbers
    START WITH lpn_id = p_innermost_lpn_id
    CONNECT BY lpn_id = PRIOR parent_lpn_id;
Line: 1594

      SELECT
	l.line_id, l.backorder_delivery_detail_id,l.inventory_item_id,Nvl(crossdock_type,1)
	,l.transaction_source_type_id,l.txn_source_id
	INTO l_mo_line_id,l_del_id,l_item_id,l_crossdock_type,l_transaction_source_type_id,l_txn_supply_source_id
	FROM mtl_txn_request_lines l, mtl_material_transactions_temp t, wsh_delivery_details_ob_grp_v wdd
	WHERE t.transaction_temp_id=l_temp_id
	AND  l.backorder_delivery_detail_id = wdd.delivery_detail_id
	AND t.move_order_line_id=l.line_id
	AND exists (
		    select 1 from oe_order_lines_all oel
		    where oel.line_id = wdd.source_line_id
		    and nvl(oel.project_id,-9999) = nvl(l.project_id,-9999)
		    and nvl(oel.task_id,-9999) = nvl(l.task_id,-9999)
		    );
Line: 1612

	    SELECT
	      l.line_id, l.backorder_delivery_detail_id,l.inventory_item_id,Nvl(crossdock_type,1)
	      ,l.transaction_source_type_id,l.txn_source_id
	      INTO l_mo_line_id,l_del_id,l_item_id,l_crossdock_type,l_transaction_source_type_id,l_txn_supply_source_id
	      FROM mtl_txn_request_lines l, mtl_material_transactions_temp t
	      WHERE t.transaction_temp_id=l_temp_id
	      AND t.move_order_line_id=l.line_id;
Line: 1663

       SELECT  t.primary_quantity,t.inventory_item_id,t.subinventory_code,
	 t.locator_id,t.revision,t.transaction_type_id,t.transfer_lpn_id,
	 t.content_lpn_id,i.primary_uom_code,i.lot_control_code,
	 i.serial_number_control_code
	 INTO  l_prim_qty ,l_item_id,l_sub,
	 l_loc,l_rev,l_transaction_type_id,
	 l_transfer_lpn_id,l_cnt_lpn_id,l_prim_uom
	 ,l_lot_control_code, l_serial_control_code
	 FROM mtl_material_transactions_temp t,
	 mtl_system_items i
	 WHERE t.transaction_temp_id=l_temp_id
	 AND t.organization_id=l_org_id
	 AND t.organization_id =i.organization_id
	 AND t.inventory_item_id=i.inventory_item_id;
Line: 1688

	  SELECT lot_number,serial_transaction_temp_id INTO l_lot,
	    l_serial_temp_id
	    FROM  mtl_transaction_lots_temp
	    WHERE (transaction_temp_id in (select TRANSACTION_TEMP_ID from mtl_material_transactions_temp where PARENT_LINE_ID=l_temp_id)
	    or transaction_temp_id = l_temp_id ) -- 11701595
	    and rownum=1;  -- Modified for Bug#8489892
Line: 1719

	 SELECT * INTO l_demand_info
	   from wsh_inv_delivery_details_v
	   WHERE delivery_detail_id=l_del_id;
Line: 1739

	 select Nvl(order_source_id,1)
	   into   l_order_source_id
	   from oe_order_lines_all
	   where line_id = l_demand_info.oe_line_id;
Line: 1773

	       SELECT Nvl(po_header_id, -1)
		 INTO l_query_rsv_rec.supply_source_header_id
		 FROM rcv_transactions
		 -- patchset j changes
		 WHERE transaction_id = l_txn_supply_source_id;
Line: 1819

	       l_update_rsv_rec := l_reservation_tbl(i);
Line: 1820

	       l_update_rsv_rec.demand_source_delivery	:= NULL;
Line: 1821

	       l_update_rsv_rec.primary_uom_code             := l_prim_uom;
Line: 1822

	       l_update_rsv_rec.primary_uom_id               := NULL;
Line: 1823

	       l_update_rsv_rec.reservation_uom_code         := NULL;
Line: 1824

	       l_update_rsv_rec.reservation_uom_id           := NULL;
Line: 1825

	       l_update_rsv_rec.reservation_quantity         := NULL;
Line: 1829

		  l_update_rsv_rec.primary_reservation_quantity :=
		    l_reservation_tbl(i).primary_reservation_quantity;
Line: 1834

		  l_update_rsv_rec.primary_reservation_quantity :=
		    l_primary_temp_qty;
Line: 1839

	       l_update_rsv_rec.supply_source_type_id := INV_Reservation_GLOBAL.g_source_type_inv;
Line: 1840

	       l_update_rsv_rec.supply_source_header_id      := NULL;
Line: 1841

	       l_update_rsv_rec.supply_source_line_id        := NULL;
Line: 1842

	       l_update_rsv_rec.supply_source_name           := NULL;
Line: 1843

	       l_update_rsv_rec.supply_source_line_detail    := NULL;
Line: 1845

	       l_update_rsv_rec.subinventory_code            := l_sub;
Line: 1846

	       l_update_rsv_rec.subinventory_id              := NULL;
Line: 1847

	       l_update_rsv_rec.locator_id                   := l_loc;
Line: 1850

 	       l_update_rsv_rec.lot_number := l_lot; -- Bug 7712653
Line: 1854

	       l_update_rsv_rec.lpn_id                       := l_transfer_lpn_id;
Line: 1864

		  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,
		  x_to_reservation_id      => l_org_wide_res_id);
Line: 1887

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

	    l_update_rsv_rec.requirement_date 		:= Sysdate;
Line: 1889

	    l_update_rsv_rec.organization_id 		:= l_org_id;
Line: 1890

	    l_update_rsv_rec.inventory_item_id 		:= l_item_id;
Line: 1893

	       l_update_rsv_rec.demand_source_type_id     :=
		 INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_INTERNAL_ORD; -- Internal Order
Line: 1896

	       l_update_rsv_rec.demand_source_type_id   :=
		 INV_RESERVATION_GLOBAL.G_SOURCE_TYPE_OE; -- Order Entry
Line: 1900

	    --l_update_rsv_rec.demand_source_type_id 	:= inv_globals.G_SourceType_SalesOrder;
Line: 1902

	    l_update_rsv_rec.demand_source_name 		:= NULL;
Line: 1903

	    l_update_rsv_rec.demand_source_header_id 	:= l_mso_header_id;
Line: 1904

	    l_update_rsv_rec.demand_source_line_id 	:= l_demand_info.oe_line_id;
Line: 1905

	    l_update_rsv_rec.demand_source_delivery	:= NULL;
Line: 1906

	    l_update_rsv_rec.primary_uom_code             := l_prim_uom;
Line: 1907

	    l_update_rsv_rec.primary_uom_id               := NULL;
Line: 1908

	    l_update_rsv_rec.reservation_uom_code         := NULL;
Line: 1909

	    l_update_rsv_rec.reservation_uom_id           := NULL;
Line: 1910

	    l_update_rsv_rec.reservation_quantity         := NULL;
Line: 1911

	    l_update_rsv_rec.primary_reservation_quantity := l_prim_qty;
Line: 1912

	    l_update_rsv_rec.autodetail_group_id          := NULL;
Line: 1913

	    l_update_rsv_rec.external_source_code         := NULL;
Line: 1914

	    l_update_rsv_rec.external_source_line_id      := NULL;
Line: 1915

	    l_update_rsv_rec.supply_source_type_id 	:=
	      INV_Reservation_GLOBAL.g_source_type_inv;
Line: 1917

	    l_update_rsv_rec.supply_source_header_id      := NULL;
Line: 1918

	    l_update_rsv_rec.supply_source_line_id        := NULL;
Line: 1919

	    l_update_rsv_rec.supply_source_name           := NULL;
Line: 1920

	    l_update_rsv_rec.supply_source_line_detail    := NULL;
Line: 1922

	    l_update_rsv_rec.revision                     := l_rev;
Line: 1923

	    l_update_rsv_rec.subinventory_code            := l_sub;
Line: 1924

	    l_update_rsv_rec.subinventory_id              := NULL;
Line: 1925

	    l_update_rsv_rec.locator_id                   := l_loc;
Line: 1926

	    l_update_rsv_rec.lot_number                   := l_lot;
Line: 1927

	    l_update_rsv_rec.lot_number_id                := NULL;
Line: 1928

	    l_update_rsv_rec.pick_slip_number             := NULL;
Line: 1931

	    l_update_rsv_rec.lpn_id                       := l_transfer_lpn_id;
Line: 1932

	    l_update_rsv_rec.attribute_category           := NULL;
Line: 1933

	    l_update_rsv_rec.attribute1                   := NULL;
Line: 1934

	    l_update_rsv_rec.attribute2                   := NULL;
Line: 1935

	    l_update_rsv_rec.attribute3                   := NULL;
Line: 1936

	    l_update_rsv_rec.attribute4                   := NULL;
Line: 1937

	    l_update_rsv_rec.attribute5                   := NULL;
Line: 1938

	    l_update_rsv_rec.attribute6                   := NULL;
Line: 1939

	    l_update_rsv_rec.attribute7                   := NULL;
Line: 1940

	    l_update_rsv_rec.attribute8                   := NULL;
Line: 1941

	    l_update_rsv_rec.attribute9                   := NULL;
Line: 1942

	    l_update_rsv_rec.attribute10                  := NULL;
Line: 1943

	    l_update_rsv_rec.attribute11                  := NULL;
Line: 1944

	    l_update_rsv_rec.attribute12                  := NULL;
Line: 1945

	    l_update_rsv_rec.attribute13                  := NULL;
Line: 1946

	    l_update_rsv_rec.attribute14                  := NULL;
Line: 1947

	    l_update_rsv_rec.attribute15                  := NULL;
Line: 1948

	    l_update_rsv_rec.ship_ready_flag 		:= NULL;
Line: 1949

	    l_update_rsv_rec.detailed_quantity 		:= 0;
Line: 1962

	       , 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           => fnd_api.g_true
	       , x_quantity_reserved         => l_qty_succ_reserved
	       , x_reservation_id            => l_org_wide_res_id
	       );
Line: 2017

	 -- staged. Am calling an API to update the reservation thusly..

	 IF (l_debug = 1) THEN
	    mydebug('Upd Reservation as having been staged');
Line: 2022

	    mydebug('Calling API to update rsv as staged...');
Line: 2024

	 inv_staged_reservation_util.update_staged_flag
	   ( x_return_status  =>l_return_status,
	     x_msg_count =>l_msg_cnt,
	     x_msg_data  =>l_msg_data,
	     p_reservation_id  =>l_org_wide_res_id,
	     p_staged_flag =>'Y');
Line: 2046

          mydebug('After calling API to update rsv as staged');
Line: 2055

       select  oe_header_id, oe_line_id
	 into  l_source_header_id, l_source_line_id
	 from wsh_inv_delivery_details_v
	 WHERE delivery_detail_id=l_del_id;
Line: 2061

       SELECT requested_quantity INTO l_wdd_req_qty
       FROM Wsh_delivery_details
       WHERE delivery_detail_id=l_del_id;
Line: 2103

             /*9816695, we will insert msnt , update MSN and update shipping with these serials . */
	     OPEN msn_serial_csr (l_transfer_lpn_id);
Line: 2111

             SELECT mtl_material_transactions_s.NEXTVAL INTO l_new_txn_id FROM DUAL;
Line: 2117

             insert_xdock_msnt
		  (
		    p_org_id                 => p_org_id,
		    p_item_id                => l_item_id,
		    p_transaction_temp_id    => l_new_txn_id,
		    p_serial_number_table    => l_ser_num_tab,
		    x_return_status          => l_return_status,
		    x_msg_count              => x_msg_count,
		    x_msg_data               => x_msg_data
		);
Line: 2148

              WSH_INTERFACE.Update_Shipping_Attributes
		  (p_source_code               => 'INV',
		   p_changed_attributes        => l_shipping_attr,
		   x_return_status             => l_return_status
		   );
Line: 2154

              IF (l_debug = 1) THEN mydebug('after update shipping attributes'); END IF;
Line: 2180

              SELECT mtl_material_transactions_s.NEXTVAL INTO l_new_txn_id FROM DUAL;
Line: 2189

	      insert_xdock_msnt
	    		  (
	    		    p_org_id                 => p_org_id,
	    		    p_item_id                => l_item_id,
	    		    p_transaction_temp_id    => l_new_txn_id,
	    		    p_serial_number_table    => l_ser_num_tab,
	    		    x_return_status          => l_return_status,
	    		    x_msg_count              => x_msg_count,
	    		    x_msg_data               => x_msg_data
	    		);
Line: 2220

		WSH_INTERFACE.Update_Shipping_Attributes
		  (p_source_code               => 'INV',
		   p_changed_attributes        => l_shipping_attr,
		   x_return_status             => l_return_status
		   );
Line: 2228

   		mydebug('after update shipping attributes');
Line: 2258

                    /*9816695, we will insert msnt , update MSN and update shipping with these serials. */
                   OPEN msn_serial_csr (l_transfer_lpn_id);
Line: 2266

                   SELECT mtl_material_transactions_s.NEXTVAL INTO l_new_txn_id FROM DUAL;
Line: 2271

                   insert_xdock_msnt
                  (
                    p_org_id                 => p_org_id,
                    p_item_id                => l_item_id,
                    p_transaction_temp_id    => l_new_txn_id,
                    p_serial_number_table    => l_ser_num_tab,
                    x_return_status          => l_return_status,
                    x_msg_count              => x_msg_count,
                    x_msg_data               => x_msg_data
                   );
Line: 2303

                   WSH_INTERFACE.Update_Shipping_Attributes
                        (p_source_code               => 'INV',
                         p_changed_attributes        => l_shipping_attr,
                         x_return_status             => l_return_status
                         );
Line: 2323

   		      mydebug('after update shipping attributes');
Line: 2340

                   SELECT mtl_material_transactions_s.NEXTVAL INTO l_new_txn_id FROM DUAL;
Line: 2345

                   insert_xdock_msnt
                  (
                    p_org_id                 => p_org_id,
                    p_item_id                => l_item_id,
                    p_transaction_temp_id    => l_new_txn_id,
                    p_serial_number_table    => l_ser_num_tab,
                    x_return_status          => l_return_status,
                    x_msg_count              => x_msg_count,
                    x_msg_data               => x_msg_data
                   );
Line: 2376

                  WSH_INTERFACE.Update_Shipping_Attributes
			(p_source_code               => 'INV',
			 p_changed_attributes        => l_shipping_attr,
			 x_return_status             => l_return_status
			 );
Line: 2396

   		      mydebug('after update shipping attributes');
Line: 2416

   		      mydebug('about to call update shipping attributes');
Line: 2423

		      WSH_INTERFACE.Update_Shipping_Attributes
			(p_source_code               => 'INV',
			 p_changed_attributes        => l_shipping_attr,
			 x_return_status             => l_return_status
			 );
Line: 2472

   		      mydebug('after update shipping attributes');
Line: 2483

	    SELECT delivery_detail_id INTO l_lpn_del_detail_id
	      FROM wsh_delivery_details_ob_grp_v
	      WHERE lpn_id=l_transfer_lpn_id
	      AND ROWNUM=1;
Line: 2495

   	 mydebug('Update LPN context to picked');
Line: 2531

	 	       SELECT 1 INTO l_ret
	 	       FROM   wsh_delivery_details
	 	       WHERE  lpn_id = parent_lpn_rec.lpn_id;
Line: 2588

                  mydebug('Done with call to WSH Create_Update_Containers');
Line: 2685

      mydebug('Before calling update shipping');
Line: 2688

   WSH_INTERFACE.Update_Shipping_Attributes
     (p_source_code               => 'INV',
      p_changed_attributes        => l_shipping_attr,
      x_return_status             => l_return_status
      );
Line: 2760

      SELECT status
	INTO l_wdt_status
	FROM wms_dispatched_tasks
	WHERE transaction_temp_id = p_transaction_temp_id
	AND   task_type = wms_globals.g_wms_task_type_putaway;
Line: 2777

   UPDATE mtl_txn_request_lines
     SET backorder_delivery_detail_id = NULL
     , crossdock_type = 1
     , quantity_detailed = (quantity - Nvl(quantity_delivered,0))
     WHERE line_id = p_move_order_line_id;
Line: 2784

   INV_TRX_UTIL_PUB.Delete_transaction
     (x_return_status       => x_return_status,
      x_msg_data            => x_msg_data,
      x_msg_count           => x_msg_count,
      p_transaction_temp_id => p_transaction_temp_id,
      p_update_parent       => FALSE);
Line: 2823

   SELECT mmtt.transaction_source_type_id
     , mmtt.move_order_line_id
     , mtrl.backorder_delivery_detail_id
     INTO l_txn_src_type_id
     , l_move_order_line_id
     , l_backorder_delivery_detail_id
     FROM mtl_material_transactions_temp mmtt
     , mtl_txn_request_lines mtrl
     , mtl_txn_request_headers mtrh
     WHERE mmtt.transaction_temp_id = p_transaction_temp_id
     AND mmtt.move_order_line_id = mtrl.line_id
     AND mtrh.header_id = mtrl.header_id
     AND mtrh.move_order_type = 6
     AND mtrl.line_status = 7;