[Home] [Help]
958: BEGIN
959: -- pji_utils.write2log('In Procedure plan type code changes');
960:
961: select count(bmap.project_id) into l_count
962: from PA_PJI_PROJ_EVENTS_LOG elog,
963: PJI_PJP_PROJ_BATCH_MAP bmap
964: where elog.event_object = to_char(bmap.project_id)
965: and elog.event_type = 'PLANTYPE_UPG'
966: and bmap.worker_id = p_worker_id;
1047: FROM
1048: pa_budget_versions bv
1049: , pa_proj_fp_options fpo
1050: , (select distinct bmap.project_id,elog.ATTRIBUTE1 plan_type_id from
1051: PA_PJI_PROJ_EVENTS_LOG elog,
1052: PJI_PJP_PROJ_BATCH_MAP bmap
1053: where elog.event_object = to_char(bmap.project_id)
1054: and elog.EVENT_TYPE = 'PLANTYPE_UPG'
1055: and bmap.worker_id = p_worker_id) logmap
2679: );
2680:
2681: -- pji_utils.write2log('Inserted records into fact'||sql%rowcount);
2682:
2683: DELETE pa_pji_proj_events_log log
2684: where log.event_type = 'PLANTYPE_UPG'
2685: and exists (select 1 from pji_fm_extr_plnver4 ver
2686: where ver.worker_id = p_worker_id and
2687: to_char(ver.project_id) = log.event_object);
2686: where ver.worker_id = p_worker_id and
2687: to_char(ver.project_id) = log.event_object);
2688:
2689:
2690: --pji_utils.write2log('Deleted records from pa_pji_proj_events_log'||sql%rowcount);
2691:
2692: DELETE FROM pji_fm_extr_plnver4 where worker_id = p_worker_id;
2693:
2694: --pji_utils.write2log('Deleted records from pji_fm_extr_plnver4'||sql%rowcount);
2701:
2702: Begin
2703: select 1 into l_count from dual
2704: where exists ( select event_type
2705: from PA_PJI_PROJ_EVENTS_LOG elog
2706: where elog.event_type = 'PLANTYPE_UPG');
2707: exception when NO_DATA_FOUND then
2708: PJI_UTILS.SET_PARAMETER ('PJI_PTC_UPGRADE', 'C');
2709: end;
3310: PRJ_CURRENCY_CODE,
3311: PROJECT_ACTIVE_FLAG
3312: )
3313: select /*+ ordered
3314: index(log, PA_PJI_PROJ_EVENTS_LOG_N1)
3315: index(rbs_asg, PA_RBS_PRJ_ASSIGNMENTS_N1) */
3316: distinct
3317: p_worker_id,
3318: rbs_asg.PROJECT_ID,
3330: 'Y' PROJECT_ACTIVE_FLAG
3331: /* decode(active_projects.PROJECT_ID,
3332: null, 'N', 'Y') PROJECT_ACTIVE_FLAG */
3333: from
3334: PA_PJI_PROJ_EVENTS_LOG log,
3335: PA_RBS_PRJ_ASSIGNMENTS rbs_asg,
3336: PA_PROJECTS_ALL prj,
3337: PA_PROJECT_TYPES_ALL pt /*,
3338: ( Processing is now not depending on status Bug 5057835
3513: (l_extraction_type = 'PARTIAL' and
3514: EXTRACTION_STATUS <> 'I'));
3515:
3516: delete
3517: from PA_PJI_PROJ_EVENTS_LOG log
3518: where log.EVENT_TYPE in ('WBS_CHANGE',
3519: 'WBS_PUBLISH'/*,
3520: 'RBS_ASSOC',
3521: 'RBS_PRG'*/ --Commented for bug#6113807 by VVJOSHI