95: and p_effective_date between per.effective_start_date
96: and per.effective_end_date;
97: begin
98: --
99: hr_utility.set_location('Entering:'|| l_proc, 10);
100: --
101: -- Issue a savepoint if operating in validation only mode
102: --
103: savepoint create_contract;
101: -- Issue a savepoint if operating in validation only mode
102: --
103: savepoint create_contract;
104: --
105: hr_utility.set_location(l_proc, 20);
106: --
107: -- Process Logic
108: --
109: -- Get person details.
115: if csr_get_derived_details%NOTFOUND then
116: --
117: close csr_get_derived_details;
118: --
119: hr_utility.set_location(l_proc, 30);
120: --
121: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
122: hr_utility.raise_error;
123: end if;
117: close csr_get_derived_details;
118: --
119: hr_utility.set_location(l_proc, 30);
120: --
121: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
122: hr_utility.raise_error;
123: end if;
124: --
125: close csr_get_derived_details;
118: --
119: hr_utility.set_location(l_proc, 30);
120: --
121: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
122: hr_utility.raise_error;
123: end if;
124: --
125: close csr_get_derived_details;
126: --
123: end if;
124: --
125: close csr_get_derived_details;
126: --
127: hr_utility.set_location(l_proc, 40);
128: --
129: begin
130: --
131: -- Start of API User Hook for the before hook of create_contract
204: );
205: --
206: -- End of API User Hook for the before hook of create_contract
207: --
208: hr_utility.set_location(l_proc, 30);
209: --
210: --
211: -- Validation in addition to Table Handlers
212: hr_api.mandatory_arg_error
220: ,p_argument => 'effective_date'
221: ,p_argument_value => l_effective_date
222: );
223: --
224: hr_utility.set_location(l_proc, 40);
225: --
226: end;
227: --
228: per_ctc_ins.ins
378: -- End of API User Hook for the after hook of create_contract
379: --
380: end;
381: --
382: hr_utility.set_location(l_proc, 60);
383: --
384: -- When in validation only mode raise the Validate_Enabled exception
385: --
386: if p_validate then
393: p_effective_start_date := l_effective_start_date;
394: p_effective_end_date := l_effective_end_date;
395: p_object_version_number := l_object_version_number;
396: --
397: hr_utility.set_location(' Leaving:'||l_proc, 70);
398: --
399: exception
400: --
401: when hr_api.validate_enabled then
412: p_contract_id := null;
413: p_effective_start_date := null;
414: p_effective_end_date := null;
415: p_object_version_number := null;
416: hr_utility.set_location(' Leaving:'||l_proc, 80);
417: --
418: when others then
419: --
420: -- A validation or unexpected error has occured
521: and per.effective_end_date;
522: --
523: begin
524: --
525: hr_utility.set_location('Entering:'|| l_proc, 10);
526: --
527: -- Issue a savepoint if operating in validation only mode
528: --
529: savepoint update_contract;
527: -- Issue a savepoint if operating in validation only mode
528: --
529: savepoint update_contract;
530: --
531: hr_utility.set_location(l_proc, 20);
532: --
533: -- Process Logic
534: -- Get person details.
535: --
538: into l_business_group_id;
539: --
540: if csr_get_derived_details%NOTFOUND then
541: close csr_get_derived_details;
542: hr_utility.set_location(l_proc, 30);
543: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
544: hr_utility.raise_error;
545: end if;
546: --
539: --
540: if csr_get_derived_details%NOTFOUND then
541: close csr_get_derived_details;
542: hr_utility.set_location(l_proc, 30);
543: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
544: hr_utility.raise_error;
545: end if;
546: --
547: close csr_get_derived_details;
540: if csr_get_derived_details%NOTFOUND then
541: close csr_get_derived_details;
542: hr_utility.set_location(l_proc, 30);
543: hr_utility.set_message(801,'HR_7432_ASG_INVALID_PERSON');
544: hr_utility.raise_error;
545: end if;
546: --
547: close csr_get_derived_details;
548: --
545: end if;
546: --
547: close csr_get_derived_details;
548: --
549: hr_utility.set_location(l_proc, 40);
550: --
551: l_object_version_number := p_object_version_number;
552: --
553: begin
799: -- End of API User Hook for the after hook of update_contract
800: --
801: end;
802: --
803: hr_utility.set_location(l_proc, 60);
804: --
805: -- When in validation only mode raise the Validate_Enabled exception
806: --
807: if p_validate then
813: p_object_version_number := l_object_version_number;
814: p_effective_start_date := l_effective_start_date;
815: p_effective_end_date := l_effective_end_date;
816: --
817: hr_utility.set_location(' Leaving:'||l_proc, 70);
818: --
819: exception
820: --
821: when hr_api.validate_enabled then
832: p_effective_start_date := null;
833: p_effective_end_date := null;
834: p_object_version_number := l_temp_ovn;
835: --
836: hr_utility.set_location(' Leaving:'||l_proc, 80);
837: --
838: when others then
839: --
840: -- A validation or unexpected error has occured
871: l_temp_ovn number := p_object_version_number;
872: --
873: begin
874: --
875: hr_utility.set_location('Entering:'|| l_proc, 10);
876: --
877: -- Issue a savepoint if operating in validation only mode
878: --
879: savepoint delete_contract;
877: -- Issue a savepoint if operating in validation only mode
878: --
879: savepoint delete_contract;
880: --
881: hr_utility.set_location(l_proc, 20);
882: --
883: -- Process Logic
884: --
885: hr_utility.set_location(l_proc, 30);
881: hr_utility.set_location(l_proc, 20);
882: --
883: -- Process Logic
884: --
885: hr_utility.set_location(l_proc, 30);
886: --
887: l_object_version_number := p_object_version_number;
888: --
889: begin
941: -- End of API User Hook for the after hook of delete_contract
942: --
943: end;
944: --
945: hr_utility.set_location(l_proc, 60);
946: --
947: -- When in validation only mode raise the Validate_Enabled exception
948: --
949: if p_validate then
949: if p_validate then
950: raise hr_api.validate_enabled;
951: end if;
952: --
953: hr_utility.set_location(' Leaving:'||l_proc, 70);
954: --
955: exception
956: --
957: when hr_api.validate_enabled then
1003: l_validation_end_date date;
1004: --
1005: begin
1006: --
1007: hr_utility.set_location('Entering:'|| l_proc, 10);
1008: --
1009: per_ctc_shd.lck
1010: (
1011: p_contract_id => p_contract_id
1015: ,p_effective_date => p_effective_date
1016: ,p_datetrack_mode => p_datetrack_mode
1017: );
1018: --
1019: hr_utility.set_location(' Leaving:'||l_proc, 70);
1020: --
1021: end lck;
1022: --
1023: -- ----------------------------------------------------------------------------
1084: l_proc varchar2(72) := g_package||'maintain_contracts';
1085: --
1086: BEGIN
1087: --
1088: hr_utility.set_location('Entering:'||l_proc, 5);
1089: --
1090: IF p_new_start_date > p_old_start_date THEN
1091: --
1092: -- The start-date is moving forward in time :
1102: IF l_end_date < p_new_start_date THEN
1103: --
1104: -- Remove the contract as it now ends before the person exists
1105: --
1106: hr_utility.set_location('Entering:'||l_proc, 10);
1107: --
1108: per_ctc_del.delete_row
1109: (l_contract_id,
1110: l_start_date,
1112: ELSE
1113: --
1114: -- Row spanning the new start-date : move its start-date forward
1115: --
1116: hr_utility.set_location('Entering:'||l_proc, 20);
1117: --
1118: per_ctc_upd.update_effective_start_date
1119: (l_contract_id,
1120: l_start_date,
1151: --
1152: -- The earliest assigned contract does not exist
1153: -- as of the new start-date : move it backwards.
1154: --
1155: hr_utility.set_location('Entering:'||l_proc, 30);
1156: --
1157: per_ctc_upd.update_effective_start_date
1158: (l_contract_id,
1159: l_start_date,