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 = 'PER_PEOPLE_F_FK1') Then
37: -- Error: The Business Group is not defined.
38: hr_utility.set_message(801, 'HR_6673_PO_EMP_NO_BG');
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PER_PEOPLE_F_FK1') Then
37: -- Error: The Business Group is not defined.
38: hr_utility.set_message(801, 'HR_6673_PO_EMP_NO_BG');
39: hr_utility.raise_error;
40: ElsIf (p_constraint_name = 'PER_PEOPLE_F_FK2') Then
41: -- Error: Invalid person type
42: hr_utility.set_message(801, 'HR_7513_PER_TYPE_INVALID');
35: --
36: If (p_constraint_name = 'PER_PEOPLE_F_FK1') Then
37: -- Error: The Business Group is not defined.
38: hr_utility.set_message(801, 'HR_6673_PO_EMP_NO_BG');
39: hr_utility.raise_error;
40: ElsIf (p_constraint_name = 'PER_PEOPLE_F_FK2') Then
41: -- Error: Invalid person type
42: hr_utility.set_message(801, 'HR_7513_PER_TYPE_INVALID');
43: hr_utility.raise_error;
38: hr_utility.set_message(801, 'HR_6673_PO_EMP_NO_BG');
39: hr_utility.raise_error;
40: ElsIf (p_constraint_name = 'PER_PEOPLE_F_FK2') Then
41: -- Error: Invalid person type
42: hr_utility.set_message(801, 'HR_7513_PER_TYPE_INVALID');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_PEOPLE_F_PK') Then
45: -- Error: The primary key specified is invalid
46: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
39: hr_utility.raise_error;
40: ElsIf (p_constraint_name = 'PER_PEOPLE_F_FK2') Then
41: -- Error: Invalid person type
42: hr_utility.set_message(801, 'HR_7513_PER_TYPE_INVALID');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_PEOPLE_F_PK') Then
45: -- Error: The primary key specified is invalid
46: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
47: hr_utility.raise_error;
42: hr_utility.set_message(801, 'HR_7513_PER_TYPE_INVALID');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_PEOPLE_F_PK') Then
45: -- Error: The primary key specified is invalid
46: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_PER_EXPENSE_CHECK_SEND_CHK') Then
49: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
50: hr_utility.set_message_token('PROCEDURE', l_proc);
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_PEOPLE_F_PK') Then
45: -- Error: The primary key specified is invalid
46: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_PER_EXPENSE_CHECK_SEND_CHK') Then
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: -- Error: The primary key specified is invalid
46: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_PER_EXPENSE_CHECK_SEND_CHK') Then
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: ElsIf (p_constraint_name = 'PER_PER_REGISTERED_DISABLE_CHK') Then
46: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_PER_EXPENSE_CHECK_SEND_CHK') Then
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: ElsIf (p_constraint_name = 'PER_PER_REGISTERED_DISABLE_CHK') Then
54: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_PER_EXPENSE_CHECK_SEND_CHK') Then
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: ElsIf (p_constraint_name = 'PER_PER_REGISTERED_DISABLE_CHK') Then
54: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
55: hr_utility.set_message_token('PROCEDURE', l_proc);
48: ElsIf (p_constraint_name = 'PER_PER_EXPENSE_CHECK_SEND_CHK') Then
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: ElsIf (p_constraint_name = 'PER_PER_REGISTERED_DISABLE_CHK') Then
54: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
55: hr_utility.set_message_token('PROCEDURE', l_proc);
56: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
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: ElsIf (p_constraint_name = 'PER_PER_REGISTERED_DISABLE_CHK') Then
54: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
55: hr_utility.set_message_token('PROCEDURE', l_proc);
56: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
57: hr_utility.raise_error;
58: ElsIf (p_constraint_name = 'PER_PER_SEX_CHK') Then
51: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
52: hr_utility.raise_error;
53: ElsIf (p_constraint_name = 'PER_PER_REGISTERED_DISABLE_CHK') Then
54: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
55: hr_utility.set_message_token('PROCEDURE', l_proc);
56: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
57: hr_utility.raise_error;
58: ElsIf (p_constraint_name = 'PER_PER_SEX_CHK') Then
59: hr_utility.set_message(801, 'HR_7511_PER_SEX_INVALID');
52: hr_utility.raise_error;
53: ElsIf (p_constraint_name = 'PER_PER_REGISTERED_DISABLE_CHK') Then
54: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
55: hr_utility.set_message_token('PROCEDURE', l_proc);
56: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
57: hr_utility.raise_error;
58: ElsIf (p_constraint_name = 'PER_PER_SEX_CHK') Then
59: hr_utility.set_message(801, 'HR_7511_PER_SEX_INVALID');
60: hr_utility.raise_error;
53: ElsIf (p_constraint_name = 'PER_PER_REGISTERED_DISABLE_CHK') Then
54: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
55: hr_utility.set_message_token('PROCEDURE', l_proc);
56: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
57: hr_utility.raise_error;
58: ElsIf (p_constraint_name = 'PER_PER_SEX_CHK') Then
59: hr_utility.set_message(801, 'HR_7511_PER_SEX_INVALID');
60: hr_utility.raise_error;
61: ElsIf (p_constraint_name = 'PER_PER_ON_MILITARY_SRV_CHK') Then
55: hr_utility.set_message_token('PROCEDURE', l_proc);
56: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
57: hr_utility.raise_error;
58: ElsIf (p_constraint_name = 'PER_PER_SEX_CHK') Then
59: hr_utility.set_message(801, 'HR_7511_PER_SEX_INVALID');
60: hr_utility.raise_error;
61: ElsIf (p_constraint_name = 'PER_PER_ON_MILITARY_SRV_CHK') Then
62: hr_utility.set_message(800, 'PER_52115_PER_INV_ON_MIL_SERV');
63: hr_utility.raise_error;
56: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
57: hr_utility.raise_error;
58: ElsIf (p_constraint_name = 'PER_PER_SEX_CHK') Then
59: hr_utility.set_message(801, 'HR_7511_PER_SEX_INVALID');
60: hr_utility.raise_error;
61: ElsIf (p_constraint_name = 'PER_PER_ON_MILITARY_SRV_CHK') Then
62: hr_utility.set_message(800, 'PER_52115_PER_INV_ON_MIL_SERV');
63: hr_utility.raise_error;
64: ElsIf (p_constraint_name = 'PER_PER_RESUME_EXISTS_CHK') Then
58: ElsIf (p_constraint_name = 'PER_PER_SEX_CHK') Then
59: hr_utility.set_message(801, 'HR_7511_PER_SEX_INVALID');
60: hr_utility.raise_error;
61: ElsIf (p_constraint_name = 'PER_PER_ON_MILITARY_SRV_CHK') Then
62: hr_utility.set_message(800, 'PER_52115_PER_INV_ON_MIL_SERV');
63: hr_utility.raise_error;
64: ElsIf (p_constraint_name = 'PER_PER_RESUME_EXISTS_CHK') Then
65: hr_utility.set_message(800, 'PER_52116_PER_INV_RES_EXIST');
66: hr_utility.raise_error;
59: hr_utility.set_message(801, 'HR_7511_PER_SEX_INVALID');
60: hr_utility.raise_error;
61: ElsIf (p_constraint_name = 'PER_PER_ON_MILITARY_SRV_CHK') Then
62: hr_utility.set_message(800, 'PER_52115_PER_INV_ON_MIL_SERV');
63: hr_utility.raise_error;
64: ElsIf (p_constraint_name = 'PER_PER_RESUME_EXISTS_CHK') Then
65: hr_utility.set_message(800, 'PER_52116_PER_INV_RES_EXIST');
66: hr_utility.raise_error;
67: ElsIf (p_constraint_name = 'PER_PER_SECOND_PASSPORT_CHK') Then
61: ElsIf (p_constraint_name = 'PER_PER_ON_MILITARY_SRV_CHK') Then
62: hr_utility.set_message(800, 'PER_52115_PER_INV_ON_MIL_SERV');
63: hr_utility.raise_error;
64: ElsIf (p_constraint_name = 'PER_PER_RESUME_EXISTS_CHK') Then
65: hr_utility.set_message(800, 'PER_52116_PER_INV_RES_EXIST');
66: hr_utility.raise_error;
67: ElsIf (p_constraint_name = 'PER_PER_SECOND_PASSPORT_CHK') Then
68: hr_utility.set_message(800, 'PER_52117_PER_INV_SEC_PAS_EXT');
69: hr_utility.raise_error;
62: hr_utility.set_message(800, 'PER_52115_PER_INV_ON_MIL_SERV');
63: hr_utility.raise_error;
64: ElsIf (p_constraint_name = 'PER_PER_RESUME_EXISTS_CHK') Then
65: hr_utility.set_message(800, 'PER_52116_PER_INV_RES_EXIST');
66: hr_utility.raise_error;
67: ElsIf (p_constraint_name = 'PER_PER_SECOND_PASSPORT_CHK') Then
68: hr_utility.set_message(800, 'PER_52117_PER_INV_SEC_PAS_EXT');
69: hr_utility.raise_error;
70: Elsif (p_constraint_name = 'PER_BEN_NO_CVG_F_CHK') Then
64: ElsIf (p_constraint_name = 'PER_PER_RESUME_EXISTS_CHK') Then
65: hr_utility.set_message(800, 'PER_52116_PER_INV_RES_EXIST');
66: hr_utility.raise_error;
67: ElsIf (p_constraint_name = 'PER_PER_SECOND_PASSPORT_CHK') Then
68: hr_utility.set_message(800, 'PER_52117_PER_INV_SEC_PAS_EXT');
69: hr_utility.raise_error;
70: Elsif (p_constraint_name = 'PER_BEN_NO_CVG_F_CHK') Then
71: hr_utility.set_message(800,'PER_52387_BEN_NO_CVG_F');
72: hr_utility.raise_error;
65: hr_utility.set_message(800, 'PER_52116_PER_INV_RES_EXIST');
66: hr_utility.raise_error;
67: ElsIf (p_constraint_name = 'PER_PER_SECOND_PASSPORT_CHK') Then
68: hr_utility.set_message(800, 'PER_52117_PER_INV_SEC_PAS_EXT');
69: hr_utility.raise_error;
70: Elsif (p_constraint_name = 'PER_BEN_NO_CVG_F_CHK') Then
71: hr_utility.set_message(800,'PER_52387_BEN_NO_CVG_F');
72: hr_utility.raise_error;
73: Elsif (p_constraint_name = 'PER_DPDNT_VLNTRY_SVCE_CHK') Then
67: ElsIf (p_constraint_name = 'PER_PER_SECOND_PASSPORT_CHK') Then
68: hr_utility.set_message(800, 'PER_52117_PER_INV_SEC_PAS_EXT');
69: hr_utility.raise_error;
70: Elsif (p_constraint_name = 'PER_BEN_NO_CVG_F_CHK') Then
71: hr_utility.set_message(800,'PER_52387_BEN_NO_CVG_F');
72: hr_utility.raise_error;
73: Elsif (p_constraint_name = 'PER_DPDNT_VLNTRY_SVCE_CHK') Then
74: hr_utility.set_message(800,'PER_52389_DPDNT_VLNTRY_SVCE_F');
75: hr_utility.raise_error;
68: hr_utility.set_message(800, 'PER_52117_PER_INV_SEC_PAS_EXT');
69: hr_utility.raise_error;
70: Elsif (p_constraint_name = 'PER_BEN_NO_CVG_F_CHK') Then
71: hr_utility.set_message(800,'PER_52387_BEN_NO_CVG_F');
72: hr_utility.raise_error;
73: Elsif (p_constraint_name = 'PER_DPDNT_VLNTRY_SVCE_CHK') Then
74: hr_utility.set_message(800,'PER_52389_DPDNT_VLNTRY_SVCE_F');
75: hr_utility.raise_error;
76: Else
70: Elsif (p_constraint_name = 'PER_BEN_NO_CVG_F_CHK') Then
71: hr_utility.set_message(800,'PER_52387_BEN_NO_CVG_F');
72: hr_utility.raise_error;
73: Elsif (p_constraint_name = 'PER_DPDNT_VLNTRY_SVCE_CHK') Then
74: hr_utility.set_message(800,'PER_52389_DPDNT_VLNTRY_SVCE_F');
75: hr_utility.raise_error;
76: Else
77: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
78: hr_utility.set_message_token('PROCEDURE', l_proc);
71: hr_utility.set_message(800,'PER_52387_BEN_NO_CVG_F');
72: hr_utility.raise_error;
73: Elsif (p_constraint_name = 'PER_DPDNT_VLNTRY_SVCE_CHK') Then
74: hr_utility.set_message(800,'PER_52389_DPDNT_VLNTRY_SVCE_F');
75: hr_utility.raise_error;
76: Else
77: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
78: hr_utility.set_message_token('PROCEDURE', l_proc);
79: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
73: Elsif (p_constraint_name = 'PER_DPDNT_VLNTRY_SVCE_CHK') Then
74: hr_utility.set_message(800,'PER_52389_DPDNT_VLNTRY_SVCE_F');
75: hr_utility.raise_error;
76: Else
77: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
78: hr_utility.set_message_token('PROCEDURE', l_proc);
79: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
80: hr_utility.raise_error;
81: End If;
74: hr_utility.set_message(800,'PER_52389_DPDNT_VLNTRY_SVCE_F');
75: hr_utility.raise_error;
76: Else
77: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
78: hr_utility.set_message_token('PROCEDURE', l_proc);
79: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
80: hr_utility.raise_error;
81: End If;
82: --
75: hr_utility.raise_error;
76: Else
77: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
78: hr_utility.set_message_token('PROCEDURE', l_proc);
79: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
80: hr_utility.raise_error;
81: End If;
82: --
83: hr_utility.set_location(' Leaving:'||l_proc, 10);
76: Else
77: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
78: hr_utility.set_message_token('PROCEDURE', l_proc);
79: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
80: hr_utility.raise_error;
81: End If;
82: --
83: hr_utility.set_location(' Leaving:'||l_proc, 10);
84: End constraint_error;
79: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
80: hr_utility.raise_error;
81: End If;
82: --
83: hr_utility.set_location(' Leaving:'||l_proc, 10);
84: End constraint_error;
85: --
86: -- ----------------------------------------------------------------------------
87: -- |-----------------------------< api_updating >-----------------------------|
253: l_proc varchar2(72) := g_package||'api_updating';
254: l_fct_ret boolean;
255: --
256: Begin
257: hr_utility.set_location('Entering:'||l_proc, 5);
258: --
259: If (p_effective_date is null or
260: p_person_id is null or
261: p_object_version_number is null) Then
266: l_fct_ret := false;
267: Else
268: If (p_person_id = g_old_rec.person_id and
269: p_object_version_number = g_old_rec.object_version_number) Then
270: hr_utility.set_location(l_proc, 10);
271: --
272: -- The g_old_rec is current therefore we must
273: -- set the returning function to true
274: --
288: Close C_Sel1;
289: --
290: -- The primary key is invalid therefore we must error
291: --
292: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
293: hr_utility.raise_error;
294: End If;
295: Close C_Sel1;
296: If (p_object_version_number <> g_old_rec.object_version_number) Then
289: --
290: -- The primary key is invalid therefore we must error
291: --
292: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
293: hr_utility.raise_error;
294: End If;
295: Close C_Sel1;
296: If (p_object_version_number <> g_old_rec.object_version_number) Then
297: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
293: hr_utility.raise_error;
294: End If;
295: Close C_Sel1;
296: If (p_object_version_number <> g_old_rec.object_version_number) Then
297: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
298: hr_utility.raise_error;
299: End If;
300: hr_utility.set_location(l_proc, 15);
301: l_fct_ret := true;
294: End If;
295: Close C_Sel1;
296: If (p_object_version_number <> g_old_rec.object_version_number) Then
297: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
298: hr_utility.raise_error;
299: End If;
300: hr_utility.set_location(l_proc, 15);
301: l_fct_ret := true;
302: End If;
296: If (p_object_version_number <> g_old_rec.object_version_number) Then
297: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
298: hr_utility.raise_error;
299: End If;
300: hr_utility.set_location(l_proc, 15);
301: l_fct_ret := true;
302: End If;
303: End If;
304: hr_utility.set_location(' Leaving:'||l_proc, 20);
300: hr_utility.set_location(l_proc, 15);
301: l_fct_ret := true;
302: End If;
303: End If;
304: hr_utility.set_location(' Leaving:'||l_proc, 20);
305: Return (l_fct_ret);
306: --
307: End api_updating;
308: --
322: --
323: --
324: --
325: Begin
326: hr_utility.set_location('Entering:'||l_proc, 5);
327: --
328: --
329: -- Call the corresponding datetrack api
330: --
337: p_delete => p_delete,
338: p_future_change => p_future_change,
339: p_delete_next_change => p_delete_next_change);
340: --
341: hr_utility.set_location(' Leaving:'||l_proc, 10);
342: End find_dt_del_modes;
343: --
344: -- ----------------------------------------------------------------------------
345: -- |--------------------------< find_dt_upd_modes >---------------------------|
354: --
355: l_proc varchar2(72) := g_package||'find_dt_upd_modes';
356: --
357: Begin
358: hr_utility.set_location('Entering:'||l_proc, 5);
359: --
360: -- Call the corresponding datetrack api
361: --
362: dt_api.find_dt_upd_modes
368: p_update => p_update,
369: p_update_override => p_update_override,
370: p_update_change_insert => p_update_change_insert);
371: --
372: hr_utility.set_location(' Leaving:'||l_proc, 10);
373: End find_dt_upd_modes;
374: --
375: -- ----------------------------------------------------------------------------
376: -- |------------------------< upd_effective_end_date >------------------------|
386: l_proc varchar2(72) := g_package||'upd_effective_end_date';
387: l_object_version_number number;
388: --
389: Begin
390: hr_utility.set_location('Entering:'||l_proc, 5);
391: --
392: -- Because we are updating a row we must get the next object
393: -- version number.
394: --
397: (p_base_table_name => 'per_all_people_f',
398: p_base_key_column => 'person_id',
399: p_base_key_value => p_base_key_value);
400: --
401: hr_utility.set_location(l_proc, 10);
402: g_api_dml := true; -- Set the api dml status
403: --
404: -- Update the specified datetrack row setting the effective
405: -- end date to the specified new effective end date.
412: between t.effective_start_date and t.effective_end_date;
413: --
414: g_api_dml := false; -- Unset the api dml status
415: p_object_version_number := l_object_version_number;
416: hr_utility.set_location(' Leaving:'||l_proc, 15);
417: --
418: Exception
419: When Others Then
420: g_api_dml := false; -- Unset the api dml status
604: from hr_comments hc
605: where hc.comment_id = per_per_shd.g_old_rec.comment_id;
606: --
607: Begin
608: hr_utility.set_location('Entering:'||l_proc, 5);
609: --
610: -- Ensure that all the mandatory arguments are not null
611: --
612: hr_api.mandatory_arg_error(p_api_name => l_proc,
637: Close C_Sel1;
638: --
639: -- The primary key is invalid therefore we must error
640: --
641: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
642: hr_utility.raise_error;
643: End If;
644: Close C_Sel1;
645: If (p_object_version_number <> g_old_rec.object_version_number) Then
638: --
639: -- The primary key is invalid therefore we must error
640: --
641: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
642: hr_utility.raise_error;
643: End If;
644: Close C_Sel1;
645: If (p_object_version_number <> g_old_rec.object_version_number) Then
646: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
642: hr_utility.raise_error;
643: End If;
644: Close C_Sel1;
645: If (p_object_version_number <> g_old_rec.object_version_number) Then
646: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
647: hr_utility.raise_error;
648: End If;
649: hr_utility.set_location(l_proc, 15);
650: --
643: End If;
644: Close C_Sel1;
645: If (p_object_version_number <> g_old_rec.object_version_number) Then
646: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
647: hr_utility.raise_error;
648: End If;
649: hr_utility.set_location(l_proc, 15);
650: --
651: -- Providing we are doing an update and a comment_id exists then
645: If (p_object_version_number <> g_old_rec.object_version_number) Then
646: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
647: hr_utility.raise_error;
648: End If;
649: hr_utility.set_location(l_proc, 15);
650: --
651: -- Providing we are doing an update and a comment_id exists then
652: -- we select the comment text.
653: --
663: -- The comments for the specified comment_id does not exist.
664: -- We must error due to data integrity problems.
665: --
666: Close C_Sel3;
667: hr_utility.set_message(801, 'HR_7202_COMMENT_TEXT_NOT_EXIST');
668: hr_utility.raise_error;
669: End If;
670: Close C_Sel3;
671: End If;
664: -- We must error due to data integrity problems.
665: --
666: Close C_Sel3;
667: hr_utility.set_message(801, 'HR_7202_COMMENT_TEXT_NOT_EXIST');
668: hr_utility.raise_error;
669: End If;
670: Close C_Sel3;
671: End If;
672: --
689: -- We are doing a datetrack 'INSERT' which is illegal within this
690: -- procedure therefore we must error (note: to lck on insert the
691: -- private procedure ins_lck should be called).
692: --
693: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
694: hr_utility.set_message_token('PROCEDURE', l_proc);
695: hr_utility.set_message_token('STEP','20');
696: hr_utility.raise_error;
697: End If;
690: -- procedure therefore we must error (note: to lck on insert the
691: -- private procedure ins_lck should be called).
692: --
693: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
694: hr_utility.set_message_token('PROCEDURE', l_proc);
695: hr_utility.set_message_token('STEP','20');
696: hr_utility.raise_error;
697: End If;
698: --
691: -- private procedure ins_lck should be called).
692: --
693: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
694: hr_utility.set_message_token('PROCEDURE', l_proc);
695: hr_utility.set_message_token('STEP','20');
696: hr_utility.raise_error;
697: End If;
698: --
699: -- Set the validation start and end date OUT arguments
692: --
693: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
694: hr_utility.set_message_token('PROCEDURE', l_proc);
695: hr_utility.set_message_token('STEP','20');
696: hr_utility.raise_error;
697: End If;
698: --
699: -- Set the validation start and end date OUT arguments
700: --
700: --
701: p_validation_start_date := l_validation_start_date;
702: p_validation_end_date := l_validation_end_date;
703: --
704: hr_utility.set_location(' Leaving:'||l_proc, 30);
705: --
706: -- We need to trap the ORA LOCK exception
707: --
708: Exception
710: --
711: -- The object is locked therefore we need to supply a meaningful
712: -- error message.
713: --
714: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
715: hr_utility.set_message_token('TABLE_NAME', 'per_people_f');
716: hr_utility.raise_error;
717: When l_object_invalid then
718: --
711: -- The object is locked therefore we need to supply a meaningful
712: -- error message.
713: --
714: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
715: hr_utility.set_message_token('TABLE_NAME', 'per_people_f');
716: hr_utility.raise_error;
717: When l_object_invalid then
718: --
719: -- The object doesn't exist or is invalid
712: -- error message.
713: --
714: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
715: hr_utility.set_message_token('TABLE_NAME', 'per_people_f');
716: hr_utility.raise_error;
717: When l_object_invalid then
718: --
719: -- The object doesn't exist or is invalid
720: --
717: When l_object_invalid then
718: --
719: -- The object doesn't exist or is invalid
720: --
721: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
722: hr_utility.set_message_token('TABLE_NAME', 'per_people_f');
723: hr_utility.raise_error;
724: End lck;
725: --
718: --
719: -- The object doesn't exist or is invalid
720: --
721: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
722: hr_utility.set_message_token('TABLE_NAME', 'per_people_f');
723: hr_utility.raise_error;
724: End lck;
725: --
726: -- ----------------------------------------------------------------------------
719: -- The object doesn't exist or is invalid
720: --
721: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
722: hr_utility.set_message_token('TABLE_NAME', 'per_people_f');
723: hr_utility.raise_error;
724: End lck;
725: --
726: -- ----------------------------------------------------------------------------
727: -- |-----------------------------< convert_args >-----------------------------|
883: l_proc varchar2(72) := g_package||'convert_args';
884: --
885: Begin
886: --
887: hr_utility.set_location('Entering:'||l_proc, 5);
888: --
889: -- Convert arguments into local l_rec structure.
890: --
891: l_rec.person_id := p_person_id;
1039: l_rec.local_name := p_local_name;
1040: --
1041: -- Return the plsql record structure.
1042: --
1043: hr_utility.set_location(' Leaving:'||l_proc, 10);
1044: Return(l_rec);
1045: --
1046: End convert_args;
1047: --