DBA Data[Home] [Help]

APPS.PA_FIN_PLAN_TYPE_GLOBAL SQL Statements

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

Line: 39

  select nvl(po.factor_by_code, 1)
    into x_factor_by_code
    from pa_proj_fp_options po
    where po.project_id = p_project_id and
          po.fin_plan_option_level_code = 'PROJECT';
Line: 65

 select budget_version_id
   from   pa_budget_versions
   where  project_id = p_project_id and
          fin_plan_type_id = p_plan_type_id and
          version_type = 'ORG_FORECAST' and
          current_flag = 'Y';
Line: 74

 select budget_version_id
   from   pa_budget_versions
   where  project_id = p_project_id and
          fin_plan_type_id = p_plan_type_id and
          version_type = 'ORG_FORECAST' and
          current_working_flag = 'Y';
Line: 127

    select budget_version_id
      from pa_budget_versions
      where project_id = p_project_id and
            fin_plan_type_id = p_plan_type_id and
            version_type in ('COST', 'ALL') and
            current_working_flag = 'Y';
Line: 136

    select budget_version_id
      from pa_budget_versions
      where project_id = p_project_id and
            fin_plan_type_id = p_plan_type_id and
            version_type in ('REVENUE', 'ALL') and
            current_working_flag = 'Y';
Line: 145

    select budget_version_id
      from pa_budget_versions
      where project_id = p_project_id and
            fin_plan_type_id = p_plan_type_id and
            version_type in ('COST', 'ALL') and
            current_flag = 'Y';
Line: 154

    select budget_version_id
      from pa_budget_versions
      where project_id = p_project_id and
            fin_plan_type_id = p_plan_type_id and
            version_type in ('REVENUE', 'ALL') and
            current_flag = 'Y';
Line: 214

PROCEDURE delete_plan_type_from_project
    (p_project_id        IN  pa_budget_versions.project_id%TYPE,
     p_fin_plan_type_id  IN  pa_budget_versions.fin_plan_type_id%TYPE,
     x_return_status     OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
     x_msg_count         OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
     x_msg_data          OUT NOCOPY VARCHAR2) --File.Sql.39 bug 4440895
is

cursor plan_type_versions_csr is
select budget_version_id
  from pa_budget_versions
  where project_id = p_project_id and
        fin_plan_type_id = p_fin_plan_type_id;
Line: 230

select fin_plan_type_code
  from pa_fin_plan_types_b
  where fin_plan_type_id = p_fin_plan_type_id;
Line: 238

SELECT   gen_src_cost_plan_type_id
       , gen_src_cost_plan_version_id
       , gen_src_cost_plan_ver_code
       , gen_src_rev_plan_type_id
       , gen_src_rev_plan_version_id
       , gen_src_rev_plan_ver_code
       , gen_src_all_plan_type_id
       , gen_src_all_plan_version_id
       , gen_src_all_plan_ver_code
       , fin_plan_option_level_code
       , proj_fp_options_id
FROM   pa_proj_fp_options
WHERE  project_id = c_project_id
AND    fin_plan_type_id IS NOT NULL -- eliminates project level record
AND    fin_plan_type_id <> c_fin_plan_type_id -- eliminates plan type being deleted
AND    (gen_src_cost_plan_type_id = c_fin_plan_type_id OR
        gen_src_rev_plan_type_id  = c_fin_plan_type_id OR
        gen_src_all_plan_type_id  = c_fin_plan_type_id);
Line: 261

SELECT pt.fin_plan_type_id  as fin_plan_type_id
       ,pt.plan_class_code  as plan_class_code
FROM   pa_proj_fp_options o
       ,pa_fin_plan_types_vl pt
WHERE  o.project_id = c_project_id
AND    o.fin_plan_option_level_code = 'PLAN_TYPE'
AND    o.fin_plan_type_id <> c_fin_plan_type_id
AND    o.fin_plan_preference_code <> 'REVENUE_ONLY'
AND    o.fin_plan_type_id = pt.fin_plan_type_id
AND    nvl(pt.use_for_workplan_flag, 'N') = 'N'
ORDER BY name ASC;
Line: 275

SELECT rbs_version_id
FROM pa_proj_fp_options
WHERE project_id = c_project_id
AND fin_plan_type_id=c_fin_plan_type_id
and fin_plan_option_level_code = 'PLAN_TYPE';
Line: 283

SELECT rbs_header_id
FROM pa_rbs_versions_b
WHERE rbs_version_id=c_rbs_version_id;
Line: 289

SELECT 'X'
FROM pa_proj_fp_options
WHERE rbs_version_id = c_rbs_version_id
AND project_id=c_project_id
AND fin_plan_option_level_code = 'PLAN_TYPE';
Line: 318

     pa_debug.init_err_stack('PA_FIN_PLAN_TYPE_GLOBAL.delete_plan_type_from_project');
Line: 328

                         p_msg_name            => 'PA_FP_DELETE_PLAN_TYPE_ERROR');
Line: 339

                           p_msg_name            => 'PA_CANNOT_DELETE_ORGFCST');
Line: 364

/* IF NO BUSINESS RULES VIOLATIONS: PROCEED WITH DELETE PLAN TYPE */
  SAVEPOINT PA_FP_DELETE_PLAN_TYPE;
Line: 445

      UPDATE pa_proj_fp_options
      SET    gen_src_cost_plan_type_id      = fp_options_rec.gen_src_cost_plan_type_id
           , gen_src_cost_plan_version_id   = fp_options_rec.gen_src_cost_plan_version_id
           , gen_src_cost_plan_ver_code     = fp_options_rec.gen_src_cost_plan_ver_code
           , gen_src_rev_plan_type_id       = fp_options_rec.gen_src_rev_plan_type_id
           , gen_src_rev_plan_version_id    = fp_options_rec.gen_src_rev_plan_version_id
           , gen_src_rev_plan_ver_code      = fp_options_rec.gen_src_rev_plan_ver_code
           , gen_src_all_plan_type_id       = fp_options_rec.gen_src_all_plan_type_id
           , gen_src_all_plan_version_id    = fp_options_rec.gen_src_all_plan_version_id
           , gen_src_all_plan_ver_code      = fp_options_rec.gen_src_all_plan_ver_code
           , record_version_number          = record_version_number + 1
           , last_update_date               = SYSDATE
           , last_updated_by                = FND_GLOBAL.user_id
           , last_update_login              = FND_GLOBAL.login_id
      WHERE proj_fp_options_id = fp_options_rec.proj_fp_options_id;
Line: 473

  delete from pa_fp_elements e
    where e.proj_fp_options_id in (select o.proj_fp_options_id from pa_proj_fp_options o
                                 where  o.project_id = p_project_id and
                                        o.fin_plan_type_id = p_fin_plan_type_id);
Line: 484

  SELECT proj_fp_options_id bulk collect
  INTO x_proj_fp_options_id_array
  FROM pa_proj_fp_options
  WHERE project_id = p_project_id and fin_plan_type_id = p_fin_plan_type_id;
Line: 490

    DELETE from pa_fp_elements
     WHERE proj_fp_options_id = x_proj_fp_options_id_array(i);
Line: 494

  delete from pa_fp_txn_currencies tc
    where tc.proj_fp_options_id in (select o.proj_fp_options_id
                                    from   pa_proj_fp_options o
                                    where  o.project_id = p_project_id and  --Replaced project_id with p_project_id
                                                                          --for bug 2740553
                                           o.fin_plan_type_id = p_fin_plan_type_id);
Line: 504

       pa_debug.g_err_stage:= 'About to delete from pa_fp_excluded_elements';
Line: 505

       pa_debug.write('delete_plan_type_from_project : PA_FIN_PLAN_TYPE_GLOBAL',pa_debug.g_err_stage,3);
Line: 511

  DELETE
  FROM   pa_fp_excluded_elements ee
  WHERE  ee.proj_fp_options_id IN (SELECT pfo.proj_fp_options_id
                                   FROM   pa_proj_fp_options pfo
                                   WHERE  pfo.project_id = p_project_id
                                   AND    pfo.fin_plan_type_id=p_fin_plan_type_id);
Line: 519

    pa_debug.g_err_stage:= To_char(SQL%ROWCOUNT) || ' records deleted.';
Line: 520

    pa_debug.write('delete_plan_type_from_project : PA_FIN_PLAN_TYPE_GLOBAL',pa_debug.g_err_stage,3);
Line: 530

  delete from pa_proj_fp_options
    where project_id = p_project_id and
          fin_plan_option_level_code = 'PLAN_TYPE' and
          fin_plan_type_id = p_fin_plan_type_id;
Line: 548

     UPDATE pa_rbs_prj_assignments
     SET fp_usage_flag='N'
     WHERE project_id=p_project_id
      AND rbs_version_id=l_rbs_version_id
      AND rbs_header_id=l_rbs_header_id
      AND fp_usage_flag='Y';
Line: 565

  rollback to PA_FP_DELETE_PLAN_TYPE;
Line: 570

                               p_procedure_name   => 'delete_plan_type_from_project');
Line: 573

END delete_plan_type_from_project;
Line: 593

    select plan_class_code
      into l_plan_class_code
      from pa_fin_plan_types_b
      where fin_plan_type_id = p_fin_plan_type_id;
Line: 597

    select approved_cost_plan_type_flag,
	   approved_rev_plan_type_flag
      into l_approved_cost_pt_flag,
	   l_approved_rev_pt_flag
      from pa_proj_fp_options
      where project_id = p_project_id and
            fin_plan_type_id = p_fin_plan_type_id and
            fin_plan_option_level_code = 'PLAN_TYPE';