[Home] [Help]
410: , degree => l_degree
411: );
412: FND_STATS.GATHER_TABLE_STATS(
413: ownname => l_schema
414: , tabname => 'PJI_RM_WORK_TYPE_INFO'
415: , percent => 50
416: , degree => l_degree
417: );
418: FND_STATS.GATHER_COLUMN_STATS(ownname => l_schema,
415: , percent => 50
416: , degree => l_degree
417: );
418: FND_STATS.GATHER_COLUMN_STATS(ownname => l_schema,
419: tabname => 'PJI_RM_WORK_TYPE_INFO',
420: colname => 'WORK_TYPE_ID',
421: percent => 10,
422: degree => l_degree);
423: FND_STATS.GATHER_COLUMN_STATS(ownname => l_schema,
420: colname => 'WORK_TYPE_ID',
421: percent => 10,
422: degree => l_degree);
423: FND_STATS.GATHER_COLUMN_STATS(ownname => l_schema,
424: tabname => 'PJI_RM_WORK_TYPE_INFO',
425: colname => 'RECORD_TYPE',
426: percent => 10,
427: degree => l_degree);
428: FND_STATS.GATHER_TABLE_STATS(
466: END SEED_PJI_RM_STATS;
467:
468:
469: -- ------------------------------------------------------------------
470: -- procedure UPDATE_PJI_RM_WORK_TYPE_INFO
471: --
472: -- This procedure maintains the table PJI_RM_WORK_TYPE_INFO
473: -- This table contains 3 slices of data which can be distinguished
474: -- by the value in RECORD_TYPE column
468:
469: -- ------------------------------------------------------------------
470: -- procedure UPDATE_PJI_RM_WORK_TYPE_INFO
471: --
472: -- This procedure maintains the table PJI_RM_WORK_TYPE_INFO
473: -- This table contains 3 slices of data which can be distinguished
474: -- by the value in RECORD_TYPE column
475: -- RECORD_TYPE column can take 3 values
476: -- NORMAL - This slice is a copy of PA_WORK_TYPE _B table;
484: -- changed work type record. Records in this slice will
485: -- be copies of NORMAL slice records for which CHANGE_OLD
486: -- record exists
487: -- ------------------------------------------------------------------
488: procedure UPDATE_PJI_RM_WORK_TYPE_INFO (p_process in varchar2) is
489:
490: l_row_count number;
491: l_extraction_type varchar2(30);
492: l_event_id number;
492: l_event_id number;
493:
494: begin
495:
496: if (not PJI_PROCESS_UTIL.NEED_TO_RUN_STEP(p_process, 'PJI_PJI_EXTRACTION_UTILS.UPDATE_PJI_RM_WORK_TYPE_INFO(p_process);')) then
497: return;
498: end if;
499:
500: select count(*)
498: end if;
499:
500: select count(*)
501: into l_row_count
502: from PJI_RM_WORK_TYPE_INFO
503: where ROWNUM = 1;
504:
505: if (PJI_PROCESS_UTIL.GET_PROCESS_PARAMETER(PJI_FM_SUM_MAIN.g_process,
506: 'TRANSITION') = 'Y' and
509: end if;
510:
511: --delete CHANGE_NEW / CHANGE_OLD records
512: delete
513: from PJI_RM_WORK_TYPE_INFO
514: where RECORD_TYPE in ( 'CHANGE_NEW', 'CHANGE_OLD');
515:
516: --Conditional processing based on extraction type
517: --Work type change processing is not done for
522: IF l_extraction_type = 'PARTIAL' THEN
523: return;
524: END IF;
525:
526: --Synchronize NORMAL slice of PJI_RM_WORK_TYPE_INFO
527: --with PA_WORK_TYPES_B when extraction type is FULL
528: --or INCREMENTAL
529: insert into PJI_RM_WORK_TYPE_ROWID
530: (
544: else 'N'
545: end
546: from
547: PA_WORK_TYPES_B pa,
548: PJI_RM_WORK_TYPE_INFO pji
549: where
550: pa.WORK_TYPE_ID = pji.WORK_TYPE_ID (+) and
551: pji.RECORD_TYPE (+)= 'NORMAL';
552:
550: pa.WORK_TYPE_ID = pji.WORK_TYPE_ID (+) and
551: pji.RECORD_TYPE (+)= 'NORMAL';
552:
553: delete
554: from PJI_RM_WORK_TYPE_INFO wt
555: where
556: wt.ROWID not in
557: (
558: select
565: and wt.RECORD_TYPE = 'NORMAL';
566:
567: pji_utils.write2log(sql%rowcount || ' rows deleted.');
568:
569: update PJI_RM_WORK_TYPE_INFO wt
570: set
571: (
572: WORK_TYPE_ID,
573: BILLABLE_CAPITALIZABLE_FLAG,
608: );
609:
610: pji_utils.write2log(sql%rowcount || ' rows updated.');
611:
612: insert into PJI_RM_WORK_TYPE_INFO
613: (
614: WORK_TYPE_ID,
615: BILLABLE_CAPITALIZABLE_FLAG,
616: REDUCE_CAPACITY_FLAG,
688:
689: pji_utils.write2log(sql%rowcount || ' rows deleted :2.');
690:
691: --populate CHANGE_OLD slice from PA_PJI_PROJ_EVENTS_LOG table
692: insert into PJI_RM_WORK_TYPE_INFO
693: (
694: WORK_TYPE_ID,
695: BILLABLE_CAPITALIZABLE_FLAG,
696: REDUCE_CAPACITY_FLAG,
732: log.EVENT_TYPE = 'Work Types' and
733: log.OPERATION_TYPE = 'U';
734: pji_utils.write2log(sql%rowcount || ' rows deleted 3.');
735:
736: --Populate PJI_RM_WORK_TYPE_INFO with CHANGE_NEW records
737: insert into PJI_RM_WORK_TYPE_INFO
738: (
739: WORK_TYPE_ID,
740: BILLABLE_CAPITALIZABLE_FLAG,
733: log.OPERATION_TYPE = 'U';
734: pji_utils.write2log(sql%rowcount || ' rows deleted 3.');
735:
736: --Populate PJI_RM_WORK_TYPE_INFO with CHANGE_NEW records
737: insert into PJI_RM_WORK_TYPE_INFO
738: (
739: WORK_TYPE_ID,
740: BILLABLE_CAPITALIZABLE_FLAG,
741: REDUCE_CAPACITY_FLAG,
759: CREATION_DATE,
760: CREATED_BY,
761: LAST_UPDATE_DATE,
762: LAST_UPDATED_BY
763: from PJI_RM_WORK_TYPE_INFO info
764: where info.RECORD_TYPE = 'NORMAL'
765: and info.WORK_TYPE_ID in ( select WORK_TYPE_ID
766: from PJI_RM_WORK_TYPE_INFO wt
767: where wt.RECORD_TYPE = 'CHANGE_OLD');
762: LAST_UPDATED_BY
763: from PJI_RM_WORK_TYPE_INFO info
764: where info.RECORD_TYPE = 'NORMAL'
765: and info.WORK_TYPE_ID in ( select WORK_TYPE_ID
766: from PJI_RM_WORK_TYPE_INFO wt
767: where wt.RECORD_TYPE = 'CHANGE_OLD');
768:
769: pji_utils.write2log(sql%rowcount || ' rows inserted :3.');
770:
767: where wt.RECORD_TYPE = 'CHANGE_OLD');
768:
769: pji_utils.write2log(sql%rowcount || ' rows inserted :3.');
770:
771: PJI_PROCESS_UTIL.REGISTER_STEP_COMPLETION(p_process, 'PJI_PJI_EXTRACTION_UTILS.UPDATE_PJI_RM_WORK_TYPE_INFO(p_process);');
772:
773: PJI_PROCESS_UTIL.TRUNC_INT_TABLE(PJI_UTILS.GET_PJI_SCHEMA_NAME, 'PJI_RM_WORK_TYPE_ROWID', 'NORMAL', null);
774:
775: commit;
773: PJI_PROCESS_UTIL.TRUNC_INT_TABLE(PJI_UTILS.GET_PJI_SCHEMA_NAME, 'PJI_RM_WORK_TYPE_ROWID', 'NORMAL', null);
774:
775: commit;
776:
777: end UPDATE_PJI_RM_WORK_TYPE_INFO;
778:
779:
780: -- -----------------------------------------------------
781: -- procedure UPDATE_PJI_ORG_HRCHY
1240: delete from PJI_SYSTEM_PRC_STATUS where PROCESS_NAME like (PJI_RM_SUM_MAIN.g_process || '%');
1241:
1242: PJI_PROCESS_UTIL.TRUNC_INT_TABLE(l_pji_schema, 'PJI_PROJECT_CLASSES', 'NORMAL', null);
1243: PJI_PROCESS_UTIL.TRUNC_INT_TABLE(l_pji_schema, 'PJI_RESOURCES_DENORM', 'NORMAL', null);
1244: PJI_PROCESS_UTIL.TRUNC_INT_TABLE(l_pji_schema, 'PJI_RM_WORK_TYPE_INFO', 'NORMAL', null);
1245: PJI_PROCESS_UTIL.TRUNC_INT_TABLE(l_pji_schema, 'PJI_CLASS_CATEGORIES', 'NORMAL', null);
1246: PJI_PROCESS_UTIL.TRUNC_INT_TABLE(l_pji_schema, 'PJI_CLASS_CODES', 'NORMAL', null);
1247: PJI_PROCESS_UTIL.TRUNC_INT_TABLE(l_pji_schema, 'PJI_ORG_DENORM', 'NORMAL', null);
1248: