59: CURSOR c_budget_lines_csr IS
60: select distinct plnt.project_id, sum(pbl.quantity) quantity,
61: ra.planning_start_date, ra.planning_end_date, ra.task_id,
62: plnt.plan_type_code, plnt.plan_version_id, plnt.rbs_struct_version_id /* For bug 10305483 */
63: from pa_budget_lines pbl, pji_fm_extr_plnver3_t plnt,
64: pa_resource_assignments ra
65: where pbl.budget_version_id = plnt.plan_version_id
66: and ra.resource_assignment_id =pbl.resource_asSIGNment_id
67: and ra.project_id = plnt.project_id
240: , 'ENTR'
241: , g_default_prg_level prg_level
242: , fact1.PLAN_TYPE_CODE PLAN_TYPE_CODE /* 4471527 */
243: FROM
244: PJI_FP_AGGR_PJP1_T fact1 -- , PJI_FM_EXTR_PLNVER3_T ver
245: , pji_time_ENT_PERIOD period
246: , pji_time_ENT_QTR qtr
247: , pji_fm_extr_plnver3_t ver
248: WHERE
243: FROM
244: PJI_FP_AGGR_PJP1_T fact1 -- , PJI_FM_EXTR_PLNVER3_T ver
245: , pji_time_ENT_PERIOD period
246: , pji_time_ENT_QTR qtr
247: , pji_fm_extr_plnver3_t ver
248: WHERE
249: fact1.calendar_type = 'E'
250: AND period.ENT_period_id = fact1.time_id
251: AND period.ENT_qtr_id = qtr.ENT_qtr_id
568: , l_line_type line_type
569: , g_default_prg_level prg_level
570: , fact1.PLAN_TYPE_CODE PLAN_TYPE_CODE /* 4471527 */
571: FROM
572: pji_fp_aggr_pjp1_t fact1 -- , PJI_FM_EXTR_PLNVER3_T ver
573: , pji_time_CAL_PERIOD period
574: , pji_time_CAL_QTR qtr
575: , pji_fm_extr_plnver3_t ver
576: WHERE
571: FROM
572: pji_fp_aggr_pjp1_t fact1 -- , PJI_FM_EXTR_PLNVER3_T ver
573: , pji_time_CAL_PERIOD period
574: , pji_time_CAL_QTR qtr
575: , pji_fm_extr_plnver3_t ver
576: WHERE
577: fact1.calendar_type = 'P'
578: AND period.cal_period_id = fact1.time_id
579: AND period.cal_qtr_id = qtr.cal_qtr_id
813: , l_line_type
814: , g_default_prg_level prg_level
815: , fact1.PLAN_TYPE_CODE PLAN_TYPE_CODE /* 4471527 */
816: FROM
817: pji_fp_aggr_pjp1_t fact1 -- , PJI_FM_EXTR_PLNVER3_T ver
818: , pji_time_CAL_PERIOD period
819: , pji_time_CAL_QTR qtr
820: , pji_fm_extr_plnver3_t ver
821: WHERE
816: FROM
817: pji_fp_aggr_pjp1_t fact1 -- , PJI_FM_EXTR_PLNVER3_T ver
818: , pji_time_CAL_PERIOD period
819: , pji_time_CAL_QTR qtr
820: , pji_fm_extr_plnver3_t ver
821: WHERE
822: fact1.calendar_type = l_calendar_type
823: AND period.cal_period_id = fact1.time_id
824: AND period.cal_qtr_id = qtr.cal_qtr_id
908: /* Modified for bug 9067086 ends */
909: END IF;
910: /* 4604617 */
911: BEGIN
912: select 1 into l_time_phase_change from PJI_FM_EXTR_PLNVER3_T VER
913: where EXISTS (SELECT 1 FROM PJI_FM_EXTR_PLAN_LINES PL
914: WHERE PL.PROJECT_ID = VER.PROJECT_ID
915: AND PL.PLAN_VERSION_ID = VER.PLAN_VERSION_ID
916: AND PL.PLAN_TYPE_ID = VER.PLAN_TYPE_ID
1091: FROM
1092: PJI_FP_AGGR_PJP1_T fact1
1093: , pji_time_CAL_PERIOD period
1094: , pji_time_CAL_QTR qtr
1095: , pji_fm_extr_plnver3_t ver
1096: WHERE
1097: fact1.calendar_type IN ( l_calendar_type
1098: , DECODE (l_calendar_type ,'C','G','X')
1099: , DECODE (l_calendar_type ,'C','P','X')
1213: FROM
1214: PJI_FP_AGGR_PJP1_T fact1
1215: , pji_time_CAL_PERIOD period
1216: , pji_time_CAL_QTR qtr
1217: , pji_fm_extr_plnver3_t ver
1218: WHERE
1219: fact1.calendar_type IN ( p_calendar_type
1220: , DECODE (p_calendar_type ,'C','G','X')
1221: , DECODE (p_calendar_type ,'C','P','X')
1652: , SUM(CUSTOM15) CUSTOM15
1653: , l_line_type
1654: , fact1.PLAN_TYPE_CODE PLAN_TYPE_CODE /* 4471527 */
1655: FROM
1656: pji_fp_aggr_pjp1_t fact1 -- , PJI_FM_EXTR_PLNVER3_T ver
1657: , pji_fm_extr_plnver3_t ver
1658: WHERE
1659: fact1.calendar_type = l_calendar_type
1660: AND fact1.period_type_id = l_period_type_id
1653: , l_line_type
1654: , fact1.PLAN_TYPE_CODE PLAN_TYPE_CODE /* 4471527 */
1655: FROM
1656: pji_fp_aggr_pjp1_t fact1 -- , PJI_FM_EXTR_PLNVER3_T ver
1657: , pji_fm_extr_plnver3_t ver
1658: WHERE
1659: fact1.calendar_type = l_calendar_type
1660: AND fact1.period_type_id = l_period_type_id
1661: AND fact1.time_id = l_time_id
1904: , 'PAR'
1905: , g_default_prg_level prg_level
1906: , fact1.plan_type_code plan_type_code /* 4471527 */
1907: FROM
1908: pji_fp_aggr_pjp1_t fact1 -- , PJI_FM_EXTR_PLNVER3_T ver
1909: , pji_time_CAL_PERIOD period
1910: , pji_time_CAL_QTR qtr
1911: , pji_fm_extr_plnver3_t ver
1912: WHERE
1907: FROM
1908: pji_fp_aggr_pjp1_t fact1 -- , PJI_FM_EXTR_PLNVER3_T ver
1909: , pji_time_CAL_PERIOD period
1910: , pji_time_CAL_QTR qtr
1911: , pji_fm_extr_plnver3_t ver
1912: WHERE
1913: fact1.calendar_type = 'P'
1914: AND period.cal_period_id = fact1.time_id
1915: AND period.cal_qtr_id = qtr.cal_qtr_id
2147: , 'GLR'
2148: , g_default_prg_level prg_level
2149: , fact1.PLAN_TYPE_CODE PLAN_TYPE_CODE /* 4471527 */
2150: FROM
2151: pji_fp_aggr_pjp1_t fact1 -- , PJI_FM_EXTR_PLNVER3_T ver
2152: , pji_time_CAL_PERIOD period
2153: , pji_time_CAL_QTR qtr
2154: , pji_fm_extr_plnver3_t ver
2155: WHERE
2150: FROM
2151: pji_fp_aggr_pjp1_t fact1 -- , PJI_FM_EXTR_PLNVER3_T ver
2152: , pji_time_CAL_PERIOD period
2153: , pji_time_CAL_QTR qtr
2154: , pji_fm_extr_plnver3_t ver
2155: WHERE
2156: fact1.calendar_type = 'G'
2157: AND period.cal_period_id = fact1.time_id
2158: AND period.cal_qtr_id = qtr.cal_qtr_id
2390: , 'ENTR'
2391: , g_default_prg_level prg_level
2392: , fact1.PLAN_TYPE_CODE PLAN_TYPE_CODE /* 4471527 */
2393: FROM
2394: pji_fp_aggr_pjp1_t fact1 -- , PJI_FM_EXTR_PLNVER3_T ver
2395: , pji_time_ENT_PERIOD period
2396: , pji_time_ENT_QTR qtr
2397: , pji_fm_extr_plnver3_t ver
2398: WHERE
2393: FROM
2394: pji_fp_aggr_pjp1_t fact1 -- , PJI_FM_EXTR_PLNVER3_T ver
2395: , pji_time_ENT_PERIOD period
2396: , pji_time_ENT_QTR qtr
2397: , pji_fm_extr_plnver3_t ver
2398: WHERE
2399: fact1.calendar_type = 'E'
2400: AND period.ENT_period_id = fact1.time_id
2401: AND period.ENT_qtr_id = qtr.ENT_qtr_id
4293: , g_default_prg_level prg_level
4294: FROM pji_fp_aggr_pjp1_t fact
4295: , pji_time_cal_period non_pa_cal
4296: , pji_time_ent_period pa_cal
4297: , pji_fm_extr_plnver3_t ver
4298: WHERE fact.CALENDAR_TYPE IN ('P', 'G')
4299: AND fact.worker_id = g_worker_id
4300: AND non_pa_cal.cal_period_id = fact.time_id
4301: AND fact.line_type like 'OF%'
4573: , fact.plan_type_code plan_type_code /* 4471527 */
4574: FROM pji_fp_aggr_pjp1_t fact
4575: , pji_time_cal_period_v non_pa_cal
4576: , pji_time_ent_period_v pa_cal
4577: , pji_fm_extr_plnver3_t ver
4578: , (SELECT currency_code,
4579: decode(nvl(MINIMUM_ACCOUNTABLE_UNIT, power(10, (-1 * PRECISION))),
4580: null, 0.01,
4581: 0, 1,
5725: FROM pji_fp_xbs_accum_f fact
5726: , pji_time_cal_period non_pa_cal
5727: -- , pji_org_extr_info orginfo
5728: , pji_time_ent_period pa_cal
5729: , PJI_FM_EXTR_PLNVER3_T ver
5730: WHERE 1 = 1
5731: AND fact.calendar_type IN ('P', 'G')
5732: AND fact.period_type_id = 32
5733: AND non_pa_cal.cal_period_id = fact.time_id
6879: , fact.rate_dangling_flag rate_dangling_flag
6880: , g_default_prg_level prg_level
6881: FROM pji_fp_aggr_pjp1_t fact
6882: , pji_time_ent_period pa_cal
6883: , pji_fm_extr_plnver3_t ver
6884: WHERE 1=1
6885: AND fact.CALENDAR_TYPE = 'A'
6886: AND fact.worker_id = g_worker_id
6887: AND fact.start_date IS NOT NULL
7164: / (fact.end_date - fact.start_date+1) factor
7165: , fact.plan_type_code plan_type_code /* 4471527 */
7166: FROM pji_fp_aggr_pjp1_t fact
7167: , pji_time_ent_period_v entCal
7168: , pji_fm_extr_plnver3_t ver
7169: , (SELECT currency_code,
7170: decode(nvl(MINIMUM_ACCOUNTABLE_UNIT, power(10, (-1 * PRECISION))),
7171: null, 0.01,
7172: 0, 1,
7388: FROM pji_fp_aggr_pjp1_t fact
7389: , pji_time_cal_period non_pa_cal
7390: -- , pji_org_extr_info orginfo
7391: , pji_time_ent_period pa_cal
7392: , pji_fm_extr_plnver3_t ver
7393: WHERE fact.CALENDAR_TYPE IN ('P', 'G')
7394: AND fact.worker_id = g_worker_id
7395: AND non_pa_cal.cal_period_id = fact.time_id
7396: AND fact.line_type like 'OF%'
7581: , fact.plan_type_code plan_type_code /* 4471527 */
7582: FROM pji_fp_aggr_pjp1_t fact
7583: , pji_time_cal_period_v non_pa_cal
7584: , pji_time_ent_period_v pa_cal
7585: , pji_fm_extr_plnver3_t ver
7586: WHERE fact.CALENDAR_TYPE IN ('P', 'G')
7587: AND fact.worker_id = g_worker_id
7588: AND non_pa_cal.cal_period_id = fact.time_id
7589: AND fact.line_type like 'OF%'
7788: -- , DECODE ('E', 'E', MAX(pa_cal.end_date), 'S', MIN(pa_cal.end_date)) end_date
7789: , g_default_prg_level prg_level
7790: , fact.plan_type_code plan_type_code /* 4471527 */
7791: FROM pji_fp_xbs_accum_f fact
7792: , PJI_FM_EXTR_PLNVER3_T ver
7793: , pji_time_cal_period non_pa_cal
7794: -- , pji_org_extr_info orginfo
7795: , pji_time_ent_period pa_cal
7796: WHERE non_pa_cal.cal_period_id = fact.time_id
7996: , fact.RATE_DANGLING_FLAG RATE_DANGLING_FLAG
7997: , g_default_prg_level prg_level
7998: FROM pji_fp_aggr_pjp1_t fact
7999: , pji_time_ent_period pa_cal
8000: , pji_fm_extr_plnver3_t ver
8001: WHERE fact.CALENDAR_TYPE = 'A'
8002: AND fact.worker_id = g_worker_id
8003: AND fact.line_type = 'NTP'
8004: AND fact.start_date IS NOT NULL
8202: , g_default_prg_level prg_level
8203: , fact.plan_type_code plan_type_code /* 4471527 */
8204: FROM pji_fp_aggr_pjp1_t fact
8205: , pji_time_ent_period_v pa_cal
8206: , pji_fm_extr_plnver3_t ver
8207: WHERE fact.CALENDAR_TYPE = 'A'
8208: AND fact.worker_id = g_worker_id
8209: AND fact.line_type = 'NTP'
8210: AND fact.start_date IS NOT NULL
9357: FROM pji_fp_aggr_pjp1_t fact
9358: , pji_time_cal_period non_pa_cal
9359: , pji_org_extr_info orginfo
9360: , pji_time_cal_period pa_cal
9361: , pji_fm_extr_plnver3_t ver
9362: WHERE 1=1
9363: AND fact.CALENDAR_TYPE <> p_calendar_type
9364: AND fact.worker_id = g_worker_id
9365: AND fact.CALENDAR_TYPE IN ('P', 'G')
9648: FROM
9649: pji_time_cal_period_v pri
9650: , pji_org_extr_info orginfo
9651: , pji_time_cal_period_v sec
9652: , pji_fm_extr_plnver3_t ver
9653: , pa_projects_all ppa
9654: WHERE 1=1
9655: AND ppa.org_id=orginfo.org_id
9656: AND pri.calendar_id in (orginfo.gl_calendar_id,orginfo.pa_calendar_id)
10821: , NULL time_dangling_flag
10822: , NULL rate_dangling_flag
10823: ,fact.plan_type_code plan_type_code /*4471527 */
10824: FROM pji_fp_xbs_accum_f fact
10825: , PJI_FM_EXTR_PLNVER3_T ver
10826: , pji_time_cal_period non_pa_cal
10827: , pji_org_extr_info orginfo
10828: , pji_time_cal_period pa_cal
10829: WHERE 1=1
11980: , NULL rate_dangling_flag
11981: FROM pji_fp_aggr_pjp1_t fact
11982: , pji_org_extr_info orginfo
11983: , pji_time_cal_period pa_cal
11984: , pji_fm_extr_plnver3_t ver
11985: WHERE 1=1
11986: AND fact.CALENDAR_TYPE = 'A'
11987: AND fact.worker_id = g_worker_id
11988: AND fact.start_date IS NOT NULL
12271: , fact.plan_type_code plan_type_code /* 4471527 */
12272: FROM pji_fp_aggr_pjp1_t fact
12273: , pji_org_extr_info orginfo
12274: , pji_time_cal_period_v pa_cal
12275: , pji_fm_extr_plnver3_t ver
12276: ,(SELECT currency_code,
12277: decode(nvl(MINIMUM_ACCOUNTABLE_UNIT, power(10, (-1 * PRECISION))),
12278: null, 0.01,
12279: 0, 1,
12501: FROM pji_fp_aggr_pjp1_t fact
12502: , pji_time_cal_period non_pa_cal
12503: , pji_org_extr_info orginfo
12504: , pji_time_cal_period pa_cal
12505: , pji_fm_extr_plnver3_t ver
12506: WHERE fact.CALENDAR_TYPE <> p_calendar_type
12507: AND fact.worker_id = g_worker_id
12508: AND fact.CALENDAR_TYPE IN ('P', 'G')
12509: AND non_pa_cal.cal_period_id = fact.time_id
12696: FROM pji_fp_aggr_pjp1_t fact
12697: , pji_time_cal_period_v non_pa_cal
12698: , pji_org_extr_info orginfo
12699: , pji_time_cal_period_v pa_cal
12700: , pji_fm_extr_plnver3_t ver
12701: WHERE fact.CALENDAR_TYPE <> p_calendar_type
12702: AND fact.worker_id = g_worker_id
12703: AND fact.CALENDAR_TYPE IN ('P', 'G')
12704: AND non_pa_cal.cal_period_id = fact.time_id
12908: , NULL RATE_DANGLING_FLAG
12909: , g_default_prg_level prg_level
12910: , fact.plan_type_code plan_type_code /* 4471527 */
12911: FROM pji_fp_xbs_accum_f fact
12912: , PJI_FM_EXTR_PLNVER3_T ver
12913: , pji_time_cal_period non_pa_cal
12914: , pji_org_extr_info orginfo
12915: , pji_time_cal_period pa_cal
12916: WHERE fact.CALENDAR_TYPE <> p_calendar_type
13128: , g_default_prg_level prg_level
13129: FROM pji_fp_aggr_pjp1_t fact
13130: , pji_org_extr_info orginfo
13131: , pji_time_cal_period pa_cal
13132: , pji_fm_extr_plnver3_t ver
13133: WHERE 1=1
13134: AND fact.CALENDAR_TYPE = 'A'
13135: AND orginfo.org_id = fact.PROJECT_ORG_ID
13136: AND DECODE(p_calendar_type
13340: , fact.PLAN_TYPE_CODE PLAN_TYPE_CODE /* 4471527 */
13341: FROM pji_fp_aggr_pjp1_t fact
13342: , pji_org_extr_info orginfo
13343: , pji_time_cal_period_v pa_cal
13344: , pji_fm_extr_plnver3_t ver
13345: WHERE 1=1
13346: AND fact.CALENDAR_TYPE = 'A'
13347: AND orginfo.org_id = fact.PROJECT_ORG_ID
13348: AND DECODE(p_calendar_type