184: -- if x_err_code > 0, then assign
185: -- zero to x_err_code.
186: -- 17-JUL-2000 Mohnish
187: -- added code for ROLE BASED SECURITY:
188: -- added the call to PA_PROJECT_PARTIES_PUB.CREATE_PROJECT_PARTY
189: -- 19-JUL-2000 Mohnish incorporated PA_PROJECT_PARTIES_PUB API changes
190: -- 15-AUG-2000 Sakthi Modified 'PROJECTS' TO 'PA_PROJECTS' in PA_PROJECT_PARTIES_PUB API changes
191: --
192: -- 24-Sep-02 msundare Added additional parameter x_security_level
185: -- zero to x_err_code.
186: -- 17-JUL-2000 Mohnish
187: -- added code for ROLE BASED SECURITY:
188: -- added the call to PA_PROJECT_PARTIES_PUB.CREATE_PROJECT_PARTY
189: -- 19-JUL-2000 Mohnish incorporated PA_PROJECT_PARTIES_PUB API changes
190: -- 15-AUG-2000 Sakthi Modified 'PROJECTS' TO 'PA_PROJECTS' in PA_PROJECT_PARTIES_PUB API changes
191: --
192: -- 24-Sep-02 msundare Added additional parameter x_security_level
193: -- 18-DEC-02 gjain For bug 2588244 Added logic in copy_project to copy the
186: -- 17-JUL-2000 Mohnish
187: -- added code for ROLE BASED SECURITY:
188: -- added the call to PA_PROJECT_PARTIES_PUB.CREATE_PROJECT_PARTY
189: -- 19-JUL-2000 Mohnish incorporated PA_PROJECT_PARTIES_PUB API changes
190: -- 15-AUG-2000 Sakthi Modified 'PROJECTS' TO 'PA_PROJECTS' in PA_PROJECT_PARTIES_PUB API changes
191: --
192: -- 24-Sep-02 msundare Added additional parameter x_security_level
193: -- 18-DEC-02 gjain For bug 2588244 Added logic in copy_project to copy the
194: -- default calendar from the organization specified in quick entry
1840: rollback to copy_project;
1841: revert_proj_number(x_proj_number_gen_mode,x_new_project_number); -- Added for Bug# 7445534
1842: x_err_code := 102;
1843: x_err_stage := pa_project_core1.get_message_from_stack( 'PA_ERR_CR_PROJ_SUBTEAM');
1844: x_err_stack := x_err_stack||'->PA_PROJECT_PARTIES_PUB.CREATE_SUBTEAM';
1845: return;
1846: END IF;
1847: END LOOP;
1848: CLOSE get_subteams_csr; --Bug 3905797
2153: AND nvl(l_hz_parties,'N') = 'Y')
2154: )THEN -- Bug 3022296 End
2155: --bug 2778730
2156: /* Bug 3022296 : End */
2157: PA_PROJECT_PARTIES_PUB.CREATE_PROJECT_PARTY(
2158: p_api_version => 1.0 -- p_api_version
2159: , p_init_msg_list => FND_API.G_TRUE -- p_init_msg_list
2160: , p_commit => FND_API.G_FALSE -- p_commit
2161: , p_validate_only => FND_API.G_FALSE -- p_validate_only
2195: revert_proj_number(x_proj_number_gen_mode,x_new_project_number); -- Added for Bug# 7445534
2196: x_err_code := 125;
2197: -- x_err_stage := 'PA_NO_PROJ_CREATED'; --commented by ansari
2198: x_err_stage := pa_project_core1.get_message_from_stack( 'PA_ERR_CR_PROJ_PARTY_PUB');
2199: x_err_stack := x_err_stack||'->PA_PROJECT_PARTIES_PUB.CREATE_PROJECT_PARTY';
2200: return;
2201: END IF;
2202: END IF; --bug 2778730
2203: EXCEPTION WHEN OTHERS THEN
2204: x_err_code := 125;
2205: -- x_err_stage := pa_project_core1.get_message_from_stack( null );
2206: -- IF x_err_stage IS NULL
2207: -- THEN
2208: x_err_stage := 'API: '||'PA_PROJECT_PARTIES_PUB.CREATE_PROJECT_PARTY'||
2209: ' SQL error message: '||SUBSTR( SQLERRM,1,1900);
2210: -- END IF;
2211: rollback to copy_project;
2212: revert_proj_number(x_proj_number_gen_mode,x_new_project_number); -- Added for Bug# 7445534
2310:
2311: -- End bug#5859329
2312: /* Bug 7482391 changes end here*/
2313: if (f_flag = 'Y') then -- Bug 7482391
2314: PA_PROJECT_PARTIES_PUB.CREATE_PROJECT_PARTY(
2315: p_api_version => 1.0 -- p_api_version
2316: , p_init_msg_list => FND_API.G_TRUE -- p_init_msg_list
2317: , p_commit => FND_API.G_FALSE -- p_commit
2318: , p_validate_only => FND_API.G_FALSE -- p_validate_only
2354:
2355: x_err_code := 125;
2356: -- x_err_stage := 'PA_NO_PROJ_CREATED';
2357: x_err_stage := pa_project_core1.get_message_from_stack( 'PA_ERR_CR_PROJ_PARTY_PUB');
2358: x_err_stack := x_err_stack||'->PA_PROJECT_PARTIES_PUB.CREATE_PROJECT_PARTY';
2359: return;
2360: END IF;
2361: END IF; -- Bug 7482391
2362: END IF; --bug 2778730
2364: x_err_code := 125;
2365: -- x_err_stage := pa_project_core1.get_message_from_stack( null );
2366: -- IF x_err_stage IS NULL
2367: -- THEN
2368: x_err_stage := 'API: '||'PA_PROJECT_PARTIES_PUB.CREATE_PROJECT _PARTY'||' SQL error message: '||SUBSTR( SQLERRM,1,1900);
2369: -- END IF;
2370: rollback to copy_project;
2371: revert_proj_number(x_proj_number_gen_mode,x_new_project_number); -- Added for Bug# 7445534
2372: return;
2489:
2490: -- Don't want to copy over those project organizations that were created along with
2491: -- a customer billing account
2492: if c_cust_created_org_csr%NOTFOUND then
2493: PA_PROJECT_PARTIES_PUB.CREATE_PROJECT_PARTY(
2494: p_api_version => 1.0
2495: , p_init_msg_list => FND_API.G_TRUE
2496: , p_commit => FND_API.G_FALSE
2497: , p_validate_only => FND_API.G_FALSE
2524: rollback to copy_project;
2525: revert_proj_number(x_proj_number_gen_mode,x_new_project_number); -- Added for Bug# 7445534
2526: x_err_code := 125;
2527: x_err_stage := pa_project_core1.get_message_from_stack( 'PA_ERR_CR_PROJ_PARTY_PUB');
2528: x_err_stack := x_err_stack||'->PA_PROJECT_PARTIES_PUB.CREATE_PROJECT_PARTY';
2529: return;
2530: END IF;
2531: END IF;
2532:
2535: x_err_code := 125;
2536: -- x_err_stage := pa_project_core1.get_message_from_stack( null );
2537: -- IF x_err_stage IS NULL
2538: -- THEN
2539: x_err_stage := 'API: '||'PA_PROJECT_PARTIES_PUB.CREATE_PROJECT_PARTY'||
2540: ' SQL error message: '||SUBSTR( SQLERRM,1,1900);
2541: -- END IF;
2542: rollback to copy_project;
2543: revert_proj_number(x_proj_number_gen_mode,x_new_project_number); -- Added for Bug# 7445534
2555:
2556: -- Don't want to copy over those project organizations that were created along with
2557: -- a customer billing account
2558: if c_cust_created_org_csr%NOTFOUND then
2559: PA_PROJECT_PARTIES_PUB.CREATE_PROJECT_PARTY(
2560: p_api_version => 1.0
2561: , p_init_msg_list => FND_API.G_TRUE
2562: , p_commit => FND_API.G_FALSE
2563: , p_validate_only => FND_API.G_FALSE
2592: rollback to copy_project;
2593: revert_proj_number(x_proj_number_gen_mode,x_new_project_number); -- Added for Bug# 7445534
2594: x_err_code := 125;
2595: x_err_stage := pa_project_core1.get_message_from_stack( 'PA_ERR_CR_PROJ_PARTY_PUB');
2596: x_err_stack := x_err_stack||'->PA_PROJECT_PARTIES_PUB.CREATE_PROJECT_PARTY';
2597: return;
2598: END IF;
2599: END IF;
2600:
2603: x_err_code := 125;
2604: -- x_err_stage := pa_project_core1.get_message_from_stack( null );
2605: -- IF x_err_stage IS NULL
2606: -- THEN
2607: x_err_stage := 'API: '||'PA_PROJECT_PARTIES_PUB.CREATE_PROJECT _PARTY'||' SQL error message: '||SUBSTR( SQLERRM,1,1900);
2608: -- END IF;
2609: rollback to copy_project;
2610: revert_proj_number(x_proj_number_gen_mode,x_new_project_number); -- Added for Bug# 7445534
2611: return;
3021: CLOSE l_check_org_csr;
3022:
3023: if l_party_id is not null then
3024:
3025: PA_PROJECT_PARTIES_PUB.CREATE_PROJECT_PARTY(
3026: p_validate_only => FND_API.G_FALSE
3027: , p_object_id => x_new_project_id
3028: , p_OBJECT_TYPE => 'PA_PROJECTS'
3029: , p_project_role_id => 100
3050: rollback to copy_project;
3051: revert_proj_number(x_proj_number_gen_mode,x_new_project_number); -- Added for Bug# 7445534
3052: x_err_code := 167;
3053: x_err_stage := pa_project_core1.get_message_from_stack( 'PA_ERR_CR_PROJ_PARTY_PUB');
3054: x_err_stack := x_err_stack||'->PA_PROJECT_PARTIES_PUB.CREATE_PROJECT_PARTY';
3055: return;
3056: END IF;
3057:
3058: -- Add the new project party ID to the customers row
3068: x_err_code := 167;
3069: -- x_err_stage := pa_project_core1.get_message_from_stack( null );
3070: -- IF x_err_stage IS NULL
3071: -- THEN
3072: x_err_stage := 'API: '||'PA_PROJECT_PARTIES_PUB.CREATE_PROJECT_PARTY'||' SQL error message: '||SUBSTR( SQLERRM,1,1900);
3073: -- END IF;
3074: rollback to copy_project;
3075: revert_proj_number(x_proj_number_gen_mode,x_new_project_number); -- Added for Bug# 7445534
3076: return;
3741: CLOSE l_check_org_csr;
3742:
3743: if l_party_id is not null then
3744:
3745: PA_PROJECT_PARTIES_PUB.CREATE_PROJECT_PARTY(
3746: p_validate_only => FND_API.G_FALSE
3747: , p_object_id => x_new_project_id
3748: , p_OBJECT_TYPE => 'PA_PROJECTS'
3749: , p_project_role_id => 100
3770: rollback to copy_project;
3771: revert_proj_number(x_proj_number_gen_mode,x_new_project_number); -- Added for Bug# 7445534
3772: x_err_code := 168;
3773: x_err_stage := pa_project_core1.get_message_from_stack( 'PA_ERR_CR_PROJ_PARTY_PUB');
3774: x_err_stack := x_err_stack||'->PA_PROJECT_PARTIES_PUB.CREATE_PROJECT_PARTY';
3775: return;
3776: END IF;
3777:
3778: -- Add the new project party ID to the customers row
3789: x_err_code := 168;
3790: -- x_err_stage := pa_project_core1.get_message_from_stack( null );
3791: -- IF x_err_stage IS NULL
3792: -- THEN
3793: x_err_stage := 'API: '||'PA_PROJECT_PARTIES_PUB.CREATE_PROJECT_PARTY'||' SQL error message: '||SUBSTR( SQLERRM,1,1900);
3794: -- END IF;
3795: rollback to copy_project;
3796: revert_proj_number(x_proj_number_gen_mode,x_new_project_number); -- Added for Bug# 7445534
3797: return;