153:
154: BEGIN
155: hr_utility.set_location(l_proc, 20);
156: l_location_id := hr_h2pi_map.get_to_id
157: (p_table_name => 'HR_LOCATIONS_ALL',
158: p_from_id => v_ud_loc.location_id);
159:
160: IF l_location_id = -1 THEN
161: hr_utility.set_location(l_proc, 30);
211: ,p_location_id => l_location_id
212: ,p_object_version_number=> l_ovn);
213:
214: hr_h2pi_map.create_id_mapping
215: (p_table_name => 'HR_LOCATIONS_ALL',
216: p_from_id => v_ud_loc.location_id,
217: p_to_id => l_location_id);
218: ELSE
219: BEGIN
219: BEGIN
220: hr_utility.set_location(l_proc, 40);
221: SELECT loc.object_version_number
222: INTO l_ovn
223: FROM hr_locations_all loc
224: WHERE loc.location_id = l_location_id;
225: EXCEPTION
226: WHEN NO_DATA_FOUND THEN
227: hr_utility.set_location(l_proc, 50);
427: CLOSE csr_hr_org;
428:
429: hr_utility.set_location(l_proc, 40);
430: l_location_id := hr_h2pi_map.get_to_id
431: (p_table_name => 'HR_LOCATIONS_ALL',
432: p_from_id => v_ud_hr_org.location_id,
433: p_report_error => TRUE);
434:
435: l_hr_org_id := hr_h2pi_map.get_to_id