14: --
15: l_proc varchar2(72) := g_package||'constraint_error';
16: --
17: Begin
18: hr_utility.set_location('Entering:'||l_proc, 5);
19: --
20: If (p_constraint_name = 'PER_OBJECTIVES_FK1') Then
21: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
22: hr_utility.set_message_token('PROCEDURE', l_proc);
17: Begin
18: hr_utility.set_location('Entering:'||l_proc, 5);
19: --
20: If (p_constraint_name = 'PER_OBJECTIVES_FK1') Then
21: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
22: hr_utility.set_message_token('PROCEDURE', l_proc);
23: hr_utility.set_message_token('STEP','5');
24: hr_utility.raise_error;
25: ElsIf (p_constraint_name = 'PER_OBJECTIVES_FK2') Then
18: hr_utility.set_location('Entering:'||l_proc, 5);
19: --
20: If (p_constraint_name = 'PER_OBJECTIVES_FK1') Then
21: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
22: hr_utility.set_message_token('PROCEDURE', l_proc);
23: hr_utility.set_message_token('STEP','5');
24: hr_utility.raise_error;
25: ElsIf (p_constraint_name = 'PER_OBJECTIVES_FK2') Then
26: hr_utility.set_message(801,'HR_52054_OBJ_APR_NOT_EXIST');
19: --
20: If (p_constraint_name = 'PER_OBJECTIVES_FK1') Then
21: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
22: hr_utility.set_message_token('PROCEDURE', l_proc);
23: hr_utility.set_message_token('STEP','5');
24: hr_utility.raise_error;
25: ElsIf (p_constraint_name = 'PER_OBJECTIVES_FK2') Then
26: hr_utility.set_message(801,'HR_52054_OBJ_APR_NOT_EXIST');
27: hr_utility.set_message_token('PROCEDURE', l_proc);
20: If (p_constraint_name = 'PER_OBJECTIVES_FK1') Then
21: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
22: hr_utility.set_message_token('PROCEDURE', l_proc);
23: hr_utility.set_message_token('STEP','5');
24: hr_utility.raise_error;
25: ElsIf (p_constraint_name = 'PER_OBJECTIVES_FK2') Then
26: hr_utility.set_message(801,'HR_52054_OBJ_APR_NOT_EXIST');
27: hr_utility.set_message_token('PROCEDURE', l_proc);
28: hr_utility.set_message_token('STEP','10');
22: hr_utility.set_message_token('PROCEDURE', l_proc);
23: hr_utility.set_message_token('STEP','5');
24: hr_utility.raise_error;
25: ElsIf (p_constraint_name = 'PER_OBJECTIVES_FK2') Then
26: hr_utility.set_message(801,'HR_52054_OBJ_APR_NOT_EXIST');
27: hr_utility.set_message_token('PROCEDURE', l_proc);
28: hr_utility.set_message_token('STEP','10');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_OBJECTIVES_PK') Then
23: hr_utility.set_message_token('STEP','5');
24: hr_utility.raise_error;
25: ElsIf (p_constraint_name = 'PER_OBJECTIVES_FK2') Then
26: hr_utility.set_message(801,'HR_52054_OBJ_APR_NOT_EXIST');
27: hr_utility.set_message_token('PROCEDURE', l_proc);
28: hr_utility.set_message_token('STEP','10');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_OBJECTIVES_PK') Then
31: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
24: hr_utility.raise_error;
25: ElsIf (p_constraint_name = 'PER_OBJECTIVES_FK2') Then
26: hr_utility.set_message(801,'HR_52054_OBJ_APR_NOT_EXIST');
27: hr_utility.set_message_token('PROCEDURE', l_proc);
28: hr_utility.set_message_token('STEP','10');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_OBJECTIVES_PK') Then
31: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
25: ElsIf (p_constraint_name = 'PER_OBJECTIVES_FK2') Then
26: hr_utility.set_message(801,'HR_52054_OBJ_APR_NOT_EXIST');
27: hr_utility.set_message_token('PROCEDURE', l_proc);
28: hr_utility.set_message_token('STEP','10');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_OBJECTIVES_PK') Then
31: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','15');
27: hr_utility.set_message_token('PROCEDURE', l_proc);
28: hr_utility.set_message_token('STEP','10');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_OBJECTIVES_PK') Then
31: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','15');
34: hr_utility.raise_error;
35: Else
28: hr_utility.set_message_token('STEP','10');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_OBJECTIVES_PK') Then
31: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','15');
34: hr_utility.raise_error;
35: Else
36: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_OBJECTIVES_PK') Then
31: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','15');
34: hr_utility.raise_error;
35: Else
36: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
37: hr_utility.set_message_token('PROCEDURE', l_proc);
30: ElsIf (p_constraint_name = 'PER_OBJECTIVES_PK') Then
31: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','15');
34: hr_utility.raise_error;
35: Else
36: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
37: hr_utility.set_message_token('PROCEDURE', l_proc);
38: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','15');
34: hr_utility.raise_error;
35: Else
36: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
37: hr_utility.set_message_token('PROCEDURE', l_proc);
38: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
39: hr_utility.raise_error;
40: End If;
33: hr_utility.set_message_token('STEP','15');
34: hr_utility.raise_error;
35: Else
36: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
37: hr_utility.set_message_token('PROCEDURE', l_proc);
38: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
39: hr_utility.raise_error;
40: End If;
41: --
34: hr_utility.raise_error;
35: Else
36: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
37: hr_utility.set_message_token('PROCEDURE', l_proc);
38: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
39: hr_utility.raise_error;
40: End If;
41: --
42: hr_utility.set_location(' Leaving:'||l_proc, 10);
35: Else
36: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
37: hr_utility.set_message_token('PROCEDURE', l_proc);
38: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
39: hr_utility.raise_error;
40: End If;
41: --
42: hr_utility.set_location(' Leaving:'||l_proc, 10);
43: End constraint_error;
38: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
39: hr_utility.raise_error;
40: End If;
41: --
42: hr_utility.set_location(' Leaving:'||l_proc, 10);
43: End constraint_error;
44: --
45: -- ----------------------------------------------------------------------------
46: -- |-----------------------------< api_updating >-----------------------------|
129: l_proc varchar2(72) := g_package||'api_updating';
130: l_fct_ret boolean;
131: --
132: Begin
133: hr_utility.set_location('Entering:'||l_proc, 5);
134: --
135: If (
136: p_objective_id is null and
137: p_object_version_number is null
145: If (
146: p_objective_id = g_old_rec.objective_id and
147: p_object_version_number = g_old_rec.object_version_number
148: ) Then
149: hr_utility.set_location(l_proc, 10);
150: --
151: -- The g_old_rec is current therefore we must
152: -- set the returning function to true
153: --
162: Close C_Sel1;
163: --
164: -- The primary key is invalid therefore we must error
165: --
166: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
167: hr_utility.raise_error;
168: else
169: Close C_Sel1;
170: End If;
163: --
164: -- The primary key is invalid therefore we must error
165: --
166: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
167: hr_utility.raise_error;
168: else
169: Close C_Sel1;
170: End If;
171: If (p_object_version_number <> g_old_rec.object_version_number) Then
168: else
169: Close C_Sel1;
170: End If;
171: If (p_object_version_number <> g_old_rec.object_version_number) Then
172: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
173: hr_utility.raise_error;
174: End If;
175: hr_utility.set_location(l_proc, 15);
176: l_fct_ret := true;
169: Close C_Sel1;
170: End If;
171: If (p_object_version_number <> g_old_rec.object_version_number) Then
172: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
173: hr_utility.raise_error;
174: End If;
175: hr_utility.set_location(l_proc, 15);
176: l_fct_ret := true;
177: End If;
171: If (p_object_version_number <> g_old_rec.object_version_number) Then
172: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
173: hr_utility.raise_error;
174: End If;
175: hr_utility.set_location(l_proc, 15);
176: l_fct_ret := true;
177: End If;
178: End If;
179: hr_utility.set_location(' Leaving:'||l_proc, 20);
175: hr_utility.set_location(l_proc, 15);
176: l_fct_ret := true;
177: End If;
178: End If;
179: hr_utility.set_location(' Leaving:'||l_proc, 20);
180: Return (l_fct_ret);
181: --
182: End api_updating;
183: --
268: --
269: l_proc varchar2(72) := g_package||'lck';
270: --
271: Begin
272: hr_utility.set_location('Entering:'||l_proc, 5);
273: --
274: -- Add any mandatory argument checking here:
275: -- Example:
276: -- hr_api.mandatory_arg_error
284: Close C_Sel1;
285: --
286: -- The primary key is invalid therefore we must error
287: --
288: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
289: hr_utility.raise_error;
290: else
291: Close C_Sel1;
292: End If;
285: --
286: -- The primary key is invalid therefore we must error
287: --
288: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
289: hr_utility.raise_error;
290: else
291: Close C_Sel1;
292: End If;
293:
291: Close C_Sel1;
292: End If;
293:
294: If (p_object_version_number <> g_old_rec.object_version_number) Then
295: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
296: hr_utility.raise_error;
297: End If;
298: --
299: hr_utility.set_location(' Leaving:'||l_proc, 10);
292: End If;
293:
294: If (p_object_version_number <> g_old_rec.object_version_number) Then
295: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
296: hr_utility.raise_error;
297: End If;
298: --
299: hr_utility.set_location(' Leaving:'||l_proc, 10);
300: --
295: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
296: hr_utility.raise_error;
297: End If;
298: --
299: hr_utility.set_location(' Leaving:'||l_proc, 10);
300: --
301: -- We need to trap the ORA LOCK exception
302: --
303: Exception
305: --
306: -- The object is locked therefore we need to supply a meaningful
307: -- error message.
308: --
309: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
310: hr_utility.set_message_token('TABLE_NAME', 'per_objectives');
311: hr_utility.raise_error;
312: End lck;
313: --
306: -- The object is locked therefore we need to supply a meaningful
307: -- error message.
308: --
309: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
310: hr_utility.set_message_token('TABLE_NAME', 'per_objectives');
311: hr_utility.raise_error;
312: End lck;
313: --
314: -- ----------------------------------------------------------------------------
307: -- error message.
308: --
309: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
310: hr_utility.set_message_token('TABLE_NAME', 'per_objectives');
311: hr_utility.raise_error;
312: End lck;
313: --
314: -- ----------------------------------------------------------------------------
315: -- |-----------------------------< convert_args >-----------------------------|
391: l_proc varchar2(72) := g_package||'convert_args';
392: --
393: Begin
394: --
395: hr_utility.set_location('Entering:'||l_proc, 5);
396: --
397: -- Convert arguments into local l_rec structure.
398: --
399: l_rec.objective_id := p_objective_id;
466:
467: --
468: -- Return the plsql record structure.
469: --
470: hr_utility.set_location(' Leaving:'||l_proc, 10);
471: Return(l_rec);
472: --
473: End convert_args;
474: --