33: and nvl(noa.date_to,nvl(p_effective_date,trunc(sysdate))) ;
34: --
35: BEGIN
36: --
37: hr_utility.set_location('Entering ' || l_proc,5);
38: p_noa_code := Null;
39: p_noa_desc := Null;
40:
41: for noa_code_desc in c_noa loop
38: p_noa_code := Null;
39: p_noa_desc := Null;
40:
41: for noa_code_desc in c_noa loop
42: hr_utility.set_location( l_proc,10);
43: p_noa_code := noa_code_desc.code;
44: p_noa_desc := noa_code_desc.description;
45: end loop;
46: hr_utility.set_location('Leaving ' || l_proc,15);
42: hr_utility.set_location( l_proc,10);
43: p_noa_code := noa_code_desc.code;
44: p_noa_desc := noa_code_desc.description;
45: end loop;
46: hr_utility.set_location('Leaving ' || l_proc,15);
47:
48: EXCEPTION
49: WHEN others THEN
50: -- Reset IN OUT parameters and set OUT parameters
138: AND person_id = p_person_id;
139:
140: BEGIN
141:
142: hr_utility.set_location('Entering ' || l_proc,5);
143: p_pa_request_id := Null;
144: p_object_version_number := Null;
145: p_pa_notification_id := Null;
146: p_rpa_type := Null;
147: p_mass_action_sel_flag := Null;
148: p_mass_action_comments := Null;
149:
150: for cur_rpa_rec in cur_rpa loop
151: hr_utility.set_location( l_proc,10);
152: p_pa_request_id := cur_rpa_rec.pa_request_id;
153: p_object_version_number := cur_rpa_rec.object_version_number;
154: p_pa_notification_id := cur_rpa_rec.pa_notification_id;
155: p_rpa_type := cur_rpa_rec.rpa_type;
156: p_mass_action_sel_flag := cur_rpa_rec.mass_action_select_flag;
157: --Bug#3804067 Added code for comments.
158: p_mass_action_comments := cur_rpa_rec.mass_action_comments;
159: end loop;
160: hr_utility.set_location('pa_requst_id value ' || to_char(p_pa_request_id) ,15);
161: hr_utility.set_location('pa_notifn_id value ' || to_char(p_pa_notification_id),15);
162: hr_utility.set_location('pa_rpa_type value ' || p_rpa_type,15);
163: hr_utility.set_location('pa_ovn value ' || to_char(p_object_version_number),15);
164: hr_utility.set_location('select flag value ' || p_mass_action_sel_flag,15);
157: --Bug#3804067 Added code for comments.
158: p_mass_action_comments := cur_rpa_rec.mass_action_comments;
159: end loop;
160: hr_utility.set_location('pa_requst_id value ' || to_char(p_pa_request_id) ,15);
161: hr_utility.set_location('pa_notifn_id value ' || to_char(p_pa_notification_id),15);
162: hr_utility.set_location('pa_rpa_type value ' || p_rpa_type,15);
163: hr_utility.set_location('pa_ovn value ' || to_char(p_object_version_number),15);
164: hr_utility.set_location('select flag value ' || p_mass_action_sel_flag,15);
165: hr_utility.set_location('Leaving ' || l_proc,15);
158: p_mass_action_comments := cur_rpa_rec.mass_action_comments;
159: end loop;
160: hr_utility.set_location('pa_requst_id value ' || to_char(p_pa_request_id) ,15);
161: hr_utility.set_location('pa_notifn_id value ' || to_char(p_pa_notification_id),15);
162: hr_utility.set_location('pa_rpa_type value ' || p_rpa_type,15);
163: hr_utility.set_location('pa_ovn value ' || to_char(p_object_version_number),15);
164: hr_utility.set_location('select flag value ' || p_mass_action_sel_flag,15);
165: hr_utility.set_location('Leaving ' || l_proc,15);
166:
159: end loop;
160: hr_utility.set_location('pa_requst_id value ' || to_char(p_pa_request_id) ,15);
161: hr_utility.set_location('pa_notifn_id value ' || to_char(p_pa_notification_id),15);
162: hr_utility.set_location('pa_rpa_type value ' || p_rpa_type,15);
163: hr_utility.set_location('pa_ovn value ' || to_char(p_object_version_number),15);
164: hr_utility.set_location('select flag value ' || p_mass_action_sel_flag,15);
165: hr_utility.set_location('Leaving ' || l_proc,15);
166:
167: EXCEPTION
160: hr_utility.set_location('pa_requst_id value ' || to_char(p_pa_request_id) ,15);
161: hr_utility.set_location('pa_notifn_id value ' || to_char(p_pa_notification_id),15);
162: hr_utility.set_location('pa_rpa_type value ' || p_rpa_type,15);
163: hr_utility.set_location('pa_ovn value ' || to_char(p_object_version_number),15);
164: hr_utility.set_location('select flag value ' || p_mass_action_sel_flag,15);
165: hr_utility.set_location('Leaving ' || l_proc,15);
166:
167: EXCEPTION
168: WHEN others THEN
161: hr_utility.set_location('pa_notifn_id value ' || to_char(p_pa_notification_id),15);
162: hr_utility.set_location('pa_rpa_type value ' || p_rpa_type,15);
163: hr_utility.set_location('pa_ovn value ' || to_char(p_object_version_number),15);
164: hr_utility.set_location('select flag value ' || p_mass_action_sel_flag,15);
165: hr_utility.set_location('Leaving ' || l_proc,15);
166:
167: EXCEPTION
168: WHEN others THEN
169: -- Reset IN OUT parameters and set OUT parameters
174: p_mass_action_sel_flag :=NULL;
175: --Bug#3804067 Added mass_action_comments
176: p_mass_action_comments :=NULL;
177: p_object_version_number :=NULL;
178: hr_utility.set_location('Leaving ' || l_proc,20);
179: RAISE;
180:
181: END get_pa_request_id_ovn;
182:
238: AND information_type = l_information_type;
239:
240: BEGIN
241:
242: hr_utility.set_location('Entering ' || l_proc,5);
243: p_award_amount := Null;
244: p_award_uom := Null;
245: p_award_percentage := Null;
246: p_award_agency := Null;
251: p_appropriation_code := Null;
252:
253: IF p_rpa_type = 'TA' then
254: for cur_rpa_tmp_rec in cur_rpa_tmp loop
255: hr_utility.set_location( l_proc,10);
256: l_pa_request_id := cur_rpa_tmp_rec.pa_request_id;
257: p_award_amount := cur_rpa_tmp_rec.award_amount;
258: p_award_uom := cur_rpa_tmp_rec.award_uom;
259: p_award_percentage := cur_rpa_tmp_rec.award_percentage;
256: l_pa_request_id := cur_rpa_tmp_rec.pa_request_id;
257: p_award_amount := cur_rpa_tmp_rec.award_amount;
258: p_award_uom := cur_rpa_tmp_rec.award_uom;
259: p_award_percentage := cur_rpa_tmp_rec.award_percentage;
260: hr_utility.set_location(' Rpa type = ' || p_rpa_type ,15);
261: hr_utility.set_location(' award amt = ' || to_char(p_award_amount) ,15);
262: hr_utility.set_location(' award uom = ' || p_award_uom ,15);
263: hr_utility.set_location(' award per = ' || to_char(p_award_percentage) ,15);
264: end loop;
257: p_award_amount := cur_rpa_tmp_rec.award_amount;
258: p_award_uom := cur_rpa_tmp_rec.award_uom;
259: p_award_percentage := cur_rpa_tmp_rec.award_percentage;
260: hr_utility.set_location(' Rpa type = ' || p_rpa_type ,15);
261: hr_utility.set_location(' award amt = ' || to_char(p_award_amount) ,15);
262: hr_utility.set_location(' award uom = ' || p_award_uom ,15);
263: hr_utility.set_location(' award per = ' || to_char(p_award_percentage) ,15);
264: end loop;
265: else
258: p_award_uom := cur_rpa_tmp_rec.award_uom;
259: p_award_percentage := cur_rpa_tmp_rec.award_percentage;
260: hr_utility.set_location(' Rpa type = ' || p_rpa_type ,15);
261: hr_utility.set_location(' award amt = ' || to_char(p_award_amount) ,15);
262: hr_utility.set_location(' award uom = ' || p_award_uom ,15);
263: hr_utility.set_location(' award per = ' || to_char(p_award_percentage) ,15);
264: end loop;
265: else
266: for cur_rpa_per_rec in cur_rpa_per loop
259: p_award_percentage := cur_rpa_tmp_rec.award_percentage;
260: hr_utility.set_location(' Rpa type = ' || p_rpa_type ,15);
261: hr_utility.set_location(' award amt = ' || to_char(p_award_amount) ,15);
262: hr_utility.set_location(' award uom = ' || p_award_uom ,15);
263: hr_utility.set_location(' award per = ' || to_char(p_award_percentage) ,15);
264: end loop;
265: else
266: for cur_rpa_per_rec in cur_rpa_per loop
267: hr_utility.set_location( l_proc,10);
263: hr_utility.set_location(' award per = ' || to_char(p_award_percentage) ,15);
264: end loop;
265: else
266: for cur_rpa_per_rec in cur_rpa_per loop
267: hr_utility.set_location( l_proc,10);
268: l_pa_request_id := cur_rpa_per_rec.pa_request_id;
269: p_award_amount := cur_rpa_per_rec.award_amount;
270: p_award_uom := cur_rpa_per_rec.award_uom;
271: p_award_percentage := cur_rpa_per_rec.award_percentage;
268: l_pa_request_id := cur_rpa_per_rec.pa_request_id;
269: p_award_amount := cur_rpa_per_rec.award_amount;
270: p_award_uom := cur_rpa_per_rec.award_uom;
271: p_award_percentage := cur_rpa_per_rec.award_percentage;
272: hr_utility.set_location(' Rpa type = ' || p_rpa_type ,15);
273: hr_utility.set_location(' Person_id = ' || to_char(p_person_id) ,15);
274: hr_utility.set_location(' award amt = ' || to_char(p_award_amount) ,15);
275: hr_utility.set_location(' award uom = ' || p_award_uom ,15);
276: hr_utility.set_location(' award per = ' || to_char(p_award_percentage) ,15);
269: p_award_amount := cur_rpa_per_rec.award_amount;
270: p_award_uom := cur_rpa_per_rec.award_uom;
271: p_award_percentage := cur_rpa_per_rec.award_percentage;
272: hr_utility.set_location(' Rpa type = ' || p_rpa_type ,15);
273: hr_utility.set_location(' Person_id = ' || to_char(p_person_id) ,15);
274: hr_utility.set_location(' award amt = ' || to_char(p_award_amount) ,15);
275: hr_utility.set_location(' award uom = ' || p_award_uom ,15);
276: hr_utility.set_location(' award per = ' || to_char(p_award_percentage) ,15);
277: end loop;
270: p_award_uom := cur_rpa_per_rec.award_uom;
271: p_award_percentage := cur_rpa_per_rec.award_percentage;
272: hr_utility.set_location(' Rpa type = ' || p_rpa_type ,15);
273: hr_utility.set_location(' Person_id = ' || to_char(p_person_id) ,15);
274: hr_utility.set_location(' award amt = ' || to_char(p_award_amount) ,15);
275: hr_utility.set_location(' award uom = ' || p_award_uom ,15);
276: hr_utility.set_location(' award per = ' || to_char(p_award_percentage) ,15);
277: end loop;
278: END IF;
271: p_award_percentage := cur_rpa_per_rec.award_percentage;
272: hr_utility.set_location(' Rpa type = ' || p_rpa_type ,15);
273: hr_utility.set_location(' Person_id = ' || to_char(p_person_id) ,15);
274: hr_utility.set_location(' award amt = ' || to_char(p_award_amount) ,15);
275: hr_utility.set_location(' award uom = ' || p_award_uom ,15);
276: hr_utility.set_location(' award per = ' || to_char(p_award_percentage) ,15);
277: end loop;
278: END IF;
279:
272: hr_utility.set_location(' Rpa type = ' || p_rpa_type ,15);
273: hr_utility.set_location(' Person_id = ' || to_char(p_person_id) ,15);
274: hr_utility.set_location(' award amt = ' || to_char(p_award_amount) ,15);
275: hr_utility.set_location(' award uom = ' || p_award_uom ,15);
276: hr_utility.set_location(' award per = ' || to_char(p_award_percentage) ,15);
277: end loop;
278: END IF;
279:
280: hr_utility.set_location(' Rpa ID = ' ||l_pa_request_id ,15);
276: hr_utility.set_location(' award per = ' || to_char(p_award_percentage) ,15);
277: end loop;
278: END IF;
279:
280: hr_utility.set_location(' Rpa ID = ' ||l_pa_request_id ,15);
281:
282: for cur_award_ei_rec in cur_award_ei(l_pa_request_id) loop
283: hr_utility.set_location( l_proc,20);
284: p_award_agency := cur_award_ei_rec.award_agency;
279:
280: hr_utility.set_location(' Rpa ID = ' ||l_pa_request_id ,15);
281:
282: for cur_award_ei_rec in cur_award_ei(l_pa_request_id) loop
283: hr_utility.set_location( l_proc,20);
284: p_award_agency := cur_award_ei_rec.award_agency;
285: p_award_type := cur_award_ei_rec.award_type;
286: p_group_award := cur_award_ei_rec.group_award;
287: p_tangible_benefit_dollars := cur_award_ei_rec.tangible_benefit_dollars;
286: p_group_award := cur_award_ei_rec.group_award;
287: p_tangible_benefit_dollars := cur_award_ei_rec.tangible_benefit_dollars;
288: p_date_award_earned := cur_award_ei_rec.date_award_earned;
289: p_appropriation_code := cur_award_ei_rec.appropriation_code;
290: hr_utility.set_location(' award agency = ' || p_award_agency ,15);
291: hr_utility.set_location(' award type = ' || p_award_type ,15);
292: hr_utility.set_location(' group award = ' || p_group_award ,15);
293: hr_utility.set_location(' tbd = ' || p_tangible_benefit_dollars ,15);
294: hr_utility.set_location(' date award = ' || p_date_award_earned ,15);
287: p_tangible_benefit_dollars := cur_award_ei_rec.tangible_benefit_dollars;
288: p_date_award_earned := cur_award_ei_rec.date_award_earned;
289: p_appropriation_code := cur_award_ei_rec.appropriation_code;
290: hr_utility.set_location(' award agency = ' || p_award_agency ,15);
291: hr_utility.set_location(' award type = ' || p_award_type ,15);
292: hr_utility.set_location(' group award = ' || p_group_award ,15);
293: hr_utility.set_location(' tbd = ' || p_tangible_benefit_dollars ,15);
294: hr_utility.set_location(' date award = ' || p_date_award_earned ,15);
295: hr_utility.set_location(' appr Code = ' || p_appropriation_code ,15);
288: p_date_award_earned := cur_award_ei_rec.date_award_earned;
289: p_appropriation_code := cur_award_ei_rec.appropriation_code;
290: hr_utility.set_location(' award agency = ' || p_award_agency ,15);
291: hr_utility.set_location(' award type = ' || p_award_type ,15);
292: hr_utility.set_location(' group award = ' || p_group_award ,15);
293: hr_utility.set_location(' tbd = ' || p_tangible_benefit_dollars ,15);
294: hr_utility.set_location(' date award = ' || p_date_award_earned ,15);
295: hr_utility.set_location(' appr Code = ' || p_appropriation_code ,15);
296: end loop;
289: p_appropriation_code := cur_award_ei_rec.appropriation_code;
290: hr_utility.set_location(' award agency = ' || p_award_agency ,15);
291: hr_utility.set_location(' award type = ' || p_award_type ,15);
292: hr_utility.set_location(' group award = ' || p_group_award ,15);
293: hr_utility.set_location(' tbd = ' || p_tangible_benefit_dollars ,15);
294: hr_utility.set_location(' date award = ' || p_date_award_earned ,15);
295: hr_utility.set_location(' appr Code = ' || p_appropriation_code ,15);
296: end loop;
297:
290: hr_utility.set_location(' award agency = ' || p_award_agency ,15);
291: hr_utility.set_location(' award type = ' || p_award_type ,15);
292: hr_utility.set_location(' group award = ' || p_group_award ,15);
293: hr_utility.set_location(' tbd = ' || p_tangible_benefit_dollars ,15);
294: hr_utility.set_location(' date award = ' || p_date_award_earned ,15);
295: hr_utility.set_location(' appr Code = ' || p_appropriation_code ,15);
296: end loop;
297:
298: hr_utility.set_location('Leaving ' || l_proc,35);
291: hr_utility.set_location(' award type = ' || p_award_type ,15);
292: hr_utility.set_location(' group award = ' || p_group_award ,15);
293: hr_utility.set_location(' tbd = ' || p_tangible_benefit_dollars ,15);
294: hr_utility.set_location(' date award = ' || p_date_award_earned ,15);
295: hr_utility.set_location(' appr Code = ' || p_appropriation_code ,15);
296: end loop;
297:
298: hr_utility.set_location('Leaving ' || l_proc,35);
299:
294: hr_utility.set_location(' date award = ' || p_date_award_earned ,15);
295: hr_utility.set_location(' appr Code = ' || p_appropriation_code ,15);
296: end loop;
297:
298: hr_utility.set_location('Leaving ' || l_proc,35);
299:
300: EXCEPTION
301: WHEN others THEN
302: -- Reset IN OUT parameters and set OUT parameters
310: p_tangible_benefit_dollars := Null;
311: p_date_award_earned := Null;
312: p_appropriation_code := Null;
313:
314: hr_utility.set_location('Leaving ' || l_proc,40);
315: RAISE;
316:
317: END get_award_details;
318:
356: AND person_id is null;
357:
358: BEGIN
359:
360: hr_utility.set_location('Entering ' || l_proc,5);
361: p_first_lac1_record := Null;
362: p_first_lac2_record := Null;
363:
364: for cur_rpa_lac_rec in cur_rpa_lac loop
361: p_first_lac1_record := Null;
362: p_first_lac2_record := Null;
363:
364: for cur_rpa_lac_rec in cur_rpa_lac loop
365: hr_utility.set_location( l_proc,10);
366: p_first_lac1_record.first_action_la_code1 := cur_rpa_lac_rec.first_action_la_code1;
367: p_first_lac1_record.first_action_la_desc1 := cur_rpa_lac_rec.first_action_la_desc1;
368: p_first_lac1_record.first_lac1_information1 := cur_rpa_lac_rec.first_lac1_information1;
369: p_first_lac1_record.first_lac1_information2 := cur_rpa_lac_rec.first_lac1_information2;
379: p_first_lac2_record.first_lac2_information4 := cur_rpa_lac_rec.first_lac2_information4;
380: p_first_lac2_record.first_lac2_information5 := cur_rpa_lac_rec.first_lac2_information5;
381: end loop;
382:
383: hr_utility.set_location('Leaving ' || l_proc,20);
384:
385: EXCEPTION
386: WHEN others THEN
387: -- Reset IN OUT parameters and set OUT parameters
388:
389: p_first_lac1_record := Null;
390: p_first_lac2_record := Null;
391:
392: hr_utility.set_location('Leaving ' || l_proc,25);
393: RAISE;
394:
395: END get_award_lac;
396:
437: AND information_type = l_information_type;
438:
439: BEGIN
440:
441: hr_utility.set_location('Entering ' || l_proc,5);
442: p_award_amount := Null;
443: p_award_uom := Null;
444: p_award_percentage := Null;
445: p_award_agency := Null;
449: p_date_award_earned := Null;
450: p_appropriation_code := Null;
451:
452: for cur_rpa_shadow_rec in cur_rpa_shadow loop
453: hr_utility.set_location( l_proc,10);
454: p_award_amount := cur_rpa_shadow_rec.award_amount;
455: p_award_uom := cur_rpa_shadow_rec.award_uom;
456: p_award_percentage := cur_rpa_shadow_rec.award_percentage;
457: hr_utility.set_location(' pa req id = ' || to_char(p_pa_request_id) ,10);
453: hr_utility.set_location( l_proc,10);
454: p_award_amount := cur_rpa_shadow_rec.award_amount;
455: p_award_uom := cur_rpa_shadow_rec.award_uom;
456: p_award_percentage := cur_rpa_shadow_rec.award_percentage;
457: hr_utility.set_location(' pa req id = ' || to_char(p_pa_request_id) ,10);
458: hr_utility.set_location(' award amt = ' || to_char(p_award_amount) ,10);
459: hr_utility.set_location(' award uom = ' || p_award_uom ,10);
460: hr_utility.set_location(' award per = ' || to_char(p_award_percentage) ,10);
461: end loop;
454: p_award_amount := cur_rpa_shadow_rec.award_amount;
455: p_award_uom := cur_rpa_shadow_rec.award_uom;
456: p_award_percentage := cur_rpa_shadow_rec.award_percentage;
457: hr_utility.set_location(' pa req id = ' || to_char(p_pa_request_id) ,10);
458: hr_utility.set_location(' award amt = ' || to_char(p_award_amount) ,10);
459: hr_utility.set_location(' award uom = ' || p_award_uom ,10);
460: hr_utility.set_location(' award per = ' || to_char(p_award_percentage) ,10);
461: end loop;
462:
455: p_award_uom := cur_rpa_shadow_rec.award_uom;
456: p_award_percentage := cur_rpa_shadow_rec.award_percentage;
457: hr_utility.set_location(' pa req id = ' || to_char(p_pa_request_id) ,10);
458: hr_utility.set_location(' award amt = ' || to_char(p_award_amount) ,10);
459: hr_utility.set_location(' award uom = ' || p_award_uom ,10);
460: hr_utility.set_location(' award per = ' || to_char(p_award_percentage) ,10);
461: end loop;
462:
463: for cur_award_ei_shadow_rec in cur_award_ei_shadow loop
456: p_award_percentage := cur_rpa_shadow_rec.award_percentage;
457: hr_utility.set_location(' pa req id = ' || to_char(p_pa_request_id) ,10);
458: hr_utility.set_location(' award amt = ' || to_char(p_award_amount) ,10);
459: hr_utility.set_location(' award uom = ' || p_award_uom ,10);
460: hr_utility.set_location(' award per = ' || to_char(p_award_percentage) ,10);
461: end loop;
462:
463: for cur_award_ei_shadow_rec in cur_award_ei_shadow loop
464: hr_utility.set_location( l_proc,20);
460: hr_utility.set_location(' award per = ' || to_char(p_award_percentage) ,10);
461: end loop;
462:
463: for cur_award_ei_shadow_rec in cur_award_ei_shadow loop
464: hr_utility.set_location( l_proc,20);
465: p_award_agency := cur_award_ei_shadow_rec.award_agency;
466: p_award_type := cur_award_ei_shadow_rec.award_type;
467: p_group_award := cur_award_ei_shadow_rec.group_award;
468: p_tangible_benefit_dollars := cur_award_ei_shadow_rec.tangible_benefit_dollars;
467: p_group_award := cur_award_ei_shadow_rec.group_award;
468: p_tangible_benefit_dollars := cur_award_ei_shadow_rec.tangible_benefit_dollars;
469: p_date_award_earned := cur_award_ei_shadow_rec.date_award_earned;
470: p_appropriation_code := cur_award_ei_shadow_rec.appropriation_code;
471: hr_utility.set_location(' award agency = ' || p_award_agency ,20);
472: hr_utility.set_location(' award type = ' || p_award_type ,20);
473: hr_utility.set_location(' group award = ' || p_group_award ,20);
474: hr_utility.set_location(' tbd = ' || p_tangible_benefit_dollars ,20);
475: hr_utility.set_location(' date award = ' || p_date_award_earned ,20);
468: p_tangible_benefit_dollars := cur_award_ei_shadow_rec.tangible_benefit_dollars;
469: p_date_award_earned := cur_award_ei_shadow_rec.date_award_earned;
470: p_appropriation_code := cur_award_ei_shadow_rec.appropriation_code;
471: hr_utility.set_location(' award agency = ' || p_award_agency ,20);
472: hr_utility.set_location(' award type = ' || p_award_type ,20);
473: hr_utility.set_location(' group award = ' || p_group_award ,20);
474: hr_utility.set_location(' tbd = ' || p_tangible_benefit_dollars ,20);
475: hr_utility.set_location(' date award = ' || p_date_award_earned ,20);
476: hr_utility.set_location(' Appr Code = ' || p_appropriation_code ,20);
469: p_date_award_earned := cur_award_ei_shadow_rec.date_award_earned;
470: p_appropriation_code := cur_award_ei_shadow_rec.appropriation_code;
471: hr_utility.set_location(' award agency = ' || p_award_agency ,20);
472: hr_utility.set_location(' award type = ' || p_award_type ,20);
473: hr_utility.set_location(' group award = ' || p_group_award ,20);
474: hr_utility.set_location(' tbd = ' || p_tangible_benefit_dollars ,20);
475: hr_utility.set_location(' date award = ' || p_date_award_earned ,20);
476: hr_utility.set_location(' Appr Code = ' || p_appropriation_code ,20);
477: end loop;
470: p_appropriation_code := cur_award_ei_shadow_rec.appropriation_code;
471: hr_utility.set_location(' award agency = ' || p_award_agency ,20);
472: hr_utility.set_location(' award type = ' || p_award_type ,20);
473: hr_utility.set_location(' group award = ' || p_group_award ,20);
474: hr_utility.set_location(' tbd = ' || p_tangible_benefit_dollars ,20);
475: hr_utility.set_location(' date award = ' || p_date_award_earned ,20);
476: hr_utility.set_location(' Appr Code = ' || p_appropriation_code ,20);
477: end loop;
478:
471: hr_utility.set_location(' award agency = ' || p_award_agency ,20);
472: hr_utility.set_location(' award type = ' || p_award_type ,20);
473: hr_utility.set_location(' group award = ' || p_group_award ,20);
474: hr_utility.set_location(' tbd = ' || p_tangible_benefit_dollars ,20);
475: hr_utility.set_location(' date award = ' || p_date_award_earned ,20);
476: hr_utility.set_location(' Appr Code = ' || p_appropriation_code ,20);
477: end loop;
478:
479: hr_utility.set_location('Leaving ' || l_proc,35);
472: hr_utility.set_location(' award type = ' || p_award_type ,20);
473: hr_utility.set_location(' group award = ' || p_group_award ,20);
474: hr_utility.set_location(' tbd = ' || p_tangible_benefit_dollars ,20);
475: hr_utility.set_location(' date award = ' || p_date_award_earned ,20);
476: hr_utility.set_location(' Appr Code = ' || p_appropriation_code ,20);
477: end loop;
478:
479: hr_utility.set_location('Leaving ' || l_proc,35);
480:
475: hr_utility.set_location(' date award = ' || p_date_award_earned ,20);
476: hr_utility.set_location(' Appr Code = ' || p_appropriation_code ,20);
477: end loop;
478:
479: hr_utility.set_location('Leaving ' || l_proc,35);
480:
481: EXCEPTION
482: WHEN others THEN
483: -- Reset IN OUT parameters and set OUT parameters
491: p_tangible_benefit_dollars := Null;
492: p_date_award_earned := Null;
493: p_appropriation_code := Null;
494:
495: hr_utility.set_location('Leaving ' || l_proc,40);
496: RAISE;
497:
498: END get_award_details_shadow;
499:
535:
536:
537: BEGIN
538:
539: hr_utility.set_location('Entering ' || l_proc,5);
540: l_effective_date := Null;
541:
542: for cur_ma_rec in cur_ma loop
543: hr_utility.set_location( l_proc,10);
539: hr_utility.set_location('Entering ' || l_proc,5);
540: l_effective_date := Null;
541:
542: for cur_ma_rec in cur_ma loop
543: hr_utility.set_location( l_proc,10);
544: l_effective_date := cur_ma_rec.effective_date;
545: end loop;
546:
547: open cur_get_seq;
550:
551: l_prog_name := 'GHR_MAW_PKG-' || l_prog_name;
552: g_log_name := l_prog_name;
553:
554: hr_utility.set_location( l_proc,20);
555: upd_elig_flag_bef_selection
556: ( p_mass_award_id => p_mass_award_id,
557: p_rpa_type => l_rpa_type,
558: p_effective_date => l_effective_date);
557: p_rpa_type => l_rpa_type,
558: p_effective_date => l_effective_date);
559:
560:
561: hr_utility.set_location( l_proc,30);
562: ghr_mass_awards_elig.get_eligible_employees
563: ( p_mass_award_id => p_mass_award_id,
564: p_action_type => p_action_type,
565: p_errbuf => l_errbuf,
576: else
577: l_status_flag := 'E';
578: end if;
579:
580: hr_utility.set_location( l_proc,40);
581: del_elig_flag_aft_selection
582: ( p_mass_award_id => p_mass_award_id,
583: p_rpa_type => l_rpa_type,
584: p_effective_date => l_effective_date);
582: ( p_mass_award_id => p_mass_award_id,
583: p_rpa_type => l_rpa_type,
584: p_effective_date => l_effective_date);
585:
586: hr_utility.set_location( 'Updating ghr_mass_awards table ...' ||l_proc,50);
587:
588: IF p_action_type = 'FINAL' THEN
589: update ghr_mass_awards set status_flag = l_status_flag
590: where mass_award_id = p_mass_award_id;
589: update ghr_mass_awards set status_flag = l_status_flag
590: where mass_award_id = p_mass_award_id;
591: END IF;
592:
593: hr_utility.set_location('Leaving ' || l_proc,60);
594:
595: EXCEPTION
596: WHEN others THEN
597: -- Reset IN OUT parameters and set OUT parameters
599: p_errbuf := NULL;
600: p_status := NULL;
601: p_retcode := NULL;
602: p_maxcheck := NULL;
603: hr_utility.set_location('Leaving ' || l_proc,65);
604: RAISE;
605:
606: END main_awards;
607:
618: l_cntr number;
619:
620: begin
621:
622: hr_utility.set_location('Entering ' || l_proc,5);
623:
624: select count(*) into l_cntr
625: from ghr_pa_requests
626: where mass_action_id = p_mass_award_id
626: where mass_action_id = p_mass_award_id
627: and rpa_type = p_rpa_type
628: and pa_notification_id is null;
629:
630: hr_utility.set_location('No of rows :' || to_char(l_cntr) || l_proc,10);
631:
632: update ghr_pa_requests set
633: mass_action_eligible_flag = 'N'
634: where mass_action_id = p_mass_award_id
636: and pa_notification_id is null;
637:
638: --- commit; --- Form will commit
639:
640: hr_utility.set_location('Leaving ' || l_proc,15);
641:
642: end;
643:
644: PROCEDURE del_elig_flag_aft_selection
661: AND mass_action_eligible_flag = 'N'
662: AND pa_notification_id is null;
663:
664: BEGIN
665: hr_utility.set_location('Entering ' || l_proc,5);
666: FOR cur_rpa_del_rec in cur_rpa_del
667: LOOP
668: hr_utility.set_location( l_proc,10);
669: l_pa_request_id := cur_rpa_del_rec.pa_request_id;
664: BEGIN
665: hr_utility.set_location('Entering ' || l_proc,5);
666: FOR cur_rpa_del_rec in cur_rpa_del
667: LOOP
668: hr_utility.set_location( l_proc,10);
669: l_pa_request_id := cur_rpa_del_rec.pa_request_id;
670:
671: -- Delete the shadow extra information
672: hr_utility.set_location( l_proc,15);
668: hr_utility.set_location( l_proc,10);
669: l_pa_request_id := cur_rpa_del_rec.pa_request_id;
670:
671: -- Delete the shadow extra information
672: hr_utility.set_location( l_proc,15);
673: delete from ghr_pa_request_ei_shadow
674: where pa_request_id = l_pa_request_id;
675:
676: -- Delete the shadow information
673: delete from ghr_pa_request_ei_shadow
674: where pa_request_id = l_pa_request_id;
675:
676: -- Delete the shadow information
677: hr_utility.set_location( l_proc,20);
678: delete from ghr_pa_request_shadow
679: where pa_request_id = l_pa_request_id;
680:
681: -- Delete the database extra information for the given person_id
678: delete from ghr_pa_request_shadow
679: where pa_request_id = l_pa_request_id;
680:
681: -- Delete the database extra information for the given person_id
682: hr_utility.set_location( l_proc,25);
683: delete from ghr_pa_request_extra_info
684: where pa_request_id = l_pa_request_id;
685:
686: -- Delete the database RPA award routing history record for the given person_id
683: delete from ghr_pa_request_extra_info
684: where pa_request_id = l_pa_request_id;
685:
686: -- Delete the database RPA award routing history record for the given person_id
687: hr_utility.set_location( l_proc,35);
688: delete from ghr_pa_routing_history
689: where pa_request_id = l_pa_request_id;
690:
691: -- Delete the database RPA award record for the given person_id
688: delete from ghr_pa_routing_history
689: where pa_request_id = l_pa_request_id;
690:
691: -- Delete the database RPA award record for the given person_id
692: hr_utility.set_location( l_proc,35);
693: delete from ghr_pa_requests
694: where pa_request_id = l_pa_request_id;
695: END LOOP;
696: END del_elig_flag_aft_selection;
792: l_approval_date := sysdate;
793: l_1_approval_status := 'APPROVE';
794: end if;
795:
796: hr_utility.set_location('Entering ...' || l_proc,120);
797: hr_utility.set_location('Noa_family_code value ' || l_pa_request_rec.noa_family_code,120);
798: get_pa_request_id_ovn
799: ( p_mass_award_id => p_mass_award_id,
800: p_effective_date => p_effective_date,
793: l_1_approval_status := 'APPROVE';
794: end if;
795:
796: hr_utility.set_location('Entering ...' || l_proc,120);
797: hr_utility.set_location('Noa_family_code value ' || l_pa_request_rec.noa_family_code,120);
798: get_pa_request_id_ovn
799: ( p_mass_award_id => p_mass_award_id,
800: p_effective_date => p_effective_date,
801: p_person_id => p_person_id,
814:
815: IF l_pa_notification_id is null and l_rpa_type = 'A' then
816: IF l_pa_request_id is null THEN
817: -- Create SF52
818: hr_utility.set_location(l_proc,130);
819: begin
820: l_log_text := p_action_type || '-Error while creating the PA Request Rec. ';
821: g_log_text := p_action_type || '-Error while creating the PA Request Rec. ';
822: hr_utility.set_location('In MAR PA Bef Crt'||l_pa_request_rec.award_amount ,36);
818: hr_utility.set_location(l_proc,130);
819: begin
820: l_log_text := p_action_type || '-Error while creating the PA Request Rec. ';
821: g_log_text := p_action_type || '-Error while creating the PA Request Rec. ';
822: hr_utility.set_location('In MAR PA Bef Crt'||l_pa_request_rec.award_amount ,36);
823: -- Bug 3376761
824: -- check to see if award amount is within 25% of annual basic pay
825: -- other wise pass an error message in comments column.
826: -- Begin Bug# 4748927
853:
854: IF l_pa_request_rec.award_percentage IS NOT NULL THEN
855: l_pa_request_rec.award_amount := l_dummy;
856: END IF;
857: hr_utility.set_location('l_pa_request_rec.award_amount' || l_pa_request_rec.award_amount,111);
858: hr_utility.set_location('l_pa_request_rec.award_salary' || l_pa_request_rec.award_salary,111);
859:
860: -- End Bug# 4748927
861: /*
854: IF l_pa_request_rec.award_percentage IS NOT NULL THEN
855: l_pa_request_rec.award_amount := l_dummy;
856: END IF;
857: hr_utility.set_location('l_pa_request_rec.award_amount' || l_pa_request_rec.award_amount,111);
858: hr_utility.set_location('l_pa_request_rec.award_salary' || l_pa_request_rec.award_salary,111);
859:
860: -- End Bug# 4748927
861: /*
862: IF l_pa_request_rec.award_amount > ROUND(l_award_salary * 0.25 , 0) THEN
1077: -- End of Bug 3376761
1078: );
1079: exception
1080: WHEN OTHERS THEN
1081: hr_utility.set_location( ' Sql error : '||sqlerrm(sqlcode) ,132);
1082: hr_utility.set_location(l_proc,132);
1083: l_log_text := substr(l_log_text || ' Sql error : '|| sqlerrm(sqlcode),1,2000);
1084: g_log_text := substr(l_log_text || ' Sql error : '|| sqlerrm(sqlcode),1,2000);
1085: raise ma_rpaerror;
1078: );
1079: exception
1080: WHEN OTHERS THEN
1081: hr_utility.set_location( ' Sql error : '||sqlerrm(sqlcode) ,132);
1082: hr_utility.set_location(l_proc,132);
1083: l_log_text := substr(l_log_text || ' Sql error : '|| sqlerrm(sqlcode),1,2000);
1084: g_log_text := substr(l_log_text || ' Sql error : '|| sqlerrm(sqlcode),1,2000);
1085: raise ma_rpaerror;
1086: end;
1084: g_log_text := substr(l_log_text || ' Sql error : '|| sqlerrm(sqlcode),1,2000);
1085: raise ma_rpaerror;
1086: end;
1087:
1088: hr_utility.set_location(l_proc,135);
1089: begin
1090: l_log_text := p_action_type || '-Error After creating the RPA before upd ';
1091: g_log_text := p_action_type || '-Error After creating the RPA before upd ';
1092: ghr_par_upd.upd(
1097: p_personnel_office_id => l_pa_request_rec.personnel_office_id,
1098: p_from_office_symbol => l_pa_request_rec.from_office_symbol);
1099: exception
1100: WHEN OTHERS THEN
1101: hr_utility.set_location(l_proc,136);
1102: l_log_text := l_log_text || ' Sql error : '||sqlerrm(sqlcode);
1103: g_log_text := l_log_text || ' Sql error : '||sqlerrm(sqlcode);
1104: raise ma_rpaerror;
1105: end;
1103: g_log_text := l_log_text || ' Sql error : '||sqlerrm(sqlcode);
1104: raise ma_rpaerror;
1105: end;
1106:
1107: hr_utility.set_location(l_proc,138);
1108: create_shadow_row (p_rpa_data => l_pa_request_rec);
1109: hr_utility.set_location(' Shadow created ...'|| l_proc,138);
1110:
1111: ----Initialize the RPA extra information
1105: end;
1106:
1107: hr_utility.set_location(l_proc,138);
1108: create_shadow_row (p_rpa_data => l_pa_request_rec);
1109: hr_utility.set_location(' Shadow created ...'|| l_proc,138);
1110:
1111: ----Initialize the RPA extra information
1112: FOR cur_rpa_ei_rec in cur_rpa_ei(l_pa_request_rec.pa_request_id)
1113: LOOP
1110:
1111: ----Initialize the RPA extra information
1112: FOR cur_rpa_ei_rec in cur_rpa_ei(l_pa_request_rec.pa_request_id)
1113: LOOP
1114: hr_utility.set_location( l_proc,10);
1115: l_ei_pa_request_extra_id := cur_rpa_ei_rec.pa_request_extra_info_id;
1116: l_ei_ovn := cur_rpa_ei_rec.object_version_number;
1117: l_ei_dae := cur_rpa_ei_rec.rei_information9;
1118: exit;
1135:
1136: ----Initialize the RPA extra information Shadow.
1137: FOR cur_rpa_ei_shadow_rec in cur_rpa_ei_shadow(l_pa_request_rec.pa_request_id)
1138: LOOP
1139: hr_utility.set_location( l_proc,10);
1140: l_ei_shadow_id := cur_rpa_ei_shadow_rec.pa_request_extra_info_id;
1141: exit;
1142: END LOOP;
1143:
1153: END IF;
1154:
1155: ----End Initialize.
1156:
1157: hr_utility.set_location(l_proc,140);
1158: refresh_award_details
1159: (
1160: p_mass_award_id => p_mass_award_id,
1161: p_rpa_type => p_rpa_type,
1169: l_pa_request_rec.award_amount := Null;
1170: l_pa_request_rec.award_uom := Null;
1171: l_pa_request_rec.award_percentage := Null;
1172:
1173: hr_utility.set_location(l_proc,141);
1174: ----- Get Award details from the template and also extra information
1175: get_award_details
1176: ( p_mass_award_id => p_mass_award_id,
1177: p_rpa_type => 'TA',
1188: p_appropriation_code => l_dummy);
1189:
1190: l_bt_award_amount := l_t_award_amount;
1191: l_bt_award_percentage := l_t_award_percentage;
1192: hr_utility.set_location('l_bt_award_amount' || l_bt_award_amount,142);
1193: hr_utility.set_location(l_proc,142);
1194: ----- Get Award details from the database
1195: get_award_details
1196: ( p_mass_award_id => p_mass_award_id,
1189:
1190: l_bt_award_amount := l_t_award_amount;
1191: l_bt_award_percentage := l_t_award_percentage;
1192: hr_utility.set_location('l_bt_award_amount' || l_bt_award_amount,142);
1193: hr_utility.set_location(l_proc,142);
1194: ----- Get Award details from the database
1195: get_award_details
1196: ( p_mass_award_id => p_mass_award_id,
1197: p_rpa_type => p_rpa_type,
1208: p_appropriation_code => l_dummy);
1209:
1210: l_bd_award_amount := l_d_award_amount;
1211: l_bd_award_percentage := l_d_award_percentage;
1212: hr_utility.set_location('l_bd_award_amount' || l_bd_award_amount,142);
1213: hr_utility.set_location(l_proc,143);
1214: ----- Get Award details from the shadow
1215: get_award_details_shadow
1216: ( p_pa_request_id => l_pa_request_id,
1209:
1210: l_bd_award_amount := l_d_award_amount;
1211: l_bd_award_percentage := l_d_award_percentage;
1212: hr_utility.set_location('l_bd_award_amount' || l_bd_award_amount,142);
1213: hr_utility.set_location(l_proc,143);
1214: ----- Get Award details from the shadow
1215: get_award_details_shadow
1216: ( p_pa_request_id => l_pa_request_id,
1217: p_award_amount => l_s_award_amount,
1225: p_appropriation_code => l_dummy );
1226:
1227: l_bs_award_amount := l_s_award_amount;
1228: l_bs_award_percentage := l_s_award_percentage;
1229: hr_utility.set_location('l_bs_award_amount' || l_bs_award_amount,142);
1230:
1231: hr_utility.set_location(l_proc,144);
1232: set_ei
1233: (p_shadow => l_s_award_amount,
1227: l_bs_award_amount := l_s_award_amount;
1228: l_bs_award_percentage := l_s_award_percentage;
1229: hr_utility.set_location('l_bs_award_amount' || l_bs_award_amount,142);
1230:
1231: hr_utility.set_location(l_proc,144);
1232: set_ei
1233: (p_shadow => l_s_award_amount,
1234: p_template => l_t_award_amount,
1235: p_person => l_d_award_amount);
1263: l_pa_request_rec.award_amount := l_d_award_amount;
1264: l_pa_request_rec.award_uom := l_d_award_uom;
1265: l_pa_request_rec.award_percentage := l_d_award_percentage;
1266:
1267: hr_utility.set_location('l_pa_request_rec.award_amount' || l_pa_request_rec.award_amount,111);
1268: hr_utility.set_location('l_pa_request_rec.award_salary' || l_pa_request_rec.award_salary,111);
1269: -- End Sundar Test
1270:
1271: -- Bug 3376761
1264: l_pa_request_rec.award_uom := l_d_award_uom;
1265: l_pa_request_rec.award_percentage := l_d_award_percentage;
1266:
1267: hr_utility.set_location('l_pa_request_rec.award_amount' || l_pa_request_rec.award_amount,111);
1268: hr_utility.set_location('l_pa_request_rec.award_salary' || l_pa_request_rec.award_salary,111);
1269: -- End Sundar Test
1270:
1271: -- Bug 3376761
1272: -- check to see if the award amount is within 25% of basic pay
1278: l_pa_request_rec.mass_action_comments := l_pa_request_rec.mass_action_comments || '; Award percentage cannot be greater than 25% of the basic annual pay.' ;
1279: END IF;
1280: END IF;
1281: */
1282: hr_utility.set_location('In MAR PA Bef Upd'||l_pa_request_rec.award_amount ,35);
1283: --Pradeep Commented the above and added the below for bug 3934195
1284: l_error_flag := FALSE;
1285: check_award_amount (p_noa_code => l_pa_request_rec.first_noa_code,
1286: p_effective_date => l_pa_request_rec.effective_date,
1302: END IF;
1303:
1304: --END OF Bug 3376761 .
1305:
1306: hr_utility.set_location(l_proc || 'pa_request_id ' || to_char(l_pa_request_id),150);
1307: hr_utility.set_location(l_proc || 'Object version ' || to_char(l_object_version_number),151);
1308:
1309: begin
1310: l_log_text := 'Error while Updating the PA Request Rec. ';
1303:
1304: --END OF Bug 3376761 .
1305:
1306: hr_utility.set_location(l_proc || 'pa_request_id ' || to_char(l_pa_request_id),150);
1307: hr_utility.set_location(l_proc || 'Object version ' || to_char(l_object_version_number),151);
1308:
1309: begin
1310: l_log_text := 'Error while Updating the PA Request Rec. ';
1311: g_log_text := 'Error while Updating the PA Request Rec. ';
1522: ,p_mass_action_select_flag => NVL(l_mass_action_select_flag,'Y')
1523: );
1524: exception
1525: WHEN OTHERS THEN
1526: hr_utility.set_location(l_proc,153);
1527: l_log_text := l_log_text || ' Sql error : '||sqlerrm(sqlcode);
1528: g_log_text := l_log_text || ' Sql error : '||sqlerrm(sqlcode);
1529: raise ma_rpaerror;
1530: end;
1528: g_log_text := l_log_text || ' Sql error : '||sqlerrm(sqlcode);
1529: raise ma_rpaerror;
1530: end;
1531:
1532: hr_utility.set_location('u ovn ' || to_char(l_u_prh_object_version_number),154);
1533: hr_utility.set_location('prh id ' || to_char(l_i_pa_routing_history_id),154);
1534: hr_utility.set_location('prh ovn ' || to_char(l_i_prh_object_version_number),154);
1535: hr_utility.set_location('par upd ' || to_char(l_object_version_number),154);
1536: hr_utility.set_location('par upd ' || to_char(l_pa_request_id),155);
1529: raise ma_rpaerror;
1530: end;
1531:
1532: hr_utility.set_location('u ovn ' || to_char(l_u_prh_object_version_number),154);
1533: hr_utility.set_location('prh id ' || to_char(l_i_pa_routing_history_id),154);
1534: hr_utility.set_location('prh ovn ' || to_char(l_i_prh_object_version_number),154);
1535: hr_utility.set_location('par upd ' || to_char(l_object_version_number),154);
1536: hr_utility.set_location('par upd ' || to_char(l_pa_request_id),155);
1537: hr_utility.set_location(l_proc,156);
1530: end;
1531:
1532: hr_utility.set_location('u ovn ' || to_char(l_u_prh_object_version_number),154);
1533: hr_utility.set_location('prh id ' || to_char(l_i_pa_routing_history_id),154);
1534: hr_utility.set_location('prh ovn ' || to_char(l_i_prh_object_version_number),154);
1535: hr_utility.set_location('par upd ' || to_char(l_object_version_number),154);
1536: hr_utility.set_location('par upd ' || to_char(l_pa_request_id),155);
1537: hr_utility.set_location(l_proc,156);
1538: begin
1531:
1532: hr_utility.set_location('u ovn ' || to_char(l_u_prh_object_version_number),154);
1533: hr_utility.set_location('prh id ' || to_char(l_i_pa_routing_history_id),154);
1534: hr_utility.set_location('prh ovn ' || to_char(l_i_prh_object_version_number),154);
1535: hr_utility.set_location('par upd ' || to_char(l_object_version_number),154);
1536: hr_utility.set_location('par upd ' || to_char(l_pa_request_id),155);
1537: hr_utility.set_location(l_proc,156);
1538: begin
1539: l_log_text := p_action_type || '-Error After updating the RPA before upd ';
1532: hr_utility.set_location('u ovn ' || to_char(l_u_prh_object_version_number),154);
1533: hr_utility.set_location('prh id ' || to_char(l_i_pa_routing_history_id),154);
1534: hr_utility.set_location('prh ovn ' || to_char(l_i_prh_object_version_number),154);
1535: hr_utility.set_location('par upd ' || to_char(l_object_version_number),154);
1536: hr_utility.set_location('par upd ' || to_char(l_pa_request_id),155);
1537: hr_utility.set_location(l_proc,156);
1538: begin
1539: l_log_text := p_action_type || '-Error After updating the RPA before upd ';
1540: g_log_text := p_action_type || '-Error After updating the RPA before upd ';
1533: hr_utility.set_location('prh id ' || to_char(l_i_pa_routing_history_id),154);
1534: hr_utility.set_location('prh ovn ' || to_char(l_i_prh_object_version_number),154);
1535: hr_utility.set_location('par upd ' || to_char(l_object_version_number),154);
1536: hr_utility.set_location('par upd ' || to_char(l_pa_request_id),155);
1537: hr_utility.set_location(l_proc,156);
1538: begin
1539: l_log_text := p_action_type || '-Error After updating the RPA before upd ';
1540: g_log_text := p_action_type || '-Error After updating the RPA before upd ';
1541: ghr_par_upd.upd(
1546: p_personnel_office_id => l_pa_request_rec.personnel_office_id,
1547: p_from_office_symbol => l_pa_request_rec.from_office_symbol);
1548: exception
1549: WHEN OTHERS THEN
1550: hr_utility.set_location(l_proc,153);
1551: l_log_text := l_log_text || ' Sql error : '||sqlerrm(sqlcode);
1552: g_log_text := l_log_text || ' Sql error : '||sqlerrm(sqlcode);
1553: raise ma_rpaerror;
1554: end;
1552: g_log_text := l_log_text || ' Sql error : '||sqlerrm(sqlcode);
1553: raise ma_rpaerror;
1554: end;
1555:
1556: hr_utility.set_location(l_proc,158);
1557: l_pa_request_rec.award_amount := l_s_award_amount;
1558: l_pa_request_rec.award_uom := l_s_award_uom;
1559: l_pa_request_rec.award_percentage := l_s_award_percentage;
1560:
1562: l_pa_request_rec.object_version_number := l_object_version_number;
1563: update_shadow_row (p_rpa_data => l_pa_request_rec,
1564: p_result => l_result);
1565: if l_result then
1566: hr_utility.set_location('Shadow updated ..'|| l_proc,158);
1567: else
1568: hr_utility.set_location('Shadow not found..'|| l_proc,158);
1569: end if;
1570:
1564: p_result => l_result);
1565: if l_result then
1566: hr_utility.set_location('Shadow updated ..'|| l_proc,158);
1567: else
1568: hr_utility.set_location('Shadow not found..'|| l_proc,158);
1569: end if;
1570:
1571: hr_utility.set_location(l_proc,160);
1572: refresh_award_details
1567: else
1568: hr_utility.set_location('Shadow not found..'|| l_proc,158);
1569: end if;
1570:
1571: hr_utility.set_location(l_proc,160);
1572: refresh_award_details
1573: (
1574: p_mass_award_id => p_mass_award_id,
1575: p_rpa_type => p_rpa_type,
1579:
1580: p_pa_request_rec := l_pa_request_rec;
1581: p_log_text := l_log_text;
1582:
1583: hr_utility.set_location('Leaving ...' || l_proc,161);
1584:
1585: END IF; ------ Creation of SF52 and Update of SF52
1586: END IF;
1587: exception when ma_rpaerror then
1590: raise;
1591: when others then
1592: p_pa_request_rec := l_pa_request_rec;
1593: p_log_text := l_log_text;
1594: hr_utility.set_location('Error in '||l_proc||' Err is '||sqlerrm(sqlcode),162);
1595: l_log_text := p_action_type || '-Error raised in marpa process others ';
1596: l_log_text := l_log_text || ' Sql error : '||sqlerrm(sqlcode);
1597: raise ma_rpaerror;
1598: end;
1730: loop
1731: l_maw_name := cur_maw_name_rec.name;
1732: end loop;
1733:
1734: hr_utility.set_location('Entering ' || l_proc,5);
1735: l_savepoint := 'P';
1736: savepoint build_rpa_save_preview;
1737: hr_utility.set_location('savepoint build_rpa_save_preview ' || l_proc,5);
1738: -- The following would be null while creating rpa.
1733:
1734: hr_utility.set_location('Entering ' || l_proc,5);
1735: l_savepoint := 'P';
1736: savepoint build_rpa_save_preview;
1737: hr_utility.set_location('savepoint build_rpa_save_preview ' || l_proc,5);
1738: -- The following would be null while creating rpa.
1739:
1740: l_pa_request_rec.additional_info_person_id := NULL;
1741: l_pa_request_rec.additional_info_tel_number := NULL;
1769: ---l_pa_request_rec.to_adj_basic_pay := 0;
1770: ---l_pa_request_rec.to_basic_pay := 0; --APP-37206 CPDF Edit #370.25.2
1771: ---l_pa_request_rec.to_total_salary := 0;
1772:
1773: hr_utility.set_location(l_proc,10);
1774: l_pa_request_rec.mass_action_id := p_mass_award_id;
1775: l_pa_request_rec.rpa_type := p_rpa_type;
1776: l_pa_request_rec.effective_date := p_effective_date;
1777: l_pa_request_rec.person_id := p_person_id;
1785: l_pa_request_rec.noa_family_code :=
1786: ghr_pa_requests_pkg.get_noa_pm_family
1787: (p_nature_of_action_id => l_pa_request_rec.first_noa_id);
1788:
1789: hr_utility.set_location(l_proc,15);
1790: get_noa_code_desc
1791: ( p_noa_id => l_pa_request_rec.first_noa_id,
1792: p_effective_date => p_effective_date,
1793: p_noa_code => l_pa_request_rec.first_noa_code,
1792: p_effective_date => p_effective_date,
1793: p_noa_code => l_pa_request_rec.first_noa_code,
1794: p_noa_desc => l_pa_request_rec.first_noa_desc );
1795:
1796: hr_utility.set_location(l_proc,20);
1797: ghr_pa_requests_pkg.get_person_details
1798: (p_person_id => p_person_id
1799: ,p_effective_date => p_effective_date
1800: ,p_national_identifier => l_pa_request_rec.employee_national_identifier
1803: ,p_first_name => l_pa_request_rec.employee_first_name
1804: ,p_middle_names => l_pa_request_rec.employee_middle_names
1805: );
1806:
1807: hr_utility.set_location(l_proc,25);
1808: ghr_api.sf52_from_data_elements
1809: (p_person_id => p_person_id
1810: ,p_assignment_id => l_pa_request_rec.employee_assignment_id
1811: ,p_effective_date => p_effective_date
1856: -- FWFA Changes
1857: ,p_work_schedule => l_pa_request_rec.work_schedule
1858: );
1859:
1860: hr_utility.set_location(l_proc,30);
1861: hr_utility.set_location('Bef Get Aw Det'||l_pa_request_rec.award_amount ,31);
1862: ----- Get Award details from the template and also extra information
1863: get_award_details
1864: ( p_mass_award_id => p_mass_award_id,
1857: ,p_work_schedule => l_pa_request_rec.work_schedule
1858: );
1859:
1860: hr_utility.set_location(l_proc,30);
1861: hr_utility.set_location('Bef Get Aw Det'||l_pa_request_rec.award_amount ,31);
1862: ----- Get Award details from the template and also extra information
1863: get_award_details
1864: ( p_mass_award_id => p_mass_award_id,
1865: p_rpa_type => 'TA',
1879: l_pa_request_rec.award_uom := l_t_award_uom;
1880: l_pa_request_rec.award_percentage := l_t_award_percentage;
1881: l_bt_award_amount := l_t_award_amount;
1882: l_bt_award_percentage := l_t_award_percentage;
1883: hr_utility.set_location('Aft Get Aw Det'||l_pa_request_rec.award_amount ,31);
1884: -- Begin Bug# 4748927
1885: /* l_from_basic_pay_pa :=
1886: ghr_pay_calc.convert_amount(l_pa_request_rec.from_basic_pay
1887: ,l_pa_request_rec.from_pay_basis,'PA');*/
1885: /* l_from_basic_pay_pa :=
1886: ghr_pay_calc.convert_amount(l_pa_request_rec.from_basic_pay
1887: ,l_pa_request_rec.from_pay_basis,'PA');*/
1888: --End Bug# 4748927
1889: hr_utility.set_location(l_proc,35);
1890: l_pa_request_rec.duty_station_location_id := l_duty_station_location_id;
1891:
1892: ghr_pa_requests_pkg.get_SF52_loc_ddf_details
1893: (p_location_id => l_duty_station_location_id
1917: l_pa_request_rec.to_position_org_line4 := l_pa_request_rec.from_position_org_line4;
1918: l_pa_request_rec.to_position_org_line5 := l_pa_request_rec.from_position_org_line5;
1919: l_pa_request_rec.to_position_org_line6 := l_pa_request_rec.from_position_org_line6;
1920:
1921: hr_utility.set_location(l_proc,40);
1922: ghr_pa_requests_pkg.get_sf52_pos_ddf_details
1923: (p_position_id => p_position_id
1924: ,p_date_Effective => l_pa_request_rec.effective_date
1925: ,p_flsa_category => l_pa_request_rec.flsa_category
1934: ,p_office_symbol => l_pa_request_rec.from_office_symbol
1935: ,p_part_time_hours => l_dummy
1936: );
1937:
1938: hr_utility.set_location('POI ID ' || l_pa_request_rec.personnel_office_id ,42);
1939: hr_utility.set_location('From Pos ID ' || to_char(l_pa_request_rec.from_position_id) ,42);
1940: hr_utility.set_location('To Pos ID ' || to_char(l_pa_request_rec.to_position_id) ,42);
1941: hr_utility.set_location('Office Symbol ' || l_pa_request_rec.from_office_symbol ,42);
1942:
1935: ,p_part_time_hours => l_dummy
1936: );
1937:
1938: hr_utility.set_location('POI ID ' || l_pa_request_rec.personnel_office_id ,42);
1939: hr_utility.set_location('From Pos ID ' || to_char(l_pa_request_rec.from_position_id) ,42);
1940: hr_utility.set_location('To Pos ID ' || to_char(l_pa_request_rec.to_position_id) ,42);
1941: hr_utility.set_location('Office Symbol ' || l_pa_request_rec.from_office_symbol ,42);
1942:
1943: hr_utility.set_location(l_proc,45);
1936: );
1937:
1938: hr_utility.set_location('POI ID ' || l_pa_request_rec.personnel_office_id ,42);
1939: hr_utility.set_location('From Pos ID ' || to_char(l_pa_request_rec.from_position_id) ,42);
1940: hr_utility.set_location('To Pos ID ' || to_char(l_pa_request_rec.to_position_id) ,42);
1941: hr_utility.set_location('Office Symbol ' || l_pa_request_rec.from_office_symbol ,42);
1942:
1943: hr_utility.set_location(l_proc,45);
1944: get_business_group
1937:
1938: hr_utility.set_location('POI ID ' || l_pa_request_rec.personnel_office_id ,42);
1939: hr_utility.set_location('From Pos ID ' || to_char(l_pa_request_rec.from_position_id) ,42);
1940: hr_utility.set_location('To Pos ID ' || to_char(l_pa_request_rec.to_position_id) ,42);
1941: hr_utility.set_location('Office Symbol ' || l_pa_request_rec.from_office_symbol ,42);
1942:
1943: hr_utility.set_location(l_proc,45);
1944: get_business_group
1945: (p_person_id => p_person_id
1939: hr_utility.set_location('From Pos ID ' || to_char(l_pa_request_rec.from_position_id) ,42);
1940: hr_utility.set_location('To Pos ID ' || to_char(l_pa_request_rec.to_position_id) ,42);
1941: hr_utility.set_location('Office Symbol ' || l_pa_request_rec.from_office_symbol ,42);
1942:
1943: hr_utility.set_location(l_proc,45);
1944: get_business_group
1945: (p_person_id => p_person_id
1946: ,p_effective_date => p_effective_date
1947: ,p_business_group_id => l_business_group_id
1946: ,p_effective_date => p_effective_date
1947: ,p_business_group_id => l_business_group_id
1948: );
1949:
1950: hr_utility.set_location(l_proc,50);
1951: l_pa_request_rec.agency_code := ghr_api.get_position_agency_code_pos
1952: (p_position_id => p_position_id
1953: ,p_business_group_id => l_business_group_id
1954: ,p_effective_date => p_effective_date
1952: (p_position_id => p_position_id
1953: ,p_business_group_id => l_business_group_id
1954: ,p_effective_date => p_effective_date
1955: );
1956: hr_utility.set_location('Agency Code ' || l_pa_request_rec.agency_code ,52);
1957:
1958: l_pa_request_rec.employee_dept_or_agency := ghr_pa_requests_pkg.get_lookup_meaning
1959: (800
1960: ,'GHR_US_AGENCY_CODE'
1960: ,'GHR_US_AGENCY_CODE'
1961: ,l_pa_request_rec.agency_code
1962: );
1963:
1964: hr_utility.set_location('employee_dept_or_agency ' || l_pa_request_rec.employee_dept_or_agency ,52);
1965: hr_utility.set_location('Noa_family_code value ' || l_pa_request_rec.noa_family_code,52);
1966: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,52);
1967: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),52);
1968: hr_utility.set_location('l_pa_request_rec.award_amount '||l_pa_request_rec.award_amount ,52);
1961: ,l_pa_request_rec.agency_code
1962: );
1963:
1964: hr_utility.set_location('employee_dept_or_agency ' || l_pa_request_rec.employee_dept_or_agency ,52);
1965: hr_utility.set_location('Noa_family_code value ' || l_pa_request_rec.noa_family_code,52);
1966: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,52);
1967: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),52);
1968: hr_utility.set_location('l_pa_request_rec.award_amount '||l_pa_request_rec.award_amount ,52);
1969:
1962: );
1963:
1964: hr_utility.set_location('employee_dept_or_agency ' || l_pa_request_rec.employee_dept_or_agency ,52);
1965: hr_utility.set_location('Noa_family_code value ' || l_pa_request_rec.noa_family_code,52);
1966: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,52);
1967: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),52);
1968: hr_utility.set_location('l_pa_request_rec.award_amount '||l_pa_request_rec.award_amount ,52);
1969:
1970: -- Bug 5041967 Sundar
1963:
1964: hr_utility.set_location('employee_dept_or_agency ' || l_pa_request_rec.employee_dept_or_agency ,52);
1965: hr_utility.set_location('Noa_family_code value ' || l_pa_request_rec.noa_family_code,52);
1966: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,52);
1967: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),52);
1968: hr_utility.set_location('l_pa_request_rec.award_amount '||l_pa_request_rec.award_amount ,52);
1969:
1970: -- Bug 5041967 Sundar
1971: ghr_history_fetch.fetch_asgei(
1964: hr_utility.set_location('employee_dept_or_agency ' || l_pa_request_rec.employee_dept_or_agency ,52);
1965: hr_utility.set_location('Noa_family_code value ' || l_pa_request_rec.noa_family_code,52);
1966: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,52);
1967: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),52);
1968: hr_utility.set_location('l_pa_request_rec.award_amount '||l_pa_request_rec.award_amount ,52);
1969:
1970: -- Bug 5041967 Sundar
1971: ghr_history_fetch.fetch_asgei(
1972: p_assignment_id => l_pa_request_rec.employee_assignment_id,
1993: -- End Bug 5041967 Sundar
1994:
1995: -----------Created marpa_process procedure Call
1996: begin
1997: hr_utility.set_location('Bef MAR PA '||l_pa_request_rec.award_amount ,32);
1998: marpa_process
1999: (
2000: p_mass_award_id => p_mass_award_id
2001: ,p_action_type => p_action_type
2006: ,p_log_text => l_log_text
2007: ,p_maxcheck => p_maxcheck
2008: );
2009:
2010: hr_utility.set_location('After MAR PA '||l_pa_request_rec.award_amount ,33);
2011: commit;
2012: hr_utility.set_location('commit to have eligibility build_rpa_save_preview ' ,162);
2013: l_savepoint := 'P';
2014: savepoint build_rpa_save_preview;
2008: );
2009:
2010: hr_utility.set_location('After MAR PA '||l_pa_request_rec.award_amount ,33);
2011: commit;
2012: hr_utility.set_location('commit to have eligibility build_rpa_save_preview ' ,162);
2013: l_savepoint := 'P';
2014: savepoint build_rpa_save_preview;
2015: hr_utility.set_location('savepoint build_rpa_save_preview - After Preview ' ,162);
2016: exception when ma_rpaerror then raise;
2011: commit;
2012: hr_utility.set_location('commit to have eligibility build_rpa_save_preview ' ,162);
2013: l_savepoint := 'P';
2014: savepoint build_rpa_save_preview;
2015: hr_utility.set_location('savepoint build_rpa_save_preview - After Preview ' ,162);
2016: exception when ma_rpaerror then raise;
2017: when others then raise ma_rpaerror;
2018: end;
2019:
2020: -------commit;
2021: ---------------------Starting Final
2022: ---Recent Modification - Group box id must be commited in order to get call work flow
2023:
2024: hr_utility.set_location(l_proc,163);
2025: -- Employee Data
2026:
2027: get_pa_request_id_ovn
2028: ( p_mass_award_id => p_mass_award_id,
2039: ------ Modified in 115.9
2040: l_pa_request_rec.mass_action_comments := l_mass_action_comments;
2041: l_pa_request_rec.object_version_number := l_object_version_number;
2042: l_pa_request_rec.pa_request_id := l_pa_request_id;
2043: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,165);
2044: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),165);
2045:
2046: -------
2047: if l_rpa_type is null then l_rpa_type := 'A'; end if;
2040: l_pa_request_rec.mass_action_comments := l_mass_action_comments;
2041: l_pa_request_rec.object_version_number := l_object_version_number;
2042: l_pa_request_rec.pa_request_id := l_pa_request_id;
2043: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,165);
2044: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),165);
2045:
2046: -------
2047: if l_rpa_type is null then l_rpa_type := 'A'; end if;
2048:
2056: l_1_prh_object_version_number := l_i_prh_object_version_number;
2057: end if;
2058:
2059: begin
2060: hr_utility.set_location('Getting Group Box ' || l_proc,170);
2061:
2062: ghr_mass_actions_pkg.get_personnel_off_groupbox
2063: (p_position_id => p_position_id
2064: ,p_effective_date => p_effective_date
2063: (p_position_id => p_position_id
2064: ,p_effective_date => p_effective_date
2065: ,p_groupbox_id => l_groupbox_id
2066: ,p_routing_group_id => l_routing_group_id );
2067: hr_utility.set_location('Getting Group Box Success ' || l_proc,170);
2068: hr_utility.set_location('Routing Group Id ' || to_char(l_routing_group_id),170);
2069: hr_utility.set_location('Group Box Id' || to_char(l_groupbox_id),170);
2070:
2071: exception
2064: ,p_effective_date => p_effective_date
2065: ,p_groupbox_id => l_groupbox_id
2066: ,p_routing_group_id => l_routing_group_id );
2067: hr_utility.set_location('Getting Group Box Success ' || l_proc,170);
2068: hr_utility.set_location('Routing Group Id ' || to_char(l_routing_group_id),170);
2069: hr_utility.set_location('Group Box Id' || to_char(l_groupbox_id),170);
2070:
2071: exception
2072: WHEN OTHERS THEN
2065: ,p_groupbox_id => l_groupbox_id
2066: ,p_routing_group_id => l_routing_group_id );
2067: hr_utility.set_location('Getting Group Box Success ' || l_proc,170);
2068: hr_utility.set_location('Routing Group Id ' || to_char(l_routing_group_id),170);
2069: hr_utility.set_location('Group Box Id' || to_char(l_groupbox_id),170);
2070:
2071: exception
2072: WHEN OTHERS THEN
2073: hr_utility.set_location('Getting Group Box Failure ' || l_proc,170);
2069: hr_utility.set_location('Group Box Id' || to_char(l_groupbox_id),170);
2070:
2071: exception
2072: WHEN OTHERS THEN
2073: hr_utility.set_location('Getting Group Box Failure ' || l_proc,170);
2074: l_log_text := 'Error in POI groupbox ' ||' Sql error : '||sqlerrm(sqlcode);
2075:
2076: -- Call ghr_par_upd.upd here
2077:
2084: l_prh_object_version_number := routing_history_id.object_version_number;
2085: exit;
2086: end loop;
2087:
2088: hr_utility.set_location('Updating prh ' || l_proc,175);
2089: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,175);
2090: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),175);
2091: hr_utility.set_location('RHVN ' || to_char(l_prh_object_version_number),176);
2092: hr_utility.set_location('RHID ' || to_char(l_pa_routing_history_id),177);
2085: exit;
2086: end loop;
2087:
2088: hr_utility.set_location('Updating prh ' || l_proc,175);
2089: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,175);
2090: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),175);
2091: hr_utility.set_location('RHVN ' || to_char(l_prh_object_version_number),176);
2092: hr_utility.set_location('RHID ' || to_char(l_pa_routing_history_id),177);
2093:
2086: end loop;
2087:
2088: hr_utility.set_location('Updating prh ' || l_proc,175);
2089: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,175);
2090: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),175);
2091: hr_utility.set_location('RHVN ' || to_char(l_prh_object_version_number),176);
2092: hr_utility.set_location('RHID ' || to_char(l_pa_routing_history_id),177);
2093:
2094: ghr_prh_upd.upd(
2087:
2088: hr_utility.set_location('Updating prh ' || l_proc,175);
2089: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,175);
2090: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),175);
2091: hr_utility.set_location('RHVN ' || to_char(l_prh_object_version_number),176);
2092: hr_utility.set_location('RHID ' || to_char(l_pa_routing_history_id),177);
2093:
2094: ghr_prh_upd.upd(
2095: p_pa_routing_history_id => l_pa_routing_history_id,
2088: hr_utility.set_location('Updating prh ' || l_proc,175);
2089: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,175);
2090: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),175);
2091: hr_utility.set_location('RHVN ' || to_char(l_prh_object_version_number),176);
2092: hr_utility.set_location('RHID ' || to_char(l_pa_routing_history_id),177);
2093:
2094: ghr_prh_upd.upd(
2095: p_pa_routing_history_id => l_pa_routing_history_id,
2096: p_groupbox_id => l_groupbox_id,
2095: p_pa_routing_history_id => l_pa_routing_history_id,
2096: p_groupbox_id => l_groupbox_id,
2097: p_object_version_number => l_prh_object_version_number);
2098:
2099: hr_utility.set_location('Updating par ' || l_proc,180);
2100:
2101: -- Call ghr_par_upd.upd here
2102: ghr_par_upd.upd(
2103: p_pa_request_id => l_pa_request_rec.pa_request_id,
2113: ,l_pa_request_rec.from_pay_basis,'PA');
2114:
2115:
2116: commit;
2117: hr_utility.set_location('commit(GB) build_rpa_save_preview ' || l_proc,52);
2118: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,52);
2119: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),52);
2120:
2121: ---- Recent Modification End;
2114:
2115:
2116: commit;
2117: hr_utility.set_location('commit(GB) build_rpa_save_preview ' || l_proc,52);
2118: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,52);
2119: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),52);
2120:
2121: ---- Recent Modification End;
2122:
2115:
2116: commit;
2117: hr_utility.set_location('commit(GB) build_rpa_save_preview ' || l_proc,52);
2118: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,52);
2119: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),52);
2120:
2121: ---- Recent Modification End;
2122:
2123: l_savepoint := 'F';
2121: ---- Recent Modification End;
2122:
2123: l_savepoint := 'F';
2124: savepoint build_rpa_save_final;
2125: hr_utility.set_location('savepoint build_rpa_save_final ' || l_proc,52);
2126: hr_utility.set_location(l_proc,52);
2127: hr_utility.set_location('Bef Check Award Amt'||l_pa_request_rec.award_amount ,34);
2128: /*
2129: IF l_pa_request_rec.award_amount > ROUND(l_from_basic_pay_pa * 0.25 , 0) THEN
2122:
2123: l_savepoint := 'F';
2124: savepoint build_rpa_save_final;
2125: hr_utility.set_location('savepoint build_rpa_save_final ' || l_proc,52);
2126: hr_utility.set_location(l_proc,52);
2127: hr_utility.set_location('Bef Check Award Amt'||l_pa_request_rec.award_amount ,34);
2128: /*
2129: IF l_pa_request_rec.award_amount > ROUND(l_from_basic_pay_pa * 0.25 , 0) THEN
2130: RAISE ma_awdpererr;
2123: l_savepoint := 'F';
2124: savepoint build_rpa_save_final;
2125: hr_utility.set_location('savepoint build_rpa_save_final ' || l_proc,52);
2126: hr_utility.set_location(l_proc,52);
2127: hr_utility.set_location('Bef Check Award Amt'||l_pa_request_rec.award_amount ,34);
2128: /*
2129: IF l_pa_request_rec.award_amount > ROUND(l_from_basic_pay_pa * 0.25 , 0) THEN
2130: RAISE ma_awdpererr;
2131: END IF ;
2203: );
2204:
2205: l_pa_request_rec.first_noa_desc := l_first_noa_desc;
2206: -- Bug#3648118 Changes completed.
2207: hr_utility.set_location(l_proc,55);
2208: ghr_pa_requests_pkg.get_SF52_person_ddf_details
2209: (p_person_id => l_pa_request_rec.person_id,
2210: p_date_effective => l_pa_request_rec.effective_date,
2211: p_citizenship => l_pa_request_rec.citizenship,
2215: p_scd_leave => l_scd_leave
2216: );
2217:
2218: -- populate service comp date
2219: hr_utility.set_location(l_proc,60);
2220: l_pa_request_rec.service_comp_date := fnd_date.canonical_to_date(l_scd_leave);
2221:
2222: -- get education details
2223: hr_utility.set_location(l_proc,70);
2219: hr_utility.set_location(l_proc,60);
2220: l_pa_request_rec.service_comp_date := fnd_date.canonical_to_date(l_scd_leave);
2221:
2222: -- get education details
2223: hr_utility.set_location(l_proc,70);
2224: ghr_api.return_education_Details
2225: (p_person_id => l_pa_request_rec.person_id,
2226: p_effective_date => l_pa_request_rec.effective_date,
2227: p_education_level => l_pa_request_rec.education_level,
2228: p_academic_discipline => l_pa_request_rec.academic_discipline,
2229: p_year_degree_attained => l_pa_request_rec.year_degree_attained
2230: );
2231:
2232: hr_utility.set_location(l_proc,80);
2233: ghr_pa_requests_pkg.get_SF52_asg_ddf_details
2234: (p_assignment_id => l_pa_request_rec.employee_assignment_id
2235: ,p_date_effective => l_pa_request_rec.effective_date
2236: ,p_tenure => l_pa_request_rec.tenure
2255: );
2256:
2257: -- get fegli,retirement_plan
2258:
2259: hr_utility.set_location(l_proc,90);
2260: ghr_api.retrieve_element_entry_value
2261: (p_element_name => 'FEGLI'
2262: ,p_input_value_name => 'FEGLI'
2263: ,p_assignment_id => l_pa_request_rec.employee_assignment_id
2273: );
2274:
2275:
2276: --retirement_plan
2277: hr_utility.set_location(l_proc,100);
2278: ghr_api.retrieve_element_entry_value
2279: (p_element_name => 'Retirement Plan'
2280: ,p_input_value_name => 'Plan'
2281: ,p_assignment_id => l_pa_request_rec.employee_assignment_id
2290: ,l_pa_request_rec.retirement_plan
2291: );
2292:
2293: -- Descriptions for the codes passed in
2294: hr_utility.set_location(l_proc,110);
2295: ghr_mass_actions_pkg.get_personnel_officer_name
2296: (p_personnel_office_id => l_pa_request_rec.personnel_office_id,
2297: p_person_full_name => l_personnel_officer_name,
2298: p_approving_off_work_title => l_approving_off_work_title);
2305: l_pa_request_rec.request_number := l_pa_request_num_prefix ||
2306: to_char(l_pa_request_rec.pa_request_id);
2307:
2308:
2309: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,110);
2310: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),110);
2311: -----------Created marpa_process procedure Call
2312: ---- To print NPA correctly ..bug..2356373.
2313:
2306: to_char(l_pa_request_rec.pa_request_id);
2307:
2308:
2309: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,110);
2310: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),110);
2311: -----------Created marpa_process procedure Call
2312: ---- To print NPA correctly ..bug..2356373.
2313:
2314: l_pa_request_rec.sf50_approving_ofcl_full_name := l_personnel_officer_name;
2331: exception when ma_rpaerror then raise;
2332: when others then raise ma_rpaerror;
2333: end;
2334:
2335: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,165);
2336: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),165);
2337:
2338: hr_utility.set_location('Creating Remarks ' || l_proc,165);
2339: create_remarks
2332: when others then raise ma_rpaerror;
2333: end;
2334:
2335: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,165);
2336: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),165);
2337:
2338: hr_utility.set_location('Creating Remarks ' || l_proc,165);
2339: create_remarks
2340: (p_mass_award_id => p_mass_award_id
2334:
2335: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,165);
2336: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),165);
2337:
2338: hr_utility.set_location('Creating Remarks ' || l_proc,165);
2339: create_remarks
2340: (p_mass_award_id => p_mass_award_id
2341: ,p_rpa_type => 'TA'
2342: ,p_effective_date => p_effective_date
2341: ,p_rpa_type => 'TA'
2342: ,p_effective_date => p_effective_date
2343: ,p_pa_request_id => l_pa_request_rec.pa_request_id
2344: );
2345: hr_utility.set_location('Creating Remarks Over ' || l_proc,165);
2346:
2347:
2348: if p_effective_date > sysdate then
2349: l_rpa_action := 'FUTURE_ACTION';
2350: else
2351: l_rpa_action := 'UPDATE_HR';
2352: end if;
2353:
2354: hr_utility.set_location('Action before last ghr_par_upd.upd ' || l_rpa_action || ' ' || l_proc,175);
2355:
2356: ---Bug 2356373
2357: ghr_par_upd.upd
2358: (p_pa_request_id => l_pa_request_rec.pa_request_id,
2365: p_sf50_approving_ofcl_work_tit => l_approving_off_work_title
2366: );
2367: ---Bug 2356373 End
2368:
2369: hr_utility.set_location('Action after last ghr_par_upd.upd ' || l_rpa_action || ' ' || l_proc,175);
2370:
2371: hr_utility.set_location('Action before ' || l_rpa_action || ' ' || l_proc,185);
2372: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,185);
2373: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),185);
2367: ---Bug 2356373 End
2368:
2369: hr_utility.set_location('Action after last ghr_par_upd.upd ' || l_rpa_action || ' ' || l_proc,175);
2370:
2371: hr_utility.set_location('Action before ' || l_rpa_action || ' ' || l_proc,185);
2372: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,185);
2373: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),185);
2374:
2375: hr_utility.set_location('employee_dept_or_agency ' || l_pa_request_rec.employee_dept_or_agency ,185);
2368:
2369: hr_utility.set_location('Action after last ghr_par_upd.upd ' || l_rpa_action || ' ' || l_proc,175);
2370:
2371: hr_utility.set_location('Action before ' || l_rpa_action || ' ' || l_proc,185);
2372: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,185);
2373: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),185);
2374:
2375: hr_utility.set_location('employee_dept_or_agency ' || l_pa_request_rec.employee_dept_or_agency ,185);
2376: hr_utility.set_location('POI ID ' || l_pa_request_rec.personnel_office_id ,185);
2369: hr_utility.set_location('Action after last ghr_par_upd.upd ' || l_rpa_action || ' ' || l_proc,175);
2370:
2371: hr_utility.set_location('Action before ' || l_rpa_action || ' ' || l_proc,185);
2372: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,185);
2373: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),185);
2374:
2375: hr_utility.set_location('employee_dept_or_agency ' || l_pa_request_rec.employee_dept_or_agency ,185);
2376: hr_utility.set_location('POI ID ' || l_pa_request_rec.personnel_office_id ,185);
2377: ------
2371: hr_utility.set_location('Action before ' || l_rpa_action || ' ' || l_proc,185);
2372: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,185);
2373: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),185);
2374:
2375: hr_utility.set_location('employee_dept_or_agency ' || l_pa_request_rec.employee_dept_or_agency ,185);
2376: hr_utility.set_location('POI ID ' || l_pa_request_rec.personnel_office_id ,185);
2377: ------
2378:
2379: ----Update Sf52 for Personnel Action
2372: hr_utility.set_location('PA REQ ID ' || to_char(l_pa_request_rec.pa_request_id) ,185);
2373: hr_utility.set_location('PA OVN ' || to_char(l_pa_request_rec.object_version_number),185);
2374:
2375: hr_utility.set_location('employee_dept_or_agency ' || l_pa_request_rec.employee_dept_or_agency ,185);
2376: hr_utility.set_location('POI ID ' || l_pa_request_rec.personnel_office_id ,185);
2377: ------
2378:
2379: ----Update Sf52 for Personnel Action
2380: begin
2394: p_i_pa_routing_history_id => l_i_pa_routing_history_id,
2395: p_i_prh_object_version_number => l_i_prh_object_version_number);
2396: exception
2397: WHEN OTHERS THEN
2398: hr_utility.set_location(sqlerrm(sqlcode),1);
2399: hr_utility.set_location('Update sf52 final Failure ' || l_proc,190);
2400: l_log_text := 'Error in Update sf52 final ' ||' Sql error : '||sqlerrm(sqlcode);
2401: raise rpaerror;
2402: end;
2395: p_i_prh_object_version_number => l_i_prh_object_version_number);
2396: exception
2397: WHEN OTHERS THEN
2398: hr_utility.set_location(sqlerrm(sqlcode),1);
2399: hr_utility.set_location('Update sf52 final Failure ' || l_proc,190);
2400: l_log_text := 'Error in Update sf52 final ' ||' Sql error : '||sqlerrm(sqlcode);
2401: raise rpaerror;
2402: end;
2403:
2400: l_log_text := 'Error in Update sf52 final ' ||' Sql error : '||sqlerrm(sqlcode);
2401: raise rpaerror;
2402: end;
2403:
2404: hr_utility.set_location('Action after ' || l_rpa_action || ' ' || l_proc,200);
2405: p_status := 'SUCCESS';
2406: p_retcode := 0;
2407: l_log_text := 'Last Name: '|| l_pa_request_rec.employee_last_name ||
2408: 'SSN: ' || l_pa_request_rec.employee_national_identifier ||
2421: ELSE
2422: IF l_rpa_type = 'M' then
2423: p_status := 'MANUAL';
2424: p_retcode := 0;
2425: hr_utility.set_location('Manual rpa_type ' || l_proc,200);
2426: ELSIF l_mass_action_select_flag = 'N'
2427: and l_status = 'DESELECTED PRG:' THEN
2428: hr_utility.set_location('Deselected by programatically' || l_proc,200);
2429: p_errbuf := 'DESELECTED PRG:';
2424: p_retcode := 0;
2425: hr_utility.set_location('Manual rpa_type ' || l_proc,200);
2426: ELSIF l_mass_action_select_flag = 'N'
2427: and l_status = 'DESELECTED PRG:' THEN
2428: hr_utility.set_location('Deselected by programatically' || l_proc,200);
2429: p_errbuf := 'DESELECTED PRG:';
2430: p_retcode := 0;
2431: ELSIF l_mass_action_select_flag = 'N' then
2432: hr_utility.set_location('Deselected by user ' || l_proc,200);
2428: hr_utility.set_location('Deselected by programatically' || l_proc,200);
2429: p_errbuf := 'DESELECTED PRG:';
2430: p_retcode := 0;
2431: ELSIF l_mass_action_select_flag = 'N' then
2432: hr_utility.set_location('Deselected by user ' || l_proc,200);
2433: p_status := 'DESELECTED';
2434: p_retcode := 0;
2435: ELSE
2436: hr_utility.set_location('Already Processed ' || l_proc,200);
2432: hr_utility.set_location('Deselected by user ' || l_proc,200);
2433: p_status := 'DESELECTED';
2434: p_retcode := 0;
2435: ELSE
2436: hr_utility.set_location('Already Processed ' || l_proc,200);
2437: p_status := 'PROCESSED';
2438: p_retcode := 0;
2439: END IF;
2440: END IF; ----- For l_pa_notification_id is null and rpa_type = 'A'
2442:
2443: Exception
2444: When groupboxerr then
2445: rollback to build_rpa_save_preview;
2446: hr_utility.set_location('rollback grp build_rpa_save_preview ' || l_proc,1);
2447:
2448: -- Call ghr_par_upd.upd here
2449: begin
2450:
2469: exception when others then
2470: l_log_text := substr(l_log_text || ' , Failed in Deselecting, ' ||' Sql error : '||sqlerrm(sqlcode),1,2000);
2471: end;
2472:
2473: hr_utility.set_location('Error occured in group box ' || l_proc , 1);
2474: IF l_log_text is NULL THEN
2475: l_log_text := 'Error while creating / Updating the PA Request Rec.';
2476: END IF;
2477:
2478: p_retcode := 1;
2479: p_status := 'GROUPBOX';
2480: p_errbuf := substr(l_log_text || 'Details in GHR_PROCESS_LOG',1,2000);
2481:
2482: hr_utility.set_location('before creating entry in log file',2);
2483: -- Bug#3718167 Added SSN in the log text below
2484: l_log_text := substr(',( ' || l_pa_request_rec.employee_last_name || ', ' ||
2485: l_pa_request_rec.employee_first_name ||' '||l_pa_request_rec.employee_middle_names||
2486: '; SSN: '||l_pa_request_rec.employee_national_identifier||
2491: p_message_name => substr(l_maw_name || '-' || 'GB Err',1,30),
2492: p_log_text => substr('Person id : ' || to_char(p_person_id) || ' ' ||l_log_text,1,2000),
2493: p_log_date => sysdate);
2494:
2495: hr_utility.set_location('Groupbox Error ',2);
2496: hr_utility.set_location('created entry in log file',2);
2497: commit;
2498:
2499: When rpaerror then
2492: p_log_text => substr('Person id : ' || to_char(p_person_id) || ' ' ||l_log_text,1,2000),
2493: p_log_date => sysdate);
2494:
2495: hr_utility.set_location('Groupbox Error ',2);
2496: hr_utility.set_location('created entry in log file',2);
2497: commit;
2498:
2499: When rpaerror then
2500:
2499: When rpaerror then
2500:
2501: if l_savepoint = 'F' THEN
2502: rollback to build_rpa_save_final;
2503: hr_utility.set_location('rollback rpa build_rpa_save_final ' || l_proc,1);
2504: else
2505: rollback to build_rpa_save_preview;
2506: hr_utility.set_location('rollback rpa build_rpa_save_preview ' || l_proc,1);
2507: end if;
2502: rollback to build_rpa_save_final;
2503: hr_utility.set_location('rollback rpa build_rpa_save_final ' || l_proc,1);
2504: else
2505: rollback to build_rpa_save_preview;
2506: hr_utility.set_location('rollback rpa build_rpa_save_preview ' || l_proc,1);
2507: end if;
2508:
2509: hr_utility.set_location('Error occured Final Sf52 ' || l_proc , 1);
2510: IF l_log_text is NULL THEN
2505: rollback to build_rpa_save_preview;
2506: hr_utility.set_location('rollback rpa build_rpa_save_preview ' || l_proc,1);
2507: end if;
2508:
2509: hr_utility.set_location('Error occured Final Sf52 ' || l_proc , 1);
2510: IF l_log_text is NULL THEN
2511: l_log_text := 'Error while creating / Updating the PA Request Rec.';
2512: END IF;
2513:
2514: p_retcode := 1;
2515: p_status := 'FAILURE';
2516: p_errbuf := substr(l_log_text || 'Details in GHR_PROCESS_LOG',1,2000);
2517:
2518: hr_utility.set_location('before creating entry in log file',2);
2519: -- Bug#3718167 Added SSN in the following log text
2520: l_log_text := substr(',( ' || l_pa_request_rec.employee_last_name || ', ' ||
2521: l_pa_request_rec.employee_first_name ||' '||l_pa_request_rec.employee_middle_names||
2522: '; SSN: '||l_pa_request_rec.employee_national_identifier||
2526: p_message_name => substr(l_maw_name || '-' || 'RPA Err',1,30),
2527: p_log_text => substr('Person id : ' || to_char(p_person_id) || ' ' ||l_log_text,1,2000),
2528: p_log_date => sysdate);
2529:
2530: hr_utility.set_location('FINAL SF52 Error ',2);
2531: hr_utility.set_location('created entry in log file',2);
2532:
2533: hr_utility.set_location('Calling workflow begin entry ',3);
2534: mass_awards_error_handling
2527: p_log_text => substr('Person id : ' || to_char(p_person_id) || ' ' ||l_log_text,1,2000),
2528: p_log_date => sysdate);
2529:
2530: hr_utility.set_location('FINAL SF52 Error ',2);
2531: hr_utility.set_location('created entry in log file',2);
2532:
2533: hr_utility.set_location('Calling workflow begin entry ',3);
2534: mass_awards_error_handling
2535: ( p_pa_request_id => l_pa_request_rec.pa_request_id,
2529:
2530: hr_utility.set_location('FINAL SF52 Error ',2);
2531: hr_utility.set_location('created entry in log file',2);
2532:
2533: hr_utility.set_location('Calling workflow begin entry ',3);
2534: mass_awards_error_handling
2535: ( p_pa_request_id => l_pa_request_rec.pa_request_id,
2536: p_object_version_number => l_pa_request_rec.object_version_number,
2537: p_error => l_log_text,
2539: if l_result then
2540: l_log_text := 'Error while routing to group box in call workflow ';
2541: p_status := 'OTHER';
2542: p_retcode := 1;
2543: hr_utility.set_location('before creating entry in log file',4);
2544: -- Bug#3718167 Added SSN in the following log text
2545: l_log_text := substr( ',( ' || l_pa_request_rec.employee_last_name || ', ' ||
2546: l_pa_request_rec.employee_first_name ||' '||l_pa_request_rec.employee_middle_names||
2547: '; SSN: '||l_pa_request_rec.employee_national_identifier||
2551: p_message_name => substr(l_maw_name || '-' || 'RPA WF',1,30),
2552: p_log_text => substr('Person id : ' || to_char(p_person_id) || ' ' || l_log_text,1,2000),
2553: p_log_date => sysdate);
2554:
2555: hr_utility.set_location('FINAL SF52 Error - Call Work flow ',4);
2556: hr_utility.set_location('created entry in log file',4);
2557: end if;
2558: hr_utility.set_location('Calling workflow end entry ',3);
2559:
2552: p_log_text => substr('Person id : ' || to_char(p_person_id) || ' ' || l_log_text,1,2000),
2553: p_log_date => sysdate);
2554:
2555: hr_utility.set_location('FINAL SF52 Error - Call Work flow ',4);
2556: hr_utility.set_location('created entry in log file',4);
2557: end if;
2558: hr_utility.set_location('Calling workflow end entry ',3);
2559:
2560: commit;
2554:
2555: hr_utility.set_location('FINAL SF52 Error - Call Work flow ',4);
2556: hr_utility.set_location('created entry in log file',4);
2557: end if;
2558: hr_utility.set_location('Calling workflow end entry ',3);
2559:
2560: commit;
2561:
2562: When ma_rpaerror then
2562: When ma_rpaerror then
2563:
2564: if l_savepoint = 'F' THEN
2565: rollback to build_rpa_save_final;
2566: hr_utility.set_location('rollback marpa build_rpa_save_final ' || l_proc,1);
2567: else
2568: rollback to build_rpa_save_preview;
2569: hr_utility.set_location('rollback marpa build_rpa_save_preview ' || l_proc,1);
2570: end if;
2565: rollback to build_rpa_save_final;
2566: hr_utility.set_location('rollback marpa build_rpa_save_final ' || l_proc,1);
2567: else
2568: rollback to build_rpa_save_preview;
2569: hr_utility.set_location('rollback marpa build_rpa_save_preview ' || l_proc,1);
2570: end if;
2571:
2572: hr_utility.set_location('Error occured in ' || l_proc , 1);
2573: IF g_log_text is NOT NULL then
2568: rollback to build_rpa_save_preview;
2569: hr_utility.set_location('rollback marpa build_rpa_save_preview ' || l_proc,1);
2570: end if;
2571:
2572: hr_utility.set_location('Error occured in ' || l_proc , 1);
2573: IF g_log_text is NOT NULL then
2574: l_log_text := g_log_text;
2575: END IF;
2576: IF l_log_text is NULL THEN
2580: p_retcode := 1;
2581: p_status := 'FAILURE';
2582: p_errbuf := substr(l_log_text || 'Details in GHR_PROCESS_LOG',1,2000);
2583:
2584: hr_utility.set_location('before creating entry in log file',2);
2585: -- Bug#3718167 Added SSN in the following log text
2586: l_log_text := substr( ',( ' || l_pa_request_rec.employee_last_name || ', ' ||
2587: l_pa_request_rec.employee_first_name ||' '||l_pa_request_rec.employee_middle_names||
2588: '; SSN: '||l_pa_request_rec.employee_national_identifier||
2593: p_log_text => substr('Person id : ' || to_char(p_person_id) || ' ' || l_log_text,1,2000),
2594: p_log_date => sysdate);
2595:
2596:
2597: hr_utility.set_location('Error Others ',2);
2598: hr_utility.set_location('created entry in log file',2);
2599:
2600: commit;
2601:
2594: p_log_date => sysdate);
2595:
2596:
2597: hr_utility.set_location('Error Others ',2);
2598: hr_utility.set_location('created entry in log file',2);
2599:
2600: commit;
2601:
2602: -- Bug 3376761
2606:
2607:
2608: rollback to build_rpa_save_final;
2609:
2610: hr_utility.set_location('rollback marpa build_rpa_save_final ' || l_proc,1);
2611:
2612: hr_utility.set_location('Error occured in ' || l_proc , 1);
2613:
2614: --l_log_text := 'APP-GHR-38611 - Award Percentage cannot be greater than 25% of total annual basic pay.';
2608: rollback to build_rpa_save_final;
2609:
2610: hr_utility.set_location('rollback marpa build_rpa_save_final ' || l_proc,1);
2611:
2612: hr_utility.set_location('Error occured in ' || l_proc , 1);
2613:
2614: --l_log_text := 'APP-GHR-38611 - Award Percentage cannot be greater than 25% of total annual basic pay.';
2615: l_log_text := l_comments;
2616:
2617: p_retcode := 1;
2618: p_status := 'FAILURE';
2619: p_errbuf := substr(l_log_text || 'Details in GHR_PROCESS_LOG',1,2000);
2620:
2621: hr_utility.set_location('before creating entry in log file',2);
2622: -- Bug#3718167 Added SSN in the following log text
2623: l_log_text := substr(',( ' || l_pa_request_rec.employee_last_name || ', ' ||
2624: l_pa_request_rec.employee_first_name ||' '||l_pa_request_rec.employee_middle_names||
2625: '; SSN: '||l_pa_request_rec.employee_national_identifier||
2630: p_message_name => substr(l_maw_name || '-' || 'RPA MA',1,60),
2631: p_log_text => substr('Person id : ' || to_char(p_person_id) || ' ' ||l_log_text,1,2000),
2632: p_log_date => sysdate);
2633:
2634: hr_utility.set_location('Award percentage Error ',2);
2635: hr_utility.set_location('created entry in log file',2);
2636:
2637: hr_utility.set_location('Calling workflow begin entry ',3);
2638: mass_awards_error_handling
2631: p_log_text => substr('Person id : ' || to_char(p_person_id) || ' ' ||l_log_text,1,2000),
2632: p_log_date => sysdate);
2633:
2634: hr_utility.set_location('Award percentage Error ',2);
2635: hr_utility.set_location('created entry in log file',2);
2636:
2637: hr_utility.set_location('Calling workflow begin entry ',3);
2638: mass_awards_error_handling
2639: ( p_pa_request_id => l_pa_request_rec.pa_request_id,
2633:
2634: hr_utility.set_location('Award percentage Error ',2);
2635: hr_utility.set_location('created entry in log file',2);
2636:
2637: hr_utility.set_location('Calling workflow begin entry ',3);
2638: mass_awards_error_handling
2639: ( p_pa_request_id => l_pa_request_rec.pa_request_id,
2640: p_object_version_number => l_pa_request_rec.object_version_number,
2641: p_error => l_log_text,
2643: if l_result then
2644: l_log_text := 'Error while routing to group box in call workflow ';
2645: p_status := 'OTHER';
2646: p_retcode := 1;
2647: hr_utility.set_location('before creating entry in log file',4);
2648: -- Bug#3718167 Added SSN in the following log text
2649: l_log_text := substr( ',( ' || l_pa_request_rec.employee_last_name || ', ' ||
2650: l_pa_request_rec.employee_first_name || ' '||l_pa_request_rec.employee_middle_names||
2651: '; SSN: '||l_pa_request_rec.employee_national_identifier||
2655: p_message_name => substr(l_maw_name || '-' || 'RPA WF',1,30),
2656: p_log_text => substr('Person id : ' || to_char(p_person_id) || ' ' || l_log_text,1,2000),
2657: p_log_date => sysdate);
2658:
2659: hr_utility.set_location('Award percentage Error - Call Work flow ',4);
2660: hr_utility.set_location('created entry in log file',4);
2661: end if;
2662: hr_utility.set_location('Calling workflow end entry ',3);
2663:
2656: p_log_text => substr('Person id : ' || to_char(p_person_id) || ' ' || l_log_text,1,2000),
2657: p_log_date => sysdate);
2658:
2659: hr_utility.set_location('Award percentage Error - Call Work flow ',4);
2660: hr_utility.set_location('created entry in log file',4);
2661: end if;
2662: hr_utility.set_location('Calling workflow end entry ',3);
2663:
2664: commit;
2658:
2659: hr_utility.set_location('Award percentage Error - Call Work flow ',4);
2660: hr_utility.set_location('created entry in log file',4);
2661: end if;
2662: hr_utility.set_location('Calling workflow end entry ',3);
2663:
2664: commit;
2665:
2666: -- End of Bug 3376761
2668: When others then
2669:
2670: if l_savepoint = 'F' THEN
2671: rollback to build_rpa_save_final;
2672: hr_utility.set_location('rollback others build_rpa_save_final ' || l_proc,1);
2673: else
2674: rollback to build_rpa_save_preview;
2675: hr_utility.set_location('rollback others build_rpa_save_preview ' || l_proc,1);
2676: end if;
2671: rollback to build_rpa_save_final;
2672: hr_utility.set_location('rollback others build_rpa_save_final ' || l_proc,1);
2673: else
2674: rollback to build_rpa_save_preview;
2675: hr_utility.set_location('rollback others build_rpa_save_preview ' || l_proc,1);
2676: end if;
2677:
2678: hr_utility.set_location('Error occured in ' || l_proc , 1);
2679: IF l_log_text is NULL THEN
2674: rollback to build_rpa_save_preview;
2675: hr_utility.set_location('rollback others build_rpa_save_preview ' || l_proc,1);
2676: end if;
2677:
2678: hr_utility.set_location('Error occured in ' || l_proc , 1);
2679: IF l_log_text is NULL THEN
2680: l_log_text := 'Error while creating / Updating the PA Request Rec.';
2681: END IF;
2682:
2683: p_retcode := 1;
2684: p_status := 'FAILURE';
2685: p_errbuf := substr(l_log_text || 'Details in GHR_PROCESS_LOG',1,2000);
2686:
2687: hr_utility.set_location('before creating entry in log file',2);
2688: -- Bug#3718167 Added SSN to the following log text
2689: l_log_text := substr( ',( ' || l_pa_request_rec.employee_last_name || ', ' ||
2690: l_pa_request_rec.employee_first_name ||' '||l_pa_request_rec.employee_middle_names||
2691: '; SSN: '||l_pa_request_rec.employee_national_identifier||
2696: p_log_text => substr('Person id : ' || to_char(p_person_id) || ' ' || l_log_text,1,2000),
2697: p_log_date => sysdate);
2698:
2699:
2700: hr_utility.set_location('Error Others ',2);
2701: hr_utility.set_location('created entry in log file',2);
2702:
2703: commit;
2704:
2697: p_log_date => sysdate);
2698:
2699:
2700: hr_utility.set_location('Error Others ',2);
2701: hr_utility.set_location('created entry in log file',2);
2702:
2703: commit;
2704:
2705: end build_rpa_for_mass_awards;
2769: AND pa_request_id = p_pa_request_id;
2770:
2771: BEGIN
2772:
2773: hr_utility.set_location('Entering ' || l_proc,5);
2774: FOR cur_rpa_ei_rec in cur_rpa_ei(p_pa_request_id)
2775: LOOP
2776: hr_utility.set_location( l_proc,10);
2777: l_pa_request_extra_info_id := cur_rpa_ei_rec.pa_request_extra_info_id;
2772:
2773: hr_utility.set_location('Entering ' || l_proc,5);
2774: FOR cur_rpa_ei_rec in cur_rpa_ei(p_pa_request_id)
2775: LOOP
2776: hr_utility.set_location( l_proc,10);
2777: l_pa_request_extra_info_id := cur_rpa_ei_rec.pa_request_extra_info_id;
2778: l_pa_object_version_number := cur_rpa_ei_rec.object_version_number;
2779: exit;
2780: END LOOP;
2780: END LOOP;
2781:
2782: FOR cur_rpa_ei_shadow_rec in cur_rpa_ei_shadow(p_pa_request_id)
2783: LOOP
2784: hr_utility.set_location( l_proc,10);
2785: l_pa_request_extra_info_sh_id := cur_rpa_ei_shadow_rec.pa_request_extra_info_id;
2786: exit;
2787: END LOOP;
2788:
2785: l_pa_request_extra_info_sh_id := cur_rpa_ei_shadow_rec.pa_request_extra_info_id;
2786: exit;
2787: END LOOP;
2788:
2789: hr_utility.set_location(l_proc,15);
2790: ----- Get Award details from the template and also extra information
2791: get_award_details
2792: ( p_mass_award_id => p_mass_award_id,
2793: p_rpa_type => 'TA',
2802: p_tangible_benefit_dollars => l_t_tbd,
2803: p_date_award_earned => l_t_date_award_earn,
2804: p_appropriation_code => l_t_appropriation_code);
2805:
2806: hr_utility.set_location('p_award_amount - l_dummy' || l_dummy,20);
2807: hr_utility.set_location(l_proc,20);
2808: ----- Get Award details for the employee existing in the database
2809: get_award_details
2810: ( p_mass_award_id => p_mass_award_id,
2803: p_date_award_earned => l_t_date_award_earn,
2804: p_appropriation_code => l_t_appropriation_code);
2805:
2806: hr_utility.set_location('p_award_amount - l_dummy' || l_dummy,20);
2807: hr_utility.set_location(l_proc,20);
2808: ----- Get Award details for the employee existing in the database
2809: get_award_details
2810: ( p_mass_award_id => p_mass_award_id,
2811: p_rpa_type => p_rpa_type,
2820: p_tangible_benefit_dollars => l_d_tbd,
2821: p_date_award_earned => l_d_date_award_earn,
2822: p_appropriation_code => l_d_appropriation_code);
2823:
2824: hr_utility.set_location('p_award_amountD - l_dummy' || l_dummy,20);
2825:
2826: hr_utility.set_location(l_proc,25);
2827: ----- Get Award details from the shadow
2828: get_award_details_shadow
2822: p_appropriation_code => l_d_appropriation_code);
2823:
2824: hr_utility.set_location('p_award_amountD - l_dummy' || l_dummy,20);
2825:
2826: hr_utility.set_location(l_proc,25);
2827: ----- Get Award details from the shadow
2828: get_award_details_shadow
2829: ( p_pa_request_id => p_pa_request_id,
2830: p_award_amount => l_dummy,
2835: p_group_award => l_s_group_award,
2836: p_tangible_benefit_dollars => l_s_tbd,
2837: p_date_award_earned => l_s_date_award_earn,
2838: p_appropriation_code => l_s_appropriation_code);
2839: hr_utility.set_location('p_award_amountS - l_dummy' || l_dummy,20);
2840: ------------
2841: hr_utility.set_location(l_proc,30);
2842: set_ei
2843: (p_shadow => l_s_award_agency,
2837: p_date_award_earned => l_s_date_award_earn,
2838: p_appropriation_code => l_s_appropriation_code);
2839: hr_utility.set_location('p_award_amountS - l_dummy' || l_dummy,20);
2840: ------------
2841: hr_utility.set_location(l_proc,30);
2842: set_ei
2843: (p_shadow => l_s_award_agency,
2844: p_template => l_t_award_agency,
2845: p_person => l_d_award_agency);
2868: (p_shadow => l_s_appropriation_code,
2869: p_template => l_t_appropriation_code,
2870: p_person => l_d_appropriation_code);
2871:
2872: hr_utility.set_location(l_proc,40);
2873: IF l_pa_request_extra_info_id is null then
2874: hr_utility.set_location(l_proc,45);
2875: ghr_par_extra_info_api.create_pa_request_extra_info
2876: (p_validate => false,
2870: p_person => l_d_appropriation_code);
2871:
2872: hr_utility.set_location(l_proc,40);
2873: IF l_pa_request_extra_info_id is null then
2874: hr_utility.set_location(l_proc,45);
2875: ghr_par_extra_info_api.create_pa_request_extra_info
2876: (p_validate => false,
2877: p_pa_request_id => p_pa_request_id,
2878: p_information_type => l_information_type,
2886: p_pa_request_extra_info_id => l_dummy,
2887: p_object_version_number => l_dummy
2888: );
2889: ELSE
2890: hr_utility.set_location(l_proc,50);
2891:
2892: ghr_par_extra_info_api.update_pa_request_extra_info
2893: (p_validate => false,
2894: p_rei_information3 => l_d_award_agency,
2932:
2933: EXCEPTION
2934:
2935: when others then
2936: hr_utility.set_location('Error in ghr_par_extra info.create pa req'||
2937: ' Sql Err is '|| sqlerrm(sqlcode) || l_proc, 60);
2938: --raise mass_awarderror;
2939:
2940: END refresh_award_details;
2953: l_shadow := p_shadow ;/*NOCOPY CHANGES*/
2954: l_person := p_person ;
2955:
2956: If p_refresh_flag = 'Y' then
2957: hr_utility.set_location('in set ei - Y ',5);
2958: If nvl(p_person,hr_api.g_varchar2) <> nvl(p_template,hr_api.g_varchar2) and
2959: nvl(p_person,hr_api.g_varchar2) = nvl(p_shadow,hr_api.g_varchar2) then
2960: p_person := p_template;
2961: End if;
2959: nvl(p_person,hr_api.g_varchar2) = nvl(p_shadow,hr_api.g_varchar2) then
2960: p_person := p_template;
2961: End if;
2962: Else
2963: hr_utility.set_location('in set ei - N ',6);
2964: p_person := p_template;
2965: End if;
2966: p_shadow := p_template;
2967: EXCEPTION
3204:
3205: begin
3206:
3207: -- get template remarks and descriptions
3208: hr_utility.set_location('Entering ' || l_proc,5);
3209:
3210: for cur_rem_tmp_rec in cur_rem_tmp loop
3211: l_pa_remark_id := cur_rem_tmp_rec.pa_remark_id;
3212: l_remark_id := cur_rem_tmp_rec.remark_id;
3290:
3291:
3292: begin
3293:
3294: hr_utility.set_location('Entering ..' || l_proc,5);
3295:
3296: l_pa_request_id := p_pa_request_id;
3297: l_object_version_number := p_object_version_number;
3298: l_error := p_error;
3296: l_pa_request_id := p_pa_request_id;
3297: l_object_version_number := p_object_version_number;
3298: l_error := p_error;
3299:
3300: hr_utility.set_location('pa_request_id = ' ||to_char( l_pa_request_id),5);
3301: hr_utility.set_location('object_version_number = ' ||to_char(l_object_version_number),5);
3302:
3303: ghr_api.call_workflow (
3304: p_pa_request_id => l_pa_request_id,
3297: l_object_version_number := p_object_version_number;
3298: l_error := p_error;
3299:
3300: hr_utility.set_location('pa_request_id = ' ||to_char( l_pa_request_id),5);
3301: hr_utility.set_location('object_version_number = ' ||to_char(l_object_version_number),5);
3302:
3303: ghr_api.call_workflow (
3304: p_pa_request_id => l_pa_request_id,
3305: p_action_taken => 'CONTINUE',
3305: p_action_taken => 'CONTINUE',
3306: p_error => l_error);
3307:
3308: for cur_rpa_rec in cur_rpa loop
3309: hr_utility.set_location( l_proc,10);
3310: l_object_version_number := cur_rpa_rec.object_version_number;
3311: l_person_id := cur_rpa_rec.person_id;
3312: l_employee_last_name := cur_rpa_rec.employee_last_name;
3313: l_employee_first_name := cur_rpa_rec.employee_first_name;
3312: l_employee_last_name := cur_rpa_rec.employee_last_name;
3313: l_employee_first_name := cur_rpa_rec.employee_first_name;
3314: l_employee_middle_names := cur_rpa_rec.employee_middle_names;
3315: l_employee_national_identifier := cur_rpa_rec.employee_national_identifier;
3316: hr_utility.set_location('object_version_number = ' ||to_char( l_object_version_number),10);
3317: end loop;
3318:
3319: -- Call ghr_par_upd.upd here
3320: ghr_par_upd.upd(
3321: p_pa_request_id => l_pa_request_id,
3322: p_rpa_type => 'M',
3323: p_object_version_number => l_object_version_number);
3324:
3325: hr_utility.set_location( 'Made Manual RPA' || to_char(l_pa_request_id) ,20);
3326: hr_utility.set_location( 'Leaving ' || l_proc ,25);
3327: -- Bug#3718167 Added SSN to the following log text
3328: l_log_text := ' ,' || l_employee_last_name || ', ' || l_employee_first_name||' '||l_employee_middle_names
3329: ||'SSN: '|| l_employee_national_identifier;
3322: p_rpa_type => 'M',
3323: p_object_version_number => l_object_version_number);
3324:
3325: hr_utility.set_location( 'Made Manual RPA' || to_char(l_pa_request_id) ,20);
3326: hr_utility.set_location( 'Leaving ' || l_proc ,25);
3327: -- Bug#3718167 Added SSN to the following log text
3328: l_log_text := ' ,' || l_employee_last_name || ', ' || l_employee_first_name||' '||l_employee_middle_names
3329: ||'SSN: '|| l_employee_national_identifier;
3330: