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 = 'BEN_ACTN_TYP_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
33: Begin
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_ACTN_TYP_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','5');
40: hr_utility.raise_error;
41: Elsif(p_constraint_name = 'BEN_CM_TYP_USG_F_FK1') Then
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_ACTN_TYP_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','5');
40: hr_utility.raise_error;
41: Elsif(p_constraint_name = 'BEN_CM_TYP_USG_F_FK1') Then
42: ben_utility.child_exists_error(p_table_name => 'BEN_CM_TYP_USG_F');
35: --
36: If (p_constraint_name = 'BEN_ACTN_TYP_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','5');
40: hr_utility.raise_error;
41: Elsif(p_constraint_name = 'BEN_CM_TYP_USG_F_FK1') Then
42: ben_utility.child_exists_error(p_table_name => 'BEN_CM_TYP_USG_F');
43: Elsif(p_constraint_name = 'BEN_POPL_ACTN_TYP_F_FK1') Then
36: If (p_constraint_name = 'BEN_ACTN_TYP_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','5');
40: hr_utility.raise_error;
41: Elsif(p_constraint_name = 'BEN_CM_TYP_USG_F_FK1') Then
42: ben_utility.child_exists_error(p_table_name => 'BEN_CM_TYP_USG_F');
43: Elsif(p_constraint_name = 'BEN_POPL_ACTN_TYP_F_FK1') Then
44: ben_utility.child_exists_error(p_table_name => 'BEN_POPL_ACTN_TYP_F');
44: ben_utility.child_exists_error(p_table_name => 'BEN_POPL_ACTN_TYP_F');
45: Elsif(p_constraint_name = 'BEN_PRTT_ENRT_ACTN_F_FK2') Then
46: ben_utility.child_exists_error(p_table_name => 'BEN_PRTT_ENRT_ACTN_F');
47: Else
48: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
49: hr_utility.set_message_token('PROCEDURE', l_proc);
50: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
51: hr_utility.raise_error;
52: End If;
45: Elsif(p_constraint_name = 'BEN_PRTT_ENRT_ACTN_F_FK2') Then
46: ben_utility.child_exists_error(p_table_name => 'BEN_PRTT_ENRT_ACTN_F');
47: Else
48: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
49: hr_utility.set_message_token('PROCEDURE', l_proc);
50: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
51: hr_utility.raise_error;
52: End If;
53: --
46: ben_utility.child_exists_error(p_table_name => 'BEN_PRTT_ENRT_ACTN_F');
47: Else
48: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
49: hr_utility.set_message_token('PROCEDURE', l_proc);
50: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
51: hr_utility.raise_error;
52: End If;
53: --
54: hr_utility.set_location(' Leaving:'||l_proc, 10);
47: Else
48: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
49: hr_utility.set_message_token('PROCEDURE', l_proc);
50: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
51: hr_utility.raise_error;
52: End If;
53: --
54: hr_utility.set_location(' Leaving:'||l_proc, 10);
55: End constraint_error;
50: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
51: hr_utility.raise_error;
52: End If;
53: --
54: hr_utility.set_location(' Leaving:'||l_proc, 10);
55: End constraint_error;
56: --
57: -- ----------------------------------------------------------------------------
58: -- |-----------------------------< api_updating >-----------------------------|
111: l_proc varchar2(72) := g_package||'api_updating';
112: l_fct_ret boolean;
113: --
114: Begin
115: hr_utility.set_location('Entering:'||l_proc, 5);
116: --
117: If (
118: p_actn_typ_id is null and
119: p_object_version_number is null
127: If (
128: p_actn_typ_id = g_old_rec.actn_typ_id and
129: p_object_version_number = g_old_rec.object_version_number
130: ) Then
131: hr_utility.set_location(l_proc, 10);
132: --
133: -- The g_old_rec is current therefore we must
134: -- set the returning function to true
135: --
144: Close C_Sel1;
145: --
146: -- The primary key is invalid therefore we must error
147: --
148: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
149: hr_utility.raise_error;
150: End If;
151: Close C_Sel1;
152: If (p_object_version_number <> g_old_rec.object_version_number) Then
145: --
146: -- The primary key is invalid therefore we must error
147: --
148: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
149: hr_utility.raise_error;
150: End If;
151: Close C_Sel1;
152: If (p_object_version_number <> g_old_rec.object_version_number) Then
153: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
149: hr_utility.raise_error;
150: End If;
151: Close C_Sel1;
152: If (p_object_version_number <> g_old_rec.object_version_number) Then
153: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
154: hr_utility.raise_error;
155: End If;
156: hr_utility.set_location(l_proc, 15);
157: l_fct_ret := true;
150: End If;
151: Close C_Sel1;
152: If (p_object_version_number <> g_old_rec.object_version_number) Then
153: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
154: hr_utility.raise_error;
155: End If;
156: hr_utility.set_location(l_proc, 15);
157: l_fct_ret := true;
158: End If;
152: If (p_object_version_number <> g_old_rec.object_version_number) Then
153: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
154: hr_utility.raise_error;
155: End If;
156: hr_utility.set_location(l_proc, 15);
157: l_fct_ret := true;
158: End If;
159: End If;
160: hr_utility.set_location(' Leaving:'||l_proc, 20);
156: hr_utility.set_location(l_proc, 15);
157: l_fct_ret := true;
158: End If;
159: End If;
160: hr_utility.set_location(' Leaving:'||l_proc, 20);
161: Return (l_fct_ret);
162: --
163: End api_updating;
164: --
217: --
218: l_proc varchar2(72) := g_package||'lck';
219: --
220: Begin
221: hr_utility.set_location('Entering:'||l_proc, 5);
222: --
223: -- Add any mandatory argument checking here:
224: -- Example:
225: -- hr_api.mandatory_arg_error
233: Close C_Sel1;
234: --
235: -- The primary key is invalid therefore we must error
236: --
237: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
238: hr_utility.raise_error;
239: End If;
240: Close C_Sel1;
241: If (p_object_version_number <> g_old_rec.object_version_number) Then
234: --
235: -- The primary key is invalid therefore we must error
236: --
237: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
238: hr_utility.raise_error;
239: End If;
240: Close C_Sel1;
241: If (p_object_version_number <> g_old_rec.object_version_number) Then
242: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
238: hr_utility.raise_error;
239: End If;
240: Close C_Sel1;
241: If (p_object_version_number <> g_old_rec.object_version_number) Then
242: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
243: hr_utility.raise_error;
244: End If;
245: --
246: hr_utility.set_location(' Leaving:'||l_proc, 10);
239: End If;
240: Close C_Sel1;
241: If (p_object_version_number <> g_old_rec.object_version_number) Then
242: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
243: hr_utility.raise_error;
244: End If;
245: --
246: hr_utility.set_location(' Leaving:'||l_proc, 10);
247: --
242: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
243: hr_utility.raise_error;
244: End If;
245: --
246: hr_utility.set_location(' Leaving:'||l_proc, 10);
247: --
248: -- We need to trap the ORA LOCK exception
249: --
250: Exception
252: --
253: -- The object is locked therefore we need to supply a meaningful
254: -- error message.
255: --
256: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
257: hr_utility.set_message_token('TABLE_NAME', 'ben_actn_typ');
258: hr_utility.raise_error;
259: End lck;
260: --
253: -- The object is locked therefore we need to supply a meaningful
254: -- error message.
255: --
256: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
257: hr_utility.set_message_token('TABLE_NAME', 'ben_actn_typ');
258: hr_utility.raise_error;
259: End lck;
260: --
261: -- ----------------------------------------------------------------------------
254: -- error message.
255: --
256: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
257: hr_utility.set_message_token('TABLE_NAME', 'ben_actn_typ');
258: hr_utility.raise_error;
259: End lck;
260: --
261: -- ----------------------------------------------------------------------------
262: -- |-----------------------------< convert_args >-----------------------------|
307: l_proc varchar2(72) := g_package||'convert_args';
308: --
309: Begin
310: --
311: hr_utility.set_location('Entering:'||l_proc, 5);
312: --
313: -- Convert arguments into local l_rec structure.
314: --
315: l_rec.actn_typ_id := p_actn_typ_id;
351: l_rec.object_version_number := p_object_version_number;
352: --
353: -- Return the plsql record structure.
354: --
355: hr_utility.set_location(' Leaving:'||l_proc, 10);
356: Return(l_rec);
357: --
358: End convert_args;
359: --