DBA Data[Home] [Help]

PACKAGE BODY: APPS.GHR_SF52_POST_UPDATE

Source


1 PACKAGE BODY GHR_SF52_POST_UPDATE AS
2 /* $Header: gh52poup.pkb 120.3.12010000.2 2008/08/05 14:59:45 ubhat ship $ */
3 
4 --
5 -- ----------------------------------------------------------------------------
6 -- |--------------------------< Post_sf52_process>--------------------------|
7 -- ----------------------------------------------------------------------------
8 
9 
10 Procedure Post_sf52_process
11 (
12  p_pa_request_id                  in     number,
13  p_effective_date                 in     date,
14  p_object_version_number          in out NOCOPY number,
15  p_from_position_id               in     number    default null,
16  p_to_position_id                 in     number    default null,
17  p_agency_code                    in     varchar2  default null,  -- to_agency_code
18  p_sf52_data_result               in ghr_pa_requests%rowtype,
19  p_called_from                    in varchar2 default null
20  )
21 is
22 
23  l_proc                            varchar2(72):= 'Post_sf52_process';
24  l_agency_code                     ghr_pa_requests.agency_code%type;
25  l_from_agency_code                ghr_pa_requests.from_agency_code%type;
26  l_from_agency_desc                ghr_pa_requests.from_agency_desc%type;
27  l_from_symbol                     ghr_pa_requests.from_office_symbol%type;
28  l_personnel_office_id             ghr_pa_requests.personnel_office_id%type;
29  l_employee_dept_or_agency         ghr_pa_requests.employee_dept_or_agency%type;
30  l_to_office_symbol                ghr_pa_requests.to_office_symbol%type;
31  l_pa_notification_id              ghr_pa_requests.pa_notification_id%type;
32  l_object_version_number           ghr_pa_requests.object_version_number%type;
33 
34  Cursor C_Sel1 is
35    select ghr_pa_notifications_s.nextval from sys.dual;
36 
37 -- Get all data pertaining to Notifications
38 
39 begin
40  hr_utility.set_location('Entering  ' || l_proc ,5);
41  l_object_version_number := p_object_version_number;
42 
43  hr_utility.set_location(l_proc ,10);
44 
45 -- Just get the notification_id  and update ghr_pa_requests
46 --
47     open C_Sel1;
48     Fetch C_Sel1 Into l_pa_notification_id;
49     Close C_Sel1;
50 
51  hr_utility.set_location('to_position_id is '||p_sf52_data_result.to_position_id ,10);
52 IF nvl(p_called_from,hr_api.g_varchar2)  = 'CORRECTION_SF52' THEN
53  ghr_par_upd.upd
54  (p_pa_request_id          	     =>  p_pa_request_id
55  ,p_object_version_number  	     =>  l_object_version_number
56  ,p_pa_notification_id             =>  l_pa_notification_id
57  ,p_to_position_id       => p_sf52_data_result.to_position_id
58  ,p_to_position_title    => p_sf52_data_result.to_position_title
59  ,p_to_position_number   => p_sf52_data_result.to_position_number
60  ,p_to_position_seq_no   => p_sf52_data_result.to_position_seq_no
61  ,p_to_pay_plan          => p_sf52_data_result.to_pay_plan
62  ,p_to_occ_code          => p_sf52_data_result.to_occ_code
63  ,p_to_step_or_rate      => p_sf52_data_result.to_step_or_rate
64  ,p_to_grade_or_level    => p_sf52_data_result.to_grade_or_level
65  ,p_to_total_salary      => p_sf52_data_result.to_total_salary
66  ,p_to_pay_basis         => p_sf52_data_result.to_pay_basis
67  ,p_to_basic_pay         => p_sf52_data_result.to_basic_pay
68  ,p_to_locality_adj      => p_sf52_data_result.to_locality_adj
69  ,p_to_adj_basic_pay     => p_sf52_data_result.to_adj_basic_pay
70  ,p_to_other_pay_amount  => p_sf52_data_result.to_other_pay_amount
71  ,p_TO_POSITION_ORG_LINE1  => p_sf52_data_result.TO_POSITION_ORG_LINE1
72  ,p_TO_POSITION_ORG_LINE2  => p_sf52_data_result.TO_POSITION_ORG_LINE2
73  ,p_TO_POSITION_ORG_LINE3  => p_sf52_data_result.TO_POSITION_ORG_LINE3
74  ,p_TO_POSITION_ORG_LINE4  => p_sf52_data_result.TO_POSITION_ORG_LINE4
75  ,p_TO_POSITION_ORG_LINE5  => p_sf52_data_result.TO_POSITION_ORG_LINE5
76  ,p_TO_POSITION_ORG_LINE6  => p_sf52_data_result.TO_POSITION_ORG_LINE6
77  ,p_VETERANS_PREFERENCE  => p_sf52_data_result.VETERANS_PREFERENCE
78  ,p_TENURE  => p_sf52_data_result.TENURE
79  ,p_VETERANS_PREF_FOR_RIF  => p_sf52_data_result.VETERANS_PREF_FOR_RIF
80  ,p_ANNUITANT_INDICATOR  => p_sf52_data_result.ANNUITANT_INDICATOR
81  ,p_ANNUITANT_INDICATOR_DESC  => p_sf52_data_result.ANNUITANT_INDICATOR_DESC
82  ,p_RETIREMENT_PLAN  => p_sf52_data_result.RETIREMENT_PLAN
83  ,p_SERVICE_COMP_DATE  => p_sf52_data_result.SERVICE_COMP_DATE
84  ,p_POSITION_OCCUPIED  => p_sf52_data_result.POSITION_OCCUPIED
85  ,p_FLSA_CATEGORY  => p_sf52_data_result.FLSA_CATEGORY
86  ,p_APPROPRIATION_CODE1  => p_sf52_data_result.APPROPRIATION_CODE1
87  ,p_APPROPRIATION_CODE2  => p_sf52_data_result.APPROPRIATION_CODE2
88  ,p_BARGAINING_UNIT_STATUS  => p_sf52_data_result.BARGAINING_UNIT_STATUS
89  ,p_CITIZENSHIP  => p_sf52_data_result.CITIZENSHIP
90  ,p_DUTY_STATION_CODE  => p_sf52_data_result.DUTY_STATION_CODE
91  ,p_duty_station_desc  => p_sf52_data_result.duty_station_desc
92  ,p_duty_station_id    => p_sf52_data_result.duty_station_id
93  ,p_duty_station_location_id  => p_sf52_data_result.duty_station_location_id
94  ,p_EDUCATION_LEVEL  => p_sf52_data_result.EDUCATION_LEVEL
95  ,p_FEGLI  => p_sf52_data_result.FEGLI
96  ,p_FUNCTIONAL_CLASS  => p_sf52_data_result.FUNCTIONAL_CLASS
97  ,p_work_schedule  => p_sf52_data_result.work_schedule
98  ,p_work_schedule_desc  => p_sf52_data_result.work_schedule_desc
99  ,p_PART_TIME_HOURS  => p_sf52_data_result.PART_TIME_HOURS
100  ,p_PAY_RATE_DETERMINANT  => p_sf52_data_result.PAY_RATE_DETERMINANT
101  --,p_SERVICE_COMP_DATE  => p_sf52_data_result.SERVICE_COMP_DATE
102 
103 -- ,p_RETIREMENT_PLAN  => p_sf52_data_result.RETIREMENT_PLAN
104  ,p_to_organization_id  => p_sf52_data_result.to_organization_id
105  ,p_year_degree_attained => p_sf52_data_result.year_degree_attained
106  ,p_academic_discipline  => p_sf52_data_result.academic_discipline
107  ,p_veterans_status      => p_sf52_data_result.veterans_status
108  ,p_supervisory_status   => p_sf52_data_result.supervisory_status
109 --start of  BUG # 6154523
110  ,p_award_amount         => p_sf52_data_result.award_amount
111  ,p_award_percentage     => p_sf52_data_result.award_percentage
112 --end of  BUG # 6154523
113   );
114 ELSE
115  ghr_par_upd.upd
116  (p_pa_request_id          	     =>  p_pa_request_id,
117   p_object_version_number  	     =>  l_object_version_number,
118   p_pa_notification_id             =>  l_pa_notification_id
119   );
120 END IF;
121 -- Get the Authentication Date for NFC processing
122 
123 ghr_utility.process_nfc_auth_date(
124 p_effective_date => p_effective_date,
125 p_pa_request_id => p_pa_request_id);
126    hr_utility.set_location(l_proc ,20);
127 
128 --
129 --
130 -- Update status of ghr_pa_requests (in pa_routing_history - Action Taken is set to 'UPDATE_HR_COMPLETE'
131 --
132 hr_utility.set_location(l_proc,40);
133 
134 ghr_sf52_api.end_sf52
135 (p_pa_request_id			=>   p_pa_request_id
136 ,p_action_taken			=>   'UPDATE_HR_COMPLETE'
137 ,p_par_object_version_number	=>   l_object_version_number
138 );
139 --
140 hr_utility.set_location('Leaving '||l_proc,45);
141 
142 EXCEPTION
143 WHEN others THEN
144   -- Reset IN OUT parameters and set OUT parameters
145    p_object_version_number := l_object_version_number;
146    raise;
147 
148 end post_sf52_process;
149 
150 --
151 -- ----------------------------------------------------------------------------
152 -- |--------------------------< Post_sf52_cancel>--------------------------|
153 -- ----------------------------------------------------------------------------
154 
155 Procedure post_sf52_cancel
156 (
157  p_pa_request_id                  in     number,
158  p_effective_date                 in     date,
159  p_object_version_number          in out NOCOPY number,
160  p_from_position_id               in     number    default null,
161  p_to_position_id                 in     number    default null,
162  p_agency_code                    in     varchar2  default null  -- to_agency_code
163  )
164 is
165 
166  l_proc                            varchar2(72):= 'Post_sf52_cancel';
167  l_agency_code                     ghr_pa_requests.agency_code%type;
168  l_from_agency_code                ghr_pa_requests.from_agency_code%type;
169  l_from_agency_desc                ghr_pa_requests.from_agency_desc%type;
170  l_from_symbol                     ghr_pa_requests.from_office_symbol%type;
171  l_personnel_office_id             ghr_pa_requests.personnel_office_id%type;
172  l_employee_dept_or_agency         ghr_pa_requests.employee_dept_or_agency%type;
173  l_to_office_symbol                ghr_pa_requests.to_office_symbol%type;
174  l_pa_notification_id              ghr_pa_requests.pa_notification_id%type;
175  l_object_version_number           ghr_pa_requests.object_version_number%type;
176  l_assignment_id                   ghr_pa_requests.employee_assignment_id%type;
177  l_person_id                       ghr_pa_requests.person_id%type;
178  l_exists                          boolean;
179 
180   Cursor C_Sel1 is
181    select ghr_pa_notifications_s.nextval from sys.dual;
182 
183  Cursor C_person is
184     select par.person_id,
185            par.employee_assignment_id
186     from   ghr_pa_requests par
187     where  par.pa_request_id = p_pa_request_id;
188 
189 
190 Cursor C_asg_posn is
191    select  asg1.assignment_id
192    from    per_all_assignments_f asg1,
193            per_all_assignments_f asg
194    where   asg.person_id   = l_person_id
195    and     asg1.person_id <> l_person_id
196    and     p_effective_date
197    between asg.effective_start_date  and asg.effective_end_date
198    and     asg.assignment_type NOT IN ('A','B')
199    and     asg1.assignment_type NOT IN ('A','B')
200    and     asg1.position_id   = asg.position_id
201    and     asg1.effective_start_date
202    between asg.effective_start_date and asg.effective_end_date;
203 
204 -- Get all data pertaining to Notifications
205 
206 begin
207  hr_utility.set_location('Entering  ' || l_proc ,5);
208  l_object_version_number := p_object_version_number;
209 
210  hr_utility.set_location(l_proc ,10);
211   --Check if the position is not already occupied
212   for per_asg_rec in c_person loop
213     l_person_id     := per_asg_rec.person_id;
214     l_assignment_id := per_asg_rec.employee_assignment_id;
215   end loop;
216   If l_assignment_id is not null then
217    l_exists := false;
218    for asg_posn_rec in c_asg_posn loop
219      l_exists := true;
220      exit;
221    end loop;
222    If l_exists  then
223      hr_utility.set_message(8301,'GHR_38620_POS_ASSIGNED');
224      hr_utility.raise_error;
225    End if;
226   End if;
227 
228 
229 -- Update ghr_pa_requests with Notification Details
230 
231     open C_Sel1;
232     Fetch C_Sel1 Into l_pa_notification_id;
233     Close C_Sel1;
234  ghr_par_upd.upd
235  (p_pa_request_id          	     =>  p_pa_request_id,
236   p_object_version_number  	     =>  l_object_version_number,
237   p_pa_notification_id             =>  l_pa_notification_id
238   );
239    hr_utility.set_location(l_proc ,20);
240 
241 
242 --
243 -- Update status of ghr_pa_requests (in pa_routing_history - Action Taken is set to 'CANCELED'
244 --
245 hr_utility.set_location(l_proc,40);
246 
247 ghr_sf52_api.end_sf52
248 (p_pa_request_id			=>   p_pa_request_id
249 ,p_action_taken			=>   'UPDATE_HR_COMPLETE'
250 ,p_par_object_version_number	=>   l_object_version_number
251 );
252 --
253 hr_utility.set_location('Leaving '||l_proc,45);
254 
255 EXCEPTION
256 WHEN others THEN
257   -- Reset IN OUT parameters and set OUT parameters
258    p_object_version_number := l_object_version_number;
259    raise;
260 
261 
262 end post_sf52_cancel;
263 
264 
265 --
266 -- ----------------------------------------------------------------------------
267 -- |--------------------------< post_sf52_future >--------------------------|
268 -- ----------------------------------------------------------------------------
269 -- With the new enhancement to support elec. authentication, the approval date and
270 -- the approver's work title will already be available in the ghr_pa_requests table
271 -- and hence nothing needs to be done in this procedure.
272 --But leaving it as it is, so that , if later we identify any special routines to be
273 -- performed as a part of FUTURE actions, can be included here.
274 
275 Procedure Post_sf52_future
276 (
277  p_pa_request_id                  in     number,
278  p_effective_date                 in     date,
279  p_object_version_number          in out NOCOPY number
280 )
281 is
282 
283  l_proc                            varchar2(72):= 'Post_sf52_future';
284 
285 begin
286 
287   null;
288 
289  End post_sf52_future;
290 
291 
292 --
293 -- ----------------------------------------------------------------------------
294 -- |--------------------------< get_Notification_Details>--------------------------|
295 -- ----------------------------------------------------------------------------
296 
297 Procedure get_notification_details
298 (
299  p_pa_request_id                  in     number,
300  p_effective_date                 in     date,
301  p_from_position_id               in     number    default null,
302  p_to_position_id                 in     number    default null,
303  p_agency_code                    in out NOCOPY varchar2, -- to_agency_code
304  p_from_agency_code               out NOCOPY varchar2,
305  p_from_agency_desc               out NOCOPY varchar2,
306  p_from_office_symbol             out NOCOPY varchar2,
307  p_personnel_office_id            out NOCOPY number,
308  p_employee_dept_or_agency        out NOCOPY varchar2,
309  p_to_office_symbol               out NOCOPY varchar2
310  )
311 is
312 
313  l_proc                   varchar2(72):= 'get_other_data';
314  l_bus_gp                 per_people_f.business_group_id%type;
315  l_from_agency_code       ghr_pa_requests.from_agency_code%type;
316  l_agency_code            ghr_pa_requests.agency_code%type;
317  l_appr_person_id         per_people_f.person_id%type;
318  l_personnel_office_id    ghr_pa_requests.personnel_office_id%type;
319  l_altered_pa_request_id  ghr_pa_requests.pa_request_id%type;
320  l_noa_code			  ghr_pa_requests.first_noa_code%type;
321  l_pos_ei_data            per_position_extra_info%rowtype;
322  -- Bug#4005843
323  l_effective_date         date;
324 
325 
326 cursor     c_bus_gp(p_position_id number) is
327   select pos.business_group_id
328   from   hr_all_positions_f pos  -- Venkat
329   where  pos.position_id = p_position_id
330   and   p_effective_date between pos.effective_start_date and
331                   pos.effective_end_date;
332 
333  cursor c_orig_par is
334    select  par.noa_family_code,
335            par.altered_pa_request_id,
336 	   par.second_noa_code                        --  Bug 3451929
337    from    ghr_pa_requests par
338    where   par.pa_request_id = p_pa_request_id;
339 
340 cursor c_par is
341    select  	par.noa_family_code,
342 		par.first_noa_code,
343 		par.second_noa_code
344    from 	ghr_pa_requests par
345    where	par.pa_request_id = p_pa_request_id;
346 
347 cursor c_par_ei(p_information_type varchar2)  is
348    select	parei.rei_information4,
349                 parei.rei_information5,                 -- Bug 3547836
350 		parei.rei_information6,                 -- Bug 3547836
351 		parei.rei_information10
352    from	ghr_pa_request_extra_info parei
353    where	parei.pa_request_id = p_pa_request_id
354 	and	parei.information_type = p_information_type;
355 
356  cursor  c_agency_det is
357    select par.from_agency_code,
358           par.from_agency_desc,
359           par.agency_code,
360           par.employee_dept_or_agency,
361           par.from_office_symbol,
362           par.to_office_symbol,
363           par.personnel_office_id
364    from   ghr_pa_requests par
365    where  par.pa_request_id = l_altered_pa_request_id;
366 
367 BEGIN
368     hr_utility.set_location('Entering:'||l_proc, 5);
369     --
370     --
371     l_agency_code := p_agency_code;  --NOCOPY Changes
372     hr_utility.set_location(l_proc, 10);
373     -- get the noa code to determine if it is an '800' or '790'.
374     -- If it is, then we need to handle the agency_code as a special case
375     -- and get it from extra information for the pa_request.
376     FOR pa_req in c_par LOOP
377         if (pa_req.noa_family_code = 'CORRECT') then
378             l_noa_code := pa_req.second_noa_code;
379         else
380             l_noa_code := pa_req.first_noa_code;
381         end if;
382     end loop;
383     hr_utility.set_location('PA Req ID : '||p_pa_request_id,10);
384     hr_utility.set_location('l_noa_code is '||l_noa_code,20);
385     -- Agency Desc
386     if nvl(p_to_position_id,hr_api.g_number) <> hr_api.g_number then
387         for bus_gp in c_bus_gp(p_to_position_id) loop
388             l_bus_gp := bus_gp.business_group_id;
389         end loop;
390         hr_utility.set_location(l_proc, 15);
391 
392         if (l_noa_code = '800') then
393             for p_parei in c_par_ei('GHR_US_PAR_CHG_DATA_ELEMENT') LOOP
394                 l_agency_code := p_parei.rei_information4;
395             end LOOP;
396         elsif (l_noa_code = '790') then
397             for p_parei in c_par_ei('GHR_US_PAR_REALIGNMENT') LOOP
398                 l_agency_code := p_parei.rei_information10;
399             end LOOP;
400             -- Bug 3451929
401             IF l_agency_code is NULL then
402                 l_agency_code  :=  ghr_api.get_position_agency_code_pos
403                                     (p_position_id        => p_to_position_id,
404                                      p_business_group_id  => l_bus_gp,
405                                      p_effective_date     => p_effective_date
406                                     );
407             END IF;
408             -- End of bug 3451929
409         else
410             l_agency_code  :=  ghr_api.get_position_agency_code_pos
411                               (p_position_id        => p_to_position_id,
412                                p_business_group_id  => l_bus_gp,
413                                p_effective_date     => p_effective_date
414                                );
415         end if;
416         p_agency_code := l_agency_code;
417         hr_utility.set_location('agency code ' || l_agency_code,1);
418         hr_utility.set_location(l_proc,20);
419 
420      -- Employee_dept_or_agency
421      if p_agency_code is not null then
422        p_employee_dept_or_agency := hr_general.decode_lookup
423                                     (p_lookup_type       => 'GHR_US_AGENCY_CODE',
424                                      p_lookup_code       => p_agency_code
425                                     );
426         hr_utility.set_location(l_proc, 30);
427      end if;
428 
429 
430      -- Personal_office_id and office_symbol
431 
432      l_personnel_office_id  := Null;
433         ghr_history_fetch.fetch_positionei
434         (p_position_id    =>   p_to_position_id,
435          p_information_type => 'GHR_US_POS_GRP1',
436          p_date_effective   =>  nvl(p_effective_date,trunc(sysdate)),
437          p_pos_ei_data       =>  l_pos_ei_data
438         );
439         l_personnel_office_id  :=  l_pos_ei_data.poei_information3;
440         p_to_office_symbol     :=  l_pos_ei_data.poei_information4;
441      l_pos_ei_data := Null;
442 
443    End if;
444 
445    -- personnel_office_id and from_office_symbol
446    if nvl(p_from_position_id,hr_api.g_number) <> hr_api.g_number then
447        -- Bug#4005843 Added the IF condition.
448         IF l_noa_code = '790' THEN
449 	   hr_utility.set_location('NOA Code is 790',20);
450 	     -- Bug#4344353 added the following code to get rid of ora-1841
451 	     IF p_effective_date = hr_api.g_date THEN
452 	        l_effective_date := trunc(sysdate) - 1;
453 	     ELSE
454 	        l_effective_date := p_effective_date - 1;
455 	     END IF;
456 	ELSE
457 	    l_effective_date := nvl(p_effective_date,trunc(sysdate));
458 	END IF;
459         ghr_history_fetch.fetch_positionei
460         (p_position_id      =>  p_from_position_id,
461          p_information_type =>  'GHR_US_POS_GRP1',
462          p_date_effective   =>  l_effective_date,
463          p_pos_ei_data      =>  l_pos_ei_data
464         );
465 	-- Bug#4005843
466         IF l_personnel_office_id IS NULL THEN
467           l_personnel_office_id  :=  l_pos_ei_data.poei_information3;
468         END IF;
469         p_from_office_symbol     :=  l_pos_ei_data.poei_information4;
470 
471      for bus_gp in c_bus_gp(p_from_position_id) loop
472        l_bus_gp := bus_gp.business_group_id;
473      end loop;
474      l_from_agency_code  :=  ghr_api.get_position_agency_code_pos
475                         (p_position_id        => p_from_position_id,
476                          p_business_group_id  => l_bus_gp,
477                          p_effective_date     => p_effective_date
478                         );
479 
480      p_from_agency_code := l_from_agency_code;
481           hr_utility.set_location(l_proc,50);
482 
483      if l_from_agency_code is not null then
484        p_from_agency_desc := hr_general.decode_lookup
485                              (p_lookup_type       => 'GHR_US_AGENCY_CODE',
486                               p_lookup_code       => l_from_agency_code
487                              );
488             hr_utility.set_location(l_proc, 55);
489      end if;
490    end if;
491       p_personnel_office_id      :=  l_personnel_office_id;
492 
493    -- If agency_code or the from_agency_code is null, which is likely to happen
494    -- only on corrections , try to get the agency code
495    -- from the original RPA.
496    If p_to_position_id is null  or p_from_position_id is null then
497      hr_utility.set_location('one of the positions is null',1);
498      for orig_par in  c_orig_par loop
499        If orig_par.noa_family_code = 'CORRECT' then
500          l_altered_pa_request_id   :=  orig_par.altered_pa_request_id;
501          for agency_det_rec in c_agency_det loop
502            If p_to_position_id is null then
503 	     -- Bug 3451929  If second noa code is 790 then agency should be taken from extra information
504 	      IF orig_par.second_noa_code = '790' THEN
505 	        FOR p_parei in c_par_ei('GHR_US_PAR_REALIGNMENT') LOOP
506 			p_agency_code := p_parei.rei_information10;
507 			p_personnel_office_id   :=  p_parei.rei_information5;           -- Bug 3547836
508 			p_to_office_symbol      :=  p_parei.rei_information6;           -- Bug 3547836
509 		END LOOP;
510 	-- Start of Bug 3547836
511 		IF p_agency_code IS NOT NULL THEN
512 		   p_employee_dept_or_agency := hr_general.decode_lookup
513                                     (p_lookup_type       => 'GHR_US_AGENCY_CODE',
514                                      p_lookup_code       => p_agency_code
515                                    );
516                 ELSE
517                    p_agency_code              :=  agency_det_rec.agency_code;
518          	   p_employee_dept_or_agency  :=  agency_det_rec.employee_dept_or_agency;
519                 END IF;
520 
521 	        IF  p_personnel_office_id IS NULL then
522                     p_personnel_office_id     :=  agency_det_rec.personnel_office_id;
523                 END IF;
524 
525                 IF  p_to_office_symbol IS NULL then
526 		    p_to_office_symbol        :=  agency_det_rec.to_office_symbol;
527                 END IF;
528         -- End of Bug 3547836
529 
530 	    ELSE
531 	        p_agency_code              :=  agency_det_rec.agency_code;
532                 p_employee_dept_or_agency  :=  agency_det_rec.employee_dept_or_agency;
533                 p_to_office_symbol         :=  agency_det_rec.to_office_symbol;
534 		--Bug#6356071 Personnel Office id assigned with the altered Pa requests
535 		    -- personnel office id only if it is NULL
536                 IF  p_personnel_office_id IS NULL then
537                     p_personnel_office_id  :=  agency_det_rec.personnel_office_id;
538                 END IF;
539 		--Bug#6356071
540             End if;
541            End if;
542            If p_from_position_id is null then
543              p_from_agency_code      :=  agency_det_rec.from_agency_code;
544              p_from_agency_desc      :=  agency_det_rec.from_agency_desc;
545              p_from_office_symbol    :=  agency_det_rec.from_office_symbol;
546            End if;
547          End Loop;
548        End if;
549      End loop;
550    End if;
551 
552 EXCEPTION
553 WHEN others THEN
554 
555     -- Reset IN OUT parameters and set OUT parameters
556  p_from_agency_code            :=NULL;
557  p_from_agency_desc            :=NULL;
558  p_from_office_symbol          :=NULL;
559  p_personnel_office_id         :=NULL;
560  p_employee_dept_or_agency     :=NULL;
561  p_to_office_symbol            :=NULL;
562  p_agency_code                 :=l_agency_code;
563  raise;
564 
565   end get_notification_details;
566 end ghr_sf52_post_update;
567