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_APPLICATIONS_FK1') Then
37: hr_utility.set_message(801, 'HR_51183_APL_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 = 'PER_APPLICATIONS_FK1') Then
37: hr_utility.set_message(801, 'HR_51183_APL_BUS_GRP_INVALID');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PER_APPLICATIONS_PK') Then
40: hr_utility.set_message(801, 'HR_51184_APL_PK');
41: hr_utility.raise_error;
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PER_APPLICATIONS_FK1') Then
37: hr_utility.set_message(801, 'HR_51183_APL_BUS_GRP_INVALID');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PER_APPLICATIONS_PK') Then
40: hr_utility.set_message(801, 'HR_51184_APL_PK');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PER_APPL_SUCCESSFUL_FLAG_CHK') Then
36: If (p_constraint_name = 'PER_APPLICATIONS_FK1') Then
37: hr_utility.set_message(801, 'HR_51183_APL_BUS_GRP_INVALID');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PER_APPLICATIONS_PK') Then
40: hr_utility.set_message(801, 'HR_51184_APL_PK');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PER_APPL_SUCCESSFUL_FLAG_CHK') Then
43: hr_utility.set_message(801, 'HR_51186_APL_CHK');
44: hr_utility.raise_error;
37: hr_utility.set_message(801, 'HR_51183_APL_BUS_GRP_INVALID');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PER_APPLICATIONS_PK') Then
40: hr_utility.set_message(801, 'HR_51184_APL_PK');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PER_APPL_SUCCESSFUL_FLAG_CHK') Then
43: hr_utility.set_message(801, 'HR_51186_APL_CHK');
44: hr_utility.raise_error;
45: Else
39: ElsIf (p_constraint_name = 'PER_APPLICATIONS_PK') Then
40: hr_utility.set_message(801, 'HR_51184_APL_PK');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PER_APPL_SUCCESSFUL_FLAG_CHK') Then
43: hr_utility.set_message(801, 'HR_51186_APL_CHK');
44: hr_utility.raise_error;
45: Else
46: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
47: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message(801, 'HR_51184_APL_PK');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PER_APPL_SUCCESSFUL_FLAG_CHK') Then
43: hr_utility.set_message(801, 'HR_51186_APL_CHK');
44: hr_utility.raise_error;
45: Else
46: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
47: hr_utility.set_message_token('PROCEDURE', l_proc);
48: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
42: ElsIf (p_constraint_name = 'PER_APPL_SUCCESSFUL_FLAG_CHK') Then
43: hr_utility.set_message(801, 'HR_51186_APL_CHK');
44: hr_utility.raise_error;
45: Else
46: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
47: hr_utility.set_message_token('PROCEDURE', l_proc);
48: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
49: hr_utility.raise_error;
50: End If;
43: hr_utility.set_message(801, 'HR_51186_APL_CHK');
44: hr_utility.raise_error;
45: Else
46: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
47: hr_utility.set_message_token('PROCEDURE', l_proc);
48: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
49: hr_utility.raise_error;
50: End If;
51: --
44: hr_utility.raise_error;
45: Else
46: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
47: hr_utility.set_message_token('PROCEDURE', l_proc);
48: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
49: hr_utility.raise_error;
50: End If;
51: --
52: hr_utility.set_location(' Leaving:'||l_proc, 10);
45: Else
46: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
47: hr_utility.set_message_token('PROCEDURE', l_proc);
48: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
49: hr_utility.raise_error;
50: End If;
51: --
52: hr_utility.set_location(' Leaving:'||l_proc, 10);
53: End constraint_error;
48: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
49: hr_utility.raise_error;
50: End If;
51: --
52: hr_utility.set_location(' Leaving:'||l_proc, 10);
53: End constraint_error;
54: --
55: -- ----------------------------------------------------------------------------
56: -- |-----------------------------< api_updating >-----------------------------|
108: l_proc varchar2(72) := g_package||'api_updating';
109: l_fct_ret boolean;
110: --
111: Begin
112: hr_utility.set_location('Entering:'||l_proc, 5);
113: --
114: If (
115: p_application_id is null and
116: p_object_version_number is null
124: If (
125: p_application_id = g_old_rec.application_id and
126: p_object_version_number = g_old_rec.object_version_number
127: ) Then
128: hr_utility.set_location(l_proc, 10);
129: --
130: -- The g_old_rec is current therefore we must
131: -- set the returning function to true
132: --
141: Close C_Sel1;
142: --
143: -- The primary key is invalid therefore we must error
144: --
145: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
146: hr_utility.raise_error;
147: End If;
148: Close C_Sel1;
149: If (p_object_version_number <> g_old_rec.object_version_number) Then
142: --
143: -- The primary key is invalid therefore we must error
144: --
145: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
146: hr_utility.raise_error;
147: End If;
148: Close C_Sel1;
149: If (p_object_version_number <> g_old_rec.object_version_number) Then
150: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
146: hr_utility.raise_error;
147: End If;
148: Close C_Sel1;
149: If (p_object_version_number <> g_old_rec.object_version_number) Then
150: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
151: hr_utility.raise_error;
152: End If;
153: hr_utility.set_location(l_proc, 15);
154: l_fct_ret := true;
147: End If;
148: Close C_Sel1;
149: If (p_object_version_number <> g_old_rec.object_version_number) Then
150: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
151: hr_utility.raise_error;
152: End If;
153: hr_utility.set_location(l_proc, 15);
154: l_fct_ret := true;
155: End If;
149: If (p_object_version_number <> g_old_rec.object_version_number) Then
150: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
151: hr_utility.raise_error;
152: End If;
153: hr_utility.set_location(l_proc, 15);
154: l_fct_ret := true;
155: End If;
156: End If;
157: hr_utility.set_location(' Leaving:'||l_proc, 20);
153: hr_utility.set_location(l_proc, 15);
154: l_fct_ret := true;
155: End If;
156: End If;
157: hr_utility.set_location(' Leaving:'||l_proc, 20);
158: Return (l_fct_ret);
159: --
160: End api_updating;
161: --
213: --
214: l_proc varchar2(72) := g_package||'lck';
215: --
216: Begin
217: hr_utility.set_location('Entering:'||l_proc, 5);
218: --
219: -- Add any mandatory argument checking here:
220: -- Example:
221: -- hr_api.mandatory_arg_error
229: Close C_Sel1;
230: --
231: -- The primary key is invalid therefore we must error
232: --
233: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
234: hr_utility.raise_error;
235: End If;
236: Close C_Sel1;
237: If (p_object_version_number <> g_old_rec.object_version_number) Then
230: --
231: -- The primary key is invalid therefore we must error
232: --
233: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
234: hr_utility.raise_error;
235: End If;
236: Close C_Sel1;
237: If (p_object_version_number <> g_old_rec.object_version_number) Then
238: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
234: hr_utility.raise_error;
235: End If;
236: Close C_Sel1;
237: If (p_object_version_number <> g_old_rec.object_version_number) Then
238: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
239: hr_utility.raise_error;
240: End If;
241: --
242: hr_utility.set_location(' Leaving:'||l_proc, 10);
235: End If;
236: Close C_Sel1;
237: If (p_object_version_number <> g_old_rec.object_version_number) Then
238: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
239: hr_utility.raise_error;
240: End If;
241: --
242: hr_utility.set_location(' Leaving:'||l_proc, 10);
243: --
238: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
239: hr_utility.raise_error;
240: End If;
241: --
242: hr_utility.set_location(' Leaving:'||l_proc, 10);
243: --
244: -- We need to trap the ORA LOCK exception
245: --
246: Exception
248: --
249: -- The object is locked therefore we need to supply a meaningful
250: -- error message.
251: --
252: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
253: hr_utility.set_message_token('TABLE_NAME', 'per_applications');
254: hr_utility.raise_error;
255: End lck;
256: --
249: -- The object is locked therefore we need to supply a meaningful
250: -- error message.
251: --
252: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
253: hr_utility.set_message_token('TABLE_NAME', 'per_applications');
254: hr_utility.raise_error;
255: End lck;
256: --
257: -- ----------------------------------------------------------------------------
250: -- error message.
251: --
252: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
253: hr_utility.set_message_token('TABLE_NAME', 'per_applications');
254: hr_utility.raise_error;
255: End lck;
256: --
257: -- ----------------------------------------------------------------------------
258: -- |-----------------------------< convert_args >-----------------------------|
302: l_proc varchar2(72) := g_package||'convert_args';
303: --
304: Begin
305: --
306: hr_utility.set_location('Entering:'||l_proc, 5);
307: --
308: -- Convert arguments into local l_rec structure.
309: --
310: l_rec.application_id := p_application_id;
345: l_rec.object_version_number := p_object_version_number;
346: --
347: -- Return the plsql record structure.
348: --
349: hr_utility.set_location(' Leaving:'||l_proc, 10);
350: Return(l_rec);
351: --
352: End convert_args;
353: --