29: --
30: BEGIN
31: --
32:
33: hr_dm_utility.message('ROUT','entry:hr_dm_init.check_custom_flex', 5);
34: hr_dm_utility.message('PARA','(none)', 10);
35:
36: -- read values from pay_action_parameters
37:
30: BEGIN
31: --
32:
33: hr_dm_utility.message('ROUT','entry:hr_dm_init.check_custom_flex', 5);
34: hr_dm_utility.message('PARA','(none)', 10);
35:
36: -- read values from pay_action_parameters
37:
38: OPEN csr_value;
47: l_retval := NULL;
48: END IF;
49:
50:
51: hr_dm_utility.message('INFO','Checked custom flex setting', 15);
52: hr_dm_utility.message('SUMM','Checked custom flex setting', 20);
53: hr_dm_utility.message('ROUT','exit:hr_dm_init.check_custom_flex', 25);
54: hr_dm_utility.message('PARA','(l_retval - ' || l_retval || ')', 30);
55:
48: END IF;
49:
50:
51: hr_dm_utility.message('INFO','Checked custom flex setting', 15);
52: hr_dm_utility.message('SUMM','Checked custom flex setting', 20);
53: hr_dm_utility.message('ROUT','exit:hr_dm_init.check_custom_flex', 25);
54: hr_dm_utility.message('PARA','(l_retval - ' || l_retval || ')', 30);
55:
56:
49:
50:
51: hr_dm_utility.message('INFO','Checked custom flex setting', 15);
52: hr_dm_utility.message('SUMM','Checked custom flex setting', 20);
53: hr_dm_utility.message('ROUT','exit:hr_dm_init.check_custom_flex', 25);
54: hr_dm_utility.message('PARA','(l_retval - ' || l_retval || ')', 30);
55:
56:
57: RETURN(l_retval);
50:
51: hr_dm_utility.message('INFO','Checked custom flex setting', 15);
52: hr_dm_utility.message('SUMM','Checked custom flex setting', 20);
53: hr_dm_utility.message('ROUT','exit:hr_dm_init.check_custom_flex', 25);
54: hr_dm_utility.message('PARA','(l_retval - ' || l_retval || ')', 30);
55:
56:
57: RETURN(l_retval);
58:
58:
59: -- error handling
60: EXCEPTION
61: WHEN OTHERS THEN
62: hr_dm_utility.error(SQLCODE,'hr_dm_init.check_custom_flex','(none)','R');
63: RAISE;
64:
65: --
66: END check_custom_flex;
85:
86:
87: --
88: PROCEDURE populate_pi_table_i(r_migration_data IN
89: hr_dm_utility.r_migration_rec) IS
90: --
91:
92: --
93: BEGIN
92: --
93: BEGIN
94: --
95:
96: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_i', 5);
97: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
98:
99: --
100: -- phase specific code to be inserted here
93: BEGIN
94: --
95:
96: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_i', 5);
97: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
98:
99: --
100: -- phase specific code to be inserted here
101: --
101: --
102: -- no code required
103: --
104:
105: hr_dm_utility.message('INFO','Populate Phase Items table - I phase', 15);
106: hr_dm_utility.message('SUMM','Populate Phase Items table - I phase', 20);
107: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_i', 25);
108: hr_dm_utility.message('PARA','(none)', 30);
109:
102: -- no code required
103: --
104:
105: hr_dm_utility.message('INFO','Populate Phase Items table - I phase', 15);
106: hr_dm_utility.message('SUMM','Populate Phase Items table - I phase', 20);
107: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_i', 25);
108: hr_dm_utility.message('PARA','(none)', 30);
109:
110: -- error handling
103: --
104:
105: hr_dm_utility.message('INFO','Populate Phase Items table - I phase', 15);
106: hr_dm_utility.message('SUMM','Populate Phase Items table - I phase', 20);
107: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_i', 25);
108: hr_dm_utility.message('PARA','(none)', 30);
109:
110: -- error handling
111: EXCEPTION
104:
105: hr_dm_utility.message('INFO','Populate Phase Items table - I phase', 15);
106: hr_dm_utility.message('SUMM','Populate Phase Items table - I phase', 20);
107: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_i', 25);
108: hr_dm_utility.message('PARA','(none)', 30);
109:
110: -- error handling
111: EXCEPTION
112: WHEN OTHERS THEN
109:
110: -- error handling
111: EXCEPTION
112: WHEN OTHERS THEN
113: hr_dm_utility.error(SQLCODE,'hr_dm_init.populate_pi_table_i','(none)',
114: 'R');
115: RAISE;
116:
117: --
134: -- ------------------------------------------------------------------------
135:
136: --
137: PROCEDURE populate_pi_table_g(r_migration_data IN
138: hr_dm_utility.r_migration_rec) IS
139: --
140:
141: l_phase_id NUMBER;
142: l_loader_name VARCHAR2(30);
242: --
243: BEGIN
244: --
245:
246: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_g', 5);
247: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
248:
249: -- get phase id
250: l_phase_id := hr_dm_utility.get_phase_id('G',
243: BEGIN
244: --
245:
246: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_g', 5);
247: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
248:
249: -- get phase id
250: l_phase_id := hr_dm_utility.get_phase_id('G',
251: r_migration_data.migration_id);
246: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_g', 5);
247: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
248:
249: -- get phase id
250: l_phase_id := hr_dm_utility.get_phase_id('G',
251: r_migration_data.migration_id);
252:
253: -- read generator version
254: hr_dm_library.get_generator_version(p_generator_version =>
302: AND (table_name = l_table_name)));
303:
304: COMMIT;
305:
306: hr_dm_utility.message('INFO','Seeding ' || l_table_name, 11);
307:
308: END LOOP;
309: CLOSE csr_select_pi;
310:
308: END LOOP;
309: CLOSE csr_select_pi;
310:
311:
312: hr_dm_utility.message('INFO','Populate Phase Items table - G phase', 15);
313: hr_dm_utility.message('SUMM','Populate Phase Items table - G phase', 20);
314: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_g', 25);
315: hr_dm_utility.message('PARA','(none)', 30);
316:
309: CLOSE csr_select_pi;
310:
311:
312: hr_dm_utility.message('INFO','Populate Phase Items table - G phase', 15);
313: hr_dm_utility.message('SUMM','Populate Phase Items table - G phase', 20);
314: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_g', 25);
315: hr_dm_utility.message('PARA','(none)', 30);
316:
317: -- error handling
310:
311:
312: hr_dm_utility.message('INFO','Populate Phase Items table - G phase', 15);
313: hr_dm_utility.message('SUMM','Populate Phase Items table - G phase', 20);
314: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_g', 25);
315: hr_dm_utility.message('PARA','(none)', 30);
316:
317: -- error handling
318: EXCEPTION
311:
312: hr_dm_utility.message('INFO','Populate Phase Items table - G phase', 15);
313: hr_dm_utility.message('SUMM','Populate Phase Items table - G phase', 20);
314: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_g', 25);
315: hr_dm_utility.message('PARA','(none)', 30);
316:
317: -- error handling
318: EXCEPTION
319: WHEN OTHERS THEN
316:
317: -- error handling
318: EXCEPTION
319: WHEN OTHERS THEN
320: hr_dm_utility.error(SQLCODE,'hr_dm_init.populate_pi_table_g','(none)',
321: 'R');
322: RAISE;
323:
324: --
343: -- ------------------------------------------------------------------------
344:
345: --
346: PROCEDURE populate_pi_table_r(r_migration_data IN
347: hr_dm_utility.r_migration_rec) IS
348: --
349:
350: l_phase_id NUMBER;
351: l_group_id NUMBER;
365: --
366: BEGIN
367: --
368:
369: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_r', 5);
370: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
371:
372: l_phase_id := hr_dm_utility.get_phase_id('R',
373: r_migration_data.migration_id);
366: BEGIN
367: --
368:
369: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_r', 5);
370: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
371:
372: l_phase_id := hr_dm_utility.get_phase_id('R',
373: r_migration_data.migration_id);
374:
368:
369: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_r', 5);
370: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
371:
372: l_phase_id := hr_dm_utility.get_phase_id('R',
373: r_migration_data.migration_id);
374:
375: OPEN csr_select_pi;
376: LOOP
412: AND (table_name = l_table_name)));
413:
414: COMMIT;
415:
416: hr_dm_utility.message('INFO','Seeding ' || l_table_name, 11);
417:
418: END LOOP;
419: CLOSE csr_select_pi;
420:
417:
418: END LOOP;
419: CLOSE csr_select_pi;
420:
421: hr_dm_utility.message('INFO','Populate Phase Items table - R phase', 15);
422: hr_dm_utility.message('SUMM','Populate Phase Items table - R phase', 20);
423: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_r', 25);
424: hr_dm_utility.message('PARA','(none)', 30);
425:
418: END LOOP;
419: CLOSE csr_select_pi;
420:
421: hr_dm_utility.message('INFO','Populate Phase Items table - R phase', 15);
422: hr_dm_utility.message('SUMM','Populate Phase Items table - R phase', 20);
423: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_r', 25);
424: hr_dm_utility.message('PARA','(none)', 30);
425:
426: -- error handling
419: CLOSE csr_select_pi;
420:
421: hr_dm_utility.message('INFO','Populate Phase Items table - R phase', 15);
422: hr_dm_utility.message('SUMM','Populate Phase Items table - R phase', 20);
423: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_r', 25);
424: hr_dm_utility.message('PARA','(none)', 30);
425:
426: -- error handling
427: EXCEPTION
420:
421: hr_dm_utility.message('INFO','Populate Phase Items table - R phase', 15);
422: hr_dm_utility.message('SUMM','Populate Phase Items table - R phase', 20);
423: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_r', 25);
424: hr_dm_utility.message('PARA','(none)', 30);
425:
426: -- error handling
427: EXCEPTION
428: WHEN OTHERS THEN
425:
426: -- error handling
427: EXCEPTION
428: WHEN OTHERS THEN
429: hr_dm_utility.error(SQLCODE,'hr_dm_init.populate_pi_table_r','(none)',
430: 'R');
431: RAISE;
432:
433: --
463: --
464: BEGIN
465: --
466:
467: hr_dm_utility.message('ROUT','entry:hr_dm_init.get_filename', 5);
468: hr_dm_utility.message('PARA','(p_phase_item_id - ' || p_phase_item_id ||
469: ')(p_loader_conc_program - ' || p_loader_conc_program ||
470: ')', 10);
471:
464: BEGIN
465: --
466:
467: hr_dm_utility.message('ROUT','entry:hr_dm_init.get_filename', 5);
468: hr_dm_utility.message('PARA','(p_phase_item_id - ' || p_phase_item_id ||
469: ')(p_loader_conc_program - ' || p_loader_conc_program ||
470: ')', 10);
471:
472: l_length := length(to_char(p_phase_item_id));
483: ELSE
484: l_filename := 'DM' || l_filename || '.ldt';
485: END IF;
486:
487: hr_dm_utility.message('INFO','Generated filename', 15);
488: hr_dm_utility.message('SUMM','Generated filename', 20);
489: hr_dm_utility.message('ROUT','exit:hr_dm_init.get_filename', 25);
490: hr_dm_utility.message('PARA','(l_filename - ' || l_filename || ')', 30);
491:
484: l_filename := 'DM' || l_filename || '.ldt';
485: END IF;
486:
487: hr_dm_utility.message('INFO','Generated filename', 15);
488: hr_dm_utility.message('SUMM','Generated filename', 20);
489: hr_dm_utility.message('ROUT','exit:hr_dm_init.get_filename', 25);
490: hr_dm_utility.message('PARA','(l_filename - ' || l_filename || ')', 30);
491:
492:
485: END IF;
486:
487: hr_dm_utility.message('INFO','Generated filename', 15);
488: hr_dm_utility.message('SUMM','Generated filename', 20);
489: hr_dm_utility.message('ROUT','exit:hr_dm_init.get_filename', 25);
490: hr_dm_utility.message('PARA','(l_filename - ' || l_filename || ')', 30);
491:
492:
493: RETURN(l_filename);
486:
487: hr_dm_utility.message('INFO','Generated filename', 15);
488: hr_dm_utility.message('SUMM','Generated filename', 20);
489: hr_dm_utility.message('ROUT','exit:hr_dm_init.get_filename', 25);
490: hr_dm_utility.message('PARA','(l_filename - ' || l_filename || ')', 30);
491:
492:
493: RETURN(l_filename);
494:
494:
495: -- error handling
496: EXCEPTION
497: WHEN OTHERS THEN
498: hr_dm_utility.error(SQLCODE,'hr_dm_init.get_filename','(none)','R');
499: RAISE;
500:
501: --
502: END get_filename;
532: --
533: BEGIN
534: --
535:
536: hr_dm_utility.message('ROUT','entry:hr_dm_init.seed_ua_da_data', 5);
537: hr_dm_utility.message('PARA','(p_param_rec - record)', 10);
538:
539: hr_dm_utility.message('INFO','Seeding ' || p_param_rec.loader_name , 10);
540:
533: BEGIN
534: --
535:
536: hr_dm_utility.message('ROUT','entry:hr_dm_init.seed_ua_da_data', 5);
537: hr_dm_utility.message('PARA','(p_param_rec - record)', 10);
538:
539: hr_dm_utility.message('INFO','Seeding ' || p_param_rec.loader_name , 10);
540:
541: -- get phase_item_ids for ua and da phases
535:
536: hr_dm_utility.message('ROUT','entry:hr_dm_init.seed_ua_da_data', 5);
537: hr_dm_utility.message('PARA','(p_param_rec - record)', 10);
538:
539: hr_dm_utility.message('INFO','Seeding ' || p_param_rec.loader_name , 10);
540:
541: -- get phase_item_ids for ua and da phases
542: SELECT HR_DM_PHASE_ITEMS_S.nextval
543: INTO l_phase_item_id_da
640: FROM dual;
641:
642: COMMIT;
643:
644: hr_dm_utility.message('INFO','Seeded UA/DA phase item', 15);
645: hr_dm_utility.message('SUMM','Seeded UA/DA phase item', 20);
646: hr_dm_utility.message('ROUT','exit:hr_dm_init.seed_ua_da_data', 25);
647: hr_dm_utility.message('PARA','(none)', 30);
648:
641:
642: COMMIT;
643:
644: hr_dm_utility.message('INFO','Seeded UA/DA phase item', 15);
645: hr_dm_utility.message('SUMM','Seeded UA/DA phase item', 20);
646: hr_dm_utility.message('ROUT','exit:hr_dm_init.seed_ua_da_data', 25);
647: hr_dm_utility.message('PARA','(none)', 30);
648:
649: -- error handling
642: COMMIT;
643:
644: hr_dm_utility.message('INFO','Seeded UA/DA phase item', 15);
645: hr_dm_utility.message('SUMM','Seeded UA/DA phase item', 20);
646: hr_dm_utility.message('ROUT','exit:hr_dm_init.seed_ua_da_data', 25);
647: hr_dm_utility.message('PARA','(none)', 30);
648:
649: -- error handling
650: EXCEPTION
643:
644: hr_dm_utility.message('INFO','Seeded UA/DA phase item', 15);
645: hr_dm_utility.message('SUMM','Seeded UA/DA phase item', 20);
646: hr_dm_utility.message('ROUT','exit:hr_dm_init.seed_ua_da_data', 25);
647: hr_dm_utility.message('PARA','(none)', 30);
648:
649: -- error handling
650: EXCEPTION
651: WHEN OTHERS THEN
648:
649: -- error handling
650: EXCEPTION
651: WHEN OTHERS THEN
652: hr_dm_utility.error(SQLCODE,'hr_dm_init.seed_ua_da_data','(none)','R');
653: RAISE;
654:
655: --
656: END seed_ua_da_data;
672: -- ------------------------------------------------------------------------
673:
674: --
675: FUNCTION custom_specified(p_check_custom_flex_call VARCHAR2,
676: r_migration_data hr_dm_utility.r_migration_rec,
677: r_flexfield_rec r_flexfield_rec)
678: RETURN BOOLEAN IS
679: --
680:
684: --
685: BEGIN
686: --
687:
688: hr_dm_utility.message('ROUT','entry:hr_dm_init.custom_specified', 5);
689: hr_dm_utility.message('PARA','(p_check_custom_flex_call - ' ||
690: p_check_custom_flex_call ||
691: ')(r_migration_data - record)' ||
692: '(r_flexfield_rec - record)', 10);
685: BEGIN
686: --
687:
688: hr_dm_utility.message('ROUT','entry:hr_dm_init.custom_specified', 5);
689: hr_dm_utility.message('PARA','(p_check_custom_flex_call - ' ||
690: p_check_custom_flex_call ||
691: ')(r_migration_data - record)' ||
692: '(r_flexfield_rec - record)', 10);
693:
690: p_check_custom_flex_call ||
691: ')(r_migration_data - record)' ||
692: '(r_flexfield_rec - record)', 10);
693:
694: hr_dm_utility.message('INFO','Calling hr_dm_aol_ext.custom_test', 15);
695:
696:
697: IF r_flexfield_rec.flexfield_type = 'D' THEN
698: l_message := '(descriptive_flexfield_name =' ||
705: ')(id_flex_structure_codee =' ||
706: r_flexfield_rec.id_flex_structure_code || ')';
707: END IF;
708:
709: hr_dm_utility.message('INFO',l_message,12);
710:
711: -- call test code directly
712:
713: l_retval := hr_dm_aol_ext.custom_test(r_migration_data,
713: l_retval := hr_dm_aol_ext.custom_test(r_migration_data,
714: r_flexfield_rec);
715:
716: IF l_retval THEN
717: hr_dm_utility.message('INFO','Custom code requests download of ' ||
718: l_message, 30);
719: ELSE
720: hr_dm_utility.message('INFO','Custom code does not request download of ' ||
721: l_message, 30);
716: IF l_retval THEN
717: hr_dm_utility.message('INFO','Custom code requests download of ' ||
718: l_message, 30);
719: ELSE
720: hr_dm_utility.message('INFO','Custom code does not request download of ' ||
721: l_message, 30);
722: END IF;
723:
724:
721: l_message, 30);
722: END IF;
723:
724:
725: hr_dm_utility.message('INFO','Checked custom flex', 15);
726: hr_dm_utility.message('SUMM','Checked custom flex', 20);
727: hr_dm_utility.message('ROUT','exit:hr_dm_init.custom_specified', 25);
728: IF l_retval THEN
729: hr_dm_utility.message('PARA','(l_retval - TRUE)', 30);
722: END IF;
723:
724:
725: hr_dm_utility.message('INFO','Checked custom flex', 15);
726: hr_dm_utility.message('SUMM','Checked custom flex', 20);
727: hr_dm_utility.message('ROUT','exit:hr_dm_init.custom_specified', 25);
728: IF l_retval THEN
729: hr_dm_utility.message('PARA','(l_retval - TRUE)', 30);
730: ELSE
723:
724:
725: hr_dm_utility.message('INFO','Checked custom flex', 15);
726: hr_dm_utility.message('SUMM','Checked custom flex', 20);
727: hr_dm_utility.message('ROUT','exit:hr_dm_init.custom_specified', 25);
728: IF l_retval THEN
729: hr_dm_utility.message('PARA','(l_retval - TRUE)', 30);
730: ELSE
731: hr_dm_utility.message('PARA','(l_retval - FALSE)', 30);
725: hr_dm_utility.message('INFO','Checked custom flex', 15);
726: hr_dm_utility.message('SUMM','Checked custom flex', 20);
727: hr_dm_utility.message('ROUT','exit:hr_dm_init.custom_specified', 25);
728: IF l_retval THEN
729: hr_dm_utility.message('PARA','(l_retval - TRUE)', 30);
730: ELSE
731: hr_dm_utility.message('PARA','(l_retval - FALSE)', 30);
732: END IF;
733:
727: hr_dm_utility.message('ROUT','exit:hr_dm_init.custom_specified', 25);
728: IF l_retval THEN
729: hr_dm_utility.message('PARA','(l_retval - TRUE)', 30);
730: ELSE
731: hr_dm_utility.message('PARA','(l_retval - FALSE)', 30);
732: END IF;
733:
734: RETURN(l_retval);
735:
735:
736: -- error handling
737: EXCEPTION
738: WHEN OTHERS THEN
739: hr_dm_utility.error(SQLCODE,'hr_dm_init.custom_specified','(none)','R');
740: RAISE;
741:
742: --
743: END custom_specified;
758: --
759: -- ------------------------------------------------------------------------
760:
761: --
762: PROCEDURE seed_data (r_migration_data IN hr_dm_utility.r_migration_rec,
763: r_flexfield_data IN r_flexfield_rec,
764: p_phase_id_da IN NUMBER,
765: p_phase_id_ua IN NUMBER) IS
766: --
793: --
794: BEGIN
795: --
796:
797: hr_dm_utility.message('ROUT','entry:hr_dm_init.seed_data', 5);
798: hr_dm_utility.message('PARA','(r_migration_data - record)' ||
799: '(r_flexfield_data - record)' ||
800: '(p_phase_id_da - ' || p_phase_id_da ||
801: ')(p_phase_id_ua - ' || p_phase_id_ua ||
794: BEGIN
795: --
796:
797: hr_dm_utility.message('ROUT','entry:hr_dm_init.seed_data', 5);
798: hr_dm_utility.message('PARA','(r_migration_data - record)' ||
799: '(r_flexfield_data - record)' ||
800: '(p_phase_id_da - ' || p_phase_id_da ||
801: ')(p_phase_id_ua - ' || p_phase_id_ua ||
802: ')', 10);
815: OPEN csr_app_id;
816: FETCH csr_app_id INTO l_app_short_name;
817: CLOSE csr_app_id;
818:
819: hr_dm_utility.message('INFO','r_flexfield_data.flexfield_type - ' ||
820: r_flexfield_data.flexfield_type,1);
821:
822: IF r_flexfield_data.flexfield_type = 'K' THEN
823: -- key flexfield data
856: END IF;
857:
858: END IF;
859:
860: hr_dm_utility.message('INFO','l_param_rec.loader_name - ' ||
861: l_param_rec.loader_name,1);
862:
863:
864: -- null out unused entries
882: 'Y',
883: p_phase_id_da,
884: p_phase_id_ua);
885:
886: hr_dm_utility.message('INFO','Seeded UA/DA phase item', 15);
887: hr_dm_utility.message('SUMM','Seeded UA/DA phase item', 20);
888: hr_dm_utility.message('ROUT','exit:hr_dm_init.seed_ua_da_data', 25);
889: hr_dm_utility.message('PARA','(none)', 30);
890:
883: p_phase_id_da,
884: p_phase_id_ua);
885:
886: hr_dm_utility.message('INFO','Seeded UA/DA phase item', 15);
887: hr_dm_utility.message('SUMM','Seeded UA/DA phase item', 20);
888: hr_dm_utility.message('ROUT','exit:hr_dm_init.seed_ua_da_data', 25);
889: hr_dm_utility.message('PARA','(none)', 30);
890:
891: -- error handling
884: p_phase_id_ua);
885:
886: hr_dm_utility.message('INFO','Seeded UA/DA phase item', 15);
887: hr_dm_utility.message('SUMM','Seeded UA/DA phase item', 20);
888: hr_dm_utility.message('ROUT','exit:hr_dm_init.seed_ua_da_data', 25);
889: hr_dm_utility.message('PARA','(none)', 30);
890:
891: -- error handling
892: EXCEPTION
885:
886: hr_dm_utility.message('INFO','Seeded UA/DA phase item', 15);
887: hr_dm_utility.message('SUMM','Seeded UA/DA phase item', 20);
888: hr_dm_utility.message('ROUT','exit:hr_dm_init.seed_ua_da_data', 25);
889: hr_dm_utility.message('PARA','(none)', 30);
890:
891: -- error handling
892: EXCEPTION
893: WHEN OTHERS THEN
890:
891: -- error handling
892: EXCEPTION
893: WHEN OTHERS THEN
894: hr_dm_utility.error(SQLCODE,'hr_dm_init.seed_data','(none)','R');
895: RAISE;
896:
897: --
898: END seed_data;
919:
920:
921: --
922: PROCEDURE populate_pi_table_da(r_migration_data IN
923: hr_dm_utility.r_migration_rec) IS
924: --
925:
926: l_phase_id_da NUMBER;
927: l_phase_id_ua NUMBER;
1015: --
1016: BEGIN
1017: --
1018:
1019: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_da', 5);
1020: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
1021:
1022: l_phase_id_da := hr_dm_utility.get_phase_id('DA',
1023: r_migration_data.migration_id);
1016: BEGIN
1017: --
1018:
1019: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_da', 5);
1020: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
1021:
1022: l_phase_id_da := hr_dm_utility.get_phase_id('DA',
1023: r_migration_data.migration_id);
1024: l_phase_id_ua := hr_dm_utility.get_phase_id('UA',
1018:
1019: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_da', 5);
1020: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
1021:
1022: l_phase_id_da := hr_dm_utility.get_phase_id('DA',
1023: r_migration_data.migration_id);
1024: l_phase_id_ua := hr_dm_utility.get_phase_id('UA',
1025: r_migration_data.migration_id);
1026:
1020: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
1021:
1022: l_phase_id_da := hr_dm_utility.get_phase_id('DA',
1023: r_migration_data.migration_id);
1024: l_phase_id_ua := hr_dm_utility.get_phase_id('UA',
1025: r_migration_data.migration_id);
1026:
1027: -- see if we are using the custom_flex_solution
1028: l_check_custom_flex_call := check_custom_flex;
1041: -- no data is automatically seeded when:
1042: -- 1. l_check_custom_flex_call is not null
1043: -- 2. up/downloading flexfield data
1044:
1045: hr_dm_utility.message('INFO','Checking ' || l_param_rec.loader_name , 10);
1046: hr_dm_utility.message('INFO','l_check_custom_flex_call ' ||
1047: NVL(l_check_custom_flex_call,'-NULL-') , 10);
1048:
1049:
1042: -- 1. l_check_custom_flex_call is not null
1043: -- 2. up/downloading flexfield data
1044:
1045: hr_dm_utility.message('INFO','Checking ' || l_param_rec.loader_name , 10);
1046: hr_dm_utility.message('INFO','l_check_custom_flex_call ' ||
1047: NVL(l_check_custom_flex_call,'-NULL-') , 10);
1048:
1049:
1050: IF (
1085:
1086: IF r_migration_data.migration_type = 'SD' THEN
1087:
1088: -- selective dff migration
1089: hr_dm_utility.message('INFO','Seeding selective dff migration' , 10);
1090: OPEN csr_sdff;
1091: LOOP
1092: FETCH csr_sdff INTO r_flexfield_data;
1093: EXIT WHEN csr_sdff%NOTFOUND;
1107:
1108: ELSE
1109:
1110: -- non-selective migration
1111: hr_dm_utility.message('INFO','Seeding dff migration' , 10);
1112: OPEN csr_dff;
1113: LOOP
1114: FETCH csr_dff INTO r_flexfield_data;
1115: EXIT WHEN csr_dff%NOTFOUND;
1131: -- seed key flex for non-SL migrations
1132: IF r_migration_data.migration_type <> 'SL' THEN
1133:
1134: -- key flexfields
1135: hr_dm_utility.message('INFO','Seeding kff migration' , 10);
1136: OPEN csr_kff;
1137: LOOP
1138: FETCH csr_kff INTO r_flexfield_data;
1139: EXIT WHEN csr_kff%NOTFOUND;
1156: END IF;
1157:
1158: END IF;
1159:
1160: hr_dm_utility.message('INFO','Populate Phase Items table - DA phase', 15);
1161: hr_dm_utility.message('SUMM','Populate Phase Items table - DA phase', 20);
1162: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_da', 25);
1163: hr_dm_utility.message('PARA','(none)', 30);
1164:
1157:
1158: END IF;
1159:
1160: hr_dm_utility.message('INFO','Populate Phase Items table - DA phase', 15);
1161: hr_dm_utility.message('SUMM','Populate Phase Items table - DA phase', 20);
1162: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_da', 25);
1163: hr_dm_utility.message('PARA','(none)', 30);
1164:
1165: -- error handling
1158: END IF;
1159:
1160: hr_dm_utility.message('INFO','Populate Phase Items table - DA phase', 15);
1161: hr_dm_utility.message('SUMM','Populate Phase Items table - DA phase', 20);
1162: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_da', 25);
1163: hr_dm_utility.message('PARA','(none)', 30);
1164:
1165: -- error handling
1166: EXCEPTION
1159:
1160: hr_dm_utility.message('INFO','Populate Phase Items table - DA phase', 15);
1161: hr_dm_utility.message('SUMM','Populate Phase Items table - DA phase', 20);
1162: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_da', 25);
1163: hr_dm_utility.message('PARA','(none)', 30);
1164:
1165: -- error handling
1166: EXCEPTION
1167: WHEN OTHERS THEN
1164:
1165: -- error handling
1166: EXCEPTION
1167: WHEN OTHERS THEN
1168: hr_dm_utility.error(SQLCODE,'hr_dm_init.populate_pi_table_da','(none)',
1169: 'R');
1170: RAISE;
1171:
1172: --
1193:
1194:
1195: --
1196: PROCEDURE populate_pi_table_dp(r_migration_data IN
1197: hr_dm_utility.r_migration_rec) IS
1198: --
1199:
1200: l_phase_id NUMBER;
1201: l_group_id NUMBER;
1223: --
1224: BEGIN
1225: --
1226:
1227: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_dp', 5);
1228: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
1229:
1230: l_phase_id := hr_dm_utility.get_phase_id('DP',
1231: r_migration_data.migration_id);
1224: BEGIN
1225: --
1226:
1227: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_dp', 5);
1228: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
1229:
1230: l_phase_id := hr_dm_utility.get_phase_id('DP',
1231: r_migration_data.migration_id);
1232:
1226:
1227: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_dp', 5);
1228: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
1229:
1230: l_phase_id := hr_dm_utility.get_phase_id('DP',
1231: r_migration_data.migration_id);
1232:
1233: -- truncate datapump tables
1234: hr_dm_copy.delete_datapump_tables;
1295: AND (group_id = l_group_id)));
1296:
1297: COMMIT;
1298:
1299: hr_dm_utility.message('INFO','Seeding ' || l_group_text, 11);
1300:
1301:
1302: END LOOP;
1303: CLOSE csr_select_pi;
1302: END LOOP;
1303: CLOSE csr_select_pi;
1304:
1305:
1306: hr_dm_utility.message('INFO','Populate Phase Items table - DP phase', 15);
1307: hr_dm_utility.message('SUMM','Populate Phase Items table - DP phase', 20);
1308: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_dp', 25);
1309: hr_dm_utility.message('PARA','(none)', 30);
1310:
1303: CLOSE csr_select_pi;
1304:
1305:
1306: hr_dm_utility.message('INFO','Populate Phase Items table - DP phase', 15);
1307: hr_dm_utility.message('SUMM','Populate Phase Items table - DP phase', 20);
1308: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_dp', 25);
1309: hr_dm_utility.message('PARA','(none)', 30);
1310:
1311: -- error handling
1304:
1305:
1306: hr_dm_utility.message('INFO','Populate Phase Items table - DP phase', 15);
1307: hr_dm_utility.message('SUMM','Populate Phase Items table - DP phase', 20);
1308: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_dp', 25);
1309: hr_dm_utility.message('PARA','(none)', 30);
1310:
1311: -- error handling
1312: EXCEPTION
1305:
1306: hr_dm_utility.message('INFO','Populate Phase Items table - DP phase', 15);
1307: hr_dm_utility.message('SUMM','Populate Phase Items table - DP phase', 20);
1308: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_dp', 25);
1309: hr_dm_utility.message('PARA','(none)', 30);
1310:
1311: -- error handling
1312: EXCEPTION
1313: WHEN OTHERS THEN
1310:
1311: -- error handling
1312: EXCEPTION
1313: WHEN OTHERS THEN
1314: hr_dm_utility.error(SQLCODE,'hr_dm_init.populate_pi_table_dp','(none)',
1315: 'R');
1316: RAISE;
1317:
1318: --
1336:
1337:
1338: --
1339: PROCEDURE populate_pi_table_cp(r_migration_data IN
1340: hr_dm_utility.r_migration_rec) IS
1341: --
1342:
1343: --
1344: BEGIN
1343: --
1344: BEGIN
1345: --
1346:
1347: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_cp', 5);
1348: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
1349:
1350: --
1351: -- phase specific code to be inserted here
1344: BEGIN
1345: --
1346:
1347: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_cp', 5);
1348: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
1349:
1350: --
1351: -- phase specific code to be inserted here
1352: --
1354: --
1355: -- no code required
1356: --
1357:
1358: hr_dm_utility.message('INFO','Populate Phase Items table - CP phase', 15);
1359: hr_dm_utility.message('SUMM','Populate Phase Items table - CP phase', 20);
1360: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_cp', 25);
1361: hr_dm_utility.message('PARA','(none)', 30);
1362:
1355: -- no code required
1356: --
1357:
1358: hr_dm_utility.message('INFO','Populate Phase Items table - CP phase', 15);
1359: hr_dm_utility.message('SUMM','Populate Phase Items table - CP phase', 20);
1360: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_cp', 25);
1361: hr_dm_utility.message('PARA','(none)', 30);
1362:
1363: -- error handling
1356: --
1357:
1358: hr_dm_utility.message('INFO','Populate Phase Items table - CP phase', 15);
1359: hr_dm_utility.message('SUMM','Populate Phase Items table - CP phase', 20);
1360: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_cp', 25);
1361: hr_dm_utility.message('PARA','(none)', 30);
1362:
1363: -- error handling
1364: EXCEPTION
1357:
1358: hr_dm_utility.message('INFO','Populate Phase Items table - CP phase', 15);
1359: hr_dm_utility.message('SUMM','Populate Phase Items table - CP phase', 20);
1360: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_cp', 25);
1361: hr_dm_utility.message('PARA','(none)', 30);
1362:
1363: -- error handling
1364: EXCEPTION
1365: WHEN OTHERS THEN
1362:
1363: -- error handling
1364: EXCEPTION
1365: WHEN OTHERS THEN
1366: hr_dm_utility.error(SQLCODE,'hr_dm_init.populate_pi_table_cp','(none)',
1367: 'R');
1368: RAISE;
1369:
1370: --
1393:
1394:
1395: --
1396: PROCEDURE populate_pi_table_up(r_migration_data IN
1397: hr_dm_utility.r_migration_rec) IS
1398: --
1399:
1400: l_phase_id NUMBER;
1401: l_group_id NUMBER;
1429: --
1430: BEGIN
1431: --
1432:
1433: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_up', 5);
1434: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
1435:
1436: l_phase_id := hr_dm_utility.get_phase_id('UP',
1437: r_migration_data.migration_id);
1430: BEGIN
1431: --
1432:
1433: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_up', 5);
1434: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
1435:
1436: l_phase_id := hr_dm_utility.get_phase_id('UP',
1437: r_migration_data.migration_id);
1438:
1432:
1433: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_up', 5);
1434: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
1435:
1436: l_phase_id := hr_dm_utility.get_phase_id('UP',
1437: r_migration_data.migration_id);
1438:
1439: OPEN csr_select_pi;
1440: LOOP
1495: AND (group_id = l_group_id)));
1496:
1497: COMMIT;
1498:
1499: hr_dm_utility.message('INFO','Seeding ' || l_group_text, 11);
1500:
1501: END IF;
1502:
1503: END LOOP;
1511:
1512:
1513:
1514: IF r_migration_data.migration_type in ('FW','SR') THEN
1515: hr_dm_utility.message('INFO',
1516: 'Deleting hr_dm_resolve_pks table for source database' ||
1517: ' for FW or SR migration', 15);
1518: DELETE FROM hr_dm_resolve_pks
1519: WHERE source_database_instance = r_migration_data.source_database_instance;
1519: WHERE source_database_instance = r_migration_data.source_database_instance;
1520: END IF;
1521:
1522: IF r_migration_data.migration_type = 'A' THEN
1523: hr_dm_utility.message('INFO',
1524: 'Deleting hr_dm_resolve_pks table for source database' ||
1525: ' for A migration and NR_NAVIGATION_UNITS data', 15);
1526: DELETE FROM hr_dm_resolve_pks
1527: WHERE source_database_instance = r_migration_data.source_database_instance
1529: END IF;
1530:
1531:
1532:
1533: hr_dm_utility.message('INFO','Populate Phase Items table - UP phase', 15);
1534: hr_dm_utility.message('SUMM','Populate Phase Items table - UP phase', 20);
1535: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_up', 25);
1536: hr_dm_utility.message('PARA','(none)', 30);
1537:
1530:
1531:
1532:
1533: hr_dm_utility.message('INFO','Populate Phase Items table - UP phase', 15);
1534: hr_dm_utility.message('SUMM','Populate Phase Items table - UP phase', 20);
1535: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_up', 25);
1536: hr_dm_utility.message('PARA','(none)', 30);
1537:
1538: -- error handling
1531:
1532:
1533: hr_dm_utility.message('INFO','Populate Phase Items table - UP phase', 15);
1534: hr_dm_utility.message('SUMM','Populate Phase Items table - UP phase', 20);
1535: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_up', 25);
1536: hr_dm_utility.message('PARA','(none)', 30);
1537:
1538: -- error handling
1539: EXCEPTION
1532:
1533: hr_dm_utility.message('INFO','Populate Phase Items table - UP phase', 15);
1534: hr_dm_utility.message('SUMM','Populate Phase Items table - UP phase', 20);
1535: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_up', 25);
1536: hr_dm_utility.message('PARA','(none)', 30);
1537:
1538: -- error handling
1539: EXCEPTION
1540: WHEN OTHERS THEN
1537:
1538: -- error handling
1539: EXCEPTION
1540: WHEN OTHERS THEN
1541: hr_dm_utility.error(SQLCODE,'hr_dm_init.populate_pi_table_up','(none)',
1542: 'R');
1543: RAISE;
1544:
1545: --
1567: -- ------------------------------------------------------------------------
1568:
1569: --
1570: PROCEDURE populate_pi_table_ua(r_migration_data IN
1571: hr_dm_utility.r_migration_rec) IS
1572: --
1573:
1574: l_phase_id NUMBER;
1575: l_group_id NUMBER;
1598: --
1599: BEGIN
1600: --
1601:
1602: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_ua', 5);
1603: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
1604:
1605: l_phase_id := hr_dm_utility.get_phase_id('UA',
1606: r_migration_data.migration_id);
1599: BEGIN
1600: --
1601:
1602: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_ua', 5);
1603: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
1604:
1605: l_phase_id := hr_dm_utility.get_phase_id('UA',
1606: r_migration_data.migration_id);
1607:
1601:
1602: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_ua', 5);
1603: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
1604:
1605: l_phase_id := hr_dm_utility.get_phase_id('UA',
1606: r_migration_data.migration_id);
1607:
1608:
1609: -- no work is done in this procedure as the UA phase items are
1609: -- no work is done in this procedure as the UA phase items are
1610: -- seeded as part of the DA phase item seeding
1611:
1612:
1613: hr_dm_utility.message('INFO','Populate Phase Items table - UA phase', 15);
1614: hr_dm_utility.message('SUMM','Populate Phase Items table - UA phase', 20);
1615: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_ua', 25);
1616: hr_dm_utility.message('PARA','(none)', 30);
1617:
1610: -- seeded as part of the DA phase item seeding
1611:
1612:
1613: hr_dm_utility.message('INFO','Populate Phase Items table - UA phase', 15);
1614: hr_dm_utility.message('SUMM','Populate Phase Items table - UA phase', 20);
1615: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_ua', 25);
1616: hr_dm_utility.message('PARA','(none)', 30);
1617:
1618: -- error handling
1611:
1612:
1613: hr_dm_utility.message('INFO','Populate Phase Items table - UA phase', 15);
1614: hr_dm_utility.message('SUMM','Populate Phase Items table - UA phase', 20);
1615: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_ua', 25);
1616: hr_dm_utility.message('PARA','(none)', 30);
1617:
1618: -- error handling
1619: EXCEPTION
1612:
1613: hr_dm_utility.message('INFO','Populate Phase Items table - UA phase', 15);
1614: hr_dm_utility.message('SUMM','Populate Phase Items table - UA phase', 20);
1615: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_ua', 25);
1616: hr_dm_utility.message('PARA','(none)', 30);
1617:
1618: -- error handling
1619: EXCEPTION
1620: WHEN OTHERS THEN
1617:
1618: -- error handling
1619: EXCEPTION
1620: WHEN OTHERS THEN
1621: hr_dm_utility.error(SQLCODE,'hr_dm_init.populate_pi_table_ua','(none)',
1622: 'R');
1623: RAISE;
1624:
1625:
1646:
1647:
1648: --
1649: PROCEDURE populate_pi_table_d(r_migration_data IN
1650: hr_dm_utility.r_migration_rec) IS
1651: --
1652:
1653: l_phase_id NUMBER;
1654: l_group_id NUMBER;
1666: --
1667: BEGIN
1668: --
1669:
1670: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_d', 5);
1671: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
1672:
1673: l_phase_id := hr_dm_utility.get_phase_id('D',
1674: r_migration_data.migration_id);
1667: BEGIN
1668: --
1669:
1670: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_d', 5);
1671: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
1672:
1673: l_phase_id := hr_dm_utility.get_phase_id('D',
1674: r_migration_data.migration_id);
1675:
1669:
1670: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_d', 5);
1671: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
1672:
1673: l_phase_id := hr_dm_utility.get_phase_id('D',
1674: r_migration_data.migration_id);
1675:
1676:
1677: OPEN csr_select_pi;
1714: AND (group_id = l_group_id)));
1715:
1716: COMMIT;
1717:
1718: hr_dm_utility.message('INFO','Seeding ' || l_group_text, 11);
1719:
1720: END LOOP;
1721: CLOSE csr_select_pi;
1722:
1720: END LOOP;
1721: CLOSE csr_select_pi;
1722:
1723:
1724: hr_dm_utility.message('INFO','Populate Phase Items table - D phase', 15);
1725: hr_dm_utility.message('SUMM','Populate Phase Items table - D phase', 20);
1726: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_d', 25);
1727: hr_dm_utility.message('PARA','(none)', 30);
1728:
1721: CLOSE csr_select_pi;
1722:
1723:
1724: hr_dm_utility.message('INFO','Populate Phase Items table - D phase', 15);
1725: hr_dm_utility.message('SUMM','Populate Phase Items table - D phase', 20);
1726: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_d', 25);
1727: hr_dm_utility.message('PARA','(none)', 30);
1728:
1729: -- error handling
1722:
1723:
1724: hr_dm_utility.message('INFO','Populate Phase Items table - D phase', 15);
1725: hr_dm_utility.message('SUMM','Populate Phase Items table - D phase', 20);
1726: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_d', 25);
1727: hr_dm_utility.message('PARA','(none)', 30);
1728:
1729: -- error handling
1730: EXCEPTION
1723:
1724: hr_dm_utility.message('INFO','Populate Phase Items table - D phase', 15);
1725: hr_dm_utility.message('SUMM','Populate Phase Items table - D phase', 20);
1726: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_d', 25);
1727: hr_dm_utility.message('PARA','(none)', 30);
1728:
1729: -- error handling
1730: EXCEPTION
1731: WHEN OTHERS THEN
1728:
1729: -- error handling
1730: EXCEPTION
1731: WHEN OTHERS THEN
1732: hr_dm_utility.error(SQLCODE,'hr_dm_init.populate_pi_table_d','(none)',
1733: 'R');
1734: RAISE;
1735:
1736: --
1756:
1757:
1758: --
1759: PROCEDURE populate_pi_table_c(r_migration_data IN
1760: hr_dm_utility.r_migration_rec) IS
1761: --
1762:
1763: l_phase_id NUMBER;
1764: l_group_id NUMBER;
1788: --
1789: BEGIN
1790: --
1791:
1792: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_c', 5);
1793: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
1794:
1795: l_phase_id := hr_dm_utility.get_phase_id('C',
1796: r_migration_data.migration_id);
1789: BEGIN
1790: --
1791:
1792: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_c', 5);
1793: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
1794:
1795: l_phase_id := hr_dm_utility.get_phase_id('C',
1796: r_migration_data.migration_id);
1797:
1791:
1792: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table_c', 5);
1793: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
1794:
1795: l_phase_id := hr_dm_utility.get_phase_id('C',
1796: r_migration_data.migration_id);
1797:
1798: OPEN csr_select_pi;
1799: LOOP
1837: AND (loader_name = l_loader_name)));
1838:
1839: COMMIT;
1840:
1841: hr_dm_utility.message('INFO','Seeding ' || l_loader_name, 11);
1842:
1843: END LOOP;
1844: CLOSE csr_select_pi;
1845:
1843: END LOOP;
1844: CLOSE csr_select_pi;
1845:
1846:
1847: hr_dm_utility.message('INFO','Populate Phase Items table - C phase', 15);
1848: hr_dm_utility.message('SUMM','Populate Phase Items table - C phase', 20);
1849: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_c', 25);
1850: hr_dm_utility.message('PARA','(none)', 30);
1851:
1844: CLOSE csr_select_pi;
1845:
1846:
1847: hr_dm_utility.message('INFO','Populate Phase Items table - C phase', 15);
1848: hr_dm_utility.message('SUMM','Populate Phase Items table - C phase', 20);
1849: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_c', 25);
1850: hr_dm_utility.message('PARA','(none)', 30);
1851:
1852: -- error handling
1845:
1846:
1847: hr_dm_utility.message('INFO','Populate Phase Items table - C phase', 15);
1848: hr_dm_utility.message('SUMM','Populate Phase Items table - C phase', 20);
1849: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_c', 25);
1850: hr_dm_utility.message('PARA','(none)', 30);
1851:
1852: -- error handling
1853: EXCEPTION
1846:
1847: hr_dm_utility.message('INFO','Populate Phase Items table - C phase', 15);
1848: hr_dm_utility.message('SUMM','Populate Phase Items table - C phase', 20);
1849: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table_c', 25);
1850: hr_dm_utility.message('PARA','(none)', 30);
1851:
1852: -- error handling
1853: EXCEPTION
1854: WHEN OTHERS THEN
1851:
1852: -- error handling
1853: EXCEPTION
1854: WHEN OTHERS THEN
1855: hr_dm_utility.error(SQLCODE,'hr_dm_init.populate_pi_table_c','(none)'
1856: ,'R');
1857: RAISE;
1858:
1859: --
1879:
1880:
1881: --
1882: PROCEDURE populate_pi_table(r_migration_data IN
1883: hr_dm_utility.r_migration_rec,
1884: p_phase_name IN VARCHAR2) IS
1885: --
1886:
1887: --
1887: --
1888: BEGIN
1889: --
1890:
1891: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table', 5);
1892: hr_dm_utility.message('PARA','(r_migration_data - record' ||
1893: ')(p_phase_name - ' || p_phase_name || ')', 10);
1894:
1895: IF (p_phase_name = 'I') THEN
1888: BEGIN
1889: --
1890:
1891: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_pi_table', 5);
1892: hr_dm_utility.message('PARA','(r_migration_data - record' ||
1893: ')(p_phase_name - ' || p_phase_name || ')', 10);
1894:
1895: IF (p_phase_name = 'I') THEN
1896: populate_pi_table_i(r_migration_data);
1913: ELSIF (p_phase_name = 'C') THEN
1914: populate_pi_table_c(r_migration_data);
1915: END IF;
1916:
1917: hr_dm_utility.message('INFO','Populate Phase Items table -' ||
1918: ' calling phase code', 15);
1919: hr_dm_utility.message('SUMM','Populate Phase Items table -' ||
1920: ' calling phase code', 20);
1921: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table', 25);
1915: END IF;
1916:
1917: hr_dm_utility.message('INFO','Populate Phase Items table -' ||
1918: ' calling phase code', 15);
1919: hr_dm_utility.message('SUMM','Populate Phase Items table -' ||
1920: ' calling phase code', 20);
1921: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table', 25);
1922: hr_dm_utility.message('PARA','(none)', 30);
1923:
1917: hr_dm_utility.message('INFO','Populate Phase Items table -' ||
1918: ' calling phase code', 15);
1919: hr_dm_utility.message('SUMM','Populate Phase Items table -' ||
1920: ' calling phase code', 20);
1921: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table', 25);
1922: hr_dm_utility.message('PARA','(none)', 30);
1923:
1924: -- error handling
1925: EXCEPTION
1918: ' calling phase code', 15);
1919: hr_dm_utility.message('SUMM','Populate Phase Items table -' ||
1920: ' calling phase code', 20);
1921: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_pi_table', 25);
1922: hr_dm_utility.message('PARA','(none)', 30);
1923:
1924: -- error handling
1925: EXCEPTION
1926: WHEN OTHERS THEN
1923:
1924: -- error handling
1925: EXCEPTION
1926: WHEN OTHERS THEN
1927: hr_dm_utility.error(SQLCODE,'hr_dm_init.populate_pi_table','(none)','R');
1928: RAISE;
1929:
1930: --
1931: END populate_pi_table;
1949: -- ------------------------------------------------------------------------
1950:
1951: --
1952: PROCEDURE populate_phase_items(r_migration_data IN
1953: hr_dm_utility.r_migration_rec) IS
1954:
1955: --
1956:
1957: l_search_phase VARCHAR2(30);
1970: --
1971: BEGIN
1972: --
1973:
1974: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_phase_items', 5);
1975: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
1976:
1977: -- seed first phase
1978: l_search_phase := 'START';
1971: BEGIN
1972: --
1973:
1974: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_phase_items', 5);
1975: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
1976:
1977: -- seed first phase
1978: l_search_phase := 'START';
1979: l_next_phase := '?';
1992: l_search_phase := l_phase_name;
1993: CLOSE csr_phase_rule;
1994: END LOOP;
1995:
1996: hr_dm_utility.message('INFO','Populate Phase Items table', 15);
1997: hr_dm_utility.message('SUMM','Populate Phase Items table', 20);
1998: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_phase_items', 25);
1999: hr_dm_utility.message('PARA','(none)', 30);
2000:
1993: CLOSE csr_phase_rule;
1994: END LOOP;
1995:
1996: hr_dm_utility.message('INFO','Populate Phase Items table', 15);
1997: hr_dm_utility.message('SUMM','Populate Phase Items table', 20);
1998: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_phase_items', 25);
1999: hr_dm_utility.message('PARA','(none)', 30);
2000:
2001: -- error handling
1994: END LOOP;
1995:
1996: hr_dm_utility.message('INFO','Populate Phase Items table', 15);
1997: hr_dm_utility.message('SUMM','Populate Phase Items table', 20);
1998: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_phase_items', 25);
1999: hr_dm_utility.message('PARA','(none)', 30);
2000:
2001: -- error handling
2002: EXCEPTION
1995:
1996: hr_dm_utility.message('INFO','Populate Phase Items table', 15);
1997: hr_dm_utility.message('SUMM','Populate Phase Items table', 20);
1998: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_phase_items', 25);
1999: hr_dm_utility.message('PARA','(none)', 30);
2000:
2001: -- error handling
2002: EXCEPTION
2003: WHEN OTHERS THEN
2000:
2001: -- error handling
2002: EXCEPTION
2003: WHEN OTHERS THEN
2004: hr_dm_utility.error(SQLCODE,'hr_dm_init.populate_phase_items',
2005: '(none)','R');
2006: RAISE;
2007:
2008: --
2025: --
2026: -- ------------------------------------------------------------------------
2027:
2028: --
2029: PROCEDURE populate_p_table(r_migration_data IN hr_dm_utility.r_migration_rec,
2030: p_phase_name IN VARCHAR2) IS
2031: --
2032:
2033: --
2033: --
2034: BEGIN
2035: --
2036:
2037: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_p_table', 5);
2038: hr_dm_utility.message('PARA','(r_migration_data - record' ||
2039: ')(p_phase_name - ' || p_phase_name || ')', 10);
2040:
2041: INSERT INTO hr_dm_phases (PHASE_ID,
2034: BEGIN
2035: --
2036:
2037: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_p_table', 5);
2038: hr_dm_utility.message('PARA','(r_migration_data - record' ||
2039: ')(p_phase_name - ' || p_phase_name || ')', 10);
2040:
2041: INSERT INTO hr_dm_phases (PHASE_ID,
2042: MIGRATION_ID,
2067: AND (phase_name = p_phase_name)));
2068:
2069: COMMIT;
2070:
2071: hr_dm_utility.message('INFO','Populate Phases table', 15);
2072: hr_dm_utility.message('SUMM','Populate Phases table', 20);
2073: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_p_table', 25);
2074: hr_dm_utility.message('PARA','(none)', 30);
2075:
2068:
2069: COMMIT;
2070:
2071: hr_dm_utility.message('INFO','Populate Phases table', 15);
2072: hr_dm_utility.message('SUMM','Populate Phases table', 20);
2073: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_p_table', 25);
2074: hr_dm_utility.message('PARA','(none)', 30);
2075:
2076: -- error handling
2069: COMMIT;
2070:
2071: hr_dm_utility.message('INFO','Populate Phases table', 15);
2072: hr_dm_utility.message('SUMM','Populate Phases table', 20);
2073: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_p_table', 25);
2074: hr_dm_utility.message('PARA','(none)', 30);
2075:
2076: -- error handling
2077: EXCEPTION
2070:
2071: hr_dm_utility.message('INFO','Populate Phases table', 15);
2072: hr_dm_utility.message('SUMM','Populate Phases table', 20);
2073: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_p_table', 25);
2074: hr_dm_utility.message('PARA','(none)', 30);
2075:
2076: -- error handling
2077: EXCEPTION
2078: WHEN OTHERS THEN
2075:
2076: -- error handling
2077: EXCEPTION
2078: WHEN OTHERS THEN
2079: hr_dm_utility.error(SQLCODE,'hr_dm_init.populate_p_table','(none)','R');
2080: RAISE;
2081:
2082: --
2083: END populate_p_table;
2101: -- ------------------------------------------------------------------------
2102:
2103: --
2104: PROCEDURE populate_phases(r_migration_data IN
2105: hr_dm_utility.r_migration_rec) IS
2106: --
2107:
2108: l_phase_name VARCHAR2(30);
2109: l_database_location VARCHAR2(30);
2118: --
2119: BEGIN
2120: --
2121:
2122: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_phases', 5);
2123: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
2124:
2125:
2126: OPEN csr_phase_rule;
2119: BEGIN
2120: --
2121:
2122: hr_dm_utility.message('ROUT','entry:hr_dm_init.populate_phases', 5);
2123: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
2124:
2125:
2126: OPEN csr_phase_rule;
2127: LOOP
2130: populate_p_table(r_migration_data, l_phase_name);
2131: END LOOP;
2132: CLOSE csr_phase_rule;
2133:
2134: hr_dm_utility.message('INFO','Populate Phase Items table', 15);
2135: hr_dm_utility.message('SUMM','Populate Phase Items table', 20);
2136: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_phases', 25);
2137: hr_dm_utility.message('PARA','(none)', 30);
2138:
2131: END LOOP;
2132: CLOSE csr_phase_rule;
2133:
2134: hr_dm_utility.message('INFO','Populate Phase Items table', 15);
2135: hr_dm_utility.message('SUMM','Populate Phase Items table', 20);
2136: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_phases', 25);
2137: hr_dm_utility.message('PARA','(none)', 30);
2138:
2139: -- error handling
2132: CLOSE csr_phase_rule;
2133:
2134: hr_dm_utility.message('INFO','Populate Phase Items table', 15);
2135: hr_dm_utility.message('SUMM','Populate Phase Items table', 20);
2136: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_phases', 25);
2137: hr_dm_utility.message('PARA','(none)', 30);
2138:
2139: -- error handling
2140: EXCEPTION
2133:
2134: hr_dm_utility.message('INFO','Populate Phase Items table', 15);
2135: hr_dm_utility.message('SUMM','Populate Phase Items table', 20);
2136: hr_dm_utility.message('ROUT','exit:hr_dm_init.populate_phases', 25);
2137: hr_dm_utility.message('PARA','(none)', 30);
2138:
2139: -- error handling
2140: EXCEPTION
2141: WHEN OTHERS THEN
2138:
2139: -- error handling
2140: EXCEPTION
2141: WHEN OTHERS THEN
2142: hr_dm_utility.error(SQLCODE,'hr_dm_init.populate_phases','(none)','R');
2143: RAISE;
2144:
2145: --
2146: END populate_phases;
2167: --
2168: -- ------------------------------------------------------------------------
2169:
2170: --
2171: PROCEDURE main(r_migration_data IN hr_dm_utility.r_migration_rec) IS
2172: --
2173:
2174: l_current_phase_status VARCHAR2(30);
2175:
2176: --
2177: BEGIN
2178: --
2179:
2180: hr_dm_utility.message('ROUT','entry:hr_dm_init.main', 5);
2181: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
2182:
2183:
2184: -- get status of initialization phase, is phase completed?
2177: BEGIN
2178: --
2179:
2180: hr_dm_utility.message('ROUT','entry:hr_dm_init.main', 5);
2181: hr_dm_utility.message('PARA','(r_migration_data - record)', 10);
2182:
2183:
2184: -- get status of initialization phase, is phase completed?
2185: -- if null returned, then assume it is NS.
2182:
2183:
2184: -- get status of initialization phase, is phase completed?
2185: -- if null returned, then assume it is NS.
2186: l_current_phase_status := NVL(hr_dm_utility.get_phase_status('I',
2187: r_migration_data.migration_id), 'NS');
2188:
2189: -- is phase complete?
2190: -- if so, skip all processing
2190: -- if so, skip all processing
2191: IF (l_current_phase_status <> 'C') THEN
2192: -- do we need to explicitly rollback using rollback utility?
2193: IF (l_current_phase_status IN('S', 'E')) THEN
2194: hr_dm_utility.rollback(p_phase => 'I',
2195: p_migration_id => r_migration_data.migration_id);
2196: END IF;
2197:
2198:
2200: populate_phases(r_migration_data);
2201:
2202:
2203: -- update status to started
2204: hr_dm_utility.update_phases(p_new_status => 'S',
2205: p_id => hr_dm_utility.get_phase_id('I',
2206: r_migration_data.migration_id));
2207:
2208: -- populate phase_items table
2201:
2202:
2203: -- update status to started
2204: hr_dm_utility.update_phases(p_new_status => 'S',
2205: p_id => hr_dm_utility.get_phase_id('I',
2206: r_migration_data.migration_id));
2207:
2208: -- populate phase_items table
2209: populate_phase_items(r_migration_data);
2215: COMMIT;
2216: END IF;
2217:
2218: -- update status to completed
2219: hr_dm_utility.update_phases(p_new_status => 'C',
2220: p_id => hr_dm_utility.get_phase_id('I',
2221: r_migration_data.migration_id));
2222:
2223: END IF;
2216: END IF;
2217:
2218: -- update status to completed
2219: hr_dm_utility.update_phases(p_new_status => 'C',
2220: p_id => hr_dm_utility.get_phase_id('I',
2221: r_migration_data.migration_id));
2222:
2223: END IF;
2224:
2222:
2223: END IF;
2224:
2225:
2226: hr_dm_utility.message('INFO','Initialization Phase', 15);
2227: hr_dm_utility.message('SUMM','Initialization Phase', 20);
2228: hr_dm_utility.message('ROUT','exit:hr_dm_init.main', 25);
2229: hr_dm_utility.message('PARA','(none)', 30);
2230:
2223: END IF;
2224:
2225:
2226: hr_dm_utility.message('INFO','Initialization Phase', 15);
2227: hr_dm_utility.message('SUMM','Initialization Phase', 20);
2228: hr_dm_utility.message('ROUT','exit:hr_dm_init.main', 25);
2229: hr_dm_utility.message('PARA','(none)', 30);
2230:
2231: -- error handling
2224:
2225:
2226: hr_dm_utility.message('INFO','Initialization Phase', 15);
2227: hr_dm_utility.message('SUMM','Initialization Phase', 20);
2228: hr_dm_utility.message('ROUT','exit:hr_dm_init.main', 25);
2229: hr_dm_utility.message('PARA','(none)', 30);
2230:
2231: -- error handling
2232: EXCEPTION
2225:
2226: hr_dm_utility.message('INFO','Initialization Phase', 15);
2227: hr_dm_utility.message('SUMM','Initialization Phase', 20);
2228: hr_dm_utility.message('ROUT','exit:hr_dm_init.main', 25);
2229: hr_dm_utility.message('PARA','(none)', 30);
2230:
2231: -- error handling
2232: EXCEPTION
2233: WHEN OTHERS THEN
2230:
2231: -- error handling
2232: EXCEPTION
2233: WHEN OTHERS THEN
2234: hr_dm_utility.error(SQLCODE,'hr_dm_init.main','(none)','R');
2235: RAISE;
2236:
2237: --
2238: END main;