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_JOB_REQUIREMENTS_FK1') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
33: Begin
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK1') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK2') Then
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK1') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK2') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: --
36: If (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK1') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK2') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
36: If (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK1') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK2') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK2') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK50') Then
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK2') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK50') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK2') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK50') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
41: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK2') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK50') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','15');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK50') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','15');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK51') Then
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK50') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','15');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK51') Then
52: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK50') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','15');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK51') Then
52: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
46: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK50') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','15');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK51') Then
52: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('STEP','20');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','15');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK51') Then
52: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('STEP','20');
55: hr_utility.raise_error;
56: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_PK') Then
49: hr_utility.set_message_token('STEP','15');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK51') Then
52: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('STEP','20');
55: hr_utility.raise_error;
56: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_PK') Then
57: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK51') Then
52: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('STEP','20');
55: hr_utility.raise_error;
56: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_PK') Then
57: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
51: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_FK51') Then
52: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('STEP','20');
55: hr_utility.raise_error;
56: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_PK') Then
57: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('STEP','25');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('STEP','20');
55: hr_utility.raise_error;
56: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_PK') Then
57: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('STEP','25');
60: hr_utility.raise_error;
61: ElsIf (p_constraint_name = 'PER_REQ_ESSENTIAL_CHK') Then
54: hr_utility.set_message_token('STEP','20');
55: hr_utility.raise_error;
56: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_PK') Then
57: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('STEP','25');
60: hr_utility.raise_error;
61: ElsIf (p_constraint_name = 'PER_REQ_ESSENTIAL_CHK') Then
62: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
55: hr_utility.raise_error;
56: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_PK') Then
57: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('STEP','25');
60: hr_utility.raise_error;
61: ElsIf (p_constraint_name = 'PER_REQ_ESSENTIAL_CHK') Then
62: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
63: hr_utility.set_message_token('PROCEDURE', l_proc);
56: ElsIf (p_constraint_name = 'PER_JOB_REQUIREMENTS_PK') Then
57: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('STEP','25');
60: hr_utility.raise_error;
61: ElsIf (p_constraint_name = 'PER_REQ_ESSENTIAL_CHK') Then
62: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
63: hr_utility.set_message_token('PROCEDURE', l_proc);
64: hr_utility.set_message_token('STEP','30');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('STEP','25');
60: hr_utility.raise_error;
61: ElsIf (p_constraint_name = 'PER_REQ_ESSENTIAL_CHK') Then
62: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
63: hr_utility.set_message_token('PROCEDURE', l_proc);
64: hr_utility.set_message_token('STEP','30');
65: hr_utility.raise_error;
66: Else
59: hr_utility.set_message_token('STEP','25');
60: hr_utility.raise_error;
61: ElsIf (p_constraint_name = 'PER_REQ_ESSENTIAL_CHK') Then
62: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
63: hr_utility.set_message_token('PROCEDURE', l_proc);
64: hr_utility.set_message_token('STEP','30');
65: hr_utility.raise_error;
66: Else
67: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
60: hr_utility.raise_error;
61: ElsIf (p_constraint_name = 'PER_REQ_ESSENTIAL_CHK') Then
62: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
63: hr_utility.set_message_token('PROCEDURE', l_proc);
64: hr_utility.set_message_token('STEP','30');
65: hr_utility.raise_error;
66: Else
67: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
68: hr_utility.set_message_token('PROCEDURE', l_proc);
61: ElsIf (p_constraint_name = 'PER_REQ_ESSENTIAL_CHK') Then
62: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
63: hr_utility.set_message_token('PROCEDURE', l_proc);
64: hr_utility.set_message_token('STEP','30');
65: hr_utility.raise_error;
66: Else
67: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
68: hr_utility.set_message_token('PROCEDURE', l_proc);
69: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
63: hr_utility.set_message_token('PROCEDURE', l_proc);
64: hr_utility.set_message_token('STEP','30');
65: hr_utility.raise_error;
66: Else
67: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
68: hr_utility.set_message_token('PROCEDURE', l_proc);
69: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
70: hr_utility.raise_error;
71: End If;
64: hr_utility.set_message_token('STEP','30');
65: hr_utility.raise_error;
66: Else
67: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
68: hr_utility.set_message_token('PROCEDURE', l_proc);
69: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
70: hr_utility.raise_error;
71: End If;
72: --
65: hr_utility.raise_error;
66: Else
67: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
68: hr_utility.set_message_token('PROCEDURE', l_proc);
69: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
70: hr_utility.raise_error;
71: End If;
72: --
73: hr_utility.set_location(' Leaving:'||l_proc, 10);
66: Else
67: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
68: hr_utility.set_message_token('PROCEDURE', l_proc);
69: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
70: hr_utility.raise_error;
71: End If;
72: --
73: hr_utility.set_location(' Leaving:'||l_proc, 10);
74: End constraint_error;
69: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
70: hr_utility.raise_error;
71: End If;
72: --
73: hr_utility.set_location(' Leaving:'||l_proc, 10);
74: End constraint_error;
75: --
76: -- ---------------------------------------------------------------------------
77: -- |----------------------------< api_updating >-----------------------------|
128: l_proc varchar2(72) := g_package||'api_updating';
129: l_fct_ret boolean;
130: --
131: Begin
132: hr_utility.set_location('Entering:'||l_proc, 5);
133: --
134: If (
135: p_job_requirement_id is null and
136: p_object_version_number is null
144: If (
145: p_job_requirement_id = g_old_rec.job_requirement_id and
146: p_object_version_number = g_old_rec.object_version_number
147: ) Then
148: hr_utility.set_location(l_proc, 10);
149: --
150: -- The g_old_rec is current therefore we must
151: -- set the returning function to true
152: --
161: Close C_Sel1;
162: --
163: -- The primary key is invalid therefore we must error
164: --
165: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
166: hr_utility.raise_error;
167: End If;
168: Close C_Sel1;
169: If (p_object_version_number <> g_old_rec.object_version_number) Then
162: --
163: -- The primary key is invalid therefore we must error
164: --
165: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
166: hr_utility.raise_error;
167: End If;
168: Close C_Sel1;
169: If (p_object_version_number <> g_old_rec.object_version_number) Then
170: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
166: hr_utility.raise_error;
167: End If;
168: Close C_Sel1;
169: If (p_object_version_number <> g_old_rec.object_version_number) Then
170: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
171: hr_utility.raise_error;
172: End If;
173: hr_utility.set_location(l_proc, 15);
174: l_fct_ret := true;
167: End If;
168: Close C_Sel1;
169: If (p_object_version_number <> g_old_rec.object_version_number) Then
170: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
171: hr_utility.raise_error;
172: End If;
173: hr_utility.set_location(l_proc, 15);
174: l_fct_ret := true;
175: End If;
169: If (p_object_version_number <> g_old_rec.object_version_number) Then
170: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
171: hr_utility.raise_error;
172: End If;
173: hr_utility.set_location(l_proc, 15);
174: l_fct_ret := true;
175: End If;
176: End If;
177: hr_utility.set_location(' Leaving:'||l_proc, 20);
173: hr_utility.set_location(l_proc, 15);
174: l_fct_ret := true;
175: End If;
176: End If;
177: hr_utility.set_location(' Leaving:'||l_proc, 20);
178: Return (l_fct_ret);
179: --
180: End api_updating;
181: --
233: --
234: l_proc varchar2(72) := g_package||'lck';
235: --
236: Begin
237: hr_utility.set_location('Entering:'||l_proc, 5);
238: --
239: -- Add any mandatory argument checking here:
240: -- Example:
241: -- hr_api.mandatory_arg_error
249: Close C_Sel1;
250: --
251: -- The primary key is invalid therefore we must error
252: --
253: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
254: hr_utility.raise_error;
255: End If;
256: Close C_Sel1;
257: If (p_object_version_number <> g_old_rec.object_version_number) Then
250: --
251: -- The primary key is invalid therefore we must error
252: --
253: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
254: hr_utility.raise_error;
255: End If;
256: Close C_Sel1;
257: If (p_object_version_number <> g_old_rec.object_version_number) Then
258: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
254: hr_utility.raise_error;
255: End If;
256: Close C_Sel1;
257: If (p_object_version_number <> g_old_rec.object_version_number) Then
258: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
259: hr_utility.raise_error;
260: End If;
261: --
262: hr_utility.set_location(' Leaving:'||l_proc, 10);
255: End If;
256: Close C_Sel1;
257: If (p_object_version_number <> g_old_rec.object_version_number) Then
258: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
259: hr_utility.raise_error;
260: End If;
261: --
262: hr_utility.set_location(' Leaving:'||l_proc, 10);
263: --
258: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
259: hr_utility.raise_error;
260: End If;
261: --
262: hr_utility.set_location(' Leaving:'||l_proc, 10);
263: --
264: -- We need to trap the ORA LOCK exception
265: --
266: Exception
268: --
269: -- The object is locked therefore we need to supply a meaningful
270: -- error message.
271: --
272: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
273: hr_utility.set_message_token('TABLE_NAME', 'per_job_requirements');
274: hr_utility.raise_error;
275: End lck;
276: --
269: -- The object is locked therefore we need to supply a meaningful
270: -- error message.
271: --
272: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
273: hr_utility.set_message_token('TABLE_NAME', 'per_job_requirements');
274: hr_utility.raise_error;
275: End lck;
276: --
277: -- ---------------------------------------------------------------------------
270: -- error message.
271: --
272: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
273: hr_utility.set_message_token('TABLE_NAME', 'per_job_requirements');
274: hr_utility.raise_error;
275: End lck;
276: --
277: -- ---------------------------------------------------------------------------
278: -- |----------------------------< convert_args >-----------------------------|
321: l_proc varchar2(72) := g_package||'convert_args';
322: --
323: Begin
324: --
325: hr_utility.set_location('Entering:'||l_proc, 5);
326: --
327: -- Convert arguments into local l_rec structure.
328: --
329: l_rec.job_requirement_id := p_job_requirement_id;
363: l_rec.object_version_number := p_object_version_number;
364: --
365: -- Return the plsql record structure.
366: --
367: hr_utility.set_location(' Leaving:'||l_proc, 10);
368: Return(l_rec);
369: --
370: End convert_args;
371: --