15: --
16: l_proc varchar2(72) := g_package||'constraint_error';
17: --
18: Begin
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'GHR_PA_REMARKS_FK1') Then
22: hr_utility.set_message(8301, 'GHR_38048_INV_PA_REQUEST_ID');
23: hr_utility.raise_error;
18: Begin
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'GHR_PA_REMARKS_FK1') Then
22: hr_utility.set_message(8301, 'GHR_38048_INV_PA_REQUEST_ID');
23: hr_utility.raise_error;
24: ElsIf (p_constraint_name = 'GHR_PA_REMARKS_FK2') Then
25: hr_utility.set_message(8301, 'GHR_38109_INV_REMARK_ID');
26: hr_utility.raise_error;
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'GHR_PA_REMARKS_FK1') Then
22: hr_utility.set_message(8301, 'GHR_38048_INV_PA_REQUEST_ID');
23: hr_utility.raise_error;
24: ElsIf (p_constraint_name = 'GHR_PA_REMARKS_FK2') Then
25: hr_utility.set_message(8301, 'GHR_38109_INV_REMARK_ID');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'GHR_PA_REMARKS_PK') Then
21: If (p_constraint_name = 'GHR_PA_REMARKS_FK1') Then
22: hr_utility.set_message(8301, 'GHR_38048_INV_PA_REQUEST_ID');
23: hr_utility.raise_error;
24: ElsIf (p_constraint_name = 'GHR_PA_REMARKS_FK2') Then
25: hr_utility.set_message(8301, 'GHR_38109_INV_REMARK_ID');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'GHR_PA_REMARKS_PK') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
22: hr_utility.set_message(8301, 'GHR_38048_INV_PA_REQUEST_ID');
23: hr_utility.raise_error;
24: ElsIf (p_constraint_name = 'GHR_PA_REMARKS_FK2') Then
25: hr_utility.set_message(8301, 'GHR_38109_INV_REMARK_ID');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'GHR_PA_REMARKS_PK') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','15');
24: ElsIf (p_constraint_name = 'GHR_PA_REMARKS_FK2') Then
25: hr_utility.set_message(8301, 'GHR_38109_INV_REMARK_ID');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'GHR_PA_REMARKS_PK') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','15');
31: hr_utility.raise_error;
32: Else
25: hr_utility.set_message(8301, 'GHR_38109_INV_REMARK_ID');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'GHR_PA_REMARKS_PK') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','15');
31: hr_utility.raise_error;
32: Else
33: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'GHR_PA_REMARKS_PK') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','15');
31: hr_utility.raise_error;
32: Else
33: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
27: ElsIf (p_constraint_name = 'GHR_PA_REMARKS_PK') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','15');
31: hr_utility.raise_error;
32: Else
33: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','15');
31: hr_utility.raise_error;
32: Else
33: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
36: hr_utility.raise_error;
37: End If;
30: hr_utility.set_message_token('STEP','15');
31: hr_utility.raise_error;
32: Else
33: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
36: hr_utility.raise_error;
37: End If;
38: --
31: hr_utility.raise_error;
32: Else
33: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
36: hr_utility.raise_error;
37: End If;
38: --
39: hr_utility.set_location(' Leaving:'||l_proc, 10);
32: Else
33: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
36: hr_utility.raise_error;
37: End If;
38: --
39: hr_utility.set_location(' Leaving:'||l_proc, 10);
40: End constraint_error;
35: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
36: hr_utility.raise_error;
37: End If;
38: --
39: hr_utility.set_location(' Leaving:'||l_proc, 10);
40: End constraint_error;
41: --
42: -- ----------------------------------------------------------------------------
43: -- |-----------------------------< api_updating >-----------------------------|
69: l_proc varchar2(72) := g_package||'api_updating';
70: l_fct_ret boolean;
71: --
72: Begin
73: hr_utility.set_location('Entering:'||l_proc, 5);
74: --
75: If (
76: p_pa_remark_id is null and
77: p_object_version_number is null
85: If (
86: p_pa_remark_id = g_old_rec.pa_remark_id and
87: p_object_version_number = g_old_rec.object_version_number
88: ) Then
89: hr_utility.set_location(l_proc, 10);
90: --
91: -- The g_old_rec is current therefore we must
92: -- set the returning function to true
93: --
102: Close C_Sel1;
103: --
104: -- The primary key is invalid therefore we must error
105: --
106: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
107: hr_utility.raise_error;
108: End If;
109: Close C_Sel1;
110: If (p_object_version_number <> g_old_rec.object_version_number) Then
103: --
104: -- The primary key is invalid therefore we must error
105: --
106: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
107: hr_utility.raise_error;
108: End If;
109: Close C_Sel1;
110: If (p_object_version_number <> g_old_rec.object_version_number) Then
111: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
107: hr_utility.raise_error;
108: End If;
109: Close C_Sel1;
110: If (p_object_version_number <> g_old_rec.object_version_number) Then
111: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
112: hr_utility.raise_error;
113: End If;
114: hr_utility.set_location(l_proc, 15);
115: l_fct_ret := true;
108: End If;
109: Close C_Sel1;
110: If (p_object_version_number <> g_old_rec.object_version_number) Then
111: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
112: hr_utility.raise_error;
113: End If;
114: hr_utility.set_location(l_proc, 15);
115: l_fct_ret := true;
116: End If;
110: If (p_object_version_number <> g_old_rec.object_version_number) Then
111: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
112: hr_utility.raise_error;
113: End If;
114: hr_utility.set_location(l_proc, 15);
115: l_fct_ret := true;
116: End If;
117: End If;
118: hr_utility.set_location(' Leaving:'||l_proc, 20);
114: hr_utility.set_location(l_proc, 15);
115: l_fct_ret := true;
116: End If;
117: End If;
118: hr_utility.set_location(' Leaving:'||l_proc, 20);
119: Return (l_fct_ret);
120: --
121: End api_updating;
122: --
148: --
149: l_proc varchar2(72) := g_package||'lck';
150: --
151: Begin
152: hr_utility.set_location('Entering:'||l_proc, 5);
153: --
154: -- Add any mandatory argument checking here:
155: -- Example:
156: -- hr_api.mandatory_arg_error
164: Close C_Sel1;
165: --
166: -- The primary key is invalid therefore we must error
167: --
168: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
169: hr_utility.raise_error;
170: End If;
171: Close C_Sel1;
172: If (p_object_version_number <> g_old_rec.object_version_number) Then
165: --
166: -- The primary key is invalid therefore we must error
167: --
168: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
169: hr_utility.raise_error;
170: End If;
171: Close C_Sel1;
172: If (p_object_version_number <> g_old_rec.object_version_number) Then
173: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
169: hr_utility.raise_error;
170: End If;
171: Close C_Sel1;
172: If (p_object_version_number <> g_old_rec.object_version_number) Then
173: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
174: hr_utility.raise_error;
175: End If;
176: --
177: hr_utility.set_location(' Leaving:'||l_proc, 10);
170: End If;
171: Close C_Sel1;
172: If (p_object_version_number <> g_old_rec.object_version_number) Then
173: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
174: hr_utility.raise_error;
175: End If;
176: --
177: hr_utility.set_location(' Leaving:'||l_proc, 10);
178: --
173: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
174: hr_utility.raise_error;
175: End If;
176: --
177: hr_utility.set_location(' Leaving:'||l_proc, 10);
178: --
179: -- We need to trap the ORA LOCK exception
180: --
181: Exception
183: --
184: -- The object is locked therefore we need to supply a meaningful
185: -- error message.
186: --
187: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
188: hr_utility.set_message_token('TABLE_NAME', 'ghr_pa_remarks');
189: hr_utility.raise_error;
190: End lck;
191: --
184: -- The object is locked therefore we need to supply a meaningful
185: -- error message.
186: --
187: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
188: hr_utility.set_message_token('TABLE_NAME', 'ghr_pa_remarks');
189: hr_utility.raise_error;
190: End lck;
191: --
192: -- ----------------------------------------------------------------------------
185: -- error message.
186: --
187: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
188: hr_utility.set_message_token('TABLE_NAME', 'ghr_pa_remarks');
189: hr_utility.raise_error;
190: End lck;
191: --
192: -- ----------------------------------------------------------------------------
193: -- |-----------------------------< convert_args >-----------------------------|
211: l_proc varchar2(72) := g_package||'convert_args';
212: --
213: Begin
214: --
215: hr_utility.set_location('Entering:'||l_proc, 5);
216: --
217: -- Convert arguments into local l_rec structure.
218: --
219: l_rec.pa_remark_id := p_pa_remark_id;
228: l_rec.object_version_number := p_object_version_number;
229: --
230: -- Return the plsql record structure.
231: --
232: hr_utility.set_location(' Leaving:'||l_proc, 10);
233: Return(l_rec);
234: --
235: End convert_args;
236: --