DBA Data[Home] [Help]

APPS.WMS_ITEM_LOAD SQL Statements

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

Line: 150

      SELECT SUM(Decode(uom_code,
			p_uom_code,
			quantity,
			inv_convert.inv_um_convert (p_inventory_item_id,
						    5,
						    quantity,
						    uom_code,
						    p_uom_code,
						    NULL,
						    NULL
						    )
			))
	INTO x_total_qty
	FROM wms_lpn_contents
	WHERE inventory_item_id = p_inventory_item_id
	AND organization_id = p_organization_id
	AND parent_lpn_id = p_lpn_id
	AND Nvl(revision,'#$%') = Nvl(p_revision,'#$%');
Line: 424

	SELECT lpn_content_id
	  FROM wms_lpn_contents
	  WHERE parent_lpn_id = p_lpn_id
	  AND inventory_item_id = p_inventory_item_id
	  AND organization_id = p_organization_id
	  AND NVL(revision, '###') = NVL(p_revision, '###')
	  AND NVL(lot_number, '###') = NVL(p_lot_number, '###')
	  FOR UPDATE NOWAIT;
Line: 469

	SELECT mtrl.line_id,
	  mtrl.quantity - NVL(mtrl.quantity_delivered, 0),
     mtrl.uom_code,
     --laks
	  mtrl.secondary_quantity - NVL(mtrl.secondary_quantity_delivered, 0),
     mtrl.secondary_uom_code
	  FROM mtl_txn_request_lines mtrl, mtl_txn_request_headers mtrh
	  WHERE mtrl.organization_id = p_organization_id
	  AND mtrl.lpn_id = p_lpn_id
	  AND mtrl.inventory_item_id = p_inventory_item_id
	  AND NVL(mtrl.revision, '###') = NVL(p_revision, '###')
	  AND NVL(mtrl.lot_number, '###') = NVL(p_lot_number, '###')
	  AND mtrl.quantity <> NVL(mtrl.quantity_delivered, 0)
	  AND mtrl.line_status <> inv_globals.g_to_status_closed
	  AND mtrl.header_id = mtrh.header_id
	  AND mtrh.move_order_type = inv_globals.g_move_order_put_away
	  ORDER BY 2 DESC;
Line: 495

	SELECT mtrl.line_id
	  ,    Nvl(mtrl.inspection_status,0) inspection_status
	  ,    quantity-Nvl(quantity_delivered,0) avail_qty
	  FROM mtl_txn_request_lines mtrl, mtl_txn_request_headers mtrh
	  WHERE mtrl.organization_id = p_organization_id
	  AND mtrl.lpn_id = p_lpn_id
	  AND mtrl.inventory_item_id = p_inventory_item_id
	  AND NVL(mtrl.revision, '###') = NVL(p_revision, '###')
	  AND NVL(mtrl.lot_number, '###') = NVL(p_lot_number, '###')
	  AND mtrl.quantity <> NVL(mtrl.quantity_delivered, 0)
	  AND ((l_lpn_context = 3) OR
	       (l_lpn_context = 1 AND l_mo_line_count = 0))
	  AND mtrl.line_status <> inv_globals.g_to_status_closed
	  AND mtrl.header_id = mtrh.header_id
	  AND mtrh.move_order_type = inv_globals.g_move_order_put_away
	  ORDER BY mtrl.inspection_status;
Line: 517

	SELECT mtrl.line_id
	  FROM mtl_txn_request_lines mtrl, mtl_txn_request_headers mtrh
	  WHERE mtrl.organization_id = p_organization_id
	  AND mtrl.lpn_id = p_lpn_id
	  AND mtrl.inventory_item_id = p_inventory_item_id
	  AND NVL(mtrl.revision, '###') = NVL(p_revision, '###')
	  AND NVL(mtrl.lot_number, '###') = NVL(p_lot_number, '###')
	  AND mtrl.quantity <> NVL(mtrl.quantity_delivered, 0)
	  AND l_lpn_context = 2
	  AND mtrl.reference_id IN (SELECT header_id
				    FROM wip_lpn_completions_serials
				    WHERE l_current_serial BETWEEN fm_serial_number AND
				    to_serial_number
				    AND NVL(lot_number, '###') = NVL(p_lot_number, '###'))
	  AND mtrl.line_status <> inv_globals.g_to_status_closed
	  AND mtrl.header_id = mtrh.header_id
	  AND mtrh.move_order_type = inv_globals.g_move_order_put_away;
Line: 537

	SELECT serial_number
	  ,    Nvl(inspection_status,0) inspection_status
	  FROM mtl_serial_numbers
	  WHERE inventory_item_id = p_inventory_item_id
	  AND current_organization_id = p_organization_id
	  AND NVL(revision, '###') = NVL(p_revision, '###')
	  AND NVL(lot_number, '###') = NVL(p_lot_number, '###')
	  AND lpn_id = p_lpn_id
	  AND group_mark_id = p_serial_txn_temp_id
	  AND EXISTS (SELECT 1
		      FROM mtl_serial_numbers_temp
		      WHERE transaction_temp_id = p_serial_txn_temp_id
		      AND serial_number BETWEEN fm_serial_number AND
		      to_serial_number)
	  ORDER BY Nvl(inspection_status,0),LPAD(serial_number, 20);
Line: 595

	SELECT wlcs.fm_serial_number
	  FROM wip_lpn_completions_serials wlcs, mtl_serial_numbers msn
	  WHERE l_lpn_context = 2
	  AND NVL(wlcs.lot_number, '###') = NVL(p_lot_number, '###')
	  AND wlcs.header_id IN (SELECT reference_id
				 FROM mtl_txn_request_lines
				 WHERE line_id = l_mo_line_id
				 AND organization_id = p_organization_id)
	  AND wlcs.fm_serial_number = msn.serial_number
	  AND msn.inventory_item_id = p_inventory_item_id
	  AND msn.current_organization_id = p_organization_id
	  AND NVL(msn.revision, '###') = NVL(p_revision, '###')
	  AND NVL(msn.lot_number, '###') = NVL(p_lot_number, '###')
	  AND msn.lpn_id = p_lpn_id
	  AND msn.group_mark_id = p_serial_txn_temp_id
	  AND EXISTS (SELECT 1
		      FROM mtl_serial_numbers_temp msnt
		      WHERE msnt.transaction_temp_id = p_serial_txn_temp_id
		      AND msn.serial_number BETWEEN msnt.fm_serial_number AND
		      msnt.to_serial_number);
Line: 700

      SELECT mtl_material_transactions_s.NEXTVAL INTO p_txn_header_id FROM dual;
Line: 708

   SELECT lpn_context, NVL(subinventory_code, '###'), NVL(locator_id, -999)
     INTO l_lpn_context, l_subinv_code, l_locator_id
     FROM wms_license_plate_numbers
     WHERE lpn_id = p_lpn_id
     AND organization_id = p_organization_id;
Line: 721

   SELECT NVL(subinventory_code, '###'), NVL(locator_id, -999)
     INTO l_tosubinv_code, l_tolocator_id
     FROM wms_license_plate_numbers
     WHERE organization_id = p_organization_id
     AND lpn_id = p_into_lpn_id;
Line: 748

   SELECT primary_uom_code
     INTO l_primary_uom_code
     FROM mtl_system_items
     WHERE inventory_item_id = p_inventory_item_id
     AND organization_id = p_organization_id;
Line: 782

   SELECT COUNT(*)
     INTO l_mo_line_count
     FROM mtl_txn_request_lines mtrl, mtl_txn_request_headers mtrh
     WHERE mtrl.organization_id = p_organization_id
     AND mtrl.lpn_id = p_lpn_id
     AND mtrl.inventory_item_id = p_inventory_item_id
     AND NVL(mtrl.revision, '###') = NVL(p_revision, '###')
     AND NVL(mtrl.lot_number, '###') = NVL(p_lot_number, '###')
     AND mtrl.quantity <> NVL(mtrl.quantity_delivered, 0)
     AND mtrl.line_status <> inv_globals.g_to_status_closed
     AND mtrl.header_id = mtrh.header_id
     AND mtrh.move_order_type = inv_globals.g_move_order_put_away;
Line: 821

	 SELECT NVL(project_id, -999), NVL(task_id, -999)
	   INTO l_project_id, l_task_id
	   FROM mtl_item_locations
	   WHERE inventory_location_id = l_locator_id
	   AND organization_id = p_organization_id
	   AND subinventory_code = l_subinv_code;
Line: 834

	 SELECT DISTINCT NVL(cost_group_id, -999)
	   INTO l_cost_group_id
	   FROM wms_lpn_contents
	   WHERE parent_lpn_id = p_lpn_id
	   AND inventory_item_id = p_inventory_item_id
	   AND NVL(revision, '###') = NVL(p_revision, '###')
	   AND NVL(lot_number, '###') = NVL(p_lot_number, '###')
	   AND ROWNUM = 1;
Line: 1179

			   print_debug('Updated the move order line entry in the table: ' ||
				       l_table_index);
Line: 1197

		     -- Update the index whenever we insert a new entry
		     -- into the MOL table
		  l_index := l_index + 1;
Line: 1210

			-- Update the index whenever we insert a new entry
			-- into the MOL table
			l_index := l_index + 1;
Line: 1329

			      print_debug('Updated the move order line entry in the table: ' ||l_table_index);
Line: 1346

			-- Update the index whenever we insert a new entry
			-- into the MOL table
			l_index := l_index + 1;
Line: 1359

		     -- Update the index whenever we insert a new entry
		     -- into the MOL table
		     l_index := l_index + 1;
Line: 1375

		     l_mol_ser_tb.DELETE(j);
Line: 1493

   l_mo_split_tb.DELETE;
Line: 1561

     SELECT NVL(crossdock_flag, 2) cdock
      INTO  l_cdock_flag
      FROM  mtl_parameters
     WHERE  organization_id = p_organization_id;
Line: 1584

        SELECT backorder_delivery_detail_id
          ,    to_subinventory_code
          ,    to_locator_id
         INTO  l_backorder_delivery_detail_id
          ,    l_to_sub_code
          ,    l_to_loc_id
         FROM  mtl_txn_request_lines
        WHERE  line_id = l_tmp_mo_lines_tb(l_index).line_id;
Line: 1634

         FOR l_splitted_rec IN (SELECT line_id
                                 ,     primary_quantity
                                 FROM  mtl_txn_request_lines
                                WHERE  reference_detail_id = l_tmp_mo_lines_tb(l_index).line_id) LOOP

   	   IF (l_debug = 1) THEN
	      print_debug('Splitted Line:'||l_splitted_rec.line_id);
Line: 1650

             UPDATE mtl_txn_request_lines
              SET  reference_detail_id = NULL
             WHERE line_id = l_splitted_rec.line_id;
Line: 1674

      print_debug('For each move order line, insert a dummy MMTT record');
Line: 1675

      print_debug('For each move order line, insert a dummy MMTT record');
Line: 1690

	    print_debug('Receiving LPN so update wms_process_flag on the MOL');
Line: 1693

	    UPDATE mtl_txn_request_lines
	      SET wms_process_flag = 2
	      WHERE line_id = l_mo_lines_tb(l_index).line_id
	      AND organization_id = p_organization_id;
Line: 1704

	    print_debug('Successfully updated wms_process_flag for MOL');
Line: 1791

      SELECT NVL(txn_source_id, -999), NVL(project_id, -999), NVL(task_id, -999)
	INTO l_txn_src_id, l_project_id, l_task_id
	FROM mtl_txn_request_lines
	WHERE organization_id = p_organization_id
	AND line_id = l_mo_lines_tb(l_index).line_id;
Line: 1827

      l_return := inv_trx_util_pub.insert_line_trx
	(p_trx_hdr_id                 => p_txn_header_id,
	 p_item_id                    => p_inventory_item_id,
	 p_revision                   => p_revision,
	 p_org_id                     => p_organization_id,
	 p_trx_action_id              => l_trx_action_id,
	 p_subinv_code                => l_subinv_code,
	 p_tosubinv_code              => l_tosubinv_code,
	 p_locator_id                 => l_locator_id,
	 p_tolocator_id               => l_tolocator_id,
	 p_xfr_org_id                 => l_xfr_org_id,
	 p_trx_type_id                => l_trx_type_id,
	 p_trx_src_type_id            => l_trx_src_type_id,
	 p_trx_qty                    => l_trx_qty,
	 p_pri_qty                    => l_mo_lines_tb(l_index).prim_qty,
	 p_uom                        => p_uom_code,
    --laks
	 p_secondary_trx_qty          => l_mo_lines_tb(l_index).sec_qty,
	 p_secondary_uom              => l_sec_uom_code,
	 p_date                       => SYSDATE,
	 p_user_id                    => p_user_id,
	 p_cost_group                 => NULL,
	 p_from_lpn_id                => p_lpn_id,
	 p_cnt_lpn_id                 => NULL,
	 p_xfr_lpn_id                 => p_into_lpn_id,
	 p_trx_src_id                 => l_txn_src_id,
	 x_trx_tmp_id                 => l_txn_temp_id,
	 x_proc_msg                   => x_msg_data,
	 p_xfr_cost_group             => NULL,
	 p_project_id                 => l_project_id,
	 p_task_id                    => l_task_id,
	 p_move_order_line_id         => l_mo_lines_tb(l_index).line_id,
	 p_posting_flag               => 'N');
Line: 1862

   	 print_debug('Successfully inserted MMTT record: ' || l_txn_temp_id);
Line: 1869

   	    print_debug('Error occurred while calling inv_trx_util_pub.insert_line_trx');
Line: 1880

      UPDATE mtl_material_transactions_temp
	SET wms_task_type = 2
	WHERE transaction_temp_id = l_txn_temp_id
	AND organization_id = p_organization_id;
Line: 1885

	 print_debug('Successfully updated wms_task_type for dummy MMTT record');
Line: 1892

   	    print_debug('Insert a record into MTLT for lot: ' || p_lot_number);
Line: 1894

	 l_return := inv_trx_util_pub.insert_lot_trx
	   (p_trx_tmp_id           => l_txn_temp_id,
	    p_user_id              => p_user_id,
	    p_lot_number           => p_lot_number,
	    p_trx_qty              => l_trx_qty,
	    p_pri_qty              => l_mo_lines_tb(l_index).prim_qty,
       --laks
       p_secondary_qty        => l_mo_lines_tb(l_index).sec_qty,
       p_secondary_uom        => l_sec_uom_code,
	    x_ser_trx_id           => l_ser_trx_id,
	    x_proc_msg             => x_msg_data);
Line: 1906

   	    print_debug('Successfully inserted MTLT record');
Line: 1912

   	       print_debug('Error occurred while calling inv_trx_util_pub.insert_lot_trx');
Line: 1920

	    -- Update the MTLT record to clear out the serial_transaction_temp_id column
	    -- since insert_lot_trx by default will insert a value for it.
	    UPDATE mtl_transaction_lots_temp
	      SET serial_transaction_temp_id = NULL
	      WHERE transaction_temp_id = l_txn_temp_id;
Line: 1936

	 -- serial transaction temp ID when inserting MTLT records
	 IF (p_lot_number IS NULL) THEN
	    l_ser_trx_id := l_txn_temp_id;
Line: 1949

	       print_debug('Insert MSNT records for WIP');
Line: 1958

		  print_debug('Insert a record into MSNT for serial: ' || l_current_serial);
Line: 1962

	       l_return := inv_trx_util_pub.insert_ser_trx
		 (p_trx_tmp_id           => l_ser_trx_id,
		  p_user_id              => p_user_id,
		  p_fm_ser_num           => l_current_serial,
		  p_to_ser_num           => l_current_serial,
		  p_quantity             => 1,
		  x_proc_msg             => x_msg_data);
Line: 1970

		  print_debug('Successfully inserted MSNT record');
Line: 1976

		     print_debug('Error occurred while calling inv_trx_util_pub.insert_ser_trx');
Line: 1990

	       print_debug('Insert MSNT records for RCV/INV');
Line: 2000

		  print_debug('Insert a record into MSNT for serial: ' || l_current_serial);
Line: 2004

	       l_return := inv_trx_util_pub.insert_ser_trx
		 (p_trx_tmp_id           => l_ser_trx_id,
		  p_user_id              => p_user_id,
		  p_fm_ser_num           => l_current_serial,
		  p_to_ser_num           => l_current_serial,
		  p_quantity             => 1,
		  x_proc_msg             => x_msg_data);
Line: 2012

		  print_debug('Successfully inserted MSNT record');
Line: 2018

		     print_debug('Error occurred while calling inv_trx_util_pub.insert_ser_trx');
Line: 2035

      print_debug('Finished inserting dummy MMTT records for all MOLs');
Line: 2114

	SELECT transaction_temp_id
	  FROM mtl_material_transactions_temp
	  WHERE organization_id = p_organization_id
	  AND lpn_id = p_lpn_id
	  AND transaction_header_id <> p_txn_header_id
	  AND NOT (transaction_source_type_id = 13 AND
		   transaction_type_id IN (89, 2) AND
		   transaction_action_id IN (52, 2))
	  AND move_order_line_id = l_mo_line_id;
Line: 2129

	SELECT DISTINCT move_order_line_id
	  FROM mtl_material_transactions_temp
	  WHERE organization_id = p_organization_id
	  AND transaction_header_id = p_txn_header_id
	  AND (transaction_source_type_id = 13 AND
	       transaction_type_id IN (89, 2) AND
	       transaction_action_id IN (52, 2))
	  AND move_order_line_id IS NOT NULL
	  ORDER BY move_order_line_id ASC;
Line: 2163

	SELECT mmtt.transaction_temp_id,
	  mmtt.inventory_item_id,
	  mmtt.revision,
	  mmtt.subinventory_code,
	  mmtt.locator_id,
	  mmtt.transaction_quantity,
	  mmtt.transaction_uom,
     -- laks
	  mmtt.secondary_transaction_quantity,
	  mmtt.secondary_uom_code,
	  NVL(mmtt.transfer_subinventory, mmtt.subinventory_code),
	  NVL(mmtt.transfer_to_location, mmtt.locator_id),
	  mmtt.cost_group_id,
	  mmtt.lpn_id,
	  mmtt.transfer_lpn_id,
	  mtlt.lot_number,
	  mtlt.serial_transaction_temp_id
	  FROM mtl_material_transactions_temp mmtt,
	  mtl_transaction_lots_temp mtlt
	  WHERE mmtt.organization_id = p_organization_id
	  AND mmtt.transaction_header_id = p_txn_header_id
	  AND (mmtt.transaction_source_type_id = 13 AND
	       mmtt.transaction_type_id IN (89, 2) AND
	       mmtt.transaction_action_id IN (52, 2))
	  AND mmtt.transaction_temp_id = mtlt.transaction_temp_id(+);
Line: 2208

	SELECT fm_serial_number, to_serial_number
	  FROM mtl_serial_numbers_temp
	  WHERE transaction_temp_id = l_ser_trx_id;
Line: 2266

      SELECT employee_id
	INTO l_emp_id
	FROM fnd_user
	WHERE user_id = p_user_id;
Line: 2320

	 SELECT NVL(transaction_source_type_id, -999),
	   NVL(transaction_type_id, -999)
	   INTO l_txn_source_type_id, l_txn_type_id
	   FROM mtl_txn_request_lines
	   WHERE line_id = l_mo_line_id;
Line: 2529

      l_mo_lines_tb.DELETE;
Line: 2581

         UPDATE RCV_TRANSACTIONS_INTERFACE
         SET PROCESSING_MODE_CODE =  'ONLINE'
         WHERE GROUP_ID = inv_rcv_common_apis.g_rcv_global_var.interface_group_id;
Line: 2709

	 SELECT serial_number_control_code, lot_control_code
	   INTO l_serial_number_ctrl_code, l_lot_control_code
	   FROM mtl_system_items
	   WHERE inventory_item_id = l_inventory_item_id
	   AND  organization_id = p_organization_id;
Line: 2869

	       -- The dummy MMTT records are always inserted with the
	       -- item's primary UOM code for the transaction UOM.
	       IF (l_debug = 1) THEN
		  print_debug('Unpack the serials from the source LPN');
Line: 2962

	 -- Delete the dummy MMTT/MTLT/MSNT records once we have processed them
	 IF (l_ser_trx_id IS NOT NULL) THEN
	    IF (l_debug = 1) THEN
	       print_debug('Delete the dummy MSNT records: ' || l_ser_trx_id);
Line: 2967

	    DELETE FROM mtl_serial_numbers_temp
	      WHERE transaction_temp_id = l_ser_trx_id;
Line: 2973

	       print_debug('Delete the dummy MTLT records: ' || l_mmtt_temp_id);
Line: 2975

	    DELETE FROM mtl_transaction_lots_temp
	      WHERE transaction_temp_id = l_mmtt_temp_id;
Line: 2980

	    print_debug('Delete the dummy MMTT records: ' || l_mmtt_temp_id);
Line: 2982

	 DELETE FROM mtl_material_transactions_temp
	   WHERE transaction_temp_id = l_mmtt_temp_id;
Line: 3006

	 print_debug('Update the LPN context for Into LPN');
Line: 3009

	 UPDATE wms_license_plate_numbers
	   SET lpn_context = 2
	   WHERE lpn_id = p_into_lpn_id
	   AND organization_id = p_organization_id;
Line: 3020

	 print_debug('Successfully updated LPN context for Into LPN');
Line: 3038

	 print_debug('Need to update the LPN ID and complete the operations');
Line: 3039

	 print_debug('Query the move order lines table to update the LPN ID');
Line: 3055

	    SELECT subinventory_code
	      , locator_id
	      INTO l_into_sub
	      , l_into_loc
	      FROM wms_license_plate_numbers
	      WHERE lpn_id = p_into_lpn_id;
Line: 3076

	 -- Update the LPN ID in the MOL record
	 IF (l_debug = 1) THEN
	    print_debug('Update the LPN ID/SUB/LOC on MOL record');
Line: 3081

	    UPDATE mtl_txn_request_lines
	      SET lpn_id = p_into_lpn_id
	      , from_subinventory_code = Decode(p_lpn_context,
						WMS_CONTAINER_PUB.lpn_context_inv,
						l_into_sub,
						from_subinventory_code)
	      , from_locator_id = Decode(p_lpn_context,
					 WMS_CONTAINER_PUB.lpn_context_inv,
					 l_into_loc,
					 from_locator_id)
	      WHERE line_id = l_mo_line_id
	      AND organization_id = p_organization_id;
Line: 3100

	    print_debug('Successfully updated LPN ID/SUB/LOC on MOL record');
Line: 3150

	    -- Update the LPN ID and Allocated LPN ID in the MMTT record
	    IF (l_debug = 1) THEN
	       print_debug('Update the LPN ID/sub/loc on MMTT record');
Line: 3155

	       UPDATE mtl_material_transactions_temp
		 SET lpn_id = p_into_lpn_id
		 , allocated_lpn_id = p_into_lpn_id
		 , subinventory_code = Decode(p_lpn_context,
					      WMS_CONTAINER_PUB.lpn_context_inv,
					      l_into_sub,
					      subinventory_code)
		 , locator_id = Decode(p_lpn_context,
				       WMS_CONTAINER_PUB.lpn_context_inv,
				       l_into_loc,
				       locator_id)
		 WHERE transaction_temp_id = l_mmtt_temp_id
		 AND organization_id = p_organization_id;
Line: 3175

	       print_debug('Successfully updated LPN ID/sub/loc on MMTT record');
Line: 3202

	    UPDATE mtl_serial_numbers
	      SET group_mark_id = NULL
	      WHERE current_organization_id = p_organization_id
	      AND group_mark_id = p_serial_txn_temp_id
	      AND EXISTS (SELECT 1
			  FROM mtl_serial_numbers_temp
			  WHERE transaction_temp_id = p_serial_txn_temp_id
			  AND serial_number BETWEEN fm_serial_number AND
			  to_serial_number);
Line: 3230

	 print_debug('Delete the temporary MSNT records');
Line: 3233

	 DELETE FROM mtl_serial_numbers_temp
	   WHERE transaction_temp_id = p_serial_txn_temp_id;
Line: 3433

      UPDATE mtl_serial_numbers
	SET group_mark_id = NULL
	WHERE inventory_item_id = p_inventory_item_id
	AND current_organization_id = p_organization_id
	AND group_mark_id = p_serial_txn_temp_id
	AND EXISTS (SELECT 1
		    FROM mtl_serial_numbers_temp
		    WHERE transaction_temp_id = p_serial_txn_temp_id
		    AND serial_number BETWEEN fm_serial_number AND
		    to_serial_number);
Line: 3452

      print_debug('Delete the temporary MSNT records');
Line: 3455

      DELETE FROM mtl_serial_numbers_temp
	WHERE transaction_temp_id = p_serial_txn_temp_id;
Line: 3524

	SELECT mmtt.transaction_temp_id
	  FROM mtl_material_transactions_temp mmtt,
	  mtl_txn_request_lines mtrl,
	  wms_dispatched_tasks wdt
	  WHERE mmtt.organization_id = p_organization_id
	  AND mmtt.transaction_temp_id = wdt.transaction_temp_id
	  AND wdt.task_type = 2
	  AND wdt.organization_id = p_organization_id
	  AND wdt.move_order_line_id = mtrl.line_id
	  AND mtrl.line_id = mmtt.move_order_line_id
	  AND mtrl.line_status = 7
	  AND mtrl.organization_id = p_organization_id
	  AND mtrl.lpn_id = p_lpn_id;
Line: 3607

	 -- Non-receiving case so call delete_dispatched_task
	 IF (l_debug = 1) THEN
	    print_debug('Call delete_dispatched_task for MMTT: ' || l_mmtt_temp_id);
Line: 3613

	 wms_op_runtime_pvt_apis.delete_dispatched_task
	   (p_source_task_id     =>  l_mmtt_temp_id,
	    p_wms_task_type      =>  WMS_GLOBALS.G_WMS_TASK_TYPE_PUTAWAY,
	    x_return_status      =>  x_return_status,
	    x_msg_count          =>  x_msg_count,
	    x_msg_data           =>  x_msg_data);
Line: 3621

	    print_debug('Finished calling the delete_dispatched_task API');
Line: 3625

	 -- Check to see if the delete_dispatched_task API returned successfully
	 IF (x_return_status = fnd_api.g_ret_sts_success) THEN
	    IF (l_debug = 1) THEN
	       print_debug('Success returned from delete_dispatched_task API');
Line: 3632

	       print_debug('Failure returned from delete_dispatched_task API');