DBA Data[Home] [Help]

APPS.HXC_RPT_LOAD_TC_SNAPSHOT dependencies on HXC_RPT_TC_RESOURCE_TEMP

Line 160: -- Loads the timecard level information into HXC_RPT_TC_RESOURCE_TEMP

156:
157:
158:
159: -- LOAD_TC_LEVEL_INFO
160: -- Loads the timecard level information into HXC_RPT_TC_RESOURCE_TEMP
161: -- for all the relevant employees whose person ids are provided as parameter.
162:
163: PROCEDURE load_tc_level_info( p_resource_list IN VARCHAR2,
164: p_tc_from IN DATE,

Line 170: ' INSERT INTO hxc_rpt_tc_resource_temp

166: p_request_id IN VARCHAR2 DEFAULT NULL)
167: AS
168:
169: l_tc_query VARCHAR2(2000) :=
170: ' INSERT INTO hxc_rpt_tc_resource_temp
171: ( resource_id,
172: tc_start_time,
173: tc_stop_time,
174: tc_bb_id,

Line 205: -- _PEOPLE_F and inserts into HXC_RPT_TC_RESOURCE_TEMP

201: -- stop_date and request id.
202: -- Attaches the parameters to the timecard query defined above, in the date
203: -- and the resource_id AND clauses.
204: -- Execute the query, which selects from HXC_TIME_BUILDING_BLOCKS and PER_ALL
205: -- _PEOPLE_F and inserts into HXC_RPT_TC_RESOURCE_TEMP
206:
207:
208: IF g_debug
209: THEN

Line 313: hxc_rpt_tc_resource_temp gt

309: hist.tc_start_time,
310: hist.tc_stop_time,
311: hist.history_till_date
312: FROM hxc_rpt_tc_hist_log hist,
313: hxc_rpt_tc_resource_temp gt
314: WHERE gt.resource_id = hist.resource_id
315: AND gt.tc_start_time = hist.tc_start_time
316: AND gt.tc_stop_time = hist.tc_stop_time ;
317:

Line 324: -- right now into HXC_RPT_TC_RESOURCE_TEMP.

320: -- Public Procedure fetch_history_from_date
321: -- Look into HXC_RPT_TC_HIST_LOG to find out upto which details are
322: -- captured into HXC_RPT_TC_DETAILS_ALL for all the
323: -- resource_id-tc_start_time-tc_stop_time combinations loaded
324: -- right now into HXC_RPT_TC_RESOURCE_TEMP.
325: -- Update these values as history_from_date in HXC_RPT_TC_RESOURCE_TEMP
326: -- for corresponding resource_id-tc_start_time-tc_stop_time
327: -- combinations.
328: -- For those combinations which there is no record in HXC_RPT_TC_HIST_LOG

Line 325: -- Update these values as history_from_date in HXC_RPT_TC_RESOURCE_TEMP

321: -- Look into HXC_RPT_TC_HIST_LOG to find out upto which details are
322: -- captured into HXC_RPT_TC_DETAILS_ALL for all the
323: -- resource_id-tc_start_time-tc_stop_time combinations loaded
324: -- right now into HXC_RPT_TC_RESOURCE_TEMP.
325: -- Update these values as history_from_date in HXC_RPT_TC_RESOURCE_TEMP
326: -- for corresponding resource_id-tc_start_time-tc_stop_time
327: -- combinations.
328: -- For those combinations which there is no record in HXC_RPT_TC_HIST_LOG
329: -- update history_from_date as hr_general.start_of_time

Line 354: UPDATE hxc_rpt_tc_resource_temp

350:
351: IF resource_id_tab.COUNT > 0
352: THEN
353: FORALL i IN resource_id_tab.FIRST..resource_id_tab.LAST
354: UPDATE hxc_rpt_tc_resource_temp
355: SET history_from_date = history_tab(i)
356: WHERE resource_id = resource_id_tab(i)
357: AND tc_start_time = start_time_tab(i)
358: AND tc_stop_time = stop_time_tab(i);

Line 366: UPDATE hxc_rpt_tc_resource_temp

362: resource_id_tab.DELETE;
363: start_time_tab.DELETE;
364: stop_time_tab.DELETE;
365:
366: UPDATE hxc_rpt_tc_resource_temp
367: SET history_from_date = hr_general.start_of_time
368: WHERE history_from_date IS NULL ;
369:
370: IF g_debug

Line 384: -- Updates the timecard records captured in HXC_RPT_TC_RESOURCE_TEMP with

380:
381:
382:
383: -- UPDATE_LAYOUT_IDS
384: -- Updates the timecard records captured in HXC_RPT_TC_RESOURCE_TEMP with
385: -- their layout_ids from HXC_TIME_ATTRIBUTES table.
386:
387: PROCEDURE update_layout_ids
388: AS

Line 396: FROM hxc_rpt_tc_resource_temp gt,

392: INDEX(hau HXC_TIME_ATTRIBUTE_USAGES_FK2)
393: INDEX(ha HXC_TIME_ATTRIBUTES_PK) */
394: gt.tc_bb_id,
395: ha.attribute1
396: FROM hxc_rpt_tc_resource_temp gt,
397: hxc_time_attribute_usages hau,
398: hxc_time_attributes ha
399: WHERE gt.tc_bb_id = hau.time_building_block_id
400: AND hau.time_building_block_ovn = 1

Line 410: -- Join HXC_RPT_TC_RESOURCE_TEMP, HXC_TIME_ATTRIBUTE_USAGES, and

406:
407: BEGIN
408:
409: -- Public Procedure update_layout_ids
410: -- Join HXC_RPT_TC_RESOURCE_TEMP, HXC_TIME_ATTRIBUTE_USAGES, and
411: -- HXC_TIME_ATTRIBUTES to pick out Attribute1 from
412: -- LAYOUT Attribute_categroy. -- This is the layout_id.
413: -- Update HXC_RPT_TC_RESOURCE_TEMP with the corresponding layout_id
414: -- for each of the timecard records.

Line 413: -- Update HXC_RPT_TC_RESOURCE_TEMP with the corresponding layout_id

409: -- Public Procedure update_layout_ids
410: -- Join HXC_RPT_TC_RESOURCE_TEMP, HXC_TIME_ATTRIBUTE_USAGES, and
411: -- HXC_TIME_ATTRIBUTES to pick out Attribute1 from
412: -- LAYOUT Attribute_categroy. -- This is the layout_id.
413: -- Update HXC_RPT_TC_RESOURCE_TEMP with the corresponding layout_id
414: -- for each of the timecard records.
415:
416: IF g_debug
417: THEN

Line 438: UPDATE hxc_rpt_tc_resource_temp

434:
435: IF l_layout_id_tab.COUNT > 0
436: THEN
437: FORALL i IN l_layout_id_tab.FIRST..l_layout_id_tab.LAST
438: UPDATE hxc_rpt_tc_resource_temp
439: SET layout_id = l_layout_id_tab(i)
440: WHERE tc_bb_id = l_tbb_tab(i) ;
441: END IF;
442: l_layout_id_tab.DELETE;

Line 480: FROM hxc_rpt_tc_resource_temp gt,

476: bb.object_version_number,
477: bb.date_to,
478: bb.last_update_date,
479: bb.last_updated_by
480: FROM hxc_rpt_tc_resource_temp gt,
481: hxc_rpt_tc_details_all det,
482: hxc_time_building_blocks bb
483: WHERE bb.scope = 'DETAIL'
484: AND bb.time_building_block_id = det.detail_bb_id

Line 502: -- the timecard records in HXC_RPT_TC_RESOURCE_TEMP, get the

498: -- Public Procedure update_last_touched_date
499: -- Used for those detail records that are already collected in
500: -- HXC_RPT_TC_DETAILS_ALL table.
501: -- For those records in HXC_RPT_TC_DETAILS_ALL which belong to
502: -- the timecard records in HXC_RPT_TC_RESOURCE_TEMP, get the
503: -- last_updated_date, last_updated_by, and date_to values
504: -- from HXC_TIME_BUILDING_BLOCKS table, if the date_to column
505: -- is different.
506: -- Update all such records with the last_updated_date, last_updated_by

Line 572: hxc_rpt_tc_resource_temp gt

568: detail_bb_id,
569: detail_bb_ovn
570: FROM hxc_time_building_blocks bb,
571: hxc_rpt_tc_details_all det,
572: hxc_rpt_tc_resource_temp gt
573: WHERE bb.time_building_block_id = det.tc_bb_id
574: AND bb.object_version_number = det.tc_bb_ovn
575: AND bb.comment_text IS NOT NULL
576: AND det.tc_bb_id = gt.tc_bb_id

Line 713: FROM hxc_rpt_tc_resource_temp gt,

709: gt.request_id,
710: gt.resource_name,
711: day.date_to,
712: detail.approval_status
713: FROM hxc_rpt_tc_resource_temp gt,
714: hxc_time_building_blocks day,
715: hxc_time_building_blocks detail
716: WHERE gt.tc_bb_id = day.parent_building_block_id
717: AND gt.resource_id = day.resource_id

Line 804: FROM hxc_rpt_tc_resource_temp gt,

800: MAX(DECODE(ATTRIBUTE_CATEGORY,''REASON'',ha.ATTRIBUTE3)),
801: ';
802: dynamic_cursor_where VARCHAR2(2000);
803: l_dynamic_cursor_where VARCHAR2(2000) := '
804: FROM hxc_rpt_tc_resource_temp gt,
805: hxc_rpt_tc_details_all det,
806: hxc_time_attribute_usages hau,
807: hxc_time_attributes ha
808: WHERE gt.tc_bb_id = det.tc_bb_id

Line 944: -- FROM hxc_rpt_tc_resource_temp gt,

940: -- MAX(DECODE(ATTRIBUTE_CATEGORY,'REASON',ha.ATTRIBUTE2)),
941: -- MAX(DECODE(ATTRIBUTE_CATEGORY,'REASON',ha.ATTRIBUTE3)),
942: -- MAX(DECODE(ATTRIBUTE_CATEGORY,'APPROVAL',ha.Attribute10))
943: -- ,MAX(DECODE(ATTRIBUTE_CATEGORY,'Dummy Cost Context',ha.Attribute1))
944: -- FROM hxc_rpt_tc_resource_temp gt,
945: -- hxc_rpt_tc_details_all det,
946: -- hxc_time_attribute_usages hau,
947: -- hxc_time_attributes ha
948: -- WHERE gt.tc_bb_id = det.tc_bb_id

Line 1171: FROM hxc_rpt_tc_resource_temp gt

1167: SET ';
1168:
1169: l_update_where VARCHAR2(4000) :=
1170: ' WHERE tc_bb_id IN ( SELECT tc_bb_id
1171: FROM hxc_rpt_tc_resource_temp gt
1172: WHERE layout_id = current_layout
1173: )
1174: AND request_id = THIS_REQUEST_ID';
1175:

Line 1243: FROM hxc_rpt_tc_resource_temp

1239:
1240:
1241: CURSOR get_alias_defs (p_layout_id NUMBER)
1242: IS SELECT DISTINCT alias_definition_id
1243: FROM hxc_rpt_tc_resource_temp
1244: WHERE layout_id = p_layout_id
1245: AND alias_definition_id <> 0;
1246:
1247: l_curr_layout NUMBER;

Line 1285: hxc_rpt_tc_resource_temp gt,

1281: dynamic_where VARCHAR2(2000);
1282: l_dynamic_where VARCHAR2(2000) :=
1283: ' '' ''
1284: FROM hxc_rpt_tc_details_all det,
1285: hxc_rpt_tc_resource_temp gt,
1286: hxc_time_attribute_usages hau,
1287: hxc_time_attributes ha
1288: WHERE gt.tc_bb_id = det.tc_bb_id
1289: AND gt.layout_id = curr_layout_id

Line 1422: -- hxc_rpt_tc_resource_temp gt,

1418: -- MAX(DECODE(bld_blk_info_type_id,1,LTRIM(ha.ATTRIBUTE_CATEGORY,'ELEMENT - '))),
1419: -- MAX(DECODE(bld_blk_info_type_id,201,ha.ATTRIBUTE1)),
1420: -- ' '
1421: -- FROM hxc_rpt_tc_details_all det,
1422: -- hxc_rpt_tc_resource_temp gt,
1423: -- hxc_time_attribute_usages hau,
1424: -- hxc_time_attributes ha
1425: -- WHERE gt.tc_bb_id = det.tc_bb_id
1426: -- AND gt.layout_id = 7

Line 1521: UPDATE hxc_rpt_tc_resource_temp

1517:
1518: l_attr_col := p_alias_tab(i).alias_column;
1519: l_alias_name := p_alias_tab(i).alias_name;
1520:
1521: UPDATE hxc_rpt_tc_resource_temp
1522: SET alias_definition_id = NVL( hxc_preference_evaluation.resource_preferences
1523: (resource_id,
1524: 'TC_W_TCRD_ALIASES',
1525: i,

Line 1654: hxc_rpt_tc_resource_temp gt,

1650: rtrim(substr(flv.lookup_type,5,6),'_A'),
1651: det.detail_bb_id,
1652: det.detail_bb_ovn
1653: FROM hxc_rpt_tc_details_all det,
1654: hxc_rpt_tc_resource_temp gt,
1655: fnd_lookup_values flv
1656: WHERE gt.request_id = det.request_id
1657: AND gt.resource_id = det.resource_id
1658: AND gt.tc_start_time = det.tc_start_time

Line 1752: hxc_rpt_tc_resource_temp gt,

1748: htd.transaction_detail_id,
1749: det.detail_bb_id,
1750: det.detail_bb_ovn
1751: FROM hxc_rpt_tc_details_all det,
1752: hxc_rpt_tc_resource_temp gt,
1753: hxc_transaction_details htd,
1754: hxc_transactions ht
1755: WHERE gt.tc_start_time = det.tc_start_time
1756: AND gt.tc_stop_time = det.tc_stop_time

Line 1776: hxc_rpt_tc_resource_temp gt,

1772: htd.transaction_detail_id,
1773: det.detail_bb_id,
1774: det.detail_bb_ovn
1775: FROM hxc_rpt_tc_details_all det,
1776: hxc_rpt_tc_resource_temp gt,
1777: hxc_dep_transaction_details htd,
1778: hxc_dep_transactions ht
1779: WHERE gt.tc_start_time = det.tc_start_time
1780: AND gt.tc_stop_time = det.tc_stop_time

Line 1836: hxc_rpt_tc_resource_temp temp

1832: det.resource_id,
1833: det.tc_start_time,
1834: det.tc_stop_time
1835: FROM hxc_rpt_tc_details_all det,
1836: hxc_rpt_tc_resource_temp temp
1837: WHERE temp.resource_id = det.resource_id
1838: AND temp.tc_start_time = det.tc_start_time
1839: AND temp.tc_stop_time = det.tc_stop_time
1840: )

Line 2151: FROM hxc_rpt_tc_resource_temp gt,

2147: det.detail_bb_id,
2148: det.detail_bb_ovn,
2149: fnd.user_name||newline||'['||
2150: ppf.full_name||']'
2151: FROM hxc_rpt_tc_resource_temp gt,
2152: hxc_rpt_tc_details_all det,
2153: fnd_user fnd,
2154: per_all_people_f ppf
2155: WHERE gt.tc_bb_id = det.tc_bb_id

Line 2237: FROM hxc_rpt_tc_resource_temp gt,

2233: det.detail_bb_id,
2234: det.detail_bb_ovn,
2235: fnd.user_name||newline||'['||
2236: ppf.full_name||']'
2237: FROM hxc_rpt_tc_resource_temp gt,
2238: hxc_rpt_tc_details_all det,
2239: fnd_user fnd,
2240: per_all_people_f ppf
2241: WHERE gt.tc_bb_id = det.tc_bb_id

Line 2331: -- Delete from HXC_RPT_TC_RESOURCE_TEMP all records which are updated as above.

2327:
2328: -- Public Procedure log_time_capture
2329: -- If the timecard is already recorded in HXC_RPT_TC_HIST_LOG, update the
2330: -- history_till_date column with the request date.
2331: -- Delete from HXC_RPT_TC_RESOURCE_TEMP all records which are updated as above.
2332: -- For all the distinct timecard records existing in HXC_RPT_TC_RESOURCE_TEMP,
2333: -- insert a relevant record into HXC_RPT_TC_HIST_LOG.
2334:
2335: IF g_debug

Line 2332: -- For all the distinct timecard records existing in HXC_RPT_TC_RESOURCE_TEMP,

2328: -- Public Procedure log_time_capture
2329: -- If the timecard is already recorded in HXC_RPT_TC_HIST_LOG, update the
2330: -- history_till_date column with the request date.
2331: -- Delete from HXC_RPT_TC_RESOURCE_TEMP all records which are updated as above.
2332: -- For all the distinct timecard records existing in HXC_RPT_TC_RESOURCE_TEMP,
2333: -- insert a relevant record into HXC_RPT_TC_HIST_LOG.
2334:
2335: IF g_debug
2336: THEN

Line 2350: FROM hxc_rpt_tc_resource_temp )

2346: tc_stop_time)
2347: IN ( SELECT resource_id,
2348: tc_start_time,
2349: tc_stop_time
2350: FROM hxc_rpt_tc_resource_temp )
2351: RETURNING resource_id,
2352: tc_start_time,
2353: tc_stop_time BULK COLLECT INTO resource_id_tab,
2354: start_time_tab,

Line 2366: DELETE FROM hxc_rpt_tc_resource_temp

2362:
2363: IF resource_id_tab.COUNT > 0
2364: THEN
2365: FORALL i IN resource_id_tab.FIRST..resource_id_tab.LAST
2366: DELETE FROM hxc_rpt_tc_resource_temp
2367: WHERE resource_id = resource_id_tab(i)
2368: AND tc_start_time = start_time_tab(i)
2369: AND tc_stop_time = stop_time_tab(i);
2370:

Line 2384: FROM hxc_rpt_tc_resource_temp

2380: tc_start_time,
2381: tc_stop_time,
2382: MIN(p_request_id),
2383: MIN(p_request_sysdate)
2384: FROM hxc_rpt_tc_resource_temp
2385: GROUP BY resource_id,
2386: tc_start_time,
2387: tc_stop_time;
2388:

Line 2430: FROM hxc_rpt_tc_resource_temp;

2426:
2427:
2428: CURSOR get_layout_ids
2429: IS SELECT DISTINCT layout_id
2430: FROM hxc_rpt_tc_resource_temp;
2431:
2432: l_layout_id NUMBER(15);
2433: l_alias_tab ALIASTAB;
2434: l_where_clause VARCHAR2(6000);

Line 2465: -- Clear HXC_RPT_TC_RESOURCE_TEMP, for the next iteration ( next 20 resources ).

2461: -- Translate the created by user_ids to user_names and employee names.
2462: -- Translate the last updated by user_ids to user_names and employee names.
2463: -- Log the time capture for each timecard records in HXC_RPT_TC_HIST_LOG for
2464: -- future reference.
2465: -- Clear HXC_RPT_TC_RESOURCE_TEMP, for the next iteration ( next 20 resources ).
2466:
2467: g_request_sysdate := SYSDATE;
2468: g_request_id := FND_GLOBAL.CONC_PRIORITY_REQUEST;
2469:

Line 2508: DELETE FROM hxc_rpt_tc_resource_temp;

2504: clear_history_data;
2505: END IF;
2506:
2507:
2508: DELETE FROM hxc_rpt_tc_resource_temp;
2509:
2510: IF g_debug
2511: THEN
2512: hr_utility.trace('Cleared hxc_rpt_tc_resource_temp, just in case the last run crashed');

Line 2512: hr_utility.trace('Cleared hxc_rpt_tc_resource_temp, just in case the last run crashed');

2508: DELETE FROM hxc_rpt_tc_resource_temp;
2509:
2510: IF g_debug
2511: THEN
2512: hr_utility.trace('Cleared hxc_rpt_tc_resource_temp, just in case the last run crashed');
2513: hr_utility.trace(SQLCODE);
2514: END IF;
2515:
2516:

Line 2537: FROM hxc_rpt_tc_resource_temp

2533:
2534:
2535: SELECT count(*)
2536: INTO timecard_exists
2537: FROM hxc_rpt_tc_resource_temp
2538: WHERE rownum < 2;
2539:
2540: IF timecard_exists = 0
2541: THEN

Line 2612: DELETE FROM hxc_rpt_tc_resource_temp;

2608: THEN
2609: hr_utility.trace('Finished processing for resource list '||i);
2610: hr_utility.trace('Clear the resource table and COMMIT the data collection ');
2611: END IF;
2612: DELETE FROM hxc_rpt_tc_resource_temp;
2613: COMMIT;
2614: END IF;
2615:
2616: END IF;