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_PAY_PROPOSAL_COMPONENT_FK1') Then
37: hr_utility.set_location(l_proc,10);
38: hr_utility.set_message(801,'HR_51310_PPC_INVAL_PRO_ID');
33: Begin
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PER_PAY_PROPOSAL_COMPONENT_FK1') Then
37: hr_utility.set_location(l_proc,10);
38: hr_utility.set_message(801,'HR_51310_PPC_INVAL_PRO_ID');
39: hr_utility.raise_error;
40: ElsIf (p_constraint_name = 'PER_PAY_PROPOSAL_COMPONENT_FK2') Then
41: hr_utility.set_location(l_proc,15);
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PER_PAY_PROPOSAL_COMPONENT_FK1') Then
37: hr_utility.set_location(l_proc,10);
38: hr_utility.set_message(801,'HR_51310_PPC_INVAL_PRO_ID');
39: hr_utility.raise_error;
40: ElsIf (p_constraint_name = 'PER_PAY_PROPOSAL_COMPONENT_FK2') Then
41: hr_utility.set_location(l_proc,15);
42: hr_utility.set_message (801,'HR_51317_PPC_INVAL_BUS_GRP_ID');
35: --
36: If (p_constraint_name = 'PER_PAY_PROPOSAL_COMPONENT_FK1') Then
37: hr_utility.set_location(l_proc,10);
38: hr_utility.set_message(801,'HR_51310_PPC_INVAL_PRO_ID');
39: hr_utility.raise_error;
40: ElsIf (p_constraint_name = 'PER_PAY_PROPOSAL_COMPONENT_FK2') Then
41: hr_utility.set_location(l_proc,15);
42: hr_utility.set_message (801,'HR_51317_PPC_INVAL_BUS_GRP_ID');
43: hr_utility.raise_error;
37: hr_utility.set_location(l_proc,10);
38: hr_utility.set_message(801,'HR_51310_PPC_INVAL_PRO_ID');
39: hr_utility.raise_error;
40: ElsIf (p_constraint_name = 'PER_PAY_PROPOSAL_COMPONENT_FK2') Then
41: hr_utility.set_location(l_proc,15);
42: hr_utility.set_message (801,'HR_51317_PPC_INVAL_BUS_GRP_ID');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_PAY_PROPOSAL_COMPONENT_PK') Then
45: hr_utility.set_location(l_proc,20);
38: hr_utility.set_message(801,'HR_51310_PPC_INVAL_PRO_ID');
39: hr_utility.raise_error;
40: ElsIf (p_constraint_name = 'PER_PAY_PROPOSAL_COMPONENT_FK2') Then
41: hr_utility.set_location(l_proc,15);
42: hr_utility.set_message (801,'HR_51317_PPC_INVAL_BUS_GRP_ID');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_PAY_PROPOSAL_COMPONENT_PK') Then
45: hr_utility.set_location(l_proc,20);
46: hr_utility.set_message (801,'HR_51319_PPC_INVAL_COMP_ID');
39: hr_utility.raise_error;
40: ElsIf (p_constraint_name = 'PER_PAY_PROPOSAL_COMPONENT_FK2') Then
41: hr_utility.set_location(l_proc,15);
42: hr_utility.set_message (801,'HR_51317_PPC_INVAL_BUS_GRP_ID');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_PAY_PROPOSAL_COMPONENT_PK') Then
45: hr_utility.set_location(l_proc,20);
46: hr_utility.set_message (801,'HR_51319_PPC_INVAL_COMP_ID');
47: hr_utility.raise_error;
41: hr_utility.set_location(l_proc,15);
42: hr_utility.set_message (801,'HR_51317_PPC_INVAL_BUS_GRP_ID');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_PAY_PROPOSAL_COMPONENT_PK') Then
45: hr_utility.set_location(l_proc,20);
46: hr_utility.set_message (801,'HR_51319_PPC_INVAL_COMP_ID');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_PAY_PROPOSAL_COMPONENT_UK2') Then
49: hr_utility.set_location(l_proc,25);
42: hr_utility.set_message (801,'HR_51317_PPC_INVAL_BUS_GRP_ID');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_PAY_PROPOSAL_COMPONENT_PK') Then
45: hr_utility.set_location(l_proc,20);
46: hr_utility.set_message (801,'HR_51319_PPC_INVAL_COMP_ID');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_PAY_PROPOSAL_COMPONENT_UK2') Then
49: hr_utility.set_location(l_proc,25);
50: hr_utility.set_message(801, 'HR_51313_PPC_UNIQ_COMP_REAS');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_PAY_PROPOSAL_COMPONENT_PK') Then
45: hr_utility.set_location(l_proc,20);
46: hr_utility.set_message (801,'HR_51319_PPC_INVAL_COMP_ID');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_PAY_PROPOSAL_COMPONENT_UK2') Then
49: hr_utility.set_location(l_proc,25);
50: hr_utility.set_message(801, 'HR_51313_PPC_UNIQ_COMP_REAS');
51: hr_utility.raise_error;
45: hr_utility.set_location(l_proc,20);
46: hr_utility.set_message (801,'HR_51319_PPC_INVAL_COMP_ID');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_PAY_PROPOSAL_COMPONENT_UK2') Then
49: hr_utility.set_location(l_proc,25);
50: hr_utility.set_message(801, 'HR_51313_PPC_UNIQ_COMP_REAS');
51: hr_utility.raise_error;
52: ElsIf (p_constraint_name = 'PER_PPC_APPROVED_CHK') Then
53: hr_utility.set_location(l_proc,30);
46: hr_utility.set_message (801,'HR_51319_PPC_INVAL_COMP_ID');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_PAY_PROPOSAL_COMPONENT_UK2') Then
49: hr_utility.set_location(l_proc,25);
50: hr_utility.set_message(801, 'HR_51313_PPC_UNIQ_COMP_REAS');
51: hr_utility.raise_error;
52: ElsIf (p_constraint_name = 'PER_PPC_APPROVED_CHK') Then
53: hr_utility.set_location(l_proc,30);
54: hr_utility.set_message(801, 'HR_51278_PYP_INVL_APPR_VAL');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_PAY_PROPOSAL_COMPONENT_UK2') Then
49: hr_utility.set_location(l_proc,25);
50: hr_utility.set_message(801, 'HR_51313_PPC_UNIQ_COMP_REAS');
51: hr_utility.raise_error;
52: ElsIf (p_constraint_name = 'PER_PPC_APPROVED_CHK') Then
53: hr_utility.set_location(l_proc,30);
54: hr_utility.set_message(801, 'HR_51278_PYP_INVL_APPR_VAL');
55: hr_utility.raise_error;
49: hr_utility.set_location(l_proc,25);
50: hr_utility.set_message(801, 'HR_51313_PPC_UNIQ_COMP_REAS');
51: hr_utility.raise_error;
52: ElsIf (p_constraint_name = 'PER_PPC_APPROVED_CHK') Then
53: hr_utility.set_location(l_proc,30);
54: hr_utility.set_message(801, 'HR_51278_PYP_INVL_APPR_VAL');
55: hr_utility.raise_error;
56: Else
57: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
50: hr_utility.set_message(801, 'HR_51313_PPC_UNIQ_COMP_REAS');
51: hr_utility.raise_error;
52: ElsIf (p_constraint_name = 'PER_PPC_APPROVED_CHK') Then
53: hr_utility.set_location(l_proc,30);
54: hr_utility.set_message(801, 'HR_51278_PYP_INVL_APPR_VAL');
55: hr_utility.raise_error;
56: Else
57: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
51: hr_utility.raise_error;
52: ElsIf (p_constraint_name = 'PER_PPC_APPROVED_CHK') Then
53: hr_utility.set_location(l_proc,30);
54: hr_utility.set_message(801, 'HR_51278_PYP_INVL_APPR_VAL');
55: hr_utility.raise_error;
56: Else
57: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
53: hr_utility.set_location(l_proc,30);
54: hr_utility.set_message(801, 'HR_51278_PYP_INVL_APPR_VAL');
55: hr_utility.raise_error;
56: Else
57: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
60: hr_utility.raise_error;
61: End If;
54: hr_utility.set_message(801, 'HR_51278_PYP_INVL_APPR_VAL');
55: hr_utility.raise_error;
56: Else
57: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
60: hr_utility.raise_error;
61: End If;
62: --
55: hr_utility.raise_error;
56: Else
57: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
60: hr_utility.raise_error;
61: End If;
62: --
63: hr_utility.set_location(' Leaving:'||l_proc, 35);
56: Else
57: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
60: hr_utility.raise_error;
61: End If;
62: --
63: hr_utility.set_location(' Leaving:'||l_proc, 35);
64: End constraint_error;
59: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
60: hr_utility.raise_error;
61: End If;
62: --
63: hr_utility.set_location(' Leaving:'||l_proc, 35);
64: End constraint_error;
65: --
66: -- ----------------------------------------------------------------------------
67: -- |-----------------------------< api_updating >-----------------------------|
113: l_proc varchar2(72) := g_package||'api_updating';
114: l_fct_ret boolean;
115: --
116: Begin
117: hr_utility.set_location('Entering:'||l_proc, 5);
118: --
119: If (
120: p_component_id is null and
121: p_object_version_number is null
129: If (
130: p_component_id = g_old_rec.component_id and
131: p_object_version_number = g_old_rec.object_version_number
132: ) Then
133: hr_utility.set_location(l_proc, 10);
134: --
135: -- The g_old_rec is current therefore we must
136: -- set the returning function to true
137: --
146: Close C_Sel1;
147: --
148: -- The primary key is invalid therefore we must error
149: --
150: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
151: hr_utility.raise_error;
152: End If;
153: Close C_Sel1;
154: If (p_object_version_number <> g_old_rec.object_version_number) Then
147: --
148: -- The primary key is invalid therefore we must error
149: --
150: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
151: hr_utility.raise_error;
152: End If;
153: Close C_Sel1;
154: If (p_object_version_number <> g_old_rec.object_version_number) Then
155: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
151: hr_utility.raise_error;
152: End If;
153: Close C_Sel1;
154: If (p_object_version_number <> g_old_rec.object_version_number) Then
155: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
156: hr_utility.raise_error;
157: End If;
158: hr_utility.set_location(l_proc, 15);
159: l_fct_ret := true;
152: End If;
153: Close C_Sel1;
154: If (p_object_version_number <> g_old_rec.object_version_number) Then
155: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
156: hr_utility.raise_error;
157: End If;
158: hr_utility.set_location(l_proc, 15);
159: l_fct_ret := true;
160: End If;
154: If (p_object_version_number <> g_old_rec.object_version_number) Then
155: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
156: hr_utility.raise_error;
157: End If;
158: hr_utility.set_location(l_proc, 15);
159: l_fct_ret := true;
160: End If;
161: End If;
162: hr_utility.set_location(' Leaving:'||l_proc, 20);
158: hr_utility.set_location(l_proc, 15);
159: l_fct_ret := true;
160: End If;
161: End If;
162: hr_utility.set_location(' Leaving:'||l_proc, 20);
163: Return (l_fct_ret);
164: --
165: End api_updating;
166: --
213: --
214: l_proc varchar2(72) := g_package||'lck';
215: --
216: Begin
217: hr_utility.set_location('Entering:'||l_proc, 5);
218: --
219: hr_api.mandatory_arg_error
220: (p_api_name => l_proc,
221: p_argument => 'object_version_number',
232: Close C_Sel1;
233: --
234: -- The primary key is invalid therefore we must error
235: --
236: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
237: hr_utility.raise_error;
238: End If;
239: Close C_Sel1;
240: If (p_object_version_number <> g_old_rec.object_version_number) Then
233: --
234: -- The primary key is invalid therefore we must error
235: --
236: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
237: hr_utility.raise_error;
238: End If;
239: Close C_Sel1;
240: If (p_object_version_number <> g_old_rec.object_version_number) Then
241: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
237: hr_utility.raise_error;
238: End If;
239: Close C_Sel1;
240: If (p_object_version_number <> g_old_rec.object_version_number) Then
241: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
242: hr_utility.raise_error;
243: End If;
244: --
245: hr_utility.set_location(' Leaving:'||l_proc, 10);
238: End If;
239: Close C_Sel1;
240: If (p_object_version_number <> g_old_rec.object_version_number) Then
241: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
242: hr_utility.raise_error;
243: End If;
244: --
245: hr_utility.set_location(' Leaving:'||l_proc, 10);
246: --
241: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
242: hr_utility.raise_error;
243: End If;
244: --
245: hr_utility.set_location(' Leaving:'||l_proc, 10);
246: --
247: -- We need to trap the ORA LOCK exception
248: --
249: Exception
251: --
252: -- The object is locked therefore we need to supply a meaningful
253: -- error message.
254: --
255: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
256: hr_utility.set_message_token('TABLE_NAME', 'per_pay_proposal_components');
257: hr_utility.raise_error;
258: End lck;
259: --
252: -- The object is locked therefore we need to supply a meaningful
253: -- error message.
254: --
255: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
256: hr_utility.set_message_token('TABLE_NAME', 'per_pay_proposal_components');
257: hr_utility.raise_error;
258: End lck;
259: --
260: -- ----------------------------------------------------------------------------
253: -- error message.
254: --
255: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
256: hr_utility.set_message_token('TABLE_NAME', 'per_pay_proposal_components');
257: hr_utility.raise_error;
258: End lck;
259: --
260: -- ----------------------------------------------------------------------------
261: -- |-----------------------------< convert_args >-----------------------------|
299: l_proc varchar2(72) := g_package||'convert_args';
300: --
301: Begin
302: --
303: hr_utility.set_location('Entering:'||l_proc, 5);
304: --
305: -- Convert arguments into local l_rec structure.
306: --
307: l_rec.component_id := p_component_id;
336: l_rec.object_version_number := p_object_version_number;
337: --
338: -- Return the plsql record structure.
339: --
340: hr_utility.set_location(' Leaving:'||l_proc, 10);
341: Return(l_rec);
342: --
343: End convert_args;
344: --