1 Package Body pqh_rls_upd as
2 /* $Header: pqrlsrhi.pkb 120.0.12020000.2 2013/04/12 18:48:44 pathota ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' pqh_rls_upd.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------------------------------< update_dml >------------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 -- This procedure controls the actual dml update logic. The processing of
17 -- this procedure is:
18 -- 1) Increment the object_version_number by 1 if the object_version_number
19 -- is defined as an attribute for this entity.
20 -- 2) To set and unset the g_api_dml status as required (as we are about to
21 -- perform dml).
22 -- 3) To update the specified row in the schema using the primary key in
23 -- the predicates.
24 -- 4) To trap any constraint violations that may have occurred.
25 -- 5) To raise any other errors.
26 --
27 -- Prerequisites:
28 -- This is an internal private procedure which must be called from the upd
29 -- procedure.
30 --
31 -- In Parameters:
32 -- A Pl/Sql record structre.
33 --
34 -- Post Success:
35 -- The specified row will be updated in the schema.
36 --
37 -- Post Failure:
38 -- On the update dml failure it is important to note that we always reset the
39 -- g_api_dml status to false.
40 -- If a check,unique or parent integrity constraint violation is raised the
41 -- constraint_error procedure will be called.
42 -- If any other error is reported,the error will be raised after the
43 -- g_api_dml status is reset.
44 --
45 -- Developer Implementation Notes:
46 -- The update 'set' attribute list should be modified if any of your
47 -- attributes are not updateable.
48 --
49 -- Access Status:
50 -- Internal Row Handler Use Only.
51 --
52 -- {End Of Comments}
53 -- ----------------------------------------------------------------------------
54 Procedure update_dml
55 ( p_rec in out NOCOPY pqh_rls_shd.g_rec_type
56 ) is
57 --
58 l_proc varchar2(72) := g_package||'update_dml';
59 --
60 Begin
61 hr_utility.set_location('Entering:'||l_proc,5);
62 --
63 -- Increment the object version
64 p_rec.object_version_number :=p_rec.object_version_number + 1;
65 --
66 --
67 --
68 -- Update the pqh_roles Row
69 --
70 -- mvankada
71 -- Added Developer DF Columns to update stmt
72 update pqh_roles
73 set
74 role_id = p_rec.role_id
75 ,role_name = p_rec.role_name
76 ,role_type_cd = p_rec.role_type_cd
77 ,enable_flag = p_rec.enable_flag
78 ,object_version_number = p_rec.object_version_number
79 ,business_group_id = p_rec.business_group_id
80 ,information_category = p_rec.information_category
81 ,information1 = p_rec.information1
82 ,information2 = p_rec.information2
83 ,information3 = p_rec.information3
84 ,information4 = p_rec.information4
85 ,information5 = p_rec.information5
86 ,information6 = p_rec.information6
87 ,information7 = p_rec.information7
88 ,information8 = p_rec.information8
89 ,information9 = p_rec.information9
90 ,information10 = p_rec.information10
91 ,information11 = p_rec.information11
92 ,information12 = p_rec.information12
93 ,information13 = p_rec.information13
94 ,information14 = p_rec.information14
95 ,information15 = p_rec.information15
96 ,information16 = p_rec.information16
97 ,information17 = p_rec.information17
98 ,information18 = p_rec.information18
99 ,information19 = p_rec.information19
100 ,information20 = p_rec.information20
101 ,information21 = p_rec.information21
102 ,information22 = p_rec.information22
103 ,information23 = p_rec.information23
104 ,information24 = p_rec.information24
105 ,information25 = p_rec.information25
106 ,information26 = p_rec.information26
107 ,information27 = p_rec.information27
108 ,information28 = p_rec.information28
109 ,information29 = p_rec.information29
110 ,information30 = p_rec.information30
111 where role_id = p_rec.role_id;
112 --
113 --
114 --
115 hr_utility.set_location(' Leaving:'||l_proc,10);
116 --
117 Exception
118 When hr_api.check_integrity_violated Then
119 -- A check constraint has been violated
120 --
121 pqh_rls_shd.constraint_error
122 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
123 When hr_api.parent_integrity_violated Then
124 -- Parent integrity has been violated
125 --
126 pqh_rls_shd.constraint_error
127 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
128 When hr_api.unique_integrity_violated Then
129 -- Unique integrity has been violated
130 --
131 pqh_rls_shd.constraint_error
132 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
133 When Others Then
134 --
135 Raise;
136 End update_dml;
137 --
138 -- ----------------------------------------------------------------------------
139 -- |------------------------------< pre_update >------------------------------|
140 -- ----------------------------------------------------------------------------
141 -- {Start Of Comments}
142 --
143 -- Description:
144 -- This private procedure contains any processing which is required before
145 -- the update dml.
146 --
147 -- Prerequisites:
148 -- This is an internal procedure which is called from the upd procedure.
149 --
150 -- In Parameters:
151 -- A Pl/Sql record structure.
152 --
153 -- Post Success:
154 -- Processing continues.
155 --
156 -- Post Failure:
157 -- If an error has occurred,an error message and exception wil be raised
158 -- but not handled.
159 --
160 -- Developer Implementation Notes:
161 -- Any pre-processing required before the update dml is issued should be
162 -- coded within this procedure. It is important to note that any 3rd party
163 -- maintenance should be reviewed before placing in this procedure.
164 --
165 -- Access Status:
166 -- Internal Row Handler Use Only.
167 --
168 -- {End Of Comments}
169 -- ----------------------------------------------------------------------------
170 Procedure pre_update
171 ( p_rec in pqh_rls_shd.g_rec_type
172 ) is
173 --
174 l_proc varchar2(72) := g_package||'pre_update';
175 --
176 Begin
177 hr_utility.set_location('Entering:'||l_proc,5);
178 --
179 hr_utility.set_location(' Leaving:'||l_proc,10);
180 End pre_update;
181 --
182 -- ----------------------------------------------------------------------------
183 -- |-----------------------------< post_update >------------------------------|
184 -- ----------------------------------------------------------------------------
185 -- {Start Of Comments}
186 --
187 -- Description:
188 -- This private procedure contains any processing which is required after the
189 -- update dml.
190 --
191 -- Prerequisites:
192 -- This is an internal procedure which is called from the upd procedure.
193 --
194 -- In Parameters:
195 -- A Pl/Sql record structure.
196 --
197 -- Post Success:
198 -- Processing continues.
199 --
200 -- Post Failure:
201 -- If an error has occurred,an error message and exception will be raised
202 -- but not handled.
203 --
204 -- Developer Implementation Notes:
205 -- Any post-processing required after the update dml is issued should be
206 -- coded within this procedure. It is important to note that any 3rd party
207 -- maintenance should be reviewed before placing in this procedure.
208 --
209 -- Access Status:
210 -- Internal Row Handler Use Only.
211 --
212 -- {End Of Comments}
213 -- ----------------------------------------------------------------------------
214
215 -- mvankada
216 -- Added Developer DF columns
217 Procedure post_update
218 (p_effective_date in date
219 ,p_rec in pqh_rls_shd.g_rec_type
220 ) is
221 --
222 l_start_date date := trunc(sysdate);
223 l_expiration_date date := to_date('31/12/4712','DD/MM/RRRR');
224 l_proc varchar2(72) := g_package||'post_update';
225 --
226 Begin
227 hr_utility.set_location('Entering:'||l_proc,5);
228 begin
229 --
230 pqh_rls_rku.after_update
231 (p_effective_date => p_effective_date
232 ,p_role_id => p_rec.role_id
233 ,p_role_name => p_rec.role_name
234 ,p_role_type_cd => p_rec.role_type_cd
235 ,p_enable_flag => p_rec.enable_flag
236 ,p_object_version_number => p_rec.object_version_number
237 ,p_business_group_id => p_rec.business_group_id
238 ,p_information_category => p_rec.information_category
239 ,p_information1 => p_rec.information1
240 ,p_information2 => p_rec.information2
241 ,p_information3 => p_rec.information3
242 ,p_information4 => p_rec.information4
243 ,p_information5 => p_rec.information5
244 ,p_information6 => p_rec.information6
245 ,p_information7 => p_rec.information7
246 ,p_information8 => p_rec.information8
247 ,p_information9 => p_rec.information9
248 ,p_information10 => p_rec.information10
249 ,p_information11 => p_rec.information11
250 ,p_information12 => p_rec.information12
251 ,p_information13 => p_rec.information13
252 ,p_information14 => p_rec.information14
253 ,p_information15 => p_rec.information15
254 ,p_information16 => p_rec.information16
255 ,p_information17 => p_rec.information17
256 ,p_information18 => p_rec.information18
257 ,p_information19 => p_rec.information19
258 ,p_information20 => p_rec.information20
259 ,p_information21 => p_rec.information21
260 ,p_information22 => p_rec.information22
261 ,p_information23 => p_rec.information23
262 ,p_information24 => p_rec.information24
263 ,p_information25 => p_rec.information25
264 ,p_information26 => p_rec.information26
265 ,p_information27 => p_rec.information27
266 ,p_information28 => p_rec.information28
267 ,p_information29 => p_rec.information29
268 ,p_information30 => p_rec.information30
269 ,p_role_name_o => pqh_rls_shd.g_old_rec.role_name
270 ,p_role_type_cd_o => pqh_rls_shd.g_old_rec.role_type_cd
271 ,p_enable_flag_o => pqh_rls_shd.g_old_rec.enable_flag
272 ,p_object_version_number_o => pqh_rls_shd.g_old_rec.object_version_number
273 ,p_business_group_id_o => pqh_rls_shd.g_old_rec.business_group_id
274 ,p_information_category_o => pqh_rls_shd.g_old_rec.information_category
275 ,p_information1_o => pqh_rls_shd.g_old_rec.information1
276 ,p_information2_o => pqh_rls_shd.g_old_rec.information2
277 ,p_information3_o => pqh_rls_shd.g_old_rec.information3
278 ,p_information4_o => pqh_rls_shd.g_old_rec.information4
279 ,p_information5_o => pqh_rls_shd.g_old_rec.information5
280 ,p_information6_o => pqh_rls_shd.g_old_rec.information6
281 ,p_information7_o => pqh_rls_shd.g_old_rec.information7
282 ,p_information8_o => pqh_rls_shd.g_old_rec.information8
283 ,p_information9_o => pqh_rls_shd.g_old_rec.information9
284 ,p_information10_o => pqh_rls_shd.g_old_rec.information10
285 ,p_information11_o => pqh_rls_shd.g_old_rec.information11
286 ,p_information12_o => pqh_rls_shd.g_old_rec.information12
287 ,p_information13_o => pqh_rls_shd.g_old_rec.information13
288 ,p_information14_o => pqh_rls_shd.g_old_rec.information14
289 ,p_information15_o => pqh_rls_shd.g_old_rec.information15
290 ,p_information16_o => pqh_rls_shd.g_old_rec.information16
291 ,p_information17_o => pqh_rls_shd.g_old_rec.information17
292 ,p_information18_o => pqh_rls_shd.g_old_rec.information18
293 ,p_information19_o => pqh_rls_shd.g_old_rec.information19
294 ,p_information20_o => pqh_rls_shd.g_old_rec.information20
295 ,p_information21_o => pqh_rls_shd.g_old_rec.information21
296 ,p_information22_o => pqh_rls_shd.g_old_rec.information22
297 ,p_information23_o => pqh_rls_shd.g_old_rec.information23
298 ,p_information24_o => pqh_rls_shd.g_old_rec.information24
299 ,p_information25_o => pqh_rls_shd.g_old_rec.information25
300 ,p_information26_o => pqh_rls_shd.g_old_rec.information26
301 ,p_information27_o => pqh_rls_shd.g_old_rec.information27
302 ,p_information28_o => pqh_rls_shd.g_old_rec.information28
303 ,p_information29_o => pqh_rls_shd.g_old_rec.information29
304 ,p_information30_o => pqh_rls_shd.g_old_rec.information30
305 );
306 --
307 if ((nvl(pqh_rls_shd.g_old_rec.enable_flag,'N') = 'N' and p_rec.enable_flag = 'Y') or (nvl(pqh_rls_shd.g_old_rec.enable_flag,'N') = 'Y' and p_rec.enable_flag = 'Y')) then
308 hr_utility.set_location('Role enabled'||l_proc,10);
309 declare
310 l_user_name varchar2(50);
311 l_plist wf_parameter_list_t;
312 cursor c1 is
313 select ppei.person_id,usr.user_name
314 from
315 per_people_extra_info ppei,
316 fnd_user usr
317 where
318 ppei.information_type = 'PQH_ROLE_USERS'
319 and ppei.PEI_INFORMATION3 = p_rec.role_id
320 and ppei.PEI_INFORMATION5 = 'Y'
321 and ppei.person_id = usr.employee_id;
322
323 begin
324 hr_utility.set_location('building list '||l_proc, 12);
325 hr_utility.set_location('expiration date'||to_char(l_expiration_date,'dd/mm/RRRR'), 13);
326 WF_EVENT.AddParameterToList('USER_NAME','PQH_ROLE:'|| p_rec.role_id, l_plist);
327 --WF_EVENT.AddParameterToList('DISPLAY_NAME',p_rec.role_name,l_plist);
328 WF_EVENT.AddParameterToList('DISPLAYNAME',p_rec.role_name,l_plist);
329 WF_EVENT.AddParameterToList('DESCRIPTION',p_rec.role_name,l_plist);
330 WF_EVENT.AddParameterToList('orclWorkFlowNotificationPref','QUERY',l_plist);
331 WF_EVENT.AddParameterToList('orclIsEnabled','ACTIVE',l_plist);
332 WF_EVENT.AddParameterToList('orclWFOrigSystem','PQH_ROLE', l_plist);
333 WF_EVENT.AddParameterToList('orclWFOrigSystemID',p_rec.role_id,l_plist);
334 WF_EVENT.AddParameterToList('expirationdate', to_char(l_expiration_date,wf_engine.date_format),l_plist);
335 WF_EVENT.AddParameterToList('RAISEERRORS','FALSE',l_plist);
336 if (nvl(pqh_rls_shd.g_old_rec.enable_flag,'N') = 'Y' and p_rec.enable_flag = 'Y')
337 then
338 WF_EVENT.AddParameterToList('UPDATEONLY','TRUE',l_plist);
339 end if;
340
341 hr_utility.set_location('calling sync role '||l_proc, 14);
342 WF_LOCAL_SYNCH.propagate_role(p_orig_system => 'PQH_ROLE',
343 p_orig_system_id => p_rec.role_id,
344 p_attributes => l_plist,
345 p_start_date => l_start_date,
346 p_expiration_date => l_expiration_date);
347
348 hr_utility.set_location('sync role done'||l_proc, 15);
349 for r1 in c1 loop
350 l_plist := null;
351 hr_utility.set_location('going persons loop '||l_proc, 17);
352 WF_EVENT.AddParameterToList('expirationdate',to_char(l_expiration_date,wf_engine.date_format), l_plist);
353 WF_EVENT.AddParameterToList('USER_NAME',r1.user_name,l_plist);
354 WF_EVENT.AddParameterToList('orclIsEnabled','ACTIVE',l_plist);
355 WF_EVENT.AddParameterToList('ExpirationDate',to_char(l_expiration_date,wf_engine.date_format),l_plist);
356 WF_EVENT.AddParameterToList('StartDate',to_char(l_start_date,wf_engine.date_format),l_plist);
357 WF_EVENT.AddParameterToList('RaiseErrorS','FALSE',l_plist);
358 hr_utility.set_location('calling sync user '||l_proc, 19);
359 WF_LOCAL_SYNCH.propagate_user_role(p_user_orig_system => 'PER',
360 p_user_orig_system_id => r1.person_id,
361 p_role_orig_system => 'PQH_ROLE',
362 p_role_orig_system_id => p_rec.role_id,
363 p_start_date => l_start_date,
364 p_expiration_date => l_expiration_date);
365 hr_utility.set_location('sync user done'||l_proc, 21);
366 end loop;
367 end;
368 elsif nvl(pqh_rls_shd.g_old_rec.enable_flag,'N') = 'Y'
369 and p_rec.enable_flag = 'N' then
370 hr_utility.set_location('role being disabled '||l_proc, 30);
371 declare
372 l_plist wf_parameter_list_t;
373 --
374 cursor c0 is
375 select *
376 from wf_local_user_roles
377 where ROLE_ORIG_SYSTEM = 'PQH_ROLE'
378 and ROLE_ORIG_SYSTEM_ID = p_rec.role_id;
379 --
380 begin
381 l_plist := null;
382 hr_utility.set_location('building list'||l_proc, 32);
383 wf_event.AddParameterToList( 'USER_NAME', 'PQH_ROLE:'|| p_rec.role_id, l_plist);
384 wf_event.AddParameterToList( 'DELETE', 'TRUE', l_plist);
385 wf_event.AddParameterToList( 'EXPIRATIONDATE', to_char(l_start_date,wf_engine.date_format), l_plist);
386 WF_EVENT.AddParameterToList('RaiseErrorS','FALSE',l_plist);
387 for r1 in c0 loop
388 hr_utility.set_location('calling sync user '||l_proc, 34);
389 -- setting the expiration date to today
390 WF_LOCAL_SYNCH.propagate_user_role(p_user_orig_system => 'PER',
391 p_user_orig_system_id => r1.user_orig_system_id,
392 p_role_orig_system => 'PQH_ROLE',
393 p_role_orig_system_id => p_rec.role_id,
394 p_expiration_date => l_start_date);
395 hr_utility.set_location('sync user done'||l_proc, 36);
396 end loop;
397 l_plist := null;
398 wf_event.AddParameterToList('USER_NAME', 'PQH_ROLE:'|| p_rec.role_id, l_plist);
399 wf_event.AddParameterToList('EXPIRATIONDATE', to_char(p_effective_date,wf_engine.date_format), l_plist);
400 wf_event.AddParameterToList('DELETE', 'TRUE', l_plist);
401 WF_EVENT.AddParameterToList('RaiseErrorS','FALSE',l_plist);
402 hr_utility.set_location('calling sync role '||l_proc, 38);
403 WF_LOCAL_SYNCH.propagate_role(p_orig_system => 'PQH_ROLE',
404 p_orig_system_id => p_rec.role_id,
405 p_attributes => l_plist,
406 p_expiration_date => p_effective_date);
407 hr_utility.set_location('sync role done'||l_proc, 40);
408 end;
409 end if;
410 end;
411 --
412 hr_utility.set_location(' Leaving:'||l_proc, 10);
413 End post_update;
414 --
415 --
416 -- ----------------------------------------------------------------------------
417 -- |-----------------------------< convert_defs >-----------------------------|
418 -- ----------------------------------------------------------------------------
419 -- {Start Of Comments}
420 --
421 -- Description:
422 -- The Convert_Defs procedure has one very important function:
423 -- It must return the record structure for the row with all system defaulted
424 -- values converted into its corresponding parameter value for update. When
425 -- we attempt to update a row through the Upd process ,certain
426 -- parameters can be defaulted which enables flexibility in the calling of
427 -- the upd process (e.g. only attributes which need to be updated need to be
428 -- specified). For the upd process to determine which attributes
429 -- have NOT been specified we need to check if the parameter has a reserved
430 -- system default value. Therefore,for all parameters which have a
431 -- corresponding reserved system default mechanism specified we need to
432 -- check if a system default is being used. If a system default is being
433 -- used then we convert the defaulted value into its corresponding attribute
434 -- value held in the g_old_rec data structure.
435 --
436 -- Prerequisites:
437 -- This private function can only be called from the upd process.
438 --
439 -- In Parameters:
440 -- A Pl/Sql record structure.
441 --
442 -- Post Success:
443 -- The record structure will be returned with all system defaulted parameter
444 -- values converted into its current row attribute value.
445 --
446 -- Post Failure:
447 -- No direct error handling is required within this function. Any possible
448 -- errors within this procedure will be a PL/SQL value error due to
449 -- conversion of datatypes or data lengths.
450 --
451 -- Developer Implementation Notes:
452 -- None.
453 --
454 -- Access Status:
455 -- Internal Row Handler Use Only.
456 --
457 -- {End Of Comments}
458 -- ----------------------------------------------------------------------------
459 Procedure convert_defs
460 ( p_rec in out NOCOPY pqh_rls_shd.g_rec_type
461 ) is
462 --
463 Begin
464 --
465 -- We must now examine each argument value in the
466 -- plsql record structure
467 -- to see if a system default is being used. If a system default
468 -- is being used then we must set to the 'current' argument value.
469 --
470 If (p_rec.role_name = hr_api.g_varchar2) then
471 p_rec.role_name :=
472 pqh_rls_shd.g_old_rec.role_name;
473 End If;
474 If (p_rec.role_type_cd = hr_api.g_varchar2) then
475 p_rec.role_type_cd :=
476 pqh_rls_shd.g_old_rec.role_type_cd;
477 End If;
478 If (p_rec.enable_flag = hr_api.g_varchar2) then
479 p_rec.enable_flag :=
480 pqh_rls_shd.g_old_rec.enable_flag;
481 End If;
482 If (p_rec.business_group_id = hr_api.g_number) then
483 p_rec.business_group_id :=
484 pqh_rls_shd.g_old_rec.business_group_id;
485 End If;
486 --
487 -- mvankada
488 -- For Developer DF columns
489
490 If (p_rec.information_category = hr_api.g_varchar2) then
491 p_rec.information_category :=
492 pqh_rls_shd.g_old_rec.information_category;
493 End If;
494 If (p_rec.information1 = hr_api.g_varchar2) then
495 p_rec.information1 :=
496 pqh_rls_shd.g_old_rec.information1;
497 End If;
498 If (p_rec.information2 = hr_api.g_varchar2) then
499 p_rec.information2 :=
500 pqh_rls_shd.g_old_rec.information2;
501 End If;
502 If (p_rec.information3 = hr_api.g_varchar2) then
503 p_rec.information3 :=
504 pqh_rls_shd.g_old_rec.information3;
505 End If;
506 If (p_rec.information4 = hr_api.g_varchar2) then
507 p_rec.information4 :=
508 pqh_rls_shd.g_old_rec.information4;
509 End If;
510 If (p_rec.information5 = hr_api.g_varchar2) then
511 p_rec.information5 :=
512 pqh_rls_shd.g_old_rec.information5;
513 End If;
514 If (p_rec.information6 = hr_api.g_varchar2) then
515 p_rec.information6 :=
516 pqh_rls_shd.g_old_rec.information6;
517 End If;
518 If (p_rec.information7 = hr_api.g_varchar2) then
519 p_rec.information7 :=
520 pqh_rls_shd.g_old_rec.information7;
521 End If;
522 If (p_rec.information8 = hr_api.g_varchar2) then
523 p_rec.information8 :=
524 pqh_rls_shd.g_old_rec.information8;
525 End If;
526 If (p_rec.information9 = hr_api.g_varchar2) then
527 p_rec.information9 :=
528 pqh_rls_shd.g_old_rec.information9;
529 End If;
530 If (p_rec.information10 = hr_api.g_varchar2) then
531 p_rec.information10 :=
532 pqh_rls_shd.g_old_rec.information10;
533 End If;
534 If (p_rec.information11 = hr_api.g_varchar2) then
535 p_rec.information11 :=
536 pqh_rls_shd.g_old_rec.information11;
537 End If;
538 If (p_rec.information12 = hr_api.g_varchar2) then
539 p_rec.information12 :=
540 pqh_rls_shd.g_old_rec.information12;
541 End If;
542 If (p_rec.information13 = hr_api.g_varchar2) then
543 p_rec.information13 :=
544 pqh_rls_shd.g_old_rec.information13;
545 End If;
546 If (p_rec.information14 = hr_api.g_varchar2) then
547 p_rec.information14 :=
548 pqh_rls_shd.g_old_rec.information14;
549 End If;
550 If (p_rec.information15 = hr_api.g_varchar2) then
551 p_rec.information15 :=
552 pqh_rls_shd.g_old_rec.information15;
553 End If;
554 If (p_rec.information16 = hr_api.g_varchar2) then
555 p_rec.information16 :=
556 pqh_rls_shd.g_old_rec.information16;
557 End If;
558 If (p_rec.information17 = hr_api.g_varchar2) then
559 p_rec.information17 :=
560 pqh_rls_shd.g_old_rec.information17;
561 End If;
562 If (p_rec.information18 = hr_api.g_varchar2) then
563 p_rec.information18 :=
564 pqh_rls_shd.g_old_rec.information18;
565 End If;
566 If (p_rec.information19 = hr_api.g_varchar2) then
567 p_rec.information19 :=
568 pqh_rls_shd.g_old_rec.information19;
569 End If;
570 If (p_rec.information20 = hr_api.g_varchar2) then
571 p_rec.information20 :=
572 pqh_rls_shd.g_old_rec.information20;
573 End If;
574 If (p_rec.information21 = hr_api.g_varchar2) then
575 p_rec.information21 :=
576 pqh_rls_shd.g_old_rec.information21;
577 End If;
578 If (p_rec.information22 = hr_api.g_varchar2) then
579 p_rec.information22 :=
580 pqh_rls_shd.g_old_rec.information22;
581 End If;
582 If (p_rec.information23 = hr_api.g_varchar2) then
583 p_rec.information23 :=
584 pqh_rls_shd.g_old_rec.information23;
585 End If;
586 If (p_rec.information24 = hr_api.g_varchar2) then
587 p_rec.information24 :=
588 pqh_rls_shd.g_old_rec.information24;
589 End If;
590 If (p_rec.information25 = hr_api.g_varchar2) then
591 p_rec.information25 :=
592 pqh_rls_shd.g_old_rec.information25;
593 End If;
594 If (p_rec.information26 = hr_api.g_varchar2) then
595 p_rec.information26 :=
596 pqh_rls_shd.g_old_rec.information26;
597 End If;
598 If (p_rec.information27 = hr_api.g_varchar2) then
599 p_rec.information27 :=
600 pqh_rls_shd.g_old_rec.information27;
601 End If;
602 If (p_rec.information28 = hr_api.g_varchar2) then
603 p_rec.information28 :=
604 pqh_rls_shd.g_old_rec.information28;
605 End If;
606 If (p_rec.information29 = hr_api.g_varchar2) then
607 p_rec.information29 :=
608 pqh_rls_shd.g_old_rec.information29;
609 End If;
610 If (p_rec.information30 = hr_api.g_varchar2) then
611 p_rec.information30 :=
612 pqh_rls_shd.g_old_rec.information30;
613 End If;
614
615 End convert_defs;
616 --
617 -- ----------------------------------------------------------------------------
618 -- |---------------------------------< upd >----------------------------------|
619 -- ----------------------------------------------------------------------------
620 Procedure upd
621 (p_effective_date in date
622 ,p_rec in out NOCOPY pqh_rls_shd.g_rec_type
623 ) is
624 --
625 l_proc varchar2(72) := g_package||'upd';
626 --
627 Begin
628 hr_utility.set_location('Entering:'||l_proc,5);
629 --
630 -- We must lock the row which we need to update.
631 --
632 pqh_rls_shd.lck
633 (p_rec.role_id
634 ,p_rec.object_version_number
635 );
636 --
637 -- 1. During an update system defaults are used to determine if
638 -- arguments have been defaulted or not. We must therefore
639 -- derive the full record structure values to be updated.
640 --
641 -- 2. Call the supporting update validate operations.
642 --
643 convert_defs(p_rec);
644 pqh_rls_bus.update_validate
645 (p_effective_date
646 ,p_rec
647 );
648 --
649 -- Call the supporting pre-update operation
650 --
651 pqh_rls_upd.pre_update(p_rec);
652 --
653 -- Update the row.
654 --
655 pqh_rls_upd.update_dml(p_rec);
656 --
657 -- Call the supporting post-update operation
658 --
659 pqh_rls_upd.post_update
660 (p_effective_date
661 ,p_rec
662 );
663 End upd;
664 --
665 -- ----------------------------------------------------------------------------
666 -- |---------------------------------< upd >----------------------------------|
667 -- ----------------------------------------------------------------------------
668
669 -- mvankada
670 -- Passed Developer DF columns as arguments for upd procedure
671
672 Procedure upd
673 (p_effective_date in date
674 ,p_role_id in number
675 ,p_object_version_number in out NOCOPY number
676 ,p_role_name in varchar2
677 ,p_business_group_id in number
678 ,p_role_type_cd in varchar2
679 ,p_enable_flag in varchar2
680 ,p_information_category in varchar2
681 ,p_information1 in varchar2
682 ,p_information2 in varchar2
683 ,p_information3 in varchar2
684 ,p_information4 in varchar2
685 ,p_information5 in varchar2
686 ,p_information6 in varchar2
687 ,p_information7 in varchar2
688 ,p_information8 in varchar2
689 ,p_information9 in varchar2
690 ,p_information10 in varchar2
691 ,p_information11 in varchar2
692 ,p_information12 in varchar2
693 ,p_information13 in varchar2
694 ,p_information14 in varchar2
695 ,p_information15 in varchar2
696 ,p_information16 in varchar2
697 ,p_information17 in varchar2
698 ,p_information18 in varchar2
699 ,p_information19 in varchar2
700 ,p_information20 in varchar2
701 ,p_information21 in varchar2
702 ,p_information22 in varchar2
703 ,p_information23 in varchar2
704 ,p_information24 in varchar2
705 ,p_information25 in varchar2
706 ,p_information26 in varchar2
707 ,p_information27 in varchar2
708 ,p_information28 in varchar2
709 ,p_information29 in varchar2
710 ,p_information30 in varchar2
711 ) is
712 --
713 l_rec pqh_rls_shd.g_rec_type;
714 l_proc varchar2(72) := g_package||'upd';
715 --
716 Begin
717 hr_utility.set_location('Entering:'||l_proc,5);
718 --
719 -- Call conversion function to turn arguments into the
720 -- l_rec structure.
721 --
722 -- mvanakda
723 -- Added DDF Columns
724 l_rec :=
725 pqh_rls_shd.convert_args
726 (p_role_id
727 ,p_role_name
728 ,p_role_type_cd
729 ,p_enable_flag
730 ,p_object_version_number
731 ,p_business_group_id
732 ,p_information_category
733 ,p_information1
734 ,p_information2
735 ,p_information3
736 ,p_information4
737 ,p_information5
738 ,p_information6
739 ,p_information7
740 ,p_information8
741 ,p_information9
742 ,p_information10
743 ,p_information11
744 ,p_information12
745 ,p_information13
746 ,p_information14
747 ,p_information15
748 ,p_information16
749 ,p_information17
750 ,p_information18
751 ,p_information19
752 ,p_information20
753 ,p_information21
754 ,p_information22
755 ,p_information23
756 ,p_information24
757 ,p_information25
758 ,p_information26
759 ,p_information27
760 ,p_information28
761 ,p_information29
762 ,p_information30
763 );
764 --
765 -- Having converted the arguments into the
766 -- plsql record structure we call the corresponding record
767 -- business process.
768 --
769 pqh_rls_upd.upd
770 (p_effective_date
771 ,l_rec
772 );
773 p_object_version_number := l_rec.object_version_number;
774 --
775 hr_utility.set_location(' Leaving:'||l_proc,10);
776 End upd;
777 --
778 end pqh_rls_upd;