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 = 'PAY_USCOUNTY_HT_EXEMPT_CHK') Then
37: hr_utility.set_message(801, 'PAY_72766_CNT_HT_Y_OR_N');
38: hr_utility.raise_error;
33: Begin
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PAY_USCOUNTY_HT_EXEMPT_CHK') Then
37: hr_utility.set_message(801, 'PAY_72766_CNT_HT_Y_OR_N');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PAY_USCOUNTY_LIT_EXEMPT_CHK') Then
40: hr_utility.set_message(801, 'PAY_72767_CNT_LIT_Y_OR_N');
41: hr_utility.raise_error;
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PAY_USCOUNTY_HT_EXEMPT_CHK') Then
37: hr_utility.set_message(801, 'PAY_72766_CNT_HT_Y_OR_N');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PAY_USCOUNTY_LIT_EXEMPT_CHK') Then
40: hr_utility.set_message(801, 'PAY_72767_CNT_LIT_Y_OR_N');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PAY_USCOUNTY_SD_EXEMPT_CHK') Then
36: If (p_constraint_name = 'PAY_USCOUNTY_HT_EXEMPT_CHK') Then
37: hr_utility.set_message(801, 'PAY_72766_CNT_HT_Y_OR_N');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PAY_USCOUNTY_LIT_EXEMPT_CHK') Then
40: hr_utility.set_message(801, 'PAY_72767_CNT_LIT_Y_OR_N');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PAY_USCOUNTY_SD_EXEMPT_CHK') Then
43: hr_utility.set_message(801, 'PAY_72773_CNT_SD_Y_OR_N');
44: hr_utility.raise_error;
37: hr_utility.set_message(801, 'PAY_72766_CNT_HT_Y_OR_N');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PAY_USCOUNTY_LIT_EXEMPT_CHK') Then
40: hr_utility.set_message(801, 'PAY_72767_CNT_LIT_Y_OR_N');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PAY_USCOUNTY_SD_EXEMPT_CHK') Then
43: hr_utility.set_message(801, 'PAY_72773_CNT_SD_Y_OR_N');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PAY_US_EMP_COUNTY_TAX_RULE_FK1') Then
39: ElsIf (p_constraint_name = 'PAY_USCOUNTY_LIT_EXEMPT_CHK') Then
40: hr_utility.set_message(801, 'PAY_72767_CNT_LIT_Y_OR_N');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PAY_USCOUNTY_SD_EXEMPT_CHK') Then
43: hr_utility.set_message(801, 'PAY_72773_CNT_SD_Y_OR_N');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PAY_US_EMP_COUNTY_TAX_RULE_FK1') Then
46: hr_utility.set_message(801, 'HR_7952_ADDR_NO_STATE_CODE');
47: hr_utility.raise_error;
40: hr_utility.set_message(801, 'PAY_72767_CNT_LIT_Y_OR_N');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PAY_USCOUNTY_SD_EXEMPT_CHK') Then
43: hr_utility.set_message(801, 'PAY_72773_CNT_SD_Y_OR_N');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PAY_US_EMP_COUNTY_TAX_RULE_FK1') Then
46: hr_utility.set_message(801, 'HR_7952_ADDR_NO_STATE_CODE');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PAY_US_EMP_COUNTY_TAX_RULE_FK2') Then
42: ElsIf (p_constraint_name = 'PAY_USCOUNTY_SD_EXEMPT_CHK') Then
43: hr_utility.set_message(801, 'PAY_72773_CNT_SD_Y_OR_N');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PAY_US_EMP_COUNTY_TAX_RULE_FK1') Then
46: hr_utility.set_message(801, 'HR_7952_ADDR_NO_STATE_CODE');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PAY_US_EMP_COUNTY_TAX_RULE_FK2') Then
49: hr_utility.set_message(801, 'PAY_52969_TAX_BG_MATCH_ASG');
50: hr_utility.raise_error;
43: hr_utility.set_message(801, 'PAY_72773_CNT_SD_Y_OR_N');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PAY_US_EMP_COUNTY_TAX_RULE_FK1') Then
46: hr_utility.set_message(801, 'HR_7952_ADDR_NO_STATE_CODE');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PAY_US_EMP_COUNTY_TAX_RULE_FK2') Then
49: hr_utility.set_message(801, 'PAY_52969_TAX_BG_MATCH_ASG');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'PAY_US_EMP_COUNTY_TAX_RULE_FK3') Then
45: ElsIf (p_constraint_name = 'PAY_US_EMP_COUNTY_TAX_RULE_FK1') Then
46: hr_utility.set_message(801, 'HR_7952_ADDR_NO_STATE_CODE');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PAY_US_EMP_COUNTY_TAX_RULE_FK2') Then
49: hr_utility.set_message(801, 'PAY_52969_TAX_BG_MATCH_ASG');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'PAY_US_EMP_COUNTY_TAX_RULE_FK3') Then
52: hr_utility.set_message(801, 'HR_51279_ADD_INV_CTY_CO_ST_CMB');
53: hr_utility.raise_error;
46: hr_utility.set_message(801, 'HR_7952_ADDR_NO_STATE_CODE');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PAY_US_EMP_COUNTY_TAX_RULE_FK2') Then
49: hr_utility.set_message(801, 'PAY_52969_TAX_BG_MATCH_ASG');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'PAY_US_EMP_COUNTY_TAX_RULE_FK3') Then
52: hr_utility.set_message(801, 'HR_51279_ADD_INV_CTY_CO_ST_CMB');
53: hr_utility.raise_error;
54: Else
48: ElsIf (p_constraint_name = 'PAY_US_EMP_COUNTY_TAX_RULE_FK2') Then
49: hr_utility.set_message(801, 'PAY_52969_TAX_BG_MATCH_ASG');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'PAY_US_EMP_COUNTY_TAX_RULE_FK3') Then
52: hr_utility.set_message(801, 'HR_51279_ADD_INV_CTY_CO_ST_CMB');
53: hr_utility.raise_error;
54: Else
55: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
56: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message(801, 'PAY_52969_TAX_BG_MATCH_ASG');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'PAY_US_EMP_COUNTY_TAX_RULE_FK3') Then
52: hr_utility.set_message(801, 'HR_51279_ADD_INV_CTY_CO_ST_CMB');
53: hr_utility.raise_error;
54: Else
55: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
56: hr_utility.set_message_token('PROCEDURE', l_proc);
57: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
51: ElsIf (p_constraint_name = 'PAY_US_EMP_COUNTY_TAX_RULE_FK3') Then
52: hr_utility.set_message(801, 'HR_51279_ADD_INV_CTY_CO_ST_CMB');
53: hr_utility.raise_error;
54: Else
55: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
56: hr_utility.set_message_token('PROCEDURE', l_proc);
57: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
58: hr_utility.raise_error;
59: End If;
52: hr_utility.set_message(801, 'HR_51279_ADD_INV_CTY_CO_ST_CMB');
53: hr_utility.raise_error;
54: Else
55: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
56: hr_utility.set_message_token('PROCEDURE', l_proc);
57: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
58: hr_utility.raise_error;
59: End If;
60: --
53: hr_utility.raise_error;
54: Else
55: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
56: hr_utility.set_message_token('PROCEDURE', l_proc);
57: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
58: hr_utility.raise_error;
59: End If;
60: --
61: hr_utility.set_location(' Leaving:'||l_proc, 10);
54: Else
55: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
56: hr_utility.set_message_token('PROCEDURE', l_proc);
57: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
58: hr_utility.raise_error;
59: End If;
60: --
61: hr_utility.set_location(' Leaving:'||l_proc, 10);
62: End constraint_error;
57: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
58: hr_utility.raise_error;
59: End If;
60: --
61: hr_utility.set_location(' Leaving:'||l_proc, 10);
62: End constraint_error;
63: --
64: -- ----------------------------------------------------------------------------
65: -- |-----------------------------< api_updating >-----------------------------|
165: l_proc varchar2(72) := g_package||'api_updating';
166: l_fct_ret boolean;
167: --
168: Begin
169: hr_utility.set_location('Entering:'||l_proc, 5);
170: --
171: If (p_effective_date is null or
172: p_emp_county_tax_rule_id is null or
173: p_object_version_number is null) Then
178: l_fct_ret := false;
179: Else
180: If (p_emp_county_tax_rule_id = g_old_rec.emp_county_tax_rule_id and
181: p_object_version_number = g_old_rec.object_version_number) Then
182: hr_utility.set_location(l_proc, 10);
183: --
184: -- The g_old_rec is current therefore we must
185: -- set the returning function to true
186: --
195: Close C_Sel1;
196: --
197: -- The primary key is invalid therefore we must error
198: --
199: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
200: hr_utility.raise_error;
201: End If;
202: Close C_Sel1;
203: If (p_object_version_number <> g_old_rec.object_version_number) Then
196: --
197: -- The primary key is invalid therefore we must error
198: --
199: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
200: hr_utility.raise_error;
201: End If;
202: Close C_Sel1;
203: If (p_object_version_number <> g_old_rec.object_version_number) Then
204: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
200: hr_utility.raise_error;
201: End If;
202: Close C_Sel1;
203: If (p_object_version_number <> g_old_rec.object_version_number) Then
204: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
205: hr_utility.raise_error;
206: End If;
207: hr_utility.set_location(l_proc, 15);
208: l_fct_ret := true;
201: End If;
202: Close C_Sel1;
203: If (p_object_version_number <> g_old_rec.object_version_number) Then
204: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
205: hr_utility.raise_error;
206: End If;
207: hr_utility.set_location(l_proc, 15);
208: l_fct_ret := true;
209: End If;
203: If (p_object_version_number <> g_old_rec.object_version_number) Then
204: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
205: hr_utility.raise_error;
206: End If;
207: hr_utility.set_location(l_proc, 15);
208: l_fct_ret := true;
209: End If;
210: End If;
211: hr_utility.set_location(' Leaving:'||l_proc, 20);
207: hr_utility.set_location(l_proc, 15);
208: l_fct_ret := true;
209: End If;
210: End If;
211: hr_utility.set_location(' Leaving:'||l_proc, 20);
212: Return (l_fct_ret);
213: --
214: End api_updating;
215: --
229: --
230: --
231: --
232: Begin
233: hr_utility.set_location('Entering:'||l_proc, 5);
234: --
235: --
236: -- Call the corresponding datetrack api
237: --
244: p_delete => p_delete,
245: p_future_change => p_future_change,
246: p_delete_next_change => p_delete_next_change);
247: --
248: hr_utility.set_location(' Leaving:'||l_proc, 10);
249: End find_dt_del_modes;
250: --
251: -- ----------------------------------------------------------------------------
252: -- |--------------------------< find_dt_upd_modes >---------------------------|
261: --
262: l_proc varchar2(72) := g_package||'find_dt_upd_modes';
263: --
264: Begin
265: hr_utility.set_location('Entering:'||l_proc, 5);
266: --
267: -- Call the corresponding datetrack api
268: --
269: dt_api.find_dt_upd_modes
275: p_update => p_update,
276: p_update_override => p_update_override,
277: p_update_change_insert => p_update_change_insert);
278: --
279: hr_utility.set_location(' Leaving:'||l_proc, 10);
280: End find_dt_upd_modes;
281: --
282: -- ----------------------------------------------------------------------------
283: -- |------------------------< upd_effective_end_date >------------------------|
293: l_proc varchar2(72) := g_package||'upd_effective_end_date';
294: l_object_version_number number;
295: --
296: Begin
297: hr_utility.set_location('Entering:'||l_proc, 5);
298: --
299: -- Because we are updating a row we must get the next object
300: -- version number.
301: --
304: (p_base_table_name => 'pay_us_emp_county_tax_rules_f',
305: p_base_key_column => 'emp_county_tax_rule_id',
306: p_base_key_value => p_base_key_value);
307: --
308: hr_utility.set_location(l_proc, 10);
309: g_api_dml := true; -- Set the api dml status
310: --
311: -- Update the specified datetrack row setting the effective
312: -- end date to the specified new effective end date.
319: between t.effective_start_date and t.effective_end_date;
320: --
321: g_api_dml := false; -- Unset the api dml status
322: p_object_version_number := l_object_version_number;
323: hr_utility.set_location(' Leaving:'||l_proc, 15);
324: --
325: Exception
326: When Others Then
327: g_api_dml := false; -- Unset the api dml status
440: --
441: --
442: --
443: Begin
444: hr_utility.set_location('Entering:'||l_proc, 5);
445: --
446: -- Ensure that all the mandatory arguments are not null
447: --
448: hr_api.mandatory_arg_error(p_api_name => l_proc,
473: Close C_Sel1;
474: --
475: -- The primary key is invalid therefore we must error
476: --
477: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
478: hr_utility.raise_error;
479: End If;
480: Close C_Sel1;
481: If (p_object_version_number <> g_old_rec.object_version_number) Then
474: --
475: -- The primary key is invalid therefore we must error
476: --
477: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
478: hr_utility.raise_error;
479: End If;
480: Close C_Sel1;
481: If (p_object_version_number <> g_old_rec.object_version_number) Then
482: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
478: hr_utility.raise_error;
479: End If;
480: Close C_Sel1;
481: If (p_object_version_number <> g_old_rec.object_version_number) Then
482: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
483: hr_utility.raise_error;
484: End If;
485: hr_utility.set_location(l_proc, 15);
486: --
479: End If;
480: Close C_Sel1;
481: If (p_object_version_number <> g_old_rec.object_version_number) Then
482: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
483: hr_utility.raise_error;
484: End If;
485: hr_utility.set_location(l_proc, 15);
486: --
487: --
481: If (p_object_version_number <> g_old_rec.object_version_number) Then
482: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
483: hr_utility.raise_error;
484: End If;
485: hr_utility.set_location(l_proc, 15);
486: --
487: --
488: -- Validate the datetrack mode mode getting the validation start
489: -- and end dates for the specified datetrack operation.
503: -- We are doing a datetrack 'INSERT' which is illegal within this
504: -- procedure therefore we must error (note: to lck on insert the
505: -- private procedure ins_lck should be called).
506: --
507: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
508: hr_utility.set_message_token('PROCEDURE', l_proc);
509: hr_utility.set_message_token('STEP','20');
510: hr_utility.raise_error;
511: End If;
504: -- procedure therefore we must error (note: to lck on insert the
505: -- private procedure ins_lck should be called).
506: --
507: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
508: hr_utility.set_message_token('PROCEDURE', l_proc);
509: hr_utility.set_message_token('STEP','20');
510: hr_utility.raise_error;
511: End If;
512: --
505: -- private procedure ins_lck should be called).
506: --
507: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
508: hr_utility.set_message_token('PROCEDURE', l_proc);
509: hr_utility.set_message_token('STEP','20');
510: hr_utility.raise_error;
511: End If;
512: --
513: -- Set the validation start and end date OUT arguments
506: --
507: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
508: hr_utility.set_message_token('PROCEDURE', l_proc);
509: hr_utility.set_message_token('STEP','20');
510: hr_utility.raise_error;
511: End If;
512: --
513: -- Set the validation start and end date OUT arguments
514: --
514: --
515: p_validation_start_date := l_validation_start_date;
516: p_validation_end_date := l_validation_end_date;
517: --
518: hr_utility.set_location(' Leaving:'||l_proc, 30);
519: --
520: -- We need to trap the ORA LOCK exception
521: --
522: Exception
524: --
525: -- The object is locked therefore we need to supply a meaningful
526: -- error message.
527: --
528: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
529: hr_utility.set_message_token('TABLE_NAME',
530: 'pay_us_emp_county_tax_rules_f');
531: hr_utility.raise_error;
532: When l_object_invalid then
525: -- The object is locked therefore we need to supply a meaningful
526: -- error message.
527: --
528: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
529: hr_utility.set_message_token('TABLE_NAME',
530: 'pay_us_emp_county_tax_rules_f');
531: hr_utility.raise_error;
532: When l_object_invalid then
533: --
527: --
528: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
529: hr_utility.set_message_token('TABLE_NAME',
530: 'pay_us_emp_county_tax_rules_f');
531: hr_utility.raise_error;
532: When l_object_invalid then
533: --
534: -- The object doesn't exist or is invalid
535: --
532: When l_object_invalid then
533: --
534: -- The object doesn't exist or is invalid
535: --
536: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
537: hr_utility.set_message_token('TABLE_NAME',
538: 'pay_us_emp_county_tax_rules_f');
539: hr_utility.raise_error;
540: End lck;
533: --
534: -- The object doesn't exist or is invalid
535: --
536: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
537: hr_utility.set_message_token('TABLE_NAME',
538: 'pay_us_emp_county_tax_rules_f');
539: hr_utility.raise_error;
540: End lck;
541: --
535: --
536: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
537: hr_utility.set_message_token('TABLE_NAME',
538: 'pay_us_emp_county_tax_rules_f');
539: hr_utility.raise_error;
540: End lck;
541: --
542: -- ----------------------------------------------------------------------------
543: -- |-----------------------------< convert_args >-----------------------------|
634: l_proc varchar2(72) := g_package||'convert_args';
635: --
636: Begin
637: --
638: hr_utility.set_location('Entering:'||l_proc, 5);
639: --
640: -- Convert arguments into local l_rec structure.
641: --
642: l_rec.emp_county_tax_rule_id := p_emp_county_tax_rule_id;
724:
725: --
726: -- Return the plsql record structure.
727: --
728: hr_utility.set_location(' Leaving:'||l_proc, 10);
729: Return(l_rec);
730: --
731: End convert_args;
732: --