DBA Data[Home] [Help]

PACKAGE BODY: APPS.PQH_RLS_UPD

Source


1 Package Body pqh_rls_upd as
2 /* $Header: pqrlsrhi.pkb 115.21 2004/02/18 12:06:25 srajakum noship $ */
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'
308         and p_rec.enable_flag = 'Y' then
309        hr_utility.set_location('Role enabled'||l_proc,10);
310     declare
311       l_user_name varchar2(50);
312       l_plist wf_parameter_list_t;
313       cursor c1 is
314       select ppei.person_id,usr.user_name
315       from
316       per_people_extra_info ppei,
317       fnd_user usr
318       where
319       ppei.information_type = 'PQH_ROLE_USERS'
320       and ppei.PEI_INFORMATION3 = p_rec.role_id
321       and ppei.PEI_INFORMATION5 = 'Y'
322       and ppei.person_id = usr.employee_id;
323 
324     begin
325       hr_utility.set_location('building list '||l_proc, 12);
326       hr_utility.set_location('expiration date'||to_char(l_expiration_date,'dd/mm/RRRR'), 13);
327       WF_EVENT.AddParameterToList('USER_NAME','PQH_ROLE:'|| p_rec.role_id, l_plist);
328       WF_EVENT.AddParameterToList('DISPLAY_NAME',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 
337       hr_utility.set_location('calling sync role '||l_proc, 14);
338       WF_LOCAL_SYNCH.propagate_role(p_orig_system     => 'PQH_ROLE',
339                                     p_orig_system_id  => p_rec.role_id,
340                                     p_attributes      => l_plist,
341                                     p_start_date      => l_start_date,
342                                     p_expiration_date => l_expiration_date);
343 
344       hr_utility.set_location('sync role done'||l_proc, 15);
345      for r1 in c1 loop
346       l_plist := null;
347       hr_utility.set_location('going persons loop '||l_proc, 17);
348       WF_EVENT.AddParameterToList('expirationdate',to_char(l_expiration_date,wf_engine.date_format), l_plist);
349       WF_EVENT.AddParameterToList('USER_NAME',r1.user_name,l_plist);
350       WF_EVENT.AddParameterToList('orclIsEnabled','ACTIVE',l_plist);
351       WF_EVENT.AddParameterToList('ExpirationDate',to_char(l_expiration_date,wf_engine.date_format),l_plist);
352       WF_EVENT.AddParameterToList('StartDate',to_char(l_start_date,wf_engine.date_format),l_plist);
353       WF_EVENT.AddParameterToList('RaiseErrorS','FALSE',l_plist);
354       hr_utility.set_location('calling sync user '||l_proc, 19);
355       WF_LOCAL_SYNCH.propagate_user_role(p_user_orig_system     => 'PER',
356                                          p_user_orig_system_id  => r1.person_id,
357                                          p_role_orig_system     => 'PQH_ROLE',
358                                          p_role_orig_system_id  => p_rec.role_id,
359                                          p_start_date           => l_start_date,
360                                          p_expiration_date      => l_expiration_date);
361       hr_utility.set_location('sync user done'||l_proc, 21);
362      end loop;
363     end;
364     elsif nvl(pqh_rls_shd.g_old_rec.enable_flag,'N') = 'Y'
365         and p_rec.enable_flag = 'N' then
366         hr_utility.set_location('role being disabled '||l_proc, 30);
367     declare
368       l_plist wf_parameter_list_t;
369       --
370       cursor c0 is
371       select *
372       from wf_local_user_roles
373       where ROLE_ORIG_SYSTEM = 'PQH_ROLE'
374       and ROLE_ORIG_SYSTEM_ID = p_rec.role_id;
375       --
376     begin
377        l_plist := null;
378        hr_utility.set_location('building list'||l_proc, 32);
379      wf_event.AddParameterToList( 'USER_NAME', 'PQH_ROLE:'|| p_rec.role_id, l_plist);
380      wf_event.AddParameterToList( 'DELETE', 'TRUE', l_plist);
381      wf_event.AddParameterToList( 'EXPIRATIONDATE', to_char(l_start_date,wf_engine.date_format), l_plist);
382       WF_EVENT.AddParameterToList('RaiseErrorS','FALSE',l_plist);
383      for r1 in c0 loop
384         hr_utility.set_location('calling sync user '||l_proc, 34);
385         -- setting the expiration date to today
386         WF_LOCAL_SYNCH.propagate_user_role(p_user_orig_system      => 'PER',
387                               p_user_orig_system_id   => r1.user_orig_system_id,
388                               p_role_orig_system      => 'PQH_ROLE',
389                               p_role_orig_system_id   => p_rec.role_id,
390                               p_expiration_date       => l_start_date);
391         hr_utility.set_location('sync user done'||l_proc, 36);
392      end loop;
393      l_plist := null;
394      wf_event.AddParameterToList('USER_NAME', 'PQH_ROLE:'|| p_rec.role_id, l_plist);
395      wf_event.AddParameterToList('EXPIRATIONDATE', to_char(p_effective_date,wf_engine.date_format), l_plist);
396      wf_event.AddParameterToList('DELETE', 'TRUE', l_plist);
397      WF_EVENT.AddParameterToList('RaiseErrorS','FALSE',l_plist);
398      hr_utility.set_location('calling sync role '||l_proc, 38);
399      WF_LOCAL_SYNCH.propagate_role(p_orig_system     => 'PQH_ROLE',
400                                    p_orig_system_id  => p_rec.role_id,
401                                    p_attributes      => l_plist,
402                                    p_expiration_date => p_effective_date);
403      hr_utility.set_location('sync role done'||l_proc, 40);
404     end;
405     end if;
406   end;
407   --
408   hr_utility.set_location(' Leaving:'||l_proc, 10);
409 End post_update;
410 --
411 --
412 -- ----------------------------------------------------------------------------
413 -- |-----------------------------< convert_defs >-----------------------------|
414 -- ----------------------------------------------------------------------------
415 -- {Start Of Comments}
416 --
417 -- Description:
418 --   The Convert_Defs procedure has one very important function:
419 --   It must return the record structure for the row with all system defaulted
420 --   values converted into its corresponding parameter value for update. When
421 --   we attempt to update a row through the Upd process ,certain
422 --   parameters can be defaulted which enables flexibility in the calling of
423 --   the upd process (e.g. only attributes which need to be updated need to be
424 --   specified). For the upd process to determine which attributes
425 --   have NOT been specified we need to check if the parameter has a reserved
426 --   system default value. Therefore,for all parameters which have a
427 --   corresponding reserved system default mechanism specified we need to
428 --   check if a system default is being used. If a system default is being
429 --   used then we convert the defaulted value into its corresponding attribute
430 --   value held in the g_old_rec data structure.
431 --
432 -- Prerequisites:
433 --   This private function can only be called from the upd process.
434 --
435 -- In Parameters:
436 --   A Pl/Sql record structure.
437 --
438 -- Post Success:
439 --   The record structure will be returned with all system defaulted parameter
440 --   values converted into its current row attribute value.
441 --
442 -- Post Failure:
443 --   No direct error handling is required within this function. Any possible
444 --   errors within this procedure will be a PL/SQL value error due to
445 --   conversion of datatypes or data lengths.
446 --
447 -- Developer Implementation Notes:
448 --   None.
449 --
450 -- Access Status:
451 --   Internal Row Handler Use Only.
452 --
453 -- {End Of Comments}
454 -- ----------------------------------------------------------------------------
455 Procedure convert_defs
456   ( p_rec in out NOCOPY pqh_rls_shd.g_rec_type
457   ) is
458 --
459 Begin
460   --
461   -- We must now examine each argument value in the
462   --  plsql record structure
463   -- to see if a system default is being used. If a system default
464   -- is being used then we must set to the 'current' argument value.
465   --
466   If (p_rec.role_name = hr_api.g_varchar2) then
467     p_rec.role_name :=
468     pqh_rls_shd.g_old_rec.role_name;
469   End If;
470   If (p_rec.role_type_cd = hr_api.g_varchar2) then
471     p_rec.role_type_cd :=
472     pqh_rls_shd.g_old_rec.role_type_cd;
473   End If;
474   If (p_rec.enable_flag = hr_api.g_varchar2) then
475     p_rec.enable_flag :=
476     pqh_rls_shd.g_old_rec.enable_flag;
477   End If;
478   If (p_rec.business_group_id = hr_api.g_number) then
479     p_rec.business_group_id :=
480     pqh_rls_shd.g_old_rec.business_group_id;
481   End If;
482   --
483   -- mvankada
484   -- For Developer DF columns
485 
486   If (p_rec.information_category = hr_api.g_varchar2) then
487     p_rec.information_category :=
488     pqh_rls_shd.g_old_rec.information_category;
489   End If;
490   If (p_rec.information1 = hr_api.g_varchar2) then
491     p_rec.information1 :=
492     pqh_rls_shd.g_old_rec.information1;
493   End If;
494   If (p_rec.information2 = hr_api.g_varchar2) then
495     p_rec.information2 :=
496     pqh_rls_shd.g_old_rec.information2;
497   End If;
498   If (p_rec.information3 = hr_api.g_varchar2) then
499     p_rec.information3 :=
500     pqh_rls_shd.g_old_rec.information3;
501   End If;
502   If (p_rec.information4 = hr_api.g_varchar2) then
503     p_rec.information4 :=
504     pqh_rls_shd.g_old_rec.information4;
505   End If;
506   If (p_rec.information5 = hr_api.g_varchar2) then
507     p_rec.information5 :=
508     pqh_rls_shd.g_old_rec.information5;
509   End If;
510   If (p_rec.information6 = hr_api.g_varchar2) then
511     p_rec.information6 :=
512     pqh_rls_shd.g_old_rec.information6;
513   End If;
514   If (p_rec.information7 = hr_api.g_varchar2) then
515     p_rec.information7 :=
516     pqh_rls_shd.g_old_rec.information7;
517   End If;
518   If (p_rec.information8 = hr_api.g_varchar2) then
519     p_rec.information8 :=
520     pqh_rls_shd.g_old_rec.information8;
521   End If;
522   If (p_rec.information9 = hr_api.g_varchar2) then
523     p_rec.information9 :=
524     pqh_rls_shd.g_old_rec.information9;
525   End If;
526   If (p_rec.information10 = hr_api.g_varchar2) then
527     p_rec.information10 :=
528     pqh_rls_shd.g_old_rec.information10;
529   End If;
530   If (p_rec.information11 = hr_api.g_varchar2) then
531     p_rec.information11 :=
532     pqh_rls_shd.g_old_rec.information11;
533   End If;
534   If (p_rec.information12 = hr_api.g_varchar2) then
535     p_rec.information12 :=
536     pqh_rls_shd.g_old_rec.information12;
537   End If;
538   If (p_rec.information13 = hr_api.g_varchar2) then
539     p_rec.information13 :=
540     pqh_rls_shd.g_old_rec.information13;
541   End If;
542   If (p_rec.information14 = hr_api.g_varchar2) then
543     p_rec.information14 :=
544     pqh_rls_shd.g_old_rec.information14;
545   End If;
546   If (p_rec.information15 = hr_api.g_varchar2) then
547     p_rec.information15 :=
548     pqh_rls_shd.g_old_rec.information15;
549   End If;
550   If (p_rec.information16 = hr_api.g_varchar2) then
551     p_rec.information16 :=
552     pqh_rls_shd.g_old_rec.information16;
553   End If;
554   If (p_rec.information17 = hr_api.g_varchar2) then
555     p_rec.information17 :=
556     pqh_rls_shd.g_old_rec.information17;
557   End If;
558   If (p_rec.information18 = hr_api.g_varchar2) then
559     p_rec.information18 :=
560     pqh_rls_shd.g_old_rec.information18;
561   End If;
562   If (p_rec.information19 = hr_api.g_varchar2) then
563     p_rec.information19 :=
564     pqh_rls_shd.g_old_rec.information19;
565   End If;
566   If (p_rec.information20 = hr_api.g_varchar2) then
567     p_rec.information20 :=
568     pqh_rls_shd.g_old_rec.information20;
569   End If;
570   If (p_rec.information21 = hr_api.g_varchar2) then
571     p_rec.information21 :=
572     pqh_rls_shd.g_old_rec.information21;
573   End If;
574   If (p_rec.information22 = hr_api.g_varchar2) then
575     p_rec.information22 :=
576     pqh_rls_shd.g_old_rec.information22;
577   End If;
578   If (p_rec.information23 = hr_api.g_varchar2) then
579     p_rec.information23 :=
580     pqh_rls_shd.g_old_rec.information23;
581   End If;
582   If (p_rec.information24 = hr_api.g_varchar2) then
583     p_rec.information24 :=
584     pqh_rls_shd.g_old_rec.information24;
585   End If;
586   If (p_rec.information25 = hr_api.g_varchar2) then
587     p_rec.information25 :=
588     pqh_rls_shd.g_old_rec.information25;
589   End If;
590   If (p_rec.information26 = hr_api.g_varchar2) then
591     p_rec.information26 :=
592     pqh_rls_shd.g_old_rec.information26;
593   End If;
594   If (p_rec.information27 = hr_api.g_varchar2) then
595     p_rec.information27 :=
596     pqh_rls_shd.g_old_rec.information27;
597   End If;
598   If (p_rec.information28 = hr_api.g_varchar2) then
599     p_rec.information28 :=
600     pqh_rls_shd.g_old_rec.information28;
601   End If;
602   If (p_rec.information29 = hr_api.g_varchar2) then
603     p_rec.information29 :=
604     pqh_rls_shd.g_old_rec.information29;
605   End If;
606   If (p_rec.information30 = hr_api.g_varchar2) then
607     p_rec.information30 :=
608     pqh_rls_shd.g_old_rec.information30;
609   End If;
610 
611 End convert_defs;
612 --
613 -- ----------------------------------------------------------------------------
614 -- |---------------------------------< upd >----------------------------------|
615 -- ----------------------------------------------------------------------------
616 Procedure upd
617   (p_effective_date               in date
618   ,p_rec                          in out NOCOPY pqh_rls_shd.g_rec_type
619   ) is
620 --
621   l_proc  varchar2(72) := g_package||'upd';
622 --
623 Begin
624   hr_utility.set_location('Entering:'||l_proc,5);
625   --
626   -- We must lock the row which we need to update.
627   --
628   pqh_rls_shd.lck
629     (p_rec.role_id
630     ,p_rec.object_version_number
631     );
632   --
633   -- 1. During an update system defaults are used to determine if
634   --    arguments have been defaulted or not. We must therefore
635   --    derive the full record structure values to be updated.
636   --
637   -- 2. Call the supporting update validate operations.
638   --
639   convert_defs(p_rec);
640   pqh_rls_bus.update_validate
641      (p_effective_date
642      ,p_rec
643      );
644   --
645   -- Call the supporting pre-update operation
646   --
647   pqh_rls_upd.pre_update(p_rec);
648   --
649   -- Update the row.
650   --
651   pqh_rls_upd.update_dml(p_rec);
652   --
653   -- Call the supporting post-update operation
654   --
655   pqh_rls_upd.post_update
656      (p_effective_date
657      ,p_rec
658      );
659 End upd;
660 --
661 -- ----------------------------------------------------------------------------
662 -- |---------------------------------< upd >----------------------------------|
663 -- ----------------------------------------------------------------------------
664 
665 -- mvankada
666 -- Passed  Developer DF columns as arguments for upd procedure
667 
668 Procedure upd
669   (p_effective_date          in    date
670   ,p_role_id                 in    number
671   ,p_object_version_number  in out NOCOPY number
672   ,p_role_name              in varchar2
673   ,p_business_group_id      in number
674   ,p_role_type_cd           in varchar2
675   ,p_enable_flag            in varchar2
676   ,p_information_category   in varchar2
677   ,p_information1           in varchar2
678   ,p_information2           in varchar2
679   ,p_information3           in varchar2
680   ,p_information4           in varchar2
681   ,p_information5           in varchar2
682   ,p_information6           in varchar2
683   ,p_information7           in varchar2
684   ,p_information8           in varchar2
685   ,p_information9           in varchar2
686   ,p_information10          in varchar2
687   ,p_information11          in varchar2
688   ,p_information12          in varchar2
689   ,p_information13          in varchar2
690   ,p_information14          in varchar2
691   ,p_information15          in varchar2
692   ,p_information16          in varchar2
693   ,p_information17          in varchar2
694   ,p_information18          in varchar2
695   ,p_information19          in varchar2
696   ,p_information20          in varchar2
697   ,p_information21          in varchar2
698   ,p_information22          in varchar2
699   ,p_information23          in varchar2
700   ,p_information24          in varchar2
701   ,p_information25          in varchar2
702   ,p_information26          in varchar2
703   ,p_information27          in varchar2
704   ,p_information28          in varchar2
705   ,p_information29          in varchar2
706   ,p_information30          in varchar2
707   ) is
708 --
709   l_rec	  pqh_rls_shd.g_rec_type;
710   l_proc  varchar2(72) := g_package||'upd';
711 --
712 Begin
713   hr_utility.set_location('Entering:'||l_proc,5);
714   --
715   -- Call conversion function to turn arguments into the
716   -- l_rec structure.
717   --
718   -- mvanakda
719   -- Added DDF Columns
720   l_rec :=
721   pqh_rls_shd.convert_args
722   (p_role_id
723   ,p_role_name
724   ,p_role_type_cd
725   ,p_enable_flag
726   ,p_object_version_number
727   ,p_business_group_id
728   ,p_information_category
729   ,p_information1
730   ,p_information2
731   ,p_information3
732   ,p_information4
733   ,p_information5
734   ,p_information6
735   ,p_information7
736   ,p_information8
737   ,p_information9
738   ,p_information10
739   ,p_information11
740   ,p_information12
741   ,p_information13
742   ,p_information14
743   ,p_information15
744   ,p_information16
745   ,p_information17
746   ,p_information18
747   ,p_information19
748   ,p_information20
749   ,p_information21
750   ,p_information22
751   ,p_information23
752   ,p_information24
753   ,p_information25
754   ,p_information26
755   ,p_information27
756   ,p_information28
757   ,p_information29
758   ,p_information30
759   );
760   --
761   -- Having converted the arguments into the
762   -- plsql record structure we call the corresponding record
763   -- business process.
764   --
765   pqh_rls_upd.upd
766      (p_effective_date
767      ,l_rec
768      );
769   p_object_version_number := l_rec.object_version_number;
770   --
771   hr_utility.set_location(' Leaving:'||l_proc,10);
772 End upd;
773 --
774 end pqh_rls_upd;