15:
16: l_proc varchar2(72) := g_package||'constraint_error';
17:
18: Begin
19: hr_utility.set_location('Entering:'||l_proc, 5);
20:
21: If (p_constraint_name = 'PER_APPRAISALS_FK1') Then
22: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
18: Begin
19: hr_utility.set_location('Entering:'||l_proc, 5);
20:
21: If (p_constraint_name = 'PER_APPRAISALS_FK1') Then
22: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_APPRAISALS_FK2') Then
19: hr_utility.set_location('Entering:'||l_proc, 5);
20:
21: If (p_constraint_name = 'PER_APPRAISALS_FK1') Then
22: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_APPRAISALS_FK2') Then
27: hr_utility.set_message(801,'HR_52246_APR_TEMP_NOT_EXIST');
20:
21: If (p_constraint_name = 'PER_APPRAISALS_FK1') Then
22: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_APPRAISALS_FK2') Then
27: hr_utility.set_message(801,'HR_52246_APR_TEMP_NOT_EXIST');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
21: If (p_constraint_name = 'PER_APPRAISALS_FK1') Then
22: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_APPRAISALS_FK2') Then
27: hr_utility.set_message(801,'HR_52246_APR_TEMP_NOT_EXIST');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_APPRAISALS_FK2') Then
27: hr_utility.set_message(801,'HR_52246_APR_TEMP_NOT_EXIST');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PER_APPRAISALS_FK3') Then
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_APPRAISALS_FK2') Then
27: hr_utility.set_message(801,'HR_52246_APR_TEMP_NOT_EXIST');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PER_APPRAISALS_FK3') Then
32: hr_utility.set_message(801,'HR_51898_APR_NO_SUCH_LEVEL');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_APPRAISALS_FK2') Then
27: hr_utility.set_message(801,'HR_52246_APR_TEMP_NOT_EXIST');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PER_APPRAISALS_FK3') Then
32: hr_utility.set_message(801,'HR_51898_APR_NO_SUCH_LEVEL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
26: ElsIf (p_constraint_name = 'PER_APPRAISALS_FK2') Then
27: hr_utility.set_message(801,'HR_52246_APR_TEMP_NOT_EXIST');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PER_APPRAISALS_FK3') Then
32: hr_utility.set_message(801,'HR_51898_APR_NO_SUCH_LEVEL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PER_APPRAISALS_FK3') Then
32: hr_utility.set_message(801,'HR_51898_APR_NO_SUCH_LEVEL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PER_APPRAISALS_PK') Then
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PER_APPRAISALS_FK3') Then
32: hr_utility.set_message(801,'HR_51898_APR_NO_SUCH_LEVEL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PER_APPRAISALS_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PER_APPRAISALS_FK3') Then
32: hr_utility.set_message(801,'HR_51898_APR_NO_SUCH_LEVEL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PER_APPRAISALS_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
31: ElsIf (p_constraint_name = 'PER_APPRAISALS_FK3') Then
32: hr_utility.set_message(801,'HR_51898_APR_NO_SUCH_LEVEL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PER_APPRAISALS_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','20');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PER_APPRAISALS_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','20');
40: hr_utility.raise_error;
41: Else
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PER_APPRAISALS_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','20');
40: hr_utility.raise_error;
41: Else
42: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PER_APPRAISALS_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','20');
40: hr_utility.raise_error;
41: Else
42: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
36: ElsIf (p_constraint_name = 'PER_APPRAISALS_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','20');
40: hr_utility.raise_error;
41: Else
42: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','20');
40: hr_utility.raise_error;
41: Else
42: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
45: hr_utility.raise_error;
46: End If;
39: hr_utility.set_message_token('STEP','20');
40: hr_utility.raise_error;
41: Else
42: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
45: hr_utility.raise_error;
46: End If;
47:
40: hr_utility.raise_error;
41: Else
42: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
45: hr_utility.raise_error;
46: End If;
47:
48: hr_utility.set_location(' Leaving:'||l_proc, 10);
41: Else
42: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
45: hr_utility.raise_error;
46: End If;
47:
48: hr_utility.set_location(' Leaving:'||l_proc, 10);
49: End constraint_error;
44: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
45: hr_utility.raise_error;
46: End If;
47:
48: hr_utility.set_location(' Leaving:'||l_proc, 10);
49: End constraint_error;
50:
51: -- ---------------------------------------------------------------------------+
52: -- |-----------------------------< api_updating >-----------------------------|
138: l_proc varchar2(72) := g_package||'api_updating';
139: l_fct_ret boolean;
140:
141: Begin
142: hr_utility.set_location('Entering:'||l_proc, 5);
143:
144: If (
145: p_appraisal_id is null and
146: p_object_version_number is null
154: If (
155: p_appraisal_id = g_old_rec.appraisal_id and
156: p_object_version_number = g_old_rec.object_version_number
157: ) Then
158: hr_utility.set_location(l_proc, 10);
159:
160: -- The g_old_rec is current therefore we must
161: -- set the returning function to true
162:
171: Close C_Sel1;
172:
173: -- The primary key is invalid therefore we must error
174:
175: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
176: hr_utility.raise_error;
177: End If;
178: Close C_Sel1;
179: If (p_object_version_number <> g_old_rec.object_version_number) Then
172:
173: -- The primary key is invalid therefore we must error
174:
175: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
176: hr_utility.raise_error;
177: End If;
178: Close C_Sel1;
179: If (p_object_version_number <> g_old_rec.object_version_number) Then
180: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
176: hr_utility.raise_error;
177: End If;
178: Close C_Sel1;
179: If (p_object_version_number <> g_old_rec.object_version_number) Then
180: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
181: hr_utility.raise_error;
182: End If;
183: hr_utility.set_location(l_proc, 15);
184: l_fct_ret := true;
177: End If;
178: Close C_Sel1;
179: If (p_object_version_number <> g_old_rec.object_version_number) Then
180: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
181: hr_utility.raise_error;
182: End If;
183: hr_utility.set_location(l_proc, 15);
184: l_fct_ret := true;
185: End If;
179: If (p_object_version_number <> g_old_rec.object_version_number) Then
180: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
181: hr_utility.raise_error;
182: End If;
183: hr_utility.set_location(l_proc, 15);
184: l_fct_ret := true;
185: End If;
186: End If;
187: hr_utility.set_location(' Leaving:'||l_proc, 20);
183: hr_utility.set_location(l_proc, 15);
184: l_fct_ret := true;
185: End If;
186: End If;
187: hr_utility.set_location(' Leaving:'||l_proc, 20);
188: Return (l_fct_ret);
189:
190: End api_updating;
191:
278:
279: l_proc varchar2(72) := g_package||'lck';
280:
281: Begin
282: hr_utility.set_location('Entering:'||l_proc, 5);
283:
284: -- Add any mandatory argument checking here:
285: -- Example:
286: -- hr_api.mandatory_arg_error
294: Close C_Sel1;
295:
296: -- The primary key is invalid therefore we must error
297:
298: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
299: hr_utility.raise_error;
300: End If;
301: Close C_Sel1;
302: If (p_object_version_number <> g_old_rec.object_version_number) Then
295:
296: -- The primary key is invalid therefore we must error
297:
298: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
299: hr_utility.raise_error;
300: End If;
301: Close C_Sel1;
302: If (p_object_version_number <> g_old_rec.object_version_number) Then
303: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
299: hr_utility.raise_error;
300: End If;
301: Close C_Sel1;
302: If (p_object_version_number <> g_old_rec.object_version_number) Then
303: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
304: hr_utility.raise_error;
305: End If;
306:
307: hr_utility.set_location(' Leaving:'||l_proc, 10);
300: End If;
301: Close C_Sel1;
302: If (p_object_version_number <> g_old_rec.object_version_number) Then
303: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
304: hr_utility.raise_error;
305: End If;
306:
307: hr_utility.set_location(' Leaving:'||l_proc, 10);
308:
303: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
304: hr_utility.raise_error;
305: End If;
306:
307: hr_utility.set_location(' Leaving:'||l_proc, 10);
308:
309: -- We need to trap the ORA LOCK exception
310:
311: Exception
313:
314: -- The object is locked therefore we need to supply a meaningful
315: -- error message.
316:
317: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
318: hr_utility.set_message_token('TABLE_NAME', 'per_appraisals');
319: hr_utility.raise_error;
320: End lck;
321:
314: -- The object is locked therefore we need to supply a meaningful
315: -- error message.
316:
317: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
318: hr_utility.set_message_token('TABLE_NAME', 'per_appraisals');
319: hr_utility.raise_error;
320: End lck;
321:
322: -- ---------------------------------------------------------------------------+
315: -- error message.
316:
317: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
318: hr_utility.set_message_token('TABLE_NAME', 'per_appraisals');
319: hr_utility.raise_error;
320: End lck;
321:
322: -- ---------------------------------------------------------------------------+
323: -- |-----------------------------< convert_args >-----------------------------|
401: l_proc varchar2(72) := g_package||'convert_args';
402:
403: Begin
404:
405: hr_utility.set_location('Entering:'||l_proc, 5);
406:
407: -- Convert arguments into local l_rec structure.
408:
409: l_rec.appraisal_id := p_appraisal_id;
485: l_rec.show_participant_comments := p_show_participant_comments; -- 8651478 bug fix
486:
487: -- Return the plsql record structure.
488:
489: hr_utility.set_location(' Leaving:'||l_proc, 10);
490: Return(l_rec);
491:
492: End convert_args;
493: