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_BNFT_PRVDD_LDGR_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_BNFT_PRVDD_LDGR_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_BNFT_PRVDD_LDGR_PK') Then
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_BNFT_PRVDD_LDGR_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_BNFT_PRVDD_LDGR_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: --
36: If (p_constraint_name = 'BEN_BNFT_PRVDD_LDGR_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_BNFT_PRVDD_LDGR_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_BNFT_PRVDD_LDGR_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_BNFT_PRVDD_LDGR_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_BNFT_PRVDD_LDGR_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_BNFT_PRVDD_LDGR_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_BNFT_PRVDD_LDGR_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_BNFT_PRVDD_LDGR_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 >-----------------------------|
133: l_proc varchar2(72) := g_package||'api_updating';
134: l_fct_ret boolean;
135: --
136: Begin
137: hr_utility.set_location('Entering:'||l_proc, 5);
138: --
139: If (p_effective_date is null or
140: p_bnft_prvdd_ldgr_id is null or
141: p_object_version_number is null) Then
146: l_fct_ret := false;
147: Else
148: If (p_bnft_prvdd_ldgr_id = g_old_rec.bnft_prvdd_ldgr_id and
149: p_object_version_number = g_old_rec.object_version_number) Then
150: hr_utility.set_location(l_proc, 10);
151: --
152: -- The g_old_rec is current therefore we must
153: -- set the returning function to true
154: --
163: Close C_Sel1;
164: --
165: -- The primary key is invalid therefore we must error
166: --
167: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
168: hr_utility.raise_error;
169: End If;
170: Close C_Sel1;
171: If (p_object_version_number <> g_old_rec.object_version_number) Then
164: --
165: -- The primary key is invalid therefore we must error
166: --
167: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
168: hr_utility.raise_error;
169: End If;
170: Close C_Sel1;
171: If (p_object_version_number <> g_old_rec.object_version_number) Then
172: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
168: hr_utility.raise_error;
169: End If;
170: Close C_Sel1;
171: If (p_object_version_number <> g_old_rec.object_version_number) Then
172: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
173: hr_utility.raise_error;
174: End If;
175: hr_utility.set_location(l_proc, 15);
176: l_fct_ret := true;
169: End If;
170: Close C_Sel1;
171: If (p_object_version_number <> g_old_rec.object_version_number) Then
172: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
173: hr_utility.raise_error;
174: End If;
175: hr_utility.set_location(l_proc, 15);
176: l_fct_ret := true;
177: End If;
171: If (p_object_version_number <> g_old_rec.object_version_number) Then
172: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
173: hr_utility.raise_error;
174: End If;
175: hr_utility.set_location(l_proc, 15);
176: l_fct_ret := true;
177: End If;
178: End If;
179: hr_utility.set_location(' Leaving:'||l_proc, 20);
175: hr_utility.set_location(l_proc, 15);
176: l_fct_ret := true;
177: End If;
178: End If;
179: hr_utility.set_location(' Leaving:'||l_proc, 20);
180: Return (l_fct_ret);
181: --
182: End api_updating;
183: --
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: l_parent_key_value2,
215: l_parent_key_value3;
214: l_parent_key_value2,
215: l_parent_key_value3;
216: If C_Sel1%notfound then
217: Close C_Sel1;
218: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
219: hr_utility.set_message_token('PROCEDURE', l_proc);
220: hr_utility.set_message_token('STEP','10');
221: hr_utility.raise_error;
222: End If;
215: l_parent_key_value3;
216: If C_Sel1%notfound then
217: Close C_Sel1;
218: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
219: hr_utility.set_message_token('PROCEDURE', l_proc);
220: hr_utility.set_message_token('STEP','10');
221: hr_utility.raise_error;
222: End If;
223: Close C_Sel1;
216: If C_Sel1%notfound then
217: Close C_Sel1;
218: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
219: hr_utility.set_message_token('PROCEDURE', l_proc);
220: hr_utility.set_message_token('STEP','10');
221: hr_utility.raise_error;
222: End If;
223: Close C_Sel1;
224: --
217: Close C_Sel1;
218: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
219: hr_utility.set_message_token('PROCEDURE', l_proc);
220: hr_utility.set_message_token('STEP','10');
221: hr_utility.raise_error;
222: End If;
223: Close C_Sel1;
224: --
225: -- Call the corresponding datetrack api
242: p_delete => p_delete,
243: p_future_change => p_future_change,
244: p_delete_next_change => p_delete_next_change);
245: --
246: hr_utility.set_location(' Leaving:'||l_proc, 10);
247: End find_dt_del_modes;
248: --
249: -- ----------------------------------------------------------------------------
250: -- |--------------------------< find_dt_upd_modes >---------------------------|
259: --
260: l_proc varchar2(72) := g_package||'find_dt_upd_modes';
261: --
262: Begin
263: hr_utility.set_location('Entering:'||l_proc, 5);
264: --
265: -- Call the corresponding datetrack api
266: --
267: dt_api.find_dt_upd_modes
273: p_update => p_update,
274: p_update_override => p_update_override,
275: p_update_change_insert => p_update_change_insert);
276: --
277: hr_utility.set_location(' Leaving:'||l_proc, 10);
278: End find_dt_upd_modes;
279: --
280: -- ----------------------------------------------------------------------------
281: -- |------------------------< upd_effective_end_date >------------------------|
291: l_proc varchar2(72) := g_package||'upd_effective_end_date';
292: l_object_version_number number;
293: --
294: Begin
295: hr_utility.set_location('Entering:'||l_proc, 5);
296: --
297: -- Because we are updating a row we must get the next object
298: -- version number.
299: --
302: (p_base_table_name => 'ben_bnft_prvdd_ldgr_f',
303: p_base_key_column => 'bnft_prvdd_ldgr_id',
304: p_base_key_value => p_base_key_value);
305: --
306: hr_utility.set_location(l_proc, 10);
307: g_api_dml := true; -- Set the api dml status
308: --
309: -- Update the specified datetrack row setting the effective
310: -- end date to the specified new effective end date.
317: between t.effective_start_date and t.effective_end_date;
318: --
319: g_api_dml := false; -- Unset the api dml status
320: p_object_version_number := l_object_version_number;
321: hr_utility.set_location(' Leaving:'||l_proc, 15);
322: --
323: Exception
324: When Others Then
325: g_api_dml := false; -- Unset the api dml status
414: --
415: --
416: --
417: Begin
418: hr_utility.set_location('Entering:'||l_proc, 5);
419: --
420: -- Ensure that all the mandatory arguments are not null
421: --
422: hr_api.mandatory_arg_error(p_api_name => l_proc,
447: Close C_Sel1;
448: --
449: -- The primary key is invalid therefore we must error
450: --
451: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
452: hr_utility.raise_error;
453: End If;
454: Close C_Sel1;
455: If (p_object_version_number <> g_old_rec.object_version_number) Then
448: --
449: -- The primary key is invalid therefore we must error
450: --
451: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
452: hr_utility.raise_error;
453: End If;
454: Close C_Sel1;
455: If (p_object_version_number <> g_old_rec.object_version_number) Then
456: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
452: hr_utility.raise_error;
453: End If;
454: Close C_Sel1;
455: If (p_object_version_number <> g_old_rec.object_version_number) Then
456: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
457: hr_utility.raise_error;
458: End If;
459: hr_utility.set_location(l_proc, 15);
460: --
453: End If;
454: Close C_Sel1;
455: If (p_object_version_number <> g_old_rec.object_version_number) Then
456: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
457: hr_utility.raise_error;
458: End If;
459: hr_utility.set_location(l_proc, 15);
460: --
461: --
455: If (p_object_version_number <> g_old_rec.object_version_number) Then
456: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
457: hr_utility.raise_error;
458: End If;
459: hr_utility.set_location(l_proc, 15);
460: --
461: --
462: -- Validate the datetrack mode mode getting the validation start
463: -- and end dates for the specified datetrack operation.
485: -- We are doing a datetrack 'INSERT' which is illegal within this
486: -- procedure therefore we must error (note: to lck on insert the
487: -- private procedure ins_lck should be called).
488: --
489: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
490: hr_utility.set_message_token('PROCEDURE', l_proc);
491: hr_utility.set_message_token('STEP','20');
492: hr_utility.raise_error;
493: End If;
486: -- procedure therefore we must error (note: to lck on insert the
487: -- private procedure ins_lck should be called).
488: --
489: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
490: hr_utility.set_message_token('PROCEDURE', l_proc);
491: hr_utility.set_message_token('STEP','20');
492: hr_utility.raise_error;
493: End If;
494: --
487: -- private procedure ins_lck should be called).
488: --
489: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
490: hr_utility.set_message_token('PROCEDURE', l_proc);
491: hr_utility.set_message_token('STEP','20');
492: hr_utility.raise_error;
493: End If;
494: --
495: -- Set the validation start and end date OUT arguments
488: --
489: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
490: hr_utility.set_message_token('PROCEDURE', l_proc);
491: hr_utility.set_message_token('STEP','20');
492: hr_utility.raise_error;
493: End If;
494: --
495: -- Set the validation start and end date OUT arguments
496: --
496: --
497: p_validation_start_date := l_validation_start_date;
498: p_validation_end_date := l_validation_end_date;
499: --
500: hr_utility.set_location(' Leaving:'||l_proc, 30);
501: --
502: -- We need to trap the ORA LOCK exception
503: --
504: Exception
506: --
507: -- The object is locked therefore we need to supply a meaningful
508: -- error message.
509: --
510: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
511: hr_utility.set_message_token('TABLE_NAME', 'ben_bnft_prvdd_ldgr_f');
512: hr_utility.raise_error;
513: When l_object_invalid then
514: --
507: -- The object is locked therefore we need to supply a meaningful
508: -- error message.
509: --
510: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
511: hr_utility.set_message_token('TABLE_NAME', 'ben_bnft_prvdd_ldgr_f');
512: hr_utility.raise_error;
513: When l_object_invalid then
514: --
515: -- The object doesn't exist or is invalid
508: -- error message.
509: --
510: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
511: hr_utility.set_message_token('TABLE_NAME', 'ben_bnft_prvdd_ldgr_f');
512: hr_utility.raise_error;
513: When l_object_invalid then
514: --
515: -- The object doesn't exist or is invalid
516: --
513: When l_object_invalid then
514: --
515: -- The object doesn't exist or is invalid
516: --
517: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
518: hr_utility.set_message_token('TABLE_NAME', 'ben_bnft_prvdd_ldgr_f');
519: hr_utility.raise_error;
520: End lck;
521: --
514: --
515: -- The object doesn't exist or is invalid
516: --
517: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
518: hr_utility.set_message_token('TABLE_NAME', 'ben_bnft_prvdd_ldgr_f');
519: hr_utility.raise_error;
520: End lck;
521: --
522: -- ----------------------------------------------------------------------------
515: -- The object doesn't exist or is invalid
516: --
517: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
518: hr_utility.set_message_token('TABLE_NAME', 'ben_bnft_prvdd_ldgr_f');
519: hr_utility.raise_error;
520: End lck;
521: --
522: -- ----------------------------------------------------------------------------
523: -- |-----------------------------< 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.bnft_prvdd_ldgr_id := p_bnft_prvdd_ldgr_id;
654: l_rec.ann_cash_recd_val := p_ann_cash_recd_val;
655: --
656: -- Return the plsql record structure.
657: --
658: hr_utility.set_location(' Leaving:'||l_proc, 10);
659: Return(l_rec);
660: --
661: End convert_args;
662: --