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_USSTR_SDI_EXEMPT_CHK') Then
37: hr_utility.set_message(801, 'PAY_72819_STA_SDI_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_USSTR_SDI_EXEMPT_CHK') Then
37: hr_utility.set_message(801, 'PAY_72819_STA_SDI_Y_OR_N');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PAY_USSTR_SIT_EXEMPT_CHK') Then
40: hr_utility.set_message(801, 'PAY_72822_STA_SIT_Y_OR_N');
41: hr_utility.raise_error;
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PAY_USSTR_SDI_EXEMPT_CHK') Then
37: hr_utility.set_message(801, 'PAY_72819_STA_SDI_Y_OR_N');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PAY_USSTR_SIT_EXEMPT_CHK') Then
40: hr_utility.set_message(801, 'PAY_72822_STA_SIT_Y_OR_N');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PAY_USSTR_STATE_NON_RESIDE_CHK') Then
36: If (p_constraint_name = 'PAY_USSTR_SDI_EXEMPT_CHK') Then
37: hr_utility.set_message(801, 'PAY_72819_STA_SDI_Y_OR_N');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PAY_USSTR_SIT_EXEMPT_CHK') Then
40: hr_utility.set_message(801, 'PAY_72822_STA_SIT_Y_OR_N');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PAY_USSTR_STATE_NON_RESIDE_CHK') Then
43: hr_utility.set_message(801, 'PAY_72812_STA_NON_RES_Y_OR_N');
44: hr_utility.raise_error;
37: hr_utility.set_message(801, 'PAY_72819_STA_SDI_Y_OR_N');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PAY_USSTR_SIT_EXEMPT_CHK') Then
40: hr_utility.set_message(801, 'PAY_72822_STA_SIT_Y_OR_N');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PAY_USSTR_STATE_NON_RESIDE_CHK') Then
43: hr_utility.set_message(801, 'PAY_72812_STA_NON_RES_Y_OR_N');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PAY_USSTR_SUI_EXEMPT_CHK') Then
39: ElsIf (p_constraint_name = 'PAY_USSTR_SIT_EXEMPT_CHK') Then
40: hr_utility.set_message(801, 'PAY_72822_STA_SIT_Y_OR_N');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PAY_USSTR_STATE_NON_RESIDE_CHK') Then
43: hr_utility.set_message(801, 'PAY_72812_STA_NON_RES_Y_OR_N');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PAY_USSTR_SUI_EXEMPT_CHK') Then
46: hr_utility.set_message(801, 'PAY_72825_STA_SUI_Y_OR_N');
47: hr_utility.raise_error;
40: hr_utility.set_message(801, 'PAY_72822_STA_SIT_Y_OR_N');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PAY_USSTR_STATE_NON_RESIDE_CHK') Then
43: hr_utility.set_message(801, 'PAY_72812_STA_NON_RES_Y_OR_N');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PAY_USSTR_SUI_EXEMPT_CHK') Then
46: hr_utility.set_message(801, 'PAY_72825_STA_SUI_Y_OR_N');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PAY_USSTR_WC_EXEMPT_CHK') Then
42: ElsIf (p_constraint_name = 'PAY_USSTR_STATE_NON_RESIDE_CHK') Then
43: hr_utility.set_message(801, 'PAY_72812_STA_NON_RES_Y_OR_N');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PAY_USSTR_SUI_EXEMPT_CHK') Then
46: hr_utility.set_message(801, 'PAY_72825_STA_SUI_Y_OR_N');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PAY_USSTR_WC_EXEMPT_CHK') Then
49: hr_utility.set_message(801, 'PAY_72828_STA_WC_Y_OR_N');
50: hr_utility.raise_error;
43: hr_utility.set_message(801, 'PAY_72812_STA_NON_RES_Y_OR_N');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PAY_USSTR_SUI_EXEMPT_CHK') Then
46: hr_utility.set_message(801, 'PAY_72825_STA_SUI_Y_OR_N');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PAY_USSTR_WC_EXEMPT_CHK') Then
49: hr_utility.set_message(801, 'PAY_72828_STA_WC_Y_OR_N');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'PAY_US_EMP_STATE_TAX_RULES_FK1') Then
45: ElsIf (p_constraint_name = 'PAY_USSTR_SUI_EXEMPT_CHK') Then
46: hr_utility.set_message(801, 'PAY_72825_STA_SUI_Y_OR_N');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PAY_USSTR_WC_EXEMPT_CHK') Then
49: hr_utility.set_message(801, 'PAY_72828_STA_WC_Y_OR_N');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'PAY_US_EMP_STATE_TAX_RULES_FK1') Then
52: hr_utility.set_message(801, 'HR_7952_ADDR_NO_STATE_CODE');
53: hr_utility.raise_error;
46: hr_utility.set_message(801, 'PAY_72825_STA_SUI_Y_OR_N');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PAY_USSTR_WC_EXEMPT_CHK') Then
49: hr_utility.set_message(801, 'PAY_72828_STA_WC_Y_OR_N');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'PAY_US_EMP_STATE_TAX_RULES_FK1') Then
52: hr_utility.set_message(801, 'HR_7952_ADDR_NO_STATE_CODE');
53: hr_utility.raise_error;
54: ElsIf (p_constraint_name = 'PAY_US_EMP_STATE_TAX_RULES_FK2') Then
48: ElsIf (p_constraint_name = 'PAY_USSTR_WC_EXEMPT_CHK') Then
49: hr_utility.set_message(801, 'PAY_72828_STA_WC_Y_OR_N');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'PAY_US_EMP_STATE_TAX_RULES_FK1') Then
52: hr_utility.set_message(801, 'HR_7952_ADDR_NO_STATE_CODE');
53: hr_utility.raise_error;
54: ElsIf (p_constraint_name = 'PAY_US_EMP_STATE_TAX_RULES_FK2') Then
55: hr_utility.set_message(801, 'PAY_52969_TAX_BG_MATCH_ASG');
56: hr_utility.raise_error;
49: hr_utility.set_message(801, 'PAY_72828_STA_WC_Y_OR_N');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'PAY_US_EMP_STATE_TAX_RULES_FK1') Then
52: hr_utility.set_message(801, 'HR_7952_ADDR_NO_STATE_CODE');
53: hr_utility.raise_error;
54: ElsIf (p_constraint_name = 'PAY_US_EMP_STATE_TAX_RULES_FK2') Then
55: hr_utility.set_message(801, 'PAY_52969_TAX_BG_MATCH_ASG');
56: hr_utility.raise_error;
57: Else
51: ElsIf (p_constraint_name = 'PAY_US_EMP_STATE_TAX_RULES_FK1') Then
52: hr_utility.set_message(801, 'HR_7952_ADDR_NO_STATE_CODE');
53: hr_utility.raise_error;
54: ElsIf (p_constraint_name = 'PAY_US_EMP_STATE_TAX_RULES_FK2') Then
55: hr_utility.set_message(801, 'PAY_52969_TAX_BG_MATCH_ASG');
56: hr_utility.raise_error;
57: Else
58: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
59: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message(801, 'HR_7952_ADDR_NO_STATE_CODE');
53: hr_utility.raise_error;
54: ElsIf (p_constraint_name = 'PAY_US_EMP_STATE_TAX_RULES_FK2') Then
55: hr_utility.set_message(801, 'PAY_52969_TAX_BG_MATCH_ASG');
56: hr_utility.raise_error;
57: Else
58: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
59: hr_utility.set_message_token('PROCEDURE', l_proc);
60: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
54: ElsIf (p_constraint_name = 'PAY_US_EMP_STATE_TAX_RULES_FK2') Then
55: hr_utility.set_message(801, 'PAY_52969_TAX_BG_MATCH_ASG');
56: hr_utility.raise_error;
57: Else
58: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
59: hr_utility.set_message_token('PROCEDURE', l_proc);
60: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
61: hr_utility.raise_error;
62: End If;
55: hr_utility.set_message(801, 'PAY_52969_TAX_BG_MATCH_ASG');
56: hr_utility.raise_error;
57: Else
58: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
59: hr_utility.set_message_token('PROCEDURE', l_proc);
60: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
61: hr_utility.raise_error;
62: End If;
63: --
56: hr_utility.raise_error;
57: Else
58: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
59: hr_utility.set_message_token('PROCEDURE', l_proc);
60: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
61: hr_utility.raise_error;
62: End If;
63: --
64: hr_utility.set_location(' Leaving:'||l_proc, 10);
57: Else
58: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
59: hr_utility.set_message_token('PROCEDURE', l_proc);
60: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
61: hr_utility.raise_error;
62: End If;
63: --
64: hr_utility.set_location(' Leaving:'||l_proc, 10);
65: End constraint_error;
60: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
61: hr_utility.raise_error;
62: End If;
63: --
64: hr_utility.set_location(' Leaving:'||l_proc, 10);
65: End constraint_error;
66: --
67: -- ----------------------------------------------------------------------------
68: -- |-----------------------------< api_updating >-----------------------------|
174: l_proc varchar2(72) := g_package||'api_updating';
175: l_fct_ret boolean;
176: --
177: Begin
178: hr_utility.set_location('Entering:'||l_proc, 5);
179: --
180: If (p_effective_date is null or
181: p_emp_state_tax_rule_id is null or
182: p_object_version_number is null) Then
187: l_fct_ret := false;
188: Else
189: If (p_emp_state_tax_rule_id = g_old_rec.emp_state_tax_rule_id and
190: p_object_version_number = g_old_rec.object_version_number) Then
191: hr_utility.set_location(l_proc, 10);
192: --
193: -- The g_old_rec is current therefore we must
194: -- set the returning function to true
195: --
204: Close C_Sel1;
205: --
206: -- The primary key is invalid therefore we must error
207: --
208: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
209: hr_utility.raise_error;
210: End If;
211: Close C_Sel1;
212: If (p_object_version_number <> g_old_rec.object_version_number) Then
205: --
206: -- The primary key is invalid therefore we must error
207: --
208: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
209: hr_utility.raise_error;
210: End If;
211: Close C_Sel1;
212: If (p_object_version_number <> g_old_rec.object_version_number) Then
213: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
209: hr_utility.raise_error;
210: End If;
211: Close C_Sel1;
212: If (p_object_version_number <> g_old_rec.object_version_number) Then
213: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
214: hr_utility.raise_error;
215: End If;
216: hr_utility.set_location(l_proc, 15);
217: l_fct_ret := true;
210: End If;
211: Close C_Sel1;
212: If (p_object_version_number <> g_old_rec.object_version_number) Then
213: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
214: hr_utility.raise_error;
215: End If;
216: hr_utility.set_location(l_proc, 15);
217: l_fct_ret := true;
218: End If;
212: If (p_object_version_number <> g_old_rec.object_version_number) Then
213: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
214: hr_utility.raise_error;
215: End If;
216: hr_utility.set_location(l_proc, 15);
217: l_fct_ret := true;
218: End If;
219: End If;
220: hr_utility.set_location(' Leaving:'||l_proc, 20);
216: hr_utility.set_location(l_proc, 15);
217: l_fct_ret := true;
218: End If;
219: End If;
220: hr_utility.set_location(' Leaving:'||l_proc, 20);
221: Return (l_fct_ret);
222: --
223: End api_updating;
224: --
236: l_proc varchar2(72) := g_package||'find_dt_del_modes';
237: --
238: --
239: Begin
240: hr_utility.set_location('Entering:'||l_proc, 5);
241: --
242: -- Call the corresponding datetrack api
243: --
244: dt_api.find_dt_del_modes
255: p_future_change := false;
256: p_delete_next_change := false;
257: --
258: --
259: hr_utility.set_location(' Leaving:'||l_proc, 10);
260: End find_dt_del_modes;
261: --
262: -- ----------------------------------------------------------------------------
263: -- |--------------------------< find_dt_upd_modes >---------------------------|
272: --
273: l_proc varchar2(72) := g_package||'find_dt_upd_modes';
274: --
275: Begin
276: hr_utility.set_location('Entering:'||l_proc, 5);
277: --
278: -- Call the corresponding datetrack api
279: --
280: dt_api.find_dt_upd_modes
286: p_update => p_update,
287: p_update_override => p_update_override,
288: p_update_change_insert => p_update_change_insert);
289: --
290: hr_utility.set_location(' Leaving:'||l_proc, 10);
291: End find_dt_upd_modes;
292: --
293: -- ----------------------------------------------------------------------------
294: -- |------------------------< upd_effective_end_date >------------------------|
304: l_proc varchar2(72) := g_package||'upd_effective_end_date';
305: l_object_version_number number;
306: --
307: Begin
308: hr_utility.set_location('Entering:'||l_proc, 5);
309: --
310: -- Because we are updating a row we must get the next object
311: -- version number.
312: --
315: (p_base_table_name => 'pay_us_emp_state_tax_rules_f',
316: p_base_key_column => 'emp_state_tax_rule_id',
317: p_base_key_value => p_base_key_value);
318: --
319: hr_utility.set_location(l_proc, 10);
320: g_api_dml := true; -- Set the api dml status
321: --
322: -- Update the specified datetrack row setting the effective
323: -- end date to the specified new effective end date.
330: between t.effective_start_date and t.effective_end_date;
331: --
332: g_api_dml := false; -- Unset the api dml status
333: p_object_version_number := l_object_version_number;
334: hr_utility.set_location(' Leaving:'||l_proc, 15);
335: --
336: Exception
337: When Others Then
338: g_api_dml := false; -- Unset the api dml status
457: --
458: --
459: --
460: Begin
461: hr_utility.set_location('Entering:'||l_proc, 5);
462: --
463: -- Ensure that all the mandatory arguments are not null
464: --
465: hr_api.mandatory_arg_error(p_api_name => l_proc,
490: Close C_Sel1;
491: --
492: -- The primary key is invalid therefore we must error
493: --
494: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
495: hr_utility.raise_error;
496: End If;
497: Close C_Sel1;
498: If (p_object_version_number <> g_old_rec.object_version_number) Then
491: --
492: -- The primary key is invalid therefore we must error
493: --
494: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
495: hr_utility.raise_error;
496: End If;
497: Close C_Sel1;
498: If (p_object_version_number <> g_old_rec.object_version_number) Then
499: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
495: hr_utility.raise_error;
496: End If;
497: Close C_Sel1;
498: If (p_object_version_number <> g_old_rec.object_version_number) Then
499: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
500: hr_utility.raise_error;
501: End If;
502: hr_utility.set_location(l_proc, 15);
503: --
496: End If;
497: Close C_Sel1;
498: If (p_object_version_number <> g_old_rec.object_version_number) Then
499: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
500: hr_utility.raise_error;
501: End If;
502: hr_utility.set_location(l_proc, 15);
503: --
504: --
498: If (p_object_version_number <> g_old_rec.object_version_number) Then
499: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
500: hr_utility.raise_error;
501: End If;
502: hr_utility.set_location(l_proc, 15);
503: --
504: --
505: -- Validate the datetrack mode mode getting the validation start
506: -- and end dates for the specified datetrack operation.
519: -- We are doing a datetrack 'INSERT' which is illegal within this
520: -- procedure therefore we must error (note: to lck on insert the
521: -- private procedure ins_lck should be called).
522: --
523: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
524: hr_utility.set_message_token('PROCEDURE', l_proc);
525: hr_utility.set_message_token('STEP','20');
526: hr_utility.raise_error;
527: End If;
520: -- procedure therefore we must error (note: to lck on insert the
521: -- private procedure ins_lck should be called).
522: --
523: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
524: hr_utility.set_message_token('PROCEDURE', l_proc);
525: hr_utility.set_message_token('STEP','20');
526: hr_utility.raise_error;
527: End If;
528: --
521: -- private procedure ins_lck should be called).
522: --
523: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
524: hr_utility.set_message_token('PROCEDURE', l_proc);
525: hr_utility.set_message_token('STEP','20');
526: hr_utility.raise_error;
527: End If;
528: --
529: -- Set the validation start and end date OUT arguments
522: --
523: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
524: hr_utility.set_message_token('PROCEDURE', l_proc);
525: hr_utility.set_message_token('STEP','20');
526: hr_utility.raise_error;
527: End If;
528: --
529: -- Set the validation start and end date OUT arguments
530: --
530: --
531: p_validation_start_date := l_validation_start_date;
532: p_validation_end_date := l_validation_end_date;
533: --
534: hr_utility.set_location(' Leaving:'||l_proc, 30);
535: --
536: -- We need to trap the ORA LOCK exception
537: --
538: Exception
540: --
541: -- The object is locked therefore we need to supply a meaningful
542: -- error message.
543: --
544: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
545: hr_utility.set_message_token('TABLE_NAME', 'pay_us_emp_state_tax_rules_f');
546: hr_utility.raise_error;
547: When l_object_invalid then
548: --
541: -- The object is locked therefore we need to supply a meaningful
542: -- error message.
543: --
544: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
545: hr_utility.set_message_token('TABLE_NAME', 'pay_us_emp_state_tax_rules_f');
546: hr_utility.raise_error;
547: When l_object_invalid then
548: --
549: -- The object doesn't exist or is invalid
542: -- error message.
543: --
544: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
545: hr_utility.set_message_token('TABLE_NAME', 'pay_us_emp_state_tax_rules_f');
546: hr_utility.raise_error;
547: When l_object_invalid then
548: --
549: -- The object doesn't exist or is invalid
550: --
547: When l_object_invalid then
548: --
549: -- The object doesn't exist or is invalid
550: --
551: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
552: hr_utility.set_message_token('TABLE_NAME', 'pay_us_emp_state_tax_rules_f');
553: hr_utility.raise_error;
554: End lck;
555: --
548: --
549: -- The object doesn't exist or is invalid
550: --
551: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
552: hr_utility.set_message_token('TABLE_NAME', 'pay_us_emp_state_tax_rules_f');
553: hr_utility.raise_error;
554: End lck;
555: --
556: -- ----------------------------------------------------------------------------
549: -- The object doesn't exist or is invalid
550: --
551: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
552: hr_utility.set_message_token('TABLE_NAME', 'pay_us_emp_state_tax_rules_f');
553: hr_utility.raise_error;
554: End lck;
555: --
556: -- ----------------------------------------------------------------------------
557: -- |-----------------------------< convert_args >-----------------------------|
653: l_proc varchar2(72) := g_package||'convert_args';
654: --
655: Begin
656: --
657: hr_utility.set_location('Entering:'||l_proc, 5);
658: --
659: -- Convert arguments into local l_rec structure.
660: --
661: l_rec.emp_state_tax_rule_id := p_emp_state_tax_rule_id;
749:
750: --
751: -- Return the plsql record structure.
752: --
753: hr_utility.set_location(' Leaving:'||l_proc, 10);
754: Return(l_rec);
755: --
756: End convert_args;
757: --