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 = 'AVCON_BEN_B_DFLT__000') 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 = 'AVCON_BEN_B_DFLT__000') 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 = 'AVCON_BEN_B_MNDTR_000') Then
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'AVCON_BEN_B_DFLT__000') 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 = 'AVCON_BEN_B_MNDTR_000') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: --
36: If (p_constraint_name = 'AVCON_BEN_B_DFLT__000') 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 = 'AVCON_BEN_B_MNDTR_000') 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 = 'AVCON_BEN_B_DFLT__000') 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 = 'AVCON_BEN_B_MNDTR_000') 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 = 'AVCON_BEN_B_MNDTR_000') 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 = 'BEN_BATCH_ELCTBL_CHC_INFO_FK1') Then
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'AVCON_BEN_B_MNDTR_000') 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 = 'BEN_BATCH_ELCTBL_CHC_INFO_FK1') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'AVCON_BEN_B_MNDTR_000') 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 = 'BEN_BATCH_ELCTBL_CHC_INFO_FK1') 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 = 'AVCON_BEN_B_MNDTR_000') 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 = 'BEN_BATCH_ELCTBL_CHC_INFO_FK1') 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 = 'BEN_BATCH_ELCTBL_CHC_INFO_FK1') 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 = 'BEN_BATCH_ELCTBL_CHC_INFO_FK2') Then
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'BEN_BATCH_ELCTBL_CHC_INFO_FK1') 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 = 'BEN_BATCH_ELCTBL_CHC_INFO_FK2') Then
52: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'BEN_BATCH_ELCTBL_CHC_INFO_FK1') 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 = 'BEN_BATCH_ELCTBL_CHC_INFO_FK2') 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 = 'BEN_BATCH_ELCTBL_CHC_INFO_FK1') 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 = 'BEN_BATCH_ELCTBL_CHC_INFO_FK2') 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 = 'BEN_BATCH_ELCTBL_CHC_INFO_FK2') 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 = 'BEN_BATCH_ELCTBL_CHC_INFO_PK') Then
49: hr_utility.set_message_token('STEP','15');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'BEN_BATCH_ELCTBL_CHC_INFO_FK2') 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 = 'BEN_BATCH_ELCTBL_CHC_INFO_PK') Then
57: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
50: hr_utility.raise_error;
51: ElsIf (p_constraint_name = 'BEN_BATCH_ELCTBL_CHC_INFO_FK2') 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 = 'BEN_BATCH_ELCTBL_CHC_INFO_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 = 'BEN_BATCH_ELCTBL_CHC_INFO_FK2') 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 = 'BEN_BATCH_ELCTBL_CHC_INFO_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 = 'BEN_BATCH_ELCTBL_CHC_INFO_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: Else
54: hr_utility.set_message_token('STEP','20');
55: hr_utility.raise_error;
56: ElsIf (p_constraint_name = 'BEN_BATCH_ELCTBL_CHC_INFO_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: Else
62: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
55: hr_utility.raise_error;
56: ElsIf (p_constraint_name = 'BEN_BATCH_ELCTBL_CHC_INFO_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: Else
62: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
63: hr_utility.set_message_token('PROCEDURE', l_proc);
56: ElsIf (p_constraint_name = 'BEN_BATCH_ELCTBL_CHC_INFO_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: Else
62: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
63: hr_utility.set_message_token('PROCEDURE', l_proc);
64: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('STEP','25');
60: hr_utility.raise_error;
61: Else
62: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
63: hr_utility.set_message_token('PROCEDURE', l_proc);
64: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
65: hr_utility.raise_error;
66: End If;
59: hr_utility.set_message_token('STEP','25');
60: hr_utility.raise_error;
61: Else
62: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
63: hr_utility.set_message_token('PROCEDURE', l_proc);
64: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
65: hr_utility.raise_error;
66: End If;
67: --
60: hr_utility.raise_error;
61: Else
62: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
63: hr_utility.set_message_token('PROCEDURE', l_proc);
64: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
65: hr_utility.raise_error;
66: End If;
67: --
68: hr_utility.set_location(' Leaving:'||l_proc, 10);
61: Else
62: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
63: hr_utility.set_message_token('PROCEDURE', l_proc);
64: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
65: hr_utility.raise_error;
66: End If;
67: --
68: hr_utility.set_location(' Leaving:'||l_proc, 10);
69: End constraint_error;
64: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
65: hr_utility.raise_error;
66: End If;
67: --
68: hr_utility.set_location(' Leaving:'||l_proc, 10);
69: End constraint_error;
70: --
71: -- ----------------------------------------------------------------------------
72: -- |-----------------------------< api_updating >-----------------------------|
105: l_proc varchar2(72) := g_package||'api_updating';
106: l_fct_ret boolean;
107: --
108: Begin
109: hr_utility.set_location('Entering:'||l_proc, 5);
110: --
111: If (
112: p_batch_elctbl_id is null and
113: p_object_version_number is null
121: If (
122: p_batch_elctbl_id = g_old_rec.batch_elctbl_id and
123: p_object_version_number = g_old_rec.object_version_number
124: ) Then
125: hr_utility.set_location(l_proc, 10);
126: --
127: -- The g_old_rec is current therefore we must
128: -- set the returning function to true
129: --
138: Close C_Sel1;
139: --
140: -- The primary key is invalid therefore we must error
141: --
142: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
143: hr_utility.raise_error;
144: End If;
145: Close C_Sel1;
146: If (p_object_version_number <> g_old_rec.object_version_number) Then
139: --
140: -- The primary key is invalid therefore we must error
141: --
142: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
143: hr_utility.raise_error;
144: End If;
145: Close C_Sel1;
146: If (p_object_version_number <> g_old_rec.object_version_number) Then
147: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
143: hr_utility.raise_error;
144: End If;
145: Close C_Sel1;
146: If (p_object_version_number <> g_old_rec.object_version_number) Then
147: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
148: hr_utility.raise_error;
149: End If;
150: hr_utility.set_location(l_proc, 15);
151: l_fct_ret := true;
144: End If;
145: Close C_Sel1;
146: If (p_object_version_number <> g_old_rec.object_version_number) Then
147: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
148: hr_utility.raise_error;
149: End If;
150: hr_utility.set_location(l_proc, 15);
151: l_fct_ret := true;
152: End If;
146: If (p_object_version_number <> g_old_rec.object_version_number) Then
147: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
148: hr_utility.raise_error;
149: End If;
150: hr_utility.set_location(l_proc, 15);
151: l_fct_ret := true;
152: End If;
153: End If;
154: hr_utility.set_location(' Leaving:'||l_proc, 20);
150: hr_utility.set_location(l_proc, 15);
151: l_fct_ret := true;
152: End If;
153: End If;
154: hr_utility.set_location(' Leaving:'||l_proc, 20);
155: Return (l_fct_ret);
156: --
157: End api_updating;
158: --
191: --
192: l_proc varchar2(72) := g_package||'lck';
193: --
194: Begin
195: hr_utility.set_location('Entering:'||l_proc, 5);
196: --
197: -- Add any mandatory argument checking here:
198: -- Example:
199: -- hr_api.mandatory_arg_error
207: Close C_Sel1;
208: --
209: -- The primary key is invalid therefore we must error
210: --
211: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
212: hr_utility.raise_error;
213: End If;
214: Close C_Sel1;
215: If (p_object_version_number <> g_old_rec.object_version_number) Then
208: --
209: -- The primary key is invalid therefore we must error
210: --
211: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
212: hr_utility.raise_error;
213: End If;
214: Close C_Sel1;
215: If (p_object_version_number <> g_old_rec.object_version_number) Then
216: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
212: hr_utility.raise_error;
213: End If;
214: Close C_Sel1;
215: If (p_object_version_number <> g_old_rec.object_version_number) Then
216: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
217: hr_utility.raise_error;
218: End If;
219: --
220: hr_utility.set_location(' Leaving:'||l_proc, 10);
213: End If;
214: Close C_Sel1;
215: If (p_object_version_number <> g_old_rec.object_version_number) Then
216: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
217: hr_utility.raise_error;
218: End If;
219: --
220: hr_utility.set_location(' Leaving:'||l_proc, 10);
221: --
216: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
217: hr_utility.raise_error;
218: End If;
219: --
220: hr_utility.set_location(' Leaving:'||l_proc, 10);
221: --
222: -- We need to trap the ORA LOCK exception
223: --
224: Exception
226: --
227: -- The object is locked therefore we need to supply a meaningful
228: -- error message.
229: --
230: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
231: hr_utility.set_message_token('TABLE_NAME', 'ben_batch_elctbl_chc_info');
232: hr_utility.raise_error;
233: End lck;
234: --
227: -- The object is locked therefore we need to supply a meaningful
228: -- error message.
229: --
230: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
231: hr_utility.set_message_token('TABLE_NAME', 'ben_batch_elctbl_chc_info');
232: hr_utility.raise_error;
233: End lck;
234: --
235: -- ----------------------------------------------------------------------------
228: -- error message.
229: --
230: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
231: hr_utility.set_message_token('TABLE_NAME', 'ben_batch_elctbl_chc_info');
232: hr_utility.raise_error;
233: End lck;
234: --
235: -- ----------------------------------------------------------------------------
236: -- |-----------------------------< convert_args >-----------------------------|
261: l_proc varchar2(72) := g_package||'convert_args';
262: --
263: Begin
264: --
265: hr_utility.set_location('Entering:'||l_proc, 5);
266: --
267: -- Convert arguments into local l_rec structure.
268: --
269: l_rec.batch_elctbl_id := p_batch_elctbl_id;
285: l_rec.object_version_number := p_object_version_number;
286: --
287: -- Return the plsql record structure.
288: --
289: hr_utility.set_location(' Leaving:'||l_proc, 10);
290: Return(l_rec);
291: --
292: End convert_args;
293: --