14: --
15: l_proc varchar2(72) := g_package||'return_api_dml_status';
16: --
17: Begin
18: hr_utility.set_location('Entering:'||l_proc, 5);
19: --
20: Return (nvl(g_api_dml, false));
21: --
22: hr_utility.set_location(' Leaving:'||l_proc, 10);
18: hr_utility.set_location('Entering:'||l_proc, 5);
19: --
20: Return (nvl(g_api_dml, false));
21: --
22: hr_utility.set_location(' Leaving:'||l_proc, 10);
23: End return_api_dml_status;
24: --
25: -- ----------------------------------------------------------------------------
26: -- |---------------------------< constraint_error >---------------------------|
30: --
31: l_proc varchar2(72) := g_package||'constraint_error';
32: --
33: Begin
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PER_SUCCESSION_PLANNING_FK1') Then
37: hr_utility.set_message(801,'HR_52000_SUC_CHK_POS_EXISTS');
38: hr_utility.raise_error;
33: Begin
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PER_SUCCESSION_PLANNING_FK1') Then
37: hr_utility.set_message(801,'HR_52000_SUC_CHK_POS_EXISTS');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PER_SUCCESSION_PLANNING_FK2') Then
40: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
41: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PER_SUCCESSION_PLANNING_FK1') Then
37: hr_utility.set_message(801,'HR_52000_SUC_CHK_POS_EXISTS');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PER_SUCCESSION_PLANNING_FK2') Then
40: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
41: hr_utility.set_message_token('PROCEDURE', l_proc);
42: hr_utility.set_message_token('STEP','10');
36: If (p_constraint_name = 'PER_SUCCESSION_PLANNING_FK1') Then
37: hr_utility.set_message(801,'HR_52000_SUC_CHK_POS_EXISTS');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PER_SUCCESSION_PLANNING_FK2') Then
40: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
41: hr_utility.set_message_token('PROCEDURE', l_proc);
42: hr_utility.set_message_token('STEP','10');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_SUCCESSION_PLANNING_PK') Then
37: hr_utility.set_message(801,'HR_52000_SUC_CHK_POS_EXISTS');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PER_SUCCESSION_PLANNING_FK2') Then
40: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
41: hr_utility.set_message_token('PROCEDURE', l_proc);
42: hr_utility.set_message_token('STEP','10');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_SUCCESSION_PLANNING_PK') Then
45: hr_utility.set_message(801, 'HR_52006_SUC_CHK_SUCC_PLAN_ID');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PER_SUCCESSION_PLANNING_FK2') Then
40: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
41: hr_utility.set_message_token('PROCEDURE', l_proc);
42: hr_utility.set_message_token('STEP','10');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_SUCCESSION_PLANNING_PK') Then
45: hr_utility.set_message(801, 'HR_52006_SUC_CHK_SUCC_PLAN_ID');
46: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PER_SUCCESSION_PLANNING_FK2') Then
40: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
41: hr_utility.set_message_token('PROCEDURE', l_proc);
42: hr_utility.set_message_token('STEP','10');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_SUCCESSION_PLANNING_PK') Then
45: hr_utility.set_message(801, 'HR_52006_SUC_CHK_SUCC_PLAN_ID');
46: hr_utility.raise_error;
47: ElsIf (p_constraint_name = 'PER_SUCCESSION_PLANNING_UK') Then
41: hr_utility.set_message_token('PROCEDURE', l_proc);
42: hr_utility.set_message_token('STEP','10');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_SUCCESSION_PLANNING_PK') Then
45: hr_utility.set_message(801, 'HR_52006_SUC_CHK_SUCC_PLAN_ID');
46: hr_utility.raise_error;
47: ElsIf (p_constraint_name = 'PER_SUCCESSION_PLANNING_UK') Then
48: hr_utility.set_message(801,'HR_52005_SUC_CHK_DATE');
49: hr_utility.raise_error;
42: hr_utility.set_message_token('STEP','10');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_SUCCESSION_PLANNING_PK') Then
45: hr_utility.set_message(801, 'HR_52006_SUC_CHK_SUCC_PLAN_ID');
46: hr_utility.raise_error;
47: ElsIf (p_constraint_name = 'PER_SUCCESSION_PLANNING_UK') Then
48: hr_utility.set_message(801,'HR_52005_SUC_CHK_DATE');
49: hr_utility.raise_error;
50: ElsIf (p_constraint_name = 'PER_SUC_AVAIL_FOR_PROMOTION') Then
44: ElsIf (p_constraint_name = 'PER_SUCCESSION_PLANNING_PK') Then
45: hr_utility.set_message(801, 'HR_52006_SUC_CHK_SUCC_PLAN_ID');
46: hr_utility.raise_error;
47: ElsIf (p_constraint_name = 'PER_SUCCESSION_PLANNING_UK') Then
48: hr_utility.set_message(801,'HR_52005_SUC_CHK_DATE');
49: hr_utility.raise_error;
50: ElsIf (p_constraint_name = 'PER_SUC_AVAIL_FOR_PROMOTION') Then
51: hr_utility.set_message(801,'HR_52004_SUC_CHK_AVAILABLE');
52: hr_utility.raise_error;
45: hr_utility.set_message(801, 'HR_52006_SUC_CHK_SUCC_PLAN_ID');
46: hr_utility.raise_error;
47: ElsIf (p_constraint_name = 'PER_SUCCESSION_PLANNING_UK') Then
48: hr_utility.set_message(801,'HR_52005_SUC_CHK_DATE');
49: hr_utility.raise_error;
50: ElsIf (p_constraint_name = 'PER_SUC_AVAIL_FOR_PROMOTION') Then
51: hr_utility.set_message(801,'HR_52004_SUC_CHK_AVAILABLE');
52: hr_utility.raise_error;
53: Else
47: ElsIf (p_constraint_name = 'PER_SUCCESSION_PLANNING_UK') Then
48: hr_utility.set_message(801,'HR_52005_SUC_CHK_DATE');
49: hr_utility.raise_error;
50: ElsIf (p_constraint_name = 'PER_SUC_AVAIL_FOR_PROMOTION') Then
51: hr_utility.set_message(801,'HR_52004_SUC_CHK_AVAILABLE');
52: hr_utility.raise_error;
53: Else
54: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
55: hr_utility.set_message_token('PROCEDURE', l_proc);
48: hr_utility.set_message(801,'HR_52005_SUC_CHK_DATE');
49: hr_utility.raise_error;
50: ElsIf (p_constraint_name = 'PER_SUC_AVAIL_FOR_PROMOTION') Then
51: hr_utility.set_message(801,'HR_52004_SUC_CHK_AVAILABLE');
52: hr_utility.raise_error;
53: Else
54: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
55: hr_utility.set_message_token('PROCEDURE', l_proc);
56: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
50: ElsIf (p_constraint_name = 'PER_SUC_AVAIL_FOR_PROMOTION') Then
51: hr_utility.set_message(801,'HR_52004_SUC_CHK_AVAILABLE');
52: hr_utility.raise_error;
53: Else
54: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
55: hr_utility.set_message_token('PROCEDURE', l_proc);
56: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
57: hr_utility.raise_error;
58: End If;
51: hr_utility.set_message(801,'HR_52004_SUC_CHK_AVAILABLE');
52: hr_utility.raise_error;
53: Else
54: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
55: hr_utility.set_message_token('PROCEDURE', l_proc);
56: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
57: hr_utility.raise_error;
58: End If;
59: --
52: hr_utility.raise_error;
53: Else
54: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
55: hr_utility.set_message_token('PROCEDURE', l_proc);
56: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
57: hr_utility.raise_error;
58: End If;
59: --
60: hr_utility.set_location(' Leaving:'||l_proc, 10);
53: Else
54: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
55: hr_utility.set_message_token('PROCEDURE', l_proc);
56: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
57: hr_utility.raise_error;
58: End If;
59: --
60: hr_utility.set_location(' Leaving:'||l_proc, 10);
61: End constraint_error;
56: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
57: hr_utility.raise_error;
58: End If;
59: --
60: hr_utility.set_location(' Leaving:'||l_proc, 10);
61: End constraint_error;
62: --
63: -- ----------------------------------------------------------------------------
64: -- |-----------------------------< api_updating >-----------------------------|
113: l_proc varchar2(72) := g_package||'api_updating';
114: l_fct_ret boolean;
115: --
116: Begin
117: hr_utility.set_location('Entering:'||l_proc, 5);
118: --
119: If (
120: p_succession_plan_id is null and
121: p_object_version_number is null
129: If (
130: p_succession_plan_id = g_old_rec.succession_plan_id and
131: p_object_version_number = g_old_rec.object_version_number
132: ) Then
133: hr_utility.set_location(l_proc, 10);
134: --
135: -- The g_old_rec is current therefore we must
136: -- set the returning function to true
137: --
146: Close C_Sel1;
147: --
148: -- The primary key is invalid therefore we must error
149: --
150: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
151: hr_utility.raise_error;
152: End If;
153: Close C_Sel1;
154: If (p_object_version_number <> g_old_rec.object_version_number) Then
147: --
148: -- The primary key is invalid therefore we must error
149: --
150: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
151: hr_utility.raise_error;
152: End If;
153: Close C_Sel1;
154: If (p_object_version_number <> g_old_rec.object_version_number) Then
155: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
151: hr_utility.raise_error;
152: End If;
153: Close C_Sel1;
154: If (p_object_version_number <> g_old_rec.object_version_number) Then
155: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
156: hr_utility.raise_error;
157: End If;
158: hr_utility.set_location(l_proc, 15);
159: l_fct_ret := true;
152: End If;
153: Close C_Sel1;
154: If (p_object_version_number <> g_old_rec.object_version_number) Then
155: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
156: hr_utility.raise_error;
157: End If;
158: hr_utility.set_location(l_proc, 15);
159: l_fct_ret := true;
160: End If;
154: If (p_object_version_number <> g_old_rec.object_version_number) Then
155: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
156: hr_utility.raise_error;
157: End If;
158: hr_utility.set_location(l_proc, 15);
159: l_fct_ret := true;
160: End If;
161: End If;
162: hr_utility.set_location(' Leaving:'||l_proc, 20);
158: hr_utility.set_location(l_proc, 15);
159: l_fct_ret := true;
160: End If;
161: End If;
162: hr_utility.set_location(' Leaving:'||l_proc, 20);
163: Return (l_fct_ret);
164: --
165: End api_updating;
166: --
215: --
216: l_proc varchar2(72) := g_package||'lck';
217: --
218: Begin
219: hr_utility.set_location('Entering:'||l_proc, 5);
220: --
221: -- Add any mandatory argument checking here:
222: -- Example:
223: -- hr_api.mandatory_arg_error
231: Close C_Sel1;
232: --
233: -- The primary key is invalid therefore we must error
234: --
235: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
236: hr_utility.raise_error;
237: End If;
238: Close C_Sel1;
239: If (p_object_version_number <> g_old_rec.object_version_number) Then
232: --
233: -- The primary key is invalid therefore we must error
234: --
235: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
236: hr_utility.raise_error;
237: End If;
238: Close C_Sel1;
239: If (p_object_version_number <> g_old_rec.object_version_number) Then
240: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
236: hr_utility.raise_error;
237: End If;
238: Close C_Sel1;
239: If (p_object_version_number <> g_old_rec.object_version_number) Then
240: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
241: hr_utility.raise_error;
242: End If;
243: --
244: hr_utility.set_location(' Leaving:'||l_proc, 10);
237: End If;
238: Close C_Sel1;
239: If (p_object_version_number <> g_old_rec.object_version_number) Then
240: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
241: hr_utility.raise_error;
242: End If;
243: --
244: hr_utility.set_location(' Leaving:'||l_proc, 10);
245: --
240: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
241: hr_utility.raise_error;
242: End If;
243: --
244: hr_utility.set_location(' Leaving:'||l_proc, 10);
245: --
246: -- We need to trap the ORA LOCK exception
247: --
248: Exception
250: --
251: -- The object is locked therefore we need to supply a meaningful
252: -- error message.
253: --
254: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
255: hr_utility.set_message_token('TABLE_NAME', 'per_succession_planning');
256: hr_utility.raise_error;
257: End lck;
258: --
251: -- The object is locked therefore we need to supply a meaningful
252: -- error message.
253: --
254: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
255: hr_utility.set_message_token('TABLE_NAME', 'per_succession_planning');
256: hr_utility.raise_error;
257: End lck;
258: --
259: -- ----------------------------------------------------------------------------
252: -- error message.
253: --
254: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
255: hr_utility.set_message_token('TABLE_NAME', 'per_succession_planning');
256: hr_utility.raise_error;
257: End lck;
258: --
259: -- ----------------------------------------------------------------------------
260: -- |-----------------------------< convert_args >-----------------------------|
301: l_proc varchar2(72) := g_package||'convert_args';
302: --
303: Begin
304: --
305: hr_utility.set_location('Entering:'||l_proc, 5);
306: --
307: -- Convert arguments into local l_rec structure.
308: --
309: l_rec.succession_plan_id := p_succession_plan_id;
341: l_rec.successee_person_id := p_successee_person_id;
342: --
343: -- Return the plsql record structure.
344: --
345: hr_utility.set_location(' Leaving:'||l_proc, 10);
346: Return(l_rec);
347: --
348: End convert_args;
349: --