49: MAX (dyovn.object_version_number)
50: FROM hxc_time_building_blocks dyovn
51: WHERE dyovn.time_building_block_id =
52: tbb.time_building_block_id
53: AND dyovn.date_to <> hr_general.end_of_time)
54: AND tbb.date_to <> hr_general.end_of_time
55: AND EXISTS (
56: SELECT 'x'
57: FROM hxc_transaction_details txd, hxc_transactions tx
50: FROM hxc_time_building_blocks dyovn
51: WHERE dyovn.time_building_block_id =
52: tbb.time_building_block_id
53: AND dyovn.date_to <> hr_general.end_of_time)
54: AND tbb.date_to <> hr_general.end_of_time
55: AND EXISTS (
56: SELECT 'x'
57: FROM hxc_transaction_details txd, hxc_transactions tx
58: WHERE tx.transaction_process_id = -1
223: AND l_start_time IS NOT NULL
224: AND l_stop_time IS NOT NULL
225: )
226: )
227: AND ( l_date_to = hr_general.end_of_time
228: OR (l_date_to <> hr_general.end_of_time AND l_new = 'N'
229: )
230: )
231: OR ( ( (l_type = 'MEASURE' AND l_measure IS NULL)
224: AND l_stop_time IS NOT NULL
225: )
226: )
227: AND ( l_date_to = hr_general.end_of_time
228: OR (l_date_to <> hr_general.end_of_time AND l_new = 'N'
229: )
230: )
231: OR ( ( (l_type = 'MEASURE' AND l_measure IS NULL)
232: OR ( l_type = 'RANGE'
233: AND l_start_time IS NULL
234: AND l_stop_time IS NULL
235: )
236: )
237: AND l_date_to <> hr_general.end_of_time
238: AND l_new = 'N'
239: )
240: )
241: THEN
434: FROM hxc_time_building_blocks
435: WHERE time_building_block_id = l_day_bb_id
436: AND ((measure = 0) or (start_time is not null and stop_time is not null))
437: AND scope = 'DETAIL'
438: AND date_to = hr_general.end_of_time;
439: END;
440: END IF;
441: --Bug 4890370 Fix Ends
442:
851: AND l_stop_time IS NOT NULL
852: )
853: )
854: AND ( -- First process deleted detail records
855: ( l_date_to <> hr_general.end_of_time
856: AND l_new = 'N'
857: AND i = 1
858: )
859: -- Next process the updated detail records
856: AND l_new = 'N'
857: AND i = 1
858: )
859: -- Next process the updated detail records
860: OR ( l_date_to = hr_general.end_of_time
861: AND l_new = 'N'
862: AND i = 2
863: )
864: -- And the last to be processed are the Inserts
861: AND l_new = 'N'
862: AND i = 2
863: )
864: -- And the last to be processed are the Inserts
865: OR ( l_date_to = hr_general.end_of_time
866: AND l_new = 'Y'
867: AND i = 3
868: )
869: ) --2966729
874: AND l_start_time IS NULL
875: AND l_stop_time IS NULL
876: )
877: )
878: AND l_date_to <> hr_general.end_of_time
879: AND l_new = 'N'
880: AND i = 1
881: )
882: -- bug 3650967
882: -- bug 3650967
883: )
884: AND l_scope = 'DETAIL'
885: THEN
886: -- (l_date_to = hr_general.end_of_time) THEN
887:
888: --Bug 2770487 Sonarasi 04-Apr-2003
889: --Commented the above check l_date_to = hr_general.end_of_time because we need
890: --the deleted blocks also to be considered for explosion.
885: THEN
886: -- (l_date_to = hr_general.end_of_time) THEN
887:
888: --Bug 2770487 Sonarasi 04-Apr-2003
889: --Commented the above check l_date_to = hr_general.end_of_time because we need
890: --the deleted blocks also to be considered for explosion.
891: --Bug 2770487 Sonarasi Over
892:
893: --
924: OR ( l_type = 'RANGE'
925: AND l_start_time IS NULL
926: AND l_stop_time IS NULL
927: )
928: AND l_date_to <> hr_general.end_of_time
929: AND l_new = 'N'
930: AND i = 1
931: ) -- end bug 3650967
932: THEN
1261: END IF;
1262: END IF;
1263:
1264: --Bug 2770487 Sonarasi 04-Apr-2003
1265: IF (l_date_to = hr_general.end_of_time)
1266: THEN
1267: l_delete := 'N';
1268: ELSE
1269: l_delete := 'Y';
2191: AND l_stop_time IS NOT NULL
2192: )
2193: )
2194: AND ( -- First process deleted detail records
2195: ( l_date_to <> hr_general.end_of_time
2196: AND l_new = 'N'
2197: AND i = 1
2198: )
2199: -- Next process the updated detail records
2196: AND l_new = 'N'
2197: AND i = 1
2198: )
2199: -- Next process the updated detail records
2200: OR ( l_date_to = hr_general.end_of_time
2201: AND l_new = 'N'
2202: AND i = 2
2203: )
2204: -- And the last to be processed are the Inserts
2201: AND l_new = 'N'
2202: AND i = 2
2203: )
2204: -- And the last to be processed are the Inserts
2205: OR ( l_date_to = hr_general.end_of_time
2206: AND l_new = 'Y'
2207: AND i = 3
2208: )
2209: ) --2966729
2214: AND l_start_time IS NULL
2215: AND l_stop_time IS NULL
2216: )
2217: )
2218: AND l_date_to <> hr_general.end_of_time
2219: AND l_new = 'N'
2220: AND i = 1
2221: )
2222: -- end bug 3650967
2222: -- end bug 3650967
2223: )
2224: AND l_scope = 'DETAIL'
2225: THEN
2226: -- (l_date_to = hr_general.end_of_time) THEN
2227:
2228: --Bug 2770487 Sonarasi 04-Apr-2003
2229: --Commented the above check l_date_to = hr_general.end_of_time because we need
2230: --the deleted blocks also to be considered for explosion.
2225: THEN
2226: -- (l_date_to = hr_general.end_of_time) THEN
2227:
2228: --Bug 2770487 Sonarasi 04-Apr-2003
2229: --Commented the above check l_date_to = hr_general.end_of_time because we need
2230: --the deleted blocks also to be considered for explosion.
2231: --Bug 2770487 Sonarasi Over
2232: --
2233: l_valid := 'Y';
2245: OR ( l_type = 'RANGE'
2246: AND l_start_time IS NULL
2247: AND l_stop_time IS NULL
2248: )
2249: AND l_date_to <> hr_general.end_of_time
2250: AND l_new = 'N'
2251: AND i = 1
2252: ) -- end bug 3650967
2253: THEN
2650: hr_utility.set_location (l_proc, 69);
2651: END IF;
2652:
2653: --Bug 2770487 Sonarasi 04-Apr-2003
2654: IF (l_date_to = hr_general.end_of_time)
2655: THEN
2656: IF g_debug
2657: THEN
2658: hr_utility.set_location (l_proc, 70);