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_LEE_RSN_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_LEE_RSN_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_LEE_RSN_F_PK') Then
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_LEE_RSN_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_LEE_RSN_F_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: --
36: If (p_constraint_name = 'BEN_LEE_RSN_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_LEE_RSN_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_LEE_RSN_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_LEE_RSN_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_LEE_RSN_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_LEE_RSN_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_LEE_RSN_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_LEE_RSN_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 >-----------------------------|
137: l_proc varchar2(72) := g_package||'api_updating';
138: l_fct_ret boolean;
139: --
140: Begin
141: hr_utility.set_location('Entering:'||l_proc, 5);
142: --
143: If (p_effective_date is null or
144: p_lee_rsn_id is null or
145: p_object_version_number is null) Then
150: l_fct_ret := false;
151: Else
152: If (p_lee_rsn_id = g_old_rec.lee_rsn_id and
153: p_object_version_number = g_old_rec.object_version_number) Then
154: hr_utility.set_location(l_proc, 10);
155: --
156: -- The g_old_rec is current therefore we must
157: -- set the returning function to true
158: --
167: Close C_Sel1;
168: --
169: -- The primary key is invalid therefore we must error
170: --
171: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
172: hr_utility.raise_error;
173: End If;
174: Close C_Sel1;
175: If (p_object_version_number <> g_old_rec.object_version_number) Then
168: --
169: -- The primary key is invalid therefore we must error
170: --
171: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
172: hr_utility.raise_error;
173: End If;
174: Close C_Sel1;
175: If (p_object_version_number <> g_old_rec.object_version_number) Then
176: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
172: hr_utility.raise_error;
173: End If;
174: Close C_Sel1;
175: If (p_object_version_number <> g_old_rec.object_version_number) Then
176: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
177: hr_utility.raise_error;
178: End If;
179: hr_utility.set_location(l_proc, 15);
180: l_fct_ret := true;
173: End If;
174: Close C_Sel1;
175: If (p_object_version_number <> g_old_rec.object_version_number) Then
176: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
177: hr_utility.raise_error;
178: End If;
179: hr_utility.set_location(l_proc, 15);
180: l_fct_ret := true;
181: End If;
175: If (p_object_version_number <> g_old_rec.object_version_number) Then
176: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
177: hr_utility.raise_error;
178: End If;
179: hr_utility.set_location(l_proc, 15);
180: l_fct_ret := true;
181: End If;
182: End If;
183: hr_utility.set_location(' Leaving:'||l_proc, 20);
179: hr_utility.set_location(l_proc, 15);
180: l_fct_ret := true;
181: End If;
182: End If;
183: hr_utility.set_location(' Leaving:'||l_proc, 20);
184: Return (l_fct_ret);
185: --
186: End api_updating;
187: --
207: and p_effective_date
208: between t.effective_start_date and t.effective_end_date;
209: --
210: Begin
211: hr_utility.set_location('Entering:'||l_proc, 5);
212: Open C_Sel1;
213: Fetch C_Sel1 Into l_parent_key_value1;
214: If C_Sel1%notfound then
215: Close C_Sel1;
212: Open C_Sel1;
213: Fetch C_Sel1 Into l_parent_key_value1;
214: If C_Sel1%notfound then
215: Close C_Sel1;
216: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
217: hr_utility.set_message_token('PROCEDURE', l_proc);
218: hr_utility.set_message_token('STEP','10');
219: hr_utility.raise_error;
220: End If;
213: Fetch C_Sel1 Into l_parent_key_value1;
214: If C_Sel1%notfound then
215: Close C_Sel1;
216: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
217: hr_utility.set_message_token('PROCEDURE', l_proc);
218: hr_utility.set_message_token('STEP','10');
219: hr_utility.raise_error;
220: End If;
221: Close C_Sel1;
214: If C_Sel1%notfound then
215: Close C_Sel1;
216: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
217: hr_utility.set_message_token('PROCEDURE', l_proc);
218: hr_utility.set_message_token('STEP','10');
219: hr_utility.raise_error;
220: End If;
221: Close C_Sel1;
222: --
215: Close C_Sel1;
216: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
217: hr_utility.set_message_token('PROCEDURE', l_proc);
218: hr_utility.set_message_token('STEP','10');
219: hr_utility.raise_error;
220: End If;
221: Close C_Sel1;
222: --
223: -- Call the corresponding datetrack api
234: p_delete => p_delete,
235: p_future_change => p_future_change,
236: p_delete_next_change => p_delete_next_change);
237: --
238: hr_utility.set_location(' Leaving:'||l_proc, 10);
239: End find_dt_del_modes;
240: --
241: -- ----------------------------------------------------------------------------
242: -- |--------------------------< find_dt_upd_modes >---------------------------|
251: --
252: l_proc varchar2(72) := g_package||'find_dt_upd_modes';
253: --
254: Begin
255: hr_utility.set_location('Entering:'||l_proc, 5);
256: --
257: -- Call the corresponding datetrack api
258: --
259: dt_api.find_dt_upd_modes
265: p_update => p_update,
266: p_update_override => p_update_override,
267: p_update_change_insert => p_update_change_insert);
268: --
269: hr_utility.set_location(' Leaving:'||l_proc, 10);
270: End find_dt_upd_modes;
271: --
272: -- ----------------------------------------------------------------------------
273: -- |------------------------< upd_effective_end_date >------------------------|
283: l_proc varchar2(72) := g_package||'upd_effective_end_date';
284: l_object_version_number number;
285: --
286: Begin
287: hr_utility.set_location('Entering:'||l_proc, 5);
288: --
289: -- Because we are updating a row we must get the next object
290: -- version number.
291: --
294: (p_base_table_name => 'ben_lee_rsn_f',
295: p_base_key_column => 'lee_rsn_id',
296: p_base_key_value => p_base_key_value);
297: --
298: hr_utility.set_location(l_proc, 10);
299: g_api_dml := true; -- Set the api dml status
300: --
301: -- Update the specified datetrack row setting the effective
302: -- end date to the specified new effective end date.
309: between t.effective_start_date and t.effective_end_date;
310: --
311: g_api_dml := false; -- Unset the api dml status
312: p_object_version_number := l_object_version_number;
313: hr_utility.set_location(' Leaving:'||l_proc, 15);
314: --
315: Exception
316: When Others Then
317: g_api_dml := false; -- Unset the api dml status
410: --
411: --
412: --
413: Begin
414: hr_utility.set_location('Entering:'||l_proc, 5);
415: --
416: -- Ensure that all the mandatory arguments are not null
417: --
418: hr_api.mandatory_arg_error(p_api_name => l_proc,
443: Close C_Sel1;
444: --
445: -- The primary key is invalid therefore we must error
446: --
447: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
448: hr_utility.raise_error;
449: End If;
450: Close C_Sel1;
451: If (p_object_version_number <> g_old_rec.object_version_number) Then
444: --
445: -- The primary key is invalid therefore we must error
446: --
447: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
448: hr_utility.raise_error;
449: End If;
450: Close C_Sel1;
451: If (p_object_version_number <> g_old_rec.object_version_number) Then
452: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
448: hr_utility.raise_error;
449: End If;
450: Close C_Sel1;
451: If (p_object_version_number <> g_old_rec.object_version_number) Then
452: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
453: hr_utility.raise_error;
454: End If;
455: hr_utility.set_location(l_proc, 15);
456: --
449: End If;
450: Close C_Sel1;
451: If (p_object_version_number <> g_old_rec.object_version_number) Then
452: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
453: hr_utility.raise_error;
454: End If;
455: hr_utility.set_location(l_proc, 15);
456: --
457: --
451: If (p_object_version_number <> g_old_rec.object_version_number) Then
452: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
453: hr_utility.raise_error;
454: End If;
455: hr_utility.set_location(l_proc, 15);
456: --
457: --
458: -- Validate the datetrack mode mode getting the validation start
459: -- and end dates for the specified datetrack operation.
481: -- We are doing a datetrack 'INSERT' which is illegal within this
482: -- procedure therefore we must error (note: to lck on insert the
483: -- private procedure ins_lck should be called).
484: --
485: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
486: hr_utility.set_message_token('PROCEDURE', l_proc);
487: hr_utility.set_message_token('STEP','20');
488: hr_utility.raise_error;
489: End If;
482: -- procedure therefore we must error (note: to lck on insert the
483: -- private procedure ins_lck should be called).
484: --
485: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
486: hr_utility.set_message_token('PROCEDURE', l_proc);
487: hr_utility.set_message_token('STEP','20');
488: hr_utility.raise_error;
489: End If;
490: --
483: -- private procedure ins_lck should be called).
484: --
485: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
486: hr_utility.set_message_token('PROCEDURE', l_proc);
487: hr_utility.set_message_token('STEP','20');
488: hr_utility.raise_error;
489: End If;
490: --
491: -- Set the validation start and end date OUT arguments
484: --
485: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
486: hr_utility.set_message_token('PROCEDURE', l_proc);
487: hr_utility.set_message_token('STEP','20');
488: hr_utility.raise_error;
489: End If;
490: --
491: -- Set the validation start and end date OUT arguments
492: --
492: --
493: p_validation_start_date := l_validation_start_date;
494: p_validation_end_date := l_validation_end_date;
495: --
496: hr_utility.set_location(' Leaving:'||l_proc, 30);
497: --
498: -- We need to trap the ORA LOCK exception
499: --
500: Exception
502: --
503: -- The object is locked therefore we need to supply a meaningful
504: -- error message.
505: --
506: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
507: hr_utility.set_message_token('TABLE_NAME', 'ben_lee_rsn_f');
508: hr_utility.raise_error;
509: When l_object_invalid then
510: --
503: -- The object is locked therefore we need to supply a meaningful
504: -- error message.
505: --
506: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
507: hr_utility.set_message_token('TABLE_NAME', 'ben_lee_rsn_f');
508: hr_utility.raise_error;
509: When l_object_invalid then
510: --
511: -- The object doesn't exist or is invalid
504: -- error message.
505: --
506: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
507: hr_utility.set_message_token('TABLE_NAME', 'ben_lee_rsn_f');
508: hr_utility.raise_error;
509: When l_object_invalid then
510: --
511: -- The object doesn't exist or is invalid
512: --
509: When l_object_invalid then
510: --
511: -- The object doesn't exist or is invalid
512: --
513: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
514: hr_utility.set_message_token('TABLE_NAME', 'ben_lee_rsn_f');
515: hr_utility.raise_error;
516: End lck;
517: --
510: --
511: -- The object doesn't exist or is invalid
512: --
513: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
514: hr_utility.set_message_token('TABLE_NAME', 'ben_lee_rsn_f');
515: hr_utility.raise_error;
516: End lck;
517: --
518: -- ----------------------------------------------------------------------------
511: -- The object doesn't exist or is invalid
512: --
513: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
514: hr_utility.set_message_token('TABLE_NAME', 'ben_lee_rsn_f');
515: hr_utility.raise_error;
516: End lck;
517: --
518: -- ----------------------------------------------------------------------------
519: -- |-----------------------------< convert_args >-----------------------------|
589: l_proc varchar2(72) := g_package||'convert_args';
590: --
591: Begin
592: --
593: hr_utility.set_location('Entering:'||l_proc, 5);
594: --
595: -- Convert arguments into local l_rec structure.
596: --
597: l_rec.lee_rsn_id := p_lee_rsn_id;
658: l_rec.defer_deenrol_flag := p_defer_deenrol_flag;
659: --
660: -- Return the plsql record structure.
661: --
662: hr_utility.set_location(' Leaving:'||l_proc, 10);
663: Return(l_rec);
664: --
665: End convert_args;
666: --