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: hxc_rpt_tc_resource_temp gt

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

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

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

Line 570: hxc_rpt_tc_resource_temp gt

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

Line 711: FROM hxc_rpt_tc_resource_temp gt,

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

Line 802: FROM hxc_rpt_tc_resource_temp gt,

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

Line 942: -- FROM hxc_rpt_tc_resource_temp gt,

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

Line 1169: FROM hxc_rpt_tc_resource_temp gt

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

Line 1241: FROM hxc_rpt_tc_resource_temp

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

Line 1283: hxc_rpt_tc_resource_temp gt,

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

Line 1420: -- hxc_rpt_tc_resource_temp gt,

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

Line 1519: UPDATE hxc_rpt_tc_resource_temp

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

Line 1652: hxc_rpt_tc_resource_temp gt,

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

Line 1747: hxc_rpt_tc_resource_temp gt,

1743: htd.transaction_detail_id,
1744: det.detail_bb_id,
1745: det.detail_bb_ovn
1746: FROM hxc_rpt_tc_details_all det,
1747: hxc_rpt_tc_resource_temp gt,
1748: hxc_transaction_details htd,
1749: hxc_transactions ht
1750: WHERE gt.tc_start_time = det.tc_start_time
1751: AND gt.tc_stop_time = det.tc_stop_time

Line 1804: hxc_rpt_tc_resource_temp temp

1800: det.resource_id,
1801: det.tc_start_time,
1802: det.tc_stop_time
1803: FROM hxc_rpt_tc_details_all det,
1804: hxc_rpt_tc_resource_temp temp
1805: WHERE temp.resource_id = det.resource_id
1806: AND temp.tc_start_time = det.tc_start_time
1807: AND temp.tc_stop_time = det.tc_stop_time
1808: )

Line 2079: FROM hxc_rpt_tc_resource_temp gt,

2075: det.detail_bb_id,
2076: det.detail_bb_ovn,
2077: fnd.user_name||newline||'['||
2078: ppf.full_name||']'
2079: FROM hxc_rpt_tc_resource_temp gt,
2080: hxc_rpt_tc_details_all det,
2081: fnd_user fnd,
2082: per_all_people_f ppf
2083: WHERE gt.tc_bb_id = det.tc_bb_id

Line 2165: FROM hxc_rpt_tc_resource_temp gt,

2161: det.detail_bb_id,
2162: det.detail_bb_ovn,
2163: fnd.user_name||newline||'['||
2164: ppf.full_name||']'
2165: FROM hxc_rpt_tc_resource_temp gt,
2166: hxc_rpt_tc_details_all det,
2167: fnd_user fnd,
2168: per_all_people_f ppf
2169: WHERE gt.tc_bb_id = det.tc_bb_id

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

2255:
2256: -- Public Procedure log_time_capture
2257: -- If the timecard is already recorded in HXC_RPT_TC_HIST_LOG, update the
2258: -- history_till_date column with the request date.
2259: -- Delete from HXC_RPT_TC_RESOURCE_TEMP all records which are updated as above.
2260: -- For all the distinct timecard records existing in HXC_RPT_TC_RESOURCE_TEMP,
2261: -- insert a relevant record into HXC_RPT_TC_HIST_LOG.
2262:
2263: IF g_debug

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

2256: -- Public Procedure log_time_capture
2257: -- If the timecard is already recorded in HXC_RPT_TC_HIST_LOG, update the
2258: -- history_till_date column with the request date.
2259: -- Delete from HXC_RPT_TC_RESOURCE_TEMP all records which are updated as above.
2260: -- For all the distinct timecard records existing in HXC_RPT_TC_RESOURCE_TEMP,
2261: -- insert a relevant record into HXC_RPT_TC_HIST_LOG.
2262:
2263: IF g_debug
2264: THEN

Line 2278: FROM hxc_rpt_tc_resource_temp )

2274: tc_stop_time)
2275: IN ( SELECT resource_id,
2276: tc_start_time,
2277: tc_stop_time
2278: FROM hxc_rpt_tc_resource_temp )
2279: RETURNING resource_id,
2280: tc_start_time,
2281: tc_stop_time BULK COLLECT INTO resource_id_tab,
2282: start_time_tab,

Line 2294: DELETE FROM hxc_rpt_tc_resource_temp

2290:
2291: IF resource_id_tab.COUNT > 0
2292: THEN
2293: FORALL i IN resource_id_tab.FIRST..resource_id_tab.LAST
2294: DELETE FROM hxc_rpt_tc_resource_temp
2295: WHERE resource_id = resource_id_tab(i)
2296: AND tc_start_time = start_time_tab(i)
2297: AND tc_stop_time = stop_time_tab(i);
2298:

Line 2312: FROM hxc_rpt_tc_resource_temp

2308: tc_start_time,
2309: tc_stop_time,
2310: MIN(p_request_id),
2311: MIN(p_request_sysdate)
2312: FROM hxc_rpt_tc_resource_temp
2313: GROUP BY resource_id,
2314: tc_start_time,
2315: tc_stop_time;
2316:

Line 2358: FROM hxc_rpt_tc_resource_temp;

2354:
2355:
2356: CURSOR get_layout_ids
2357: IS SELECT DISTINCT layout_id
2358: FROM hxc_rpt_tc_resource_temp;
2359:
2360: l_layout_id NUMBER(15);
2361: l_alias_tab ALIASTAB;
2362: l_where_clause VARCHAR2(6000);

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

2389: -- Translate the created by user_ids to user_names and employee names.
2390: -- Translate the last updated by user_ids to user_names and employee names.
2391: -- Log the time capture for each timecard records in HXC_RPT_TC_HIST_LOG for
2392: -- future reference.
2393: -- Clear HXC_RPT_TC_RESOURCE_TEMP, for the next iteration ( next 20 resources ).
2394:
2395: g_request_sysdate := SYSDATE;
2396: g_request_id := FND_GLOBAL.CONC_PRIORITY_REQUEST;
2397:

Line 2436: DELETE FROM hxc_rpt_tc_resource_temp;

2432: clear_history_data;
2433: END IF;
2434:
2435:
2436: DELETE FROM hxc_rpt_tc_resource_temp;
2437:
2438: IF g_debug
2439: THEN
2440: hr_utility.trace('Cleared hxc_rpt_tc_resource_temp, just in case the last run crashed');

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

2436: DELETE FROM hxc_rpt_tc_resource_temp;
2437:
2438: IF g_debug
2439: THEN
2440: hr_utility.trace('Cleared hxc_rpt_tc_resource_temp, just in case the last run crashed');
2441: hr_utility.trace(SQLCODE);
2442: END IF;
2443:
2444:

Line 2462: FROM hxc_rpt_tc_resource_temp

2458:
2459:
2460: SELECT count(*)
2461: INTO timecard_exists
2462: FROM hxc_rpt_tc_resource_temp
2463: WHERE rownum < 2;
2464:
2465: IF timecard_exists = 0
2466: THEN

Line 2526: DELETE FROM hxc_rpt_tc_resource_temp;

2522: THEN
2523: hr_utility.trace('Finished processing for resource list '||i);
2524: hr_utility.trace('Clear the resource table and COMMIT the data collection ');
2525: END IF;
2526: DELETE FROM hxc_rpt_tc_resource_temp;
2527: COMMIT;
2528: END IF;
2529:
2530: END IF;