DBA Data[Home] [Help]

APPS.PA_PROJECT_CORE SQL Statements

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

Line: 36

        FND_MSG_PUB.DELETE_MSG(p_msg_index => 1);
Line: 75

procedure delete_project ( x_project_id       IN number
                          , x_validation_mode     IN  VARCHAR2  DEFAULT 'U'   --bug 2947492
              , x_err_code          IN OUT    NOCOPY number --File.Sql.39 bug 4440895
              , x_err_stage         IN OUT    NOCOPY varchar2 --File.Sql.39 bug 4440895
              , x_err_stack         IN OUT    NOCOPY varchar2 --File.Sql.39 bug 4440895
			  , x_commit            IN        VARCHAR2 := FND_API.G_FALSE)
is

    old_stack      varchar2(630);
Line: 98

l_delete_ok                   VARCHAR2(1);
Line: 105

select '1'
  from dual
 where exists (select object_id
                from pa_project_parties
               where object_id   = t_project_id
                 and object_type = 'PA_PROJECTS');
Line: 113

SELECT template_flag
FROM PA_PROJECTS_ALL
WHERE project_id = x_project_id;
Line: 119

SELECT task_id
FROM PA_TASKS
WHERE project_id = x_project_id;
Line: 131

        SAVEPOINT delete_project;
Line: 135

        x_err_stack := x_err_stack || '->delete_project';
Line: 148

    PA_EGO_WRAPPER_PUB.check_delete_project_ok(
        p_api_version       => 1.0          ,
        p_project_id        => x_project_id ,
        p_init_msg_list => NULL         ,
        x_delete_ok     => l_delete_ok      ,
        x_return_status => x_return_status  ,
        x_errorcode     => x_err_code       ,
        x_msg_count     => x_msg_count      ,
        x_msg_data      => x_msg_data );
Line: 158

    if((x_err_code <> 0) OR (l_delete_ok <> FND_API.G_TRUE)) then
                x_err_code := 10;
Line: 160

                x_err_stack := x_err_stack || '->check PA_EGO_WRAPPER_PUB.check_delete_project_ok '|| x_project_id;
Line: 162

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_TEMPLATE');
Line: 164

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_PROJECT');
Line: 166

                rollback to delete_project;
Line: 173

    PA_EGO_WRAPPER_PUB.check_delete_project_ok_eng(
        p_api_version       => 1.0          ,
        p_project_id        => x_project_id     ,
        p_init_msg_list     => NULL         ,
        x_delete_ok     => l_delete_ok      ,
        x_return_status     => x_return_status  ,
        x_errorcode     => x_err_code       ,
        x_msg_count     => x_msg_count      ,
        x_msg_data      => x_msg_data );
Line: 183

    if((x_err_code <> 0) OR (l_delete_ok <> FND_API.G_TRUE)) then
                x_err_code := 20;
Line: 185

                x_err_stack := x_err_stack || '->check PA_EGO_WRAPPER_PUB.check_delete_project_ok_eng '|| x_project_id;
Line: 187

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_TEMPLATE');
Line: 189

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_PROJECT');
Line: 191

                rollback to delete_project;
Line: 195

    pa_project_utils.check_delete_project_ok(
                          x_project_id      => x_project_id,
                          x_validation_mode  => x_validation_mode,  --bug 2947492
                          x_err_code        => x_err_code,
                          x_err_stage       => x_err_stage,
                          x_err_stack       => x_err_stack);
Line: 204

          rollback to delete_project;
Line: 210

    delete from pa_project_options
    where project_id = x_project_id;
Line: 214

    delete from pa_project_copy_overrides
    where project_id = x_project_id;
Line: 221

     PA_ASSIGNMENTS_PUB.DELETE_PJR_TXNS
            (p_project_id                => x_project_id
            ,p_calling_module            => FND_API.G_MISS_CHAR
            ,p_api_version               => 1.0
            ,p_init_msg_list             => FND_API.G_FALSE
            ,p_commit                    => FND_API.G_FALSE
            ,p_validate_only             => FND_API.G_FALSE
            ,p_max_msg_count             => FND_API.G_MISS_NUM
            ,x_return_status             => x_return_status
            ,x_msg_count                 => x_msg_count
            ,x_msg_data                  => x_msg_data );
Line: 235

                x_err_stack := x_err_stack || '->Delete_PJR_Txns: '|| x_project_id;
Line: 236

                x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_PROJECT');
Line: 237

                ROLLBACK TO delete_project;
Line: 242

    FOR i IN (SELECT rowid row_id
                    ,project_subteam_id
                FROM pa_project_subteams
               WHERE object_type = 'PA_PROJECTS'
                 AND object_id = x_project_id)
    LOOP

     PA_PROJECT_SUBTEAMS_PVT.Delete_Subteam
           ( p_api_version               =>  1.0
            ,p_init_msg_list             => FND_API.G_FALSE
            ,p_commit                    => FND_API.G_FALSE
            ,p_validate_only             => FND_API.G_FALSE
            ,p_validation_level          => FND_API.g_valid_level_full
         -- ,p_calling_module            => NULL
            ,p_debug_mode                => 'N'
            ,p_max_msg_count             => FND_API.G_MISS_NUM
            ,p_subteam_row_id            => i.row_id
            ,p_subteam_id                => i.project_subteam_id
            ,p_record_version_number     => FND_API.G_MISS_NUM
            ,x_return_status             => x_return_status
            ,x_msg_count                 => x_msg_count
            ,x_msg_data                  => x_msg_data );
Line: 267

                x_err_stack := x_err_stack || '->Delete_Subteam: '|| x_project_id;
Line: 268

                x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_PROJECT');
Line: 269

                ROLLBACK TO delete_project;
Line: 293

   PA_PROJECT_PARTIES_PUB.DELETE_PROJECT_PARTY(
          p_api_version => 1.0                  -- p_api_version
          , p_init_msg_list => FND_API.G_FALSE  -- p_init_msg_list
          , p_commit => FND_API.G_FALSE         -- p_commit      --before it was passed TRUE.
          , p_validate_only => FND_API.G_FALSE  -- p_validate_only
          , p_validation_level => FND_API.G_VALID_LEVEL_FULL -- p_validation_level
          , p_debug_mode => 'N'                 -- p_debug_mode
          , p_record_version_number => v_null_number  -- p_record_version_number
          , p_calling_module => 'FORM'          -- p_calling_module
          , p_project_id => x_project_id        -- p_project_id
          , p_project_party_id => v_null_number -- p_project_party_id
          , p_scheduled_flag => 'N'             -- p_scheduled_flag
          , x_return_status => x_return_status  -- x_return_status
          , x_msg_count => x_msg_count          -- x_msg_count
          , x_msg_data => x_msg_data            -- x_msg_data
          );
Line: 312

                x_err_stack := x_err_stack || '->delete_project_party: '|| x_project_id;
Line: 314

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_TEMPLATE');
Line: 316

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_PROJECT');
Line: 318

                rollback to delete_project;
Line: 327

    delete from pa_project_classes
    where project_id = x_project_id;
Line: 331

    delete from pa_project_customers
    where project_id = x_project_id;
Line: 335

    delete from pa_project_contacts
    where project_id = x_project_id;
Line: 339

    delete from pa_cost_dist_overrides
    where project_id = x_project_id;
Line: 343

    delete from pa_credit_receivers
    where project_id = x_project_id;
Line: 347

    delete from pa_transaction_controls
    where project_id = x_project_id;
Line: 351

    delete from pa_billing_assignments
    where project_id = x_project_id;
Line: 367

         DELETE FROM PA_LABOR_MULTIPLIERS
         WHERE  PROJECT_ID = x_project_id;
Line: 378

              DELETE FROM PA_LABOR_MULTIPLIERS
              WHERE  task_id = l_tasks_tbl(i);
Line: 390

        DELETE FROM PA_JOB_BILL_RATE_OVERRIDES
        WHERE  PROJECT_ID = x_project_id ;
Line: 401

              DELETE FROM PA_JOB_BILL_RATE_OVERRIDES
              WHERE  task_id = l_tasks_tbl(i);
Line: 413

        DELETE FROM pa_job_bill_title_overrides
        WHERE  PROJECT_ID = x_project_id ;
Line: 424

              DELETE FROM pa_job_bill_title_overrides
              WHERE  task_id = l_tasks_tbl(i);
Line: 436

        DELETE FROM pa_job_assignment_overrides
        WHERE  PROJECT_ID = x_project_id ;
Line: 447

              DELETE FROM pa_job_assignment_overrides
              WHERE  task_id = l_tasks_tbl(i);
Line: 459

        DELETE FROM pa_emp_bill_rate_overrides
        WHERE  PROJECT_ID = x_project_id ;
Line: 470

              DELETE FROM pa_emp_bill_rate_overrides
              WHERE  task_id = l_tasks_tbl(i);
Line: 482

        DELETE FROM PA_NL_BILL_RATE_OVERRIDES
        WHERE  PROJECT_ID = x_project_id ;
Line: 493

              DELETE FROM PA_NL_BILL_RATE_OVERRIDES
              WHERE  task_id = l_tasks_tbl(i);
Line: 499

    delete from pa_compiled_multipliers
    where ind_compiled_set_id in
        (select ics.ind_compiled_set_id
         from   pa_ind_compiled_sets ics,
                pa_ind_rate_sch_revisions rev,
                pa_ind_rate_schedules sch
         where  ics.ind_rate_sch_revision_id =
                    rev.ind_rate_sch_revision_id
         and    rev.ind_rate_sch_id = sch.ind_rate_sch_id
         and    sch.project_id = x_project_id);
Line: 511

    delete from pa_ind_compiled_sets
    where ind_rate_sch_revision_id  in
        (select rev.ind_rate_sch_revision_id
         from   pa_ind_rate_sch_revisions rev,
                pa_ind_rate_schedules sch
         where  rev.ind_rate_sch_id = sch.ind_rate_sch_id
         and    sch.project_id = x_project_id);
Line: 520

    delete from pa_ind_cost_multipliers
    where ind_rate_sch_revision_id in
        (select rev.ind_rate_sch_revision_id
         from pa_ind_rate_sch_revisions rev, pa_ind_rate_schedules sch
         where rev.ind_rate_sch_id = sch.ind_rate_sch_id
         and sch.project_id = x_project_id);
Line: 528

    delete from pa_ind_rate_sch_revisions
    where ind_rate_sch_id in
        (select ind_rate_sch_id
         from pa_ind_rate_schedules
         where project_id = x_project_id );
Line: 535

    delete from pa_ind_rate_schedules
        where project_id = x_project_id;
Line: 539

    delete from pa_project_asset_assignments
        where project_id = x_project_id;
Line: 543

    delete from pa_project_assets
        where project_id = x_project_id;
Line: 547

    delete from pa_resource_list_uses
    where resource_list_assignment_id in
        (select resource_list_assignment_id
         from pa_resource_list_assignments
         where project_id = x_project_id );
Line: 554

    delete from pa_resource_list_assignments
    where project_id = x_project_id ;
Line: 559

             PA_PERF_EXCP_UTILS.delete_object_exceptions
                         ( p_object_type    => 'PA_PROJECTS'
                          ,p_object_id      => x_project_id
                          ,x_return_status  => x_return_status
                          ,x_msg_count      => x_msg_count
                          ,x_msg_data       => x_msg_data   );
Line: 568

                  x_err_stack := x_err_stack || '->delete_object_exception: '|| x_project_id;
Line: 570

                     x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_TEMPLATE');
Line: 572

                     x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_PROJECT');
Line: 574

                  rollback to delete_project;
Line: 579

             x_err_stage := 'delete_object_exception: '||' SQL error message: '||SUBSTR( SQLERRM,1,1900);
Line: 580

             rollback to delete_project;
Line: 588

         PA_OPPORTUNITY_MGT_PVT.delete_project_attributes
                       (  p_project_id         => x_project_id,
                          x_return_status      => x_return_status,
                          x_msg_count          => x_msg_count,
                          x_msg_data           => x_msg_data );
Line: 596

                x_err_stack := x_err_stack || '->delete_project_attributes: '|| x_project_id;
Line: 598

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_TEMPLATE');
Line: 600

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_PROJECT');
Line: 602

                rollback to delete_project;
Line: 608

        PA_RETENTION_UTIL.delete_retention_rules(
                    p_project_id    =>  x_project_id,
                    p_task_id       =>  null,
                    x_return_status =>  x_return_status,
                    x_msg_count     =>  x_msg_count,
                    x_msg_data      =>  x_msg_data );
Line: 617

                x_err_stack := x_err_stack || '->delete_retention_rules: '|| x_project_id;
Line: 619

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_TEMPLATE');
Line: 621

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_PROJECT');
Line: 623

                rollback to delete_project;
Line: 632

        delete from pa_percent_completes
        where project_id = x_project_id;
Line: 642

        for task_rec in (select t.task_id
                         from   pa_tasks t
                         where  t.project_id = x_project_id
                         and    t.task_id = t.top_task_id) loop

            x_err_stack := NULL;
Line: 649

            pa_project_core.delete_task(
                                        x_task_id             => task_rec.task_id,
                                        x_validation_mode      => x_validation_mode,    --bug 2947492
                                        x_err_code             => x_err_code,
                                        x_err_stage            => x_err_stage,
                                        x_err_stack            => x_err_stack);
Line: 659

                rollback to delete_project;
Line: 668

        PA_PROJ_TASK_STRUC_PUB.delete_project_structure(
                 p_calling_module           => 'FORMS'
                ,p_project_id               => x_project_id
                ,x_msg_count                => x_msg_count
                ,x_msg_data                 => x_msg_data
                ,x_return_status            => x_return_status );
Line: 677

                x_err_stack := x_err_stack || '->delete_project_structure: '|| x_project_id;
Line: 679

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_TEMPLATE');
Line: 681

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_PROJECT');
Line: 683

                rollback to delete_project;
Line: 690

        PA_CONTROL_ITEMS_PVT.DELETE_ALL_CONTROL_ITEMS(
                 p_project_id               => x_project_id
                ,x_msg_count                => x_msg_count
                ,x_msg_data                 => x_msg_data
                ,x_return_status            => x_return_status );
Line: 698

                x_err_stack := x_err_stack || '->delete_all_control_items: '|| x_project_id;
Line: 700

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_TEMPLATE');
Line: 702

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_PROJECT');
Line: 704

                rollback to delete_project;
Line: 714

    PA_PROJ_STRUCTURE_PUB.DELETE_RELATIONSHIP(
        p_api_version => 1.0,
        p_init_msg_list => FND_API.G_FALSE,
        p_commit => FND_API.G_TRUE,
        p_validate_only => FND_API.G_FALSE,
        p_debug_mode => 'N',
        p_task_id => null,
        p_project_id => x_project_id,
        x_return_status => x_return_status,
        x_msg_count => x_msg_count,
        x_msg_data => x_msg_data
    );
Line: 728

                x_err_stack := x_err_stack || '->delete_relationship: '|| x_project_id;
Line: 730

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_TEMPLATE');
Line: 732

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_PROJECT');
Line: 734

                rollback to delete_project;
Line: 742

    PA_EGO_WRAPPER_PUB.delete_all_item_assocs(
        p_api_version       => 1.0          ,
        p_project_id        => x_project_id     ,
        p_init_msg_list     => NULL         ,
        p_commit        => FND_API.G_TRUE   ,
        x_errorcode     => x_err_code       ,
        x_return_status     => x_return_status  ,
        x_msg_count     => x_msg_count      ,
        x_msg_data      => x_msg_data );
Line: 754

                x_err_stack := x_err_stack || '->delete_all_item_assocs: '|| x_project_id;
Line: 756

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_TEMPLATE');
Line: 758

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_PROJECT');
Line: 760

                rollback to delete_project;
Line: 768

        PA_PROJECT_CTX_SEARCH_PVT.DELETE_ROW (
         p_project_id           => x_project_id
        ,p_template_flag        => l_template_flag
        ,x_return_status        => x_return_status );
Line: 775

                x_err_stack := x_err_stack || '->pa_project_ctx_search_pvt.delete_row: '|| x_project_id;
Line: 777

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_TEMPLATE');
Line: 779

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_PROJECT');
Line: 781

                rollback to delete_project;
Line: 790

        PA_USER_ATTR_PUB.DELETE_ALL_USER_ATTRS_DATA (
             p_validate_only             => FND_API.G_FALSE
            ,p_project_id                => x_project_id
            ,x_return_status             => x_return_status
            ,x_msg_count                 => x_msg_count
            ,x_msg_data                  => x_msg_data );
Line: 799

                x_err_stack := x_err_stack || '->delete_all_user_attrs_data: '|| x_project_id;
Line: 801

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_TEMPLATE');
Line: 803

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_PROJECT');
Line: 805

                rollback to delete_project;
Line: 812

        PA_PROJECT_SETS_PVT.delete_proj_from_proj_set(
         p_project_id => x_project_id
        ,x_return_status => x_return_status);
Line: 818

                x_err_stack := x_err_stack || '->delete_proj_from_proj_set: '|| x_project_id;
Line: 820

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_TEMPLATE');
Line: 822

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_PROJECT');
Line: 824

                rollback to delete_project;
Line: 831

        PA_TASK_PUB1.Delete_Proj_To_Task_Assoc(
             p_project_id                => x_project_id
            ,x_return_status             => x_return_status
            ,x_msg_count                 => x_msg_count
            ,x_msg_data                  => x_msg_data );
Line: 839

                x_err_stack := x_err_stack || '->Delete_Proj_To_Task_Assoc: '|| x_project_id;
Line: 841

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_TEMPLATE');
Line: 843

                  x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_PROJECT');
Line: 845

                rollback to delete_project;
Line: 858

         PA_DELIVERABLE_PUB.delete_deliverable_structure
           (p_project_id           => x_project_id
           ,x_return_status        => x_return_status
           ,x_msg_count            => x_msg_count
           ,x_Msg_data             => x_msg_data
           );
Line: 871

     Pa_Rbs_Utils.Delete_Proj_Specific_RBS( p_project_id    => x_project_id
                                           ,x_return_status => x_return_status
                                           ,x_msg_count     => x_msg_count
                                           );
Line: 877

           x_err_stack := x_err_stack || '->Delete_Proj_Specific_RBS: '|| x_project_id;
Line: 879

               x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_TEMPLATE');
Line: 881

               x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_PROJECT');
Line: 883

           ROLLBACK TO delete_project;
Line: 889

     Pa_Planning_Resource_Utils.Delete_Proj_Specific_Resource( p_project_id    => x_project_id
                                                              ,x_return_status => x_return_status
                                                              ,x_msg_count     => x_msg_count
                                                              );
Line: 895

           x_err_stack := x_err_stack || '->Delete_Proj_Specific_Resource: '|| x_project_id;
Line: 897

               x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_TEMPLATE');
Line: 899

               x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_PROJECT');
Line: 901

           ROLLBACK TO delete_project;
Line: 907

      PA_PERF_EXCP_UTILS.delete_object_exceptions
       (
           p_object_type   =>'PA_PROJECTS'
          ,p_object_id     =>x_project_id
          ,x_msg_count     =>x_msg_count
          ,x_msg_data      =>x_msg_data
          ,x_return_status =>x_return_status
        );
Line: 917

            x_err_stack := x_err_stack||'->PA_PERF_EXCP_UTILS.delete_object_exceptions';
Line: 924

             x_err_stage := 'PA_PERF_EXCP_UTILS.delete_object_exceptions: '||SUBSTRB(SQLERRM,1,240);
Line: 942

        FOR i IN ( SELECT item_type,item_key
                    FROM pa_wf_processes
                   WHERE entity_key1 = TO_CHAR(x_project_id))
         LOOP

             wf_engine.itemstatus ( itemtype  => i.item_type,
                                    itemkey   => i.item_key,
                                    status    => x_status,
                                    result    => x_result );
Line: 962

         DELETE FROM pa_wf_processes
          WHERE entity_key1 = TO_CHAR(x_project_id);
Line: 969

          PA_FIN_PLAN_PUB.Delete_Version( p_project_id            => x_project_id
                                         ,p_budget_version_id     => null
                                         ,p_record_version_number => null
                                         ,p_context               => PA_FP_CONSTANTS_PKG.G_CALLING_MODULE_WORKPLAN
                                         ,x_return_status         => x_return_status
                                         ,x_msg_count             => x_msg_count
                                         ,x_msg_data              => x_msg_data
                                        );
Line: 979

               x_err_stack := x_err_stack || '->Delete_Version: '|| x_project_id;
Line: 981

                    x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_TEMPLATE');
Line: 983

                    x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_PROJECT');
Line: 985

               ROLLBACK TO delete_project;
Line: 993

     pa_fin_plan_utils.Delete_Fp_Options( p_project_id =>  x_project_id,
                                          x_err_code   =>  x_err_code );
Line: 997

               x_err_stack := x_err_stack ||'->Delete_Fp_Options: '|| x_project_id;
Line: 999

                    x_err_stage := pa_project_core.get_message_from_stack('PA_CANT_DELETE_TEMPLATE');
Line: 1001

                    x_err_stage := pa_project_core.get_message_from_stack('PA_CANT_DELETE_PROJECT');
Line: 1003

               ROLLBACK TO delete_project;
Line: 1008

     PA_CONTROL_ITEMS_UTILS.DELETE_OBJ_STATUS_CHANGES
	(
	   p_object_type =>'PA_PROJECTS'
	  ,p_object_id   => x_project_id
	  ,x_msg_count     =>x_msg_count
          ,x_msg_data      =>x_msg_data
          ,x_return_status =>x_return_status);
Line: 1017

           x_err_stack := x_err_stack || '->Delete_Obj_Status_Changes: '|| x_project_id;
Line: 1019

                    x_err_stage := pa_project_core.get_message_from_stack('PA_CANT_DELETE_TEMPLATE');
Line: 1021

                    x_err_stage := pa_project_core.get_message_from_stack('PA_CANT_DELETE_PROJECT');
Line: 1023

      ROLLBACK TO delete_project;
Line: 1028

    delete pa_projects
    where  project_id = x_project_id;
Line: 1042

                x_err_stage := 'DELETE PROJECT: '||SUBSTR( SQLERRM,1,1900);
Line: 1043

                rollback to delete_project;
Line: 1045

end delete_project;
Line: 1203

            SELECT
                  P.start_date,
                  P.completion_date,
                P.carrying_out_organization_id,
                  P.labor_bill_rate_org_id,
                  P.labor_std_bill_rate_schdl,
                  P.labor_schedule_discount,
                  P.labor_schedule_fixed_date,
                  P.non_labor_bill_rate_org_id,
                  P.non_labor_std_bill_rate_schdl,
                  P.non_labor_schedule_discount,
                  P.non_labor_schedule_fixed_date,
                  P.labor_sch_type,
                  P.non_labor_sch_type,
                  P.cost_ind_rate_sch_id,
                  P.cost_ind_sch_fixed_date,
                  P.rev_ind_rate_sch_id,
                  P.rev_ind_sch_fixed_date,
                  P.inv_ind_rate_sch_id,
                  P.inv_ind_sch_fixed_date,
                  PT.service_type_code,
                  PT.project_type_class_code
                FROM   pa_projects P, pa_project_types PT
                WHERE  P.project_id = x_project_id
                AND    P.project_type = PT.project_type;
Line: 1275

                SELECT
          DISTINCT A.address_id
          INTO   x_address_id
            FROM   ra_addresses A, ra_site_uses SU
            WHERE  A.address_id = SU.address_id
            AND    A.customer_id IN
            (SELECT customer_id
            FROM   pa_project_customers
                    WHERE  project_id = x_project_id)
            AND    NVL(SU.STATUS,'A') = 'A'
            AND    SU.site_use_code = 'SHIP_TO';
Line: 1288

            SELECT
            DISTINCT acct_site.cust_acct_site_id
            INTO   x_address_id
            FROM
                   hz_cust_acct_sites_all acct_site,
                   hz_cust_site_uses su
            WHERE
              acct_site.cust_acct_site_id  = su.cust_acct_site_id
              AND  acct_site.cust_account_id IN
            (SELECT customer_id FROM   pa_project_customers WHERE  project_id = x_project_id)
            AND    NVL(SU.STATUS,'A') = 'A'
            AND    SU.site_use_code = 'SHIP_TO';
Line: 1350

        x_err_stage := 'update parent task chargeable flag';
Line: 1352

        update pa_tasks
        set chargeable_flag = 'N'
        where task_id = x_parent_task_id;
Line: 1359

                x_err_stage := 'Insert task for project '|| x_project_id;
Line: 1361

                pa_tasks_pkg.insert_row(
                x_rowid,
                x_task_id,
                x_project_id,
                x_task_number,
                sysdate,
                FND_GLOBAL.USER_ID,
                sysdate,
                FND_GLOBAL.USER_ID,
                FND_GLOBAL.LOGIN_ID,
                x_task_name,
                x_task_name,       -- long name
                x_top_task_id,
                x_wbs_level,
                'N',
                'N',
                x_parent_task_id,
                x_description,
                nvl(x_organization_id, x_org_id),
                nvl(x_service_type_code, x_serv_type_code),
                x_manager_id,
                'Y',
                x_billable_flag,
                'N',
                nvl(x_task_start_date, x_proj_start_date),
                nvl(x_task_end_date, x_proj_end_date),
                x_address_id,
                X_Labor_Bill_Rate_Org_Id,
                X_Labor_Std_Bill_Rate_Schd,
                X_Labor_Schedule_Fixed_Date,
                X_Labor_Schedule_Discount,
                X_NL_Bill_Rate_Org_Id,
                X_NL_Std_Bill_Rate_Schd,
                X_NL_Schedule_Fixed_Date,
                X_NL_Schedule_Discount,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                X_Cost_Ind_Rate_Sch_Id,
                X_Rev_Ind_Rate_Sch_Id,
                    X_Inv_Ind_Rate_Sch_Id,
                X_Cost_Ind_Sch_Fixed_Date,
                X_Rev_Ind_Sch_Fixed_Date,
                X_Inv_Ind_Sch_Fixed_Date,
                X_Labor_Sch_Type,
                X_Non_Labor_Sch_Type,
            NULL,
            NULL,
            NULL,
            NULL,
            NULL,
            NULL,
            NULL,
            NULL,
            NULL,
            NULL,
            NULL,
-- 01-APR-2001
-- hsiu Added for forecasting changes
            NULL,
            NULL,
--MCA Sakthi for MultiAgreementCurreny Project
            NULL,
            NULL,
            NULL,
--MCA Sakthi for MultiAgreementCurreny Project
            NULL,
            NULL,
--PA L Changes 2872708
            'N',
            'Y',
            null,

--End PA L Changes 2872708
/*FPM Dev -Project setup changes */
           null,
           null,
           null
);
Line: 1452

                        x_err_stage := 'PA_NO_ROW_INSERTED';
Line: 1503

procedure delete_task (   x_task_id             IN        number
                        , x_validation_mode     IN        VARCHAR2    DEFAULT 'U' --bug 2947492
                        , x_validate_flag       IN        varchar2    DEFAULT 'Y' -- Adding paramater x_validate_flag
                        , x_bulk_flag           IN        VARCHAR2  DEFAULT 'N'  -- 4201927
                        , x_err_code            IN OUT    NOCOPY number --File.Sql.39 bug 4440895
                        , x_err_stage           IN OUT    NOCOPY varchar2 --File.Sql.39 bug 4440895
                        , x_err_stack           IN OUT    NOCOPY varchar2) --File.Sql.39 bug 4440895
is

    old_stack       varchar2(630);
Line: 1522

select project_id from
pa_tasks where
task_id = x_task_id;
Line: 1528

SELECT template_flag
FROM   pa_projects_all
WHERE  project_id = c_project_id;
Line: 1533

is select cc_tax_task_id from pa_projects_all pj
where pj.project_id = l_project_id;
Line: 1541

        SAVEPOINT delete_task;
Line: 1544

        x_err_stack := x_err_stack || '->delete_task';
Line: 1569

            pa_task_utils.check_delete_task_ok(
                                               x_task_id           => x_task_id,
                                               x_validation_mode   => x_validation_mode,   -- bug 2947492
                                               x_err_code          => x_err_code,
                                               x_err_stage         => x_err_stage,
                                               x_err_stack         => x_err_stack);
Line: 1578

              rollback to delete_task;
Line: 1591

	        update pa_projects_all
	        set cc_tax_task_id = null
	        where project_id = l_project_id;
Line: 1600

        delete from pa_billing_assignments
        where top_task_id = x_task_id
        AND project_id = l_project_id;
Line: 1749

     *  Anonymous Block to delete burdening setup starts.
     */
     declare
         cursor task_cur ( l_start_task_id pa_tasks.task_id%TYPE )
             is
                 select task_id
                   from pa_tasks
                            connect by prior task_id = parent_task_id
                              start with task_id = l_start_task_id
                 ;
Line: 1761

                 select sch.ind_rate_sch_id
                   from pa_ind_rate_schedules sch
                  where sch.task_id = l_task_id
                 ;
Line: 1767

                 select rev.ind_rate_sch_revision_id
                   from pa_ind_rate_sch_revisions rev
                  where rev.ind_rate_sch_id = l_ind_rate_sch_id
                 ;
Line: 1773

                select ics.ind_compiled_set_id
                  from pa_ind_compiled_sets ics
                 where ics.ind_rate_sch_revision_id = l_ind_rate_sch_revision_id
                ;
Line: 1793

        x_err_stage := 'Delete txn controls for task '|| x_task_id;
Line: 1795

               delete from pa_transaction_controls
                      where task_id =l_task_id_tab(i)
                        and project_id = l_project_id;
Line: 1801

        x_err_stage := 'Delete labor multipliers for task '|| x_task_id;
Line: 1803

               delete from pa_labor_multipliers
                      where task_id =l_task_id_tab(i) ;
Line: 1807

        x_err_stage := 'Delete job bill rate overrides for task '|| x_task_id;
Line: 1809

               delete from pa_job_bill_rate_overrides
                      where task_id =l_task_id_tab(i) ;
Line: 1813

        x_err_stage := 'Delete job assignment overrides for task '|| x_task_id;
Line: 1815

               delete from pa_job_assignment_overrides
                      where task_id =l_task_id_tab(i) ;
Line: 1819

        x_err_stage := 'Delete emp bill rate overrides for task '|| x_task_id;
Line: 1821

               delete from pa_emp_bill_rate_overrides
                      where task_id =l_task_id_tab(i) ;
Line: 1825

        x_err_stage := 'Delete nl bill rate overrides for task '|| x_task_id;
Line: 1827

               delete from pa_nl_bill_rate_overrides
                      where task_id =l_task_id_tab(i) ;
Line: 1831

        x_err_stage := 'Delete project asset assignments for task '|| x_task_id;
Line: 1833

               delete from pa_project_asset_assignments
                      where task_id =l_task_id_tab(i) ;
Line: 1866

                                               delete
                                                 from pa_compiled_multipliers comp_mult
                                                where ind_compiled_set_id = l_ind_comp_set_id_tab(i)
                                               ;
Line: 1871

                                               delete
                                                 from pa_ind_compiled_sets ics
                                                where ind_compiled_set_id = l_ind_comp_set_id_tab(i)
                                               ;
Line: 1881

                                      delete
                                        from pa_ind_cost_multipliers icm
                                       where icm.ind_rate_sch_revision_id = l_ind_rate_sch_rev_id_tab(i)
                                      ;
Line: 1886

                                      delete
                                        from pa_ind_rate_sch_revisions rev
                                       where rev.ind_rate_sch_revision_id = l_ind_rate_sch_rev_id_tab(i)
                                      ;
Line: 1897

                           delete
                             from pa_ind_rate_schedules sch
                            where sch.ind_rate_sch_id = l_ind_rate_sch_id_tab(i)
                           ;
Line: 1908

            rollback to delete_task;
Line: 1910

     end; -- end of anonymous block to delete burdening setup.
Line: 1911

/* New code to delete burdening setup ends **/

        -- Delete project asset assigments
        -- 3693197 : Commented and moved above in the anonymous block

        --x_err_stage := 'Delete proj asset assignmt for task '|| x_task_id;
Line: 1925

        PA_RETENTION_UTIL.delete_retention_rules(
                    p_project_id    =>  l_project_id,
                    p_task_id       =>  x_TASK_ID,
                    x_return_status =>  x_return_status,
                    x_msg_count     =>  x_msg_count,
                    x_msg_data      =>  x_msg_data );
Line: 1935

               x_err_stack := x_err_stack || '->delete_retention_rules: '|| l_project_id;
Line: 1937

                    x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_TEMPLATE');
Line: 1939

                    x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_PROJECT');
Line: 1941

               ROLLBACK TO delete_task ;
Line: 1952

        x_err_stage := 'Delete task percent complete ';
Line: 1953

        delete from pa_percent_completes
        where project_id = l_project_id
        and task_id in
                (select task_id
                from pa_tasks
                CONNECT BY PRIOR TASK_ID = PARENT_TASK_ID
                START WITH TASK_ID = x_TASK_ID);
Line: 1964

        x_err_stage := 'Delete project structure relationship for task ';
Line: 1965

        PA_PROJ_STRUCTURE_PUB.DELETE_RELATIONSHIP(
          p_api_version => 1.0,
          p_init_msg_list => FND_API.G_FALSE,
          p_commit => FND_API.G_TRUE,
          p_validate_only => FND_API.G_FALSE,
          p_debug_mode => 'N',
          p_task_id => x_TASK_ID,
          p_project_id => null,
          x_return_status => x_return_status,
          x_msg_count => x_msg_count,
          x_msg_data => x_msg_data
        );
Line: 1980

               x_err_stack := x_err_stack || '->DELETE_RELATIONSHIP: '|| l_project_id;
Line: 1982

                    x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_TEMPLATE');
Line: 1984

                    x_err_stage := pa_project_core.get_message_from_stack( 'PA_CANT_DELETE_PROJECT');
Line: 1986

               ROLLBACK TO delete_task ;
Line: 1993

        x_err_stage := 'Delete any task in the subtree of task '|| x_task_id;
Line: 1994

        delete from pa_tasks
        where task_id in
                (select task_id
                from pa_tasks
                CONNECT BY PRIOR TASK_ID = PARENT_TASK_ID
                START WITH TASK_ID = x_TASK_ID);
Line: 2017

                    x_err_stage := 'update parent task chargeable flag';
Line: 2019

                    update pa_tasks
                    set chargeable_flag = 'Y'
                    where task_id = x_parent_task_id;
Line: 2034

                rollback to delete_task;
Line: 2036

end delete_task;
Line: 2045

procedure delete_project_type (
                          x_project_type_id      IN     number
                        , x_msg_count            OUT    NOCOPY number --File.Sql.39 bug 4440895
                        , x_msg_data             OUT    NOCOPY varchar2 --File.Sql.39 bug 4440895
                        , x_return_status        OUT    NOCOPY varchar2 --File.Sql.39 bug 4440895
)
is

    l_return_status                 varchar2(1);
Line: 2056

     SAVEPOINT delete_project_type;
Line: 2061

/*     PA_PROJECT_UTILS.check_delete_project_type_ok(
                    p_project_type_id    => x_project_type_id
                   ,x_return_status      => x_return_status
                   ,x_error_message_code => x_msg_data
                  );
Line: 2074

        delete pa_project_types_all --bug 4584792
        where  project_type_id = x_project_type_id;
Line: 2080

                rollback to delete_project;
Line: 2082

end delete_project_type;
Line: 2091

procedure delete_class_category (
                          x_class_category      IN     VARCHAR2
                        , x_msg_count            OUT    NOCOPY number --File.Sql.39 bug 4440895
                        , x_msg_data             OUT    NOCOPY varchar2 --File.Sql.39 bug 4440895
                        , x_return_status        OUT    NOCOPY varchar2 --File.Sql.39 bug 4440895
)
is

    l_return_status                 varchar2(1);
Line: 2102

     SAVEPOINT delete_class_category;
Line: 2107

     delete pa_class_categories
     where  class_category = x_class_category
     ;
Line: 2114

                rollback to delete_class_category;
Line: 2116

end delete_class_category;
Line: 2125

procedure delete_class_code (
                          x_class_category      IN     VARCHAR2
                        , x_class_code          IN     VARCHAR2
                        , x_msg_count            OUT    NOCOPY number --File.Sql.39 bug 4440895
                        , x_msg_data             OUT    NOCOPY varchar2 --File.Sql.39 bug 4440895
                        , x_return_status        OUT    NOCOPY varchar2 --File.Sql.39 bug 4440895
)
is

    l_return_status                 varchar2(1);
Line: 2137

     SAVEPOINT delete_class_code;
Line: 2142

     delete pa_class_codes
     where  class_category = x_class_category
       and class_code = x_class_code
     ;
Line: 2150

                rollback to delete_class_code;
Line: 2152

end delete_class_code;