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_USCTY_HT_EXEMPT_CHK') Then
37: hr_utility.set_message(801, 'PAY_72743_CTY_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_USCTY_HT_EXEMPT_CHK') Then
37: hr_utility.set_message(801, 'PAY_72743_CTY_HT_Y_OR_N');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PAY_USCTY_LIT_EXEMPT_CHK') Then
40: hr_utility.set_message(801, 'PAY_72745_CTY_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_USCTY_HT_EXEMPT_CHK') Then
37: hr_utility.set_message(801, 'PAY_72743_CTY_HT_Y_OR_N');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PAY_USCTY_LIT_EXEMPT_CHK') Then
40: hr_utility.set_message(801, 'PAY_72745_CTY_LIT_Y_OR_N');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PAY_USCTY_SD_EXEMPT_CHK') Then
36: If (p_constraint_name = 'PAY_USCTY_HT_EXEMPT_CHK') Then
37: hr_utility.set_message(801, 'PAY_72743_CTY_HT_Y_OR_N');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PAY_USCTY_LIT_EXEMPT_CHK') Then
40: hr_utility.set_message(801, 'PAY_72745_CTY_LIT_Y_OR_N');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PAY_USCTY_SD_EXEMPT_CHK') Then
43: hr_utility.set_message(801, 'PAY_72751_CTY_SD_Y_OR_N');
44: hr_utility.raise_error;
37: hr_utility.set_message(801, 'PAY_72743_CTY_HT_Y_OR_N');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PAY_USCTY_LIT_EXEMPT_CHK') Then
40: hr_utility.set_message(801, 'PAY_72745_CTY_LIT_Y_OR_N');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PAY_USCTY_SD_EXEMPT_CHK') Then
43: hr_utility.set_message(801, 'PAY_72751_CTY_SD_Y_OR_N');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PAY_US_EMP_CITY_TAX_RULES_FK1') Then
39: ElsIf (p_constraint_name = 'PAY_USCTY_LIT_EXEMPT_CHK') Then
40: hr_utility.set_message(801, 'PAY_72745_CTY_LIT_Y_OR_N');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PAY_USCTY_SD_EXEMPT_CHK') Then
43: hr_utility.set_message(801, 'PAY_72751_CTY_SD_Y_OR_N');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PAY_US_EMP_CITY_TAX_RULES_FK1') Then
46: hr_utility.set_message(801, 'HR_7952_ADDR_NO_STATE_CODE'); /* 26 SEP 97 */
47: hr_utility.raise_error;
40: hr_utility.set_message(801, 'PAY_72745_CTY_LIT_Y_OR_N');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PAY_USCTY_SD_EXEMPT_CHK') Then
43: hr_utility.set_message(801, 'PAY_72751_CTY_SD_Y_OR_N');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PAY_US_EMP_CITY_TAX_RULES_FK1') Then
46: hr_utility.set_message(801, 'HR_7952_ADDR_NO_STATE_CODE'); /* 26 SEP 97 */
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PAY_US_EMP_CITY_TAX_RULES_FK2') Then
42: ElsIf (p_constraint_name = 'PAY_USCTY_SD_EXEMPT_CHK') Then
43: hr_utility.set_message(801, 'PAY_72751_CTY_SD_Y_OR_N');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PAY_US_EMP_CITY_TAX_RULES_FK1') Then
46: hr_utility.set_message(801, 'HR_7952_ADDR_NO_STATE_CODE'); /* 26 SEP 97 */
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PAY_US_EMP_CITY_TAX_RULES_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_72751_CTY_SD_Y_OR_N');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PAY_US_EMP_CITY_TAX_RULES_FK1') Then
46: hr_utility.set_message(801, 'HR_7952_ADDR_NO_STATE_CODE'); /* 26 SEP 97 */
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PAY_US_EMP_CITY_TAX_RULES_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_CITY_TAX_RULES_FK3') Then
45: ElsIf (p_constraint_name = 'PAY_US_EMP_CITY_TAX_RULES_FK1') Then
46: hr_utility.set_message(801, 'HR_7952_ADDR_NO_STATE_CODE'); /* 26 SEP 97 */
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PAY_US_EMP_CITY_TAX_RULES_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_CITY_TAX_RULES_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'); /* 26 SEP 97 */
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PAY_US_EMP_CITY_TAX_RULES_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_CITY_TAX_RULES_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_CITY_TAX_RULES_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_CITY_TAX_RULES_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_CITY_TAX_RULES_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_CITY_TAX_RULES_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 >-----------------------------|
166: l_proc varchar2(72) := g_package||'api_updating';
167: l_fct_ret boolean;
168: --
169: Begin
170: hr_utility.set_location('Entering:'||l_proc, 5);
171: --
172: If (p_effective_date is null or
173: p_emp_city_tax_rule_id is null or
174: p_object_version_number is null) Then
179: l_fct_ret := false;
180: Else
181: If (p_emp_city_tax_rule_id = g_old_rec.emp_city_tax_rule_id and
182: p_object_version_number = g_old_rec.object_version_number) Then
183: hr_utility.set_location(l_proc, 10);
184: --
185: -- The g_old_rec is current therefore we must
186: -- set the returning function to true
187: --
196: Close C_Sel1;
197: --
198: -- The primary key is invalid therefore we must error
199: --
200: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
201: hr_utility.raise_error;
202: End If;
203: Close C_Sel1;
204: If (p_object_version_number <> g_old_rec.object_version_number) Then
197: --
198: -- The primary key is invalid therefore we must error
199: --
200: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
201: hr_utility.raise_error;
202: End If;
203: Close C_Sel1;
204: If (p_object_version_number <> g_old_rec.object_version_number) Then
205: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
201: hr_utility.raise_error;
202: End If;
203: Close C_Sel1;
204: If (p_object_version_number <> g_old_rec.object_version_number) Then
205: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
206: hr_utility.raise_error;
207: End If;
208: hr_utility.set_location(l_proc, 15);
209: l_fct_ret := true;
202: End If;
203: Close C_Sel1;
204: If (p_object_version_number <> g_old_rec.object_version_number) Then
205: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
206: hr_utility.raise_error;
207: End If;
208: hr_utility.set_location(l_proc, 15);
209: l_fct_ret := true;
210: End If;
204: If (p_object_version_number <> g_old_rec.object_version_number) Then
205: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
206: hr_utility.raise_error;
207: End If;
208: hr_utility.set_location(l_proc, 15);
209: l_fct_ret := true;
210: End If;
211: End If;
212: hr_utility.set_location(' Leaving:'||l_proc, 20);
208: hr_utility.set_location(l_proc, 15);
209: l_fct_ret := true;
210: End If;
211: End If;
212: hr_utility.set_location(' Leaving:'||l_proc, 20);
213: Return (l_fct_ret);
214: --
215: End api_updating;
216: --
230: --
231: --
232: --
233: Begin
234: hr_utility.set_location('Entering:'||l_proc, 5);
235: --
236: --
237: -- Call the corresponding datetrack api
238: --
245: p_delete => p_delete,
246: p_future_change => p_future_change,
247: p_delete_next_change => p_delete_next_change);
248: --
249: hr_utility.set_location(' Leaving:'||l_proc, 10);
250: End find_dt_del_modes;
251: --
252: -- ----------------------------------------------------------------------------
253: -- |--------------------------< find_dt_upd_modes >---------------------------|
262: --
263: l_proc varchar2(72) := g_package||'find_dt_upd_modes';
264: --
265: Begin
266: hr_utility.set_location('Entering:'||l_proc, 5);
267: --
268: -- Call the corresponding datetrack api
269: --
270: dt_api.find_dt_upd_modes
276: p_update => p_update,
277: p_update_override => p_update_override,
278: p_update_change_insert => p_update_change_insert);
279: --
280: hr_utility.set_location(' Leaving:'||l_proc, 10);
281: End find_dt_upd_modes;
282: --
283: -- ----------------------------------------------------------------------------
284: -- |------------------------< upd_effective_end_date >------------------------|
294: l_proc varchar2(72) := g_package||'upd_effective_end_date';
295: l_object_version_number number;
296: --
297: Begin
298: hr_utility.set_location('Entering:'||l_proc, 5);
299: --
300: -- Because we are updating a row we must get the next object
301: -- version number.
302: --
305: (p_base_table_name => 'pay_us_emp_city_tax_rules_f',
306: p_base_key_column => 'emp_city_tax_rule_id',
307: p_base_key_value => p_base_key_value);
308: --
309: hr_utility.set_location(l_proc, 10);
310: g_api_dml := true; -- Set the api dml status
311: --
312: -- Update the specified datetrack row setting the effective
313: -- end date to the specified new effective end date.
320: between t.effective_start_date and t.effective_end_date;
321: --
322: g_api_dml := false; -- Unset the api dml status
323: p_object_version_number := l_object_version_number;
324: hr_utility.set_location(' Leaving:'||l_proc, 15);
325: --
326: Exception
327: When Others Then
328: g_api_dml := false; -- Unset the api dml status
442: --
443: --
444: --
445: Begin
446: hr_utility.set_location('Entering:'||l_proc, 5);
447: --
448: -- Ensure that all the mandatory arguments are not null
449: --
450: hr_api.mandatory_arg_error(p_api_name => l_proc,
475: Close C_Sel1;
476: --
477: -- The primary key is invalid therefore we must error
478: --
479: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
480: hr_utility.raise_error;
481: End If;
482: Close C_Sel1;
483: If (p_object_version_number <> g_old_rec.object_version_number) Then
476: --
477: -- The primary key is invalid therefore we must error
478: --
479: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
480: hr_utility.raise_error;
481: End If;
482: Close C_Sel1;
483: If (p_object_version_number <> g_old_rec.object_version_number) Then
484: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
480: hr_utility.raise_error;
481: End If;
482: Close C_Sel1;
483: If (p_object_version_number <> g_old_rec.object_version_number) Then
484: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
485: hr_utility.raise_error;
486: End If;
487: hr_utility.set_location(l_proc, 15);
488: --
481: End If;
482: Close C_Sel1;
483: If (p_object_version_number <> g_old_rec.object_version_number) Then
484: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
485: hr_utility.raise_error;
486: End If;
487: hr_utility.set_location(l_proc, 15);
488: --
489: --
483: If (p_object_version_number <> g_old_rec.object_version_number) Then
484: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
485: hr_utility.raise_error;
486: End If;
487: hr_utility.set_location(l_proc, 15);
488: --
489: --
490: -- Validate the datetrack mode mode getting the validation start
491: -- and end dates for the specified datetrack operation.
505: -- We are doing a datetrack 'INSERT' which is illegal within this
506: -- procedure therefore we must error (note: to lck on insert the
507: -- private procedure ins_lck should be called).
508: --
509: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
510: hr_utility.set_message_token('PROCEDURE', l_proc);
511: hr_utility.set_message_token('STEP','20');
512: hr_utility.raise_error;
513: End If;
506: -- procedure therefore we must error (note: to lck on insert the
507: -- private procedure ins_lck should be called).
508: --
509: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
510: hr_utility.set_message_token('PROCEDURE', l_proc);
511: hr_utility.set_message_token('STEP','20');
512: hr_utility.raise_error;
513: End If;
514: --
507: -- private procedure ins_lck should be called).
508: --
509: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
510: hr_utility.set_message_token('PROCEDURE', l_proc);
511: hr_utility.set_message_token('STEP','20');
512: hr_utility.raise_error;
513: End If;
514: --
515: -- Set the validation start and end date OUT arguments
508: --
509: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
510: hr_utility.set_message_token('PROCEDURE', l_proc);
511: hr_utility.set_message_token('STEP','20');
512: hr_utility.raise_error;
513: End If;
514: --
515: -- Set the validation start and end date OUT arguments
516: --
516: --
517: p_validation_start_date := l_validation_start_date;
518: p_validation_end_date := l_validation_end_date;
519: --
520: hr_utility.set_location(' Leaving:'||l_proc, 30);
521: --
522: -- We need to trap the ORA LOCK exception
523: --
524: Exception
526: --
527: -- The object is locked therefore we need to supply a meaningful
528: -- error message.
529: --
530: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
531: hr_utility.set_message_token('TABLE_NAME', 'pay_us_emp_city_tax_rules_f');
532: hr_utility.raise_error;
533: When l_object_invalid then
534: --
527: -- The object is locked therefore we need to supply a meaningful
528: -- error message.
529: --
530: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
531: hr_utility.set_message_token('TABLE_NAME', 'pay_us_emp_city_tax_rules_f');
532: hr_utility.raise_error;
533: When l_object_invalid then
534: --
535: -- The object doesn't exist or is invalid
528: -- error message.
529: --
530: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
531: hr_utility.set_message_token('TABLE_NAME', 'pay_us_emp_city_tax_rules_f');
532: hr_utility.raise_error;
533: When l_object_invalid then
534: --
535: -- The object doesn't exist or is invalid
536: --
533: When l_object_invalid then
534: --
535: -- The object doesn't exist or is invalid
536: --
537: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
538: hr_utility.set_message_token('TABLE_NAME', 'pay_us_emp_city_tax_rules_f');
539: hr_utility.raise_error;
540: End lck;
541: --
534: --
535: -- The object doesn't exist or is invalid
536: --
537: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
538: hr_utility.set_message_token('TABLE_NAME', 'pay_us_emp_city_tax_rules_f');
539: hr_utility.raise_error;
540: End lck;
541: --
542: -- ----------------------------------------------------------------------------
535: -- The object doesn't exist or is invalid
536: --
537: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
538: hr_utility.set_message_token('TABLE_NAME', 'pay_us_emp_city_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_city_tax_rule_id := p_emp_city_tax_rule_id;
724: l_rec.cty_information30 := p_cty_information30;
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: --