1842: FROM mtl_material_transactions_temp mmtt1,
1843: mtl_material_transactions_temp mmtt2,
1844: wms_zone_locators wzl1,
1845: wms_zone_locators wzl2,
1846: wms_zones_vl wz1,
1847: wms_zones_vl wz2
1848: WHERE mmtt2.move_order_header_id = p_move_order_hdr_id
1849: and mmtt1.locator_id = wzl1.inventory_location_id
1850: and (mmtt1.transfer_to_location = wzl2.inventory_location_id OR
1843: mtl_material_transactions_temp mmtt2,
1844: wms_zone_locators wzl1,
1845: wms_zone_locators wzl2,
1846: wms_zones_vl wz1,
1847: wms_zones_vl wz2
1848: WHERE mmtt2.move_order_header_id = p_move_order_hdr_id
1849: and mmtt1.locator_id = wzl1.inventory_location_id
1850: and (mmtt1.transfer_to_location = wzl2.inventory_location_id OR
1851: mmtt1.transfer_to_location IS NULL)
1876: from mtl_material_transactions_temp mmtt,
1877: MTL_SECONDARY_INVENTORIES MSI,
1878: wms_zone_locators wzl1,
1879: wms_zone_locators wzl2,
1880: wms_zones_vl wz1,
1881: wms_zones_vl wz2
1882: where move_order_header_id = p_move_order_hdr_id
1883: --AND mmtt.transfer_subinventory =msi.SECONDARY_INVENTORY_NAME
1884: AND mmtt.organization_id = msi.organization_id
1877: MTL_SECONDARY_INVENTORIES MSI,
1878: wms_zone_locators wzl1,
1879: wms_zone_locators wzl2,
1880: wms_zones_vl wz1,
1881: wms_zones_vl wz2
1882: where move_order_header_id = p_move_order_hdr_id
1883: --AND mmtt.transfer_subinventory =msi.SECONDARY_INVENTORY_NAME
1884: AND mmtt.organization_id = msi.organization_id
1885: and mmtt.locator_id = wzl1.inventory_location_id
2191:
2192: else --Zone
2193:
2194:
2195: SELECT distinct zone_name into v_zone_name from wms_zones_vl wz, wms_zone_locators wzl WHERE
2196: wz.zone_id=wzl.zone_id
2197: and wz.zone_type ='L'
2198: and wzl.subinventory_code=v_destination_subinventory;
2199:
7141: mtl_material_transactions_temp mmtt,
7142: wms_dispatched_tasks wdt,
7143: wms_zone_locators wzl1,
7144: wms_zone_locators wzl2,
7145: wms_zones_vl wz1,
7146: wms_zones_vl wz2
7147: where wz1.zone_name =
7148: l_resource_details.source_subinventory
7149: and wz2.zone_name =
7142: wms_dispatched_tasks wdt,
7143: wms_zone_locators wzl1,
7144: wms_zone_locators wzl2,
7145: wms_zones_vl wz1,
7146: wms_zones_vl wz2
7147: where wz1.zone_name =
7148: l_resource_details.source_subinventory
7149: and wz2.zone_name =
7150: l_resource_details.destination_subinventory