3334:
3335: IF (x_locator_id_record.subinventory IS NULL) THEN
3336: SELECT MAX(ml.inventory_location_id)
3337: INTO x_locator_id_record.locator_id
3338: FROM mtl_item_locations_kfv ml
3339: WHERE ml.concatenated_segments = x_locator_id_record.LOCATOR
3340: AND ( ml.disable_date > SYSDATE
3341: OR ml.disable_date IS NULL)
3342: AND ml.subinventory_code IS NULL;
3342: AND ml.subinventory_code IS NULL;
3343: ELSE
3344: SELECT MAX(ml.inventory_location_id)
3345: INTO x_locator_id_record.locator_id
3346: FROM mtl_item_locations_kfv ml
3347: WHERE ml.concatenated_segments = x_locator_id_record.LOCATOR
3348: AND ( ml.disable_date > SYSDATE
3349: OR ml.disable_date IS NULL)
3350: AND ml.subinventory_code = x_locator_id_record.subinventory;