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_PROPOSALS_FK3') Then
37: hr_utility.set_location(l_proc,15);
38: hr_utility.set_message(801,'HR_51317_PPC_INVAL_BUS_GRP_ID');
33: Begin
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PER_PAY_PROPOSALS_FK3') Then
37: hr_utility.set_location(l_proc,15);
38: hr_utility.set_message(801,'HR_51317_PPC_INVAL_BUS_GRP_ID');
39: hr_utility.raise_error;
40: ElsIf (p_constraint_name = 'PER_PAY_PROPOSALS_FK4') 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_PROPOSALS_FK3') Then
37: hr_utility.set_location(l_proc,15);
38: hr_utility.set_message(801,'HR_51317_PPC_INVAL_BUS_GRP_ID');
39: hr_utility.raise_error;
40: ElsIf (p_constraint_name = 'PER_PAY_PROPOSALS_FK4') Then
41: hr_utility.set_location(l_proc,15);
42: hr_utility.set_message(800,'HR_52399_PYP_INVALID_REVIEW_ID');
35: --
36: If (p_constraint_name = 'PER_PAY_PROPOSALS_FK3') Then
37: hr_utility.set_location(l_proc,15);
38: hr_utility.set_message(801,'HR_51317_PPC_INVAL_BUS_GRP_ID');
39: hr_utility.raise_error;
40: ElsIf (p_constraint_name = 'PER_PAY_PROPOSALS_FK4') Then
41: hr_utility.set_location(l_proc,15);
42: hr_utility.set_message(800,'HR_52399_PYP_INVALID_REVIEW_ID');
43: hr_utility.raise_error;
37: hr_utility.set_location(l_proc,15);
38: hr_utility.set_message(801,'HR_51317_PPC_INVAL_BUS_GRP_ID');
39: hr_utility.raise_error;
40: ElsIf (p_constraint_name = 'PER_PAY_PROPOSALS_FK4') Then
41: hr_utility.set_location(l_proc,15);
42: hr_utility.set_message(800,'HR_52399_PYP_INVALID_REVIEW_ID');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_PAY_PROPOSALS_PK') Then
45: hr_utility.set_location(l_proc,20);
38: hr_utility.set_message(801,'HR_51317_PPC_INVAL_BUS_GRP_ID');
39: hr_utility.raise_error;
40: ElsIf (p_constraint_name = 'PER_PAY_PROPOSALS_FK4') Then
41: hr_utility.set_location(l_proc,15);
42: hr_utility.set_message(800,'HR_52399_PYP_INVALID_REVIEW_ID');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_PAY_PROPOSALS_PK') Then
45: hr_utility.set_location(l_proc,20);
46: hr_utility.set_message(801,'HR_51310_PPC_INVAL_PRO_ID');
39: hr_utility.raise_error;
40: ElsIf (p_constraint_name = 'PER_PAY_PROPOSALS_FK4') Then
41: hr_utility.set_location(l_proc,15);
42: hr_utility.set_message(800,'HR_52399_PYP_INVALID_REVIEW_ID');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_PAY_PROPOSALS_PK') Then
45: hr_utility.set_location(l_proc,20);
46: hr_utility.set_message(801,'HR_51310_PPC_INVAL_PRO_ID');
47: hr_utility.raise_error;
41: hr_utility.set_location(l_proc,15);
42: hr_utility.set_message(800,'HR_52399_PYP_INVALID_REVIEW_ID');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_PAY_PROPOSALS_PK') Then
45: hr_utility.set_location(l_proc,20);
46: hr_utility.set_message(801,'HR_51310_PPC_INVAL_PRO_ID');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_PYP_APPROVED_CHK') Then
49: hr_utility.set_location(l_proc,25);
42: hr_utility.set_message(800,'HR_52399_PYP_INVALID_REVIEW_ID');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_PAY_PROPOSALS_PK') Then
45: hr_utility.set_location(l_proc,20);
46: hr_utility.set_message(801,'HR_51310_PPC_INVAL_PRO_ID');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_PYP_APPROVED_CHK') Then
49: hr_utility.set_location(l_proc,25);
50: hr_utility.set_message(801, 'HR_51278_PYP_INVL_APPR_VAL');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_PAY_PROPOSALS_PK') Then
45: hr_utility.set_location(l_proc,20);
46: hr_utility.set_message(801,'HR_51310_PPC_INVAL_PRO_ID');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_PYP_APPROVED_CHK') Then
49: hr_utility.set_location(l_proc,25);
50: hr_utility.set_message(801, 'HR_51278_PYP_INVL_APPR_VAL');
51: hr_utility.raise_error;
45: hr_utility.set_location(l_proc,20);
46: hr_utility.set_message(801,'HR_51310_PPC_INVAL_PRO_ID');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_PYP_APPROVED_CHK') Then
49: hr_utility.set_location(l_proc,25);
50: hr_utility.set_message(801, 'HR_51278_PYP_INVL_APPR_VAL');
51: hr_utility.raise_error;
52: ElsIf (p_constraint_name = 'PER_PYP_MULTIPLE_COMPONENT_CHK') Then
53: hr_utility.set_location(l_proc,30);
46: hr_utility.set_message(801,'HR_51310_PPC_INVAL_PRO_ID');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_PYP_APPROVED_CHK') Then
49: hr_utility.set_location(l_proc,25);
50: hr_utility.set_message(801, 'HR_51278_PYP_INVL_APPR_VAL');
51: hr_utility.raise_error;
52: ElsIf (p_constraint_name = 'PER_PYP_MULTIPLE_COMPONENT_CHK') Then
53: hr_utility.set_location(l_proc,30);
54: hr_utility.set_message(801, 'HR_51261_PYP_INVAL_MULTI_COMP');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_PYP_APPROVED_CHK') Then
49: hr_utility.set_location(l_proc,25);
50: hr_utility.set_message(801, 'HR_51278_PYP_INVL_APPR_VAL');
51: hr_utility.raise_error;
52: ElsIf (p_constraint_name = 'PER_PYP_MULTIPLE_COMPONENT_CHK') Then
53: hr_utility.set_location(l_proc,30);
54: hr_utility.set_message(801, 'HR_51261_PYP_INVAL_MULTI_COMP');
55: hr_utility.raise_error;
49: hr_utility.set_location(l_proc,25);
50: hr_utility.set_message(801, 'HR_51278_PYP_INVL_APPR_VAL');
51: hr_utility.raise_error;
52: ElsIf (p_constraint_name = 'PER_PYP_MULTIPLE_COMPONENT_CHK') Then
53: hr_utility.set_location(l_proc,30);
54: hr_utility.set_message(801, 'HR_51261_PYP_INVAL_MULTI_COMP');
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_51278_PYP_INVL_APPR_VAL');
51: hr_utility.raise_error;
52: ElsIf (p_constraint_name = 'PER_PYP_MULTIPLE_COMPONENT_CHK') Then
53: hr_utility.set_location(l_proc,30);
54: hr_utility.set_message(801, 'HR_51261_PYP_INVAL_MULTI_COMP');
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_PYP_MULTIPLE_COMPONENT_CHK') Then
53: hr_utility.set_location(l_proc,30);
54: hr_utility.set_message(801, 'HR_51261_PYP_INVAL_MULTI_COMP');
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_51261_PYP_INVAL_MULTI_COMP');
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_51261_PYP_INVAL_MULTI_COMP');
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, 10);
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, 10);
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, 10);
64: End constraint_error;
65: --
66: -- ----------------------------------------------------------------------------
67: -- |-----------------------------< api_updating >-----------------------------|
120: l_proc varchar2(72) := g_package||'api_updating';
121: l_fct_ret boolean;
122: --
123: Begin
124: hr_utility.set_location('Entering:'||l_proc, 5);
125: --
126: If (
127: p_pay_proposal_id is null and
128: p_object_version_number is null
136: If (
137: p_pay_proposal_id = g_old_rec.pay_proposal_id and
138: p_object_version_number = g_old_rec.object_version_number
139: ) Then
140: hr_utility.set_location(l_proc, 10);
141: --
142: -- The g_old_rec is current therefore we must
143: -- set the returning function to true
144: --
153: Close C_Sel1;
154: --
155: -- The primary key is invalid therefore we must error
156: --
157: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
158: hr_utility.raise_error;
159: End If;
160: Close C_Sel1;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
154: --
155: -- The primary key is invalid therefore we must error
156: --
157: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
158: hr_utility.raise_error;
159: End If;
160: Close C_Sel1;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
162: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
158: hr_utility.raise_error;
159: End If;
160: Close C_Sel1;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
162: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
163: hr_utility.raise_error;
164: End If;
165: hr_utility.set_location(l_proc, 15);
166: l_fct_ret := true;
159: End If;
160: Close C_Sel1;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
162: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
163: hr_utility.raise_error;
164: End If;
165: hr_utility.set_location(l_proc, 15);
166: l_fct_ret := true;
167: End If;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
162: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
163: hr_utility.raise_error;
164: End If;
165: hr_utility.set_location(l_proc, 15);
166: l_fct_ret := true;
167: End If;
168: End If;
169: hr_utility.set_location(' Leaving:'||l_proc, 20);
165: hr_utility.set_location(l_proc, 15);
166: l_fct_ret := true;
167: End If;
168: End If;
169: hr_utility.set_location(' Leaving:'||l_proc, 20);
170: Return (l_fct_ret);
171: --
172: End api_updating;
173: --
225: --
226: l_proc varchar2(72) := g_package||'lck';
227: --
228: Begin
229: hr_utility.set_location('Entering:'||l_proc, 5);
230: --
231: hr_api.mandatory_arg_error
232: (p_api_name => l_proc,
233: p_argument => 'object_version_number',
244: Close C_Sel1;
245: --
246: -- The primary key is invalid therefore we must error
247: --
248: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
249: hr_utility.raise_error;
250: End If;
251: Close C_Sel1;
252: If (p_object_version_number <> g_old_rec.object_version_number) Then
245: --
246: -- The primary key is invalid therefore we must error
247: --
248: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
249: hr_utility.raise_error;
250: End If;
251: Close C_Sel1;
252: If (p_object_version_number <> g_old_rec.object_version_number) Then
253: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
249: hr_utility.raise_error;
250: End If;
251: Close C_Sel1;
252: If (p_object_version_number <> g_old_rec.object_version_number) Then
253: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
254: hr_utility.raise_error;
255: End If;
256: --
257: hr_utility.set_location(' Leaving:'||l_proc, 10);
250: End If;
251: Close C_Sel1;
252: If (p_object_version_number <> g_old_rec.object_version_number) Then
253: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
254: hr_utility.raise_error;
255: End If;
256: --
257: hr_utility.set_location(' Leaving:'||l_proc, 10);
258: --
253: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
254: hr_utility.raise_error;
255: End If;
256: --
257: hr_utility.set_location(' Leaving:'||l_proc, 10);
258: --
259: -- We need to trap the ORA LOCK exception
260: --
261: Exception
263: --
264: -- The object is locked therefore we need to supply a meaningful
265: -- error message.
266: --
267: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
268: hr_utility.set_message_token('TABLE_NAME', 'per_pay_proposals');
269: hr_utility.raise_error;
270: End lck;
271: --
264: -- The object is locked therefore we need to supply a meaningful
265: -- error message.
266: --
267: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
268: hr_utility.set_message_token('TABLE_NAME', 'per_pay_proposals');
269: hr_utility.raise_error;
270: End lck;
271: --
272: -- ----------------------------------------------------------------------------
265: -- error message.
266: --
267: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
268: hr_utility.set_message_token('TABLE_NAME', 'per_pay_proposals');
269: hr_utility.raise_error;
270: End lck;
271: --
272: -- ----------------------------------------------------------------------------
273: -- |-----------------------------< convert_args >-----------------------------|
317: l_proc varchar2(72) := g_package||'convert_args';
318: --
319: Begin
320: --
321: hr_utility.set_location('Entering:'||l_proc, 5);
322: --
323: -- Convert arguments into local l_rec structure.
324: --
325: l_rec.pay_proposal_id := p_pay_proposal_id;
360: l_rec.approved := p_approved;
361: --
362: -- Return the plsql record structure.
363: --
364: hr_utility.set_location(' Leaving:'||l_proc, 10);
365: Return(l_rec);
366: --
367: End convert_args;
368: --