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_POPL_YR_PERD_FK1') 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_POPL_YR_PERD_FK1') 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_POPL_YR_PERD_PK') Then
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_POPL_YR_PERD_FK1') 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_POPL_YR_PERD_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: --
36: If (p_constraint_name = 'BEN_POPL_YR_PERD_FK1') 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_POPL_YR_PERD_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
36: If (p_constraint_name = 'BEN_POPL_YR_PERD_FK1') 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_POPL_YR_PERD_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
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_POPL_YR_PERD_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: Else
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_POPL_YR_PERD_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: Else
47: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_POPL_YR_PERD_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: Else
47: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
41: ElsIf (p_constraint_name = 'BEN_POPL_YR_PERD_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: Else
47: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: Else
47: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
50: hr_utility.raise_error;
51: End If;
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: Else
47: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
50: hr_utility.raise_error;
51: End If;
52: --
45: hr_utility.raise_error;
46: Else
47: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
50: hr_utility.raise_error;
51: End If;
52: --
53: hr_utility.set_location(' Leaving:'||l_proc, 10);
46: Else
47: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
50: hr_utility.raise_error;
51: End If;
52: --
53: hr_utility.set_location(' Leaving:'||l_proc, 10);
54: End constraint_error;
49: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
50: hr_utility.raise_error;
51: End If;
52: --
53: hr_utility.set_location(' Leaving:'||l_proc, 10);
54: End constraint_error;
55: --
56: -- ----------------------------------------------------------------------------
57: -- |-----------------------------< 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_popl_yr_perd_id is null and
121: p_object_version_number is null
129: If (
130: p_popl_yr_perd_id = g_old_rec.popl_yr_perd_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: --
222: --
223: l_proc varchar2(72) := g_package||'lck';
224: --
225: Begin
226: hr_utility.set_location('Entering:'||l_proc, 5);
227: --
228: -- Add any mandatory argument checking here:
229: -- Example:
230: -- hr_api.mandatory_arg_error
238: Close C_Sel1;
239: --
240: -- The primary key is invalid therefore we must error
241: --
242: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
243: hr_utility.raise_error;
244: End If;
245: Close C_Sel1;
246: If (p_object_version_number <> g_old_rec.object_version_number) Then
239: --
240: -- The primary key is invalid therefore we must error
241: --
242: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
243: hr_utility.raise_error;
244: End If;
245: Close C_Sel1;
246: If (p_object_version_number <> g_old_rec.object_version_number) Then
247: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
243: hr_utility.raise_error;
244: End If;
245: Close C_Sel1;
246: If (p_object_version_number <> g_old_rec.object_version_number) Then
247: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
248: hr_utility.raise_error;
249: End If;
250: --
251: hr_utility.set_location(' Leaving:'||l_proc, 10);
244: End If;
245: Close C_Sel1;
246: If (p_object_version_number <> g_old_rec.object_version_number) Then
247: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
248: hr_utility.raise_error;
249: End If;
250: --
251: hr_utility.set_location(' Leaving:'||l_proc, 10);
252: --
247: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
248: hr_utility.raise_error;
249: End If;
250: --
251: hr_utility.set_location(' Leaving:'||l_proc, 10);
252: --
253: -- We need to trap the ORA LOCK exception
254: --
255: Exception
257: --
258: -- The object is locked therefore we need to supply a meaningful
259: -- error message.
260: --
261: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
262: hr_utility.set_message_token('TABLE_NAME', 'ben_popl_yr_perd');
263: hr_utility.raise_error;
264: End lck;
265: --
258: -- The object is locked therefore we need to supply a meaningful
259: -- error message.
260: --
261: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
262: hr_utility.set_message_token('TABLE_NAME', 'ben_popl_yr_perd');
263: hr_utility.raise_error;
264: End lck;
265: --
266: -- ----------------------------------------------------------------------------
259: -- error message.
260: --
261: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
262: hr_utility.set_message_token('TABLE_NAME', 'ben_popl_yr_perd');
263: hr_utility.raise_error;
264: End lck;
265: --
266: -- ----------------------------------------------------------------------------
267: -- |-----------------------------< convert_args >-----------------------------|
315: l_proc varchar2(72) := g_package||'convert_args';
316: --
317: Begin
318: --
319: hr_utility.set_location('Entering:'||l_proc, 5);
320: --
321: -- Convert arguments into local l_rec structure.
322: --
323: l_rec.popl_yr_perd_id := p_popl_yr_perd_id;
362: l_rec.object_version_number := p_object_version_number;
363: --
364: -- Return the plsql record structure.
365: --
366: hr_utility.set_location(' Leaving:'||l_proc, 10);
367: Return(l_rec);
368: --
369: End convert_args;
370: --