DBA Data[Home] [Help]

APPS.PA_HR_UPDATE_API dependencies on PA_RESOURCES_DENORM

Line 437: -- which actually updates the pa_resources_denorm entity

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

Line 512: ,P_job_level_old pa_resources_denorm.resource_job_level%type

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

Line 513: ,P_job_level_new pa_resources_denorm.resource_job_level%type

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

Line 520: l_job_level_old pa_resources_denorm.resource_job_level%type;

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

Line 521: l_job_level_new pa_resources_denorm.resource_job_level%type;

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

Line 925: ,P_job_level_old pa_resources_denorm.resource_job_level%type

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

Line 926: ,P_job_level_new pa_resources_denorm.resource_job_level%type

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

Line 935: l_job_level_old pa_resources_denorm.resource_job_level%type;

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

Line 936: l_job_level_new pa_resources_denorm.resource_job_level%type;

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

Line 1048: ,P_job_level_old pa_resources_denorm.resource_job_level%type

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

Line 1049: ,P_job_level_new pa_resources_denorm.resource_job_level%type

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

Line 1056: l_job_level_old pa_resources_denorm.resource_job_level%type;

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

Line 1057: l_job_level_new pa_resources_denorm.resource_job_level%type;

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

Line 1463: ,P_resource_id IN Pa_Resources_denorm.resource_id%type

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

Line 1465: ,P_person_id IN Pa_Resources_denorm.person_id%type

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

Line 1484: FROM pa_resources_denorm

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

Line 1491: from pa_resources_denorm rd2

1487: AND resource_effective_start_date >= p_start_date
1488: AND resource_effective_end_date <= p_end_date_old
1489: AND resource_effective_end_date =
1490: (Select max(resource_effective_end_date)
1491: from pa_resources_denorm rd2
1492: where rd2.person_id = p_person_id)
1493: -- bug#10235228
1494: ;
1495: BEGIN

Line 1699: -- reflect the changes in pa_resources_denorm entity

1695: -- check for whether the default OU is changed if so call
1696: -- check OU change api to update the resource OU entity
1697: If (NVL(P_default_OU_old,-99) <> nvl(P_default_OU_new,-99)) then
1698: -- if OU is updated then call resource denorm api to
1699: -- reflect the changes in pa_resources_denorm entity
1700: If v_person_id is NOT NULL then
1701:
1702:
1703: Update_OU_resource

Line 2592: -- which actually updates the pa_resources_denorm entity

2588: END call_forcast_api;
2589:
2590:
2591: -- This Procedure makes calls to PA_RESOURCE_PVT.update_resource_denorm api
2592: -- which actually updates the pa_resources_denorm entity
2593: PROCEDURE call_billable_resoruce_denorm
2594: (P_job_id_old per_jobs.job_id%type
2595: ,P_job_id_new per_jobs.job_id%type
2596: ,P_billable_flag_old pa_resources_denorm.billable_flag%type

Line 2596: ,P_billable_flag_old pa_resources_denorm.billable_flag%type

2592: -- which actually updates the pa_resources_denorm entity
2593: PROCEDURE call_billable_resoruce_denorm
2594: (P_job_id_old per_jobs.job_id%type
2595: ,P_job_id_new per_jobs.job_id%type
2596: ,P_billable_flag_old pa_resources_denorm.billable_flag%type
2597: ,P_billable_flag_new pa_resources_denorm.billable_flag%type
2598: ,P_utilize_flag_old pa_resources_denorm.utilization_flag%type
2599: ,P_utilize_flag_new pa_resources_denorm.utilization_flag%type
2600: ,p_schedulable_flag_old pa_resources_denorm.schedulable_flag%type

Line 2597: ,P_billable_flag_new pa_resources_denorm.billable_flag%type

2593: PROCEDURE call_billable_resoruce_denorm
2594: (P_job_id_old per_jobs.job_id%type
2595: ,P_job_id_new per_jobs.job_id%type
2596: ,P_billable_flag_old pa_resources_denorm.billable_flag%type
2597: ,P_billable_flag_new pa_resources_denorm.billable_flag%type
2598: ,P_utilize_flag_old pa_resources_denorm.utilization_flag%type
2599: ,P_utilize_flag_new pa_resources_denorm.utilization_flag%type
2600: ,p_schedulable_flag_old pa_resources_denorm.schedulable_flag%type
2601: ,p_schedulable_flag_new pa_resources_denorm.schedulable_flag%type

Line 2598: ,P_utilize_flag_old pa_resources_denorm.utilization_flag%type

2594: (P_job_id_old per_jobs.job_id%type
2595: ,P_job_id_new per_jobs.job_id%type
2596: ,P_billable_flag_old pa_resources_denorm.billable_flag%type
2597: ,P_billable_flag_new pa_resources_denorm.billable_flag%type
2598: ,P_utilize_flag_old pa_resources_denorm.utilization_flag%type
2599: ,P_utilize_flag_new pa_resources_denorm.utilization_flag%type
2600: ,p_schedulable_flag_old pa_resources_denorm.schedulable_flag%type
2601: ,p_schedulable_flag_new pa_resources_denorm.schedulable_flag%type
2602: ,x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895

Line 2599: ,P_utilize_flag_new pa_resources_denorm.utilization_flag%type

2595: ,P_job_id_new per_jobs.job_id%type
2596: ,P_billable_flag_old pa_resources_denorm.billable_flag%type
2597: ,P_billable_flag_new pa_resources_denorm.billable_flag%type
2598: ,P_utilize_flag_old pa_resources_denorm.utilization_flag%type
2599: ,P_utilize_flag_new pa_resources_denorm.utilization_flag%type
2600: ,p_schedulable_flag_old pa_resources_denorm.schedulable_flag%type
2601: ,p_schedulable_flag_new pa_resources_denorm.schedulable_flag%type
2602: ,x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
2603: ,x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895

Line 2600: ,p_schedulable_flag_old pa_resources_denorm.schedulable_flag%type

2596: ,P_billable_flag_old pa_resources_denorm.billable_flag%type
2597: ,P_billable_flag_new pa_resources_denorm.billable_flag%type
2598: ,P_utilize_flag_old pa_resources_denorm.utilization_flag%type
2599: ,P_utilize_flag_new pa_resources_denorm.utilization_flag%type
2600: ,p_schedulable_flag_old pa_resources_denorm.schedulable_flag%type
2601: ,p_schedulable_flag_new pa_resources_denorm.schedulable_flag%type
2602: ,x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
2603: ,x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
2604: ,x_msg_count OUT NOCOPY NUMBER --File.Sql.39 bug 4440895

Line 2601: ,p_schedulable_flag_new pa_resources_denorm.schedulable_flag%type

2597: ,P_billable_flag_new pa_resources_denorm.billable_flag%type
2598: ,P_utilize_flag_old pa_resources_denorm.utilization_flag%type
2599: ,P_utilize_flag_new pa_resources_denorm.utilization_flag%type
2600: ,p_schedulable_flag_old pa_resources_denorm.schedulable_flag%type
2601: ,p_schedulable_flag_new pa_resources_denorm.schedulable_flag%type
2602: ,x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
2603: ,x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
2604: ,x_msg_count OUT NOCOPY NUMBER --File.Sql.39 bug 4440895
2605: ) IS

Line 2612: v_billable_flag_old pa_resources_denorm.billable_flag%type;

2608: v_resource_rec_old PA_RESOURCE_PVT.Resource_Denorm_Rec_Type;
2609: v_resource_rec_new PA_RESOURCE_PVT.Resource_Denorm_Rec_Type;
2610: v_job_id_old PER_JOBS.JOB_ID%type;
2611: v_job_id_new PER_JOBS.JOB_ID%type;
2612: v_billable_flag_old pa_resources_denorm.billable_flag%type;
2613: v_billable_flag_new pa_resources_denorm.billable_flag%type;
2614: v_utilize_flag_old pa_resources_denorm.utilization_flag%type;
2615: v_utilize_flag_new pa_resources_denorm.utilization_flag%type;
2616: v_schedulable_flag_old pa_resources_denorm.schedulable_flag%type;

Line 2613: v_billable_flag_new pa_resources_denorm.billable_flag%type;

2609: v_resource_rec_new PA_RESOURCE_PVT.Resource_Denorm_Rec_Type;
2610: v_job_id_old PER_JOBS.JOB_ID%type;
2611: v_job_id_new PER_JOBS.JOB_ID%type;
2612: v_billable_flag_old pa_resources_denorm.billable_flag%type;
2613: v_billable_flag_new pa_resources_denorm.billable_flag%type;
2614: v_utilize_flag_old pa_resources_denorm.utilization_flag%type;
2615: v_utilize_flag_new pa_resources_denorm.utilization_flag%type;
2616: v_schedulable_flag_old pa_resources_denorm.schedulable_flag%type;
2617: v_schedulable_flag_new pa_resources_denorm.schedulable_flag%type;

Line 2614: v_utilize_flag_old pa_resources_denorm.utilization_flag%type;

2610: v_job_id_old PER_JOBS.JOB_ID%type;
2611: v_job_id_new PER_JOBS.JOB_ID%type;
2612: v_billable_flag_old pa_resources_denorm.billable_flag%type;
2613: v_billable_flag_new pa_resources_denorm.billable_flag%type;
2614: v_utilize_flag_old pa_resources_denorm.utilization_flag%type;
2615: v_utilize_flag_new pa_resources_denorm.utilization_flag%type;
2616: v_schedulable_flag_old pa_resources_denorm.schedulable_flag%type;
2617: v_schedulable_flag_new pa_resources_denorm.schedulable_flag%type;
2618: v_msg_data VARCHAR2(2000);

Line 2615: v_utilize_flag_new pa_resources_denorm.utilization_flag%type;

2611: v_job_id_new PER_JOBS.JOB_ID%type;
2612: v_billable_flag_old pa_resources_denorm.billable_flag%type;
2613: v_billable_flag_new pa_resources_denorm.billable_flag%type;
2614: v_utilize_flag_old pa_resources_denorm.utilization_flag%type;
2615: v_utilize_flag_new pa_resources_denorm.utilization_flag%type;
2616: v_schedulable_flag_old pa_resources_denorm.schedulable_flag%type;
2617: v_schedulable_flag_new pa_resources_denorm.schedulable_flag%type;
2618: v_msg_data VARCHAR2(2000);
2619: v_msg_count NUMBER;

Line 2616: v_schedulable_flag_old pa_resources_denorm.schedulable_flag%type;

2612: v_billable_flag_old pa_resources_denorm.billable_flag%type;
2613: v_billable_flag_new pa_resources_denorm.billable_flag%type;
2614: v_utilize_flag_old pa_resources_denorm.utilization_flag%type;
2615: v_utilize_flag_new pa_resources_denorm.utilization_flag%type;
2616: v_schedulable_flag_old pa_resources_denorm.schedulable_flag%type;
2617: v_schedulable_flag_new pa_resources_denorm.schedulable_flag%type;
2618: v_msg_data VARCHAR2(2000);
2619: v_msg_count NUMBER;
2620:

Line 2617: v_schedulable_flag_new pa_resources_denorm.schedulable_flag%type;

2613: v_billable_flag_new pa_resources_denorm.billable_flag%type;
2614: v_utilize_flag_old pa_resources_denorm.utilization_flag%type;
2615: v_utilize_flag_new pa_resources_denorm.utilization_flag%type;
2616: v_schedulable_flag_old pa_resources_denorm.schedulable_flag%type;
2617: v_schedulable_flag_new pa_resources_denorm.schedulable_flag%type;
2618: v_msg_data VARCHAR2(2000);
2619: v_msg_count NUMBER;
2620:
2621: BEGIN

Line 2745: FROM pa_resources_denorm

2741: /*
2742: CURSOR all_job_res_recs IS
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: GROUP BY person_id; */
2748:
2749: CURSOR all_job_res_recs IS -- Modified cursor for Bug 7336158

Line 2752: FROM pa_resources_denorm

2748:
2749: CURSOR all_job_res_recs IS -- Modified cursor for Bug 7336158
2750: SELECT person_id, min(resource_effective_start_date) resource_effective_start_date,
2751: max(resource_effective_end_date) resource_effective_end_date
2752: FROM pa_resources_denorm
2753: WHERE job_id = p_job_id
2754: AND resource_effective_end_date = (Select max(resource_effective_end_date)
2755: from pa_resources_denorm rd2
2756: where rd2.job_id = p_job_id

Line 2755: from pa_resources_denorm rd2

2751: max(resource_effective_end_date) resource_effective_end_date
2752: FROM pa_resources_denorm
2753: WHERE job_id = p_job_id
2754: AND resource_effective_end_date = (Select max(resource_effective_end_date)
2755: from pa_resources_denorm rd2
2756: where rd2.job_id = p_job_id
2757: AND (rd2.resource_effective_end_date >= sysdate OR rd2.resource_effective_end_date is null))
2758: GROUP BY person_id;
2759:

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

2790: l_pull_res_flag := 'Y';
2791:
2792: ELSE
2793: -- If p_utilize_flag_old='Y' and p_utilize_flag_new ='N', we need
2794: -- to end date the resources from pa_resources_denorm
2795: IF p_utilize_flag_old ='Y' AND p_utilize_flag_new ='N' THEN
2796: l_end_date_res_flag := 'Y';
2797: END IF;
2798:

Line 2804: -- Update pa_resources_denorm

2800: log_message('p_utilize_flag_new: ' ||p_utilize_flag_new ||
2801: ',l_end_date_res_flag: '||l_end_date_res_flag);
2802: END IF;
2803:
2804: -- Update pa_resources_denorm
2805: call_billable_resoruce_denorm
2806: (P_job_id_old => P_job_id
2807: ,P_job_id_new => P_job_id
2808: ,P_billable_flag_old => P_billable_flag_old

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

2921: END;
2922: END LOOP;
2923:
2924: -----------------------------------------------------------------------------
2925: -- End date all those resources who has the job from the pa_resources_denorm
2926: -----------------------------------------------------------------------------
2927: ELSIF (l_end_date_res_flag = 'Y') THEN
2928: IF P_DEBUG_MODE = 'Y' THEN
2929: log_message('it will end date the resources');

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

3175: END withdraw_cand_nominations;
3176:
3177:
3178: /* Procedure Update_EndDate calls Update_Resource_Denorm to update the
3179: end date in pa_resources_denorm and update FI data for the resource.
3180: This procedure now also handles automatic candidates withdrawal.
3181: It is called whenever a resource is terminated in HR, whenever
3182: the change in assignment organization which does not belong to Exp Hier,
3183: or whenever an organization is taken out from the Exp Hier. In these

Line 3208: FROM pa_resources_denorm

3204:
3205: CURSOR res_denorm_recs IS
3206: SELECT resource_effective_start_date,
3207: resource_effective_end_date
3208: FROM pa_resources_denorm
3209: WHERE person_id = p_person_id
3210: -- AND p_new_end_date >= resource_effective_start_date
3211: AND resource_effective_start_date >= p_old_start_date
3212: AND resource_effective_end_date <= p_old_end_date

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

3244: -- Initialize the Error stack
3245: PA_DEBUG.init_err_stack('PA_HR_UPDATE_API.Update_EndDate');
3246: X_RETURN_STATUS := FND_API.G_RET_STS_SUCCESS;
3247:
3248: l_count := 0; -- bug 7147575 : None records in pa_resources_denorm so far.
3249:
3250: FOR rec IN res_denorm_recs LOOP
3251:
3252: /*Bug 9838014 Start

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

3249:
3250: FOR rec IN res_denorm_recs LOOP
3251:
3252: /*Bug 9838014 Start
3253: l_count := l_count + 1 ; -- bug 7147575 :this means that there was atleast one record in pa_resources_denorm
3254:
3255: --dbms_output.put_line('resource_effective_start_date:' || rec.resource_effective_start_date);
3256: --dbms_output.put_line('resource_effective_end_date:' || rec.resource_effective_end_date);
3257:

Line 3327: 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.

3323: END IF;
3324:
3325: END LOOP; --end FOR
3326:
3327: 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.
3328:
3329: /*Call added for bug 5683340*/
3330: pa_resource_utils.init_fte_sync_wf( p_person_id => p_person_id,
3331: x_invol_term => l_invol_term,

Line 3447: /* 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.

3443: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
3444: raise;
3445: END Update_EndDate;
3446:
3447: /* 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.
3448: */
3449: PROCEDURE Update_Org(
3450: p_person_id IN per_all_people_f.person_id%TYPE,
3451: p_old_org_id IN per_all_assignments_f.organization_id%TYPE,

Line 3461: l_default_ou_old pa_resources_denorm.resource_org_id%TYPE;

3457: x_return_status OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
3458: x_msg_data OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
3459: x_msg_count OUT NOCOPY NUMBER) IS --File.Sql.39 bug 4440895
3460:
3461: l_default_ou_old pa_resources_denorm.resource_org_id%TYPE;
3462: l_default_ou_new pa_resources_denorm.resource_org_id%TYPE;
3463:
3464: l_resource_rec_old PA_RESOURCE_PVT.Resource_Denorm_Rec_Type;
3465: l_resource_rec_new PA_RESOURCE_PVT.Resource_Denorm_Rec_Type;

Line 3462: l_default_ou_new pa_resources_denorm.resource_org_id%TYPE;

3458: x_msg_data OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
3459: x_msg_count OUT NOCOPY NUMBER) IS --File.Sql.39 bug 4440895
3460:
3461: l_default_ou_old pa_resources_denorm.resource_org_id%TYPE;
3462: l_default_ou_new pa_resources_denorm.resource_org_id%TYPE;
3463:
3464: l_resource_rec_old PA_RESOURCE_PVT.Resource_Denorm_Rec_Type;
3465: l_resource_rec_new PA_RESOURCE_PVT.Resource_Denorm_Rec_Type;
3466:

Line 3477: FROM pa_resources_denorm

3473: -- for this HR assignment
3474: CURSOR res_denorm_recs IS
3475: SELECT resource_effective_start_date,
3476: resource_effective_end_date
3477: FROM pa_resources_denorm
3478: WHERE person_id = p_person_id
3479: AND resource_effective_start_date >= p_new_start_date
3480: AND resource_effective_end_date <= p_new_end_date
3481: ;

Line 3787: l_old_job_billable pa_resources_denorm.billable_flag%type;

3783: l_old_job_group_id per_job_groups.job_group_id%type;
3784: l_new_job_group_id per_job_groups.job_group_id%type;
3785: l_old_job_level NUMBER;
3786: l_new_job_level NUMBER;
3787: l_old_job_billable pa_resources_denorm.billable_flag%type;
3788: l_new_job_billable pa_resources_denorm.billable_flag%type;
3789: l_old_job_utilizable pa_resources_denorm.utilization_flag%type;
3790: l_new_job_utilizable pa_resources_denorm.utilization_flag%type;
3791: l_old_job_schedulable pa_resources_denorm.schedulable_flag%type;

Line 3788: l_new_job_billable pa_resources_denorm.billable_flag%type;

3784: l_new_job_group_id per_job_groups.job_group_id%type;
3785: l_old_job_level NUMBER;
3786: l_new_job_level NUMBER;
3787: l_old_job_billable pa_resources_denorm.billable_flag%type;
3788: l_new_job_billable pa_resources_denorm.billable_flag%type;
3789: l_old_job_utilizable pa_resources_denorm.utilization_flag%type;
3790: l_new_job_utilizable pa_resources_denorm.utilization_flag%type;
3791: l_old_job_schedulable pa_resources_denorm.schedulable_flag%type;
3792: l_new_job_schedulable pa_resources_denorm.schedulable_flag%type;

Line 3789: l_old_job_utilizable pa_resources_denorm.utilization_flag%type;

3785: l_old_job_level NUMBER;
3786: l_new_job_level NUMBER;
3787: l_old_job_billable pa_resources_denorm.billable_flag%type;
3788: l_new_job_billable pa_resources_denorm.billable_flag%type;
3789: l_old_job_utilizable pa_resources_denorm.utilization_flag%type;
3790: l_new_job_utilizable pa_resources_denorm.utilization_flag%type;
3791: l_old_job_schedulable pa_resources_denorm.schedulable_flag%type;
3792: l_new_job_schedulable pa_resources_denorm.schedulable_flag%type;
3793: P_DEBUG_MODE VARCHAR2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');

Line 3790: l_new_job_utilizable pa_resources_denorm.utilization_flag%type;

3786: l_new_job_level NUMBER;
3787: l_old_job_billable pa_resources_denorm.billable_flag%type;
3788: l_new_job_billable pa_resources_denorm.billable_flag%type;
3789: l_old_job_utilizable pa_resources_denorm.utilization_flag%type;
3790: l_new_job_utilizable pa_resources_denorm.utilization_flag%type;
3791: l_old_job_schedulable pa_resources_denorm.schedulable_flag%type;
3792: l_new_job_schedulable pa_resources_denorm.schedulable_flag%type;
3793: P_DEBUG_MODE VARCHAR2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
3794:

Line 3791: l_old_job_schedulable pa_resources_denorm.schedulable_flag%type;

3787: l_old_job_billable pa_resources_denorm.billable_flag%type;
3788: l_new_job_billable pa_resources_denorm.billable_flag%type;
3789: l_old_job_utilizable pa_resources_denorm.utilization_flag%type;
3790: l_new_job_utilizable pa_resources_denorm.utilization_flag%type;
3791: l_old_job_schedulable pa_resources_denorm.schedulable_flag%type;
3792: l_new_job_schedulable pa_resources_denorm.schedulable_flag%type;
3793: P_DEBUG_MODE VARCHAR2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
3794:
3795: -- Cursor to get all denormalized resource records

Line 3792: l_new_job_schedulable pa_resources_denorm.schedulable_flag%type;

3788: l_new_job_billable pa_resources_denorm.billable_flag%type;
3789: l_old_job_utilizable pa_resources_denorm.utilization_flag%type;
3790: l_new_job_utilizable pa_resources_denorm.utilization_flag%type;
3791: l_old_job_schedulable pa_resources_denorm.schedulable_flag%type;
3792: l_new_job_schedulable pa_resources_denorm.schedulable_flag%type;
3793: P_DEBUG_MODE VARCHAR2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
3794:
3795: -- Cursor to get all denormalized resource records
3796: -- for this HR assignment

Line 3800: FROM pa_resources_denorm

3796: -- for this HR assignment
3797: CURSOR res_denorm_recs IS
3798: SELECT resource_effective_start_date,
3799: resource_effective_end_date
3800: FROM pa_resources_denorm
3801: WHERE person_id = p_person_id
3802: AND resource_effective_start_date >= p_new_start_date
3803: AND resource_effective_end_date <= p_new_end_date;
3804: --Bug 9047714 Start

Line 3808: FROM pa_resources_denorm

3804: --Bug 9047714 Start
3805: /*CURSOR min_max_res_dates IS
3806: SELECT min(resource_effective_start_date) resource_effective_start_date,
3807: max(resource_effective_end_date) resource_effective_end_date
3808: FROM pa_resources_denorm
3809: WHERE job_id = p_old_job
3810: AND person_id = p_person_id
3811: GROUP BY person_id;*/
3812: CURSOR min_max_res_dates IS

Line 3815: FROM pa_resources_denorm

3811: GROUP BY person_id;*/
3812: CURSOR min_max_res_dates IS
3813: SELECT min(resource_effective_start_date) resource_effective_start_date,
3814: max(resource_effective_end_date) resource_effective_end_date
3815: FROM pa_resources_denorm
3816: WHERE job_id = p_old_job
3817: AND person_id = p_person_id
3818: AND resource_effective_end_date = (Select max(resource_effective_end_date)
3819: from pa_resources_denorm rd2

Line 3819: from pa_resources_denorm rd2

3815: FROM pa_resources_denorm
3816: WHERE job_id = p_old_job
3817: AND person_id = p_person_id
3818: AND resource_effective_end_date = (Select max(resource_effective_end_date)
3819: from pa_resources_denorm rd2
3820: where rd2.job_id = p_old_job
3821: AND rd2.person_id = p_person_id
3822: AND (rd2.resource_effective_end_date >= sysdate OR rd2.resource_effective_end_date is null))
3823: GROUP BY person_id;

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

3921: l_resource_rec_new.utilization_flag := l_new_job_utilizable;
3922: l_resource_rec_old.schedulable_flag := l_old_job_schedulable;
3923: l_resource_rec_new.schedulable_flag := l_new_job_schedulable;
3924:
3925: -- loop through all record of the person in pa_resources_denorm and update
3926: -- the job flags
3927: FOR rec IN res_denorm_recs LOOP
3928: l_resource_rec_new.resource_effective_start_date := rec.resource_effective_start_date;
3929: l_resource_rec_new.resource_effective_end_date := rec.resource_effective_end_date;

Line 4006: l_manager_name pa_resources_denorm.manager_name%TYPE;

4002: l_resource_rec_old PA_RESOURCE_PVT.Resource_Denorm_Rec_Type;
4003: l_resource_rec_new PA_RESOURCE_PVT.Resource_Denorm_Rec_Type;
4004:
4005: l_return_status VARCHAR2(1);
4006: l_manager_name pa_resources_denorm.manager_name%TYPE;
4007:
4008: CURSOR res_denorm_recs IS
4009: SELECT resource_effective_start_date,
4010: resource_effective_end_date

Line 4011: FROM pa_resources_denorm

4007:
4008: CURSOR res_denorm_recs IS
4009: SELECT resource_effective_start_date,
4010: resource_effective_end_date
4011: FROM pa_resources_denorm
4012: WHERE person_id = p_person_id
4013: AND p_new_end_date >= resource_effective_start_date
4014: AND resource_effective_start_date >= p_new_start_date
4015: AND resource_effective_end_date <= p_new_end_date

Line 4020: FROM pa_resources_denorm

4016: ;
4017:
4018: CURSOR manager_name IS
4019: SELECT DISTINCT resource_name
4020: FROM pa_resources_denorm
4021: WHERE person_id = p_new_supervisor
4022: ;
4023:
4024: BEGIN

Line 4362: -- Procedure to delete records in pa_resources_denorm

4358: RAISE ;
4359: END ;
4360:
4361: -- Added for bug 3957522
4362: -- Procedure to delete records in pa_resources_denorm
4363: PROCEDURE Delete_PA_Resource_Denorm(
4364: p_person_id IN per_all_people_f.person_id%TYPE,
4365: p_old_start_date IN per_all_assignments_f.effective_start_date%TYPE,
4366: p_old_end_date IN per_all_assignments_f.effective_end_date%TYPE,

Line 4375: FROM pa_resources_denorm

4371:
4372: CURSOR res_denorm_recs IS
4373: SELECT resource_effective_start_date,
4374: resource_effective_end_date
4375: FROM pa_resources_denorm
4376: WHERE person_id = p_person_id
4377: AND resource_effective_start_date >= p_old_start_date
4378: AND resource_effective_end_date <= p_old_end_date
4379: ;

Line 4388: DELETE FROM PA_RESOURCES_DENORM

4384: X_RETURN_STATUS := FND_API.G_RET_STS_SUCCESS;
4385:
4386: FOR rec IN res_denorm_recs LOOP
4387: --Delete the record
4388: DELETE FROM PA_RESOURCES_DENORM
4389: WHERE person_id = p_person_id
4390: AND resource_effective_start_date = rec.resource_effective_start_date;
4391:
4392: END LOOP; --end FOR