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_LER_CHG_PL_NIP_ENRT_FK2') 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_LER_CHG_PL_NIP_ENRT_FK2') 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_LER_CHG_PL_NIP_ENRT_PK') Then
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_LER_CHG_PL_NIP_ENRT_FK2') 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_LER_CHG_PL_NIP_ENRT_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: --
36: If (p_constraint_name = 'BEN_LER_CHG_PL_NIP_ENRT_FK2') 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_LER_CHG_PL_NIP_ENRT_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_LER_CHG_PL_NIP_ENRT_FK2') 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_LER_CHG_PL_NIP_ENRT_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_LER_CHG_PL_NIP_ENRT_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_LER_CHG_PL_NIP_ENRT_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_LER_CHG_PL_NIP_ENRT_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_LER_CHG_PL_NIP_ENRT_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 >-----------------------------|
123: l_proc varchar2(72) := g_package||'api_updating';
124: l_fct_ret boolean;
125: --
126: Begin
127: hr_utility.set_location('Entering:'||l_proc, 5);
128: --
129: If (p_effective_date is null or
130: p_ler_chg_pl_nip_enrt_id is null or
131: p_object_version_number is null) Then
136: l_fct_ret := false;
137: Else
138: If (p_ler_chg_pl_nip_enrt_id = g_old_rec.ler_chg_pl_nip_enrt_id and
139: p_object_version_number = g_old_rec.object_version_number) Then
140: hr_utility.set_location(l_proc, 10);
141: --
142: -- The g_old_rec is current therefore we must
143: -- set the returning function to true
144: --
153: Close C_Sel1;
154: --
155: -- The primary key is invalid therefore we must error
156: --
157: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
158: hr_utility.raise_error;
159: End If;
160: Close C_Sel1;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
154: --
155: -- The primary key is invalid therefore we must error
156: --
157: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
158: hr_utility.raise_error;
159: End If;
160: Close C_Sel1;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
162: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
158: hr_utility.raise_error;
159: End If;
160: Close C_Sel1;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
162: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
163: hr_utility.raise_error;
164: End If;
165: hr_utility.set_location(l_proc, 15);
166: l_fct_ret := true;
159: End If;
160: Close C_Sel1;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
162: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
163: hr_utility.raise_error;
164: End If;
165: hr_utility.set_location(l_proc, 15);
166: l_fct_ret := true;
167: End If;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
162: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
163: hr_utility.raise_error;
164: End If;
165: hr_utility.set_location(l_proc, 15);
166: l_fct_ret := true;
167: End If;
168: End If;
169: hr_utility.set_location(' Leaving:'||l_proc, 20);
165: hr_utility.set_location(l_proc, 15);
166: l_fct_ret := true;
167: End If;
168: End If;
169: hr_utility.set_location(' Leaving:'||l_proc, 20);
170: Return (l_fct_ret);
171: --
172: End api_updating;
173: --
193: and p_effective_date
194: between t.effective_start_date and t.effective_end_date;
195: --
196: Begin
197: hr_utility.set_location('Entering:'||l_proc, 5);
198: Open C_Sel1;
199: Fetch C_Sel1 Into l_parent_key_value1;
200: If C_Sel1%notfound then
201: Close C_Sel1;
198: Open C_Sel1;
199: Fetch C_Sel1 Into l_parent_key_value1;
200: If C_Sel1%notfound then
201: Close C_Sel1;
202: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
203: hr_utility.set_message_token('PROCEDURE', l_proc);
204: hr_utility.set_message_token('STEP','10');
205: hr_utility.raise_error;
206: End If;
199: Fetch C_Sel1 Into l_parent_key_value1;
200: If C_Sel1%notfound then
201: Close C_Sel1;
202: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
203: hr_utility.set_message_token('PROCEDURE', l_proc);
204: hr_utility.set_message_token('STEP','10');
205: hr_utility.raise_error;
206: End If;
207: Close C_Sel1;
200: If C_Sel1%notfound then
201: Close C_Sel1;
202: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
203: hr_utility.set_message_token('PROCEDURE', l_proc);
204: hr_utility.set_message_token('STEP','10');
205: hr_utility.raise_error;
206: End If;
207: Close C_Sel1;
208: --
201: Close C_Sel1;
202: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
203: hr_utility.set_message_token('PROCEDURE', l_proc);
204: hr_utility.set_message_token('STEP','10');
205: hr_utility.raise_error;
206: End If;
207: Close C_Sel1;
208: --
209: -- Call the corresponding datetrack api
220: p_delete => p_delete,
221: p_future_change => p_future_change,
222: p_delete_next_change => p_delete_next_change);
223: --
224: hr_utility.set_location(' Leaving:'||l_proc, 10);
225: End find_dt_del_modes;
226: --
227: -- ----------------------------------------------------------------------------
228: -- |--------------------------< find_dt_upd_modes >---------------------------|
237: --
238: l_proc varchar2(72) := g_package||'find_dt_upd_modes';
239: --
240: Begin
241: hr_utility.set_location('Entering:'||l_proc, 5);
242: --
243: -- Call the corresponding datetrack api
244: --
245: dt_api.find_dt_upd_modes
251: p_update => p_update,
252: p_update_override => p_update_override,
253: p_update_change_insert => p_update_change_insert);
254: --
255: hr_utility.set_location(' Leaving:'||l_proc, 10);
256: End find_dt_upd_modes;
257: --
258: -- ----------------------------------------------------------------------------
259: -- |------------------------< upd_effective_end_date >------------------------|
269: l_proc varchar2(72) := g_package||'upd_effective_end_date';
270: l_object_version_number number;
271: --
272: Begin
273: hr_utility.set_location('Entering:'||l_proc, 5);
274: --
275: -- Because we are updating a row we must get the next object
276: -- version number.
277: --
280: (p_base_table_name => 'ben_ler_chg_pl_nip_enrt_f',
281: p_base_key_column => 'ler_chg_pl_nip_enrt_id',
282: p_base_key_value => p_base_key_value);
283: --
284: hr_utility.set_location(l_proc, 10);
285: g_api_dml := true; -- Set the api dml status
286: --
287: -- Update the specified datetrack row setting the effective
288: -- end date to the specified new effective end date.
295: between t.effective_start_date and t.effective_end_date;
296: --
297: g_api_dml := false; -- Unset the api dml status
298: p_object_version_number := l_object_version_number;
299: hr_utility.set_location(' Leaving:'||l_proc, 15);
300: --
301: Exception
302: When Others Then
303: g_api_dml := false; -- Unset the api dml status
382: --
383: --
384: --
385: Begin
386: hr_utility.set_location('Entering:'||l_proc, 5);
387: --
388: -- Ensure that all the mandatory arguments are not null
389: --
390: hr_api.mandatory_arg_error(p_api_name => l_proc,
415: Close C_Sel1;
416: --
417: -- The primary key is invalid therefore we must error
418: --
419: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
420: hr_utility.raise_error;
421: End If;
422: Close C_Sel1;
423: If (p_object_version_number <> g_old_rec.object_version_number) Then
416: --
417: -- The primary key is invalid therefore we must error
418: --
419: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
420: hr_utility.raise_error;
421: End If;
422: Close C_Sel1;
423: If (p_object_version_number <> g_old_rec.object_version_number) Then
424: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
420: hr_utility.raise_error;
421: End If;
422: Close C_Sel1;
423: If (p_object_version_number <> g_old_rec.object_version_number) Then
424: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
425: hr_utility.raise_error;
426: End If;
427: hr_utility.set_location(l_proc, 15);
428: --
421: End If;
422: Close C_Sel1;
423: If (p_object_version_number <> g_old_rec.object_version_number) Then
424: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
425: hr_utility.raise_error;
426: End If;
427: hr_utility.set_location(l_proc, 15);
428: --
429: --
423: If (p_object_version_number <> g_old_rec.object_version_number) Then
424: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
425: hr_utility.raise_error;
426: End If;
427: hr_utility.set_location(l_proc, 15);
428: --
429: --
430: -- Validate the datetrack mode mode getting the validation start
431: -- and end dates for the specified datetrack operation.
449: -- We are doing a datetrack 'INSERT' which is illegal within this
450: -- procedure therefore we must error (note: to lck on insert the
451: -- private procedure ins_lck should be called).
452: --
453: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
454: hr_utility.set_message_token('PROCEDURE', l_proc);
455: hr_utility.set_message_token('STEP','20');
456: hr_utility.raise_error;
457: End If;
450: -- procedure therefore we must error (note: to lck on insert the
451: -- private procedure ins_lck should be called).
452: --
453: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
454: hr_utility.set_message_token('PROCEDURE', l_proc);
455: hr_utility.set_message_token('STEP','20');
456: hr_utility.raise_error;
457: End If;
458: --
451: -- private procedure ins_lck should be called).
452: --
453: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
454: hr_utility.set_message_token('PROCEDURE', l_proc);
455: hr_utility.set_message_token('STEP','20');
456: hr_utility.raise_error;
457: End If;
458: --
459: -- Set the validation start and end date OUT arguments
452: --
453: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
454: hr_utility.set_message_token('PROCEDURE', l_proc);
455: hr_utility.set_message_token('STEP','20');
456: hr_utility.raise_error;
457: End If;
458: --
459: -- Set the validation start and end date OUT arguments
460: --
460: --
461: p_validation_start_date := l_validation_start_date;
462: p_validation_end_date := l_validation_end_date;
463: --
464: hr_utility.set_location(' Leaving:'||l_proc, 30);
465: --
466: -- We need to trap the ORA LOCK exception
467: --
468: Exception
470: --
471: -- The object is locked therefore we need to supply a meaningful
472: -- error message.
473: --
474: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
475: hr_utility.set_message_token('TABLE_NAME', 'ben_ler_chg_pl_nip_enrt_f');
476: hr_utility.raise_error;
477: When l_object_invalid then
478: --
471: -- The object is locked therefore we need to supply a meaningful
472: -- error message.
473: --
474: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
475: hr_utility.set_message_token('TABLE_NAME', 'ben_ler_chg_pl_nip_enrt_f');
476: hr_utility.raise_error;
477: When l_object_invalid then
478: --
479: -- The object doesn't exist or is invalid
472: -- error message.
473: --
474: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
475: hr_utility.set_message_token('TABLE_NAME', 'ben_ler_chg_pl_nip_enrt_f');
476: hr_utility.raise_error;
477: When l_object_invalid then
478: --
479: -- The object doesn't exist or is invalid
480: --
477: When l_object_invalid then
478: --
479: -- The object doesn't exist or is invalid
480: --
481: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
482: hr_utility.set_message_token('TABLE_NAME', 'ben_ler_chg_pl_nip_enrt_f');
483: hr_utility.raise_error;
484: End lck;
485: --
478: --
479: -- The object doesn't exist or is invalid
480: --
481: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
482: hr_utility.set_message_token('TABLE_NAME', 'ben_ler_chg_pl_nip_enrt_f');
483: hr_utility.raise_error;
484: End lck;
485: --
486: -- ----------------------------------------------------------------------------
479: -- The object doesn't exist or is invalid
480: --
481: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
482: hr_utility.set_message_token('TABLE_NAME', 'ben_ler_chg_pl_nip_enrt_f');
483: hr_utility.raise_error;
484: End lck;
485: --
486: -- ----------------------------------------------------------------------------
487: -- |-----------------------------< convert_args >-----------------------------|
543: l_proc varchar2(72) := g_package||'convert_args';
544: --
545: Begin
546: --
547: hr_utility.set_location('Entering:'||l_proc, 5);
548: --
549: -- Convert arguments into local l_rec structure.
550: --
551: l_rec.ler_chg_pl_nip_enrt_id := p_ler_chg_pl_nip_enrt_id;
598: l_rec.object_version_number := p_object_version_number;
599: --
600: -- Return the plsql record structure.
601: --
602: hr_utility.set_location(' Leaving:'||l_proc, 10);
603: Return(l_rec);
604: --
605: End convert_args;
606: --