1: PACKAGE BODY hxt_otc_retrieval_interface AS
2: /* $Header: hxtotcri.pkb 120.11.12010000.4 2008/09/19 17:23:24 asrajago ship $ */
3: --
4: --
5: g_debug BOOLEAN := hr_utility.debug_enabled;
6: g_package CONSTANT VARCHAR2 (31) := 'hxc_otc_retrieval_interface.';
7:
8: TYPE t_timcards_tab IS TABLE OF NUMBER
9: INDEX BY VARCHAR2(255);
69: BEGIN
70: IF g_debug
71: THEN
72: l_proc := g_package || 'timecard_id';
73: hr_utility.set_location ('Entering: ' || l_proc, 10);
74: END IF;
75:
76: IF (p_sum_id IS NOT NULL)
77: THEN
91: END IF;
92:
93: IF g_debug
94: THEN
95: hr_utility.set_location ( 'Leaving: '
96: || l_proc
97: || ' returning timecard_id = '
98: || l_timecard_id,
99: 100
105: /*
106: || MAIN
107: */
108: BEGIN
109: g_debug := hr_utility.debug_enabled;
110:
111: IF g_debug
112: THEN
113: l_proc := g_package || 'is_retrievable';
110:
111: IF g_debug
112: THEN
113: l_proc := g_package || 'is_retrievable';
114: hr_utility.set_location ( 'Entering: '
115: || l_proc
116: || ' (p_sum_id IN = '
117: || p_sum_id
118: || ')',
130: o_dt_update_mod => l_dt_update_mode,
131: o_error_message => l_error_message,
132: o_return_code => l_return_code
133: );
134: hr_utility.set_location ('l_dt_update_mode = ' || l_dt_update_mode, 11);
135: hr_utility.set_location ('l_error_message = ' || l_error_message, 12);
136: hr_utility.set_location ('l_return_code = ' || l_return_code, 13);
137:
138: IF (l_dt_update_mode IS NULL)
131: o_error_message => l_error_message,
132: o_return_code => l_return_code
133: );
134: hr_utility.set_location ('l_dt_update_mode = ' || l_dt_update_mode, 11);
135: hr_utility.set_location ('l_error_message = ' || l_error_message, 12);
136: hr_utility.set_location ('l_return_code = ' || l_return_code, 13);
137:
138: IF (l_dt_update_mode IS NULL)
139: THEN
132: o_return_code => l_return_code
133: );
134: hr_utility.set_location ('l_dt_update_mode = ' || l_dt_update_mode, 11);
135: hr_utility.set_location ('l_error_message = ' || l_error_message, 12);
136: hr_utility.set_location ('l_return_code = ' || l_return_code, 13);
137:
138: IF (l_dt_update_mode IS NULL)
139: THEN
140: IF g_debug
138: IF (l_dt_update_mode IS NULL)
139: THEN
140: IF g_debug
141: THEN
142: hr_utility.set_location
143: ( ' This line is not retrievable (p_sum_id = '
144: || p_sum_id
145: || ')',
146: 20
153: END IF;
154:
155: IF g_debug
156: THEN
157: hr_utility.set_location ('Leaving: ' || l_proc, 100);
158: END IF;
159:
160: RETURN l_is_retrievable;
161: END is_retrievable;
173: -- local vars
174: l_employee_number VARCHAR2 (30);
175: l_full_name VARCHAR2 (240);
176: BEGIN
177: g_debug := hr_utility.debug_enabled;
178:
179: --
180: IF g_debug
181: THEN
178:
179: --
180: IF g_debug
181: THEN
182: hr_utility.set_location
183: ('HXT_OTC_RETRIEVAL_INTERFACE.get_employee_number',
184: 1
185: );
186: END IF;
208:
209: --
210: IF g_debug
211: THEN
212: hr_utility.set_location
213: ('HXT_OTC_RETRIEVAL_INTERFACE.employee_number',
214: 2
215: );
216: hr_utility.TRACE ('Employee Number is ' || l_employee_number);
212: hr_utility.set_location
213: ('HXT_OTC_RETRIEVAL_INTERFACE.employee_number',
214: 2
215: );
216: hr_utility.TRACE ('Employee Number is ' || l_employee_number);
217: hr_utility.TRACE ('Full Name is ' || l_full_name);
218: END IF;
219:
220: --
213: ('HXT_OTC_RETRIEVAL_INTERFACE.employee_number',
214: 2
215: );
216: hr_utility.TRACE ('Employee Number is ' || l_employee_number);
217: hr_utility.TRACE ('Full Name is ' || l_full_name);
218: END IF;
219:
220: --
221: RETURN (l_employee_number);
355: RETURN l_att_index;
356: EXCEPTION
357: WHEN OTHERS
358: THEN
359: hr_utility.TRACE ('exception is sync atts ' || SQLERRM);
360: RAISE;
361: END sync_attributes;
362:
363: --
382: -- Get the attributes of the detail record - element name, input values
383: --
384: IF g_debug
385: THEN
386: hr_utility.TRACE ('------ Start get_Attributes ------');
387: END IF;
388:
389: --
390: IF p_att_table.COUNT <> 0
391: THEN
392: --
393: IF g_debug
394: THEN
395: hr_utility.TRACE (' att table not empty');
396: END IF;
397:
398: l_att_index := NVL (p_last_att_index, p_att_table.FIRST);
399:
398: l_att_index := NVL (p_last_att_index, p_att_table.FIRST);
399:
400: IF g_debug
401: THEN
402: hr_utility.TRACE (' RM 2');
403: END IF;
404:
405: l_bld_blk_id := p_att_table (l_att_index).bb_id;
406:
405: l_bld_blk_id := p_att_table (l_att_index).bb_id;
406:
407: IF g_debug
408: THEN
409: hr_utility.TRACE (' RM 3');
410: END IF;
411: --
412: ELSE
413: --
417:
418: --
419: IF g_debug
420: THEN
421: hr_utility.TRACE ('------ Middle get_Attributes ------');
422: END IF;
423:
424: --
425: -- sanity check to make sure we are in sync
438: WHILE ((l_att_index IS NOT NULL) AND (NOT l_bb_id_changed))
439: LOOP
440: IF g_debug
441: THEN
442: hr_utility.TRACE ('------ In Attribute Loop ------');
443: END IF;
444:
445: p_field_name (l_att_index) := p_att_table (l_att_index).field_name;
446:
445: p_field_name (l_att_index) := p_att_table (l_att_index).field_name;
446:
447: IF g_debug
448: THEN
449: hr_utility.TRACE ( 'p_field_name(l_att_index) is '
450: || p_field_name (l_att_index)
451: );
452: END IF;
453:
463: p_value (l_att_index) := p_att_table (l_att_index).VALUE;
464:
465: IF g_debug
466: THEN
467: hr_utility.TRACE ( 'p_value(l_att_index) is '
468: || p_value (l_att_index)
469: );
470: END IF;
471:
472: p_context (l_att_index) := p_att_table (l_att_index).CONTEXT;
473:
474: IF g_debug
475: THEN
476: hr_utility.TRACE ( 'p_context(l_att_index) is '
477: || p_context (l_att_index)
478: );
479: END IF;
480:
481: p_category (l_att_index) := p_att_table (l_att_index).CATEGORY;
482:
483: IF g_debug
484: THEN
485: hr_utility.TRACE ( 'p_category(l_att_index) is '
486: || p_category (l_att_index)
487: );
488: END IF;
489:
513: BEGIN
514: --
515: IF g_debug
516: THEN
517: hr_utility.set_location ('get_element_name', 1);
518: END IF;
519:
520: --
521: BEGIN
540:
541: --
542: IF g_debug
543: THEN
544: hr_utility.set_location ('get_element_name', 2);
545: END IF;
546:
547: --
548: RETURN (l_element_name);
604:
605: l_id_flex_num NUMBER;
606: --
607: BEGIN
608: g_debug := hr_utility.debug_enabled;
609: pay_paywsqee_pkg.populate_context_items (g_bg_id, l_id_flex_num);
610:
611: --
612: -- Initialize 30 costing segments to NULL
618:
619: --
620: IF g_debug
621: THEN
622: hr_utility.set_location (c_proc, 10);
623: END IF;
624:
625: --
626: -- If the detail block is of type duration, then the number
632:
633: --
634: IF g_debug
635: THEN
636: hr_utility.set_location (c_proc, 20);
637: END IF;
638: --
639: END IF;
640:
640:
641: --
642: IF g_debug
643: THEN
644: hr_utility.set_location (c_proc, 30);
645: END IF;
646:
647: --
648: -- If the detail block is of type range, then the number
655:
656: --
657: IF g_debug
658: THEN
659: hr_utility.set_location (c_proc, 40);
660: END IF;
661: --
662: END IF;
663:
663:
664: --
665: IF g_debug
666: THEN
667: hr_utility.TRACE ('The Number of Hours is ' || TO_CHAR (p_hours));
668: hr_utility.set_location (c_proc, 50);
669: END IF;
670:
671: --
664: --
665: IF g_debug
666: THEN
667: hr_utility.TRACE ('The Number of Hours is ' || TO_CHAR (p_hours));
668: hr_utility.set_location (c_proc, 50);
669: END IF;
670:
671: --
672: -- Set up the date earned for the batch line. The
676:
677: --
678: IF g_debug
679: THEN
680: hr_utility.TRACE ( 'p_date_worked is '
681: || TO_CHAR (p_date_worked, 'DD-MON-YYYY')
682: );
683: hr_utility.TRACE ( 'p_start_time is '
684: || TO_CHAR (p_start_time, 'DD-MON-YYYY HH:MI:SS')
679: THEN
680: hr_utility.TRACE ( 'p_date_worked is '
681: || TO_CHAR (p_date_worked, 'DD-MON-YYYY')
682: );
683: hr_utility.TRACE ( 'p_start_time is '
684: || TO_CHAR (p_start_time, 'DD-MON-YYYY HH:MI:SS')
685: );
686: END IF;
687:
695: LOOP
696: --
697: IF g_debug
698: THEN
699: hr_utility.TRACE ('------ In Parse attribute Loop ------');
700: hr_utility.TRACE ('category is ' || p_category (l_att));
701: hr_utility.TRACE ('context is ' || p_context (l_att));
702: hr_utility.TRACE ('field_name is ' || p_field_name (l_att));
703: hr_utility.TRACE ('value is ' || p_value (l_att));
696: --
697: IF g_debug
698: THEN
699: hr_utility.TRACE ('------ In Parse attribute Loop ------');
700: hr_utility.TRACE ('category is ' || p_category (l_att));
701: hr_utility.TRACE ('context is ' || p_context (l_att));
702: hr_utility.TRACE ('field_name is ' || p_field_name (l_att));
703: hr_utility.TRACE ('value is ' || p_value (l_att));
704: hr_utility.set_location (c_proc, 200);
697: IF g_debug
698: THEN
699: hr_utility.TRACE ('------ In Parse attribute Loop ------');
700: hr_utility.TRACE ('category is ' || p_category (l_att));
701: hr_utility.TRACE ('context is ' || p_context (l_att));
702: hr_utility.TRACE ('field_name is ' || p_field_name (l_att));
703: hr_utility.TRACE ('value is ' || p_value (l_att));
704: hr_utility.set_location (c_proc, 200);
705: END IF;
698: THEN
699: hr_utility.TRACE ('------ In Parse attribute Loop ------');
700: hr_utility.TRACE ('category is ' || p_category (l_att));
701: hr_utility.TRACE ('context is ' || p_context (l_att));
702: hr_utility.TRACE ('field_name is ' || p_field_name (l_att));
703: hr_utility.TRACE ('value is ' || p_value (l_att));
704: hr_utility.set_location (c_proc, 200);
705: END IF;
706:
699: hr_utility.TRACE ('------ In Parse attribute Loop ------');
700: hr_utility.TRACE ('category is ' || p_category (l_att));
701: hr_utility.TRACE ('context is ' || p_context (l_att));
702: hr_utility.TRACE ('field_name is ' || p_field_name (l_att));
703: hr_utility.TRACE ('value is ' || p_value (l_att));
704: hr_utility.set_location (c_proc, 200);
705: END IF;
706:
707: --
700: hr_utility.TRACE ('category is ' || p_category (l_att));
701: hr_utility.TRACE ('context is ' || p_context (l_att));
702: hr_utility.TRACE ('field_name is ' || p_field_name (l_att));
703: hr_utility.TRACE ('value is ' || p_value (l_att));
704: hr_utility.set_location (c_proc, 200);
705: END IF;
706:
707: --
708: IF UPPER (p_field_name (l_att)) = 'DUMMY ELEMENT CONTEXT'
730:
731: --
732: IF g_debug
733: THEN
734: hr_utility.TRACE
735: ('---- Before setting the hours type ----');
736: hr_utility.TRACE ( 'MH assignment id is '
737: || p_assignment_id
738: );
732: IF g_debug
733: THEN
734: hr_utility.TRACE
735: ('---- Before setting the hours type ----');
736: hr_utility.TRACE ( 'MH assignment id is '
737: || p_assignment_id
738: );
739: hr_utility.TRACE ( 'MH earning policy id'
740: || l_earn_policy_id
735: ('---- Before setting the hours type ----');
736: hr_utility.TRACE ( 'MH assignment id is '
737: || p_assignment_id
738: );
739: hr_utility.TRACE ( 'MH earning policy id'
740: || l_earn_policy_id
741: );
742: hr_utility.TRACE ( 'MH base element type id '
743: || l_base_elt_id
738: );
739: hr_utility.TRACE ( 'MH earning policy id'
740: || l_earn_policy_id
741: );
742: hr_utility.TRACE ( 'MH base element type id '
743: || l_base_elt_id
744: );
745: hr_utility.TRACE ( 'MH l_element_type_id '
746: || l_element_type_id
741: );
742: hr_utility.TRACE ( 'MH base element type id '
743: || l_base_elt_id
744: );
745: hr_utility.TRACE ( 'MH l_element_type_id '
746: || l_element_type_id
747: );
748: hr_utility.TRACE ('MH p_hours_type ' || p_hours_type);
749: END IF;
744: );
745: hr_utility.TRACE ( 'MH l_element_type_id '
746: || l_element_type_id
747: );
748: hr_utility.TRACE ('MH p_hours_type ' || p_hours_type);
749: END IF;
750:
751: --
752: IF l_element_type_id = l_base_elt_id
759:
760: --
761: IF g_debug
762: THEN
763: hr_utility.TRACE
764: ('---- After setting the hours type ----');
765: hr_utility.TRACE ('MH p_hours_type ' || p_hours_type);
766: END IF;
767: --
761: IF g_debug
762: THEN
763: hr_utility.TRACE
764: ('---- After setting the hours type ----');
765: hr_utility.TRACE ('MH p_hours_type ' || p_hours_type);
766: END IF;
767: --
768: END IF;
769: --
834:
835: --
836: IF g_debug
837: THEN
838: hr_utility.set_location (c_proc, 90);
839: END IF;
840: --
841: END parse_attributes;
842:
918:
919: l_id_flex_num NUMBER;
920: --
921: BEGIN
922: g_debug := hr_utility.debug_enabled;
923: pay_paywsqee_pkg.populate_context_items (g_bg_id, l_id_flex_num);
924:
925: --
926: -- Initialize 30 costing segments to NULL
932:
933: --
934: IF g_debug
935: THEN
936: hr_utility.set_location (c_proc, 10);
937: END IF;
938:
939: --
940: -- If the detail block is of type duration, then the number
946:
947: --
948: IF g_debug
949: THEN
950: hr_utility.set_location (c_proc, 20);
951: END IF;
952: --
953: END IF;
954:
954:
955: --
956: IF g_debug
957: THEN
958: hr_utility.set_location (c_proc, 30);
959: END IF;
960:
961: --
962: -- If the detail block is of type range, then the number
969:
970: --
971: IF g_debug
972: THEN
973: hr_utility.set_location (c_proc, 40);
974: END IF;
975: --
976: END IF;
977:
977:
978: --
979: IF g_debug
980: THEN
981: hr_utility.TRACE ('The Number of Hours is ' || TO_CHAR (p_hours));
982: hr_utility.set_location (c_proc, 50);
983: END IF;
984:
985: --
978: --
979: IF g_debug
980: THEN
981: hr_utility.TRACE ('The Number of Hours is ' || TO_CHAR (p_hours));
982: hr_utility.set_location (c_proc, 50);
983: END IF;
984:
985: --
986: -- Set up the date earned for the batch line. The
990:
991: --
992: IF g_debug
993: THEN
994: hr_utility.TRACE ( 'p_date_worked is '
995: || TO_CHAR (p_date_worked, 'DD-MON-YYYY')
996: );
997: hr_utility.TRACE ( 'p_start_time is '
998: || TO_CHAR (p_start_time, 'DD-MON-YYYY HH:MI:SS')
993: THEN
994: hr_utility.TRACE ( 'p_date_worked is '
995: || TO_CHAR (p_date_worked, 'DD-MON-YYYY')
996: );
997: hr_utility.TRACE ( 'p_start_time is '
998: || TO_CHAR (p_start_time, 'DD-MON-YYYY HH:MI:SS')
999: );
1000: END IF;
1001:
1009: LOOP
1010: --
1011: IF g_debug
1012: THEN
1013: hr_utility.TRACE ('------ In Parse attribute Loop ------');
1014: hr_utility.TRACE ('category is ' || p_category (l_att));
1015: hr_utility.TRACE ('context is ' || p_context (l_att));
1016: hr_utility.TRACE ('field_name is ' || p_field_name (l_att));
1017: hr_utility.TRACE ('value is ' || p_value (l_att));
1010: --
1011: IF g_debug
1012: THEN
1013: hr_utility.TRACE ('------ In Parse attribute Loop ------');
1014: hr_utility.TRACE ('category is ' || p_category (l_att));
1015: hr_utility.TRACE ('context is ' || p_context (l_att));
1016: hr_utility.TRACE ('field_name is ' || p_field_name (l_att));
1017: hr_utility.TRACE ('value is ' || p_value (l_att));
1018: hr_utility.set_location (c_proc, 200);
1011: IF g_debug
1012: THEN
1013: hr_utility.TRACE ('------ In Parse attribute Loop ------');
1014: hr_utility.TRACE ('category is ' || p_category (l_att));
1015: hr_utility.TRACE ('context is ' || p_context (l_att));
1016: hr_utility.TRACE ('field_name is ' || p_field_name (l_att));
1017: hr_utility.TRACE ('value is ' || p_value (l_att));
1018: hr_utility.set_location (c_proc, 200);
1019: END IF;
1012: THEN
1013: hr_utility.TRACE ('------ In Parse attribute Loop ------');
1014: hr_utility.TRACE ('category is ' || p_category (l_att));
1015: hr_utility.TRACE ('context is ' || p_context (l_att));
1016: hr_utility.TRACE ('field_name is ' || p_field_name (l_att));
1017: hr_utility.TRACE ('value is ' || p_value (l_att));
1018: hr_utility.set_location (c_proc, 200);
1019: END IF;
1020:
1013: hr_utility.TRACE ('------ In Parse attribute Loop ------');
1014: hr_utility.TRACE ('category is ' || p_category (l_att));
1015: hr_utility.TRACE ('context is ' || p_context (l_att));
1016: hr_utility.TRACE ('field_name is ' || p_field_name (l_att));
1017: hr_utility.TRACE ('value is ' || p_value (l_att));
1018: hr_utility.set_location (c_proc, 200);
1019: END IF;
1020:
1021: --
1014: hr_utility.TRACE ('category is ' || p_category (l_att));
1015: hr_utility.TRACE ('context is ' || p_context (l_att));
1016: hr_utility.TRACE ('field_name is ' || p_field_name (l_att));
1017: hr_utility.TRACE ('value is ' || p_value (l_att));
1018: hr_utility.set_location (c_proc, 200);
1019: END IF;
1020:
1021: --
1022: IF UPPER (p_field_name (l_att)) = 'DUMMY ELEMENT CONTEXT'
1044:
1045: --
1046: IF g_debug
1047: THEN
1048: hr_utility.TRACE
1049: ('---- Before setting the hours type ----');
1050: hr_utility.TRACE ( 'MH assignment id is '
1051: || p_assignment_id
1052: );
1046: IF g_debug
1047: THEN
1048: hr_utility.TRACE
1049: ('---- Before setting the hours type ----');
1050: hr_utility.TRACE ( 'MH assignment id is '
1051: || p_assignment_id
1052: );
1053: hr_utility.TRACE ( 'MH earning policy id'
1054: || l_earn_policy_id
1049: ('---- Before setting the hours type ----');
1050: hr_utility.TRACE ( 'MH assignment id is '
1051: || p_assignment_id
1052: );
1053: hr_utility.TRACE ( 'MH earning policy id'
1054: || l_earn_policy_id
1055: );
1056: hr_utility.TRACE ( 'MH base element type id '
1057: || l_base_elt_id
1052: );
1053: hr_utility.TRACE ( 'MH earning policy id'
1054: || l_earn_policy_id
1055: );
1056: hr_utility.TRACE ( 'MH base element type id '
1057: || l_base_elt_id
1058: );
1059: hr_utility.TRACE ( 'MH l_element_type_id '
1060: || l_element_type_id
1055: );
1056: hr_utility.TRACE ( 'MH base element type id '
1057: || l_base_elt_id
1058: );
1059: hr_utility.TRACE ( 'MH l_element_type_id '
1060: || l_element_type_id
1061: );
1062: hr_utility.TRACE ('MH p_hours_type ' || p_hours_type);
1063: END IF;
1058: );
1059: hr_utility.TRACE ( 'MH l_element_type_id '
1060: || l_element_type_id
1061: );
1062: hr_utility.TRACE ('MH p_hours_type ' || p_hours_type);
1063: END IF;
1064:
1065: --
1066: IF l_element_type_id = l_base_elt_id
1073:
1074: --
1075: IF g_debug
1076: THEN
1077: hr_utility.TRACE
1078: ('---- After setting the hours type ----');
1079: hr_utility.TRACE ('MH p_hours_type ' || p_hours_type);
1080: END IF;
1081: --
1075: IF g_debug
1076: THEN
1077: hr_utility.TRACE
1078: ('---- After setting the hours type ----');
1079: hr_utility.TRACE ('MH p_hours_type ' || p_hours_type);
1080: END IF;
1081: --
1082: END IF;
1083: --
1185:
1186: --
1187: IF g_debug
1188: THEN
1189: hr_utility.set_location (c_proc, 90);
1190: END IF;
1191: --
1192: END parse_attributes;
1193:
1439: BEGIN
1440: --
1441: IF g_debug
1442: THEN
1443: hr_utility.set_location
1444: ('HXT_OTC_RETRIEVAL_INTERFACE.get_ele_type_id',
1445: 1
1446: );
1447: END IF;
1475:
1476: --
1477: IF g_debug
1478: THEN
1479: hr_utility.set_location
1480: ('HXT_OTC_RETRIEVAL_INTERFACE.get_ele_type_id',
1481: 2
1482: );
1483: END IF;
1540: --
1541: BEGIN
1542: IF g_debug
1543: THEN
1544: hr_utility.TRACE ('---- Before Call to Record Time API ----');
1545: hr_utility.TRACE ('employee_number is ' || p_employee_number);
1546: hr_utility.TRACE ('approver_number is ' || p_approver_number);
1547: hr_utility.TRACE ( 'date_worked is '
1548: || TO_CHAR (p_date_worked, 'DD-MON-YYYY')
1541: BEGIN
1542: IF g_debug
1543: THEN
1544: hr_utility.TRACE ('---- Before Call to Record Time API ----');
1545: hr_utility.TRACE ('employee_number is ' || p_employee_number);
1546: hr_utility.TRACE ('approver_number is ' || p_approver_number);
1547: hr_utility.TRACE ( 'date_worked is '
1548: || TO_CHAR (p_date_worked, 'DD-MON-YYYY')
1549: );
1542: IF g_debug
1543: THEN
1544: hr_utility.TRACE ('---- Before Call to Record Time API ----');
1545: hr_utility.TRACE ('employee_number is ' || p_employee_number);
1546: hr_utility.TRACE ('approver_number is ' || p_approver_number);
1547: hr_utility.TRACE ( 'date_worked is '
1548: || TO_CHAR (p_date_worked, 'DD-MON-YYYY')
1549: );
1550: hr_utility.TRACE ( 'start_time is '
1543: THEN
1544: hr_utility.TRACE ('---- Before Call to Record Time API ----');
1545: hr_utility.TRACE ('employee_number is ' || p_employee_number);
1546: hr_utility.TRACE ('approver_number is ' || p_approver_number);
1547: hr_utility.TRACE ( 'date_worked is '
1548: || TO_CHAR (p_date_worked, 'DD-MON-YYYY')
1549: );
1550: hr_utility.TRACE ( 'start_time is '
1551: || TO_CHAR (p_start_time,
1546: hr_utility.TRACE ('approver_number is ' || p_approver_number);
1547: hr_utility.TRACE ( 'date_worked is '
1548: || TO_CHAR (p_date_worked, 'DD-MON-YYYY')
1549: );
1550: hr_utility.TRACE ( 'start_time is '
1551: || TO_CHAR (p_start_time,
1552: 'DD-MON-YYYY HH:MI:SS')
1553: );
1554: hr_utility.TRACE ( 'end_time is '
1550: hr_utility.TRACE ( 'start_time is '
1551: || TO_CHAR (p_start_time,
1552: 'DD-MON-YYYY HH:MI:SS')
1553: );
1554: hr_utility.TRACE ( 'end_time is '
1555: || TO_CHAR (p_end_time, 'DD-MON-YYYY HH:MI:SS')
1556: );
1557: hr_utility.TRACE ('hours is ' || TO_CHAR (p_hours));
1558: hr_utility.TRACE ('hours_type is ' || p_hours_type);
1553: );
1554: hr_utility.TRACE ( 'end_time is '
1555: || TO_CHAR (p_end_time, 'DD-MON-YYYY HH:MI:SS')
1556: );
1557: hr_utility.TRACE ('hours is ' || TO_CHAR (p_hours));
1558: hr_utility.TRACE ('hours_type is ' || p_hours_type);
1559: hr_utility.TRACE ('earning_policy is ' || p_earning_policy);
1560: hr_utility.TRACE ('project is ' || p_project);
1561: hr_utility.TRACE ('task is ' || p_task);
1554: hr_utility.TRACE ( 'end_time is '
1555: || TO_CHAR (p_end_time, 'DD-MON-YYYY HH:MI:SS')
1556: );
1557: hr_utility.TRACE ('hours is ' || TO_CHAR (p_hours));
1558: hr_utility.TRACE ('hours_type is ' || p_hours_type);
1559: hr_utility.TRACE ('earning_policy is ' || p_earning_policy);
1560: hr_utility.TRACE ('project is ' || p_project);
1561: hr_utility.TRACE ('task is ' || p_task);
1562: hr_utility.TRACE ('location is ' || p_location);
1555: || TO_CHAR (p_end_time, 'DD-MON-YYYY HH:MI:SS')
1556: );
1557: hr_utility.TRACE ('hours is ' || TO_CHAR (p_hours));
1558: hr_utility.TRACE ('hours_type is ' || p_hours_type);
1559: hr_utility.TRACE ('earning_policy is ' || p_earning_policy);
1560: hr_utility.TRACE ('project is ' || p_project);
1561: hr_utility.TRACE ('task is ' || p_task);
1562: hr_utility.TRACE ('location is ' || p_location);
1563: hr_utility.TRACE ('rate_multiple is '
1556: );
1557: hr_utility.TRACE ('hours is ' || TO_CHAR (p_hours));
1558: hr_utility.TRACE ('hours_type is ' || p_hours_type);
1559: hr_utility.TRACE ('earning_policy is ' || p_earning_policy);
1560: hr_utility.TRACE ('project is ' || p_project);
1561: hr_utility.TRACE ('task is ' || p_task);
1562: hr_utility.TRACE ('location is ' || p_location);
1563: hr_utility.TRACE ('rate_multiple is '
1564: || TO_CHAR (p_rate_multiple)
1557: hr_utility.TRACE ('hours is ' || TO_CHAR (p_hours));
1558: hr_utility.TRACE ('hours_type is ' || p_hours_type);
1559: hr_utility.TRACE ('earning_policy is ' || p_earning_policy);
1560: hr_utility.TRACE ('project is ' || p_project);
1561: hr_utility.TRACE ('task is ' || p_task);
1562: hr_utility.TRACE ('location is ' || p_location);
1563: hr_utility.TRACE ('rate_multiple is '
1564: || TO_CHAR (p_rate_multiple)
1565: );
1558: hr_utility.TRACE ('hours_type is ' || p_hours_type);
1559: hr_utility.TRACE ('earning_policy is ' || p_earning_policy);
1560: hr_utility.TRACE ('project is ' || p_project);
1561: hr_utility.TRACE ('task is ' || p_task);
1562: hr_utility.TRACE ('location is ' || p_location);
1563: hr_utility.TRACE ('rate_multiple is '
1564: || TO_CHAR (p_rate_multiple)
1565: );
1566: hr_utility.TRACE ('hourly_rate is ' || TO_CHAR (p_rate_multiple));
1559: hr_utility.TRACE ('earning_policy is ' || p_earning_policy);
1560: hr_utility.TRACE ('project is ' || p_project);
1561: hr_utility.TRACE ('task is ' || p_task);
1562: hr_utility.TRACE ('location is ' || p_location);
1563: hr_utility.TRACE ('rate_multiple is '
1564: || TO_CHAR (p_rate_multiple)
1565: );
1566: hr_utility.TRACE ('hourly_rate is ' || TO_CHAR (p_rate_multiple));
1567: hr_utility.TRACE ('amount is ' || TO_CHAR (p_amount));
1562: hr_utility.TRACE ('location is ' || p_location);
1563: hr_utility.TRACE ('rate_multiple is '
1564: || TO_CHAR (p_rate_multiple)
1565: );
1566: hr_utility.TRACE ('hourly_rate is ' || TO_CHAR (p_rate_multiple));
1567: hr_utility.TRACE ('amount is ' || TO_CHAR (p_amount));
1568: hr_utility.TRACE ( 'time_summary_id is '
1569: || TO_CHAR (p_time_summary_id)
1570: );
1563: hr_utility.TRACE ('rate_multiple is '
1564: || TO_CHAR (p_rate_multiple)
1565: );
1566: hr_utility.TRACE ('hourly_rate is ' || TO_CHAR (p_rate_multiple));
1567: hr_utility.TRACE ('amount is ' || TO_CHAR (p_amount));
1568: hr_utility.TRACE ( 'time_summary_id is '
1569: || TO_CHAR (p_time_summary_id)
1570: );
1571: hr_utility.TRACE ( 'time_sum_start_date is '
1564: || TO_CHAR (p_rate_multiple)
1565: );
1566: hr_utility.TRACE ('hourly_rate is ' || TO_CHAR (p_rate_multiple));
1567: hr_utility.TRACE ('amount is ' || TO_CHAR (p_amount));
1568: hr_utility.TRACE ( 'time_summary_id is '
1569: || TO_CHAR (p_time_summary_id)
1570: );
1571: hr_utility.TRACE ( 'time_sum_start_date is '
1572: || TO_CHAR (p_time_sum_start_date,
1567: hr_utility.TRACE ('amount is ' || TO_CHAR (p_amount));
1568: hr_utility.TRACE ( 'time_summary_id is '
1569: || TO_CHAR (p_time_summary_id)
1570: );
1571: hr_utility.TRACE ( 'time_sum_start_date is '
1572: || TO_CHAR (p_time_sum_start_date,
1573: 'DD-MON-YYYY')
1574: );
1575: hr_utility.TRACE ( 'time_sum_end_date is '
1571: hr_utility.TRACE ( 'time_sum_start_date is '
1572: || TO_CHAR (p_time_sum_start_date,
1573: 'DD-MON-YYYY')
1574: );
1575: hr_utility.TRACE ( 'time_sum_end_date is '
1576: || TO_CHAR (p_time_sum_end_date, 'DD-MON-YYYY')
1577: );
1578: END IF;
1579:
1689:
1690: --
1691: IF g_debug
1692: THEN
1693: hr_utility.TRACE ( 'TIM_SUM_ID IS : '
1694: || TO_CHAR (l_created_tim_sum_id)
1695: );
1696: hr_utility.TRACE ('l_timecard_id is : ' || TO_CHAR (l_timecard_id));
1697: END IF;
1692: THEN
1693: hr_utility.TRACE ( 'TIM_SUM_ID IS : '
1694: || TO_CHAR (l_created_tim_sum_id)
1695: );
1696: hr_utility.TRACE ('l_timecard_id is : ' || TO_CHAR (l_timecard_id));
1697: END IF;
1698:
1699: --
1700: IF (NOT g_timecards.EXISTS (l_timecard_id))
1744:
1745: --
1746: IF g_debug
1747: THEN
1748: hr_utility.set_location (c_proc, 7);
1749: END IF;
1750:
1751: --
1752: hxt_batch_process.main_process (errbuf => l_errbuf,
1924: BEGIN
1925: --
1926: IF g_debug
1927: THEN
1928: hr_utility.set_location
1929: ('HXT_OTC_RETRIEVAL_INTERFACE.get_batch_info',
1930: 1
1931: );
1932: END IF;
1962:
1963: --
1964: IF g_debug
1965: THEN
1966: hr_utility.set_location
1967: ('HXT_OTC_RETRIEVAL_INTERFACE.get_batch_info',
1968: 2
1969: );
1970: END IF;
1980:
1981: --
1982: IF g_debug
1983: THEN
1984: hr_utility.set_location
1985: ('HXT_OTC_RETRIEVAL_INTERFACE.get_batch_info',
1986: 3
1987: );
1988: END IF;
2014:
2015: --
2016: IF g_debug
2017: THEN
2018: hr_utility.set_location
2019: ('HXT_OTC_RETRIEVAL_INTERFACE.get_batch_info',
2020: 4
2021: );
2022: END IF;
2031:
2032: --
2033: IF g_debug
2034: THEN
2035: hr_utility.set_location
2036: ('HXT_OTC_RETRIEVAL_INTERFACE.get_batch_info',
2037: 5
2038: );
2039: END IF;
2056: BEGIN
2057: --
2058: IF g_debug
2059: THEN
2060: hr_utility.TRACE ('----- In procedure set_transaction -----');
2061: hr_utility.TRACE ('Setting status for bb_id ' || TO_CHAR (p_bb_id)
2062: );
2063: hr_utility.TRACE ('Status is ' || p_status);
2064: hr_utility.TRACE ('Exception is ' || p_excep);
2057: --
2058: IF g_debug
2059: THEN
2060: hr_utility.TRACE ('----- In procedure set_transaction -----');
2061: hr_utility.TRACE ('Setting status for bb_id ' || TO_CHAR (p_bb_id)
2062: );
2063: hr_utility.TRACE ('Status is ' || p_status);
2064: hr_utility.TRACE ('Exception is ' || p_excep);
2065: END IF;
2059: THEN
2060: hr_utility.TRACE ('----- In procedure set_transaction -----');
2061: hr_utility.TRACE ('Setting status for bb_id ' || TO_CHAR (p_bb_id)
2062: );
2063: hr_utility.TRACE ('Status is ' || p_status);
2064: hr_utility.TRACE ('Exception is ' || p_excep);
2065: END IF;
2066:
2067: IF (hxc_generic_retrieval_pkg.t_tx_detail_bb_id (p_bb_index) <>
2060: hr_utility.TRACE ('----- In procedure set_transaction -----');
2061: hr_utility.TRACE ('Setting status for bb_id ' || TO_CHAR (p_bb_id)
2062: );
2063: hr_utility.TRACE ('Status is ' || p_status);
2064: hr_utility.TRACE ('Exception is ' || p_excep);
2065: END IF;
2066:
2067: IF (hxc_generic_retrieval_pkg.t_tx_detail_bb_id (p_bb_index) <>
2068: p_bb_id
2079: p_excep;
2080:
2081: IF g_debug
2082: THEN
2083: hr_utility.TRACE ('----- Done setting status -----');
2084: END IF;
2085: END set_transaction;
2086: --
2087: -------------------------- transfer_to_otm Main --------------------
2087: -------------------------- transfer_to_otm Main --------------------
2088: --
2089: -- Main Procedure
2090: BEGIN
2091: g_debug := hr_utility.debug_enabled;
2092:
2093: --
2094: --
2095: --
2094: --
2095: --
2096: IF g_debug
2097: THEN
2098: hr_utility.set_location (c_proc, 1);
2099: END IF;
2100:
2101: --
2102: g_timecards.DELETE;
2105:
2106: --
2107: IF g_debug
2108: THEN
2109: hr_utility.TRACE ('****** Parameters are: ******');
2110: hr_utility.TRACE ('p_bg_id is: ' || TO_CHAR (p_bg_id));
2111: hr_utility.TRACE ('p_incremental is: ' || p_incremental);
2112: hr_utility.TRACE ('p_start_date is: ' || p_start_date);
2113: hr_utility.TRACE ('p_end_date is: ' || p_end_date);
2106: --
2107: IF g_debug
2108: THEN
2109: hr_utility.TRACE ('****** Parameters are: ******');
2110: hr_utility.TRACE ('p_bg_id is: ' || TO_CHAR (p_bg_id));
2111: hr_utility.TRACE ('p_incremental is: ' || p_incremental);
2112: hr_utility.TRACE ('p_start_date is: ' || p_start_date);
2113: hr_utility.TRACE ('p_end_date is: ' || p_end_date);
2114: hr_utility.TRACE ( 'p_retrieval_transaction_code is: '
2107: IF g_debug
2108: THEN
2109: hr_utility.TRACE ('****** Parameters are: ******');
2110: hr_utility.TRACE ('p_bg_id is: ' || TO_CHAR (p_bg_id));
2111: hr_utility.TRACE ('p_incremental is: ' || p_incremental);
2112: hr_utility.TRACE ('p_start_date is: ' || p_start_date);
2113: hr_utility.TRACE ('p_end_date is: ' || p_end_date);
2114: hr_utility.TRACE ( 'p_retrieval_transaction_code is: '
2115: || p_retrieval_transaction_code
2108: THEN
2109: hr_utility.TRACE ('****** Parameters are: ******');
2110: hr_utility.TRACE ('p_bg_id is: ' || TO_CHAR (p_bg_id));
2111: hr_utility.TRACE ('p_incremental is: ' || p_incremental);
2112: hr_utility.TRACE ('p_start_date is: ' || p_start_date);
2113: hr_utility.TRACE ('p_end_date is: ' || p_end_date);
2114: hr_utility.TRACE ( 'p_retrieval_transaction_code is: '
2115: || p_retrieval_transaction_code
2116: );
2109: hr_utility.TRACE ('****** Parameters are: ******');
2110: hr_utility.TRACE ('p_bg_id is: ' || TO_CHAR (p_bg_id));
2111: hr_utility.TRACE ('p_incremental is: ' || p_incremental);
2112: hr_utility.TRACE ('p_start_date is: ' || p_start_date);
2113: hr_utility.TRACE ('p_end_date is: ' || p_end_date);
2114: hr_utility.TRACE ( 'p_retrieval_transaction_code is: '
2115: || p_retrieval_transaction_code
2116: );
2117: hr_utility.TRACE ('p_batch_ref is: ' || p_batch_ref);
2110: hr_utility.TRACE ('p_bg_id is: ' || TO_CHAR (p_bg_id));
2111: hr_utility.TRACE ('p_incremental is: ' || p_incremental);
2112: hr_utility.TRACE ('p_start_date is: ' || p_start_date);
2113: hr_utility.TRACE ('p_end_date is: ' || p_end_date);
2114: hr_utility.TRACE ( 'p_retrieval_transaction_code is: '
2115: || p_retrieval_transaction_code
2116: );
2117: hr_utility.TRACE ('p_batch_ref is: ' || p_batch_ref);
2118: hr_utility.TRACE ('p_transfer_to_bee is: ' || p_transfer_to_bee);
2113: hr_utility.TRACE ('p_end_date is: ' || p_end_date);
2114: hr_utility.TRACE ( 'p_retrieval_transaction_code is: '
2115: || p_retrieval_transaction_code
2116: );
2117: hr_utility.TRACE ('p_batch_ref is: ' || p_batch_ref);
2118: hr_utility.TRACE ('p_transfer_to_bee is: ' || p_transfer_to_bee);
2119: END IF;
2120:
2121: --
2114: hr_utility.TRACE ( 'p_retrieval_transaction_code is: '
2115: || p_retrieval_transaction_code
2116: );
2117: hr_utility.TRACE ('p_batch_ref is: ' || p_batch_ref);
2118: hr_utility.TRACE ('p_transfer_to_bee is: ' || p_transfer_to_bee);
2119: END IF;
2120:
2121: --
2122: IF g_debug
2120:
2121: --
2122: IF g_debug
2123: THEN
2124: hr_utility.set_location (c_proc, 10);
2125: END IF;
2126:
2127: --
2128: -- Set session date
2136:
2137: --
2138: IF g_debug
2139: THEN
2140: hr_utility.set_location (c_proc, 20);
2141: END IF;
2142:
2143: --
2144: -- Initialize batch counters
2158:
2159: --
2160: IF g_debug
2161: THEN
2162: hr_utility.set_location (c_proc, 30);
2163: hr_utility.set_location (c_proc, 40);
2164: END IF;
2165:
2166: --
2159: --
2160: IF g_debug
2161: THEN
2162: hr_utility.set_location (c_proc, 30);
2163: hr_utility.set_location (c_proc, 40);
2164: END IF;
2165:
2166: --
2167: /*
2175: */
2176: --
2177: IF g_debug
2178: THEN
2179: hr_utility.set_location (c_proc, 50);
2180: hr_utility.set_location (c_proc, 60);
2181: END IF;
2182:
2183: --
2176: --
2177: IF g_debug
2178: THEN
2179: hr_utility.set_location (c_proc, 50);
2180: hr_utility.set_location (c_proc, 60);
2181: END IF;
2182:
2183: --
2184: --
2186:
2187: --
2188: IF g_debug
2189: THEN
2190: hr_utility.TRACE ('l_where_clause is: ' || l_where_clause);
2191: hr_utility.set_location (c_proc, 70);
2192: END IF;
2193:
2194: --
2187: --
2188: IF g_debug
2189: THEN
2190: hr_utility.TRACE ('l_where_clause is: ' || l_where_clause);
2191: hr_utility.set_location (c_proc, 70);
2192: END IF;
2193:
2194: --
2195: ---------------------------- Call Generic Retrieval -----------------------
2195: ---------------------------- Call Generic Retrieval -----------------------
2196: --
2197: IF g_debug
2198: THEN
2199: hr_utility.TRACE ('--- Calling Generic Retrieval ---');
2200: END IF;
2201:
2202: --
2203: WHILE (NOT l_no_more_timecards)
2227: INTO l_debug;
2228:
2229: IF get_debug%FOUND
2230: THEN
2231: hr_utility.trace_on (NULL, 'RET_OTM');
2232: END IF;
2233:
2234: CLOSE get_debug;
2235:
2235:
2236: --
2237: IF g_debug
2238: THEN
2239: hr_utility.TRACE ('--- Returned from Generic Retrieval ---');
2240: hr_utility.set_location (c_proc, 80);
2241: END IF;
2242:
2243: --
2236: --
2237: IF g_debug
2238: THEN
2239: hr_utility.TRACE ('--- Returned from Generic Retrieval ---');
2240: hr_utility.set_location (c_proc, 80);
2241: END IF;
2242:
2243: --
2244: ----------------------------- Transfer to BEE -----------------------------
2305:
2306: --
2307: IF g_debug
2308: THEN
2309: hr_utility.set_location (c_proc, 90);
2310: --
2311: hr_utility.TRACE ('--------------------------------');
2312: hr_utility.TRACE ('In Building Block Loop');
2313: hr_utility.TRACE ('l_type is ' || l_type);
2307: IF g_debug
2308: THEN
2309: hr_utility.set_location (c_proc, 90);
2310: --
2311: hr_utility.TRACE ('--------------------------------');
2312: hr_utility.TRACE ('In Building Block Loop');
2313: hr_utility.TRACE ('l_type is ' || l_type);
2314: hr_utility.TRACE ('l_measure is ' || l_measure);
2315: hr_utility.TRACE ( 'l_start_time is '
2308: THEN
2309: hr_utility.set_location (c_proc, 90);
2310: --
2311: hr_utility.TRACE ('--------------------------------');
2312: hr_utility.TRACE ('In Building Block Loop');
2313: hr_utility.TRACE ('l_type is ' || l_type);
2314: hr_utility.TRACE ('l_measure is ' || l_measure);
2315: hr_utility.TRACE ( 'l_start_time is '
2316: || TO_CHAR (l_start_time,
2309: hr_utility.set_location (c_proc, 90);
2310: --
2311: hr_utility.TRACE ('--------------------------------');
2312: hr_utility.TRACE ('In Building Block Loop');
2313: hr_utility.TRACE ('l_type is ' || l_type);
2314: hr_utility.TRACE ('l_measure is ' || l_measure);
2315: hr_utility.TRACE ( 'l_start_time is '
2316: || TO_CHAR (l_start_time,
2317: 'DD-MON-YYYY HH:MI:SS'
2310: --
2311: hr_utility.TRACE ('--------------------------------');
2312: hr_utility.TRACE ('In Building Block Loop');
2313: hr_utility.TRACE ('l_type is ' || l_type);
2314: hr_utility.TRACE ('l_measure is ' || l_measure);
2315: hr_utility.TRACE ( 'l_start_time is '
2316: || TO_CHAR (l_start_time,
2317: 'DD-MON-YYYY HH:MI:SS'
2318: )
2311: hr_utility.TRACE ('--------------------------------');
2312: hr_utility.TRACE ('In Building Block Loop');
2313: hr_utility.TRACE ('l_type is ' || l_type);
2314: hr_utility.TRACE ('l_measure is ' || l_measure);
2315: hr_utility.TRACE ( 'l_start_time is '
2316: || TO_CHAR (l_start_time,
2317: 'DD-MON-YYYY HH:MI:SS'
2318: )
2319: );
2316: || TO_CHAR (l_start_time,
2317: 'DD-MON-YYYY HH:MI:SS'
2318: )
2319: );
2320: hr_utility.TRACE ( 'l_stop_time is '
2321: || TO_CHAR (l_stop_time,
2322: 'DD-MON-YYYY HH:MI:SS'
2323: )
2324: );
2321: || TO_CHAR (l_stop_time,
2322: 'DD-MON-YYYY HH:MI:SS'
2323: )
2324: );
2325: hr_utility.TRACE ('l_scope is ' || l_scope);
2326: hr_utility.TRACE ( 'l_resource_id is '
2327: || TO_CHAR (l_resource_id)
2328: );
2329: hr_utility.TRACE ('l_resource_type is '
2322: 'DD-MON-YYYY HH:MI:SS'
2323: )
2324: );
2325: hr_utility.TRACE ('l_scope is ' || l_scope);
2326: hr_utility.TRACE ( 'l_resource_id is '
2327: || TO_CHAR (l_resource_id)
2328: );
2329: hr_utility.TRACE ('l_resource_type is '
2330: || l_resource_type
2325: hr_utility.TRACE ('l_scope is ' || l_scope);
2326: hr_utility.TRACE ( 'l_resource_id is '
2327: || TO_CHAR (l_resource_id)
2328: );
2329: hr_utility.TRACE ('l_resource_type is '
2330: || l_resource_type
2331: );
2332: hr_utility.TRACE ('l_changed is ' || l_changed);
2333: hr_utility.TRACE ('l_deleted is ' || l_deleted);
2328: );
2329: hr_utility.TRACE ('l_resource_type is '
2330: || l_resource_type
2331: );
2332: hr_utility.TRACE ('l_changed is ' || l_changed);
2333: hr_utility.TRACE ('l_deleted is ' || l_deleted);
2334: hr_utility.TRACE ('--------------------------------');
2335: END IF;
2336:
2329: hr_utility.TRACE ('l_resource_type is '
2330: || l_resource_type
2331: );
2332: hr_utility.TRACE ('l_changed is ' || l_changed);
2333: hr_utility.TRACE ('l_deleted is ' || l_deleted);
2334: hr_utility.TRACE ('--------------------------------');
2335: END IF;
2336:
2337: IF l_scope = 'DETAIL'
2330: || l_resource_type
2331: );
2332: hr_utility.TRACE ('l_changed is ' || l_changed);
2333: hr_utility.TRACE ('l_deleted is ' || l_deleted);
2334: hr_utility.TRACE ('--------------------------------');
2335: END IF;
2336:
2337: IF l_scope = 'DETAIL'
2338: THEN
2369:
2370: --
2371: IF g_debug
2372: THEN
2373: hr_utility.TRACE
2374: ( 'l_start_time is '
2375: || TO_CHAR
2376: (l_start_time,
2377: 'DD-MON-YYYY HH:MI:SS'
2376: (l_start_time,
2377: 'DD-MON-YYYY HH:MI:SS'
2378: )
2379: );
2380: hr_utility.TRACE
2381: ( 'l_stop_time is '
2382: || TO_CHAR
2383: (l_stop_time,
2384: 'DD-MON-YYYY HH:MI:SS'
2394:
2395: --
2396: IF g_debug
2397: THEN
2398: hr_utility.set_location (c_proc, 100);
2399: END IF;
2400:
2401: --
2402: IF l_resource_type = 'PERSON'
2405:
2406: --
2407: IF g_debug
2408: THEN
2409: hr_utility.TRACE ( 'l_person_id is '
2410: || TO_CHAR (l_person_id)
2411: );
2412: END IF;
2413: --
2418:
2419: --
2420: IF g_debug
2421: THEN
2422: hr_utility.TRACE ( 'l_assignment_id is '
2423: || TO_CHAR (l_assignment_id)
2424: );
2425: END IF;
2426: --
2428:
2429: --
2430: IF g_debug
2431: THEN
2432: hr_utility.set_location (c_proc, 110);
2433: END IF;
2434:
2435: --
2436: l_effective_date := TRUNC (l_start_time);
2436: l_effective_date := TRUNC (l_start_time);
2437:
2438: IF g_debug
2439: THEN
2440: hr_utility.TRACE ( 'l_effective_date is :'
2441: || TO_CHAR (l_effective_date,
2442: 'DD-MON-YYYY'
2443: )
2444: );
2454: AND effective_end_date;
2455: EXCEPTION
2456: WHEN NO_DATA_FOUND
2457: THEN
2458: hr_utility.set_message
2459: (800,
2460: 'HR_52365_PTU_NO_PERSON_EXISTS'
2461: );
2462: l_last_att_index :=
2470: (p_att_table => hxc_generic_retrieval_pkg.t_old_detail_attributes,
2471: p_bb_id => l_bb_id,
2472: p_last_att_index => l_old_last_att_index
2473: );
2474: hr_utility.raise_error;
2475: END;
2476:
2477: --
2478: -- Get the attributes of the detail record.
2497:
2498: --
2499: IF g_debug
2500: THEN
2501: hr_utility.set_location (c_proc, 120);
2502: END IF;
2503:
2504: --
2505: -- If there is a mapping set up for the assignment_id, get the assignment
2528:
2529: --
2530: IF g_debug
2531: THEN
2532: hr_utility.set_location (c_proc, 130);
2533: END IF;
2534:
2535: --
2536: -- Get payroll id
2544:
2545: --
2546: IF g_debug
2547: THEN
2548: hr_utility.set_location (c_proc, 140);
2549: hr_utility.TRACE
2550: ('--- After Call to get_assignment_info ---');
2551: hr_utility.TRACE ( 'Person IDs are '
2552: || TO_CHAR (l_person_id)
2545: --
2546: IF g_debug
2547: THEN
2548: hr_utility.set_location (c_proc, 140);
2549: hr_utility.TRACE
2550: ('--- After Call to get_assignment_info ---');
2551: hr_utility.TRACE ( 'Person IDs are '
2552: || TO_CHAR (l_person_id)
2553: );
2547: THEN
2548: hr_utility.set_location (c_proc, 140);
2549: hr_utility.TRACE
2550: ('--- After Call to get_assignment_info ---');
2551: hr_utility.TRACE ( 'Person IDs are '
2552: || TO_CHAR (l_person_id)
2553: );
2554: hr_utility.TRACE ( 'Payroll IDs are '
2555: || TO_CHAR (l_payroll_id)
2550: ('--- After Call to get_assignment_info ---');
2551: hr_utility.TRACE ( 'Person IDs are '
2552: || TO_CHAR (l_person_id)
2553: );
2554: hr_utility.TRACE ( 'Payroll IDs are '
2555: || TO_CHAR (l_payroll_id)
2556: );
2557: hr_utility.TRACE ( 'bg IDs are '
2558: || TO_CHAR (l_bg_id)
2553: );
2554: hr_utility.TRACE ( 'Payroll IDs are '
2555: || TO_CHAR (l_payroll_id)
2556: );
2557: hr_utility.TRACE ( 'bg IDs are '
2558: || TO_CHAR (l_bg_id)
2559: || ' AND '
2560: || TO_CHAR (p_bg_id)
2561: );
2566: THEN
2567: --
2568: IF g_debug
2569: THEN
2570: hr_utility.set_location (c_proc, 150);
2571: hr_utility.TRACE ('Inside IF');
2572: END IF;
2573:
2574: --
2567: --
2568: IF g_debug
2569: THEN
2570: hr_utility.set_location (c_proc, 150);
2571: hr_utility.TRACE ('Inside IF');
2572: END IF;
2573:
2574: --
2575: -- Get the attributes of the detail record
2575: -- Get the attributes of the detail record
2576: --
2577: IF g_debug
2578: THEN
2579: hr_utility.TRACE
2580: ( 'g_cnt_t_detail_bld_blks count is '
2581: || TO_CHAR (g_cnt_t_detail_bld_blks)
2582: );
2583: END IF;
2589: -- Get the old data
2590: --
2591: IF g_debug
2592: THEN
2593: hr_utility.set_location (c_proc, 160);
2594: hr_utility.TRACE
2595: ( 'Get old building block info for bb id: '
2596: || TO_CHAR (l_bb_id)
2597: );
2590: --
2591: IF g_debug
2592: THEN
2593: hr_utility.set_location (c_proc, 160);
2594: hr_utility.TRACE
2595: ( 'Get old building block info for bb id: '
2596: || TO_CHAR (l_bb_id)
2597: );
2598: END IF;
2605:
2606: --
2607: IF g_debug
2608: THEN
2609: hr_utility.TRACE ('Before IF');
2610: hr_utility.TRACE
2611: ( 'g_cnt_t_old_detail_bld_blks count is '
2612: || TO_CHAR
2613: (hxc_generic_retrieval_pkg.t_old_detail_bld_blks.COUNT
2606: --
2607: IF g_debug
2608: THEN
2609: hr_utility.TRACE ('Before IF');
2610: hr_utility.TRACE
2611: ( 'g_cnt_t_old_detail_bld_blks count is '
2612: || TO_CHAR
2613: (hxc_generic_retrieval_pkg.t_old_detail_bld_blks.COUNT
2614: )
2612: || TO_CHAR
2613: (hxc_generic_retrieval_pkg.t_old_detail_bld_blks.COUNT
2614: )
2615: );
2616: hr_utility.TRACE ( 'l_old_bb_index IS : '
2617: || TO_CHAR (l_old_bb_index)
2618: );
2619: hr_utility.TRACE ( 'l_cnt IS : '
2620: || TO_CHAR (l_cnt)
2615: );
2616: hr_utility.TRACE ( 'l_old_bb_index IS : '
2617: || TO_CHAR (l_old_bb_index)
2618: );
2619: hr_utility.TRACE ( 'l_cnt IS : '
2620: || TO_CHAR (l_cnt)
2621: );
2622: END IF;
2623:
2632: THEN
2633: FOR i IN
2634: hxc_generic_retrieval_pkg.t_old_detail_bld_blks.FIRST .. hxc_generic_retrieval_pkg.t_old_detail_bld_blks.LAST
2635: LOOP
2636: hr_utility.TRACE
2637: ( 'BB ID IS : '
2638: || TO_CHAR
2639: (hxc_generic_retrieval_pkg.t_old_detail_bld_blks
2640: (i).bb_id
2639: (hxc_generic_retrieval_pkg.t_old_detail_bld_blks
2640: (i).bb_id
2641: )
2642: );
2643: hr_utility.TRACE ('i is : ' || TO_CHAR (i));
2644: END LOOP;
2645: END IF;
2646:
2647:
2653: l_bb_id
2654: THEN
2655: IF g_debug
2656: THEN
2657: hr_utility.TRACE
2658: ('in old bb id exception!!!');
2659: END IF;
2660:
2661: fnd_message.set_name
2673:
2674: --
2675: IF g_debug
2676: THEN
2677: hr_utility.TRACE ('After IF');
2678: END IF;
2679:
2680: --
2681: l_old_ovn :=
2725: LOOP
2726: --
2727: IF g_debug
2728: THEN
2729: hr_utility.set_location (c_proc, 170);
2730: hr_utility.TRACE
2731: ('Get old start and stop times');
2732: END IF;
2733:
2726: --
2727: IF g_debug
2728: THEN
2729: hr_utility.set_location (c_proc, 170);
2730: hr_utility.TRACE
2731: ('Get old start and stop times');
2732: END IF;
2733:
2734: --
2751:
2752: --
2753: IF g_debug
2754: THEN
2755: hr_utility.TRACE
2756: ( 'l_old_start_time is '
2757: || TO_CHAR
2758: (l_old_start_time,
2759: 'DD-MON-YYYY HH:MI:SS'
2758: (l_old_start_time,
2759: 'DD-MON-YYYY HH:MI:SS'
2760: )
2761: );
2762: hr_utility.TRACE
2763: ( 'l_old_stop_time is '
2764: || TO_CHAR
2765: (l_old_stop_time,
2766: 'DD-MON-YYYY HH:MI:SS'
2784:
2785: --
2786: IF g_debug
2787: THEN
2788: hr_utility.set_location (c_proc, 180);
2789: END IF;
2790:
2791: --
2792: -- Get the attributes of the old detail record.
2792: -- Get the attributes of the old detail record.
2793: --
2794: IF g_debug
2795: THEN
2796: hr_utility.TRACE
2797: ( 'Get old attributes for bb id: '
2798: || TO_CHAR (l_bb_id)
2799: );
2800: END IF;
2813:
2814: --
2815: IF g_debug
2816: THEN
2817: hr_utility.set_location (c_proc, 190);
2818: END IF;
2819: --
2820: END IF; -- l_changed is Y and p_incremental is Y
2821:
2848:
2849: --
2850: IF g_debug
2851: THEN
2852: hr_utility.set_location (c_proc, 210);
2853: hr_utility.set_location (c_proc, 220);
2854: hr_utility.set_location (c_proc, 230);
2855: END IF;
2856:
2849: --
2850: IF g_debug
2851: THEN
2852: hr_utility.set_location (c_proc, 210);
2853: hr_utility.set_location (c_proc, 220);
2854: hr_utility.set_location (c_proc, 230);
2855: END IF;
2856:
2857: --
2850: IF g_debug
2851: THEN
2852: hr_utility.set_location (c_proc, 210);
2853: hr_utility.set_location (c_proc, 220);
2854: hr_utility.set_location (c_proc, 230);
2855: END IF;
2856:
2857: --
2858: IF l_changed = 'Y' AND p_incremental = 'Y'
2861: -- Parse the old attributes
2862: --
2863: IF g_debug
2864: THEN
2865: hr_utility.set_location (c_proc, 240);
2866: hr_utility.TRACE ('Parse old attributes.');
2867: END IF;
2868:
2869: --
2862: --
2863: IF g_debug
2864: THEN
2865: hr_utility.set_location (c_proc, 240);
2866: hr_utility.TRACE ('Parse old attributes.');
2867: END IF;
2868:
2869: --
2870: parse_attributes
2894:
2895: --
2896: IF g_debug
2897: THEN
2898: hr_utility.set_location (c_proc, 270);
2899: END IF;
2900: --
2901: END IF;
2902:
2904: -------------------- Create Batch Header --------------------
2905: --
2906: IF g_debug
2907: THEN
2908: hr_utility.set_location (c_proc, 280);
2909: END IF;
2910:
2911: --
2912: /*
2913: --
2914: IF l_count_timecards > l_max_batches THEN
2915: --
2916: if g_debug then
2917: hr_utility.set_location(c_proc, 290);
2918: end if;
2919: --
2920: -- Reset counter
2921: l_count_timecards := 0;
2923: -- Increment batch header reference
2924: l_count_batch_head := l_count_batch_head + 1;
2925: --
2926: if g_debug then
2927: hr_utility.set_location(c_proc, 300);
2928: end if;
2929: --
2930: --
2931: ------------------- Transfer To BEE -----------------------
2930: --
2931: ------------------- Transfer To BEE -----------------------
2932: --
2933: if g_debug then
2934: hr_utility.set_location(c_proc, 5);
2935: end if;
2936: --
2937: -- Only transfer if the user has asked for it.
2938: --
2938: --
2939: IF p_transfer_to_bee = 'Y' THEN
2940: --
2941: if g_debug then
2942: hr_utility.set_location(c_proc, 6);
2943: end if;
2944: --
2945: transfer_to_bee(p_bg_id => p_bg_id,
2946: p_batch_id => l_non_retro_batch_id,
2952: l_batch_name := replace(l_batch_ref, ' ', '_') ||
2953: to_char(l_count_batch_head);
2954: --
2955: if g_debug then
2956: hr_utility.set_location(c_proc, 310);
2957: end if;
2958: --
2959: END IF;
2960: --
2960: --
2961: IF l_retro_count_batch_lines > l_max_batches THEN
2962: --
2963: if g_debug then
2964: hr_utility.set_location(c_proc, 320);
2965: end if;
2966: --
2967: -- Reset retro counter
2968: l_retro_count_batch_lines := 0;
2970: -- Increment retro batch header reference
2971: l_retro_count_batch_head := l_retro_count_batch_head + 1;
2972: --
2973: if g_debug then
2974: hr_utility.set_location(c_proc, 330);
2975: end if;
2976: --
2977: ------------------- Transfer To BEE -----------------------
2978: --
2976: --
2977: ------------------- Transfer To BEE -----------------------
2978: --
2979: if g_debug then
2980: hr_utility.set_location(c_proc, 5);
2981: end if;
2982: --
2983: -- Only transfer if the user has asked for it.
2984: --
2984: --
2985: IF p_transfer_to_bee = 'Y' THEN
2986: --
2987: if g_debug then
2988: hr_utility.set_location(c_proc, 6);
2989: end if;
2990: --
2991: transfer_to_bee_retro(p_bg_id => p_bg_id,
2992: p_retro_batch_id => l_retro_batch_id,
2999: '_RETRO_' ||
3000: to_char(l_retro_count_batch_head);
3001: --
3002: if g_debug then
3003: hr_utility.set_location(c_proc, 340);
3004: end if;
3005: --
3006: END IF;
3007: */
3006: END IF;
3007: */
3008: IF g_debug
3009: THEN
3010: hr_utility.set_location (c_proc, 350);
3011: END IF;
3012:
3013: --
3014: --------------------- Create Timecard ---------------------
3014: --------------------- Create Timecard ---------------------
3015: --
3016: IF g_debug
3017: THEN
3018: hr_utility.TRACE
3019: ('---- Before Create Timecard ----');
3020: END IF;
3021:
3022: IF (NOT is_retrievable
3030: END IF;
3031:
3032: IF g_debug
3033: THEN
3034: hr_utility.TRACE ( 'l_employee_number is '
3035: || l_employee_number
3036: );
3037: END IF;
3038:
3064: THEN
3065: --
3066: IF g_debug
3067: THEN
3068: hr_utility.TRACE
3069: ('---- Making retro timecard entry ----');
3070: hr_utility.TRACE ( 'l_retro_batch_id is '
3071: || TO_CHAR (l_retro_batch_id)
3072: );
3066: IF g_debug
3067: THEN
3068: hr_utility.TRACE
3069: ('---- Making retro timecard entry ----');
3070: hr_utility.TRACE ( 'l_retro_batch_id is '
3071: || TO_CHAR (l_retro_batch_id)
3072: );
3073: END IF;
3074:
3087:
3088: --
3089: IF g_debug
3090: THEN
3091: hr_utility.set_location (c_proc, 352);
3092: END IF;
3093: END IF; -- l_changed is Y and p_incremental is Y
3094:
3095: --
3114: l_element_id ))
3115: THEN
3116: IF g_debug
3117: THEN
3118: hr_utility.trace('This timecard needs re-explosion');
3119: END IF;
3120: l_retcode := hxt_tim_col_util.get_session_date(
3121: hxt_time_collection.g_sess_date);
3122: g_timecards(l_tim_id) := l_tim_id;
3142: THEN
3143: --
3144: IF g_debug
3145: THEN
3146: hr_utility.TRACE
3147: ('---- Creating new timecard ----');
3148: hr_utility.TRACE ( 'l_date_worked is '
3149: || TO_CHAR (l_date_worked,
3150: 'DD-MON-YYYY'
3144: IF g_debug
3145: THEN
3146: hr_utility.TRACE
3147: ('---- Creating new timecard ----');
3148: hr_utility.TRACE ( 'l_date_worked is '
3149: || TO_CHAR (l_date_worked,
3150: 'DD-MON-YYYY'
3151: )
3152: );
3149: || TO_CHAR (l_date_worked,
3150: 'DD-MON-YYYY'
3151: )
3152: );
3153: hr_utility.set_location (c_proc, 353);
3154: END IF;
3155:
3156: --
3157: -- Pass in Person ID for employee number - issue
3202:
3203: --
3204: IF g_debug
3205: THEN
3206: hr_utility.set_location (c_proc, 360);
3207: END IF;
3208: --
3209: END IF;
3210:
3232:
3233: --
3234: IF g_debug
3235: THEN
3236: hr_utility.set_location (c_proc, 370);
3237: END IF;
3238:
3239: --
3240: --------------------- Write Error Report --------------------
3244: -- validate or transfer resulted in error status
3245: --
3246: IF g_debug
3247: THEN
3248: hr_utility.set_location (c_proc, 380);
3249: hr_utility.set_location (c_proc, 390);
3250: hr_utility.set_location (c_proc, 400);
3251: END IF;
3252: --
3245: --
3246: IF g_debug
3247: THEN
3248: hr_utility.set_location (c_proc, 380);
3249: hr_utility.set_location (c_proc, 390);
3250: hr_utility.set_location (c_proc, 400);
3251: END IF;
3252: --
3253: END IF; -- parameter validation
3246: IF g_debug
3247: THEN
3248: hr_utility.set_location (c_proc, 380);
3249: hr_utility.set_location (c_proc, 390);
3250: hr_utility.set_location (c_proc, 400);
3251: END IF;
3252: --
3253: END IF; -- parameter validation
3254:
3254:
3255: --
3256: IF g_debug
3257: THEN
3258: hr_utility.set_location (c_proc, 410);
3259: END IF;
3260: --
3261: END IF; -- scope = 'DETAIL'
3262: --
3265: THEN
3266: --
3267: IF g_debug
3268: THEN
3269: hr_utility.set_location (c_proc, 411);
3270: END IF;
3271:
3272: --
3273: set_transaction (p_bb_id => l_bb_id,
3317: END IF;
3318:
3319: IF g_debug
3320: THEN
3321: hr_utility.set_location (c_proc, 412);
3322: END IF;
3323: --
3324: WHEN e_amount_hours
3325: THEN
3324: WHEN e_amount_hours
3325: THEN
3326: IF g_debug
3327: THEN
3328: hr_utility.set_location (c_proc, 666);
3329: END IF;
3330:
3331: fnd_message.set_name ('HXT', 'HXT_39443_HRS_AMT_EDIT');
3332: g_status := 'ERRORS';
3334: SUBSTR (fnd_message.get, 1, 2000);
3335:
3336: IF g_debug
3337: THEN
3338: hr_utility.TRACE ( 'g_exception_description is : '
3339: || g_exception_description
3340: );
3341: END IF;
3342:
3375:
3376:
3377: IF g_debug
3378: THEN
3379: hr_utility.set_location (c_proc, 666.5);
3380: END IF;
3381:
3382: fnd_message.raise_error;
3383: RETURN;
3384: WHEN e_not_retrievable
3385: THEN
3386: IF g_debug
3387: THEN
3388: hr_utility.set_location (c_proc, 700);
3389: END IF;
3390:
3391: fnd_message.set_name ('HXT',
3392: 'HXT_TC_CANNOT_BE_CHANGED_TODAY'
3396: SUBSTR (fnd_message.get, 1, 2000);
3397:
3398: IF g_debug
3399: THEN
3400: hr_utility.TRACE ( 'g_exception_description is : '
3401: || g_exception_description
3402: );
3403: END IF;
3404:
3436:
3437:
3438: IF g_debug
3439: THEN
3440: hr_utility.set_location (c_proc, 710);
3441: END IF;
3442: WHEN OTHERS
3443: THEN
3444: --
3443: THEN
3444: --
3445: IF g_debug
3446: THEN
3447: hr_utility.set_location (c_proc, 413);
3448: END IF;
3449:
3450: --
3451: g_status := 'ERRORS';
3493:
3494:
3495: IF g_debug
3496: THEN
3497: hr_utility.set_location (c_proc, 414);
3498: END IF;
3499: --
3500: END;
3501:
3501:
3502: --
3503: IF g_debug
3504: THEN
3505: hr_utility.set_location (c_proc, 420);
3506: END IF;
3507: --
3508: END LOOP;
3509:
3509:
3510: --
3511: IF g_debug
3512: THEN
3513: hr_utility.set_location (c_proc, 430);
3514: END IF;
3515:
3516: --
3517: --------------- Update Transaction in OTC for whole process ---------------
3530: );
3531:
3532: IF g_debug
3533: THEN
3534: hr_utility.set_location (c_proc, 440);
3535: END IF;
3536: ELSE
3537: -- end of loop
3538: l_no_more_timecards := TRUE;
3539: END IF;
3540:
3541: IF g_debug
3542: THEN
3543: hr_utility.TRACE ('g_timecards.count = ' || g_timecards.COUNT);
3544: hr_utility.TRACE ('p_batch_ref = ' || p_batch_ref);
3545: END IF;
3546:
3547: -- reset timecard list
3540:
3541: IF g_debug
3542: THEN
3543: hr_utility.TRACE ('g_timecards.count = ' || g_timecards.COUNT);
3544: hr_utility.TRACE ('p_batch_ref = ' || p_batch_ref);
3545: END IF;
3546:
3547: -- reset timecard list
3548: i := g_timecards.FIRST;
3560: );
3561:
3562: IF g_debug
3563: THEN
3564: hr_utility.TRACE ('l_dt_update_mode = ' || l_dt_update_mode);
3565: END IF;
3566:
3567: hxt_time_collection.re_explode_timecard
3568: (timecard_id => g_timecards
3580: IF l_otm_error IS NOT NULL
3581: THEN
3582: IF g_debug
3583: THEN
3584: hr_utility.set_location (c_proc, 2000);
3585: hr_utility.TRACE ('l_otm_error :' || l_otm_error);
3586: END IF;
3587: -- raise e_error;
3588: END IF;
3581: THEN
3582: IF g_debug
3583: THEN
3584: hr_utility.set_location (c_proc, 2000);
3585: hr_utility.TRACE ('l_otm_error :' || l_otm_error);
3586: END IF;
3587: -- raise e_error;
3588: END IF;
3589:
3590: IF l_oracle_error IS NOT NULL
3591: THEN
3592: IF g_debug
3593: THEN
3594: hr_utility.set_location (c_proc, 2050);
3595: hr_utility.TRACE ('l_oracle_error :' || l_oracle_error);
3596: END IF;
3597: -- raise e_error;
3598: END IF;
3591: THEN
3592: IF g_debug
3593: THEN
3594: hr_utility.set_location (c_proc, 2050);
3595: hr_utility.TRACE ('l_oracle_error :' || l_oracle_error);
3596: END IF;
3597: -- raise e_error;
3598: END IF;
3599:
3632:
3633: --
3634: IF g_debug
3635: THEN
3636: hr_utility.TRACE ('g_exception_description is : ' || SQLERRM);
3637: END IF;
3638:
3639: --
3640: IF SQLERRM NOT LIKE '%HXC%'
3692: --
3693: --
3694: IF g_debug
3695: THEN
3696: hr_utility.set_location (c_proc, 450);
3697: END IF;
3698: --
3699:
3700: --
3735:
3736: BEGIN
3737: IF g_debug
3738: THEN
3739: hr_utility.trace('Deleted entry, check if re-explosion needed ');
3740: END IF;
3741:
3742: -- Check if the earning policy list is created already for this
3743: -- assignment. If not, create it.
3744: IF NOT(g_earn_pol_list.exists((to_char(p_assignment_id))))
3745: THEN
3746: IF g_debug
3747: THEN
3748: hr_utility.trace('Checking policy for '||p_assignment_id);
3749: END IF;
3750: OPEN get_earn_pol(p_assignment_id);
3751: FETCH get_earn_pol BULK COLLECT INTO l_ep_list ;
3752: CLOSE get_earn_pol;
3769:
3770:
3771: IF g_debug
3772: THEN
3773: hr_utility.trace('Earning policy is '||l_ep_id);
3774: END IF;
3775:
3776: -- Check if this earning policy already has
3777: -- elements in earning group populated.
3777: -- elements in earning group populated.
3778: -- If not, fetch and populate it.
3779: IF NOT (g_earn_group_list.exists(to_char(l_ep_id)))
3780: THEN
3781: hr_utility.trace(' Checking earning group elements for '||l_ep_id);
3782: OPEN get_earn_group_elements(l_ep_id);
3783: FETCH get_earn_group_elements BULK COLLECT INTO l_element_list;
3784: CLOSE get_earn_group_elements;
3785:
3800: ELSIF p_element_type_id = g_earn_group_list(l_ep_id).element_list(i)
3801: THEN
3802: IF g_debug
3803: THEN
3804: hr_utility.trace(' Element '||p_element_type_id||' in Earning group ');
3805: END IF;
3806: RETURN TRUE;
3807: END IF;
3808: END LOOP;