1009:
1010: l_plan_version_id_tbl.DELETE;
1011:
1012: --PJI_PJP_SUM_ROLLUP.ROLLUP_FPR_RBS_SMART_SLICES;
1013: --Pji_Fm_Plan_Maint_T_Pvt.MERGE_INTO_FP_FACT;
1014:
1015: CLEANUP_TEMP_TABLES;
1016: --maintain_smart_slice does not clean data populated by itself
1017:
1557: l_d_fp_version_ids := SYSTEM.pa_num_tbl_type (p_dest_fp_version_ids(i) );
1558:
1559: print_time ( ' plan copy api .. 008 ' );
1560:
1561: Pji_Fm_Plan_Maint_T_Pvt.COPY_PRIMARY
1562: (
1563: p_source_fp_version_ids => l_s_fp_version_ids
1564: , p_dest_fp_version_ids => l_d_fp_version_ids
1565: , p_commit => 'F'
1649: END IF;
1650:
1651: print_time ( ' plan copy PVT api .. 005 ' );
1652:
1653: Pji_Fm_Plan_Maint_T_Pvt.COPY_PRIMARY
1654: (
1655: p_source_fp_version_ids => l_s_fp_version_ids
1656: , p_dest_fp_version_ids => l_d_fp_version_ids
1657: , p_commit => 'F'
2273: p_new_original_version => l_new_orig_ver_id,
2274: p_old_struct_version => NULL,
2275: p_new_struct_version => NULL);
2276:
2277: Pji_Fm_Plan_Maint_T_Pvt.CLEANUP_INTERIM_TABLES; -- Clean up interim tables.
2278: print_time(' Mark original private: Cleaned up interim tables. ');
2279:
2280: -- Populated ver3 just to get the level info in rollup_fpr_wbs Bug 5528058
2281: PJI_FM_PLAN_MAINT_T_PVT.EXTRACT_FIN_PLAN_VERSIONS(l_fp_version_ids, 'PRI');
2277: Pji_Fm_Plan_Maint_T_Pvt.CLEANUP_INTERIM_TABLES; -- Clean up interim tables.
2278: print_time(' Mark original private: Cleaned up interim tables. ');
2279:
2280: -- Populated ver3 just to get the level info in rollup_fpr_wbs Bug 5528058
2281: PJI_FM_PLAN_MAINT_T_PVT.EXTRACT_FIN_PLAN_VERSIONS(l_fp_version_ids, 'PRI');
2282: -- PJI_FM_PLAN_MAINT_T_PVT.EXTRACT_FIN_PLAN_VERSIONS(l_fp_version_ids, 'SECRBS');
2283: print_time(' Populated ver3. ');
2284:
2285: PJI_FM_PLAN_MAINT_T_PVT.CREATE_WBSRLP;
2278: print_time(' Mark original private: Cleaned up interim tables. ');
2279:
2280: -- Populated ver3 just to get the level info in rollup_fpr_wbs Bug 5528058
2281: PJI_FM_PLAN_MAINT_T_PVT.EXTRACT_FIN_PLAN_VERSIONS(l_fp_version_ids, 'PRI');
2282: -- PJI_FM_PLAN_MAINT_T_PVT.EXTRACT_FIN_PLAN_VERSIONS(l_fp_version_ids, 'SECRBS');
2283: print_time(' Populated ver3. ');
2284:
2285: PJI_FM_PLAN_MAINT_T_PVT.CREATE_WBSRLP;
2286: print_time(' Mark original private: Created WBS rollups. ');
2281: PJI_FM_PLAN_MAINT_T_PVT.EXTRACT_FIN_PLAN_VERSIONS(l_fp_version_ids, 'PRI');
2282: -- PJI_FM_PLAN_MAINT_T_PVT.EXTRACT_FIN_PLAN_VERSIONS(l_fp_version_ids, 'SECRBS');
2283: print_time(' Populated ver3. ');
2284:
2285: PJI_FM_PLAN_MAINT_T_PVT.CREATE_WBSRLP;
2286: print_time(' Mark original private: Created WBS rollups. ');
2287:
2288: PJI_PJP_SUM_ROLLUP.ROLLUP_FPR_RBS_SMART_SLICES;
2289:
2286: print_time(' Mark original private: Created WBS rollups. ');
2287:
2288: PJI_PJP_SUM_ROLLUP.ROLLUP_FPR_RBS_SMART_SLICES;
2289:
2290: PJI_FM_PLAN_MAINT_T_PVT.UPDATE_WBS_HDR;
2291: print_time('Updated the WBS header table with min max txn dates.');
2292:
2293: PJI_FM_PLAN_MAINT_T_PVT.MERGE_INTO_FP_FACT;
2294: print_time(' Mark original private: Merged into fact. ');
2289:
2290: PJI_FM_PLAN_MAINT_T_PVT.UPDATE_WBS_HDR;
2291: print_time('Updated the WBS header table with min max txn dates.');
2292:
2293: PJI_FM_PLAN_MAINT_T_PVT.MERGE_INTO_FP_FACT;
2294: print_time(' Mark original private: Merged into fact. ');
2295:
2296:
2297: ------------------------------------------
2304: p_event_ids => l_event_ids
2305: , x_return_status => l_return_status
2306: , x_msg_code => l_msg_code );
2307:
2308: Pji_Fm_Plan_Maint_T_Pvt.CLEANUP_INTERIM_TABLES;
2309: print_time(' Mark original private: Cleaned up interim tables. ');
2310:
2311: EXCEPTION
2312: WHEN OTHERS THEN
3154: l_baseline_fp_ver_id.EXTEND;
3155: l_baseline_fp_ver_id(l_baseline_fp_ver_id.COUNT) := l_fp_version_ids(l_count);
3156:
3157:
3158: PJI_FM_PLAN_MAINT_T_PVT.CLEANUP_INTERIM_TABLES;
3159: print_time(' Cleaned up ver3_t table. ');
3160:
3161:
3162: PJI_FM_PLAN_MAINT_T_PVT.EXTRACT_FIN_PLAN_VERSIONS(l_baseline_fp_ver_id, 'PRI');
3158: PJI_FM_PLAN_MAINT_T_PVT.CLEANUP_INTERIM_TABLES;
3159: print_time(' Cleaned up ver3_t table. ');
3160:
3161:
3162: PJI_FM_PLAN_MAINT_T_PVT.EXTRACT_FIN_PLAN_VERSIONS(l_baseline_fp_ver_id, 'PRI');
3163: PJI_FM_PLAN_MAINT_T_PVT.EXTRACT_FIN_PLAN_VERSIONS(l_baseline_fp_ver_id, 'SECRBS');
3164: print_time(' Populated ver3. ');
3165:
3166:
3159: print_time(' Cleaned up ver3_t table. ');
3160:
3161:
3162: PJI_FM_PLAN_MAINT_T_PVT.EXTRACT_FIN_PLAN_VERSIONS(l_baseline_fp_ver_id, 'PRI');
3163: PJI_FM_PLAN_MAINT_T_PVT.EXTRACT_FIN_PLAN_VERSIONS(l_baseline_fp_ver_id, 'SECRBS');
3164: print_time(' Populated ver3. ');
3165:
3166:
3167: INSERT INTO PJI_FM_EXTR_PLNVER3_T ver3
3221: WHERE plan_version_id > 0;
3222: print_time(' Need only -3, -4 records, deleted other plan version. ');
3223:
3224:
3225: PJI_FM_PLAN_MAINT_T_PVT.POPULATE_RBS_HDR;
3226: print_time ( ' Inserted -3, -4 RBS headers inserted. ' );
3227:
3228: PJI_FM_PLAN_MAINT_T_PVT.POPULATE_WBS_HDR;
3229: print_time ( ' Inserted -3, -4 WBS headers inserted. ' );
3224:
3225: PJI_FM_PLAN_MAINT_T_PVT.POPULATE_RBS_HDR;
3226: print_time ( ' Inserted -3, -4 RBS headers inserted. ' );
3227:
3228: PJI_FM_PLAN_MAINT_T_PVT.POPULATE_WBS_HDR;
3229: print_time ( ' Inserted -3, -4 WBS headers inserted. ' );
3230:
3231:
3232: PJI_FM_PLAN_MAINT_T_PVT.CLEANUP_INTERIM_TABLES;
3228: PJI_FM_PLAN_MAINT_T_PVT.POPULATE_WBS_HDR;
3229: print_time ( ' Inserted -3, -4 WBS headers inserted. ' );
3230:
3231:
3232: PJI_FM_PLAN_MAINT_T_PVT.CLEANUP_INTERIM_TABLES;
3233: print_time ( ' Cleaned up ver3. ' );
3234:
3235:
3236: SELECT COUNT(1)
4403: --RETURN;
4404: NULL;
4405: ELSE
4406:
4407: Pji_Fm_Plan_Maint_T_Pvt.EXTRACT_FIN_PLAN_VERSIONS(
4408: p_fp_version_ids => l_plan_version_id_tbl
4409: , p_slice_type => 'PRI'
4410: );
4411:
4452: p_worker_id => 1
4453: ,p_extraction_type => 'ONLINE');
4454:
4455: IF g_debug_mode='Y' THEN
4456: Pji_Utils.write2log(' WBS_MAINT_PVT: Pji_Fm_Plan_Maint_T_Pvt.MERGE_INTO_FP_FACT',null,3);
4457: end if;
4458: Pji_Fm_Plan_Maint_T_Pvt.MERGE_INTO_FP_FACT;
4459:
4460:
4454:
4455: IF g_debug_mode='Y' THEN
4456: Pji_Utils.write2log(' WBS_MAINT_PVT: Pji_Fm_Plan_Maint_T_Pvt.MERGE_INTO_FP_FACT',null,3);
4457: end if;
4458: Pji_Fm_Plan_Maint_T_Pvt.MERGE_INTO_FP_FACT;
4459:
4460:
4461: Pji_Fm_Plan_Maint_T_Pvt.MERGE_INTO_AC_FACT;
4462:
4457: end if;
4458: Pji_Fm_Plan_Maint_T_Pvt.MERGE_INTO_FP_FACT;
4459:
4460:
4461: Pji_Fm_Plan_Maint_T_Pvt.MERGE_INTO_AC_FACT;
4462:
4463:
4464:
4465: END IF;
6213: END;
6214:
6215: CLEANUP_TEMP_TABLES;
6216:
6217: PJI_FM_PLAN_MAINT_T_PVT.EXTRACT_FIN_PLAN_VERSIONS(
6218: p_fp_version_ids => l_plan_version_id_tbl
6219: , p_slice_type => 'PRI'
6220: );
6221: IF g_debug_mode='Y' THEN
6218: p_fp_version_ids => l_plan_version_id_tbl
6219: , p_slice_type => 'PRI'
6220: );
6221: IF g_debug_mode='Y' THEN
6222: Pji_Utils.write2log(' maintain smart slice44.02:PJI_FM_PLAN_MAINT_T_PVT.EXTRACT_FIN_PLAN_VERSIONS' ,null,3);
6223: end if;
6224:
6225: IF g_debug_mode='Y' THEN
6226: Pji_Utils.write2log(' maintain smart slice55:l_plan_version_id_tbl.COUNT: '||l_plan_version_id_tbl.COUNT||
6973: IF g_debug_mode='Y' THEN
6974: Pji_Utils.write2log(' Inserted RBS rollup for all slices ' || SQL%ROWCOUNT ,null,3);
6975: end if;
6976:
6977: Pji_Fm_Plan_Maint_T_Pvt.MERGE_INTO_FP_FACT;
6978:
6979: IF p_commit = 'Y' THEN
6980: COMMIT;
6981: END IF;