DBA Data[Home] [Help]

APPS.PA_FP_VIEW_PLANS_UTIL SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 23

  select SUM(DECODE(pa_fp_view_plans_pub.G_FP_CALC_MARGIN_FROM,
	     'R', DECODE(amount_subtype,
                	 'RAW_COST', nvl(period_amount1, 0) + nvl(period_amount2, 0) +
                                     nvl(period_amount3, 0) + nvl(period_amount4, 0) +
                                     nvl(period_amount5, 0) + nvl(period_amount6, 0) +
				     DECODE(pa_fp_view_plans_pub.Get_Prec_Pds_Flag,
					    'Y', nvl(preceding_periods_amount,0),
					    0) +
				     DECODE(pa_fp_view_plans_pub.Get_Succ_Pds_Flag,
					    'Y', nvl(succeeding_periods_amount,0),
					    0),
                                     0),
		  DECODE(amount_subtype,
                	 'BURDENED_COST', nvl(period_amount1, 0) + nvl(period_amount2, 0) +
                                     nvl(period_amount3, 0) + nvl(period_amount4, 0) +
                                     nvl(period_amount5, 0) + nvl(period_amount6, 0) +
				     DECODE(pa_fp_view_plans_pub.Get_Prec_Pds_Flag,
					    'Y', nvl(preceding_periods_amount,0),
					    0) +
				     DECODE(pa_fp_view_plans_pub.Get_Succ_Pds_Flag,
					    'Y', nvl(succeeding_periods_amount,0),
					    0),
                                     0))),
         SUM(DECODE(amount_subtype,
             'REVENUE', nvl(period_amount1, 0) + nvl(period_amount2, 0) +
                        nvl(period_amount3, 0) + nvl(period_amount4, 0) +
                        nvl(period_amount5, 0) + nvl(period_amount6, 0) +
			DECODE(pa_fp_view_plans_pub.Get_Prec_Pds_Flag,
			       'Y', nvl(preceding_periods_amount,0),
			       0) +
			DECODE(pa_fp_view_plans_pub.Get_Succ_Pds_Flag,
			       'Y', nvl(succeeding_periods_amount,0),
			       0),
             0))
    into l_burdened_cost,
         l_revenue
    from PA_FIN_VP_PDS_VIEW_TMP
    where project_id = p_project_id and
          task_id = p_task_id and
          resource_list_member_id = p_resource_list_member_id and
          amount_type in ('COST', 'REVENUE');
Line: 93

  select SUM(DECODE(pa_fp_view_plans_pub.G_FP_CALC_MARGIN_FROM,
	     'R', DECODE(amount_subtype,
                	 'RAW_COST', nvl(period_amount1, 0) + nvl(period_amount2, 0) +
                                     nvl(period_amount3, 0) + nvl(period_amount4, 0) +
                                     nvl(period_amount5, 0) + nvl(period_amount6, 0) +
                                     nvl(period_amount7, 0) + nvl(period_amount8, 0) +
                                     nvl(period_amount9, 0) + nvl(period_amount10, 0) +
                                     nvl(period_amount11, 0) + nvl(period_amount12, 0) +
                                     nvl(period_amount13, 0) +
				     DECODE(pa_fp_view_plans_pub.Get_Prec_Pds_Flag,
					    'Y', nvl(preceding_periods_amount,0),
					    0) +
				     DECODE(pa_fp_view_plans_pub.Get_Succ_Pds_Flag,
					    'Y', nvl(succeeding_periods_amount,0),
					    0),
                                     0),
		  DECODE(amount_subtype,
                	 'BURDENED_COST', nvl(period_amount1, 0) + nvl(period_amount2, 0) +
                                     nvl(period_amount3, 0) + nvl(period_amount4, 0) +
                                     nvl(period_amount5, 0) + nvl(period_amount6, 0) +
                                     nvl(period_amount7, 0) + nvl(period_amount8, 0) +
                                     nvl(period_amount9, 0) + nvl(period_amount10, 0) +
                                     nvl(period_amount11, 0) + nvl(period_amount12, 0) +
                                     nvl(period_amount13, 0) +
				     DECODE(pa_fp_view_plans_pub.Get_Prec_Pds_Flag,
					    'Y', nvl(preceding_periods_amount,0),
					    0) +
				     DECODE(pa_fp_view_plans_pub.Get_Succ_Pds_Flag,
					    'Y', nvl(succeeding_periods_amount,0),
					    0),
                                     0))),
         SUM(DECODE(amount_subtype,
             'REVENUE', nvl(period_amount1, 0) + nvl(period_amount2, 0) +
                        nvl(period_amount3, 0) + nvl(period_amount4, 0) +
                        nvl(period_amount5, 0) + nvl(period_amount6, 0) +
                        nvl(period_amount7, 0) + nvl(period_amount8, 0) +
                        nvl(period_amount9, 0) + nvl(period_amount10, 0) +
                        nvl(period_amount11, 0) + nvl(period_amount12, 0) +
                        nvl(period_amount13, 0) +
			DECODE(pa_fp_view_plans_pub.Get_Prec_Pds_Flag,
			       'Y', nvl(preceding_periods_amount,0),
			       0) +
			DECODE(pa_fp_view_plans_pub.Get_Succ_Pds_Flag,
			       'Y', nvl(succeeding_periods_amount,0),
			       0),
             0))
    into l_burdened_cost,
         l_revenue
    from PA_FIN_VP_PDS_VIEW_TMP
    where project_id = p_project_id and
          task_id = p_task_id and
          resource_list_member_id = p_resource_list_member_id and
          amount_type in ('COST', 'REVENUE');
Line: 184

    select plan_period_type,
           number_of_periods,
           period1_start_date
      into l_plan_period_type1,
           l_number_of_periods1,
           l_plan_start_date1
      from pa_proj_period_profiles
      where period_profile_id = p_period_profile_id1;
Line: 192

    select plan_period_type,
           number_of_periods,
           period1_start_date
      into l_plan_period_type2,
           l_number_of_periods2,
           l_plan_start_date2
      from pa_proj_period_profiles
      where period_profile_id = p_period_profile_id2;
Line: 230

      select nvl(parent_task_id, -99)
        into l_parent_task_id
        from pa_tasks
        where task_id = p_task_id and project_id = p_project_id;
Line: 239

        select wbs_level
          into l_parent_wbs_level
          from pa_tasks
          where task_id = l_parent_task_id;
Line: 254

      select nvl(parent_task_id, -99)
        into l_parent_task_id
        from pa_tasks
        where task_id = p_task_id and project_id = p_project_id;
Line: 263

        select wbs_level
          into l_parent_wbs_level
          from pa_tasks
          where task_id = l_parent_task_id;
Line: 272

    select nvl(parent_member_id, -99)
      into l_res_parent_member_id
      from pa_resource_list_members
      where resource_list_member_id = p_resource_list_member_id;
Line: 288

      select nvl(parent_task_id, -99)
        into l_parent_task_id
        from pa_tasks
        where task_id = p_task_id and project_id = p_project_id;
Line: 301

        select wbs_level
          into l_parent_wbs_level
          from pa_tasks
          where task_id = l_parent_task_id;
Line: 342

        select nvl(parent_task_id, -99)
          into l_parent_task_id
          from pa_tasks
          where task_id = p_task_id and project_id = p_project_id;
Line: 348

          select name || ' (' || segment1 || ')'
            into l_return_value
            from pa_projects_all
            where project_id = p_project_id;
Line: 354

          select task_name || ' (' || task_number || ')'
            into l_return_value
            from pa_tasks
            where task_id = l_parent_task_id;
Line: 368

      select nvl(parent_task_id, -99)
        into l_parent_task_id
        from pa_tasks
        where task_id = p_task_id and project_id = p_project_id;
Line: 374

        select name || ' (' || segment1 || ')'
          into l_return_value
          from pa_projects_all
          where project_id = p_project_id;
Line: 380

        select task_name || ' (' || task_number || ')'
          into l_return_value
          from pa_tasks
          where task_id = l_parent_task_id;
Line: 388

    select nvl(parent_member_id, -99),
           resource_list_id
      into l_res_parent_member_id,
           l_resource_list_id
      from pa_resource_list_members
      where resource_list_member_id = p_resource_list_member_id;
Line: 399

        select name || ' (' || segment1 || ')'
          into l_return_value
          from pa_projects_all
          where project_id = p_project_id;
Line: 406

        select name
          into l_return_value
          from pa_resource_lists
          where resource_list_id = l_resource_list_id;
Line: 411

	select alias
	  into l_return_value
	  from pa_resource_list_members
	  where resource_list_member_id = l_res_parent_member_id;
Line: 418

      select nvl(parent_task_id, -99)
        into l_parent_task_id
        from pa_tasks
        where task_id = p_task_id and project_id = p_project_id;
Line: 425

	  -- updated 11/5/02: PARENT should be TOP-LEVEL-TASK
	  /*
          select name || ' (' || segment1 || ')'
            into l_return_value
            from pa_projects_all
            where project_id = p_project_id;
Line: 432

	  select task_name || ' (' || task_number || ')'
	    into l_return_value
	    from pa_tasks
	    where task_id=p_task_id;
Line: 439

          select name
            into l_return_value
            from pa_resource_lists
            where resource_list_id = l_resource_list_id;
Line: 444

	  select alias
	    into l_return_value
	    from pa_resource_list_members
	    where resource_list_member_id = l_res_parent_member_id;
Line: 452

          select task_name || ' (' || task_number || ')'
            into l_return_value
            from pa_tasks
	    where task_id = p_task_id;
Line: 460

          select name
            into l_return_value
            from pa_resource_lists
            where resource_list_id = l_resource_list_id;
Line: 465

	  select alias
	    into l_return_value
	    from pa_resource_list_members
	    where resource_list_member_id = l_res_parent_member_id;
Line: 497

      select name || ' (' || segment1 || ')'
        into l_return_value
        from pa_projects_all
        where project_id = p_project_id;
Line: 503

      select task_name || ' (' || task_number || ')'
        into l_return_value
        from pa_tasks
        where project_id = p_project_id and
              task_id = p_task_id;
Line: 515

      select name || ' (' || segment1 || ')'
        into l_return_value
        from pa_projects_all
        where project_id = p_project_id;
Line: 522

      select task_name || ' (' || task_number || ')'
        into l_return_value
        from pa_tasks
        where project_id = p_project_id and
              task_id = p_task_id;
Line: 530

    select nvl(parent_member_id, -99),
           resource_list_id
      into l_res_parent_member_id,
           l_resource_list_id
      from pa_resource_list_members
      where resource_list_member_id = p_resource_list_member_id;
Line: 540

        select name
          into l_return_value
          from pa_resource_lists
          where resource_list_id = l_resource_list_id;
Line: 545

	select alias
	  into l_return_value
	  from pa_resource_list_members
	  where resource_list_member_id = p_resource_list_member_id;
Line: 552

      select alias
        into l_return_value
        from pa_resource_list_members
        where resource_list_member_id = p_resource_list_member_id;
Line: 599

    select nvl(parent_member_id, -99),
           resource_list_id
      into l_res_parent_member_id,
           l_resource_list_id
      from pa_resource_list_members
      where resource_list_member_id = p_resource_list_member_id;
Line: 610

      select nvl(track_as_labor_flag, 'N')
        into l_labor_res_flag
        from pa_resource_assignments
        where project_id = p_project_id and
	      budget_version_id = p_budget_version_id and
              task_id = p_task_id and
              resource_list_member_id = p_resource_list_member_id;
Line: 646

      select task_name || ' (' || task_number || ')'
        into l_return_value
        from pa_tasks
        where task_id = p_task_id;
Line: 653

      select alias,
             nvl(parent_member_id, -99),
             resource_list_id
      into l_resource_name,
           l_res_parent_member_id,
           l_resource_list_id
      from pa_resource_list_members
      where resource_list_member_id = p_resource_list_member_id;
Line: 669

          select name
            into l_return_value
            from pa_resource_lists
            where resource_list_id = l_resource_list_id;
Line: 701

  select DECODE(fin_plan_preference_code,
                'COST_ONLY', cost_amount_set_id,
                'REVENUE_ONLY', revenue_amount_set_id,
                'COST_AND_REV_SAME', all_amount_set_id,
                DECODE(nvl(cost_amount_set_id,-1),
                       -1, DECODE(nvl(revenue_amount_set_id, -1),
                                  -1, nvl(all_amount_set_id, -1),
                                  revenue_amount_set_id),
                       cost_amount_set_id)),
         DECODE(fin_plan_preference_code,
                'COST_ONLY', 'COST',
                'REVENUE_ONLY', 'REVENUE',
                'COST_AND_REV_SAME', 'BOTH',
                DECODE(nvl(cost_amount_set_id,-1),
                       -1, DECODE(nvl(revenue_amount_set_id, -1),
                                  -1, 'NEITHER',
                                  'REVENUE'),
                       'COST'))
    into l_amount_set_id,
         l_budget_version_type
    from pa_proj_fp_options
    where fin_plan_version_id = p_budget_version_id and
          fin_plan_option_level_code = 'PLAN_VERSION';
Line: 734

    select raw_cost_flag,
           burdened_cost_flag,
           cost_qty_flag,
           revenue_flag,
           revenue_qty_flag
      into l_raw_cost_flag,
           l_burdened_cost_flag,
           l_cost_qty_flag,
           l_revenue_flag,
           l_revenue_qty_flag
      from pa_fin_plan_amount_sets
      where fin_plan_amount_set_id = l_amount_set_id;
Line: 820

	select sum(decode(p_amount_type_id, 215, bl.quantity, 160, decode(p_project_currency_type, 'PROJECT', bl.project_raw_cost, bl.raw_cost),
	            165, decode(p_project_currency_type, 'PROJECT', bl.project_burdened_cost, bl.burdened_cost), 100, bl.revenue, null))
    into l_return_value
    from pa_budget_lines bl
	where bl.resource_assignment_id = p_resource_assignment_id
	and bl.budget_version_id = p_budget_version_id
	and trunc(bl.start_date) = pa_fp_view_plans_pub.Get_Period_Start_Date1();
Line: 830

	select sum(decode(p_amount_type_id, 215, bl.quantity, 160, decode(p_project_currency_type, 'PROJECT', bl.project_raw_cost, bl.raw_cost),
	            165, decode(p_project_currency_type, 'PROJECT', bl.project_burdened_cost, bl.burdened_cost), 100, bl.revenue, null))
    into l_return_value
    from pa_budget_lines bl
	where bl.resource_assignment_id = p_resource_assignment_id
	and bl.budget_version_id = p_budget_version_id
	and trunc(bl.start_date) = pa_fp_view_plans_pub.Get_Period_Start_Date2();
Line: 840

	select sum(decode(p_amount_type_id, 215, bl.quantity, 160, decode(p_project_currency_type, 'PROJECT', bl.project_raw_cost, bl.raw_cost),
	            165, decode(p_project_currency_type, 'PROJECT', bl.project_burdened_cost, bl.burdened_cost), 100, bl.revenue, null))
    into l_return_value
    from pa_budget_lines bl
	where bl.resource_assignment_id = p_resource_assignment_id
	and bl.budget_version_id = p_budget_version_id
	and trunc(bl.start_date) = pa_fp_view_plans_pub.Get_Period_Start_Date3();
Line: 850

	select sum(decode(p_amount_type_id, 215, bl.quantity, 160, decode(p_project_currency_type, 'PROJECT', bl.project_raw_cost, bl.raw_cost),
	            165, decode(p_project_currency_type, 'PROJECT', bl.project_burdened_cost, bl.burdened_cost), 100, bl.revenue, null))
    into l_return_value
    from pa_budget_lines bl
	where bl.resource_assignment_id = p_resource_assignment_id
	and bl.budget_version_id = p_budget_version_id
	and trunc(bl.start_date) = pa_fp_view_plans_pub.Get_Period_Start_Date4();
Line: 860

	select sum(decode(p_amount_type_id, 215, bl.quantity, 160, decode(p_project_currency_type, 'PROJECT', bl.project_raw_cost, bl.raw_cost),
	            165, decode(p_project_currency_type, 'PROJECT', bl.project_burdened_cost, bl.burdened_cost), 100, bl.revenue, null))
    into l_return_value
    from pa_budget_lines bl
	where bl.resource_assignment_id = p_resource_assignment_id
	and bl.budget_version_id = p_budget_version_id
	and trunc(bl.start_date) = pa_fp_view_plans_pub.Get_Period_Start_Date5();
Line: 870

	select sum(decode(p_amount_type_id, 215, bl.quantity, 160, decode(p_project_currency_type, 'PROJECT', bl.project_raw_cost, bl.raw_cost),
	            165, decode(p_project_currency_type, 'PROJECT', bl.project_burdened_cost, bl.burdened_cost), 100, bl.revenue, null))
    into l_return_value
    from pa_budget_lines bl
	where bl.resource_assignment_id = p_resource_assignment_id
	and bl.budget_version_id = p_budget_version_id
	and trunc(bl.start_date) = pa_fp_view_plans_pub.Get_Period_Start_Date6();
Line: 880

	select sum(decode(p_amount_type_id, 215, bl.quantity, 160, decode(p_project_currency_type, 'PROJECT', bl.project_raw_cost, bl.raw_cost),
	            165, decode(p_project_currency_type, 'PROJECT', bl.project_burdened_cost, bl.burdened_cost), 100, bl.revenue, null))
    into l_return_value
    from pa_budget_lines bl
	where bl.resource_assignment_id = p_resource_assignment_id
	and bl.budget_version_id = p_budget_version_id
	and trunc(bl.start_date) = pa_fp_view_plans_pub.Get_Period_Start_Date7();
Line: 890

	select sum(decode(p_amount_type_id, 215, bl.quantity, 160, decode(p_project_currency_type, 'PROJECT', bl.project_raw_cost, bl.raw_cost),
	            165, decode(p_project_currency_type, 'PROJECT', bl.project_burdened_cost, bl.burdened_cost), 100, bl.revenue, null))
    into l_return_value
    from pa_budget_lines bl
	where bl.resource_assignment_id = p_resource_assignment_id
	and bl.budget_version_id = p_budget_version_id
	and trunc(bl.start_date) = pa_fp_view_plans_pub.Get_Period_Start_Date8();
Line: 900

 	select sum(decode(p_amount_type_id, 215, bl.quantity, 160, decode(p_project_currency_type, 'PROJECT', bl.project_raw_cost, bl.raw_cost),
	            165, decode(p_project_currency_type, 'PROJECT', bl.project_burdened_cost, bl.burdened_cost), 100, bl.revenue, null))
    into l_return_value
    from pa_budget_lines bl
	where bl.resource_assignment_id = p_resource_assignment_id
	and bl.budget_version_id = p_budget_version_id
	and trunc(bl.start_date) = pa_fp_view_plans_pub.Get_Period_Start_Date9();
Line: 910

	select sum(decode(p_amount_type_id, 215, bl.quantity, 160, decode(p_project_currency_type, 'PROJECT', bl.project_raw_cost, bl.raw_cost),
	            165, decode(p_project_currency_type, 'PROJECT', bl.project_burdened_cost, bl.burdened_cost), 100, bl.revenue, null))
    into l_return_value
    from pa_budget_lines bl
	where bl.resource_assignment_id = p_resource_assignment_id
	and bl.budget_version_id = p_budget_version_id
	and trunc(bl.start_date) = pa_fp_view_plans_pub.Get_Period_Start_Date10();
Line: 920

	select sum(decode(p_amount_type_id, 215, bl.quantity, 160, decode(p_project_currency_type, 'PROJECT', bl.project_raw_cost, bl.raw_cost),
	            165, decode(p_project_currency_type, 'PROJECT', bl.project_burdened_cost, bl.burdened_cost), 100, bl.revenue, null))
    into l_return_value
    from pa_budget_lines bl
	where bl.resource_assignment_id = p_resource_assignment_id
	and bl.budget_version_id = p_budget_version_id
	and trunc(bl.start_date) = pa_fp_view_plans_pub.Get_Period_Start_Date11();
Line: 930

	select sum(decode(p_amount_type_id, 215, bl.quantity, 160, decode(p_project_currency_type, 'PROJECT', bl.project_raw_cost, bl.raw_cost),
	            165, decode(p_project_currency_type, 'PROJECT', bl.project_burdened_cost, bl.burdened_cost), 100, bl.revenue, null))
    into l_return_value
    from pa_budget_lines bl
	where bl.resource_assignment_id = p_resource_assignment_id
	and bl.budget_version_id = p_budget_version_id
	and trunc(bl.start_date) = pa_fp_view_plans_pub.Get_Period_Start_Date12();
Line: 940

	select sum(decode(p_amount_type_id, 215, bl.quantity, 160, decode(p_project_currency_type, 'PROJECT', bl.project_raw_cost, bl.raw_cost),
	            165, decode(p_project_currency_type, 'PROJECT', bl.project_burdened_cost, bl.burdened_cost), 100, bl.revenue, null))
    into l_return_value
    from pa_budget_lines bl
	where bl.resource_assignment_id = p_resource_assignment_id
	and bl.budget_version_id = p_budget_version_id
	and trunc(bl.start_date) = pa_fp_view_plans_pub.Get_Period_Start_Date13();
Line: 992

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date1(),
                  pppp.period1_start_Date, nvl(pppd.period_amount1,0),
                  pppp.period2_start_Date, nvl(pppd.period_amount2,0),
                  pppp.period3_start_Date, nvl(pppd.period_amount3,0),
                  pppp.period4_start_Date, nvl(pppd.period_amount4,0),
                  pppp.period5_start_Date, nvl(pppd.period_amount5,0),
                  pppp.period6_start_Date, nvl(pppd.period_amount6,0),
                  pppp.period7_start_Date, nvl(pppd.period_amount7,0),
                  pppp.period8_start_Date, nvl(pppd.period_amount8,0),
                  pppp.period9_start_Date, nvl(pppd.period_amount9,0),
                  pppp.period10_start_Date, nvl(pppd.period_amount10,0),
                  pppp.period11_start_Date, nvl(pppd.period_amount11,0),
                  pppp.period12_start_Date, nvl(pppd.period_amount12,0),
                  pppp.period13_start_Date, nvl(pppd.period_amount13,0),
                  pppp.period14_start_Date, nvl(pppd.period_amount14,0),
                  pppp.period15_start_Date, nvl(pppd.period_amount15,0),
                  pppp.period16_start_Date, nvl(pppd.period_amount16,0),
                  pppp.period17_start_Date, nvl(pppd.period_amount17,0),
                  pppp.period18_start_Date, nvl(pppd.period_amount18,0),
                  pppp.period19_start_Date, nvl(pppd.period_amount19,0),
                  pppp.period20_start_Date, nvl(pppd.period_amount20,0),
                  pppp.period21_start_Date, nvl(pppd.period_amount21,0),
                  pppp.period22_start_Date, nvl(pppd.period_amount22,0),
                  pppp.period23_start_Date, nvl(pppd.period_amount23,0),
                  pppp.period24_start_Date, nvl(pppd.period_amount24,0),
                  pppp.period25_start_Date, nvl(pppd.period_amount25,0),
                  pppp.period26_start_Date, nvl(pppd.period_amount26,0),
                  pppp.period27_start_Date, nvl(pppd.period_amount27,0),
                  pppp.period28_start_Date, nvl(pppd.period_amount28,0),
                  pppp.period29_start_Date, nvl(pppd.period_amount29,0),
                  pppp.period30_start_Date, nvl(pppd.period_amount30,0),
                  pppp.period31_start_Date, nvl(pppd.period_amount31,0),
                  pppp.period32_start_Date, nvl(pppd.period_amount32,0),
                  pppp.period33_start_Date, nvl(pppd.period_amount33,0),
                  pppp.period34_start_Date, nvl(pppd.period_amount34,0),
                  pppp.period35_start_Date, nvl(pppd.period_amount35,0),
                  pppp.period36_start_Date, nvl(pppd.period_amount36,0),
                  pppp.period37_start_Date, nvl(pppd.period_amount37,0),
                  pppp.period38_start_Date, nvl(pppd.period_amount38,0),
                  pppp.period39_start_Date, nvl(pppd.period_amount39,0),
                  pppp.period40_start_Date, nvl(pppd.period_amount40,0),
                  pppp.period41_start_Date, nvl(pppd.period_amount41,0),
                  pppp.period42_start_Date, nvl(pppd.period_amount42,0),
                  pppp.period43_start_Date, nvl(pppd.period_amount43,0),
                  pppp.period44_start_Date, nvl(pppd.period_amount44,0),
                  pppp.period45_start_Date, nvl(pppd.period_amount45,0),
                  pppp.period46_start_Date, nvl(pppd.period_amount46,0),
                  pppp.period47_start_Date, nvl(pppd.period_amount47,0),
                  pppp.period48_start_Date, nvl(pppd.period_amount48,0),
                  pppp.period49_start_Date, nvl(pppd.period_amount49,0),
                  pppp.period50_start_Date, nvl(pppd.period_amount50,0),
                  pppp.period51_start_Date, nvl(pppd.period_amount51,0),
                  pppp.period52_start_Date, nvl(pppd.period_amount52,0),
		  null))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
	  pppd.budget_version_id = p_budget_version_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
          pppd.amount_subtype_id = p_amount_type_id and
	  ((p_amount_type_id=215 and pppd.currency_type='TRANSACTION') or
	   (p_amount_type_id <> 215 and pppd.currency_type = p_project_currency_type));
Line: 1059

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date2(),
                  pppp.period1_start_Date, nvl(pppd.period_amount1,0),
                  pppp.period2_start_Date, nvl(pppd.period_amount2,0),
                  pppp.period3_start_Date, nvl(pppd.period_amount3,0),
                  pppp.period4_start_Date, nvl(pppd.period_amount4,0),
                  pppp.period5_start_Date, nvl(pppd.period_amount5,0),
                  pppp.period6_start_Date, nvl(pppd.period_amount6,0),
                  pppp.period7_start_Date, nvl(pppd.period_amount7,0),
                  pppp.period8_start_Date, nvl(pppd.period_amount8,0),
                  pppp.period9_start_Date, nvl(pppd.period_amount9,0),
                  pppp.period10_start_Date, nvl(pppd.period_amount10,0),
                  pppp.period11_start_Date, nvl(pppd.period_amount11,0),
                  pppp.period12_start_Date, nvl(pppd.period_amount12,0),
                  pppp.period13_start_Date, nvl(pppd.period_amount13,0),
                  pppp.period14_start_Date, nvl(pppd.period_amount14,0),
                  pppp.period15_start_Date, nvl(pppd.period_amount15,0),
                  pppp.period16_start_Date, nvl(pppd.period_amount16,0),
                  pppp.period17_start_Date, nvl(pppd.period_amount17,0),
                  pppp.period18_start_Date, nvl(pppd.period_amount18,0),
                  pppp.period19_start_Date, nvl(pppd.period_amount19,0),
                  pppp.period20_start_Date, nvl(pppd.period_amount20,0),
                  pppp.period21_start_Date, nvl(pppd.period_amount21,0),
                  pppp.period22_start_Date, nvl(pppd.period_amount22,0),
                  pppp.period23_start_Date, nvl(pppd.period_amount23,0),
                  pppp.period24_start_Date, nvl(pppd.period_amount24,0),
                  pppp.period25_start_Date, nvl(pppd.period_amount25,0),
                  pppp.period26_start_Date, nvl(pppd.period_amount26,0),
                  pppp.period27_start_Date, nvl(pppd.period_amount27,0),
                  pppp.period28_start_Date, nvl(pppd.period_amount28,0),
                  pppp.period29_start_Date, nvl(pppd.period_amount29,0),
                  pppp.period30_start_Date, nvl(pppd.period_amount30,0),
                  pppp.period31_start_Date, nvl(pppd.period_amount31,0),
                  pppp.period32_start_Date, nvl(pppd.period_amount32,0),
                  pppp.period33_start_Date, nvl(pppd.period_amount33,0),
                  pppp.period34_start_Date, nvl(pppd.period_amount34,0),
                  pppp.period35_start_Date, nvl(pppd.period_amount35,0),
                  pppp.period36_start_Date, nvl(pppd.period_amount36,0),
                  pppp.period37_start_Date, nvl(pppd.period_amount37,0),
                  pppp.period38_start_Date, nvl(pppd.period_amount38,0),
                  pppp.period39_start_Date, nvl(pppd.period_amount39,0),
                  pppp.period40_start_Date, nvl(pppd.period_amount40,0),
                  pppp.period41_start_Date, nvl(pppd.period_amount41,0),
                  pppp.period42_start_Date, nvl(pppd.period_amount42,0),
                  pppp.period43_start_Date, nvl(pppd.period_amount43,0),
                  pppp.period44_start_Date, nvl(pppd.period_amount44,0),
                  pppp.period45_start_Date, nvl(pppd.period_amount45,0),
                  pppp.period46_start_Date, nvl(pppd.period_amount46,0),
                  pppp.period47_start_Date, nvl(pppd.period_amount47,0),
                  pppp.period48_start_Date, nvl(pppd.period_amount48,0),
                  pppp.period49_start_Date, nvl(pppd.period_amount49,0),
                  pppp.period50_start_Date, nvl(pppd.period_amount50,0),
                  pppp.period51_start_Date, nvl(pppd.period_amount51,0),
                  pppp.period52_start_Date, nvl(pppd.period_amount52,0),
		  null))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
	  pppd.budget_version_id = p_budget_version_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
          pppd.amount_subtype_id = p_amount_type_id and
	  ((p_amount_type_id=215 and pppd.currency_type='TRANSACTION') or
	   (p_amount_type_id <> 215 and pppd.currency_type = p_project_currency_type));
Line: 1126

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date3(),
                  pppp.period1_start_Date, nvl(pppd.period_amount1,0),
                  pppp.period2_start_Date, nvl(pppd.period_amount2,0),
                  pppp.period3_start_Date, nvl(pppd.period_amount3,0),
                  pppp.period4_start_Date, nvl(pppd.period_amount4,0),
                  pppp.period5_start_Date, nvl(pppd.period_amount5,0),
                  pppp.period6_start_Date, nvl(pppd.period_amount6,0),
                  pppp.period7_start_Date, nvl(pppd.period_amount7,0),
                  pppp.period8_start_Date, nvl(pppd.period_amount8,0),
                  pppp.period9_start_Date, nvl(pppd.period_amount9,0),
                  pppp.period10_start_Date, nvl(pppd.period_amount10,0),
                  pppp.period11_start_Date, nvl(pppd.period_amount11,0),
                  pppp.period12_start_Date, nvl(pppd.period_amount12,0),
                  pppp.period13_start_Date, nvl(pppd.period_amount13,0),
                  pppp.period14_start_Date, nvl(pppd.period_amount14,0),
                  pppp.period15_start_Date, nvl(pppd.period_amount15,0),
                  pppp.period16_start_Date, nvl(pppd.period_amount16,0),
                  pppp.period17_start_Date, nvl(pppd.period_amount17,0),
                  pppp.period18_start_Date, nvl(pppd.period_amount18,0),
                  pppp.period19_start_Date, nvl(pppd.period_amount19,0),
                  pppp.period20_start_Date, nvl(pppd.period_amount20,0),
                  pppp.period21_start_Date, nvl(pppd.period_amount21,0),
                  pppp.period22_start_Date, nvl(pppd.period_amount22,0),
                  pppp.period23_start_Date, nvl(pppd.period_amount23,0),
                  pppp.period24_start_Date, nvl(pppd.period_amount24,0),
                  pppp.period25_start_Date, nvl(pppd.period_amount25,0),
                  pppp.period26_start_Date, nvl(pppd.period_amount26,0),
                  pppp.period27_start_Date, nvl(pppd.period_amount27,0),
                  pppp.period28_start_Date, nvl(pppd.period_amount28,0),
                  pppp.period29_start_Date, nvl(pppd.period_amount29,0),
                  pppp.period30_start_Date, nvl(pppd.period_amount30,0),
                  pppp.period31_start_Date, nvl(pppd.period_amount31,0),
                  pppp.period32_start_Date, nvl(pppd.period_amount32,0),
                  pppp.period33_start_Date, nvl(pppd.period_amount33,0),
                  pppp.period34_start_Date, nvl(pppd.period_amount34,0),
                  pppp.period35_start_Date, nvl(pppd.period_amount35,0),
                  pppp.period36_start_Date, nvl(pppd.period_amount36,0),
                  pppp.period37_start_Date, nvl(pppd.period_amount37,0),
                  pppp.period38_start_Date, nvl(pppd.period_amount38,0),
                  pppp.period39_start_Date, nvl(pppd.period_amount39,0),
                  pppp.period40_start_Date, nvl(pppd.period_amount40,0),
                  pppp.period41_start_Date, nvl(pppd.period_amount41,0),
                  pppp.period42_start_Date, nvl(pppd.period_amount42,0),
                  pppp.period43_start_Date, nvl(pppd.period_amount43,0),
                  pppp.period44_start_Date, nvl(pppd.period_amount44,0),
                  pppp.period45_start_Date, nvl(pppd.period_amount45,0),
                  pppp.period46_start_Date, nvl(pppd.period_amount46,0),
                  pppp.period47_start_Date, nvl(pppd.period_amount47,0),
                  pppp.period48_start_Date, nvl(pppd.period_amount48,0),
                  pppp.period49_start_Date, nvl(pppd.period_amount49,0),
                  pppp.period50_start_Date, nvl(pppd.period_amount50,0),
                  pppp.period51_start_Date, nvl(pppd.period_amount51,0),
                  pppp.period52_start_Date, nvl(pppd.period_amount52,0),
		  null))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
	  pppd.budget_version_id = p_budget_version_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
          pppd.amount_subtype_id = p_amount_type_id and
	  ((p_amount_type_id=215 and pppd.currency_type='TRANSACTION') or
	   (p_amount_type_id <> 215 and pppd.currency_type = p_project_currency_type));
Line: 1193

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date4(),
                  pppp.period1_start_Date, nvl(pppd.period_amount1,0),
                  pppp.period2_start_Date, nvl(pppd.period_amount2,0),
                  pppp.period3_start_Date, nvl(pppd.period_amount3,0),
                  pppp.period4_start_Date, nvl(pppd.period_amount4,0),
                  pppp.period5_start_Date, nvl(pppd.period_amount5,0),
                  pppp.period6_start_Date, nvl(pppd.period_amount6,0),
                  pppp.period7_start_Date, nvl(pppd.period_amount7,0),
                  pppp.period8_start_Date, nvl(pppd.period_amount8,0),
                  pppp.period9_start_Date, nvl(pppd.period_amount9,0),
                  pppp.period10_start_Date, nvl(pppd.period_amount10,0),
                  pppp.period11_start_Date, nvl(pppd.period_amount11,0),
                  pppp.period12_start_Date, nvl(pppd.period_amount12,0),
                  pppp.period13_start_Date, nvl(pppd.period_amount13,0),
                  pppp.period14_start_Date, nvl(pppd.period_amount14,0),
                  pppp.period15_start_Date, nvl(pppd.period_amount15,0),
                  pppp.period16_start_Date, nvl(pppd.period_amount16,0),
                  pppp.period17_start_Date, nvl(pppd.period_amount17,0),
                  pppp.period18_start_Date, nvl(pppd.period_amount18,0),
                  pppp.period19_start_Date, nvl(pppd.period_amount19,0),
                  pppp.period20_start_Date, nvl(pppd.period_amount20,0),
                  pppp.period21_start_Date, nvl(pppd.period_amount21,0),
                  pppp.period22_start_Date, nvl(pppd.period_amount22,0),
                  pppp.period23_start_Date, nvl(pppd.period_amount23,0),
                  pppp.period24_start_Date, nvl(pppd.period_amount24,0),
                  pppp.period25_start_Date, nvl(pppd.period_amount25,0),
                  pppp.period26_start_Date, nvl(pppd.period_amount26,0),
                  pppp.period27_start_Date, nvl(pppd.period_amount27,0),
                  pppp.period28_start_Date, nvl(pppd.period_amount28,0),
                  pppp.period29_start_Date, nvl(pppd.period_amount29,0),
                  pppp.period30_start_Date, nvl(pppd.period_amount30,0),
                  pppp.period31_start_Date, nvl(pppd.period_amount31,0),
                  pppp.period32_start_Date, nvl(pppd.period_amount32,0),
                  pppp.period33_start_Date, nvl(pppd.period_amount33,0),
                  pppp.period34_start_Date, nvl(pppd.period_amount34,0),
                  pppp.period35_start_Date, nvl(pppd.period_amount35,0),
                  pppp.period36_start_Date, nvl(pppd.period_amount36,0),
                  pppp.period37_start_Date, nvl(pppd.period_amount37,0),
                  pppp.period38_start_Date, nvl(pppd.period_amount38,0),
                  pppp.period39_start_Date, nvl(pppd.period_amount39,0),
                  pppp.period40_start_Date, nvl(pppd.period_amount40,0),
                  pppp.period41_start_Date, nvl(pppd.period_amount41,0),
                  pppp.period42_start_Date, nvl(pppd.period_amount42,0),
                  pppp.period43_start_Date, nvl(pppd.period_amount43,0),
                  pppp.period44_start_Date, nvl(pppd.period_amount44,0),
                  pppp.period45_start_Date, nvl(pppd.period_amount45,0),
                  pppp.period46_start_Date, nvl(pppd.period_amount46,0),
                  pppp.period47_start_Date, nvl(pppd.period_amount47,0),
                  pppp.period48_start_Date, nvl(pppd.period_amount48,0),
                  pppp.period49_start_Date, nvl(pppd.period_amount49,0),
                  pppp.period50_start_Date, nvl(pppd.period_amount50,0),
                  pppp.period51_start_Date, nvl(pppd.period_amount51,0),
                  pppp.period52_start_Date, nvl(pppd.period_amount52,0),
		  null))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
	  pppd.budget_version_id = p_budget_version_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
          pppd.amount_subtype_id = p_amount_type_id and
	  ((p_amount_type_id=215 and pppd.currency_type='TRANSACTION') or
	   (p_amount_type_id <> 215 and pppd.currency_type = p_project_currency_type));
Line: 1260

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date5(),
                  pppp.period1_start_Date, nvl(pppd.period_amount1,0),
                  pppp.period2_start_Date, nvl(pppd.period_amount2,0),
                  pppp.period3_start_Date, nvl(pppd.period_amount3,0),
                  pppp.period4_start_Date, nvl(pppd.period_amount4,0),
                  pppp.period5_start_Date, nvl(pppd.period_amount5,0),
                  pppp.period6_start_Date, nvl(pppd.period_amount6,0),
                  pppp.period7_start_Date, nvl(pppd.period_amount7,0),
                  pppp.period8_start_Date, nvl(pppd.period_amount8,0),
                  pppp.period9_start_Date, nvl(pppd.period_amount9,0),
                  pppp.period10_start_Date, nvl(pppd.period_amount10,0),
                  pppp.period11_start_Date, nvl(pppd.period_amount11,0),
                  pppp.period12_start_Date, nvl(pppd.period_amount12,0),
                  pppp.period13_start_Date, nvl(pppd.period_amount13,0),
                  pppp.period14_start_Date, nvl(pppd.period_amount14,0),
                  pppp.period15_start_Date, nvl(pppd.period_amount15,0),
                  pppp.period16_start_Date, nvl(pppd.period_amount16,0),
                  pppp.period17_start_Date, nvl(pppd.period_amount17,0),
                  pppp.period18_start_Date, nvl(pppd.period_amount18,0),
                  pppp.period19_start_Date, nvl(pppd.period_amount19,0),
                  pppp.period20_start_Date, nvl(pppd.period_amount20,0),
                  pppp.period21_start_Date, nvl(pppd.period_amount21,0),
                  pppp.period22_start_Date, nvl(pppd.period_amount22,0),
                  pppp.period23_start_Date, nvl(pppd.period_amount23,0),
                  pppp.period24_start_Date, nvl(pppd.period_amount24,0),
                  pppp.period25_start_Date, nvl(pppd.period_amount25,0),
                  pppp.period26_start_Date, nvl(pppd.period_amount26,0),
                  pppp.period27_start_Date, nvl(pppd.period_amount27,0),
                  pppp.period28_start_Date, nvl(pppd.period_amount28,0),
                  pppp.period29_start_Date, nvl(pppd.period_amount29,0),
                  pppp.period30_start_Date, nvl(pppd.period_amount30,0),
                  pppp.period31_start_Date, nvl(pppd.period_amount31,0),
                  pppp.period32_start_Date, nvl(pppd.period_amount32,0),
                  pppp.period33_start_Date, nvl(pppd.period_amount33,0),
                  pppp.period34_start_Date, nvl(pppd.period_amount34,0),
                  pppp.period35_start_Date, nvl(pppd.period_amount35,0),
                  pppp.period36_start_Date, nvl(pppd.period_amount36,0),
                  pppp.period37_start_Date, nvl(pppd.period_amount37,0),
                  pppp.period38_start_Date, nvl(pppd.period_amount38,0),
                  pppp.period39_start_Date, nvl(pppd.period_amount39,0),
                  pppp.period40_start_Date, nvl(pppd.period_amount40,0),
                  pppp.period41_start_Date, nvl(pppd.period_amount41,0),
                  pppp.period42_start_Date, nvl(pppd.period_amount42,0),
                  pppp.period43_start_Date, nvl(pppd.period_amount43,0),
                  pppp.period44_start_Date, nvl(pppd.period_amount44,0),
                  pppp.period45_start_Date, nvl(pppd.period_amount45,0),
                  pppp.period46_start_Date, nvl(pppd.period_amount46,0),
                  pppp.period47_start_Date, nvl(pppd.period_amount47,0),
                  pppp.period48_start_Date, nvl(pppd.period_amount48,0),
                  pppp.period49_start_Date, nvl(pppd.period_amount49,0),
                  pppp.period50_start_Date, nvl(pppd.period_amount50,0),
                  pppp.period51_start_Date, nvl(pppd.period_amount51,0),
                  pppp.period52_start_Date, nvl(pppd.period_amount52,0),
		  null))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
	  pppd.budget_version_id = p_budget_version_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
          pppd.amount_subtype_id = p_amount_type_id and
	  ((p_amount_type_id=215 and pppd.currency_type='TRANSACTION') or
	   (p_amount_type_id <> 215 and pppd.currency_type = p_project_currency_type));
Line: 1327

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date6(),
                  pppp.period1_start_Date, nvl(pppd.period_amount1,0),
                  pppp.period2_start_Date, nvl(pppd.period_amount2,0),
                  pppp.period3_start_Date, nvl(pppd.period_amount3,0),
                  pppp.period4_start_Date, nvl(pppd.period_amount4,0),
                  pppp.period5_start_Date, nvl(pppd.period_amount5,0),
                  pppp.period6_start_Date, nvl(pppd.period_amount6,0),
                  pppp.period7_start_Date, nvl(pppd.period_amount7,0),
                  pppp.period8_start_Date, nvl(pppd.period_amount8,0),
                  pppp.period9_start_Date, nvl(pppd.period_amount9,0),
                  pppp.period10_start_Date, nvl(pppd.period_amount10,0),
                  pppp.period11_start_Date, nvl(pppd.period_amount11,0),
                  pppp.period12_start_Date, nvl(pppd.period_amount12,0),
                  pppp.period13_start_Date, nvl(pppd.period_amount13,0),
                  pppp.period14_start_Date, nvl(pppd.period_amount14,0),
                  pppp.period15_start_Date, nvl(pppd.period_amount15,0),
                  pppp.period16_start_Date, nvl(pppd.period_amount16,0),
                  pppp.period17_start_Date, nvl(pppd.period_amount17,0),
                  pppp.period18_start_Date, nvl(pppd.period_amount18,0),
                  pppp.period19_start_Date, nvl(pppd.period_amount19,0),
                  pppp.period20_start_Date, nvl(pppd.period_amount20,0),
                  pppp.period21_start_Date, nvl(pppd.period_amount21,0),
                  pppp.period22_start_Date, nvl(pppd.period_amount22,0),
                  pppp.period23_start_Date, nvl(pppd.period_amount23,0),
                  pppp.period24_start_Date, nvl(pppd.period_amount24,0),
                  pppp.period25_start_Date, nvl(pppd.period_amount25,0),
                  pppp.period26_start_Date, nvl(pppd.period_amount26,0),
                  pppp.period27_start_Date, nvl(pppd.period_amount27,0),
                  pppp.period28_start_Date, nvl(pppd.period_amount28,0),
                  pppp.period29_start_Date, nvl(pppd.period_amount29,0),
                  pppp.period30_start_Date, nvl(pppd.period_amount30,0),
                  pppp.period31_start_Date, nvl(pppd.period_amount31,0),
                  pppp.period32_start_Date, nvl(pppd.period_amount32,0),
                  pppp.period33_start_Date, nvl(pppd.period_amount33,0),
                  pppp.period34_start_Date, nvl(pppd.period_amount34,0),
                  pppp.period35_start_Date, nvl(pppd.period_amount35,0),
                  pppp.period36_start_Date, nvl(pppd.period_amount36,0),
                  pppp.period37_start_Date, nvl(pppd.period_amount37,0),
                  pppp.period38_start_Date, nvl(pppd.period_amount38,0),
                  pppp.period39_start_Date, nvl(pppd.period_amount39,0),
                  pppp.period40_start_Date, nvl(pppd.period_amount40,0),
                  pppp.period41_start_Date, nvl(pppd.period_amount41,0),
                  pppp.period42_start_Date, nvl(pppd.period_amount42,0),
                  pppp.period43_start_Date, nvl(pppd.period_amount43,0),
                  pppp.period44_start_Date, nvl(pppd.period_amount44,0),
                  pppp.period45_start_Date, nvl(pppd.period_amount45,0),
                  pppp.period46_start_Date, nvl(pppd.period_amount46,0),
                  pppp.period47_start_Date, nvl(pppd.period_amount47,0),
                  pppp.period48_start_Date, nvl(pppd.period_amount48,0),
                  pppp.period49_start_Date, nvl(pppd.period_amount49,0),
                  pppp.period50_start_Date, nvl(pppd.period_amount50,0),
                  pppp.period51_start_Date, nvl(pppd.period_amount51,0),
                  pppp.period52_start_Date, nvl(pppd.period_amount52,0),
		  null))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
	  pppd.budget_version_id = p_budget_version_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
          pppd.amount_subtype_id = p_amount_type_id and
	  ((p_amount_type_id=215 and pppd.currency_type='TRANSACTION') or
	   (p_amount_type_id <> 215 and pppd.currency_type = p_project_currency_type));
Line: 1394

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date7(),
                  pppp.period1_start_Date, nvl(pppd.period_amount1,0),
                  pppp.period2_start_Date, nvl(pppd.period_amount2,0),
                  pppp.period3_start_Date, nvl(pppd.period_amount3,0),
                  pppp.period4_start_Date, nvl(pppd.period_amount4,0),
                  pppp.period5_start_Date, nvl(pppd.period_amount5,0),
                  pppp.period6_start_Date, nvl(pppd.period_amount6,0),
                  pppp.period7_start_Date, nvl(pppd.period_amount7,0),
                  pppp.period8_start_Date, nvl(pppd.period_amount8,0),
                  pppp.period9_start_Date, nvl(pppd.period_amount9,0),
                  pppp.period10_start_Date, nvl(pppd.period_amount10,0),
                  pppp.period11_start_Date, nvl(pppd.period_amount11,0),
                  pppp.period12_start_Date, nvl(pppd.period_amount12,0),
                  pppp.period13_start_Date, nvl(pppd.period_amount13,0),
                  pppp.period14_start_Date, nvl(pppd.period_amount14,0),
                  pppp.period15_start_Date, nvl(pppd.period_amount15,0),
                  pppp.period16_start_Date, nvl(pppd.period_amount16,0),
                  pppp.period17_start_Date, nvl(pppd.period_amount17,0),
                  pppp.period18_start_Date, nvl(pppd.period_amount18,0),
                  pppp.period19_start_Date, nvl(pppd.period_amount19,0),
                  pppp.period20_start_Date, nvl(pppd.period_amount20,0),
                  pppp.period21_start_Date, nvl(pppd.period_amount21,0),
                  pppp.period22_start_Date, nvl(pppd.period_amount22,0),
                  pppp.period23_start_Date, nvl(pppd.period_amount23,0),
                  pppp.period24_start_Date, nvl(pppd.period_amount24,0),
                  pppp.period25_start_Date, nvl(pppd.period_amount25,0),
                  pppp.period26_start_Date, nvl(pppd.period_amount26,0),
                  pppp.period27_start_Date, nvl(pppd.period_amount27,0),
                  pppp.period28_start_Date, nvl(pppd.period_amount28,0),
                  pppp.period29_start_Date, nvl(pppd.period_amount29,0),
                  pppp.period30_start_Date, nvl(pppd.period_amount30,0),
                  pppp.period31_start_Date, nvl(pppd.period_amount31,0),
                  pppp.period32_start_Date, nvl(pppd.period_amount32,0),
                  pppp.period33_start_Date, nvl(pppd.period_amount33,0),
                  pppp.period34_start_Date, nvl(pppd.period_amount34,0),
                  pppp.period35_start_Date, nvl(pppd.period_amount35,0),
                  pppp.period36_start_Date, nvl(pppd.period_amount36,0),
                  pppp.period37_start_Date, nvl(pppd.period_amount37,0),
                  pppp.period38_start_Date, nvl(pppd.period_amount38,0),
                  pppp.period39_start_Date, nvl(pppd.period_amount39,0),
                  pppp.period40_start_Date, nvl(pppd.period_amount40,0),
                  pppp.period41_start_Date, nvl(pppd.period_amount41,0),
                  pppp.period42_start_Date, nvl(pppd.period_amount42,0),
                  pppp.period43_start_Date, nvl(pppd.period_amount43,0),
                  pppp.period44_start_Date, nvl(pppd.period_amount44,0),
                  pppp.period45_start_Date, nvl(pppd.period_amount45,0),
                  pppp.period46_start_Date, nvl(pppd.period_amount46,0),
                  pppp.period47_start_Date, nvl(pppd.period_amount47,0),
                  pppp.period48_start_Date, nvl(pppd.period_amount48,0),
                  pppp.period49_start_Date, nvl(pppd.period_amount49,0),
                  pppp.period50_start_Date, nvl(pppd.period_amount50,0),
                  pppp.period51_start_Date, nvl(pppd.period_amount51,0),
                  pppp.period52_start_Date, nvl(pppd.period_amount52,0),
		  null))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
	  pppd.budget_version_id = p_budget_version_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
          pppd.amount_subtype_id = p_amount_type_id and
	  ((p_amount_type_id=215 and pppd.currency_type='TRANSACTION') or
	   (p_amount_type_id <> 215 and pppd.currency_type = p_project_currency_type));
Line: 1461

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date8(),
                  pppp.period1_start_Date, nvl(pppd.period_amount1,0),
                  pppp.period2_start_Date, nvl(pppd.period_amount2,0),
                  pppp.period3_start_Date, nvl(pppd.period_amount3,0),
                  pppp.period4_start_Date, nvl(pppd.period_amount4,0),
                  pppp.period5_start_Date, nvl(pppd.period_amount5,0),
                  pppp.period6_start_Date, nvl(pppd.period_amount6,0),
                  pppp.period7_start_Date, nvl(pppd.period_amount7,0),
                  pppp.period8_start_Date, nvl(pppd.period_amount8,0),
                  pppp.period9_start_Date, nvl(pppd.period_amount9,0),
                  pppp.period10_start_Date, nvl(pppd.period_amount10,0),
                  pppp.period11_start_Date, nvl(pppd.period_amount11,0),
                  pppp.period12_start_Date, nvl(pppd.period_amount12,0),
                  pppp.period13_start_Date, nvl(pppd.period_amount13,0),
                  pppp.period14_start_Date, nvl(pppd.period_amount14,0),
                  pppp.period15_start_Date, nvl(pppd.period_amount15,0),
                  pppp.period16_start_Date, nvl(pppd.period_amount16,0),
                  pppp.period17_start_Date, nvl(pppd.period_amount17,0),
                  pppp.period18_start_Date, nvl(pppd.period_amount18,0),
                  pppp.period19_start_Date, nvl(pppd.period_amount19,0),
                  pppp.period20_start_Date, nvl(pppd.period_amount20,0),
                  pppp.period21_start_Date, nvl(pppd.period_amount21,0),
                  pppp.period22_start_Date, nvl(pppd.period_amount22,0),
                  pppp.period23_start_Date, nvl(pppd.period_amount23,0),
                  pppp.period24_start_Date, nvl(pppd.period_amount24,0),
                  pppp.period25_start_Date, nvl(pppd.period_amount25,0),
                  pppp.period26_start_Date, nvl(pppd.period_amount26,0),
                  pppp.period27_start_Date, nvl(pppd.period_amount27,0),
                  pppp.period28_start_Date, nvl(pppd.period_amount28,0),
                  pppp.period29_start_Date, nvl(pppd.period_amount29,0),
                  pppp.period30_start_Date, nvl(pppd.period_amount30,0),
                  pppp.period31_start_Date, nvl(pppd.period_amount31,0),
                  pppp.period32_start_Date, nvl(pppd.period_amount32,0),
                  pppp.period33_start_Date, nvl(pppd.period_amount33,0),
                  pppp.period34_start_Date, nvl(pppd.period_amount34,0),
                  pppp.period35_start_Date, nvl(pppd.period_amount35,0),
                  pppp.period36_start_Date, nvl(pppd.period_amount36,0),
                  pppp.period37_start_Date, nvl(pppd.period_amount37,0),
                  pppp.period38_start_Date, nvl(pppd.period_amount38,0),
                  pppp.period39_start_Date, nvl(pppd.period_amount39,0),
                  pppp.period40_start_Date, nvl(pppd.period_amount40,0),
                  pppp.period41_start_Date, nvl(pppd.period_amount41,0),
                  pppp.period42_start_Date, nvl(pppd.period_amount42,0),
                  pppp.period43_start_Date, nvl(pppd.period_amount43,0),
                  pppp.period44_start_Date, nvl(pppd.period_amount44,0),
                  pppp.period45_start_Date, nvl(pppd.period_amount45,0),
                  pppp.period46_start_Date, nvl(pppd.period_amount46,0),
                  pppp.period47_start_Date, nvl(pppd.period_amount47,0),
                  pppp.period48_start_Date, nvl(pppd.period_amount48,0),
                  pppp.period49_start_Date, nvl(pppd.period_amount49,0),
                  pppp.period50_start_Date, nvl(pppd.period_amount50,0),
                  pppp.period51_start_Date, nvl(pppd.period_amount51,0),
                  pppp.period52_start_Date, nvl(pppd.period_amount52,0),
		  null))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
	  pppd.budget_version_id = p_budget_version_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
          pppd.amount_subtype_id = p_amount_type_id and
	  ((p_amount_type_id=215 and pppd.currency_type='TRANSACTION') or
	   (p_amount_type_id <> 215 and pppd.currency_type = p_project_currency_type));
Line: 1528

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date9(),
                  pppp.period1_start_Date, nvl(pppd.period_amount1,0),
                  pppp.period2_start_Date, nvl(pppd.period_amount2,0),
                  pppp.period3_start_Date, nvl(pppd.period_amount3,0),
                  pppp.period4_start_Date, nvl(pppd.period_amount4,0),
                  pppp.period5_start_Date, nvl(pppd.period_amount5,0),
                  pppp.period6_start_Date, nvl(pppd.period_amount6,0),
                  pppp.period7_start_Date, nvl(pppd.period_amount7,0),
                  pppp.period8_start_Date, nvl(pppd.period_amount8,0),
                  pppp.period9_start_Date, nvl(pppd.period_amount9,0),
                  pppp.period10_start_Date, nvl(pppd.period_amount10,0),
                  pppp.period11_start_Date, nvl(pppd.period_amount11,0),
                  pppp.period12_start_Date, nvl(pppd.period_amount12,0),
                  pppp.period13_start_Date, nvl(pppd.period_amount13,0),
                  pppp.period14_start_Date, nvl(pppd.period_amount14,0),
                  pppp.period15_start_Date, nvl(pppd.period_amount15,0),
                  pppp.period16_start_Date, nvl(pppd.period_amount16,0),
                  pppp.period17_start_Date, nvl(pppd.period_amount17,0),
                  pppp.period18_start_Date, nvl(pppd.period_amount18,0),
                  pppp.period19_start_Date, nvl(pppd.period_amount19,0),
                  pppp.period20_start_Date, nvl(pppd.period_amount20,0),
                  pppp.period21_start_Date, nvl(pppd.period_amount21,0),
                  pppp.period22_start_Date, nvl(pppd.period_amount22,0),
                  pppp.period23_start_Date, nvl(pppd.period_amount23,0),
                  pppp.period24_start_Date, nvl(pppd.period_amount24,0),
                  pppp.period25_start_Date, nvl(pppd.period_amount25,0),
                  pppp.period26_start_Date, nvl(pppd.period_amount26,0),
                  pppp.period27_start_Date, nvl(pppd.period_amount27,0),
                  pppp.period28_start_Date, nvl(pppd.period_amount28,0),
                  pppp.period29_start_Date, nvl(pppd.period_amount29,0),
                  pppp.period30_start_Date, nvl(pppd.period_amount30,0),
                  pppp.period31_start_Date, nvl(pppd.period_amount31,0),
                  pppp.period32_start_Date, nvl(pppd.period_amount32,0),
                  pppp.period33_start_Date, nvl(pppd.period_amount33,0),
                  pppp.period34_start_Date, nvl(pppd.period_amount34,0),
                  pppp.period35_start_Date, nvl(pppd.period_amount35,0),
                  pppp.period36_start_Date, nvl(pppd.period_amount36,0),
                  pppp.period37_start_Date, nvl(pppd.period_amount37,0),
                  pppp.period38_start_Date, nvl(pppd.period_amount38,0),
                  pppp.period39_start_Date, nvl(pppd.period_amount39,0),
                  pppp.period40_start_Date, nvl(pppd.period_amount40,0),
                  pppp.period41_start_Date, nvl(pppd.period_amount41,0),
                  pppp.period42_start_Date, nvl(pppd.period_amount42,0),
                  pppp.period43_start_Date, nvl(pppd.period_amount43,0),
                  pppp.period44_start_Date, nvl(pppd.period_amount44,0),
                  pppp.period45_start_Date, nvl(pppd.period_amount45,0),
                  pppp.period46_start_Date, nvl(pppd.period_amount46,0),
                  pppp.period47_start_Date, nvl(pppd.period_amount47,0),
                  pppp.period48_start_Date, nvl(pppd.period_amount48,0),
                  pppp.period49_start_Date, nvl(pppd.period_amount49,0),
                  pppp.period50_start_Date, nvl(pppd.period_amount50,0),
                  pppp.period51_start_Date, nvl(pppd.period_amount51,0),
                  pppp.period52_start_Date, nvl(pppd.period_amount52,0),
		  null))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
	  pppd.budget_version_id = p_budget_version_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
          pppd.amount_subtype_id = p_amount_type_id and
	  ((p_amount_type_id=215 and pppd.currency_type='TRANSACTION') or
	   (p_amount_type_id <> 215 and pppd.currency_type = p_project_currency_type));
Line: 1595

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date10(),
                  pppp.period1_start_Date, nvl(pppd.period_amount1,0),
                  pppp.period2_start_Date, nvl(pppd.period_amount2,0),
                  pppp.period3_start_Date, nvl(pppd.period_amount3,0),
                  pppp.period4_start_Date, nvl(pppd.period_amount4,0),
                  pppp.period5_start_Date, nvl(pppd.period_amount5,0),
                  pppp.period6_start_Date, nvl(pppd.period_amount6,0),
                  pppp.period7_start_Date, nvl(pppd.period_amount7,0),
                  pppp.period8_start_Date, nvl(pppd.period_amount8,0),
                  pppp.period9_start_Date, nvl(pppd.period_amount9,0),
                  pppp.period10_start_Date, nvl(pppd.period_amount10,0),
                  pppp.period11_start_Date, nvl(pppd.period_amount11,0),
                  pppp.period12_start_Date, nvl(pppd.period_amount12,0),
                  pppp.period13_start_Date, nvl(pppd.period_amount13,0),
                  pppp.period14_start_Date, nvl(pppd.period_amount14,0),
                  pppp.period15_start_Date, nvl(pppd.period_amount15,0),
                  pppp.period16_start_Date, nvl(pppd.period_amount16,0),
                  pppp.period17_start_Date, nvl(pppd.period_amount17,0),
                  pppp.period18_start_Date, nvl(pppd.period_amount18,0),
                  pppp.period19_start_Date, nvl(pppd.period_amount19,0),
                  pppp.period20_start_Date, nvl(pppd.period_amount20,0),
                  pppp.period21_start_Date, nvl(pppd.period_amount21,0),
                  pppp.period22_start_Date, nvl(pppd.period_amount22,0),
                  pppp.period23_start_Date, nvl(pppd.period_amount23,0),
                  pppp.period24_start_Date, nvl(pppd.period_amount24,0),
                  pppp.period25_start_Date, nvl(pppd.period_amount25,0),
                  pppp.period26_start_Date, nvl(pppd.period_amount26,0),
                  pppp.period27_start_Date, nvl(pppd.period_amount27,0),
                  pppp.period28_start_Date, nvl(pppd.period_amount28,0),
                  pppp.period29_start_Date, nvl(pppd.period_amount29,0),
                  pppp.period30_start_Date, nvl(pppd.period_amount30,0),
                  pppp.period31_start_Date, nvl(pppd.period_amount31,0),
                  pppp.period32_start_Date, nvl(pppd.period_amount32,0),
                  pppp.period33_start_Date, nvl(pppd.period_amount33,0),
                  pppp.period34_start_Date, nvl(pppd.period_amount34,0),
                  pppp.period35_start_Date, nvl(pppd.period_amount35,0),
                  pppp.period36_start_Date, nvl(pppd.period_amount36,0),
                  pppp.period37_start_Date, nvl(pppd.period_amount37,0),
                  pppp.period38_start_Date, nvl(pppd.period_amount38,0),
                  pppp.period39_start_Date, nvl(pppd.period_amount39,0),
                  pppp.period40_start_Date, nvl(pppd.period_amount40,0),
                  pppp.period41_start_Date, nvl(pppd.period_amount41,0),
                  pppp.period42_start_Date, nvl(pppd.period_amount42,0),
                  pppp.period43_start_Date, nvl(pppd.period_amount43,0),
                  pppp.period44_start_Date, nvl(pppd.period_amount44,0),
                  pppp.period45_start_Date, nvl(pppd.period_amount45,0),
                  pppp.period46_start_Date, nvl(pppd.period_amount46,0),
                  pppp.period47_start_Date, nvl(pppd.period_amount47,0),
                  pppp.period48_start_Date, nvl(pppd.period_amount48,0),
                  pppp.period49_start_Date, nvl(pppd.period_amount49,0),
                  pppp.period50_start_Date, nvl(pppd.period_amount50,0),
                  pppp.period51_start_Date, nvl(pppd.period_amount51,0),
                  pppp.period52_start_Date, nvl(pppd.period_amount52,0),
		  null))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
	  pppd.budget_version_id = p_budget_version_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
          pppd.amount_subtype_id = p_amount_type_id and
	  ((p_amount_type_id=215 and pppd.currency_type='TRANSACTION') or
	   (p_amount_type_id <> 215 and pppd.currency_type = p_project_currency_type));
Line: 1662

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date11(),
                  pppp.period1_start_Date, nvl(pppd.period_amount1,0),
                  pppp.period2_start_Date, nvl(pppd.period_amount2,0),
                  pppp.period3_start_Date, nvl(pppd.period_amount3,0),
                  pppp.period4_start_Date, nvl(pppd.period_amount4,0),
                  pppp.period5_start_Date, nvl(pppd.period_amount5,0),
                  pppp.period6_start_Date, nvl(pppd.period_amount6,0),
                  pppp.period7_start_Date, nvl(pppd.period_amount7,0),
                  pppp.period8_start_Date, nvl(pppd.period_amount8,0),
                  pppp.period9_start_Date, nvl(pppd.period_amount9,0),
                  pppp.period10_start_Date, nvl(pppd.period_amount10,0),
                  pppp.period11_start_Date, nvl(pppd.period_amount11,0),
                  pppp.period12_start_Date, nvl(pppd.period_amount12,0),
                  pppp.period13_start_Date, nvl(pppd.period_amount13,0),
                  pppp.period14_start_Date, nvl(pppd.period_amount14,0),
                  pppp.period15_start_Date, nvl(pppd.period_amount15,0),
                  pppp.period16_start_Date, nvl(pppd.period_amount16,0),
                  pppp.period17_start_Date, nvl(pppd.period_amount17,0),
                  pppp.period18_start_Date, nvl(pppd.period_amount18,0),
                  pppp.period19_start_Date, nvl(pppd.period_amount19,0),
                  pppp.period20_start_Date, nvl(pppd.period_amount20,0),
                  pppp.period21_start_Date, nvl(pppd.period_amount21,0),
                  pppp.period22_start_Date, nvl(pppd.period_amount22,0),
                  pppp.period23_start_Date, nvl(pppd.period_amount23,0),
                  pppp.period24_start_Date, nvl(pppd.period_amount24,0),
                  pppp.period25_start_Date, nvl(pppd.period_amount25,0),
                  pppp.period26_start_Date, nvl(pppd.period_amount26,0),
                  pppp.period27_start_Date, nvl(pppd.period_amount27,0),
                  pppp.period28_start_Date, nvl(pppd.period_amount28,0),
                  pppp.period29_start_Date, nvl(pppd.period_amount29,0),
                  pppp.period30_start_Date, nvl(pppd.period_amount30,0),
                  pppp.period31_start_Date, nvl(pppd.period_amount31,0),
                  pppp.period32_start_Date, nvl(pppd.period_amount32,0),
                  pppp.period33_start_Date, nvl(pppd.period_amount33,0),
                  pppp.period34_start_Date, nvl(pppd.period_amount34,0),
                  pppp.period35_start_Date, nvl(pppd.period_amount35,0),
                  pppp.period36_start_Date, nvl(pppd.period_amount36,0),
                  pppp.period37_start_Date, nvl(pppd.period_amount37,0),
                  pppp.period38_start_Date, nvl(pppd.period_amount38,0),
                  pppp.period39_start_Date, nvl(pppd.period_amount39,0),
                  pppp.period40_start_Date, nvl(pppd.period_amount40,0),
                  pppp.period41_start_Date, nvl(pppd.period_amount41,0),
                  pppp.period42_start_Date, nvl(pppd.period_amount42,0),
                  pppp.period43_start_Date, nvl(pppd.period_amount43,0),
                  pppp.period44_start_Date, nvl(pppd.period_amount44,0),
                  pppp.period45_start_Date, nvl(pppd.period_amount45,0),
                  pppp.period46_start_Date, nvl(pppd.period_amount46,0),
                  pppp.period47_start_Date, nvl(pppd.period_amount47,0),
                  pppp.period48_start_Date, nvl(pppd.period_amount48,0),
                  pppp.period49_start_Date, nvl(pppd.period_amount49,0),
                  pppp.period50_start_Date, nvl(pppd.period_amount50,0),
                  pppp.period51_start_Date, nvl(pppd.period_amount51,0),
                  pppp.period52_start_Date, nvl(pppd.period_amount52,0),
		  null))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
	  pppd.budget_version_id = p_budget_version_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
          pppd.amount_subtype_id = p_amount_type_id and
	  ((p_amount_type_id=215 and pppd.currency_type='TRANSACTION') or
	   (p_amount_type_id <> 215 and pppd.currency_type = p_project_currency_type));
Line: 1729

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date12(),
                  pppp.period1_start_Date, nvl(pppd.period_amount1,0),
                  pppp.period2_start_Date, nvl(pppd.period_amount2,0),
                  pppp.period3_start_Date, nvl(pppd.period_amount3,0),
                  pppp.period4_start_Date, nvl(pppd.period_amount4,0),
                  pppp.period5_start_Date, nvl(pppd.period_amount5,0),
                  pppp.period6_start_Date, nvl(pppd.period_amount6,0),
                  pppp.period7_start_Date, nvl(pppd.period_amount7,0),
                  pppp.period8_start_Date, nvl(pppd.period_amount8,0),
                  pppp.period9_start_Date, nvl(pppd.period_amount9,0),
                  pppp.period10_start_Date, nvl(pppd.period_amount10,0),
                  pppp.period11_start_Date, nvl(pppd.period_amount11,0),
                  pppp.period12_start_Date, nvl(pppd.period_amount12,0),
                  pppp.period13_start_Date, nvl(pppd.period_amount13,0),
                  pppp.period14_start_Date, nvl(pppd.period_amount14,0),
                  pppp.period15_start_Date, nvl(pppd.period_amount15,0),
                  pppp.period16_start_Date, nvl(pppd.period_amount16,0),
                  pppp.period17_start_Date, nvl(pppd.period_amount17,0),
                  pppp.period18_start_Date, nvl(pppd.period_amount18,0),
                  pppp.period19_start_Date, nvl(pppd.period_amount19,0),
                  pppp.period20_start_Date, nvl(pppd.period_amount20,0),
                  pppp.period21_start_Date, nvl(pppd.period_amount21,0),
                  pppp.period22_start_Date, nvl(pppd.period_amount22,0),
                  pppp.period23_start_Date, nvl(pppd.period_amount23,0),
                  pppp.period24_start_Date, nvl(pppd.period_amount24,0),
                  pppp.period25_start_Date, nvl(pppd.period_amount25,0),
                  pppp.period26_start_Date, nvl(pppd.period_amount26,0),
                  pppp.period27_start_Date, nvl(pppd.period_amount27,0),
                  pppp.period28_start_Date, nvl(pppd.period_amount28,0),
                  pppp.period29_start_Date, nvl(pppd.period_amount29,0),
                  pppp.period30_start_Date, nvl(pppd.period_amount30,0),
                  pppp.period31_start_Date, nvl(pppd.period_amount31,0),
                  pppp.period32_start_Date, nvl(pppd.period_amount32,0),
                  pppp.period33_start_Date, nvl(pppd.period_amount33,0),
                  pppp.period34_start_Date, nvl(pppd.period_amount34,0),
                  pppp.period35_start_Date, nvl(pppd.period_amount35,0),
                  pppp.period36_start_Date, nvl(pppd.period_amount36,0),
                  pppp.period37_start_Date, nvl(pppd.period_amount37,0),
                  pppp.period38_start_Date, nvl(pppd.period_amount38,0),
                  pppp.period39_start_Date, nvl(pppd.period_amount39,0),
                  pppp.period40_start_Date, nvl(pppd.period_amount40,0),
                  pppp.period41_start_Date, nvl(pppd.period_amount41,0),
                  pppp.period42_start_Date, nvl(pppd.period_amount42,0),
                  pppp.period43_start_Date, nvl(pppd.period_amount43,0),
                  pppp.period44_start_Date, nvl(pppd.period_amount44,0),
                  pppp.period45_start_Date, nvl(pppd.period_amount45,0),
                  pppp.period46_start_Date, nvl(pppd.period_amount46,0),
                  pppp.period47_start_Date, nvl(pppd.period_amount47,0),
                  pppp.period48_start_Date, nvl(pppd.period_amount48,0),
                  pppp.period49_start_Date, nvl(pppd.period_amount49,0),
                  pppp.period50_start_Date, nvl(pppd.period_amount50,0),
                  pppp.period51_start_Date, nvl(pppd.period_amount51,0),
                  pppp.period52_start_Date, nvl(pppd.period_amount52,0),
		  null))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
	  pppd.budget_version_id = p_budget_version_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
          pppd.amount_subtype_id = p_amount_type_id and
	  ((p_amount_type_id=215 and pppd.currency_type='TRANSACTION') or
	   (p_amount_type_id <> 215 and pppd.currency_type = p_project_currency_type));
Line: 1796

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date13(),
                  pppp.period1_start_Date, nvl(pppd.period_amount1,0),
                  pppp.period2_start_Date, nvl(pppd.period_amount2,0),
                  pppp.period3_start_Date, nvl(pppd.period_amount3,0),
                  pppp.period4_start_Date, nvl(pppd.period_amount4,0),
                  pppp.period5_start_Date, nvl(pppd.period_amount5,0),
                  pppp.period6_start_Date, nvl(pppd.period_amount6,0),
                  pppp.period7_start_Date, nvl(pppd.period_amount7,0),
                  pppp.period8_start_Date, nvl(pppd.period_amount8,0),
                  pppp.period9_start_Date, nvl(pppd.period_amount9,0),
                  pppp.period10_start_Date, nvl(pppd.period_amount10,0),
                  pppp.period11_start_Date, nvl(pppd.period_amount11,0),
                  pppp.period12_start_Date, nvl(pppd.period_amount12,0),
                  pppp.period13_start_Date, nvl(pppd.period_amount13,0),
                  pppp.period14_start_Date, nvl(pppd.period_amount14,0),
                  pppp.period15_start_Date, nvl(pppd.period_amount15,0),
                  pppp.period16_start_Date, nvl(pppd.period_amount16,0),
                  pppp.period17_start_Date, nvl(pppd.period_amount17,0),
                  pppp.period18_start_Date, nvl(pppd.period_amount18,0),
                  pppp.period19_start_Date, nvl(pppd.period_amount19,0),
                  pppp.period20_start_Date, nvl(pppd.period_amount20,0),
                  pppp.period21_start_Date, nvl(pppd.period_amount21,0),
                  pppp.period22_start_Date, nvl(pppd.period_amount22,0),
                  pppp.period23_start_Date, nvl(pppd.period_amount23,0),
                  pppp.period24_start_Date, nvl(pppd.period_amount24,0),
                  pppp.period25_start_Date, nvl(pppd.period_amount25,0),
                  pppp.period26_start_Date, nvl(pppd.period_amount26,0),
                  pppp.period27_start_Date, nvl(pppd.period_amount27,0),
                  pppp.period28_start_Date, nvl(pppd.period_amount28,0),
                  pppp.period29_start_Date, nvl(pppd.period_amount29,0),
                  pppp.period30_start_Date, nvl(pppd.period_amount30,0),
                  pppp.period31_start_Date, nvl(pppd.period_amount31,0),
                  pppp.period32_start_Date, nvl(pppd.period_amount32,0),
                  pppp.period33_start_Date, nvl(pppd.period_amount33,0),
                  pppp.period34_start_Date, nvl(pppd.period_amount34,0),
                  pppp.period35_start_Date, nvl(pppd.period_amount35,0),
                  pppp.period36_start_Date, nvl(pppd.period_amount36,0),
                  pppp.period37_start_Date, nvl(pppd.period_amount37,0),
                  pppp.period38_start_Date, nvl(pppd.period_amount38,0),
                  pppp.period39_start_Date, nvl(pppd.period_amount39,0),
                  pppp.period40_start_Date, nvl(pppd.period_amount40,0),
                  pppp.period41_start_Date, nvl(pppd.period_amount41,0),
                  pppp.period42_start_Date, nvl(pppd.period_amount42,0),
                  pppp.period43_start_Date, nvl(pppd.period_amount43,0),
                  pppp.period44_start_Date, nvl(pppd.period_amount44,0),
                  pppp.period45_start_Date, nvl(pppd.period_amount45,0),
                  pppp.period46_start_Date, nvl(pppd.period_amount46,0),
                  pppp.period47_start_Date, nvl(pppd.period_amount47,0),
                  pppp.period48_start_Date, nvl(pppd.period_amount48,0),
                  pppp.period49_start_Date, nvl(pppd.period_amount49,0),
                  pppp.period50_start_Date, nvl(pppd.period_amount50,0),
                  pppp.period51_start_Date, nvl(pppd.period_amount51,0),
                  pppp.period52_start_Date, nvl(pppd.period_amount52,0),
		  null))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
	  pppd.budget_version_id = p_budget_version_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
          pppd.amount_subtype_id = p_amount_type_id and
	  ((p_amount_type_id=215 and pppd.currency_type='TRANSACTION') or
	   (p_amount_type_id <> 215 and pppd.currency_type = p_project_currency_type));
Line: 1862

    select SUM(nvl(pppd.preceding_periods_amount,0))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
	  pppd.budget_version_id = p_budget_version_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
          pppd.amount_subtype_id = p_amount_type_id and
	  ((p_amount_type_id=215 and pppd.currency_type='TRANSACTION') or
	   (p_amount_type_id <> 215 and pppd.currency_type = p_project_currency_type));
Line: 1875

    select SUM(nvl(pppd.succeeding_periods_amount,0))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
	  pppd.budget_version_id = p_budget_version_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
          pppd.amount_subtype_id = p_amount_type_id and
	  ((p_amount_type_id=215 and pppd.currency_type='TRANSACTION') or
	   (p_amount_type_id <> 215 and pppd.currency_type = p_project_currency_type));
Line: 1929

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date1(),
                pppp.period1_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount1,
                                            120, -pppd.period_amount1,
                                            pppd.period_amount1),
                pppp.period2_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount2,
                                            120, -pppd.period_amount2,
                                            pppd.period_amount2),
		        pppp.period3_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount3,
                                            120, -pppd.period_amount3,
                                            pppd.period_amount3),
                pppp.period4_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount4,
                                            120, -pppd.period_amount4,
                                            pppd.period_amount4),
                pppp.period5_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount5,
                                            120, -pppd.period_amount5,
                                            pppd.period_amount5),
                pppp.period6_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount6,
                                            120, -pppd.period_amount6,
                                            pppd.period_amount6),
                pppp.period7_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount7,
                                            120, -pppd.period_amount7,
                                            pppd.period_amount7),
                pppp.period8_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount8,
                                            120, -pppd.period_amount8,
                                            pppd.period_amount8),
                pppp.period9_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount9,
                                            120, -pppd.period_amount9,
                                            pppd.period_amount9),
                pppp.period10_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount10,
                                            120, -pppd.period_amount10,
                                            pppd.period_amount10),
                pppp.period11_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount11,
                                            120, -pppd.period_amount11,
                                            pppd.period_amount11),
                pppp.period12_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount12,
                                            120, -pppd.period_amount12,
                                            pppd.period_amount12),
                pppp.period13_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount13,
                                            120, -pppd.period_amount13,
                                            pppd.period_amount13),
                pppp.period14_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount14,
                                            120, -pppd.period_amount14,
                                            pppd.period_amount14),
                pppp.period15_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount15,
                                            120, -pppd.period_amount15,
                                            pppd.period_amount15),
                pppp.period16_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount16,
                                            120, -pppd.period_amount16,
                                            pppd.period_amount16),
                pppp.period17_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount17,
                                            120, -pppd.period_amount17,
                                            pppd.period_amount17),
                pppp.period18_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount18,
                                            120, -pppd.period_amount18,
                                            pppd.period_amount18),
                pppp.period19_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount19,
                                            120, -pppd.period_amount19,
                                            pppd.period_amount19),
                pppp.period20_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount20,
                                            120, -pppd.period_amount20,
                                            pppd.period_amount20),
                pppp.period21_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount21,
                                            120, -pppd.period_amount21,
                                            pppd.period_amount21),
                pppp.period22_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount22,
                                            120, -pppd.period_amount22,
                                            pppd.period_amount22),
                pppp.period23_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount23,
                                            120, -pppd.period_amount23,
                                            pppd.period_amount23),
                pppp.period24_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount24,
                                            120, -pppd.period_amount24,
                                            pppd.period_amount24),
                pppp.period25_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount25,
                                            120, -pppd.period_amount25,
                                            pppd.period_amount25),
                pppp.period26_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount26,
                                            120, -pppd.period_amount26,
                                            pppd.period_amount26),
                pppp.period27_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount27,
                                            120, -pppd.period_amount27,
                                            pppd.period_amount27),
                pppp.period28_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount28,
                                            120, -pppd.period_amount28,
                                            pppd.period_amount28),
                pppp.period29_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount29,
                                            120, -pppd.period_amount29,
                                            pppd.period_amount29),
                pppp.period30_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount30,
                                            120, -pppd.period_amount30,
                                            pppd.period_amount30),
                pppp.period31_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount31,
                                            120, -pppd.period_amount31,
                                            pppd.period_amount31),
                pppp.period32_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount32,
                                            120, -pppd.period_amount32,
                                            pppd.period_amount32),
                pppp.period33_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount33,
                                            120, -pppd.period_amount33,
                                            pppd.period_amount33),
                pppp.period34_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount34,
                                            120, -pppd.period_amount34,
                                            pppd.period_amount34),
                pppp.period35_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount35,
                                            120, -pppd.period_amount35,
                                            pppd.period_amount35),
                pppp.period36_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount36,
                                            120, -pppd.period_amount36,
                                            pppd.period_amount36),
                pppp.period37_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount37,
                                            120, -pppd.period_amount37,
                                            pppd.period_amount37),
                pppp.period38_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount38,
                                            120, -pppd.period_amount38,
                                            pppd.period_amount38),
                pppp.period39_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount39,
                                            120, -pppd.period_amount39,
                                            pppd.period_amount39),
                pppp.period40_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount40,
                                            120, -pppd.period_amount40,
                                            pppd.period_amount40),
                pppp.period41_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount41,
                                            120, -pppd.period_amount41,
                                            pppd.period_amount41),
                pppp.period42_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount42,
                                            120, -pppd.period_amount42,
                                            pppd.period_amount42),
                pppp.period43_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount43,
                                            120, -pppd.period_amount43,
                                            pppd.period_amount43),
                pppp.period44_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount44,
                                            120, -pppd.period_amount44,
                                            pppd.period_amount44),
                pppp.period45_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount45,
                                            120, -pppd.period_amount45,
                                            pppd.period_amount45),
                pppp.period46_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount46,
                                            120, -pppd.period_amount46,
                                            pppd.period_amount46),
                pppp.period47_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount47,
                                            120, -pppd.period_amount47,
                                            pppd.period_amount47),
                pppp.period48_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount48,
                                            120, -pppd.period_amount48,
                                            pppd.period_amount48),
                pppp.period49_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount49,
                                            120, -pppd.period_amount49,
                                            pppd.period_amount49),
                pppp.period50_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount50,
                                            120, -pppd.period_amount50,
                                            pppd.period_amount50),
                pppp.period51_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount51,
                                            120, -pppd.period_amount51,
                                            pppd.period_amount51),
                pppp.period52_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount52,
                                            120, -pppd.period_amount52,
                                            pppd.period_amount52),0))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
          pppd.amount_type_id = p_amount_type_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
	  pppd.currency_type = p_project_currency_type
    group by pppd.amount_type_id;
Line: 2149

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date2(),
                pppp.period1_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount1,
                                            120, -pppd.period_amount1,
                                            pppd.period_amount1),
                pppp.period2_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount2,
                                            120, -pppd.period_amount2,
                                            pppd.period_amount2),
		        pppp.period3_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount3,
                                            120, -pppd.period_amount3,
                                            pppd.period_amount3),
                pppp.period4_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount4,
                                            120, -pppd.period_amount4,
                                            pppd.period_amount4),
                pppp.period5_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount5,
                                            120, -pppd.period_amount5,
                                            pppd.period_amount5),
                pppp.period6_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount6,
                                            120, -pppd.period_amount6,
                                            pppd.period_amount6),
                pppp.period7_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount7,
                                            120, -pppd.period_amount7,
                                            pppd.period_amount7),
                pppp.period8_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount8,
                                            120, -pppd.period_amount8,
                                            pppd.period_amount8),
                pppp.period9_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount9,
                                            120, -pppd.period_amount9,
                                            pppd.period_amount9),
                pppp.period10_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount10,
                                            120, -pppd.period_amount10,
                                            pppd.period_amount10),
                pppp.period11_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount11,
                                            120, -pppd.period_amount11,
                                            pppd.period_amount11),
                pppp.period12_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount12,
                                            120, -pppd.period_amount12,
                                            pppd.period_amount12),
                pppp.period13_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount13,
                                            120, -pppd.period_amount13,
                                            pppd.period_amount13),
                pppp.period14_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount14,
                                            120, -pppd.period_amount14,
                                            pppd.period_amount14),
                pppp.period15_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount15,
                                            120, -pppd.period_amount15,
                                            pppd.period_amount15),
                pppp.period16_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount16,
                                            120, -pppd.period_amount16,
                                            pppd.period_amount16),
                pppp.period17_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount17,
                                            120, -pppd.period_amount17,
                                            pppd.period_amount17),
                pppp.period18_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount18,
                                            120, -pppd.period_amount18,
                                            pppd.period_amount18),
                pppp.period19_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount19,
                                            120, -pppd.period_amount19,
                                            pppd.period_amount19),
                pppp.period20_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount20,
                                            120, -pppd.period_amount20,
                                            pppd.period_amount20),
                pppp.period21_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount21,
                                            120, -pppd.period_amount21,
                                            pppd.period_amount21),
                pppp.period22_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount22,
                                            120, -pppd.period_amount22,
                                            pppd.period_amount22),
                pppp.period23_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount23,
                                            120, -pppd.period_amount23,
                                            pppd.period_amount23),
                pppp.period24_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount24,
                                            120, -pppd.period_amount24,
                                            pppd.period_amount24),
                pppp.period25_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount25,
                                            120, -pppd.period_amount25,
                                            pppd.period_amount25),
                pppp.period26_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount26,
                                            120, -pppd.period_amount26,
                                            pppd.period_amount26),
                pppp.period27_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount27,
                                            120, -pppd.period_amount27,
                                            pppd.period_amount27),
                pppp.period28_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount28,
                                            120, -pppd.period_amount28,
                                            pppd.period_amount28),
                pppp.period29_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount29,
                                            120, -pppd.period_amount29,
                                            pppd.period_amount29),
                pppp.period30_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount30,
                                            120, -pppd.period_amount30,
                                            pppd.period_amount30),
                pppp.period31_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount31,
                                            120, -pppd.period_amount31,
                                            pppd.period_amount31),
                pppp.period32_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount32,
                                            120, -pppd.period_amount32,
                                            pppd.period_amount32),
                pppp.period33_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount33,
                                            120, -pppd.period_amount33,
                                            pppd.period_amount33),
                pppp.period34_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount34,
                                            120, -pppd.period_amount34,
                                            pppd.period_amount34),
                pppp.period35_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount35,
                                            120, -pppd.period_amount35,
                                            pppd.period_amount35),
                pppp.period36_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount36,
                                            120, -pppd.period_amount36,
                                            pppd.period_amount36),
                pppp.period37_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount37,
                                            120, -pppd.period_amount37,
                                            pppd.period_amount37),
                pppp.period38_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount38,
                                            120, -pppd.period_amount38,
                                            pppd.period_amount38),
                pppp.period39_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount39,
                                            120, -pppd.period_amount39,
                                            pppd.period_amount39),
                pppp.period40_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount40,
                                            120, -pppd.period_amount40,
                                            pppd.period_amount40),
                pppp.period41_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount41,
                                            120, -pppd.period_amount41,
                                            pppd.period_amount41),
                pppp.period42_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount42,
                                            120, -pppd.period_amount42,
                                            pppd.period_amount42),
                pppp.period43_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount43,
                                            120, -pppd.period_amount43,
                                            pppd.period_amount43),
                pppp.period44_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount44,
                                            120, -pppd.period_amount44,
                                            pppd.period_amount44),
                pppp.period45_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount45,
                                            120, -pppd.period_amount45,
                                            pppd.period_amount45),
                pppp.period46_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount46,
                                            120, -pppd.period_amount46,
                                            pppd.period_amount46),
                pppp.period47_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount47,
                                            120, -pppd.period_amount47,
                                            pppd.period_amount47),
                pppp.period48_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount48,
                                            120, -pppd.period_amount48,
                                            pppd.period_amount48),
                pppp.period49_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount49,
                                            120, -pppd.period_amount49,
                                            pppd.period_amount49),
                pppp.period50_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount50,
                                            120, -pppd.period_amount50,
                                            pppd.period_amount50),
                pppp.period51_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount51,
                                            120, -pppd.period_amount51,
                                            pppd.period_amount51),
                pppp.period52_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount52,
                                            120, -pppd.period_amount52,
                                            pppd.period_amount52),0))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
          pppd.amount_type_id = p_amount_type_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
	  pppd.currency_type = p_project_currency_type
    group by pppd.amount_type_id;
Line: 2369

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date3(),
                pppp.period1_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount1,
                                            120, -pppd.period_amount1,
                                            pppd.period_amount1),
                pppp.period2_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount2,
                                            120, -pppd.period_amount2,
                                            pppd.period_amount2),
		        pppp.period3_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount3,
                                            120, -pppd.period_amount3,
                                            pppd.period_amount3),
                pppp.period4_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount4,
                                            120, -pppd.period_amount4,
                                            pppd.period_amount4),
                pppp.period5_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount5,
                                            120, -pppd.period_amount5,
                                            pppd.period_amount5),
                pppp.period6_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount6,
                                            120, -pppd.period_amount6,
                                            pppd.period_amount6),
                pppp.period7_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount7,
                                            120, -pppd.period_amount7,
                                            pppd.period_amount7),
                pppp.period8_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount8,
                                            120, -pppd.period_amount8,
                                            pppd.period_amount8),
                pppp.period9_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount9,
                                            120, -pppd.period_amount9,
                                            pppd.period_amount9),
                pppp.period10_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount10,
                                            120, -pppd.period_amount10,
                                            pppd.period_amount10),
                pppp.period11_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount11,
                                            120, -pppd.period_amount11,
                                            pppd.period_amount11),
                pppp.period12_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount12,
                                            120, -pppd.period_amount12,
                                            pppd.period_amount12),
                pppp.period13_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount13,
                                            120, -pppd.period_amount13,
                                            pppd.period_amount13),
                pppp.period14_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount14,
                                            120, -pppd.period_amount14,
                                            pppd.period_amount14),
                pppp.period15_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount15,
                                            120, -pppd.period_amount15,
                                            pppd.period_amount15),
                pppp.period16_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount16,
                                            120, -pppd.period_amount16,
                                            pppd.period_amount16),
                pppp.period17_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount17,
                                            120, -pppd.period_amount17,
                                            pppd.period_amount17),
                pppp.period18_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount18,
                                            120, -pppd.period_amount18,
                                            pppd.period_amount18),
                pppp.period19_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount19,
                                            120, -pppd.period_amount19,
                                            pppd.period_amount19),
                pppp.period20_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount20,
                                            120, -pppd.period_amount20,
                                            pppd.period_amount20),
                pppp.period21_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount21,
                                            120, -pppd.period_amount21,
                                            pppd.period_amount21),
                pppp.period22_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount22,
                                            120, -pppd.period_amount22,
                                            pppd.period_amount22),
                pppp.period23_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount23,
                                            120, -pppd.period_amount23,
                                            pppd.period_amount23),
                pppp.period24_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount24,
                                            120, -pppd.period_amount24,
                                            pppd.period_amount24),
                pppp.period25_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount25,
                                            120, -pppd.period_amount25,
                                            pppd.period_amount25),
                pppp.period26_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount26,
                                            120, -pppd.period_amount26,
                                            pppd.period_amount26),
                pppp.period27_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount27,
                                            120, -pppd.period_amount27,
                                            pppd.period_amount27),
                pppp.period28_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount28,
                                            120, -pppd.period_amount28,
                                            pppd.period_amount28),
                pppp.period29_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount29,
                                            120, -pppd.period_amount29,
                                            pppd.period_amount29),
                pppp.period30_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount30,
                                            120, -pppd.period_amount30,
                                            pppd.period_amount30),
                pppp.period31_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount31,
                                            120, -pppd.period_amount31,
                                            pppd.period_amount31),
                pppp.period32_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount32,
                                            120, -pppd.period_amount32,
                                            pppd.period_amount32),
                pppp.period33_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount33,
                                            120, -pppd.period_amount33,
                                            pppd.period_amount33),
                pppp.period34_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount34,
                                            120, -pppd.period_amount34,
                                            pppd.period_amount34),
                pppp.period35_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount35,
                                            120, -pppd.period_amount35,
                                            pppd.period_amount35),
                pppp.period36_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount36,
                                            120, -pppd.period_amount36,
                                            pppd.period_amount36),
                pppp.period37_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount37,
                                            120, -pppd.period_amount37,
                                            pppd.period_amount37),
                pppp.period38_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount38,
                                            120, -pppd.period_amount38,
                                            pppd.period_amount38),
                pppp.period39_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount39,
                                            120, -pppd.period_amount39,
                                            pppd.period_amount39),
                pppp.period40_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount40,
                                            120, -pppd.period_amount40,
                                            pppd.period_amount40),
                pppp.period41_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount41,
                                            120, -pppd.period_amount41,
                                            pppd.period_amount41),
                pppp.period42_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount42,
                                            120, -pppd.period_amount42,
                                            pppd.period_amount42),
                pppp.period43_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount43,
                                            120, -pppd.period_amount43,
                                            pppd.period_amount43),
                pppp.period44_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount44,
                                            120, -pppd.period_amount44,
                                            pppd.period_amount44),
                pppp.period45_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount45,
                                            120, -pppd.period_amount45,
                                            pppd.period_amount45),
                pppp.period46_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount46,
                                            120, -pppd.period_amount46,
                                            pppd.period_amount46),
                pppp.period47_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount47,
                                            120, -pppd.period_amount47,
                                            pppd.period_amount47),
                pppp.period48_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount48,
                                            120, -pppd.period_amount48,
                                            pppd.period_amount48),
                pppp.period49_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount49,
                                            120, -pppd.period_amount49,
                                            pppd.period_amount49),
                pppp.period50_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount50,
                                            120, -pppd.period_amount50,
                                            pppd.period_amount50),
                pppp.period51_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount51,
                                            120, -pppd.period_amount51,
                                            pppd.period_amount51),
                pppp.period52_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount52,
                                            120, -pppd.period_amount52,
                                            pppd.period_amount52),0))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
          pppd.amount_type_id = p_amount_type_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
	  pppd.currency_type = p_project_currency_type
    group by pppd.amount_type_id;
Line: 2589

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date4(),
                pppp.period1_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount1,
                                            120, -pppd.period_amount1,
                                            pppd.period_amount1),
                pppp.period2_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount2,
                                            120, -pppd.period_amount2,
                                            pppd.period_amount2),
		        pppp.period3_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount3,
                                            120, -pppd.period_amount3,
                                            pppd.period_amount3),
                pppp.period4_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount4,
                                            120, -pppd.period_amount4,
                                            pppd.period_amount4),
                pppp.period5_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount5,
                                            120, -pppd.period_amount5,
                                            pppd.period_amount5),
                pppp.period6_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount6,
                                            120, -pppd.period_amount6,
                                            pppd.period_amount6),
                pppp.period7_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount7,
                                            120, -pppd.period_amount7,
                                            pppd.period_amount7),
                pppp.period8_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount8,
                                            120, -pppd.period_amount8,
                                            pppd.period_amount8),
                pppp.period9_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount9,
                                            120, -pppd.period_amount9,
                                            pppd.period_amount9),
                pppp.period10_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount10,
                                            120, -pppd.period_amount10,
                                            pppd.period_amount10),
                pppp.period11_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount11,
                                            120, -pppd.period_amount11,
                                            pppd.period_amount11),
                pppp.period12_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount12,
                                            120, -pppd.period_amount12,
                                            pppd.period_amount12),
                pppp.period13_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount13,
                                            120, -pppd.period_amount13,
                                            pppd.period_amount13),
                pppp.period14_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount14,
                                            120, -pppd.period_amount14,
                                            pppd.period_amount14),
                pppp.period15_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount15,
                                            120, -pppd.period_amount15,
                                            pppd.period_amount15),
                pppp.period16_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount16,
                                            120, -pppd.period_amount16,
                                            pppd.period_amount16),
                pppp.period17_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount17,
                                            120, -pppd.period_amount17,
                                            pppd.period_amount17),
                pppp.period18_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount18,
                                            120, -pppd.period_amount18,
                                            pppd.period_amount18),
                pppp.period19_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount19,
                                            120, -pppd.period_amount19,
                                            pppd.period_amount19),
                pppp.period20_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount20,
                                            120, -pppd.period_amount20,
                                            pppd.period_amount20),
                pppp.period21_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount21,
                                            120, -pppd.period_amount21,
                                            pppd.period_amount21),
                pppp.period22_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount22,
                                            120, -pppd.period_amount22,
                                            pppd.period_amount22),
                pppp.period23_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount23,
                                            120, -pppd.period_amount23,
                                            pppd.period_amount23),
                pppp.period24_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount24,
                                            120, -pppd.period_amount24,
                                            pppd.period_amount24),
                pppp.period25_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount25,
                                            120, -pppd.period_amount25,
                                            pppd.period_amount25),
                pppp.period26_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount26,
                                            120, -pppd.period_amount26,
                                            pppd.period_amount26),
                pppp.period27_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount27,
                                            120, -pppd.period_amount27,
                                            pppd.period_amount27),
                pppp.period28_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount28,
                                            120, -pppd.period_amount28,
                                            pppd.period_amount28),
                pppp.period29_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount29,
                                            120, -pppd.period_amount29,
                                            pppd.period_amount29),
                pppp.period30_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount30,
                                            120, -pppd.period_amount30,
                                            pppd.period_amount30),
                pppp.period31_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount31,
                                            120, -pppd.period_amount31,
                                            pppd.period_amount31),
                pppp.period32_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount32,
                                            120, -pppd.period_amount32,
                                            pppd.period_amount32),
                pppp.period33_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount33,
                                            120, -pppd.period_amount33,
                                            pppd.period_amount33),
                pppp.period34_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount34,
                                            120, -pppd.period_amount34,
                                            pppd.period_amount34),
                pppp.period35_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount35,
                                            120, -pppd.period_amount35,
                                            pppd.period_amount35),
                pppp.period36_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount36,
                                            120, -pppd.period_amount36,
                                            pppd.period_amount36),
                pppp.period37_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount37,
                                            120, -pppd.period_amount37,
                                            pppd.period_amount37),
                pppp.period38_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount38,
                                            120, -pppd.period_amount38,
                                            pppd.period_amount38),
                pppp.period39_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount39,
                                            120, -pppd.period_amount39,
                                            pppd.period_amount39),
                pppp.period40_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount40,
                                            120, -pppd.period_amount40,
                                            pppd.period_amount40),
                pppp.period41_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount41,
                                            120, -pppd.period_amount41,
                                            pppd.period_amount41),
                pppp.period42_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount42,
                                            120, -pppd.period_amount42,
                                            pppd.period_amount42),
                pppp.period43_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount43,
                                            120, -pppd.period_amount43,
                                            pppd.period_amount43),
                pppp.period44_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount44,
                                            120, -pppd.period_amount44,
                                            pppd.period_amount44),
                pppp.period45_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount45,
                                            120, -pppd.period_amount45,
                                            pppd.period_amount45),
                pppp.period46_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount46,
                                            120, -pppd.period_amount46,
                                            pppd.period_amount46),
                pppp.period47_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount47,
                                            120, -pppd.period_amount47,
                                            pppd.period_amount47),
                pppp.period48_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount48,
                                            120, -pppd.period_amount48,
                                            pppd.period_amount48),
                pppp.period49_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount49,
                                            120, -pppd.period_amount49,
                                            pppd.period_amount49),
                pppp.period50_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount50,
                                            120, -pppd.period_amount50,
                                            pppd.period_amount50),
                pppp.period51_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount51,
                                            120, -pppd.period_amount51,
                                            pppd.period_amount51),
                pppp.period52_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount52,
                                            120, -pppd.period_amount52,
                                            pppd.period_amount52),0))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
          pppd.amount_type_id = p_amount_type_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
	  pppd.currency_type = p_project_currency_type
    group by pppd.amount_type_id;
Line: 2809

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date5(),
                pppp.period1_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount1,
                                            120, -pppd.period_amount1,
                                            pppd.period_amount1),
                pppp.period2_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount2,
                                            120, -pppd.period_amount2,
                                            pppd.period_amount2),
		        pppp.period3_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount3,
                                            120, -pppd.period_amount3,
                                            pppd.period_amount3),
                pppp.period4_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount4,
                                            120, -pppd.period_amount4,
                                            pppd.period_amount4),
                pppp.period5_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount5,
                                            120, -pppd.period_amount5,
                                            pppd.period_amount5),
                pppp.period6_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount6,
                                            120, -pppd.period_amount6,
                                            pppd.period_amount6),
                pppp.period7_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount7,
                                            120, -pppd.period_amount7,
                                            pppd.period_amount7),
                pppp.period8_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount8,
                                            120, -pppd.period_amount8,
                                            pppd.period_amount8),
                pppp.period9_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount9,
                                            120, -pppd.period_amount9,
                                            pppd.period_amount9),
                pppp.period10_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount10,
                                            120, -pppd.period_amount10,
                                            pppd.period_amount10),
                pppp.period11_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount11,
                                            120, -pppd.period_amount11,
                                            pppd.period_amount11),
                pppp.period12_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount12,
                                            120, -pppd.period_amount12,
                                            pppd.period_amount12),
                pppp.period13_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount13,
                                            120, -pppd.period_amount13,
                                            pppd.period_amount13),
                pppp.period14_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount14,
                                            120, -pppd.period_amount14,
                                            pppd.period_amount14),
                pppp.period15_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount15,
                                            120, -pppd.period_amount15,
                                            pppd.period_amount15),
                pppp.period16_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount16,
                                            120, -pppd.period_amount16,
                                            pppd.period_amount16),
                pppp.period17_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount17,
                                            120, -pppd.period_amount17,
                                            pppd.period_amount17),
                pppp.period18_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount18,
                                            120, -pppd.period_amount18,
                                            pppd.period_amount18),
                pppp.period19_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount19,
                                            120, -pppd.period_amount19,
                                            pppd.period_amount19),
                pppp.period20_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount20,
                                            120, -pppd.period_amount20,
                                            pppd.period_amount20),
                pppp.period21_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount21,
                                            120, -pppd.period_amount21,
                                            pppd.period_amount21),
                pppp.period22_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount22,
                                            120, -pppd.period_amount22,
                                            pppd.period_amount22),
                pppp.period23_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount23,
                                            120, -pppd.period_amount23,
                                            pppd.period_amount23),
                pppp.period24_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount24,
                                            120, -pppd.period_amount24,
                                            pppd.period_amount24),
                pppp.period25_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount25,
                                            120, -pppd.period_amount25,
                                            pppd.period_amount25),
                pppp.period26_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount26,
                                            120, -pppd.period_amount26,
                                            pppd.period_amount26),
                pppp.period27_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount27,
                                            120, -pppd.period_amount27,
                                            pppd.period_amount27),
                pppp.period28_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount28,
                                            120, -pppd.period_amount28,
                                            pppd.period_amount28),
                pppp.period29_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount29,
                                            120, -pppd.period_amount29,
                                            pppd.period_amount29),
                pppp.period30_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount30,
                                            120, -pppd.period_amount30,
                                            pppd.period_amount30),
                pppp.period31_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount31,
                                            120, -pppd.period_amount31,
                                            pppd.period_amount31),
                pppp.period32_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount32,
                                            120, -pppd.period_amount32,
                                            pppd.period_amount32),
                pppp.period33_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount33,
                                            120, -pppd.period_amount33,
                                            pppd.period_amount33),
                pppp.period34_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount34,
                                            120, -pppd.period_amount34,
                                            pppd.period_amount34),
                pppp.period35_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount35,
                                            120, -pppd.period_amount35,
                                            pppd.period_amount35),
                pppp.period36_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount36,
                                            120, -pppd.period_amount36,
                                            pppd.period_amount36),
                pppp.period37_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount37,
                                            120, -pppd.period_amount37,
                                            pppd.period_amount37),
                pppp.period38_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount38,
                                            120, -pppd.period_amount38,
                                            pppd.period_amount38),
                pppp.period39_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount39,
                                            120, -pppd.period_amount39,
                                            pppd.period_amount39),
                pppp.period40_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount40,
                                            120, -pppd.period_amount40,
                                            pppd.period_amount40),
                pppp.period41_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount41,
                                            120, -pppd.period_amount41,
                                            pppd.period_amount41),
                pppp.period42_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount42,
                                            120, -pppd.period_amount42,
                                            pppd.period_amount42),
                pppp.period43_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount43,
                                            120, -pppd.period_amount43,
                                            pppd.period_amount43),
                pppp.period44_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount44,
                                            120, -pppd.period_amount44,
                                            pppd.period_amount44),
                pppp.period45_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount45,
                                            120, -pppd.period_amount45,
                                            pppd.period_amount45),
                pppp.period46_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount46,
                                            120, -pppd.period_amount46,
                                            pppd.period_amount46),
                pppp.period47_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount47,
                                            120, -pppd.period_amount47,
                                            pppd.period_amount47),
                pppp.period48_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount48,
                                            120, -pppd.period_amount48,
                                            pppd.period_amount48),
                pppp.period49_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount49,
                                            120, -pppd.period_amount49,
                                            pppd.period_amount49),
                pppp.period50_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount50,
                                            120, -pppd.period_amount50,
                                            pppd.period_amount50),
                pppp.period51_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount51,
                                            120, -pppd.period_amount51,
                                            pppd.period_amount51),
                pppp.period52_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount52,
                                            120, -pppd.period_amount52,
                                            pppd.period_amount52),0))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
          pppd.amount_type_id = p_amount_type_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
	  pppd.currency_type = p_project_currency_type
    group by pppd.amount_type_id;
Line: 3029

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date6(),
                pppp.period1_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount1,
                                            120, -pppd.period_amount1,
                                            pppd.period_amount1),
                pppp.period2_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount2,
                                            120, -pppd.period_amount2,
                                            pppd.period_amount2),
		        pppp.period3_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount3,
                                            120, -pppd.period_amount3,
                                            pppd.period_amount3),
                pppp.period4_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount4,
                                            120, -pppd.period_amount4,
                                            pppd.period_amount4),
                pppp.period5_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount5,
                                            120, -pppd.period_amount5,
                                            pppd.period_amount5),
                pppp.period6_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount6,
                                            120, -pppd.period_amount6,
                                            pppd.period_amount6),
                pppp.period7_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount7,
                                            120, -pppd.period_amount7,
                                            pppd.period_amount7),
                pppp.period8_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount8,
                                            120, -pppd.period_amount8,
                                            pppd.period_amount8),
                pppp.period9_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount9,
                                            120, -pppd.period_amount9,
                                            pppd.period_amount9),
                pppp.period10_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount10,
                                            120, -pppd.period_amount10,
                                            pppd.period_amount10),
                pppp.period11_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount11,
                                            120, -pppd.period_amount11,
                                            pppd.period_amount11),
                pppp.period12_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount12,
                                            120, -pppd.period_amount12,
                                            pppd.period_amount12),
                pppp.period13_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount13,
                                            120, -pppd.period_amount13,
                                            pppd.period_amount13),
                pppp.period14_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount14,
                                            120, -pppd.period_amount14,
                                            pppd.period_amount14),
                pppp.period15_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount15,
                                            120, -pppd.period_amount15,
                                            pppd.period_amount15),
                pppp.period16_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount16,
                                            120, -pppd.period_amount16,
                                            pppd.period_amount16),
                pppp.period17_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount17,
                                            120, -pppd.period_amount17,
                                            pppd.period_amount17),
                pppp.period18_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount18,
                                            120, -pppd.period_amount18,
                                            pppd.period_amount18),
                pppp.period19_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount19,
                                            120, -pppd.period_amount19,
                                            pppd.period_amount19),
                pppp.period20_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount20,
                                            120, -pppd.period_amount20,
                                            pppd.period_amount20),
                pppp.period21_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount21,
                                            120, -pppd.period_amount21,
                                            pppd.period_amount21),
                pppp.period22_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount22,
                                            120, -pppd.period_amount22,
                                            pppd.period_amount22),
                pppp.period23_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount23,
                                            120, -pppd.period_amount23,
                                            pppd.period_amount23),
                pppp.period24_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount24,
                                            120, -pppd.period_amount24,
                                            pppd.period_amount24),
                pppp.period25_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount25,
                                            120, -pppd.period_amount25,
                                            pppd.period_amount25),
                pppp.period26_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount26,
                                            120, -pppd.period_amount26,
                                            pppd.period_amount26),
                pppp.period27_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount27,
                                            120, -pppd.period_amount27,
                                            pppd.period_amount27),
                pppp.period28_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount28,
                                            120, -pppd.period_amount28,
                                            pppd.period_amount28),
                pppp.period29_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount29,
                                            120, -pppd.period_amount29,
                                            pppd.period_amount29),
                pppp.period30_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount30,
                                            120, -pppd.period_amount30,
                                            pppd.period_amount30),
                pppp.period31_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount31,
                                            120, -pppd.period_amount31,
                                            pppd.period_amount31),
                pppp.period32_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount32,
                                            120, -pppd.period_amount32,
                                            pppd.period_amount32),
                pppp.period33_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount33,
                                            120, -pppd.period_amount33,
                                            pppd.period_amount33),
                pppp.period34_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount34,
                                            120, -pppd.period_amount34,
                                            pppd.period_amount34),
                pppp.period35_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount35,
                                            120, -pppd.period_amount35,
                                            pppd.period_amount35),
                pppp.period36_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount36,
                                            120, -pppd.period_amount36,
                                            pppd.period_amount36),
                pppp.period37_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount37,
                                            120, -pppd.period_amount37,
                                            pppd.period_amount37),
                pppp.period38_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount38,
                                            120, -pppd.period_amount38,
                                            pppd.period_amount38),
                pppp.period39_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount39,
                                            120, -pppd.period_amount39,
                                            pppd.period_amount39),
                pppp.period40_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount40,
                                            120, -pppd.period_amount40,
                                            pppd.period_amount40),
                pppp.period41_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount41,
                                            120, -pppd.period_amount41,
                                            pppd.period_amount41),
                pppp.period42_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount42,
                                            120, -pppd.period_amount42,
                                            pppd.period_amount42),
                pppp.period43_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount43,
                                            120, -pppd.period_amount43,
                                            pppd.period_amount43),
                pppp.period44_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount44,
                                            120, -pppd.period_amount44,
                                            pppd.period_amount44),
                pppp.period45_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount45,
                                            120, -pppd.period_amount45,
                                            pppd.period_amount45),
                pppp.period46_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount46,
                                            120, -pppd.period_amount46,
                                            pppd.period_amount46),
                pppp.period47_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount47,
                                            120, -pppd.period_amount47,
                                            pppd.period_amount47),
                pppp.period48_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount48,
                                            120, -pppd.period_amount48,
                                            pppd.period_amount48),
                pppp.period49_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount49,
                                            120, -pppd.period_amount49,
                                            pppd.period_amount49),
                pppp.period50_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount50,
                                            120, -pppd.period_amount50,
                                            pppd.period_amount50),
                pppp.period51_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount51,
                                            120, -pppd.period_amount51,
                                            pppd.period_amount51),
                pppp.period52_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount52,
                                            120, -pppd.period_amount52,
                                            pppd.period_amount52),0))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
          pppd.amount_type_id = p_amount_type_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
	  pppd.currency_type = p_project_currency_type
    group by pppd.amount_type_id;
Line: 3249

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date7(),
                pppp.period1_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount1,
                                            120, -pppd.period_amount1,
                                            pppd.period_amount1),
                pppp.period2_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount2,
                                            120, -pppd.period_amount2,
                                            pppd.period_amount2),
		        pppp.period3_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount3,
                                            120, -pppd.period_amount3,
                                            pppd.period_amount3),
                pppp.period4_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount4,
                                            120, -pppd.period_amount4,
                                            pppd.period_amount4),
                pppp.period5_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount5,
                                            120, -pppd.period_amount5,
                                            pppd.period_amount5),
                pppp.period6_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount6,
                                            120, -pppd.period_amount6,
                                            pppd.period_amount6),
                pppp.period7_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount7,
                                            120, -pppd.period_amount7,
                                            pppd.period_amount7),
                pppp.period8_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount8,
                                            120, -pppd.period_amount8,
                                            pppd.period_amount8),
                pppp.period9_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount9,
                                            120, -pppd.period_amount9,
                                            pppd.period_amount9),
                pppp.period10_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount10,
                                            120, -pppd.period_amount10,
                                            pppd.period_amount10),
                pppp.period11_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount11,
                                            120, -pppd.period_amount11,
                                            pppd.period_amount11),
                pppp.period12_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount12,
                                            120, -pppd.period_amount12,
                                            pppd.period_amount12),
                pppp.period13_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount13,
                                            120, -pppd.period_amount13,
                                            pppd.period_amount13),
                pppp.period14_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount14,
                                            120, -pppd.period_amount14,
                                            pppd.period_amount14),
                pppp.period15_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount15,
                                            120, -pppd.period_amount15,
                                            pppd.period_amount15),
                pppp.period16_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount16,
                                            120, -pppd.period_amount16,
                                            pppd.period_amount16),
                pppp.period17_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount17,
                                            120, -pppd.period_amount17,
                                            pppd.period_amount17),
                pppp.period18_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount18,
                                            120, -pppd.period_amount18,
                                            pppd.period_amount18),
                pppp.period19_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount19,
                                            120, -pppd.period_amount19,
                                            pppd.period_amount19),
                pppp.period20_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount20,
                                            120, -pppd.period_amount20,
                                            pppd.period_amount20),
                pppp.period21_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount21,
                                            120, -pppd.period_amount21,
                                            pppd.period_amount21),
                pppp.period22_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount22,
                                            120, -pppd.period_amount22,
                                            pppd.period_amount22),
                pppp.period23_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount23,
                                            120, -pppd.period_amount23,
                                            pppd.period_amount23),
                pppp.period24_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount24,
                                            120, -pppd.period_amount24,
                                            pppd.period_amount24),
                pppp.period25_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount25,
                                            120, -pppd.period_amount25,
                                            pppd.period_amount25),
                pppp.period26_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount26,
                                            120, -pppd.period_amount26,
                                            pppd.period_amount26),
                pppp.period27_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount27,
                                            120, -pppd.period_amount27,
                                            pppd.period_amount27),
                pppp.period28_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount28,
                                            120, -pppd.period_amount28,
                                            pppd.period_amount28),
                pppp.period29_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount29,
                                            120, -pppd.period_amount29,
                                            pppd.period_amount29),
                pppp.period30_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount30,
                                            120, -pppd.period_amount30,
                                            pppd.period_amount30),
                pppp.period31_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount31,
                                            120, -pppd.period_amount31,
                                            pppd.period_amount31),
                pppp.period32_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount32,
                                            120, -pppd.period_amount32,
                                            pppd.period_amount32),
                pppp.period33_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount33,
                                            120, -pppd.period_amount33,
                                            pppd.period_amount33),
                pppp.period34_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount34,
                                            120, -pppd.period_amount34,
                                            pppd.period_amount34),
                pppp.period35_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount35,
                                            120, -pppd.period_amount35,
                                            pppd.period_amount35),
                pppp.period36_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount36,
                                            120, -pppd.period_amount36,
                                            pppd.period_amount36),
                pppp.period37_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount37,
                                            120, -pppd.period_amount37,
                                            pppd.period_amount37),
                pppp.period38_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount38,
                                            120, -pppd.period_amount38,
                                            pppd.period_amount38),
                pppp.period39_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount39,
                                            120, -pppd.period_amount39,
                                            pppd.period_amount39),
                pppp.period40_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount40,
                                            120, -pppd.period_amount40,
                                            pppd.period_amount40),
                pppp.period41_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount41,
                                            120, -pppd.period_amount41,
                                            pppd.period_amount41),
                pppp.period42_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount42,
                                            120, -pppd.period_amount42,
                                            pppd.period_amount42),
                pppp.period43_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount43,
                                            120, -pppd.period_amount43,
                                            pppd.period_amount43),
                pppp.period44_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount44,
                                            120, -pppd.period_amount44,
                                            pppd.period_amount44),
                pppp.period45_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount45,
                                            120, -pppd.period_amount45,
                                            pppd.period_amount45),
                pppp.period46_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount46,
                                            120, -pppd.period_amount46,
                                            pppd.period_amount46),
                pppp.period47_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount47,
                                            120, -pppd.period_amount47,
                                            pppd.period_amount47),
                pppp.period48_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount48,
                                            120, -pppd.period_amount48,
                                            pppd.period_amount48),
                pppp.period49_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount49,
                                            120, -pppd.period_amount49,
                                            pppd.period_amount49),
                pppp.period50_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount50,
                                            120, -pppd.period_amount50,
                                            pppd.period_amount50),
                pppp.period51_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount51,
                                            120, -pppd.period_amount51,
                                            pppd.period_amount51),
                pppp.period52_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount52,
                                            120, -pppd.period_amount52,
                                            pppd.period_amount52),0))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
          pppd.amount_type_id = p_amount_type_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
	  pppd.currency_type = p_project_currency_type
    group by pppd.amount_type_id;
Line: 3469

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date8(),
                pppp.period1_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount1,
                                            120, -pppd.period_amount1,
                                            pppd.period_amount1),
                pppp.period2_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount2,
                                            120, -pppd.period_amount2,
                                            pppd.period_amount2),
		        pppp.period3_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount3,
                                            120, -pppd.period_amount3,
                                            pppd.period_amount3),
                pppp.period4_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount4,
                                            120, -pppd.period_amount4,
                                            pppd.period_amount4),
                pppp.period5_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount5,
                                            120, -pppd.period_amount5,
                                            pppd.period_amount5),
                pppp.period6_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount6,
                                            120, -pppd.period_amount6,
                                            pppd.period_amount6),
                pppp.period7_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount7,
                                            120, -pppd.period_amount7,
                                            pppd.period_amount7),
                pppp.period8_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount8,
                                            120, -pppd.period_amount8,
                                            pppd.period_amount8),
                pppp.period9_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount9,
                                            120, -pppd.period_amount9,
                                            pppd.period_amount9),
                pppp.period10_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount10,
                                            120, -pppd.period_amount10,
                                            pppd.period_amount10),
                pppp.period11_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount11,
                                            120, -pppd.period_amount11,
                                            pppd.period_amount11),
                pppp.period12_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount12,
                                            120, -pppd.period_amount12,
                                            pppd.period_amount12),
                pppp.period13_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount13,
                                            120, -pppd.period_amount13,
                                            pppd.period_amount13),
                pppp.period14_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount14,
                                            120, -pppd.period_amount14,
                                            pppd.period_amount14),
                pppp.period15_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount15,
                                            120, -pppd.period_amount15,
                                            pppd.period_amount15),
                pppp.period16_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount16,
                                            120, -pppd.period_amount16,
                                            pppd.period_amount16),
                pppp.period17_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount17,
                                            120, -pppd.period_amount17,
                                            pppd.period_amount17),
                pppp.period18_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount18,
                                            120, -pppd.period_amount18,
                                            pppd.period_amount18),
                pppp.period19_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount19,
                                            120, -pppd.period_amount19,
                                            pppd.period_amount19),
                pppp.period20_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount20,
                                            120, -pppd.period_amount20,
                                            pppd.period_amount20),
                pppp.period21_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount21,
                                            120, -pppd.period_amount21,
                                            pppd.period_amount21),
                pppp.period22_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount22,
                                            120, -pppd.period_amount22,
                                            pppd.period_amount22),
                pppp.period23_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount23,
                                            120, -pppd.period_amount23,
                                            pppd.period_amount23),
                pppp.period24_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount24,
                                            120, -pppd.period_amount24,
                                            pppd.period_amount24),
                pppp.period25_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount25,
                                            120, -pppd.period_amount25,
                                            pppd.period_amount25),
                pppp.period26_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount26,
                                            120, -pppd.period_amount26,
                                            pppd.period_amount26),
                pppp.period27_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount27,
                                            120, -pppd.period_amount27,
                                            pppd.period_amount27),
                pppp.period28_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount28,
                                            120, -pppd.period_amount28,
                                            pppd.period_amount28),
                pppp.period29_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount29,
                                            120, -pppd.period_amount29,
                                            pppd.period_amount29),
                pppp.period30_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount30,
                                            120, -pppd.period_amount30,
                                            pppd.period_amount30),
                pppp.period31_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount31,
                                            120, -pppd.period_amount31,
                                            pppd.period_amount31),
                pppp.period32_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount32,
                                            120, -pppd.period_amount32,
                                            pppd.period_amount32),
                pppp.period33_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount33,
                                            120, -pppd.period_amount33,
                                            pppd.period_amount33),
                pppp.period34_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount34,
                                            120, -pppd.period_amount34,
                                            pppd.period_amount34),
                pppp.period35_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount35,
                                            120, -pppd.period_amount35,
                                            pppd.period_amount35),
                pppp.period36_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount36,
                                            120, -pppd.period_amount36,
                                            pppd.period_amount36),
                pppp.period37_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount37,
                                            120, -pppd.period_amount37,
                                            pppd.period_amount37),
                pppp.period38_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount38,
                                            120, -pppd.period_amount38,
                                            pppd.period_amount38),
                pppp.period39_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount39,
                                            120, -pppd.period_amount39,
                                            pppd.period_amount39),
                pppp.period40_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount40,
                                            120, -pppd.period_amount40,
                                            pppd.period_amount40),
                pppp.period41_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount41,
                                            120, -pppd.period_amount41,
                                            pppd.period_amount41),
                pppp.period42_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount42,
                                            120, -pppd.period_amount42,
                                            pppd.period_amount42),
                pppp.period43_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount43,
                                            120, -pppd.period_amount43,
                                            pppd.period_amount43),
                pppp.period44_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount44,
                                            120, -pppd.period_amount44,
                                            pppd.period_amount44),
                pppp.period45_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount45,
                                            120, -pppd.period_amount45,
                                            pppd.period_amount45),
                pppp.period46_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount46,
                                            120, -pppd.period_amount46,
                                            pppd.period_amount46),
                pppp.period47_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount47,
                                            120, -pppd.period_amount47,
                                            pppd.period_amount47),
                pppp.period48_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount48,
                                            120, -pppd.period_amount48,
                                            pppd.period_amount48),
                pppp.period49_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount49,
                                            120, -pppd.period_amount49,
                                            pppd.period_amount49),
                pppp.period50_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount50,
                                            120, -pppd.period_amount50,
                                            pppd.period_amount50),
                pppp.period51_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount51,
                                            120, -pppd.period_amount51,
                                            pppd.period_amount51),
                pppp.period52_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount52,
                                            120, -pppd.period_amount52,
                                            pppd.period_amount52),0))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
          pppd.amount_type_id = p_amount_type_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
	  pppd.currency_type = p_project_currency_type
    group by pppd.amount_type_id;
Line: 3689

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date9(),
                pppp.period1_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount1,
                                            120, -pppd.period_amount1,
                                            pppd.period_amount1),
                pppp.period2_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount2,
                                            120, -pppd.period_amount2,
                                            pppd.period_amount2),
		        pppp.period3_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount3,
                                            120, -pppd.period_amount3,
                                            pppd.period_amount3),
                pppp.period4_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount4,
                                            120, -pppd.period_amount4,
                                            pppd.period_amount4),
                pppp.period5_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount5,
                                            120, -pppd.period_amount5,
                                            pppd.period_amount5),
                pppp.period6_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount6,
                                            120, -pppd.period_amount6,
                                            pppd.period_amount6),
                pppp.period7_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount7,
                                            120, -pppd.period_amount7,
                                            pppd.period_amount7),
                pppp.period8_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount8,
                                            120, -pppd.period_amount8,
                                            pppd.period_amount8),
                pppp.period9_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount9,
                                            120, -pppd.period_amount9,
                                            pppd.period_amount9),
                pppp.period10_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount10,
                                            120, -pppd.period_amount10,
                                            pppd.period_amount10),
                pppp.period11_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount11,
                                            120, -pppd.period_amount11,
                                            pppd.period_amount11),
                pppp.period12_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount12,
                                            120, -pppd.period_amount12,
                                            pppd.period_amount12),
                pppp.period13_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount13,
                                            120, -pppd.period_amount13,
                                            pppd.period_amount13),
                pppp.period14_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount14,
                                            120, -pppd.period_amount14,
                                            pppd.period_amount14),
                pppp.period15_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount15,
                                            120, -pppd.period_amount15,
                                            pppd.period_amount15),
                pppp.period16_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount16,
                                            120, -pppd.period_amount16,
                                            pppd.period_amount16),
                pppp.period17_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount17,
                                            120, -pppd.period_amount17,
                                            pppd.period_amount17),
                pppp.period18_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount18,
                                            120, -pppd.period_amount18,
                                            pppd.period_amount18),
                pppp.period19_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount19,
                                            120, -pppd.period_amount19,
                                            pppd.period_amount19),
                pppp.period20_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount20,
                                            120, -pppd.period_amount20,
                                            pppd.period_amount20),
                pppp.period21_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount21,
                                            120, -pppd.period_amount21,
                                            pppd.period_amount21),
                pppp.period22_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount22,
                                            120, -pppd.period_amount22,
                                            pppd.period_amount22),
                pppp.period23_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount23,
                                            120, -pppd.period_amount23,
                                            pppd.period_amount23),
                pppp.period24_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount24,
                                            120, -pppd.period_amount24,
                                            pppd.period_amount24),
                pppp.period25_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount25,
                                            120, -pppd.period_amount25,
                                            pppd.period_amount25),
                pppp.period26_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount26,
                                            120, -pppd.period_amount26,
                                            pppd.period_amount26),
                pppp.period27_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount27,
                                            120, -pppd.period_amount27,
                                            pppd.period_amount27),
                pppp.period28_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount28,
                                            120, -pppd.period_amount28,
                                            pppd.period_amount28),
                pppp.period29_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount29,
                                            120, -pppd.period_amount29,
                                            pppd.period_amount29),
                pppp.period30_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount30,
                                            120, -pppd.period_amount30,
                                            pppd.period_amount30),
                pppp.period31_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount31,
                                            120, -pppd.period_amount31,
                                            pppd.period_amount31),
                pppp.period32_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount32,
                                            120, -pppd.period_amount32,
                                            pppd.period_amount32),
                pppp.period33_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount33,
                                            120, -pppd.period_amount33,
                                            pppd.period_amount33),
                pppp.period34_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount34,
                                            120, -pppd.period_amount34,
                                            pppd.period_amount34),
                pppp.period35_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount35,
                                            120, -pppd.period_amount35,
                                            pppd.period_amount35),
                pppp.period36_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount36,
                                            120, -pppd.period_amount36,
                                            pppd.period_amount36),
                pppp.period37_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount37,
                                            120, -pppd.period_amount37,
                                            pppd.period_amount37),
                pppp.period38_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount38,
                                            120, -pppd.period_amount38,
                                            pppd.period_amount38),
                pppp.period39_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount39,
                                            120, -pppd.period_amount39,
                                            pppd.period_amount39),
                pppp.period40_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount40,
                                            120, -pppd.period_amount40,
                                            pppd.period_amount40),
                pppp.period41_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount41,
                                            120, -pppd.period_amount41,
                                            pppd.period_amount41),
                pppp.period42_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount42,
                                            120, -pppd.period_amount42,
                                            pppd.period_amount42),
                pppp.period43_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount43,
                                            120, -pppd.period_amount43,
                                            pppd.period_amount43),
                pppp.period44_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount44,
                                            120, -pppd.period_amount44,
                                            pppd.period_amount44),
                pppp.period45_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount45,
                                            120, -pppd.period_amount45,
                                            pppd.period_amount45),
                pppp.period46_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount46,
                                            120, -pppd.period_amount46,
                                            pppd.period_amount46),
                pppp.period47_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount47,
                                            120, -pppd.period_amount47,
                                            pppd.period_amount47),
                pppp.period48_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount48,
                                            120, -pppd.period_amount48,
                                            pppd.period_amount48),
                pppp.period49_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount49,
                                            120, -pppd.period_amount49,
                                            pppd.period_amount49),
                pppp.period50_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount50,
                                            120, -pppd.period_amount50,
                                            pppd.period_amount50),
                pppp.period51_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount51,
                                            120, -pppd.period_amount51,
                                            pppd.period_amount51),
                pppp.period52_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount52,
                                            120, -pppd.period_amount52,
                                            pppd.period_amount52),0))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
          pppd.amount_type_id = p_amount_type_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
	  pppd.currency_type = p_project_currency_type
    group by pppd.amount_type_id;
Line: 3909

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date10(),
                pppp.period1_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount1,
                                            120, -pppd.period_amount1,
                                            pppd.period_amount1),
                pppp.period2_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount2,
                                            120, -pppd.period_amount2,
                                            pppd.period_amount2),
		        pppp.period3_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount3,
                                            120, -pppd.period_amount3,
                                            pppd.period_amount3),
                pppp.period4_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount4,
                                            120, -pppd.period_amount4,
                                            pppd.period_amount4),
                pppp.period5_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount5,
                                            120, -pppd.period_amount5,
                                            pppd.period_amount5),
                pppp.period6_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount6,
                                            120, -pppd.period_amount6,
                                            pppd.period_amount6),
                pppp.period7_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount7,
                                            120, -pppd.period_amount7,
                                            pppd.period_amount7),
                pppp.period8_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount8,
                                            120, -pppd.period_amount8,
                                            pppd.period_amount8),
                pppp.period9_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount9,
                                            120, -pppd.period_amount9,
                                            pppd.period_amount9),
                pppp.period10_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount10,
                                            120, -pppd.period_amount10,
                                            pppd.period_amount10),
                pppp.period11_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount11,
                                            120, -pppd.period_amount11,
                                            pppd.period_amount11),
                pppp.period12_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount12,
                                            120, -pppd.period_amount12,
                                            pppd.period_amount12),
                pppp.period13_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount13,
                                            120, -pppd.period_amount13,
                                            pppd.period_amount13),
                pppp.period14_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount14,
                                            120, -pppd.period_amount14,
                                            pppd.period_amount14),
                pppp.period15_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount15,
                                            120, -pppd.period_amount15,
                                            pppd.period_amount15),
                pppp.period16_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount16,
                                            120, -pppd.period_amount16,
                                            pppd.period_amount16),
                pppp.period17_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount17,
                                            120, -pppd.period_amount17,
                                            pppd.period_amount17),
                pppp.period18_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount18,
                                            120, -pppd.period_amount18,
                                            pppd.period_amount18),
                pppp.period19_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount19,
                                            120, -pppd.period_amount19,
                                            pppd.period_amount19),
                pppp.period20_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount20,
                                            120, -pppd.period_amount20,
                                            pppd.period_amount20),
                pppp.period21_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount21,
                                            120, -pppd.period_amount21,
                                            pppd.period_amount21),
                pppp.period22_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount22,
                                            120, -pppd.period_amount22,
                                            pppd.period_amount22),
                pppp.period23_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount23,
                                            120, -pppd.period_amount23,
                                            pppd.period_amount23),
                pppp.period24_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount24,
                                            120, -pppd.period_amount24,
                                            pppd.period_amount24),
                pppp.period25_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount25,
                                            120, -pppd.period_amount25,
                                            pppd.period_amount25),
                pppp.period26_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount26,
                                            120, -pppd.period_amount26,
                                            pppd.period_amount26),
                pppp.period27_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount27,
                                            120, -pppd.period_amount27,
                                            pppd.period_amount27),
                pppp.period28_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount28,
                                            120, -pppd.period_amount28,
                                            pppd.period_amount28),
                pppp.period29_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount29,
                                            120, -pppd.period_amount29,
                                            pppd.period_amount29),
                pppp.period30_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount30,
                                            120, -pppd.period_amount30,
                                            pppd.period_amount30),
                pppp.period31_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount31,
                                            120, -pppd.period_amount31,
                                            pppd.period_amount31),
                pppp.period32_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount32,
                                            120, -pppd.period_amount32,
                                            pppd.period_amount32),
                pppp.period33_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount33,
                                            120, -pppd.period_amount33,
                                            pppd.period_amount33),
                pppp.period34_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount34,
                                            120, -pppd.period_amount34,
                                            pppd.period_amount34),
                pppp.period35_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount35,
                                            120, -pppd.period_amount35,
                                            pppd.period_amount35),
                pppp.period36_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount36,
                                            120, -pppd.period_amount36,
                                            pppd.period_amount36),
                pppp.period37_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount37,
                                            120, -pppd.period_amount37,
                                            pppd.period_amount37),
                pppp.period38_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount38,
                                            120, -pppd.period_amount38,
                                            pppd.period_amount38),
                pppp.period39_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount39,
                                            120, -pppd.period_amount39,
                                            pppd.period_amount39),
                pppp.period40_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount40,
                                            120, -pppd.period_amount40,
                                            pppd.period_amount40),
                pppp.period41_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount41,
                                            120, -pppd.period_amount41,
                                            pppd.period_amount41),
                pppp.period42_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount42,
                                            120, -pppd.period_amount42,
                                            pppd.period_amount42),
                pppp.period43_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount43,
                                            120, -pppd.period_amount43,
                                            pppd.period_amount43),
                pppp.period44_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount44,
                                            120, -pppd.period_amount44,
                                            pppd.period_amount44),
                pppp.period45_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount45,
                                            120, -pppd.period_amount45,
                                            pppd.period_amount45),
                pppp.period46_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount46,
                                            120, -pppd.period_amount46,
                                            pppd.period_amount46),
                pppp.period47_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount47,
                                            120, -pppd.period_amount47,
                                            pppd.period_amount47),
                pppp.period48_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount48,
                                            120, -pppd.period_amount48,
                                            pppd.period_amount48),
                pppp.period49_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount49,
                                            120, -pppd.period_amount49,
                                            pppd.period_amount49),
                pppp.period50_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount50,
                                            120, -pppd.period_amount50,
                                            pppd.period_amount50),
                pppp.period51_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount51,
                                            120, -pppd.period_amount51,
                                            pppd.period_amount51),
                pppp.period52_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount52,
                                            120, -pppd.period_amount52,
                                            pppd.period_amount52),0))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
          pppd.amount_type_id = p_amount_type_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
	  pppd.currency_type = p_project_currency_type
    group by pppd.amount_type_id;
Line: 4129

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date11(),
                pppp.period1_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount1,
                                            120, -pppd.period_amount1,
                                            pppd.period_amount1),
                pppp.period2_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount2,
                                            120, -pppd.period_amount2,
                                            pppd.period_amount2),
		        pppp.period3_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount3,
                                            120, -pppd.period_amount3,
                                            pppd.period_amount3),
                pppp.period4_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount4,
                                            120, -pppd.period_amount4,
                                            pppd.period_amount4),
                pppp.period5_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount5,
                                            120, -pppd.period_amount5,
                                            pppd.period_amount5),
                pppp.period6_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount6,
                                            120, -pppd.period_amount6,
                                            pppd.period_amount6),
                pppp.period7_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount7,
                                            120, -pppd.period_amount7,
                                            pppd.period_amount7),
                pppp.period8_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount8,
                                            120, -pppd.period_amount8,
                                            pppd.period_amount8),
                pppp.period9_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount9,
                                            120, -pppd.period_amount9,
                                            pppd.period_amount9),
                pppp.period10_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount10,
                                            120, -pppd.period_amount10,
                                            pppd.period_amount10),
                pppp.period11_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount11,
                                            120, -pppd.period_amount11,
                                            pppd.period_amount11),
                pppp.period12_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount12,
                                            120, -pppd.period_amount12,
                                            pppd.period_amount12),
                pppp.period13_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount13,
                                            120, -pppd.period_amount13,
                                            pppd.period_amount13),
                pppp.period14_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount14,
                                            120, -pppd.period_amount14,
                                            pppd.period_amount14),
                pppp.period15_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount15,
                                            120, -pppd.period_amount15,
                                            pppd.period_amount15),
                pppp.period16_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount16,
                                            120, -pppd.period_amount16,
                                            pppd.period_amount16),
                pppp.period17_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount17,
                                            120, -pppd.period_amount17,
                                            pppd.period_amount17),
                pppp.period18_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount18,
                                            120, -pppd.period_amount18,
                                            pppd.period_amount18),
                pppp.period19_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount19,
                                            120, -pppd.period_amount19,
                                            pppd.period_amount19),
                pppp.period20_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount20,
                                            120, -pppd.period_amount20,
                                            pppd.period_amount20),
                pppp.period21_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount21,
                                            120, -pppd.period_amount21,
                                            pppd.period_amount21),
                pppp.period22_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount22,
                                            120, -pppd.period_amount22,
                                            pppd.period_amount22),
                pppp.period23_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount23,
                                            120, -pppd.period_amount23,
                                            pppd.period_amount23),
                pppp.period24_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount24,
                                            120, -pppd.period_amount24,
                                            pppd.period_amount24),
                pppp.period25_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount25,
                                            120, -pppd.period_amount25,
                                            pppd.period_amount25),
                pppp.period26_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount26,
                                            120, -pppd.period_amount26,
                                            pppd.period_amount26),
                pppp.period27_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount27,
                                            120, -pppd.period_amount27,
                                            pppd.period_amount27),
                pppp.period28_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount28,
                                            120, -pppd.period_amount28,
                                            pppd.period_amount28),
                pppp.period29_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount29,
                                            120, -pppd.period_amount29,
                                            pppd.period_amount29),
                pppp.period30_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount30,
                                            120, -pppd.period_amount30,
                                            pppd.period_amount30),
                pppp.period31_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount31,
                                            120, -pppd.period_amount31,
                                            pppd.period_amount31),
                pppp.period32_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount32,
                                            120, -pppd.period_amount32,
                                            pppd.period_amount32),
                pppp.period33_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount33,
                                            120, -pppd.period_amount33,
                                            pppd.period_amount33),
                pppp.period34_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount34,
                                            120, -pppd.period_amount34,
                                            pppd.period_amount34),
                pppp.period35_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount35,
                                            120, -pppd.period_amount35,
                                            pppd.period_amount35),
                pppp.period36_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount36,
                                            120, -pppd.period_amount36,
                                            pppd.period_amount36),
                pppp.period37_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount37,
                                            120, -pppd.period_amount37,
                                            pppd.period_amount37),
                pppp.period38_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount38,
                                            120, -pppd.period_amount38,
                                            pppd.period_amount38),
                pppp.period39_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount39,
                                            120, -pppd.period_amount39,
                                            pppd.period_amount39),
                pppp.period40_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount40,
                                            120, -pppd.period_amount40,
                                            pppd.period_amount40),
                pppp.period41_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount41,
                                            120, -pppd.period_amount41,
                                            pppd.period_amount41),
                pppp.period42_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount42,
                                            120, -pppd.period_amount42,
                                            pppd.period_amount42),
                pppp.period43_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount43,
                                            120, -pppd.period_amount43,
                                            pppd.period_amount43),
                pppp.period44_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount44,
                                            120, -pppd.period_amount44,
                                            pppd.period_amount44),
                pppp.period45_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount45,
                                            120, -pppd.period_amount45,
                                            pppd.period_amount45),
                pppp.period46_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount46,
                                            120, -pppd.period_amount46,
                                            pppd.period_amount46),
                pppp.period47_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount47,
                                            120, -pppd.period_amount47,
                                            pppd.period_amount47),
                pppp.period48_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount48,
                                            120, -pppd.period_amount48,
                                            pppd.period_amount48),
                pppp.period49_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount49,
                                            120, -pppd.period_amount49,
                                            pppd.period_amount49),
                pppp.period50_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount50,
                                            120, -pppd.period_amount50,
                                            pppd.period_amount50),
                pppp.period51_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount51,
                                            120, -pppd.period_amount51,
                                            pppd.period_amount51),
                pppp.period52_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount52,
                                            120, -pppd.period_amount52,
                                            pppd.period_amount52),0))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
          pppd.amount_type_id = p_amount_type_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
	  pppd.currency_type = p_project_currency_type
    group by pppd.amount_type_id;
Line: 4349

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date12(),
                pppp.period1_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount1,
                                            120, -pppd.period_amount1,
                                            pppd.period_amount1),
                pppp.period2_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount2,
                                            120, -pppd.period_amount2,
                                            pppd.period_amount2),
		        pppp.period3_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount3,
                                            120, -pppd.period_amount3,
                                            pppd.period_amount3),
                pppp.period4_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount4,
                                            120, -pppd.period_amount4,
                                            pppd.period_amount4),
                pppp.period5_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount5,
                                            120, -pppd.period_amount5,
                                            pppd.period_amount5),
                pppp.period6_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount6,
                                            120, -pppd.period_amount6,
                                            pppd.period_amount6),
                pppp.period7_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount7,
                                            120, -pppd.period_amount7,
                                            pppd.period_amount7),
                pppp.period8_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount8,
                                            120, -pppd.period_amount8,
                                            pppd.period_amount8),
                pppp.period9_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount9,
                                            120, -pppd.period_amount9,
                                            pppd.period_amount9),
                pppp.period10_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount10,
                                            120, -pppd.period_amount10,
                                            pppd.period_amount10),
                pppp.period11_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount11,
                                            120, -pppd.period_amount11,
                                            pppd.period_amount11),
                pppp.period12_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount12,
                                            120, -pppd.period_amount12,
                                            pppd.period_amount12),
                pppp.period13_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount13,
                                            120, -pppd.period_amount13,
                                            pppd.period_amount13),
                pppp.period14_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount14,
                                            120, -pppd.period_amount14,
                                            pppd.period_amount14),
                pppp.period15_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount15,
                                            120, -pppd.period_amount15,
                                            pppd.period_amount15),
                pppp.period16_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount16,
                                            120, -pppd.period_amount16,
                                            pppd.period_amount16),
                pppp.period17_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount17,
                                            120, -pppd.period_amount17,
                                            pppd.period_amount17),
                pppp.period18_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount18,
                                            120, -pppd.period_amount18,
                                            pppd.period_amount18),
                pppp.period19_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount19,
                                            120, -pppd.period_amount19,
                                            pppd.period_amount19),
                pppp.period20_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount20,
                                            120, -pppd.period_amount20,
                                            pppd.period_amount20),
                pppp.period21_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount21,
                                            120, -pppd.period_amount21,
                                            pppd.period_amount21),
                pppp.period22_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount22,
                                            120, -pppd.period_amount22,
                                            pppd.period_amount22),
                pppp.period23_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount23,
                                            120, -pppd.period_amount23,
                                            pppd.period_amount23),
                pppp.period24_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount24,
                                            120, -pppd.period_amount24,
                                            pppd.period_amount24),
                pppp.period25_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount25,
                                            120, -pppd.period_amount25,
                                            pppd.period_amount25),
                pppp.period26_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount26,
                                            120, -pppd.period_amount26,
                                            pppd.period_amount26),
                pppp.period27_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount27,
                                            120, -pppd.period_amount27,
                                            pppd.period_amount27),
                pppp.period28_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount28,
                                            120, -pppd.period_amount28,
                                            pppd.period_amount28),
                pppp.period29_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount29,
                                            120, -pppd.period_amount29,
                                            pppd.period_amount29),
                pppp.period30_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount30,
                                            120, -pppd.period_amount30,
                                            pppd.period_amount30),
                pppp.period31_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount31,
                                            120, -pppd.period_amount31,
                                            pppd.period_amount31),
                pppp.period32_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount32,
                                            120, -pppd.period_amount32,
                                            pppd.period_amount32),
                pppp.period33_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount33,
                                            120, -pppd.period_amount33,
                                            pppd.period_amount33),
                pppp.period34_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount34,
                                            120, -pppd.period_amount34,
                                            pppd.period_amount34),
                pppp.period35_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount35,
                                            120, -pppd.period_amount35,
                                            pppd.period_amount35),
                pppp.period36_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount36,
                                            120, -pppd.period_amount36,
                                            pppd.period_amount36),
                pppp.period37_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount37,
                                            120, -pppd.period_amount37,
                                            pppd.period_amount37),
                pppp.period38_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount38,
                                            120, -pppd.period_amount38,
                                            pppd.period_amount38),
                pppp.period39_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount39,
                                            120, -pppd.period_amount39,
                                            pppd.period_amount39),
                pppp.period40_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount40,
                                            120, -pppd.period_amount40,
                                            pppd.period_amount40),
                pppp.period41_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount41,
                                            120, -pppd.period_amount41,
                                            pppd.period_amount41),
                pppp.period42_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount42,
                                            120, -pppd.period_amount42,
                                            pppd.period_amount42),
                pppp.period43_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount43,
                                            120, -pppd.period_amount43,
                                            pppd.period_amount43),
                pppp.period44_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount44,
                                            120, -pppd.period_amount44,
                                            pppd.period_amount44),
                pppp.period45_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount45,
                                            120, -pppd.period_amount45,
                                            pppd.period_amount45),
                pppp.period46_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount46,
                                            120, -pppd.period_amount46,
                                            pppd.period_amount46),
                pppp.period47_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount47,
                                            120, -pppd.period_amount47,
                                            pppd.period_amount47),
                pppp.period48_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount48,
                                            120, -pppd.period_amount48,
                                            pppd.period_amount48),
                pppp.period49_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount49,
                                            120, -pppd.period_amount49,
                                            pppd.period_amount49),
                pppp.period50_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount50,
                                            120, -pppd.period_amount50,
                                            pppd.period_amount50),
                pppp.period51_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount51,
                                            120, -pppd.period_amount51,
                                            pppd.period_amount51),
                pppp.period52_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount52,
                                            120, -pppd.period_amount52,
                                            pppd.period_amount52),0))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
          pppd.amount_type_id = p_amount_type_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
	  pppd.currency_type = p_project_currency_type
    group by pppd.amount_type_id;
Line: 4569

    select SUM(DECODE(pa_fp_view_plans_pub.Get_Period_Start_Date13(),
                pppp.period1_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount1,
                                            120, -pppd.period_amount1,
                                            pppd.period_amount1),
                pppp.period2_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount2,
                                            120, -pppd.period_amount2,
                                            pppd.period_amount2),
		        pppp.period3_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount3,
                                            120, -pppd.period_amount3,
                                            pppd.period_amount3),
                pppp.period4_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount4,
                                            120, -pppd.period_amount4,
                                            pppd.period_amount4),
                pppp.period5_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount5,
                                            120, -pppd.period_amount5,
                                            pppd.period_amount5),
                pppp.period6_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount6,
                                            120, -pppd.period_amount6,
                                            pppd.period_amount6),
                pppp.period7_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount7,
                                            120, -pppd.period_amount7,
                                            pppd.period_amount7),
                pppp.period8_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount8,
                                            120, -pppd.period_amount8,
                                            pppd.period_amount8),
                pppp.period9_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount9,
                                            120, -pppd.period_amount9,
                                            pppd.period_amount9),
                pppp.period10_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount10,
                                            120, -pppd.period_amount10,
                                            pppd.period_amount10),
                pppp.period11_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount11,
                                            120, -pppd.period_amount11,
                                            pppd.period_amount11),
                pppp.period12_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount12,
                                            120, -pppd.period_amount12,
                                            pppd.period_amount12),
                pppp.period13_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount13,
                                            120, -pppd.period_amount13,
                                            pppd.period_amount13),
                pppp.period14_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount14,
                                            120, -pppd.period_amount14,
                                            pppd.period_amount14),
                pppp.period15_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount15,
                                            120, -pppd.period_amount15,
                                            pppd.period_amount15),
                pppp.period16_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount16,
                                            120, -pppd.period_amount16,
                                            pppd.period_amount16),
                pppp.period17_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount17,
                                            120, -pppd.period_amount17,
                                            pppd.period_amount17),
                pppp.period18_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount18,
                                            120, -pppd.period_amount18,
                                            pppd.period_amount18),
                pppp.period19_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount19,
                                            120, -pppd.period_amount19,
                                            pppd.period_amount19),
                pppp.period20_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount20,
                                            120, -pppd.period_amount20,
                                            pppd.period_amount20),
                pppp.period21_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount21,
                                            120, -pppd.period_amount21,
                                            pppd.period_amount21),
                pppp.period22_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount22,
                                            120, -pppd.period_amount22,
                                            pppd.period_amount22),
                pppp.period23_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount23,
                                            120, -pppd.period_amount23,
                                            pppd.period_amount23),
                pppp.period24_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount24,
                                            120, -pppd.period_amount24,
                                            pppd.period_amount24),
                pppp.period25_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount25,
                                            120, -pppd.period_amount25,
                                            pppd.period_amount25),
                pppp.period26_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount26,
                                            120, -pppd.period_amount26,
                                            pppd.period_amount26),
                pppp.period27_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount27,
                                            120, -pppd.period_amount27,
                                            pppd.period_amount27),
                pppp.period28_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount28,
                                            120, -pppd.period_amount28,
                                            pppd.period_amount28),
                pppp.period29_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount29,
                                            120, -pppd.period_amount29,
                                            pppd.period_amount29),
                pppp.period30_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount30,
                                            120, -pppd.period_amount30,
                                            pppd.period_amount30),
                pppp.period31_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount31,
                                            120, -pppd.period_amount31,
                                            pppd.period_amount31),
                pppp.period32_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount32,
                                            120, -pppd.period_amount32,
                                            pppd.period_amount32),
                pppp.period33_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount33,
                                            120, -pppd.period_amount33,
                                            pppd.period_amount33),
                pppp.period34_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount34,
                                            120, -pppd.period_amount34,
                                            pppd.period_amount34),
                pppp.period35_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount35,
                                            120, -pppd.period_amount35,
                                            pppd.period_amount35),
                pppp.period36_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount36,
                                            120, -pppd.period_amount36,
                                            pppd.period_amount36),
                pppp.period37_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount37,
                                            120, -pppd.period_amount37,
                                            pppd.period_amount37),
                pppp.period38_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount38,
                                            120, -pppd.period_amount38,
                                            pppd.period_amount38),
                pppp.period39_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount39,
                                            120, -pppd.period_amount39,
                                            pppd.period_amount39),
                pppp.period40_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount40,
                                            120, -pppd.period_amount40,
                                            pppd.period_amount40),
                pppp.period41_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount41,
                                            120, -pppd.period_amount41,
                                            pppd.period_amount41),
                pppp.period42_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount42,
                                            120, -pppd.period_amount42,
                                            pppd.period_amount42),
                pppp.period43_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount43,
                                            120, -pppd.period_amount43,
                                            pppd.period_amount43),
                pppp.period44_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount44,
                                            120, -pppd.period_amount44,
                                            pppd.period_amount44),
                pppp.period45_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount45,
                                            120, -pppd.period_amount45,
                                            pppd.period_amount45),
                pppp.period46_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount46,
                                            120, -pppd.period_amount46,
                                            pppd.period_amount46),
                pppp.period47_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount47,
                                            120, -pppd.period_amount47,
                                            pppd.period_amount47),
                pppp.period48_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount48,
                                            120, -pppd.period_amount48,
                                            pppd.period_amount48),
                pppp.period49_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount49,
                                            120, -pppd.period_amount49,
                                            pppd.period_amount49),
                pppp.period50_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount50,
                                            120, -pppd.period_amount50,
                                            pppd.period_amount50),
                pppp.period51_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount51,
                                            120, -pppd.period_amount51,
                                            pppd.period_amount51),
                pppp.period52_start_Date, DECODE(pppd.amount_subtype_id,
                                            185, -pppd.period_amount52,
                                            120, -pppd.period_amount52,
                                            pppd.period_amount52),0))
    into l_return_value
    from pa_proj_period_profiles pppp,
         pa_proj_periods_denorm pppd
    where pppp.period_profile_id = p_period_profile_id and
          pppp.period_profile_id=pppd.period_profile_id and
          pppd.amount_type_id = p_amount_type_id and
	  pppd.resource_assignment_id = p_resource_assignment_id and
	  pppd.currency_type = p_project_currency_type
    group by pppd.amount_type_id;
Line: 4830

select period_profile_id
  from pa_proj_period_profiles
  where project_id = p_project_id and
	plan_period_type = 'GL' and
	current_flag ='Y';
Line: 4838

select period_profile_id
  from pa_proj_period_profiles
  where project_id = p_project_id and
	plan_period_type = 'PA' and
	current_flag ='Y';
Line: 4899

  update pa_budget_versions
    set plan_processing_code = 'PPP',
	record_version_number = record_version_number + 1,
	request_id = x_conc_req_id,
	locked_by_person_id = -98
    where budget_version_id = p_budget_version_id1;
Line: 4905

  update pa_budget_versions
    set plan_processing_code = 'PPP',
	record_version_number = record_version_number + 1,
	request_id = x_conc_req_id,
	locked_by_person_id = -98
    where budget_version_id = p_budget_version_id2;
Line: 4926

  select 'Y'
    into l_return_value
    from pa_budget_versions
    where budget_version_id = p_budget_version_id and
	  period_profile_id is not null;
Line: 4944

select resource_assignment_id
  from pa_resource_assignments
  where budget_version_id = p_budget_version_id;
Line: 4960

      select SUM(nvl(quantity,0)),
             SUM(nvl(revenue,0))
        into l_line_quantity_total,
             l_line_costrev_total
        from pa_budget_lines
        where resource_assignment_id = l_ra_rec.resource_assignment_id
        group by resource_assignment_id;
Line: 4967

      update pa_resource_assignments
        set total_plan_revenue = l_line_costrev_total,
            total_utilization_hours = l_line_quantity_total
        where
            resource_assignment_id = l_ra_rec.resource_assignment_id;
Line: 4978

      select SUM(nvl(quantity,0)),
             SUM(nvl(burdened_cost,0))
        into l_line_quantity_total,
             l_line_costrev_total
        from pa_budget_lines
        where resource_assignment_id = l_ra_rec.resource_assignment_id
        group by resource_assignment_id;
Line: 4985

      update pa_resource_assignments
        set total_plan_burdened_cost = l_line_costrev_total,
            total_utilization_hours = l_line_quantity_total
        where
            resource_assignment_id = l_ra_rec.resource_assignment_id;
Line: 5007

    SELECT atb.amount_type_id
          ,atb.amount_type_code
      FROM pa_amount_types_b atb
     WHERE atb.amount_type_class = 'R';
Line: 5073

    select 'Y'
      into l_res_assignment_exists
      from dual
      where exists
	(select resource_assignment_id
           from pa_resource_assignments
	   where resource_assignment_id = p_resource_assignment_id);
Line: 5091

                                 p_msg_name       => 'PA_FP_EPL_TASK_UPDATED',
				 p_token1         => 'TASK_NAME',
				 p_value1         => p_task_name,
				 p_token2         => 'TASK_NUMBER',
				 p_value2	  => p_task_number);
Line: 5161

             select fpe.task_id,
                    fpe.resource_planning_level
             from
                 pa_fp_elements fpe,
                 pa_tasks t
             where
                 fpe.proj_fp_options_id = c_fp_opt_id and
                 fpe.element_type = c_ver_type and
                 fpe.task_id = t.task_id and
                 fpe.resource_list_member_id = 0 and
                 fpe.plannable_flag = 'Y';
Line: 5182

  select nvl(rl.group_resource_type_id,0),
         nvl(rl.uncategorized_flag, 'N'),
         rl.resource_list_id
  into   l_group_resource_type_id,
         l_uncategorized_flag,
         l_resource_list_id
  from   pa_budget_versions bv,
         pa_resource_lists_all_bg rl
  where  bv.budget_version_id = p_budget_version_id
  and    bv.resource_list_id = rl.resource_list_id;
Line: 5207

  select po.proj_fp_options_id,
         DECODE(po.fin_plan_preference_code,
                'COST_ONLY', po.cost_fin_plan_level_code,
                'REVENUE_ONLY', po.revenue_fin_plan_level_code,
                po.all_fin_plan_level_code),
         bv.version_type
    into l_proj_fp_options_id,
         l_fin_plan_level_code,
         l_version_type
    from pa_proj_fp_options po,
         pa_budget_versions bv
   where bv.budget_version_id = p_budget_version_id and
         bv.budget_version_id = po.fin_plan_version_id and
         po.fin_plan_option_level_code = 'PLAN_VERSION';
Line: 5226

          select ra.resource_list_member_id
            into l_prj_rlm_id
            from pa_resource_assignments ra
            where ra.budget_version_id = p_budget_version_id and
                  nvl(ra.resource_assignment_type,'USER_ENTERED') = 'USER_ENTERED' and
                  rownum < 2;
Line: 5241

            select decode(parent_member_id,null,'G','R')
              into x_resource_level
              from pa_resource_list_members
              where resource_list_member_id = l_prj_rlm_id;