113: l_inactive_date DATE;
114: --
115: BEGIN
116: --
117: hr_utility.set_location('Entering:'|| l_proc, 10);
118: --
119: -- Issue a savepoint
120: --
121: savepoint create_generic_location;
119: -- Issue a savepoint
120: --
121: savepoint create_generic_location;
122: --
123: hr_utility.set_location(l_proc, 15);
124: --
125: -- All date input parameters must be truncated to remove time elements
126: --
127: l_inactive_date := trunc (p_inactive_date);
133: --
134: l_language_code := p_language_code;
135: hr_api.validate_language_code(p_language_code => l_language_code);
136: --
137: hr_utility.set_location(l_proc, 20);
138: --
139: -- Insert non-translatable rows into HR_LOCATIONS_ALL first
140: hr_loc_ins.ins
141: ( p_effective_date => p_effective_date
232: p_description => p_description,
233: p_business_group_id => p_business_group_id
234: );
235: --
236: hr_utility.set_location(l_proc, 60);
237: --
238: -- When in validation only mode raise the Validate_Enabled exception
239: --
240: IF p_validate THEN
245: --
246: p_location_id := l_location_id;
247: p_object_version_number := l_object_version_number;
248: --
249: hr_utility.set_location(' Leaving:'||l_proc, 70);
250: --
251: EXCEPTION
252: --
253: WHEN hr_api.validate_enabled THEN
262: -- when validation only mode is being used.)
263: --
264: p_location_id := NULL;
265: p_object_version_number := NULL;
266: hr_utility.set_location(' Leaving:'||l_proc, 80);
267: WHEN OTHERS THEN
268: --
269: -- A validation or unexpected error has occurred
270: ROLLBACK TO create_generic_location;
270: ROLLBACK TO create_generic_location;
271: -- Set OUT parameters.
272: p_location_id := NULL;
273: p_object_version_number := NULL;
274: hr_utility.set_location(' Leaving:'||l_proc, 90);
275: RAISE;
276: --
277: END create_generic_location;
278: -- ----------------------------------------------------------------------------
376: l_temp_ovn number := p_object_version_number;
377: --
378: BEGIN
379: --
380: hr_utility.set_location('Entering:'|| l_proc, 10);
381: --
382: -- Issue a savepoint.
383: --
384: savepoint update_generic_location;
394: -- passed through.
395: --
396: l_language_code := p_language_code;
397: hr_api.validate_language_code(p_language_code => l_language_code);
398: hr_utility.set_location(l_proc, 20);
399: --
400: --
401: -- Process Logic
402: --
497: p_location_code => p_location_code,
498: p_description => p_description);
499: --
500: --
501: hr_utility.set_location(l_proc, 60);
502: --
503: -- When in validation only mode raise the Validate_Enabled exception
504: --
505: IF p_validate THEN
510: -- never reached, so p_object_version_number is passed back unchanged.
511: --
512: p_object_version_number := l_object_version_number;
513: --
514: hr_utility.set_location(' Leaving:'||l_proc, 70);
515: --
516: EXCEPTION
517: --
518: WHEN hr_api.validate_enabled THEN
526: -- (Any key or derived arguments must be set to null
527: -- when validation only mode is being used.)
528: -- Reset IN OUT parameters.
529: p_object_version_number := l_temp_ovn;
530: hr_utility.set_location(' Leaving:'||l_proc, 80);
531:
532: WHEN OTHERS THEN
533: --
534: -- A validation or unexpected error has occurred
534: -- A validation or unexpected error has occurred
535: ROLLBACK TO update_generic_location;
536: -- Reset IN OUT parameters.
537: p_object_version_number := l_temp_ovn;
538: hr_utility.set_location(' Leaving:'||l_proc, 90);
539: RAISE;
540: --
541: --
542: END update_generic_location;