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_PRTN_ELIG_PRFL_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_PRTN_ELIG_PRFL_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_PRTN_ELIG_PRFL_PK') Then
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_PRTN_ELIG_PRFL_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_PRTN_ELIG_PRFL_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: --
36: If (p_constraint_name = 'BEN_PRTN_ELIG_PRFL_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_PRTN_ELIG_PRFL_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_PRTN_ELIG_PRFL_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_PRTN_ELIG_PRFL_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_PRTN_ELIG_PRFL_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_PRTN_ELIG_PRFL_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_PRTN_ELIG_PRFL_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_PRTN_ELIG_PRFL_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_elig_prfl_id is null or
124: p_object_version_number is null) Then
129: l_fct_ret := false;
130: Else
131: If (p_prtn_elig_prfl_id = g_old_rec.prtn_elig_prfl_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: --
188: and p_effective_date
189: between t.effective_start_date and t.effective_end_date;
190: --
191: Begin
192: hr_utility.set_location('Entering:'||l_proc, 5);
193: Open C_Sel1;
194: Fetch C_Sel1 Into l_parent_key_value1,
195: l_parent_key_value2;
196: If C_Sel1%notfound then
194: Fetch C_Sel1 Into l_parent_key_value1,
195: l_parent_key_value2;
196: If C_Sel1%notfound then
197: Close C_Sel1;
198: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
199: hr_utility.set_message_token('PROCEDURE', l_proc);
200: hr_utility.set_message_token('STEP','10');
201: hr_utility.raise_error;
202: End If;
195: l_parent_key_value2;
196: If C_Sel1%notfound then
197: Close C_Sel1;
198: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
199: hr_utility.set_message_token('PROCEDURE', l_proc);
200: hr_utility.set_message_token('STEP','10');
201: hr_utility.raise_error;
202: End If;
203: Close C_Sel1;
196: If C_Sel1%notfound then
197: Close C_Sel1;
198: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
199: hr_utility.set_message_token('PROCEDURE', l_proc);
200: hr_utility.set_message_token('STEP','10');
201: hr_utility.raise_error;
202: End If;
203: Close C_Sel1;
204: --
197: Close C_Sel1;
198: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
199: hr_utility.set_message_token('PROCEDURE', l_proc);
200: hr_utility.set_message_token('STEP','10');
201: hr_utility.raise_error;
202: End If;
203: Close C_Sel1;
204: --
205: -- Call the corresponding datetrack api
219: p_delete => p_delete,
220: p_future_change => p_future_change,
221: p_delete_next_change => p_delete_next_change);
222: --
223: hr_utility.set_location(' Leaving:'||l_proc, 10);
224: End find_dt_del_modes;
225: --
226: -- ----------------------------------------------------------------------------
227: -- |--------------------------< find_dt_upd_modes >---------------------------|
236: --
237: l_proc varchar2(72) := g_package||'find_dt_upd_modes';
238: --
239: Begin
240: hr_utility.set_location('Entering:'||l_proc, 5);
241: --
242: -- Call the corresponding datetrack api
243: --
244: dt_api.find_dt_upd_modes
250: p_update => p_update,
251: p_update_override => p_update_override,
252: p_update_change_insert => p_update_change_insert);
253: --
254: hr_utility.set_location(' Leaving:'||l_proc, 10);
255: End find_dt_upd_modes;
256: --
257: -- ----------------------------------------------------------------------------
258: -- |------------------------< upd_effective_end_date >------------------------|
268: l_proc varchar2(72) := g_package||'upd_effective_end_date';
269: l_object_version_number number;
270: --
271: Begin
272: hr_utility.set_location('Entering:'||l_proc, 5);
273: --
274: -- Because we are updating a row we must get the next object
275: -- version number.
276: --
279: (p_base_table_name => 'ben_prtn_elig_prfl_f',
280: p_base_key_column => 'prtn_elig_prfl_id',
281: p_base_key_value => p_base_key_value);
282: --
283: hr_utility.set_location(l_proc, 10);
284: g_api_dml := true; -- Set the api dml status
285: --
286: -- Update the specified datetrack row setting the effective
287: -- end date to the specified new effective end date.
294: between t.effective_start_date and t.effective_end_date;
295: --
296: g_api_dml := false; -- Unset the api dml status
297: p_object_version_number := l_object_version_number;
298: hr_utility.set_location(' Leaving:'||l_proc, 15);
299: --
300: Exception
301: When Others Then
302: g_api_dml := false; -- Unset the api dml status
374: --
375: --
376: --
377: Begin
378: hr_utility.set_location('Entering:'||l_proc, 5);
379: --
380: -- Ensure that all the mandatory arguments are not null
381: --
382: hr_api.mandatory_arg_error(p_api_name => l_proc,
407: Close C_Sel1;
408: --
409: -- The primary key is invalid therefore we must error
410: --
411: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
412: hr_utility.raise_error;
413: End If;
414: Close C_Sel1;
415: If (p_object_version_number <> g_old_rec.object_version_number) Then
408: --
409: -- The primary key is invalid therefore we must error
410: --
411: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
412: hr_utility.raise_error;
413: End If;
414: Close C_Sel1;
415: If (p_object_version_number <> g_old_rec.object_version_number) Then
416: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
412: hr_utility.raise_error;
413: End If;
414: Close C_Sel1;
415: If (p_object_version_number <> g_old_rec.object_version_number) Then
416: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
417: hr_utility.raise_error;
418: End If;
419: hr_utility.set_location(l_proc, 15);
420: --
413: End If;
414: Close C_Sel1;
415: If (p_object_version_number <> g_old_rec.object_version_number) Then
416: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
417: hr_utility.raise_error;
418: End If;
419: hr_utility.set_location(l_proc, 15);
420: --
421: --
415: If (p_object_version_number <> g_old_rec.object_version_number) Then
416: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
417: hr_utility.raise_error;
418: End If;
419: hr_utility.set_location(l_proc, 15);
420: --
421: --
422: -- Validate the datetrack mode mode getting the validation start
423: -- and end dates for the specified datetrack operation.
442: -- We are doing a datetrack 'INSERT' which is illegal within this
443: -- procedure therefore we must error (note: to lck on insert the
444: -- private procedure ins_lck should be called).
445: --
446: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
447: hr_utility.set_message_token('PROCEDURE', l_proc);
448: hr_utility.set_message_token('STEP','20');
449: hr_utility.raise_error;
450: End If;
443: -- procedure therefore we must error (note: to lck on insert the
444: -- private procedure ins_lck should be called).
445: --
446: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
447: hr_utility.set_message_token('PROCEDURE', l_proc);
448: hr_utility.set_message_token('STEP','20');
449: hr_utility.raise_error;
450: End If;
451: --
444: -- private procedure ins_lck should be called).
445: --
446: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
447: hr_utility.set_message_token('PROCEDURE', l_proc);
448: hr_utility.set_message_token('STEP','20');
449: hr_utility.raise_error;
450: End If;
451: --
452: -- Set the validation start and end date OUT arguments
445: --
446: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
447: hr_utility.set_message_token('PROCEDURE', l_proc);
448: hr_utility.set_message_token('STEP','20');
449: hr_utility.raise_error;
450: End If;
451: --
452: -- Set the validation start and end date OUT arguments
453: --
453: --
454: p_validation_start_date := l_validation_start_date;
455: p_validation_end_date := l_validation_end_date;
456: --
457: hr_utility.set_location(' Leaving:'||l_proc, 30);
458: --
459: -- We need to trap the ORA LOCK exception
460: --
461: Exception
463: --
464: -- The object is locked therefore we need to supply a meaningful
465: -- error message.
466: --
467: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
468: hr_utility.set_message_token('TABLE_NAME', 'ben_prtn_elig_prfl_f');
469: hr_utility.raise_error;
470: When l_object_invalid then
471: --
464: -- The object is locked therefore we need to supply a meaningful
465: -- error message.
466: --
467: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
468: hr_utility.set_message_token('TABLE_NAME', 'ben_prtn_elig_prfl_f');
469: hr_utility.raise_error;
470: When l_object_invalid then
471: --
472: -- The object doesn't exist or is invalid
465: -- error message.
466: --
467: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
468: hr_utility.set_message_token('TABLE_NAME', 'ben_prtn_elig_prfl_f');
469: hr_utility.raise_error;
470: When l_object_invalid then
471: --
472: -- The object doesn't exist or is invalid
473: --
470: When l_object_invalid then
471: --
472: -- The object doesn't exist or is invalid
473: --
474: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
475: hr_utility.set_message_token('TABLE_NAME', 'ben_prtn_elig_prfl_f');
476: hr_utility.raise_error;
477: End lck;
478: --
471: --
472: -- The object doesn't exist or is invalid
473: --
474: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
475: hr_utility.set_message_token('TABLE_NAME', 'ben_prtn_elig_prfl_f');
476: hr_utility.raise_error;
477: End lck;
478: --
479: -- ----------------------------------------------------------------------------
472: -- The object doesn't exist or is invalid
473: --
474: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
475: hr_utility.set_message_token('TABLE_NAME', 'ben_prtn_elig_prfl_f');
476: hr_utility.raise_error;
477: End lck;
478: --
479: -- ----------------------------------------------------------------------------
480: -- |-----------------------------< convert_args >-----------------------------|
529: l_proc varchar2(72) := g_package||'convert_args';
530: --
531: Begin
532: --
533: hr_utility.set_location('Entering:'||l_proc, 5);
534: --
535: -- Convert arguments into local l_rec structure.
536: --
537: l_rec.prtn_elig_prfl_id := p_prtn_elig_prfl_id;
577: l_rec.compute_score_flag := p_compute_score_flag;
578: --
579: -- Return the plsql record structure.
580: --
581: hr_utility.set_location(' Leaving:'||l_proc, 10);
582: Return(l_rec);
583: --
584: End convert_args;
585: --