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_ELIGY_RL_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_ELIGY_RL_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_ELIGY_RL_F_PK') Then
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_ELIGY_RL_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_ELIGY_RL_F_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: --
36: If (p_constraint_name = 'BEN_ELIGY_RL_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_ELIGY_RL_F_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_ELIGY_RL_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_ELIGY_RL_F_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_ELIGY_RL_F_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_ELIGY_RL_F_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_ELIGY_RL_F_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_ELIGY_RL_F_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 >-----------------------------|
116: l_proc varchar2(72) := g_package||'api_updating';
117: l_fct_ret boolean;
118: --
119: Begin
120: hr_utility.set_location('Entering:'||l_proc, 5);
121: --
122: If (p_effective_date is null or
123: p_prtn_eligy_rl_id is null or
124: p_object_version_number is null) Then
129: l_fct_ret := false;
130: Else
131: If (p_prtn_eligy_rl_id = g_old_rec.prtn_eligy_rl_id and
132: p_object_version_number = g_old_rec.object_version_number) 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: --
186: and p_effective_date
187: between t.effective_start_date and t.effective_end_date;
188: --
189: Begin
190: hr_utility.set_location('Entering:'||l_proc, 5);
191: Open C_Sel1;
192: Fetch C_Sel1 Into l_parent_key_value1;
193: If C_Sel1%notfound then
194: Close C_Sel1;
191: Open C_Sel1;
192: Fetch C_Sel1 Into l_parent_key_value1;
193: If C_Sel1%notfound then
194: Close C_Sel1;
195: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
196: hr_utility.set_message_token('PROCEDURE', l_proc);
197: hr_utility.set_message_token('STEP','10');
198: hr_utility.raise_error;
199: End If;
192: Fetch C_Sel1 Into l_parent_key_value1;
193: If C_Sel1%notfound then
194: Close C_Sel1;
195: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
196: hr_utility.set_message_token('PROCEDURE', l_proc);
197: hr_utility.set_message_token('STEP','10');
198: hr_utility.raise_error;
199: End If;
200: Close C_Sel1;
193: If C_Sel1%notfound then
194: Close C_Sel1;
195: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
196: hr_utility.set_message_token('PROCEDURE', l_proc);
197: hr_utility.set_message_token('STEP','10');
198: hr_utility.raise_error;
199: End If;
200: Close C_Sel1;
201: --
194: Close C_Sel1;
195: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
196: hr_utility.set_message_token('PROCEDURE', l_proc);
197: hr_utility.set_message_token('STEP','10');
198: hr_utility.raise_error;
199: End If;
200: Close C_Sel1;
201: --
202: -- Call the corresponding datetrack api
213: p_delete => p_delete,
214: p_future_change => p_future_change,
215: p_delete_next_change => p_delete_next_change);
216: --
217: hr_utility.set_location(' Leaving:'||l_proc, 10);
218: End find_dt_del_modes;
219: --
220: -- ----------------------------------------------------------------------------
221: -- |--------------------------< find_dt_upd_modes >---------------------------|
230: --
231: l_proc varchar2(72) := g_package||'find_dt_upd_modes';
232: --
233: Begin
234: hr_utility.set_location('Entering:'||l_proc, 5);
235: --
236: -- Call the corresponding datetrack api
237: --
238: dt_api.find_dt_upd_modes
244: p_update => p_update,
245: p_update_override => p_update_override,
246: p_update_change_insert => p_update_change_insert);
247: --
248: hr_utility.set_location(' Leaving:'||l_proc, 10);
249: End find_dt_upd_modes;
250: --
251: -- ----------------------------------------------------------------------------
252: -- |------------------------< upd_effective_end_date >------------------------|
262: l_proc varchar2(72) := g_package||'upd_effective_end_date';
263: l_object_version_number number;
264: --
265: Begin
266: hr_utility.set_location('Entering:'||l_proc, 5);
267: --
268: -- Because we are updating a row we must get the next object
269: -- version number.
270: --
273: (p_base_table_name => 'ben_prtn_eligy_rl_f',
274: p_base_key_column => 'prtn_eligy_rl_id',
275: p_base_key_value => p_base_key_value);
276: --
277: hr_utility.set_location(l_proc, 10);
278: g_api_dml := true; -- Set the api dml status
279: --
280: -- Update the specified datetrack row setting the effective
281: -- end date to the specified new effective end date.
288: between t.effective_start_date and t.effective_end_date;
289: --
290: g_api_dml := false; -- Unset the api dml status
291: p_object_version_number := l_object_version_number;
292: hr_utility.set_location(' Leaving:'||l_proc, 15);
293: --
294: Exception
295: When Others Then
296: g_api_dml := false; -- Unset the api dml status
368: --
369: --
370: --
371: Begin
372: hr_utility.set_location('Entering:'||l_proc, 5);
373: --
374: -- Ensure that all the mandatory arguments are not null
375: --
376: hr_api.mandatory_arg_error(p_api_name => l_proc,
401: Close C_Sel1;
402: --
403: -- The primary key is invalid therefore we must error
404: --
405: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
406: hr_utility.raise_error;
407: End If;
408: Close C_Sel1;
409: If (p_object_version_number <> g_old_rec.object_version_number) Then
402: --
403: -- The primary key is invalid therefore we must error
404: --
405: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
406: hr_utility.raise_error;
407: End If;
408: Close C_Sel1;
409: If (p_object_version_number <> g_old_rec.object_version_number) Then
410: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
406: hr_utility.raise_error;
407: End If;
408: Close C_Sel1;
409: If (p_object_version_number <> g_old_rec.object_version_number) Then
410: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
411: hr_utility.raise_error;
412: End If;
413: hr_utility.set_location(l_proc, 15);
414: --
407: End If;
408: Close C_Sel1;
409: If (p_object_version_number <> g_old_rec.object_version_number) Then
410: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
411: hr_utility.raise_error;
412: End If;
413: hr_utility.set_location(l_proc, 15);
414: --
415: --
409: If (p_object_version_number <> g_old_rec.object_version_number) Then
410: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
411: hr_utility.raise_error;
412: End If;
413: hr_utility.set_location(l_proc, 15);
414: --
415: --
416: -- Validate the datetrack mode mode getting the validation start
417: -- and end dates for the specified datetrack operation.
433: -- We are doing a datetrack 'INSERT' which is illegal within this
434: -- procedure therefore we must error (note: to lck on insert the
435: -- private procedure ins_lck should be called).
436: --
437: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
438: hr_utility.set_message_token('PROCEDURE', l_proc);
439: hr_utility.set_message_token('STEP','20');
440: hr_utility.raise_error;
441: End If;
434: -- procedure therefore we must error (note: to lck on insert the
435: -- private procedure ins_lck should be called).
436: --
437: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
438: hr_utility.set_message_token('PROCEDURE', l_proc);
439: hr_utility.set_message_token('STEP','20');
440: hr_utility.raise_error;
441: End If;
442: --
435: -- private procedure ins_lck should be called).
436: --
437: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
438: hr_utility.set_message_token('PROCEDURE', l_proc);
439: hr_utility.set_message_token('STEP','20');
440: hr_utility.raise_error;
441: End If;
442: --
443: -- Set the validation start and end date OUT arguments
436: --
437: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
438: hr_utility.set_message_token('PROCEDURE', l_proc);
439: hr_utility.set_message_token('STEP','20');
440: hr_utility.raise_error;
441: End If;
442: --
443: -- Set the validation start and end date OUT arguments
444: --
444: --
445: p_validation_start_date := l_validation_start_date;
446: p_validation_end_date := l_validation_end_date;
447: --
448: hr_utility.set_location(' Leaving:'||l_proc, 30);
449: --
450: -- We need to trap the ORA LOCK exception
451: --
452: Exception
454: --
455: -- The object is locked therefore we need to supply a meaningful
456: -- error message.
457: --
458: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
459: hr_utility.set_message_token('TABLE_NAME', 'ben_prtn_eligy_rl_f');
460: hr_utility.raise_error;
461: When l_object_invalid then
462: --
455: -- The object is locked therefore we need to supply a meaningful
456: -- error message.
457: --
458: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
459: hr_utility.set_message_token('TABLE_NAME', 'ben_prtn_eligy_rl_f');
460: hr_utility.raise_error;
461: When l_object_invalid then
462: --
463: -- The object doesn't exist or is invalid
456: -- error message.
457: --
458: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
459: hr_utility.set_message_token('TABLE_NAME', 'ben_prtn_eligy_rl_f');
460: hr_utility.raise_error;
461: When l_object_invalid then
462: --
463: -- The object doesn't exist or is invalid
464: --
461: When l_object_invalid then
462: --
463: -- The object doesn't exist or is invalid
464: --
465: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
466: hr_utility.set_message_token('TABLE_NAME', 'ben_prtn_eligy_rl_f');
467: hr_utility.raise_error;
468: End lck;
469: --
462: --
463: -- The object doesn't exist or is invalid
464: --
465: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
466: hr_utility.set_message_token('TABLE_NAME', 'ben_prtn_eligy_rl_f');
467: hr_utility.raise_error;
468: End lck;
469: --
470: -- ----------------------------------------------------------------------------
463: -- The object doesn't exist or is invalid
464: --
465: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
466: hr_utility.set_message_token('TABLE_NAME', 'ben_prtn_eligy_rl_f');
467: hr_utility.raise_error;
468: End lck;
469: --
470: -- ----------------------------------------------------------------------------
471: -- |-----------------------------< convert_args >-----------------------------|
520: l_proc varchar2(72) := g_package||'convert_args';
521: --
522: Begin
523: --
524: hr_utility.set_location('Entering:'||l_proc, 5);
525: --
526: -- Convert arguments into local l_rec structure.
527: --
528: l_rec.prtn_eligy_rl_id := p_prtn_eligy_rl_id;
568: l_rec.object_version_number := p_object_version_number;
569: --
570: -- Return the plsql record structure.
571: --
572: hr_utility.set_location(' Leaving:'||l_proc, 10);
573: Return(l_rec);
574: --
575: End convert_args;
576: --