DBA Data[Home] [Help]

APPS.PA_HR_UPDATE_API dependencies on PA_RESOURCES_DENORM

Line 434: -- which actually updates the pa_resources_denorm entity

430:
431: END call_create_resource_denorm;
432:
433: -- This API makes calls to PA_RESOURCE_PVT.UPDATE_RESOURCE_DENORM API
434: -- which actually updates the pa_resources_denorm entity
435: -- This API will update the job level of the job id passed in of the
436: -- resources denorm records
437: PROCEDURE update_job_level_res_denorm
438: ( P_job_id_old per_jobs.job_id%type

Line 509: ,P_job_level_old pa_resources_denorm.resource_job_level%type

505: -- This API gets all jobs belonging to the master job id and updates
506: -- the resource denorm records that has the affected job id
507: PROCEDURE update_all_jobs
508: ( P_job_id per_jobs.job_id%type
509: ,P_job_level_old pa_resources_denorm.resource_job_level%type
510: ,P_job_level_new pa_resources_denorm.resource_job_level%type
511: ,x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
512: ,x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
513: ,x_msg_count OUT NOCOPY NUMBER --File.Sql.39 bug 4440895

Line 510: ,P_job_level_new pa_resources_denorm.resource_job_level%type

506: -- the resource denorm records that has the affected job id
507: PROCEDURE update_all_jobs
508: ( P_job_id per_jobs.job_id%type
509: ,P_job_level_old pa_resources_denorm.resource_job_level%type
510: ,P_job_level_new pa_resources_denorm.resource_job_level%type
511: ,x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
512: ,x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
513: ,x_msg_count OUT NOCOPY NUMBER --File.Sql.39 bug 4440895
514: ) IS

Line 517: l_job_level_old pa_resources_denorm.resource_job_level%type;

513: ,x_msg_count OUT NOCOPY NUMBER --File.Sql.39 bug 4440895
514: ) IS
515:
516: l_job_id PER_JOBS.JOB_ID%type;
517: l_job_level_old pa_resources_denorm.resource_job_level%type;
518: l_job_level_new pa_resources_denorm.resource_job_level%type;
519: l_resource_rec_old PA_RESOURCE_PVT.Resource_Denorm_Rec_Type;
520: l_resource_rec_new PA_RESOURCE_PVT.Resource_Denorm_Rec_Type;
521:

Line 518: l_job_level_new pa_resources_denorm.resource_job_level%type;

514: ) IS
515:
516: l_job_id PER_JOBS.JOB_ID%type;
517: l_job_level_old pa_resources_denorm.resource_job_level%type;
518: l_job_level_new pa_resources_denorm.resource_job_level%type;
519: l_resource_rec_old PA_RESOURCE_PVT.Resource_Denorm_Rec_Type;
520: l_resource_rec_new PA_RESOURCE_PVT.Resource_Denorm_Rec_Type;
521:
522: -- Cursor to get all affected job ids with the P_job_id level change

Line 922: ,P_job_level_old pa_resources_denorm.resource_job_level%type

918: -- Do updates on job level for PRJG job, master jobs and normal jobs
919: -- which has mapping to each other
920: PROCEDURE perform_job_updates
921: ( P_job_id per_jobs.job_id%type
922: ,P_job_level_old pa_resources_denorm.resource_job_level%type
923: ,P_job_level_new pa_resources_denorm.resource_job_level%type
924: ,P_job_group_id per_job_groups.job_group_id%type
925: ,x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
926: ,x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895

Line 923: ,P_job_level_new pa_resources_denorm.resource_job_level%type

919: -- which has mapping to each other
920: PROCEDURE perform_job_updates
921: ( P_job_id per_jobs.job_id%type
922: ,P_job_level_old pa_resources_denorm.resource_job_level%type
923: ,P_job_level_new pa_resources_denorm.resource_job_level%type
924: ,P_job_group_id per_job_groups.job_group_id%type
925: ,x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
926: ,x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
927: ,x_msg_count OUT NOCOPY NUMBER --File.Sql.39 bug 4440895

Line 932: l_job_level_old pa_resources_denorm.resource_job_level%type;

928: ) IS
929:
930: l_job_id PER_JOBS.JOB_ID%type;
931: l_master_job_id PER_JOBS.JOB_ID%type;
932: l_job_level_old pa_resources_denorm.resource_job_level%type;
933: l_job_level_new pa_resources_denorm.resource_job_level%type;
934: l_job_group_id per_job_groups.job_group_id%type;
935: P_DEBUG_MODE VARCHAR2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
936:

Line 933: l_job_level_new pa_resources_denorm.resource_job_level%type;

929:
930: l_job_id PER_JOBS.JOB_ID%type;
931: l_master_job_id PER_JOBS.JOB_ID%type;
932: l_job_level_old pa_resources_denorm.resource_job_level%type;
933: l_job_level_new pa_resources_denorm.resource_job_level%type;
934: l_job_group_id per_job_groups.job_group_id%type;
935: P_DEBUG_MODE VARCHAR2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
936:
937: -- Cursor to get the associated master job id of the PRJG job id

Line 1045: ,P_job_level_old pa_resources_denorm.resource_job_level%type

1041: -- This API will update the resource denorm records with the job level change of a job id.
1042: -- It depends on the type of job : whether it is in the Project Resource Job Group or not
1043: PROCEDURE update_job_level_dff
1044: ( P_job_id per_jobs.job_id%type
1045: ,P_job_level_old pa_resources_denorm.resource_job_level%type
1046: ,P_job_level_new pa_resources_denorm.resource_job_level%type
1047: ,x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
1048: ,x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
1049: ,x_msg_count OUT NOCOPY NUMBER --File.Sql.39 bug 4440895

Line 1046: ,P_job_level_new pa_resources_denorm.resource_job_level%type

1042: -- It depends on the type of job : whether it is in the Project Resource Job Group or not
1043: PROCEDURE update_job_level_dff
1044: ( P_job_id per_jobs.job_id%type
1045: ,P_job_level_old pa_resources_denorm.resource_job_level%type
1046: ,P_job_level_new pa_resources_denorm.resource_job_level%type
1047: ,x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
1048: ,x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
1049: ,x_msg_count OUT NOCOPY NUMBER --File.Sql.39 bug 4440895
1050: ) IS

Line 1053: l_job_level_old pa_resources_denorm.resource_job_level%type;

1049: ,x_msg_count OUT NOCOPY NUMBER --File.Sql.39 bug 4440895
1050: ) IS
1051:
1052: l_job_id PER_JOBS.JOB_ID%type;
1053: l_job_level_old pa_resources_denorm.resource_job_level%type;
1054: l_job_level_new pa_resources_denorm.resource_job_level%type;
1055: l_job_group_id per_job_groups.job_group_id%type;
1056: l_isPRJG VARCHAR2(1);
1057: P_DEBUG_MODE VARCHAR2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');

Line 1054: l_job_level_new pa_resources_denorm.resource_job_level%type;

1050: ) IS
1051:
1052: l_job_id PER_JOBS.JOB_ID%type;
1053: l_job_level_old pa_resources_denorm.resource_job_level%type;
1054: l_job_level_new pa_resources_denorm.resource_job_level%type;
1055: l_job_group_id per_job_groups.job_group_id%type;
1056: l_isPRJG VARCHAR2(1);
1057: P_DEBUG_MODE VARCHAR2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
1058:

Line 1460: ,P_resource_id IN Pa_Resources_denorm.resource_id%type

1456: -- end date active to sysdate when pa_all_organizations.inactive_date
1457: -- is updated.
1458: PROCEDURE Update_OU_resource(P_default_OU_old IN Pa_all_organizations.org_id%type
1459: ,P_default_OU_new IN Pa_all_organizations.org_id%type
1460: ,P_resource_id IN Pa_Resources_denorm.resource_id%type
1461: default NULL
1462: ,P_person_id IN Pa_Resources_denorm.person_id%type
1463: default NULL
1464: ,P_start_date IN Date default NULL

Line 1462: ,P_person_id IN Pa_Resources_denorm.person_id%type

1458: PROCEDURE Update_OU_resource(P_default_OU_old IN Pa_all_organizations.org_id%type
1459: ,P_default_OU_new IN Pa_all_organizations.org_id%type
1460: ,P_resource_id IN Pa_Resources_denorm.resource_id%type
1461: default NULL
1462: ,P_person_id IN Pa_Resources_denorm.person_id%type
1463: default NULL
1464: ,P_start_date IN Date default NULL
1465: ,P_end_date_old IN Date default NULL
1466: ,P_end_date_new IN Date default NULL

Line 1482: FROM pa_resources_denorm

1478:
1479: CURSOR res_denorm_recs IS
1480: SELECT resource_effective_start_date,
1481: resource_effective_end_date
1482: FROM pa_resources_denorm
1483: WHERE person_id = p_person_id
1484: AND nvl(p_end_date_new, sysdate) >= resource_effective_start_date
1485: AND resource_effective_start_date >= p_start_date
1486: AND resource_effective_end_date <= p_end_date_old

Line 1692: -- reflect the changes in pa_resources_denorm entity

1688: -- check for whether the default OU is changed if so call
1689: -- check OU change api to update the resource OU entity
1690: If (NVL(P_default_OU_old,-99) <> nvl(P_default_OU_new,-99)) then
1691: -- if OU is updated then call resource denorm api to
1692: -- reflect the changes in pa_resources_denorm entity
1693: If v_person_id is NOT NULL then
1694:
1695:
1696: Update_OU_resource

Line 2585: -- which actually updates the pa_resources_denorm entity

2581: END call_forcast_api;
2582:
2583:
2584: -- This Procedure makes calls to PA_RESOURCE_PVT.update_resource_denorm api
2585: -- which actually updates the pa_resources_denorm entity
2586: PROCEDURE call_billable_resoruce_denorm
2587: (P_job_id_old per_jobs.job_id%type
2588: ,P_job_id_new per_jobs.job_id%type
2589: ,P_billable_flag_old pa_resources_denorm.billable_flag%type

Line 2589: ,P_billable_flag_old pa_resources_denorm.billable_flag%type

2585: -- which actually updates the pa_resources_denorm entity
2586: PROCEDURE call_billable_resoruce_denorm
2587: (P_job_id_old per_jobs.job_id%type
2588: ,P_job_id_new per_jobs.job_id%type
2589: ,P_billable_flag_old pa_resources_denorm.billable_flag%type
2590: ,P_billable_flag_new pa_resources_denorm.billable_flag%type
2591: ,P_utilize_flag_old pa_resources_denorm.utilization_flag%type
2592: ,P_utilize_flag_new pa_resources_denorm.utilization_flag%type
2593: ,p_schedulable_flag_old pa_resources_denorm.schedulable_flag%type

Line 2590: ,P_billable_flag_new pa_resources_denorm.billable_flag%type

2586: PROCEDURE call_billable_resoruce_denorm
2587: (P_job_id_old per_jobs.job_id%type
2588: ,P_job_id_new per_jobs.job_id%type
2589: ,P_billable_flag_old pa_resources_denorm.billable_flag%type
2590: ,P_billable_flag_new pa_resources_denorm.billable_flag%type
2591: ,P_utilize_flag_old pa_resources_denorm.utilization_flag%type
2592: ,P_utilize_flag_new pa_resources_denorm.utilization_flag%type
2593: ,p_schedulable_flag_old pa_resources_denorm.schedulable_flag%type
2594: ,p_schedulable_flag_new pa_resources_denorm.schedulable_flag%type

Line 2591: ,P_utilize_flag_old pa_resources_denorm.utilization_flag%type

2587: (P_job_id_old per_jobs.job_id%type
2588: ,P_job_id_new per_jobs.job_id%type
2589: ,P_billable_flag_old pa_resources_denorm.billable_flag%type
2590: ,P_billable_flag_new pa_resources_denorm.billable_flag%type
2591: ,P_utilize_flag_old pa_resources_denorm.utilization_flag%type
2592: ,P_utilize_flag_new pa_resources_denorm.utilization_flag%type
2593: ,p_schedulable_flag_old pa_resources_denorm.schedulable_flag%type
2594: ,p_schedulable_flag_new pa_resources_denorm.schedulable_flag%type
2595: ,x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895

Line 2592: ,P_utilize_flag_new pa_resources_denorm.utilization_flag%type

2588: ,P_job_id_new per_jobs.job_id%type
2589: ,P_billable_flag_old pa_resources_denorm.billable_flag%type
2590: ,P_billable_flag_new pa_resources_denorm.billable_flag%type
2591: ,P_utilize_flag_old pa_resources_denorm.utilization_flag%type
2592: ,P_utilize_flag_new pa_resources_denorm.utilization_flag%type
2593: ,p_schedulable_flag_old pa_resources_denorm.schedulable_flag%type
2594: ,p_schedulable_flag_new pa_resources_denorm.schedulable_flag%type
2595: ,x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
2596: ,x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895

Line 2593: ,p_schedulable_flag_old pa_resources_denorm.schedulable_flag%type

2589: ,P_billable_flag_old pa_resources_denorm.billable_flag%type
2590: ,P_billable_flag_new pa_resources_denorm.billable_flag%type
2591: ,P_utilize_flag_old pa_resources_denorm.utilization_flag%type
2592: ,P_utilize_flag_new pa_resources_denorm.utilization_flag%type
2593: ,p_schedulable_flag_old pa_resources_denorm.schedulable_flag%type
2594: ,p_schedulable_flag_new pa_resources_denorm.schedulable_flag%type
2595: ,x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
2596: ,x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
2597: ,x_msg_count OUT NOCOPY NUMBER --File.Sql.39 bug 4440895

Line 2594: ,p_schedulable_flag_new pa_resources_denorm.schedulable_flag%type

2590: ,P_billable_flag_new pa_resources_denorm.billable_flag%type
2591: ,P_utilize_flag_old pa_resources_denorm.utilization_flag%type
2592: ,P_utilize_flag_new pa_resources_denorm.utilization_flag%type
2593: ,p_schedulable_flag_old pa_resources_denorm.schedulable_flag%type
2594: ,p_schedulable_flag_new pa_resources_denorm.schedulable_flag%type
2595: ,x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
2596: ,x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
2597: ,x_msg_count OUT NOCOPY NUMBER --File.Sql.39 bug 4440895
2598: ) IS

Line 2605: v_billable_flag_old pa_resources_denorm.billable_flag%type;

2601: v_resource_rec_old PA_RESOURCE_PVT.Resource_Denorm_Rec_Type;
2602: v_resource_rec_new PA_RESOURCE_PVT.Resource_Denorm_Rec_Type;
2603: v_job_id_old PER_JOBS.JOB_ID%type;
2604: v_job_id_new PER_JOBS.JOB_ID%type;
2605: v_billable_flag_old pa_resources_denorm.billable_flag%type;
2606: v_billable_flag_new pa_resources_denorm.billable_flag%type;
2607: v_utilize_flag_old pa_resources_denorm.utilization_flag%type;
2608: v_utilize_flag_new pa_resources_denorm.utilization_flag%type;
2609: v_schedulable_flag_old pa_resources_denorm.schedulable_flag%type;

Line 2606: v_billable_flag_new pa_resources_denorm.billable_flag%type;

2602: v_resource_rec_new PA_RESOURCE_PVT.Resource_Denorm_Rec_Type;
2603: v_job_id_old PER_JOBS.JOB_ID%type;
2604: v_job_id_new PER_JOBS.JOB_ID%type;
2605: v_billable_flag_old pa_resources_denorm.billable_flag%type;
2606: v_billable_flag_new pa_resources_denorm.billable_flag%type;
2607: v_utilize_flag_old pa_resources_denorm.utilization_flag%type;
2608: v_utilize_flag_new pa_resources_denorm.utilization_flag%type;
2609: v_schedulable_flag_old pa_resources_denorm.schedulable_flag%type;
2610: v_schedulable_flag_new pa_resources_denorm.schedulable_flag%type;

Line 2607: v_utilize_flag_old pa_resources_denorm.utilization_flag%type;

2603: v_job_id_old PER_JOBS.JOB_ID%type;
2604: v_job_id_new PER_JOBS.JOB_ID%type;
2605: v_billable_flag_old pa_resources_denorm.billable_flag%type;
2606: v_billable_flag_new pa_resources_denorm.billable_flag%type;
2607: v_utilize_flag_old pa_resources_denorm.utilization_flag%type;
2608: v_utilize_flag_new pa_resources_denorm.utilization_flag%type;
2609: v_schedulable_flag_old pa_resources_denorm.schedulable_flag%type;
2610: v_schedulable_flag_new pa_resources_denorm.schedulable_flag%type;
2611: v_msg_data VARCHAR2(2000);

Line 2608: v_utilize_flag_new pa_resources_denorm.utilization_flag%type;

2604: v_job_id_new PER_JOBS.JOB_ID%type;
2605: v_billable_flag_old pa_resources_denorm.billable_flag%type;
2606: v_billable_flag_new pa_resources_denorm.billable_flag%type;
2607: v_utilize_flag_old pa_resources_denorm.utilization_flag%type;
2608: v_utilize_flag_new pa_resources_denorm.utilization_flag%type;
2609: v_schedulable_flag_old pa_resources_denorm.schedulable_flag%type;
2610: v_schedulable_flag_new pa_resources_denorm.schedulable_flag%type;
2611: v_msg_data VARCHAR2(2000);
2612: v_msg_count NUMBER;

Line 2609: v_schedulable_flag_old pa_resources_denorm.schedulable_flag%type;

2605: v_billable_flag_old pa_resources_denorm.billable_flag%type;
2606: v_billable_flag_new pa_resources_denorm.billable_flag%type;
2607: v_utilize_flag_old pa_resources_denorm.utilization_flag%type;
2608: v_utilize_flag_new pa_resources_denorm.utilization_flag%type;
2609: v_schedulable_flag_old pa_resources_denorm.schedulable_flag%type;
2610: v_schedulable_flag_new pa_resources_denorm.schedulable_flag%type;
2611: v_msg_data VARCHAR2(2000);
2612: v_msg_count NUMBER;
2613:

Line 2610: v_schedulable_flag_new pa_resources_denorm.schedulable_flag%type;

2606: v_billable_flag_new pa_resources_denorm.billable_flag%type;
2607: v_utilize_flag_old pa_resources_denorm.utilization_flag%type;
2608: v_utilize_flag_new pa_resources_denorm.utilization_flag%type;
2609: v_schedulable_flag_old pa_resources_denorm.schedulable_flag%type;
2610: v_schedulable_flag_new pa_resources_denorm.schedulable_flag%type;
2611: v_msg_data VARCHAR2(2000);
2612: v_msg_count NUMBER;
2613:
2614: BEGIN

Line 2738: FROM pa_resources_denorm

2734: /*
2735: CURSOR all_job_res_recs IS
2736: SELECT person_id, min(resource_effective_start_date) resource_effective_start_date,
2737: max(resource_effective_end_date) resource_effective_end_date
2738: FROM pa_resources_denorm
2739: WHERE job_id = p_job_id
2740: GROUP BY person_id; */
2741:
2742: CURSOR all_job_res_recs IS -- Modified cursor for Bug 7336158

Line 2745: FROM pa_resources_denorm

2741:
2742: CURSOR all_job_res_recs IS -- Modified cursor for Bug 7336158
2743: SELECT person_id, min(resource_effective_start_date) resource_effective_start_date,
2744: max(resource_effective_end_date) resource_effective_end_date
2745: FROM pa_resources_denorm
2746: WHERE job_id = p_job_id
2747: AND resource_effective_end_date = (Select max(resource_effective_end_date)
2748: from pa_resources_denorm rd2
2749: where rd2.job_id = p_job_id

Line 2748: from pa_resources_denorm rd2

2744: max(resource_effective_end_date) resource_effective_end_date
2745: FROM pa_resources_denorm
2746: WHERE job_id = p_job_id
2747: AND resource_effective_end_date = (Select max(resource_effective_end_date)
2748: from pa_resources_denorm rd2
2749: where rd2.job_id = p_job_id
2750: AND (rd2.resource_effective_end_date >= sysdate OR rd2.resource_effective_end_date is null))
2751: GROUP BY person_id;
2752:

Line 2787: -- to end date the resources from pa_resources_denorm

2783: l_pull_res_flag := 'Y';
2784:
2785: ELSE
2786: -- If p_utilize_flag_old='Y' and p_utilize_flag_new ='N', we need
2787: -- to end date the resources from pa_resources_denorm
2788: IF p_utilize_flag_old ='Y' AND p_utilize_flag_new ='N' THEN
2789: l_end_date_res_flag := 'Y';
2790: END IF;
2791:

Line 2797: -- Update pa_resources_denorm

2793: log_message('p_utilize_flag_new: ' ||p_utilize_flag_new ||
2794: ',l_end_date_res_flag: '||l_end_date_res_flag);
2795: END IF;
2796:
2797: -- Update pa_resources_denorm
2798: call_billable_resoruce_denorm
2799: (P_job_id_old => P_job_id
2800: ,P_job_id_new => P_job_id
2801: ,P_billable_flag_old => P_billable_flag_old

Line 2918: -- End date all those resources who has the job from the pa_resources_denorm

2914: END;
2915: END LOOP;
2916:
2917: -----------------------------------------------------------------------------
2918: -- End date all those resources who has the job from the pa_resources_denorm
2919: -----------------------------------------------------------------------------
2920: ELSIF (l_end_date_res_flag = 'Y') THEN
2921: IF P_DEBUG_MODE = 'Y' THEN
2922: log_message('it will end date the resources');

Line 3153: end date in pa_resources_denorm and update FI data for the resource.

3149: END withdraw_cand_nominations;
3150:
3151:
3152: /* Procedure Update_EndDate calls Update_Resource_Denorm to update the
3153: end date in pa_resources_denorm and update FI data for the resource.
3154: This procedure now also handles automatic candidates withdrawal.
3155: It is called whenever a resource is terminated in HR, whenever
3156: the change in assignment organization which does not belong to Exp Hier,
3157: or whenever an organization is taken out from the Exp Hier. In these

Line 3182: FROM pa_resources_denorm

3178:
3179: CURSOR res_denorm_recs IS
3180: SELECT resource_effective_start_date,
3181: resource_effective_end_date
3182: FROM pa_resources_denorm
3183: WHERE person_id = p_person_id
3184: -- AND p_new_end_date >= resource_effective_start_date
3185: AND resource_effective_start_date >= p_old_start_date
3186: AND resource_effective_end_date <= p_old_end_date

Line 3199: l_count := 0; -- bug 7147575 : None records in pa_resources_denorm so far.

3195: -- Initialize the Error stack
3196: PA_DEBUG.init_err_stack('PA_HR_UPDATE_API.Update_EndDate');
3197: X_RETURN_STATUS := FND_API.G_RET_STS_SUCCESS;
3198:
3199: l_count := 0; -- bug 7147575 : None records in pa_resources_denorm so far.
3200:
3201: FOR rec IN res_denorm_recs LOOP
3202:
3203: l_count := l_count + 1 ; -- bug 7147575 :this means that there was atleast one record in pa_resources_denorm

Line 3203: l_count := l_count + 1 ; -- bug 7147575 :this means that there was atleast one record in pa_resources_denorm

3199: l_count := 0; -- bug 7147575 : None records in pa_resources_denorm so far.
3200:
3201: FOR rec IN res_denorm_recs LOOP
3202:
3203: l_count := l_count + 1 ; -- bug 7147575 :this means that there was atleast one record in pa_resources_denorm
3204:
3205: --dbms_output.put_line('resource_effective_start_date:' || rec.resource_effective_start_date);
3206: --dbms_output.put_line('resource_effective_end_date:' || rec.resource_effective_end_date);
3207:

Line 3259: IF (l_count > 0 ) THEN -- bug 7147575 : so now on, only if records are there in pa_resources_denorm, then only further code will get executed.

3255: END IF;
3256:
3257: END LOOP; --end FOR
3258:
3259: IF (l_count > 0 ) THEN -- bug 7147575 : so now on, only if records are there in pa_resources_denorm, then only further code will get executed.
3260:
3261: /*Call added for bug 5683340*/
3262: pa_resource_utils.init_fte_sync_wf( p_person_id => p_person_id,
3263: x_invol_term => l_invol_term,

Line 3327: /* Procedure Update_Org calls Update_Resource_Denorm and Create_Forecast_Item to update the organization and org_id for the resources in pa_resources_denorm table and regenerate forecast items for the resource respectively.

3323: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
3324: raise;
3325: END Update_EndDate;
3326:
3327: /* Procedure Update_Org calls Update_Resource_Denorm and Create_Forecast_Item to update the organization and org_id for the resources in pa_resources_denorm table and regenerate forecast items for the resource respectively.
3328: */
3329: PROCEDURE Update_Org(
3330: p_person_id IN per_all_people_f.person_id%TYPE,
3331: p_old_org_id IN per_all_assignments_f.organization_id%TYPE,

Line 3341: l_default_ou_old pa_resources_denorm.resource_org_id%TYPE;

3337: x_return_status OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
3338: x_msg_data OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
3339: x_msg_count OUT NOCOPY NUMBER) IS --File.Sql.39 bug 4440895
3340:
3341: l_default_ou_old pa_resources_denorm.resource_org_id%TYPE;
3342: l_default_ou_new pa_resources_denorm.resource_org_id%TYPE;
3343:
3344: l_resource_rec_old PA_RESOURCE_PVT.Resource_Denorm_Rec_Type;
3345: l_resource_rec_new PA_RESOURCE_PVT.Resource_Denorm_Rec_Type;

Line 3342: l_default_ou_new pa_resources_denorm.resource_org_id%TYPE;

3338: x_msg_data OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
3339: x_msg_count OUT NOCOPY NUMBER) IS --File.Sql.39 bug 4440895
3340:
3341: l_default_ou_old pa_resources_denorm.resource_org_id%TYPE;
3342: l_default_ou_new pa_resources_denorm.resource_org_id%TYPE;
3343:
3344: l_resource_rec_old PA_RESOURCE_PVT.Resource_Denorm_Rec_Type;
3345: l_resource_rec_new PA_RESOURCE_PVT.Resource_Denorm_Rec_Type;
3346:

Line 3357: FROM pa_resources_denorm

3353: -- for this HR assignment
3354: CURSOR res_denorm_recs IS
3355: SELECT resource_effective_start_date,
3356: resource_effective_end_date
3357: FROM pa_resources_denorm
3358: WHERE person_id = p_person_id
3359: AND resource_effective_start_date >= p_new_start_date
3360: AND resource_effective_end_date <= p_new_end_date
3361: ;

Line 3666: l_old_job_billable pa_resources_denorm.billable_flag%type;

3662: l_old_job_group_id per_job_groups.job_group_id%type;
3663: l_new_job_group_id per_job_groups.job_group_id%type;
3664: l_old_job_level NUMBER;
3665: l_new_job_level NUMBER;
3666: l_old_job_billable pa_resources_denorm.billable_flag%type;
3667: l_new_job_billable pa_resources_denorm.billable_flag%type;
3668: l_old_job_utilizable pa_resources_denorm.utilization_flag%type;
3669: l_new_job_utilizable pa_resources_denorm.utilization_flag%type;
3670: l_old_job_schedulable pa_resources_denorm.schedulable_flag%type;

Line 3667: l_new_job_billable pa_resources_denorm.billable_flag%type;

3663: l_new_job_group_id per_job_groups.job_group_id%type;
3664: l_old_job_level NUMBER;
3665: l_new_job_level NUMBER;
3666: l_old_job_billable pa_resources_denorm.billable_flag%type;
3667: l_new_job_billable pa_resources_denorm.billable_flag%type;
3668: l_old_job_utilizable pa_resources_denorm.utilization_flag%type;
3669: l_new_job_utilizable pa_resources_denorm.utilization_flag%type;
3670: l_old_job_schedulable pa_resources_denorm.schedulable_flag%type;
3671: l_new_job_schedulable pa_resources_denorm.schedulable_flag%type;

Line 3668: l_old_job_utilizable pa_resources_denorm.utilization_flag%type;

3664: l_old_job_level NUMBER;
3665: l_new_job_level NUMBER;
3666: l_old_job_billable pa_resources_denorm.billable_flag%type;
3667: l_new_job_billable pa_resources_denorm.billable_flag%type;
3668: l_old_job_utilizable pa_resources_denorm.utilization_flag%type;
3669: l_new_job_utilizable pa_resources_denorm.utilization_flag%type;
3670: l_old_job_schedulable pa_resources_denorm.schedulable_flag%type;
3671: l_new_job_schedulable pa_resources_denorm.schedulable_flag%type;
3672: P_DEBUG_MODE VARCHAR2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');

Line 3669: l_new_job_utilizable pa_resources_denorm.utilization_flag%type;

3665: l_new_job_level NUMBER;
3666: l_old_job_billable pa_resources_denorm.billable_flag%type;
3667: l_new_job_billable pa_resources_denorm.billable_flag%type;
3668: l_old_job_utilizable pa_resources_denorm.utilization_flag%type;
3669: l_new_job_utilizable pa_resources_denorm.utilization_flag%type;
3670: l_old_job_schedulable pa_resources_denorm.schedulable_flag%type;
3671: l_new_job_schedulable pa_resources_denorm.schedulable_flag%type;
3672: P_DEBUG_MODE VARCHAR2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
3673:

Line 3670: l_old_job_schedulable pa_resources_denorm.schedulable_flag%type;

3666: l_old_job_billable pa_resources_denorm.billable_flag%type;
3667: l_new_job_billable pa_resources_denorm.billable_flag%type;
3668: l_old_job_utilizable pa_resources_denorm.utilization_flag%type;
3669: l_new_job_utilizable pa_resources_denorm.utilization_flag%type;
3670: l_old_job_schedulable pa_resources_denorm.schedulable_flag%type;
3671: l_new_job_schedulable pa_resources_denorm.schedulable_flag%type;
3672: P_DEBUG_MODE VARCHAR2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
3673:
3674: -- Cursor to get all denormalized resource records

Line 3671: l_new_job_schedulable pa_resources_denorm.schedulable_flag%type;

3667: l_new_job_billable pa_resources_denorm.billable_flag%type;
3668: l_old_job_utilizable pa_resources_denorm.utilization_flag%type;
3669: l_new_job_utilizable pa_resources_denorm.utilization_flag%type;
3670: l_old_job_schedulable pa_resources_denorm.schedulable_flag%type;
3671: l_new_job_schedulable pa_resources_denorm.schedulable_flag%type;
3672: P_DEBUG_MODE VARCHAR2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
3673:
3674: -- Cursor to get all denormalized resource records
3675: -- for this HR assignment

Line 3679: FROM pa_resources_denorm

3675: -- for this HR assignment
3676: CURSOR res_denorm_recs IS
3677: SELECT resource_effective_start_date,
3678: resource_effective_end_date
3679: FROM pa_resources_denorm
3680: WHERE person_id = p_person_id
3681: AND resource_effective_start_date >= p_new_start_date
3682: AND resource_effective_end_date <= p_new_end_date;
3683:

Line 3687: FROM pa_resources_denorm

3683:
3684: CURSOR min_max_res_dates IS
3685: SELECT min(resource_effective_start_date) resource_effective_start_date,
3686: max(resource_effective_end_date) resource_effective_end_date
3687: FROM pa_resources_denorm
3688: WHERE job_id = p_old_job
3689: AND person_id = p_person_id
3690: GROUP BY person_id;
3691:

Line 3791: -- loop through all record of the person in pa_resources_denorm and update

3787: l_resource_rec_new.utilization_flag := l_new_job_utilizable;
3788: l_resource_rec_old.schedulable_flag := l_old_job_schedulable;
3789: l_resource_rec_new.schedulable_flag := l_new_job_schedulable;
3790:
3791: -- loop through all record of the person in pa_resources_denorm and update
3792: -- the job flags
3793: FOR rec IN res_denorm_recs LOOP
3794: l_resource_rec_new.resource_effective_start_date := rec.resource_effective_start_date;
3795: l_resource_rec_new.resource_effective_end_date := rec.resource_effective_end_date;

Line 3870: l_manager_name pa_resources_denorm.manager_name%TYPE;

3866: l_resource_rec_old PA_RESOURCE_PVT.Resource_Denorm_Rec_Type;
3867: l_resource_rec_new PA_RESOURCE_PVT.Resource_Denorm_Rec_Type;
3868:
3869: l_return_status VARCHAR2(1);
3870: l_manager_name pa_resources_denorm.manager_name%TYPE;
3871:
3872: CURSOR res_denorm_recs IS
3873: SELECT resource_effective_start_date,
3874: resource_effective_end_date

Line 3875: FROM pa_resources_denorm

3871:
3872: CURSOR res_denorm_recs IS
3873: SELECT resource_effective_start_date,
3874: resource_effective_end_date
3875: FROM pa_resources_denorm
3876: WHERE person_id = p_person_id
3877: AND p_new_end_date >= resource_effective_start_date
3878: AND resource_effective_start_date >= p_new_start_date
3879: AND resource_effective_end_date <= p_new_end_date

Line 3884: FROM pa_resources_denorm

3880: ;
3881:
3882: CURSOR manager_name IS
3883: SELECT DISTINCT resource_name
3884: FROM pa_resources_denorm
3885: WHERE person_id = p_new_supervisor
3886: ;
3887:
3888: BEGIN

Line 4223: -- Procedure to delete records in pa_resources_denorm

4219: RAISE ;
4220: END ;
4221:
4222: -- Added for bug 3957522
4223: -- Procedure to delete records in pa_resources_denorm
4224: PROCEDURE Delete_PA_Resource_Denorm(
4225: p_person_id IN per_all_people_f.person_id%TYPE,
4226: p_old_start_date IN per_all_assignments_f.effective_start_date%TYPE,
4227: p_old_end_date IN per_all_assignments_f.effective_end_date%TYPE,

Line 4236: FROM pa_resources_denorm

4232:
4233: CURSOR res_denorm_recs IS
4234: SELECT resource_effective_start_date,
4235: resource_effective_end_date
4236: FROM pa_resources_denorm
4237: WHERE person_id = p_person_id
4238: AND resource_effective_start_date >= p_old_start_date
4239: AND resource_effective_end_date <= p_old_end_date
4240: ;

Line 4249: DELETE FROM PA_RESOURCES_DENORM

4245: X_RETURN_STATUS := FND_API.G_RET_STS_SUCCESS;
4246:
4247: FOR rec IN res_denorm_recs LOOP
4248: --Delete the record
4249: DELETE FROM PA_RESOURCES_DENORM
4250: WHERE person_id = p_person_id
4251: AND resource_effective_start_date = rec.resource_effective_start_date;
4252:
4253: END LOOP; --end FOR