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_PERSONAL_PAYMENT_METHO_FK1') Then
37: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
38: hr_utility.raise_error;
33: Begin
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PAY_PERSONAL_PAYMENT_METHO_FK1') Then
37: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PAY_PERSONAL_PAYMENT_METHO_FK2') Then
40: -- Error: The specified external account does not exist
41: hr_utility.set_message(801, 'HR_6223_PAYM_BAD_ACCT');
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PAY_PERSONAL_PAYMENT_METHO_FK1') Then
37: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PAY_PERSONAL_PAYMENT_METHO_FK2') Then
40: -- Error: The specified external account does not exist
41: hr_utility.set_message(801, 'HR_6223_PAYM_BAD_ACCT');
42: hr_utility.raise_error;
37: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PAY_PERSONAL_PAYMENT_METHO_FK2') Then
40: -- Error: The specified external account does not exist
41: hr_utility.set_message(801, 'HR_6223_PAYM_BAD_ACCT');
42: hr_utility.raise_error;
43: ElsIf (p_constraint_name = 'PAY_PERSONAL_PAYMENT_METHO_PK') Then
44: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
45: hr_utility.set_message_token('PROCEDURE', l_proc);
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PAY_PERSONAL_PAYMENT_METHO_FK2') Then
40: -- Error: The specified external account does not exist
41: hr_utility.set_message(801, 'HR_6223_PAYM_BAD_ACCT');
42: hr_utility.raise_error;
43: ElsIf (p_constraint_name = 'PAY_PERSONAL_PAYMENT_METHO_PK') Then
44: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
45: hr_utility.set_message_token('PROCEDURE', l_proc);
46: hr_utility.set_message_token('STEP','15');
40: -- Error: The specified external account does not exist
41: hr_utility.set_message(801, 'HR_6223_PAYM_BAD_ACCT');
42: hr_utility.raise_error;
43: ElsIf (p_constraint_name = 'PAY_PERSONAL_PAYMENT_METHO_PK') Then
44: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
45: hr_utility.set_message_token('PROCEDURE', l_proc);
46: hr_utility.set_message_token('STEP','15');
47: hr_utility.raise_error;
48: Else
41: hr_utility.set_message(801, 'HR_6223_PAYM_BAD_ACCT');
42: hr_utility.raise_error;
43: ElsIf (p_constraint_name = 'PAY_PERSONAL_PAYMENT_METHO_PK') Then
44: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
45: hr_utility.set_message_token('PROCEDURE', l_proc);
46: hr_utility.set_message_token('STEP','15');
47: hr_utility.raise_error;
48: Else
49: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
42: hr_utility.raise_error;
43: ElsIf (p_constraint_name = 'PAY_PERSONAL_PAYMENT_METHO_PK') Then
44: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
45: hr_utility.set_message_token('PROCEDURE', l_proc);
46: hr_utility.set_message_token('STEP','15');
47: hr_utility.raise_error;
48: Else
49: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
50: hr_utility.set_message_token('PROCEDURE', l_proc);
43: ElsIf (p_constraint_name = 'PAY_PERSONAL_PAYMENT_METHO_PK') Then
44: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
45: hr_utility.set_message_token('PROCEDURE', l_proc);
46: hr_utility.set_message_token('STEP','15');
47: hr_utility.raise_error;
48: Else
49: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
50: hr_utility.set_message_token('PROCEDURE', l_proc);
51: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
45: hr_utility.set_message_token('PROCEDURE', l_proc);
46: hr_utility.set_message_token('STEP','15');
47: hr_utility.raise_error;
48: Else
49: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
50: hr_utility.set_message_token('PROCEDURE', l_proc);
51: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
52: hr_utility.raise_error;
53: End If;
46: hr_utility.set_message_token('STEP','15');
47: hr_utility.raise_error;
48: Else
49: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
50: hr_utility.set_message_token('PROCEDURE', l_proc);
51: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
52: hr_utility.raise_error;
53: End If;
54: --
47: hr_utility.raise_error;
48: Else
49: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
50: hr_utility.set_message_token('PROCEDURE', l_proc);
51: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
52: hr_utility.raise_error;
53: End If;
54: --
55: hr_utility.set_location(' Leaving:'||l_proc, 10);
48: Else
49: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
50: hr_utility.set_message_token('PROCEDURE', l_proc);
51: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
52: hr_utility.raise_error;
53: End If;
54: --
55: hr_utility.set_location(' Leaving:'||l_proc, 10);
56: End constraint_error;
51: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
52: hr_utility.raise_error;
53: End If;
54: --
55: hr_utility.set_location(' Leaving:'||l_proc, 10);
56: End constraint_error;
57: --
58: -- ----------------------------------------------------------------------------
59: -- |-----------------------------< api_updating >-----------------------------|
145: l_proc varchar2(72) := g_package||'api_updating';
146: l_fct_ret boolean;
147: --
148: Begin
149: hr_utility.set_location('Entering:'||l_proc, 5);
150: --
151: If (p_effective_date is null or
152: p_personal_payment_method_id is null or
153: p_object_version_number is null) Then
158: l_fct_ret := false;
159: Else
160: If (p_personal_payment_method_id = g_old_rec.personal_payment_method_id and
161: p_object_version_number = g_old_rec.object_version_number) Then
162: hr_utility.set_location(l_proc, 10);
163: --
164: -- The g_old_rec is current therefore we must
165: -- set the returning function to true
166: --
175: Close C_Sel1;
176: --
177: -- The primary key is invalid therefore we must error
178: --
179: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
180: hr_utility.raise_error;
181: End If;
182: Close C_Sel1;
183: If (p_object_version_number <> g_old_rec.object_version_number) Then
176: --
177: -- The primary key is invalid therefore we must error
178: --
179: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
180: hr_utility.raise_error;
181: End If;
182: Close C_Sel1;
183: If (p_object_version_number <> g_old_rec.object_version_number) Then
184: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
180: hr_utility.raise_error;
181: End If;
182: Close C_Sel1;
183: If (p_object_version_number <> g_old_rec.object_version_number) Then
184: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
185: hr_utility.raise_error;
186: End If;
187: hr_utility.set_location(l_proc, 15);
188: l_fct_ret := true;
181: End If;
182: Close C_Sel1;
183: If (p_object_version_number <> g_old_rec.object_version_number) Then
184: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
185: hr_utility.raise_error;
186: End If;
187: hr_utility.set_location(l_proc, 15);
188: l_fct_ret := true;
189: End If;
183: If (p_object_version_number <> g_old_rec.object_version_number) Then
184: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
185: hr_utility.raise_error;
186: End If;
187: hr_utility.set_location(l_proc, 15);
188: l_fct_ret := true;
189: End If;
190: End If;
191: hr_utility.set_location(' Leaving:'||l_proc, 20);
187: hr_utility.set_location(l_proc, 15);
188: l_fct_ret := true;
189: End If;
190: End If;
191: hr_utility.set_location(' Leaving:'||l_proc, 20);
192: Return (l_fct_ret);
193: --
194: End api_updating;
195: --
217: and p_effective_date
218: between t.effective_start_date and t.effective_end_date;
219: --
220: Begin
221: hr_utility.set_location('Entering:'||l_proc, 5);
222: Open C_Sel1;
223: Fetch C_Sel1 Into l_parent_key_value1,
224: l_parent_key_value2;
225: If C_Sel1%notfound then
223: Fetch C_Sel1 Into l_parent_key_value1,
224: l_parent_key_value2;
225: If C_Sel1%notfound then
226: Close C_Sel1;
227: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
228: hr_utility.set_message_token('PROCEDURE', l_proc);
229: hr_utility.set_message_token('STEP','10');
230: hr_utility.raise_error;
231: End If;
224: l_parent_key_value2;
225: If C_Sel1%notfound then
226: Close C_Sel1;
227: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
228: hr_utility.set_message_token('PROCEDURE', l_proc);
229: hr_utility.set_message_token('STEP','10');
230: hr_utility.raise_error;
231: End If;
232: Close C_Sel1;
225: If C_Sel1%notfound then
226: Close C_Sel1;
227: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
228: hr_utility.set_message_token('PROCEDURE', l_proc);
229: hr_utility.set_message_token('STEP','10');
230: hr_utility.raise_error;
231: End If;
232: Close C_Sel1;
233: --
226: Close C_Sel1;
227: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
228: hr_utility.set_message_token('PROCEDURE', l_proc);
229: hr_utility.set_message_token('STEP','10');
230: hr_utility.raise_error;
231: End If;
232: Close C_Sel1;
233: --
234: -- Call the corresponding datetrack api
250: p_delete_next_change => p_delete_next_change);
251: --
252: p_future_change := false;
253: --
254: hr_utility.set_location(' Leaving:'||l_proc, 10);
255: End find_dt_del_modes;
256: --
257: -- ----------------------------------------------------------------------------
258: -- |--------------------------< find_dt_upd_modes >---------------------------|
267: --
268: l_proc varchar2(72) := g_package||'find_dt_upd_modes';
269: --
270: Begin
271: hr_utility.set_location('Entering:'||l_proc, 5);
272: --
273: -- Call the corresponding datetrack api
274: --
275: dt_api.find_dt_upd_modes
281: p_update => p_update,
282: p_update_override => p_update_override,
283: p_update_change_insert => p_update_change_insert);
284: --
285: hr_utility.set_location(' Leaving:'||l_proc, 10);
286: End find_dt_upd_modes;
287: --
288: -- ----------------------------------------------------------------------------
289: -- |------------------------< upd_effective_end_date >------------------------|
299: l_proc varchar2(72) := g_package||'upd_effective_end_date';
300: l_object_version_number number;
301: --
302: Begin
303: hr_utility.set_location('Entering:'||l_proc, 5);
304: --
305: -- Because we are updating a row we must get the next object
306: -- version number.
307: --
310: (p_base_table_name => 'pay_personal_payment_methods_f',
311: p_base_key_column => 'personal_payment_method_id',
312: p_base_key_value => p_base_key_value);
313: --
314: hr_utility.set_location(l_proc, 10);
315: g_api_dml := true; -- Set the api dml status
316: --
317: -- Update the specified datetrack row setting the effective
318: -- end date to the specified new effective end date.
325: between t.effective_start_date and t.effective_end_date;
326: --
327: g_api_dml := false; -- Unset the api dml status
328: p_object_version_number := l_object_version_number;
329: hr_utility.set_location(' Leaving:'||l_proc, 15);
330: --
331: Exception
332: When Others Then
333: g_api_dml := false; -- Unset the api dml status
438: from hr_comments hc
439: where hc.comment_id = pay_ppm_shd.g_old_rec.comment_id;
440: --
441: Begin
442: hr_utility.set_location('Entering:'||l_proc, 5);
443: --
444: -- Ensure that all the mandatory arguments are not null
445: --
446: hr_api.mandatory_arg_error(p_api_name => l_proc,
484: Close C_Sel1;
485: --
486: -- The primary key is invalid therefore we must error
487: --
488: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
489: hr_utility.raise_error;
490: End If;
491: Close C_Sel1;
492: If (p_object_version_number <> g_old_rec.object_version_number) Then
485: --
486: -- The primary key is invalid therefore we must error
487: --
488: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
489: hr_utility.raise_error;
490: End If;
491: Close C_Sel1;
492: If (p_object_version_number <> g_old_rec.object_version_number) Then
493: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
489: hr_utility.raise_error;
490: End If;
491: Close C_Sel1;
492: If (p_object_version_number <> g_old_rec.object_version_number) Then
493: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
494: hr_utility.raise_error;
495: End If;
496: hr_utility.set_location(l_proc, 15);
497: --
490: End If;
491: Close C_Sel1;
492: If (p_object_version_number <> g_old_rec.object_version_number) Then
493: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
494: hr_utility.raise_error;
495: End If;
496: hr_utility.set_location(l_proc, 15);
497: --
498: -- Providing we are doing an update and a comment_id exists then
492: If (p_object_version_number <> g_old_rec.object_version_number) Then
493: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
494: hr_utility.raise_error;
495: End If;
496: hr_utility.set_location(l_proc, 15);
497: --
498: -- Providing we are doing an update and a comment_id exists then
499: -- we select the comment text.
500: --
510: -- The comments for the specified comment_id does not exist.
511: -- We must error due to data integrity problems.
512: --
513: Close C_Sel3;
514: hr_utility.set_message(801, 'HR_7202_COMMENT_TEXT_NOT_EXIST');
515: hr_utility.raise_error;
516: End If;
517: Close C_Sel3;
518: End If;
511: -- We must error due to data integrity problems.
512: --
513: Close C_Sel3;
514: hr_utility.set_message(801, 'HR_7202_COMMENT_TEXT_NOT_EXIST');
515: hr_utility.raise_error;
516: End If;
517: Close C_Sel3;
518: End If;
519: --
542: -- We are doing a datetrack 'INSERT' which is illegal within this
543: -- procedure therefore we must error (note: to lck on insert the
544: -- private procedure ins_lck should be called).
545: --
546: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
547: hr_utility.set_message_token('PROCEDURE', l_proc);
548: hr_utility.set_message_token('STEP','20');
549: hr_utility.raise_error;
550: End If;
543: -- procedure therefore we must error (note: to lck on insert the
544: -- private procedure ins_lck should be called).
545: --
546: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
547: hr_utility.set_message_token('PROCEDURE', l_proc);
548: hr_utility.set_message_token('STEP','20');
549: hr_utility.raise_error;
550: End If;
551: --
544: -- private procedure ins_lck should be called).
545: --
546: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
547: hr_utility.set_message_token('PROCEDURE', l_proc);
548: hr_utility.set_message_token('STEP','20');
549: hr_utility.raise_error;
550: End If;
551: --
552: -- Set the validation start and end date OUT arguments
545: --
546: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
547: hr_utility.set_message_token('PROCEDURE', l_proc);
548: hr_utility.set_message_token('STEP','20');
549: hr_utility.raise_error;
550: End If;
551: --
552: -- Set the validation start and end date OUT arguments
553: --
553: --
554: p_validation_start_date := l_validation_start_date;
555: p_validation_end_date := l_validation_end_date;
556: --
557: hr_utility.set_location(' Leaving:'||l_proc, 30);
558: --
559: -- We need to trap the ORA LOCK exception
560: --
561: Exception
563: --
564: -- The object is locked therefore we need to supply a meaningful
565: -- error message.
566: --
567: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
568: hr_utility.set_message_token('TABLE_NAME', l_lock_table)
569: ;
570: hr_utility.raise_error;
571: When l_object_invalid then
564: -- The object is locked therefore we need to supply a meaningful
565: -- error message.
566: --
567: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
568: hr_utility.set_message_token('TABLE_NAME', l_lock_table)
569: ;
570: hr_utility.raise_error;
571: When l_object_invalid then
572: --
566: --
567: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
568: hr_utility.set_message_token('TABLE_NAME', l_lock_table)
569: ;
570: hr_utility.raise_error;
571: When l_object_invalid then
572: --
573: -- The object doesn't exist or is invalid
574: --
571: When l_object_invalid then
572: --
573: -- The object doesn't exist or is invalid
574: --
575: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
576: hr_utility.set_message_token('TABLE_NAME', 'pay_personal_payment_methods_f')
577: ;
578: hr_utility.raise_error;
579: End lck;
572: --
573: -- The object doesn't exist or is invalid
574: --
575: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
576: hr_utility.set_message_token('TABLE_NAME', 'pay_personal_payment_methods_f')
577: ;
578: hr_utility.raise_error;
579: End lck;
580: --
574: --
575: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
576: hr_utility.set_message_token('TABLE_NAME', 'pay_personal_payment_methods_f')
577: ;
578: hr_utility.raise_error;
579: End lck;
580: --
581: -- ----------------------------------------------------------------------------
582: -- |-----------------------------< convert_args >-----------------------------|
658: l_proc varchar2(72) := g_package||'convert_args';
659: --
660: Begin
661: --
662: hr_utility.set_location('Entering:'||l_proc, 5);
663: --
664: -- Convert arguments into local l_rec structure.
665: --
666: l_rec.personal_payment_method_id := p_personal_payment_method_id;
733: l_rec.ppm_information30 := p_ppm_information30;
734: --
735: -- Return the plsql record structure.
736: --
737: hr_utility.set_location(' Leaving:'||l_proc, 10);
738: Return(l_rec);
739: --
740: End convert_args;
741: --