1: Package Body Pqh_Gsp_Grd_Step_Remove As
2: /* $Header: pqgspsde.pkb 120.2.12010000.2 2009/04/10 12:06:11 lbodired ship $ */
3: --
4: --------------------------- get_ovn -----------------------------
5: --
2: /* $Header: pqgspsde.pkb 120.2.12010000.2 2009/04/10 12:06:11 lbodired ship $ */
3: --
4: --------------------------- get_ovn -----------------------------
5: --
6: g_package VARCHAR2 (30) := 'Pqh_Gsp_Grd_Step_Remove.';
7:
8: FUNCTION get_ovn (p_copy_entity_result_id IN NUMBER)
9: RETURN NUMBER
10: IS
262:
263: IF l_dml_operation = 'INSERT' THEN
264: -- 1) Purge ABR,HRRATE, CRRATE
265: hr_utility.set_location ( 'Calling purge_opt_abr_hrrate_crrate... :', 30);
266: pqh_gsp_grd_step_remove.purge_opt_abr_hrrate_crrate (
267: p_opt_result_id => p_copy_entity_result_id,
268: p_copy_entity_txn_id => p_copy_entity_txn_id,
269: p_effective_date => p_effective_date
270: );
273: hr_utility.set_location ('Calling purge_pay_scale... :', 40);
274:
275: IF l_point_or_step = 'STEP'
276: THEN
277: pqh_gsp_grd_step_remove.purge_pay_scale (
278: p_opt_result_id => p_copy_entity_result_id,
279: p_copy_entity_txn_id => p_copy_entity_txn_id,
280: p_effective_date => p_effective_date
281: );
288: );
289: ELSE -- l_dml_operation is UPDATE/UPD_INS/COPIED
290:
291:
292: pqh_gsp_grd_step_remove.unlink_opt_abr_hrrate_crrate (
293: p_opt_result_id => p_copy_entity_result_id,
294: p_copy_entity_txn_id => p_copy_entity_txn_id,
295: p_effective_date => p_effective_date
296: );
400: -- To divert control of execution to the else part during create mode of the grade ladder.
401: -- In create mode dml_operation of the points is COPIED
402:
403: IF l_dml_operation = 'INSERT' OR l_dml_operation = 'UPD_INS' THEN
404: -- 1) Call Pqh_Gsp_Grd_Step_Remove.remove_opt
405: IF p_remove_opt = 'Y' THEN
406: hr_utility.set_location ('Calling remove_opt... :', 60);
407: pqh_gsp_grd_step_remove.remove_opt (
408: p_copy_entity_txn_id => p_copy_entity_txn_id,
403: IF l_dml_operation = 'INSERT' OR l_dml_operation = 'UPD_INS' THEN
404: -- 1) Call Pqh_Gsp_Grd_Step_Remove.remove_opt
405: IF p_remove_opt = 'Y' THEN
406: hr_utility.set_location ('Calling remove_opt... :', 60);
407: pqh_gsp_grd_step_remove.remove_opt (
408: p_copy_entity_txn_id => p_copy_entity_txn_id,
409: p_copy_entity_result_id => l_opt_result_id,
410: p_effective_date => p_effective_date);
411: ELSE
413: END IF;
414:
415: -- 2) Purge Elig Profile call procedure remove_elig_profile
416: hr_utility.set_location ('Calling remove_elig_profile... :', 70);
417: pqh_gsp_grd_step_remove.remove_elig_profile (
418: p_copy_entity_txn_id => p_copy_entity_txn_id,
419: p_copy_entity_result_id => p_copy_entity_result_id
420: );
421: -- 3) purge OIPL
425: p_effective_date => p_effective_date
426: );
427: ELSE -- dml_operation = COPIED/UPD_INS/UPDATE
428: -- 1) Mark for deletion call procedure remove_elig_profile
429: pqh_gsp_grd_step_remove.remove_elig_profile (
430: p_copy_entity_txn_id => p_copy_entity_txn_id,
431: p_copy_entity_result_id => p_copy_entity_result_id
432: );
433:
432: );
433:
434: -- UNLINK OPT
435: IF p_remove_opt = 'Y' Then
436: pqh_gsp_grd_step_remove.remove_opt (
437: p_copy_entity_txn_id => p_copy_entity_txn_id,
438: p_copy_entity_result_id => l_opt_result_id,
439: p_effective_date => p_effective_date);
440: end if;
457: if oipl.dml_operation = 'INSERT'
458: 1) Purge Standard Rates and Criteria Rates
459: 1.a) Purge Standard Rates i.e ABR, HRRATE
460: 1.b) Purge Criteria Rates i.e CRRATE
461: 2) Purge Elig Profile call procedure Pqh_Gsp_Grd_Step_Remove.remove_elig_profile
462: 3) purge OIPL
463: else if opt.dml_operation in ('COPIED','UPD_INS','UPDATE')
464: 1) Mark for deletion call procedure Pqh_Gsp_Grd_Step_Remove.remove_elig_profile
465: 2) oipl.information104 = UNLINK
460: 1.b) Purge Criteria Rates i.e CRRATE
461: 2) Purge Elig Profile call procedure Pqh_Gsp_Grd_Step_Remove.remove_elig_profile
462: 3) purge OIPL
463: else if opt.dml_operation in ('COPIED','UPD_INS','UPDATE')
464: 1) Mark for deletion call procedure Pqh_Gsp_Grd_Step_Remove.remove_elig_profile
465: 2) oipl.information104 = UNLINK
466: */
467: PROCEDURE remove_oipl_point_flavour (
468: p_copy_entity_txn_id IN NUMBER,
502:
503: IF l_dml_operation = 'INSERT' OR l_dml_operation = 'UPD_INS' THEN
504: -- 1) Purge Standard Rates : ABR, HRRATE and Criteria Rates : CRRATE
505: /* hr_utility.set_location ( 'Calling purge_opt_abr_hrrate_crrate ... :', 70);
506: pqh_gsp_grd_step_remove.purge_opt_abr_hrrate_crrate (
507: p_opt_result_id => l_opt_result_id,
508: p_copy_entity_txn_id => p_copy_entity_txn_id,
509: p_effective_date => p_effective_date
510: );
508: p_copy_entity_txn_id => p_copy_entity_txn_id,
509: p_effective_date => p_effective_date
510: );
511: */
512: -- 2) Purge Elig Profile call procedure Pqh_Gsp_Grd_Step_Remove.remove_elig_profile
513: hr_utility.set_location ( 'Calling Pqh_Gsp_Grd_Step_Remove.remove_elig_profile... :', 75);
514: pqh_gsp_grd_step_remove.remove_elig_profile (
515: p_copy_entity_txn_id => p_copy_entity_txn_id,
516: p_copy_entity_result_id => p_copy_entity_result_id
509: p_effective_date => p_effective_date
510: );
511: */
512: -- 2) Purge Elig Profile call procedure Pqh_Gsp_Grd_Step_Remove.remove_elig_profile
513: hr_utility.set_location ( 'Calling Pqh_Gsp_Grd_Step_Remove.remove_elig_profile... :', 75);
514: pqh_gsp_grd_step_remove.remove_elig_profile (
515: p_copy_entity_txn_id => p_copy_entity_txn_id,
516: p_copy_entity_result_id => p_copy_entity_result_id
517: );
510: );
511: */
512: -- 2) Purge Elig Profile call procedure Pqh_Gsp_Grd_Step_Remove.remove_elig_profile
513: hr_utility.set_location ( 'Calling Pqh_Gsp_Grd_Step_Remove.remove_elig_profile... :', 75);
514: pqh_gsp_grd_step_remove.remove_elig_profile (
515: p_copy_entity_txn_id => p_copy_entity_txn_id,
516: p_copy_entity_result_id => p_copy_entity_result_id
517: );
518: -- 3) purge OIPL
521: p_copy_entity_result_id => p_copy_entity_result_id,
522: p_effective_date => p_effective_date
523: );
524: ELSE -- dml_operation = COPIED/UPD_INS/UPDATE
525: -- 1) Mark for deletion call procedure Pqh_Gsp_Grd_Step_Remove.remove_elig_profile
526: pqh_gsp_grd_step_remove.remove_elig_profile (
527: p_copy_entity_txn_id => p_copy_entity_txn_id,
528: p_copy_entity_result_id => p_copy_entity_result_id
529: );
522: p_effective_date => p_effective_date
523: );
524: ELSE -- dml_operation = COPIED/UPD_INS/UPDATE
525: -- 1) Mark for deletion call procedure Pqh_Gsp_Grd_Step_Remove.remove_elig_profile
526: pqh_gsp_grd_step_remove.remove_elig_profile (
527: p_copy_entity_txn_id => p_copy_entity_txn_id,
528: p_copy_entity_result_id => p_copy_entity_result_id
529: );
530: -- 2) oipl.information104 = UNLINK
554: hr_utility.set_location ('Entering remove_oipl', 10);
555: l_which_flavour := pqh_gsp_utility.use_point_or_step ( p_copy_entity_txn_id => p_copy_entity_txn_id);
556: hr_utility.set_location ('POINT/STEP :' || l_which_flavour, 30);
557: IF (l_which_flavour = 'POINT') THEN
558: pqh_gsp_grd_step_remove.remove_oipl_point_flavour (
559: p_copy_entity_txn_id => p_copy_entity_txn_id,
560: p_copy_entity_result_id => p_copy_entity_result_id,
561: p_effective_date => p_effective_date
562: );
561: p_effective_date => p_effective_date
562: );
563: END IF;
564: IF (l_which_flavour = 'STEP') THEN
565: pqh_gsp_grd_step_remove.remove_oipl_step_flavour (
566: p_copy_entity_txn_id => p_copy_entity_txn_id,
567: p_copy_entity_result_id => p_copy_entity_result_id,
568: p_effective_date => p_effective_date,
569: p_remove_opt => p_remove_opt
615: -- Remove Rates, Elig Profiles attahced to OIPL
616: -- Remove OIPL
617: FOR rec_oipls IN csr_oipl_ids LOOP
618: IF (l_which_flavour = 'POINT') THEN
619: pqh_gsp_grd_step_remove.remove_oipl_point_flavour (
620: p_copy_entity_txn_id => p_copy_entity_txn_id,
621: p_copy_entity_result_id => rec_oipls.copy_entity_result_id,
622: p_effective_date => p_effective_date
623: );
623: );
624: END IF;
625:
626: IF (l_which_flavour = 'STEP') THEN
627: pqh_gsp_grd_step_remove.remove_oipl_step_flavour (
628: p_copy_entity_txn_id => p_copy_entity_txn_id,
629: p_copy_entity_result_id => rec_oipls.copy_entity_result_id,
630: p_effective_date => p_effective_date
631: );
634:
635: IF l_dml_operation = 'INSERT' THEN
636: -- 1) Purge Elig Profile call procedure remove_elig_profile
637: hr_utility.set_location ('Calling remove_elig_profile... :', 70);
638: pqh_gsp_grd_step_remove.remove_elig_profile (
639: p_copy_entity_txn_id => p_copy_entity_txn_id,
640: p_copy_entity_result_id => p_copy_entity_result_id
641: );
642:
719: THEN
720: hr_utility.set_location ('purge_opt_abr_hrrate_crrate ', 110);
721: END unlink_opt_abr_hrrate_crrate;
722:
723: END pqh_gsp_grd_step_remove;