9: -- Pre-reqs : None
10: -- Return Value : N/A
11: -- Prameters
12: -- p_api_version IN NUMBER N Not Null 1.0
13: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
14: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
15: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
16: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
17: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
10: -- Return Value : N/A
11: -- Prameters
12: -- p_api_version IN NUMBER N Not Null 1.0
13: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
14: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
15: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
16: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
17: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
18: -- p_debug_mode IN VARCHAR2 N Null N
11: -- Prameters
12: -- p_api_version IN NUMBER N Not Null 1.0
13: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
14: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
15: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
16: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
17: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
18: -- p_debug_mode IN VARCHAR2 N Null N
19: -- p_context IN VARCHAR2 N Null TASK
12: -- p_api_version IN NUMBER N Not Null 1.0
13: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
14: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
15: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
16: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
17: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
18: -- p_debug_mode IN VARCHAR2 N Null N
19: -- p_context IN VARCHAR2 N Null TASK
20: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
71: --
72:
73: PROCEDURE Create_Task(
74: p_api_version IN NUMBER :=1.0,
75: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
76: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
77: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
78: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
79: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
72:
73: PROCEDURE Create_Task(
74: p_api_version IN NUMBER :=1.0,
75: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
76: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
77: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
78: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
79: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
80: p_debug_mode IN VARCHAR2 :='N',
73: PROCEDURE Create_Task(
74: p_api_version IN NUMBER :=1.0,
75: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
76: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
77: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
78: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
79: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
80: p_debug_mode IN VARCHAR2 :='N',
81: p_context IN VARCHAR2 :='TASK', -- bug#11928067
74: p_api_version IN NUMBER :=1.0,
75: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
76: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
77: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
78: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
79: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
80: p_debug_mode IN VARCHAR2 :='N',
81: p_context IN VARCHAR2 :='TASK', -- bug#11928067
82: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
223: IF (p_debug_mode = 'Y') THEN
224: pa_debug.debug('PA_TASK_PUB1.CREATE_TASK begin');
225: END IF;
226:
227: IF (p_commit = FND_API.G_TRUE) THEN
228: savepoint create_Task;
229: END IF;
230:
231: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
227: IF (p_commit = FND_API.G_TRUE) THEN
228: savepoint create_Task;
229: END IF;
230:
231: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
232: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
233: END IF;
234:
235:
228: savepoint create_Task;
229: END IF;
230:
231: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
232: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
233: END IF;
234:
235:
236: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
232: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
233: END IF;
234:
235:
236: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
237: FND_MSG_PUB.initialize;
238: END IF;
239:
240: --Bug 2168170
245: IF p_task_number IS NULL
246: THEN
247: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
248: p_msg_name => 'PA_PS_TASK_NUMBER_NULL');
249: raise FND_API.G_EXC_ERROR;
250: END IF;
251:
252: --dbms_output.put_line('task name');
253: IF p_task_name IS NULL
253: IF p_task_name IS NULL
254: THEN
255: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
256: p_msg_name => 'PA_PS_TASK_NAME_NULL');
257: raise FND_API.G_EXC_ERROR;
258: END IF;
259:
260: --Bug 2168170
261:
269: ) = 'N'
270: THEN
271: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
272: p_msg_name => 'PA_PS_TASK_NOT_NUM_UNIQ');
273: raise FND_API.G_EXC_ERROR;
274:
275: END IF;
276: */
277: --end bug 2669388
313: END IF;
314: IF l_add_task_allowed = 'N' THEN
315: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
316: p_msg_name => 'PA_PR_PM_CANNOT_ADDTASK');
317: raise FND_API.G_EXC_ERROR;
318: END IF;
319: END IF;
320: END IF;
321:
343: p_check_id_flag => 'Y',
344: x_task_mgr_id => l_task_manager_id,
345: x_return_status => l_return_status,
346: x_error_msg_code => l_error_msg_code);
347: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
348: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
349: p_msg_name => l_error_msg_code);
350: END IF;
351: END IF; --End Name-Id Conversion
369: x_task_mgr_id => l_task_manager_id,
370: x_return_status => l_return_status,
371: x_error_msg_code => l_error_msg_code);
372: --dbms_output.put_line( 'l_error_msg_code '||l_error_msg_code );
373: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
374: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
375: p_msg_name => l_error_msg_code);
376: END IF;
377: --dbms_output.put_line( 'Task manager id '||l_task_manager_id||'flag '||PA_STARTUP.G_Check_ID_Flag );
387: --dbms_output.put_line( 'Before Check_OrgName_Or_Id' );
388:
389: IF p_carrying_out_org_id = PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
390: THEN
391: l_carrying_out_org_id := FND_API.G_MISS_NUM;
392: ELSE
393: l_carrying_out_org_id := p_carrying_out_org_id;
394: END IF;
395:
402: ,x_return_status => l_return_status
403: ,x_error_msg_code => l_error_msg_code);
404:
405: -- added for Bug: 4537865
406: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
407: l_carrying_out_org_id := l_new_carrying_out_org_id;
408: END IF;
409: -- added for Bug: 4537865
410:
407: l_carrying_out_org_id := l_new_carrying_out_org_id;
408: END IF;
409: -- added for Bug: 4537865
410:
411: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
412: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
413: p_msg_name => l_error_msg_code);
414: END IF;
415: END IF; --End Name-Id Conversion
417: l_task_manager_id := p_task_manager_id;
418: l_carrying_out_org_id := p_carrying_out_org_id;
419: END IF;
420:
421: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
422: x_msg_count := FND_MSG_PUB.count_msg;
423: IF x_msg_count = 1 then
424: pa_interface_utils_pub.get_messages
425: (p_encoded => FND_API.G_TRUE,
421: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
422: x_msg_count := FND_MSG_PUB.count_msg;
423: IF x_msg_count = 1 then
424: pa_interface_utils_pub.get_messages
425: (p_encoded => FND_API.G_TRUE,
426: p_msg_index => 1,
427: p_msg_count => l_msg_count,
428: p_msg_data => l_msg_data,
429: p_data => l_data,
429: p_data => l_data,
430: p_msg_index_out => l_msg_index_out);
431: x_msg_data := l_data;
432: END IF;
433: raise FND_API.G_EXC_ERROR;
434: END IF;
435:
436: IF ((p_task_progress_entry_page <> PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR) AND
437: (p_task_progress_entry_page IS NOT NULL)) OR
438: ((p_task_progress_entry_page_id <> PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM) AND
439: (p_task_progress_entry_page_id IS NOT NULL)) THEN
440:
441: IF (p_task_progress_entry_page_ID = PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM) THEN
442: l_task_progress_entry_page_id := FND_API.G_MISS_NUM;
443: ELSE
444: l_task_progress_entry_page_id := p_task_progress_entry_page_id;
445: END IF;
446:
451: ,x_return_status => l_return_status
452: ,x_error_message_code => l_error_msg_code
453: );
454:
455: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
456: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
457: p_msg_name => l_error_msg_code);
458: END IF;
459: END IF;
464:
465: IF ( p_TYPE_ID IS NOT NULL AND p_TYPE_ID <> PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM ) THEN
466: IF ('N' = PA_TASK_TYPE_UTILS.check_tk_type_effective(p_TYPE_ID)) THEN
467: PA_UTILS.ADD_MESSAGE('PA', 'PA_PS_EFF_TASK_TYPE_ERR');
468: l_return_status := FND_API.G_RET_STS_ERROR;
469: END IF;
470: END IF;
471:
472: -- 3944597 end
470: END IF;
471:
472: -- 3944597 end
473:
474: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
475: x_msg_count := FND_MSG_PUB.count_msg;
476: IF x_msg_count = 1 then
477: pa_interface_utils_pub.get_messages
478: (p_encoded => FND_API.G_TRUE,
474: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
475: x_msg_count := FND_MSG_PUB.count_msg;
476: IF x_msg_count = 1 then
477: pa_interface_utils_pub.get_messages
478: (p_encoded => FND_API.G_TRUE,
479: p_msg_index => 1,
480: p_msg_count => l_msg_count,
481: p_msg_data => l_msg_data,
482: p_data => l_data,
482: p_data => l_data,
483: p_msg_index_out => l_msg_index_out);
484: x_msg_data := l_data;
485: END IF;
486: raise FND_API.G_EXC_ERROR;
487: END IF;
488:
489: --dbms_output.put_line( 'Inside CREATE_TASK API '||p_project_id );
490:
587: );
588: -- end xxlu changes
589: --dbms_output.put_line( 'After CREATE_TASK API ' );
590:
591: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
592: x_msg_count := FND_MSG_PUB.count_msg;
593: IF x_msg_count = 1 then
594: pa_interface_utils_pub.get_messages
595: (p_encoded => FND_API.G_TRUE,
591: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
592: x_msg_count := FND_MSG_PUB.count_msg;
593: IF x_msg_count = 1 then
594: pa_interface_utils_pub.get_messages
595: (p_encoded => FND_API.G_TRUE,
596: p_msg_index => 1,
597: p_msg_count => l_msg_count,
598: p_msg_data => l_msg_data,
599: p_data => l_data,
599: p_data => l_data,
600: p_msg_index_out => l_msg_index_out);
601: x_msg_data := l_data;
602: END IF;
603: raise FND_API.G_EXC_ERROR;
604: END IF;
605:
606: --x_task_id := l_task_id;
607: x_return_status := FND_API.G_RET_STS_SUCCESS;
603: raise FND_API.G_EXC_ERROR;
604: END IF;
605:
606: --x_task_id := l_task_id;
607: x_return_status := FND_API.G_RET_STS_SUCCESS;
608:
609: IF (p_commit = FND_API.G_TRUE) THEN
610: COMMIT;
611: END IF;
605:
606: --x_task_id := l_task_id;
607: x_return_status := FND_API.G_RET_STS_SUCCESS;
608:
609: IF (p_commit = FND_API.G_TRUE) THEN
610: COMMIT;
611: END IF;
612:
613: IF (p_debug_mode = 'Y') THEN
613: IF (p_debug_mode = 'Y') THEN
614: pa_debug.debug('PA_TASK_PUB1.CREATE_TASK END');
615: END IF;
616: EXCEPTION
617: when FND_API.G_EXC_ERROR then
618: if p_commit = FND_API.G_TRUE then
619: rollback to create_task;
620: end if;
621: x_return_status := FND_API.G_RET_STS_ERROR;
614: pa_debug.debug('PA_TASK_PUB1.CREATE_TASK END');
615: END IF;
616: EXCEPTION
617: when FND_API.G_EXC_ERROR then
618: if p_commit = FND_API.G_TRUE then
619: rollback to create_task;
620: end if;
621: x_return_status := FND_API.G_RET_STS_ERROR;
622: when FND_API.G_EXC_UNEXPECTED_ERROR then
617: when FND_API.G_EXC_ERROR then
618: if p_commit = FND_API.G_TRUE then
619: rollback to create_task;
620: end if;
621: x_return_status := FND_API.G_RET_STS_ERROR;
622: when FND_API.G_EXC_UNEXPECTED_ERROR then
623: if p_commit = FND_API.G_TRUE then
624: rollback to create_task;
625: end if;
618: if p_commit = FND_API.G_TRUE then
619: rollback to create_task;
620: end if;
621: x_return_status := FND_API.G_RET_STS_ERROR;
622: when FND_API.G_EXC_UNEXPECTED_ERROR then
623: if p_commit = FND_API.G_TRUE then
624: rollback to create_task;
625: end if;
626: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
619: rollback to create_task;
620: end if;
621: x_return_status := FND_API.G_RET_STS_ERROR;
622: when FND_API.G_EXC_UNEXPECTED_ERROR then
623: if p_commit = FND_API.G_TRUE then
624: rollback to create_task;
625: end if;
626: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
627: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
622: when FND_API.G_EXC_UNEXPECTED_ERROR then
623: if p_commit = FND_API.G_TRUE then
624: rollback to create_task;
625: end if;
626: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
627: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
628: p_procedure_name => 'CREATE_TASK',
629: p_error_text => SUBSTRB(SQLERRM,1,240));
630: when OTHERS then
627: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
628: p_procedure_name => 'CREATE_TASK',
629: p_error_text => SUBSTRB(SQLERRM,1,240));
630: when OTHERS then
631: if p_commit = FND_API.G_TRUE then
632: rollback to create_task;
633: end if;
634: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
635: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
630: when OTHERS then
631: if p_commit = FND_API.G_TRUE then
632: rollback to create_task;
633: end if;
634: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
635: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
636: p_procedure_name => 'CREATE_TASK',
637: p_error_text => SUBSTRB(SQLERRM,1,240));
638: raise;
643: -- Pre-reqs : None
644: -- Return Value : N/A
645: -- Prameters
646: -- p_api_version IN NUMBER N Not Null 1.0
647: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
648: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
649: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
650: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
651: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
644: -- Return Value : N/A
645: -- Prameters
646: -- p_api_version IN NUMBER N Not Null 1.0
647: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
648: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
649: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
650: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
651: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
652: -- p_debug_mode IN VARCHAR2 N Null N
645: -- Prameters
646: -- p_api_version IN NUMBER N Not Null 1.0
647: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
648: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
649: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
650: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
651: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
652: -- p_debug_mode IN VARCHAR2 N Null N
653: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
646: -- p_api_version IN NUMBER N Not Null 1.0
647: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
648: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
649: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
650: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
651: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
652: -- p_debug_mode IN VARCHAR2 N Null N
653: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
654: -- p_task_id IN NUMBER N Not Null
701: --
702:
703: PROCEDURE Update_Task(
704: p_api_version IN NUMBER :=1.0,
705: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
706: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
707: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
708: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
709: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
702:
703: PROCEDURE Update_Task(
704: p_api_version IN NUMBER :=1.0,
705: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
706: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
707: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
708: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
709: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
710: p_debug_mode IN VARCHAR2 :='N',
703: PROCEDURE Update_Task(
704: p_api_version IN NUMBER :=1.0,
705: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
706: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
707: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
708: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
709: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
710: p_debug_mode IN VARCHAR2 :='N',
711: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
704: p_api_version IN NUMBER :=1.0,
705: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
706: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
707: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
708: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
709: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
710: p_debug_mode IN VARCHAR2 :='N',
711: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
712: p_ref_task_id IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
903: IF (p_debug_mode = 'Y') THEN
904: pa_debug.debug('PA_TASK_PUB1.UPDATE_TASK begin');
905: END IF;
906:
907: IF (p_commit = FND_API.G_TRUE) THEN
908: savepoint update_Task;
909: END IF;
910:
911: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
907: IF (p_commit = FND_API.G_TRUE) THEN
908: savepoint update_Task;
909: END IF;
910:
911: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
912: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
913: END IF;
914:
915:
908: savepoint update_Task;
909: END IF;
910:
911: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
912: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
913: END IF;
914:
915:
916: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
912: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
913: END IF;
914:
915:
916: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
917: FND_MSG_PUB.initialize;
918: END IF;
919:
920: --Bug 3940203 avaithia <
965: p_token2 => 'TASK_NUMBER',
966: p_value2 => p_task_number,
967: p_token3 => 'MESSAGE',
968: p_value3 => l_err_message);
969: RAISE FND_API.G_EXC_ERROR ;
970: END IF;
971:
972: ELSE -- This is case of Self Service
973: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
977: p_token2 => 'TASK_NUMBER',
978: p_value2 => p_task_number,
979: p_token3 => 'MESSAGE',
980: p_value3 => l_err_message);
981: RAISE FND_API.G_EXC_ERROR ;
982: END IF ; --End If AMG Context
983: END IF; --End If Org.Name is NULL
984: END IF; --End If Financial Task
985:
1034: IF ( l_task_number <> p_task_number ) THEN
1035: IF l_update_task_num_allowed = 'N' THEN
1036: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
1037: p_msg_name => 'PA_PR_PM_NO_CHG_TASK_NUM');
1038: raise FND_API.G_EXC_ERROR;
1039: END IF;
1040: END IF;
1041:
1042: -- Check Update Task Name
1043: IF ( l_task_name <> p_task_name ) THEN
1044: IF l_update_task_name_allowed = 'N' THEN
1045: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
1046: p_msg_name => 'PA_PR_PM_NO_CHG_TASK_NAME');
1047: raise FND_API.G_EXC_ERROR;
1048: END IF;
1049: END IF;
1050:
1051: -- If financial task exists, Check Update Task Date
1066: ( l_trans_finish_date is not null and p_transaction_finish_date is null) THEN
1067: IF l_update_task_dates_allowed = 'N' THEN
1068: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
1069: p_msg_name => 'PA_PR_PM_NO_CHG_TASK_DATES');
1070: raise FND_API.G_EXC_ERROR;
1071: END IF;
1072: END IF;
1073: END IF;
1074: END IF;
1079: (l_task_description is not null and p_task_description is null) THEN
1080: IF l_update_task_desc_allowed = 'N' THEN
1081: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
1082: p_msg_name => 'PA_PR_PM_NO_CHG_TASK_DESC');
1083: raise FND_API.G_EXC_ERROR;
1084: END IF;
1085: END IF;
1086:
1087: -- Check Update Task Organization
1090: (l_organization_name is not null and p_carrying_out_org_name is null) THEN
1091: IF l_update_task_org_allowed = 'N' THEN
1092: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
1093: p_msg_name => 'PA_PR_PM_NO_CHG_TASK_ORG');
1094: raise FND_API.G_EXC_ERROR;
1095: END IF;
1096: END IF;
1097:
1098: END IF;
1105:
1106: IF (p_calling_module <> 'FORMS')
1107: THEN
1108: --Lock row
1109: IF( p_validate_only <> FND_API.G_TRUE) THEN
1110: BEGIN
1111: select 'x' into l_dummy
1112: from PA_PROJ_ELEMENTS
1113: where proj_element_id = p_task_id
1154:
1155: IF l_msg_count > 0 THEN
1156: x_msg_count := l_msg_count;
1157: x_return_status := 'E';
1158: RAISE FND_API.G_EXC_ERROR;
1159: END IF;
1160: END IF;
1161:
1162: --Bug 2168170
1163: IF p_task_number IS NULL
1164: THEN
1165: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
1166: p_msg_name => 'PA_PS_TASK_NUMBER_NULL');
1167: raise FND_API.G_EXC_ERROR;
1168: END IF;
1169:
1170: IF p_task_name IS NULL
1171: THEN
1170: IF p_task_name IS NULL
1171: THEN
1172: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
1173: p_msg_name => 'PA_PS_TASK_NAME_NULL');
1174: raise FND_API.G_EXC_ERROR;
1175: END IF;
1176:
1177: --Bug 2168170
1178:
1211: p_check_id_flag => 'Y',
1212: x_task_mgr_id => l_task_manager_id,
1213: x_return_status => l_return_status,
1214: x_error_msg_code => l_error_msg_code);
1215: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1216: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
1217: p_msg_name => l_error_msg_code);
1218: raise FND_API.G_EXC_ERROR; -- bug 4165509
1219: END IF;
1214: x_error_msg_code => l_error_msg_code);
1215: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1216: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
1217: p_msg_name => l_error_msg_code);
1218: raise FND_API.G_EXC_ERROR; -- bug 4165509
1219: END IF;
1220: ELSE
1221: l_task_manager_id := l_cur_task_mgr_person_id;
1222: END IF;
1261: x_task_mgr_id => l_task_manager_id,
1262: x_return_status => l_return_status,
1263: x_error_msg_code => l_error_msg_code);
1264:
1265: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1266: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
1267: p_msg_name => l_error_msg_code);
1268: raise FND_API.G_EXC_ERROR; -- bug 4165509
1269: END IF;
1264:
1265: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1266: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
1267: p_msg_name => l_error_msg_code);
1268: raise FND_API.G_EXC_ERROR; -- bug 4165509
1269: END IF;
1270:
1271: --task manager changes
1272: --hsiu: added for bug 2688475
1290: --my_error_msg( 'p_carrying_out_org_name '||p_carrying_out_org_name );
1291:
1292: IF p_carrying_out_org_id = PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
1293: THEN
1294: l_carrying_out_org_id := FND_API.G_MISS_NUM;
1295: ELSE
1296: l_carrying_out_org_id := p_carrying_out_org_id;
1297: END IF;
1298:
1305: ,x_return_status => l_return_status
1306: ,x_error_msg_code => l_error_msg_code);
1307:
1308: -- added for bug 4537865
1309: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
1310: l_carrying_out_org_id := l_new_carrying_out_org_id;
1311: END IF;
1312: -- added for bug 4537865
1313: --dbms_output.put_line( 'After Id to name p_carrying_out_org_id '||p_carrying_out_org_id );
1313: --dbms_output.put_line( 'After Id to name p_carrying_out_org_id '||p_carrying_out_org_id );
1314: --dbms_output.put_line( 'After Id to name l_carrying_out_org_id '||l_carrying_out_org_id );
1315:
1316:
1317: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1318: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
1319: p_msg_name => l_error_msg_code);
1320: END IF;
1321: END IF; --End Name-Id Conversion
1323: l_task_manager_id := p_task_manager_id;
1324: l_carrying_out_org_id := p_carrying_out_org_id;
1325: END IF;
1326: --dbms_output.put_line( 'After calling Name to Id conv : Check_OrgName_Or_Id' );
1327: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1328: x_msg_count := FND_MSG_PUB.count_msg;
1329: IF x_msg_count = 1 then
1330: pa_interface_utils_pub.get_messages
1331: (p_encoded => FND_API.G_TRUE,
1327: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1328: x_msg_count := FND_MSG_PUB.count_msg;
1329: IF x_msg_count = 1 then
1330: pa_interface_utils_pub.get_messages
1331: (p_encoded => FND_API.G_TRUE,
1332: p_msg_index => 1,
1333: p_msg_count => l_msg_count,
1334: p_msg_data => l_msg_data,
1335: p_data => l_data,
1335: p_data => l_data,
1336: p_msg_index_out => l_msg_index_out);
1337: x_msg_data := l_data;
1338: END IF;
1339: raise FND_API.G_EXC_ERROR;
1340: END IF;
1341:
1342: IF ((p_task_progress_entry_page <> PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR) AND
1343: (p_task_progress_entry_page IS NOT NULL)) OR
1344: ((p_task_progress_entry_page_id <> PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM) AND
1345: (p_task_progress_entry_page_id IS NOT NULL)) THEN
1346:
1347: IF (p_task_progress_entry_page_ID = PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM) THEN
1348: l_task_progress_entry_page_id := FND_API.G_MISS_NUM;
1349: ELSE
1350: l_task_progress_entry_page_id := p_task_progress_entry_page_id;
1351: END IF;
1352:
1357: ,x_return_status => l_return_status
1358: ,x_error_message_code => l_error_msg_code
1359: );
1360:
1361: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
1362: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
1363: p_msg_name => l_error_msg_code);
1364: END IF;
1365:
1369: /*Bug 4089623 Lead Days Cannot be negative */
1370: IF ( nvl(p_wf_lead_days,0) < 0 )
1371: THEN
1372: PA_UTILS.add_message('PA','PA_INVALID_LEAD_DAYS');
1373: l_return_status := FND_API.G_RET_STS_ERROR;
1374: END IF;
1375:
1376: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1377: x_msg_count := FND_MSG_PUB.count_msg;
1372: PA_UTILS.add_message('PA','PA_INVALID_LEAD_DAYS');
1373: l_return_status := FND_API.G_RET_STS_ERROR;
1374: END IF;
1375:
1376: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1377: x_msg_count := FND_MSG_PUB.count_msg;
1378: IF x_msg_count = 1 then
1379: pa_interface_utils_pub.get_messages
1380: (p_encoded => FND_API.G_TRUE,
1376: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1377: x_msg_count := FND_MSG_PUB.count_msg;
1378: IF x_msg_count = 1 then
1379: pa_interface_utils_pub.get_messages
1380: (p_encoded => FND_API.G_TRUE,
1381: p_msg_index => 1,
1382: p_msg_count => l_msg_count,
1383: p_msg_data => l_msg_data,
1384: p_data => l_data,
1384: p_data => l_data,
1385: p_msg_index_out => l_msg_index_out);
1386: x_msg_data := l_data;
1387: END IF;
1388: raise FND_API.G_EXC_ERROR;
1389: END IF;
1390:
1391: --my_error_msg( 'Before calling private API. ' );
1392:
1484: );
1485:
1486: --dbms_output.put_line( 'After calling private API.' );
1487:
1488: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1489: x_msg_count := FND_MSG_PUB.count_msg;
1490: IF x_msg_count = 1 then
1491: pa_interface_utils_pub.get_messages
1492: (p_encoded => FND_API.G_TRUE,
1488: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1489: x_msg_count := FND_MSG_PUB.count_msg;
1490: IF x_msg_count = 1 then
1491: pa_interface_utils_pub.get_messages
1492: (p_encoded => FND_API.G_TRUE,
1493: p_msg_index => 1,
1494: p_msg_count => l_msg_count,
1495: p_msg_data => l_msg_data,
1496: p_data => l_data,
1496: p_data => l_data,
1497: p_msg_index_out => l_msg_index_out);
1498: x_msg_data := l_data;
1499: END IF;
1500: raise FND_API.G_EXC_ERROR;
1501: END IF;
1502:
1503: x_return_status := FND_API.G_RET_STS_SUCCESS;
1504:
1499: END IF;
1500: raise FND_API.G_EXC_ERROR;
1501: END IF;
1502:
1503: x_return_status := FND_API.G_RET_STS_SUCCESS;
1504:
1505: IF (p_commit = FND_API.G_TRUE) THEN
1506: COMMIT;
1507: END IF;
1501: END IF;
1502:
1503: x_return_status := FND_API.G_RET_STS_SUCCESS;
1504:
1505: IF (p_commit = FND_API.G_TRUE) THEN
1506: COMMIT;
1507: END IF;
1508:
1509: IF (p_debug_mode = 'Y') THEN
1509: IF (p_debug_mode = 'Y') THEN
1510: pa_debug.debug('PA_TASK_PUB1.UPDATE_TASK END');
1511: END IF;
1512: EXCEPTION
1513: when FND_API.G_EXC_ERROR then
1514: if p_commit = FND_API.G_TRUE then
1515: rollback to update_task;
1516: end if;
1517: x_return_status := FND_API.G_RET_STS_ERROR;
1510: pa_debug.debug('PA_TASK_PUB1.UPDATE_TASK END');
1511: END IF;
1512: EXCEPTION
1513: when FND_API.G_EXC_ERROR then
1514: if p_commit = FND_API.G_TRUE then
1515: rollback to update_task;
1516: end if;
1517: x_return_status := FND_API.G_RET_STS_ERROR;
1518: when FND_API.G_EXC_UNEXPECTED_ERROR then
1513: when FND_API.G_EXC_ERROR then
1514: if p_commit = FND_API.G_TRUE then
1515: rollback to update_task;
1516: end if;
1517: x_return_status := FND_API.G_RET_STS_ERROR;
1518: when FND_API.G_EXC_UNEXPECTED_ERROR then
1519: if p_commit = FND_API.G_TRUE then
1520: rollback to update_task;
1521: end if;
1514: if p_commit = FND_API.G_TRUE then
1515: rollback to update_task;
1516: end if;
1517: x_return_status := FND_API.G_RET_STS_ERROR;
1518: when FND_API.G_EXC_UNEXPECTED_ERROR then
1519: if p_commit = FND_API.G_TRUE then
1520: rollback to update_task;
1521: end if;
1522: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1515: rollback to update_task;
1516: end if;
1517: x_return_status := FND_API.G_RET_STS_ERROR;
1518: when FND_API.G_EXC_UNEXPECTED_ERROR then
1519: if p_commit = FND_API.G_TRUE then
1520: rollback to update_task;
1521: end if;
1522: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1523: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
1518: when FND_API.G_EXC_UNEXPECTED_ERROR then
1519: if p_commit = FND_API.G_TRUE then
1520: rollback to update_task;
1521: end if;
1522: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1523: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
1524: p_procedure_name => 'UPDATE_TASK',
1525: p_error_text => SUBSTRB(SQLERRM,1,240));
1526: when OTHERS then
1523: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
1524: p_procedure_name => 'UPDATE_TASK',
1525: p_error_text => SUBSTRB(SQLERRM,1,240));
1526: when OTHERS then
1527: if p_commit = FND_API.G_TRUE then
1528: rollback to update_task;
1529: end if;
1530: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1531: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
1526: when OTHERS then
1527: if p_commit = FND_API.G_TRUE then
1528: rollback to update_task;
1529: end if;
1530: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1531: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
1532: p_procedure_name => 'UPDATE_TASK',
1533: p_error_text => SUBSTRB(SQLERRM,1,240));
1534: raise;
1540: -- Pre-reqs : None
1541: -- Return Value : N/A
1542: -- Prameters
1543: -- p_api_version IN NUMBER N Not Null 1.0
1544: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
1545: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
1546: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
1547: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
1548: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
1541: -- Return Value : N/A
1542: -- Prameters
1543: -- p_api_version IN NUMBER N Not Null 1.0
1544: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
1545: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
1546: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
1547: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
1548: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
1549: -- p_debug_mode IN VARCHAR2 N Null N
1542: -- Prameters
1543: -- p_api_version IN NUMBER N Not Null 1.0
1544: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
1545: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
1546: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
1547: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
1548: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
1549: -- p_debug_mode IN VARCHAR2 N Null N
1550: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
1543: -- p_api_version IN NUMBER N Not Null 1.0
1544: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
1545: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
1546: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
1547: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
1548: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
1549: -- p_debug_mode IN VARCHAR2 N Null N
1550: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
1551: -- p_ref_task_version_id IN NUMBER N Not Null
1578: --
1579:
1580: PROCEDURE Create_Task_Version(
1581: p_api_version IN NUMBER :=1.0,
1582: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
1583: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
1584: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
1585: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
1586: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
1579:
1580: PROCEDURE Create_Task_Version(
1581: p_api_version IN NUMBER :=1.0,
1582: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
1583: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
1584: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
1585: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
1586: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
1587: p_debug_mode IN VARCHAR2 :='N',
1580: PROCEDURE Create_Task_Version(
1581: p_api_version IN NUMBER :=1.0,
1582: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
1583: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
1584: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
1585: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
1586: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
1587: p_debug_mode IN VARCHAR2 :='N',
1588: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
1581: p_api_version IN NUMBER :=1.0,
1582: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
1583: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
1584: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
1585: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
1586: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
1587: p_debug_mode IN VARCHAR2 :='N',
1588: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
1589: p_ref_task_version_id IN NUMBER,
1636: IF (p_debug_mode = 'Y') THEN
1637: pa_debug.debug('PA_TASK_PUB1.CREATE_TASK_VERSION begin');
1638: END IF;
1639:
1640: IF (p_commit = FND_API.G_TRUE) THEN
1641: savepoint create_Task_version;
1642: END IF;
1643:
1644: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
1640: IF (p_commit = FND_API.G_TRUE) THEN
1641: savepoint create_Task_version;
1642: END IF;
1643:
1644: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
1645: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1646: END IF;
1647:
1648:
1641: savepoint create_Task_version;
1642: END IF;
1643:
1644: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
1645: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1646: END IF;
1647:
1648:
1649: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
1645: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1646: END IF;
1647:
1648:
1649: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
1650: FND_MSG_PUB.initialize;
1651: END IF;
1652:
1653: --dbms_output.put_line( 'Before private API' );
1689: ,x_msg_data => x_msg_data
1690: );
1691:
1692: --dbms_output.put_line( 'Status after private call in public API '||x_return_status );
1693: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1694: --IF (x_return_status <> 'S' ) THEN
1695: x_msg_count := FND_MSG_PUB.count_msg;
1696: IF x_msg_count = 1 then
1697: pa_interface_utils_pub.get_messages
1694: --IF (x_return_status <> 'S' ) THEN
1695: x_msg_count := FND_MSG_PUB.count_msg;
1696: IF x_msg_count = 1 then
1697: pa_interface_utils_pub.get_messages
1698: (p_encoded => FND_API.G_TRUE,
1699: p_msg_index => 1,
1700: p_msg_count => l_msg_count,
1701: p_msg_data => l_msg_data,
1702: p_data => l_data,
1704: x_msg_data := l_data;
1705: END IF;
1706: --dbms_output.put_line( 'raising exception '||x_return_status );
1707:
1708: raise FND_API.G_EXC_ERROR;
1709: END IF;
1710:
1711: --dbms_output.put_line( 'Final status '||x_return_status );
1712:
1709: END IF;
1710:
1711: --dbms_output.put_line( 'Final status '||x_return_status );
1712:
1713: x_return_status := FND_API.G_RET_STS_SUCCESS;
1714:
1715: --dbms_output.put_line( 'Final status asasas'||x_return_status );
1716:
1717: IF (p_commit = FND_API.G_TRUE) THEN
1713: x_return_status := FND_API.G_RET_STS_SUCCESS;
1714:
1715: --dbms_output.put_line( 'Final status asasas'||x_return_status );
1716:
1717: IF (p_commit = FND_API.G_TRUE) THEN
1718: COMMIT;
1719: END IF;
1720:
1721: IF (p_debug_mode = 'Y') THEN
1721: IF (p_debug_mode = 'Y') THEN
1722: pa_debug.debug('PA_PROJECT_STRUCTURE_PUB1.CREATE_TASK_VERSION END');
1723: END IF;
1724: EXCEPTION
1725: when FND_API.G_EXC_ERROR then
1726: if p_commit = FND_API.G_TRUE then
1727: rollback to create_task_version;
1728: end if;
1729: x_return_status := FND_API.G_RET_STS_ERROR;
1722: pa_debug.debug('PA_PROJECT_STRUCTURE_PUB1.CREATE_TASK_VERSION END');
1723: END IF;
1724: EXCEPTION
1725: when FND_API.G_EXC_ERROR then
1726: if p_commit = FND_API.G_TRUE then
1727: rollback to create_task_version;
1728: end if;
1729: x_return_status := FND_API.G_RET_STS_ERROR;
1730: --dbms_output.put_line( 'Status in public API exception '||x_return_status );
1725: when FND_API.G_EXC_ERROR then
1726: if p_commit = FND_API.G_TRUE then
1727: rollback to create_task_version;
1728: end if;
1729: x_return_status := FND_API.G_RET_STS_ERROR;
1730: --dbms_output.put_line( 'Status in public API exception '||x_return_status );
1731:
1732: when FND_API.G_EXC_UNEXPECTED_ERROR then
1733: if p_commit = FND_API.G_TRUE then
1728: end if;
1729: x_return_status := FND_API.G_RET_STS_ERROR;
1730: --dbms_output.put_line( 'Status in public API exception '||x_return_status );
1731:
1732: when FND_API.G_EXC_UNEXPECTED_ERROR then
1733: if p_commit = FND_API.G_TRUE then
1734: rollback to create_task_version;
1735: end if;
1736: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1729: x_return_status := FND_API.G_RET_STS_ERROR;
1730: --dbms_output.put_line( 'Status in public API exception '||x_return_status );
1731:
1732: when FND_API.G_EXC_UNEXPECTED_ERROR then
1733: if p_commit = FND_API.G_TRUE then
1734: rollback to create_task_version;
1735: end if;
1736: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1737: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
1732: when FND_API.G_EXC_UNEXPECTED_ERROR then
1733: if p_commit = FND_API.G_TRUE then
1734: rollback to create_task_version;
1735: end if;
1736: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1737: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
1738: p_procedure_name => 'CREATE_TASK_VERSION',
1739: p_error_text => SUBSTRB(SQLERRM,1,240));
1740: when OTHERS then
1737: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
1738: p_procedure_name => 'CREATE_TASK_VERSION',
1739: p_error_text => SUBSTRB(SQLERRM,1,240));
1740: when OTHERS then
1741: if p_commit = FND_API.G_TRUE then
1742: rollback to create_task_version;
1743: end if;
1744: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1745: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
1740: when OTHERS then
1741: if p_commit = FND_API.G_TRUE then
1742: rollback to create_task_version;
1743: end if;
1744: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1745: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
1746: p_procedure_name => 'CREATE_TASK_VERSION',
1747: p_error_text => SUBSTRB(SQLERRM,1,240));
1748: raise;
1753: -- Pre-reqs : None
1754: -- Return Value : N/A
1755: -- Prameters
1756: -- p_api_version IN NUMBER N Not Null 1.0
1757: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
1758: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
1759: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
1760: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
1761: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
1754: -- Return Value : N/A
1755: -- Prameters
1756: -- p_api_version IN NUMBER N Not Null 1.0
1757: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
1758: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
1759: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
1760: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
1761: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
1762: -- p_debug_mode IN VARCHAR2 N Null N
1755: -- Prameters
1756: -- p_api_version IN NUMBER N Not Null 1.0
1757: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
1758: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
1759: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
1760: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
1761: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
1762: -- p_debug_mode IN VARCHAR2 N Null N
1763: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
1756: -- p_api_version IN NUMBER N Not Null 1.0
1757: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
1758: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
1759: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
1760: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
1761: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
1762: -- p_debug_mode IN VARCHAR2 N Null N
1763: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
1764: -- p_task_version_id IN NUMBER N Null
1790: --
1791:
1792: PROCEDURE Update_Task_Version(
1793: p_api_version IN NUMBER :=1.0,
1794: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
1795: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
1796: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
1797: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
1798: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
1791:
1792: PROCEDURE Update_Task_Version(
1793: p_api_version IN NUMBER :=1.0,
1794: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
1795: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
1796: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
1797: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
1798: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
1799: p_debug_mode IN VARCHAR2 :='N',
1792: PROCEDURE Update_Task_Version(
1793: p_api_version IN NUMBER :=1.0,
1794: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
1795: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
1796: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
1797: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
1798: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
1799: p_debug_mode IN VARCHAR2 :='N',
1800: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
1793: p_api_version IN NUMBER :=1.0,
1794: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
1795: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
1796: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
1797: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
1798: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
1799: p_debug_mode IN VARCHAR2 :='N',
1800: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
1801: p_ref_task_version_id IN NUMBER,
1848: IF (p_debug_mode = 'Y') THEN
1849: pa_debug.debug('PA_TASK_PUB1.UPDATE_TASK_VERSION begin');
1850: END IF;
1851:
1852: IF (p_commit = FND_API.G_TRUE) THEN
1853: savepoint update_Task_version;
1854: END IF;
1855:
1856: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
1852: IF (p_commit = FND_API.G_TRUE) THEN
1853: savepoint update_Task_version;
1854: END IF;
1855:
1856: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
1857: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1858: END IF;
1859:
1860:
1853: savepoint update_Task_version;
1854: END IF;
1855:
1856: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
1857: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1858: END IF;
1859:
1860:
1861: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
1857: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1858: END IF;
1859:
1860:
1861: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
1862: FND_MSG_PUB.initialize;
1863: END IF;
1864:
1865: --Lock row
1862: FND_MSG_PUB.initialize;
1863: END IF;
1864:
1865: --Lock row
1866: IF( p_validate_only <> FND_API.G_TRUE) THEN
1867: BEGIN
1868: select 'x' into l_dummy
1869: from PA_PROJ_ELEMENT_VERSIONS
1870: where element_version_id = p_task_version_id
1908: l_msg_count := FND_MSG_PUB.count_msg;
1909: IF l_msg_count > 0 THEN
1910: x_msg_count := l_msg_count;
1911: x_return_status := 'E';
1912: RAISE FND_API.G_EXC_ERROR;
1913: END IF;
1914:
1915:
1916: --dbms_output.put_line('call update task version pvt');
1950: ,x_msg_count => x_msg_count
1951: ,x_msg_data => x_msg_data
1952: );
1953:
1954: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1955: x_msg_count := FND_MSG_PUB.count_msg;
1956: IF x_msg_count = 1 then
1957: pa_interface_utils_pub.get_messages
1958: (p_encoded => FND_API.G_TRUE,
1954: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1955: x_msg_count := FND_MSG_PUB.count_msg;
1956: IF x_msg_count = 1 then
1957: pa_interface_utils_pub.get_messages
1958: (p_encoded => FND_API.G_TRUE,
1959: p_msg_index => 1,
1960: p_msg_count => l_msg_count,
1961: p_msg_data => l_msg_data,
1962: p_data => l_data,
1962: p_data => l_data,
1963: p_msg_index_out => l_msg_index_out);
1964: x_msg_data := l_data;
1965: END IF;
1966: raise FND_API.G_EXC_ERROR;
1967: END IF;
1968:
1969: x_return_status := FND_API.G_RET_STS_SUCCESS;
1970:
1965: END IF;
1966: raise FND_API.G_EXC_ERROR;
1967: END IF;
1968:
1969: x_return_status := FND_API.G_RET_STS_SUCCESS;
1970:
1971: IF (p_commit = FND_API.G_TRUE) THEN
1972: COMMIT;
1973: END IF;
1967: END IF;
1968:
1969: x_return_status := FND_API.G_RET_STS_SUCCESS;
1970:
1971: IF (p_commit = FND_API.G_TRUE) THEN
1972: COMMIT;
1973: END IF;
1974:
1975: IF (p_debug_mode = 'Y') THEN
1975: IF (p_debug_mode = 'Y') THEN
1976: pa_debug.debug('PA_TASK_PUB1.UPDATE_TASK_VERSION END');
1977: END IF;
1978: EXCEPTION
1979: when FND_API.G_EXC_ERROR then
1980: if p_commit = FND_API.G_TRUE then
1981: rollback to update_task_version;
1982: end if;
1983: x_return_status := FND_API.G_RET_STS_ERROR;
1976: pa_debug.debug('PA_TASK_PUB1.UPDATE_TASK_VERSION END');
1977: END IF;
1978: EXCEPTION
1979: when FND_API.G_EXC_ERROR then
1980: if p_commit = FND_API.G_TRUE then
1981: rollback to update_task_version;
1982: end if;
1983: x_return_status := FND_API.G_RET_STS_ERROR;
1984: when FND_API.G_EXC_UNEXPECTED_ERROR then
1979: when FND_API.G_EXC_ERROR then
1980: if p_commit = FND_API.G_TRUE then
1981: rollback to update_task_version;
1982: end if;
1983: x_return_status := FND_API.G_RET_STS_ERROR;
1984: when FND_API.G_EXC_UNEXPECTED_ERROR then
1985: if p_commit = FND_API.G_TRUE then
1986: rollback to update_task_version;
1987: end if;
1980: if p_commit = FND_API.G_TRUE then
1981: rollback to update_task_version;
1982: end if;
1983: x_return_status := FND_API.G_RET_STS_ERROR;
1984: when FND_API.G_EXC_UNEXPECTED_ERROR then
1985: if p_commit = FND_API.G_TRUE then
1986: rollback to update_task_version;
1987: end if;
1988: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1981: rollback to update_task_version;
1982: end if;
1983: x_return_status := FND_API.G_RET_STS_ERROR;
1984: when FND_API.G_EXC_UNEXPECTED_ERROR then
1985: if p_commit = FND_API.G_TRUE then
1986: rollback to update_task_version;
1987: end if;
1988: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1989: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
1984: when FND_API.G_EXC_UNEXPECTED_ERROR then
1985: if p_commit = FND_API.G_TRUE then
1986: rollback to update_task_version;
1987: end if;
1988: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1989: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
1990: p_procedure_name => 'UPDATE_TASK_VERSION',
1991: p_error_text => SUBSTRB(SQLERRM,1,240));
1992: when OTHERS then
1989: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
1990: p_procedure_name => 'UPDATE_TASK_VERSION',
1991: p_error_text => SUBSTRB(SQLERRM,1,240));
1992: when OTHERS then
1993: if p_commit = FND_API.G_TRUE then
1994: rollback to update_task_version;
1995: end if;
1996: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1997: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
1992: when OTHERS then
1993: if p_commit = FND_API.G_TRUE then
1994: rollback to update_task_version;
1995: end if;
1996: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1997: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
1998: p_procedure_name => 'UPDATE_TASK_VERSION',
1999: p_error_text => SUBSTRB(SQLERRM,1,240));
2000: raise;
2005: -- Pre-reqs : None
2006: -- Return Value : N/A
2007: -- Prameters
2008: -- p_api_version IN NUMBER N Not Null 1.0
2009: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
2010: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
2011: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
2012: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
2013: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
2006: -- Return Value : N/A
2007: -- Prameters
2008: -- p_api_version IN NUMBER N Not Null 1.0
2009: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
2010: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
2011: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
2012: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
2013: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
2014: -- p_debug_mode IN VARCHAR2 N Null N
2007: -- Prameters
2008: -- p_api_version IN NUMBER N Not Null 1.0
2009: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
2010: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
2011: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
2012: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
2013: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
2014: -- p_debug_mode IN VARCHAR2 N Null N
2015: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
2008: -- p_api_version IN NUMBER N Not Null 1.0
2009: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
2010: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
2011: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
2012: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
2013: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
2014: -- p_debug_mode IN VARCHAR2 N Null N
2015: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
2016: -- p_structure_version_id IN NUMBER := PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
2027: --
2028:
2029: PROCEDURE Delete_Task_Version(
2030: p_api_version IN NUMBER :=1.0,
2031: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
2032: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
2033: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
2034: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
2035: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
2028:
2029: PROCEDURE Delete_Task_Version(
2030: p_api_version IN NUMBER :=1.0,
2031: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
2032: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
2033: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
2034: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
2035: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
2036: p_debug_mode IN VARCHAR2 :='N',
2029: PROCEDURE Delete_Task_Version(
2030: p_api_version IN NUMBER :=1.0,
2031: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
2032: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
2033: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
2034: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
2035: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
2036: p_debug_mode IN VARCHAR2 :='N',
2037: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
2030: p_api_version IN NUMBER :=1.0,
2031: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
2032: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
2033: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
2034: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
2035: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
2036: p_debug_mode IN VARCHAR2 :='N',
2037: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
2038: p_structure_version_id IN NUMBER := PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
2181: IF (p_debug_mode = 'Y') THEN
2182: pa_debug.debug('PA_TASK_PUB1.DELETE_TASK_VERSION begin');
2183: END IF;
2184:
2185: IF (p_commit = FND_API.G_TRUE) THEN
2186: savepoint delete_Task_version;
2187: END IF;
2188:
2189: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
2185: IF (p_commit = FND_API.G_TRUE) THEN
2186: savepoint delete_Task_version;
2187: END IF;
2188:
2189: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
2190: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2191: END IF;
2192:
2193:
2186: savepoint delete_Task_version;
2187: END IF;
2188:
2189: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
2190: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2191: END IF;
2192:
2193:
2194: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
2190: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2191: END IF;
2192:
2193:
2194: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
2195: FND_MSG_PUB.initialize;
2196: END IF;
2197:
2198: IF p_calling_module <> 'FORMS'
2197:
2198: IF p_calling_module <> 'FORMS'
2199: THEN
2200: --Lock row
2201: IF( p_validate_only <> FND_API.G_TRUE) THEN
2202: BEGIN
2203: select 'x' into l_dummy
2204: from PA_PROJ_ELEMENT_VERSIONS
2205: where element_version_id = p_task_version_id
2248:
2249: IF l_msg_count > 0 AND l_error_occured = 'Y' THEN
2250: x_msg_count := l_msg_count;
2251: x_return_status := 'E';
2252: RAISE FND_API.G_EXC_ERROR;
2253: END IF;
2254: END IF; --<< p_calling module >>
2255:
2256: -- hyau Bug 2852753
2293: END IF;
2294: IF l_delete_task_allowed = 'N' THEN
2295: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
2296: p_msg_name => 'PA_PR_PM_CANNOT_DELETE');
2297: raise FND_API.G_EXC_ERROR;
2298: END IF;
2299: END IF;
2300: END IF;
2301:
2344: ,x_error_message_code => l_error_msg_code);
2345: IF (l_return_status <> 'S') THEN
2346: PA_UTILS.ADD_MESSAGE('PA', l_error_msg_code);
2347: l_msg_data := l_error_msg_code;
2348: RAISE FND_API.G_EXC_ERROR;
2349: END IF;
2350: END IF; -- 6023347
2351:
2352: -- Bug Fix 4576640.
2358:
2359: IF l_linked_task = 'Y' THEN
2360: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
2361: p_msg_name => 'PA_PS_CANT_DEL_LINKED_TASK');
2362: RAISE FND_API.G_EXC_ERROR;
2363: END IF;
2364:
2365: -- End of Bug Fix 4576640.
2366:
2392: ,x_msg_count => x_msg_count
2393: ,x_msg_data => x_msg_data
2394: );
2395:
2396: IF x_return_status = FND_API.G_RET_STS_ERROR then
2397: RAISE FND_API.G_EXC_ERROR;
2398: End If;
2399:
2400: -- 3955848 end
2393: ,x_msg_data => x_msg_data
2394: );
2395:
2396: IF x_return_status = FND_API.G_RET_STS_ERROR then
2397: RAISE FND_API.G_EXC_ERROR;
2398: End If;
2399:
2400: -- 3955848 end
2401:
2404: ,x_return_status => l_return_status
2405: ,x_msg_count => x_msg_count
2406: ,x_msg_data => x_msg_data);
2407:
2408: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2409: x_msg_count := FND_MSG_PUB.count_msg;
2410: IF x_msg_count = 1 then
2411: pa_interface_utils_pub.get_messages
2412: (p_encoded => FND_API.G_TRUE,
2408: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2409: x_msg_count := FND_MSG_PUB.count_msg;
2410: IF x_msg_count = 1 then
2411: pa_interface_utils_pub.get_messages
2412: (p_encoded => FND_API.G_TRUE,
2413: p_msg_index => 1,
2414: p_msg_count => l_msg_count,
2415: p_msg_data => l_msg_data,
2416: p_data => l_data,
2416: p_data => l_data,
2417: p_msg_index_out => l_msg_index_out);
2418: x_msg_data := l_data;
2419: END IF;
2420: raise FND_API.G_EXC_ERROR;
2421: END IF;
2422:
2423: return; --only set the version status
2424: ELSE --not published
2453: ,x_msg_count => x_msg_count
2454: ,x_msg_data => x_msg_data
2455: );
2456:
2457: IF x_return_status = FND_API.G_RET_STS_ERROR then
2458: RAISE FND_API.G_EXC_ERROR;
2459: End If;
2460:
2461: -- 3955848 end
2454: ,x_msg_data => x_msg_data
2455: );
2456:
2457: IF x_return_status = FND_API.G_RET_STS_ERROR then
2458: RAISE FND_API.G_EXC_ERROR;
2459: End If;
2460:
2461: -- 3955848 end
2462:
2465: ,x_return_status => l_return_status
2466: ,x_msg_count => x_msg_count
2467: ,x_msg_data => x_msg_data);
2468:
2469: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2470: x_msg_count := FND_MSG_PUB.count_msg;
2471: IF x_msg_count = 1 then
2472: pa_interface_utils_pub.get_messages
2473: (p_encoded => FND_API.G_TRUE,
2469: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2470: x_msg_count := FND_MSG_PUB.count_msg;
2471: IF x_msg_count = 1 then
2472: pa_interface_utils_pub.get_messages
2473: (p_encoded => FND_API.G_TRUE,
2474: p_msg_index => 1,
2475: p_msg_count => l_msg_count,
2476: p_msg_data => l_msg_data,
2477: p_data => l_data,
2477: p_data => l_data,
2478: p_msg_index_out => l_msg_index_out);
2479: x_msg_data := l_data;
2480: END IF;
2481: raise FND_API.G_EXC_ERROR;
2482: END IF;
2483:
2484: return; --only set the status
2485: ELSE
2514: ,x_msg_count => x_msg_count
2515: ,x_msg_data => x_msg_data
2516: );
2517:
2518: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2519: x_msg_count := FND_MSG_PUB.count_msg;
2520: IF x_msg_count = 1 then
2521: pa_interface_utils_pub.get_messages
2522: (p_encoded => FND_API.G_TRUE,
2518: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2519: x_msg_count := FND_MSG_PUB.count_msg;
2520: IF x_msg_count = 1 then
2521: pa_interface_utils_pub.get_messages
2522: (p_encoded => FND_API.G_TRUE,
2523: p_msg_index => 1,
2524: p_msg_count => l_msg_count,
2525: p_msg_data => l_msg_data,
2526: p_data => l_data,
2526: p_data => l_data,
2527: p_msg_index_out => l_msg_index_out);
2528: x_msg_data := l_data;
2529: END IF;
2530: raise FND_API.G_EXC_ERROR;
2531: END IF;
2532:
2533: x_return_status := FND_API.G_RET_STS_SUCCESS;
2534:
2529: END IF;
2530: raise FND_API.G_EXC_ERROR;
2531: END IF;
2532:
2533: x_return_status := FND_API.G_RET_STS_SUCCESS;
2534:
2535: IF (p_commit = FND_API.G_TRUE) THEN
2536: COMMIT;
2537: END IF;
2531: END IF;
2532:
2533: x_return_status := FND_API.G_RET_STS_SUCCESS;
2534:
2535: IF (p_commit = FND_API.G_TRUE) THEN
2536: COMMIT;
2537: END IF;
2538:
2539: IF (p_debug_mode = 'Y') THEN
2539: IF (p_debug_mode = 'Y') THEN
2540: pa_debug.debug('PA_TASK_PUB1.DELETE_TASK_VERSION END');
2541: END IF;
2542: EXCEPTION
2543: when FND_API.G_EXC_ERROR then
2544: if p_commit = FND_API.G_TRUE then
2545: rollback to delete_task_version;
2546: end if;
2547: x_return_status := FND_API.G_RET_STS_ERROR;
2540: pa_debug.debug('PA_TASK_PUB1.DELETE_TASK_VERSION END');
2541: END IF;
2542: EXCEPTION
2543: when FND_API.G_EXC_ERROR then
2544: if p_commit = FND_API.G_TRUE then
2545: rollback to delete_task_version;
2546: end if;
2547: x_return_status := FND_API.G_RET_STS_ERROR;
2548: when FND_API.G_EXC_UNEXPECTED_ERROR then
2543: when FND_API.G_EXC_ERROR then
2544: if p_commit = FND_API.G_TRUE then
2545: rollback to delete_task_version;
2546: end if;
2547: x_return_status := FND_API.G_RET_STS_ERROR;
2548: when FND_API.G_EXC_UNEXPECTED_ERROR then
2549: if p_commit = FND_API.G_TRUE then
2550: rollback to delete_task_version;
2551: end if;
2544: if p_commit = FND_API.G_TRUE then
2545: rollback to delete_task_version;
2546: end if;
2547: x_return_status := FND_API.G_RET_STS_ERROR;
2548: when FND_API.G_EXC_UNEXPECTED_ERROR then
2549: if p_commit = FND_API.G_TRUE then
2550: rollback to delete_task_version;
2551: end if;
2552: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2545: rollback to delete_task_version;
2546: end if;
2547: x_return_status := FND_API.G_RET_STS_ERROR;
2548: when FND_API.G_EXC_UNEXPECTED_ERROR then
2549: if p_commit = FND_API.G_TRUE then
2550: rollback to delete_task_version;
2551: end if;
2552: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2553: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
2548: when FND_API.G_EXC_UNEXPECTED_ERROR then
2549: if p_commit = FND_API.G_TRUE then
2550: rollback to delete_task_version;
2551: end if;
2552: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2553: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
2554: p_procedure_name => 'DELETE_TASK_VERSION',
2555: p_error_text => SUBSTRB(SQLERRM,1,240));
2556: when OTHERS then
2553: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
2554: p_procedure_name => 'DELETE_TASK_VERSION',
2555: p_error_text => SUBSTRB(SQLERRM,1,240));
2556: when OTHERS then
2557: if p_commit = FND_API.G_TRUE then
2558: rollback to delete_task_version;
2559: end if;
2560: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2561: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
2556: when OTHERS then
2557: if p_commit = FND_API.G_TRUE then
2558: rollback to delete_task_version;
2559: end if;
2560: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2561: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
2562: p_procedure_name => 'DELETE_TASK_VERSION',
2563: p_error_text => SUBSTRB(SQLERRM,1,240));
2564: raise;
2569: -- Pre-reqs : None
2570: -- Return Value : N/A
2571: -- Prameters
2572: -- p_api_version IN NUMBER N Not Null 1.0
2573: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
2574: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
2575: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
2576: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
2577: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
2570: -- Return Value : N/A
2571: -- Prameters
2572: -- p_api_version IN NUMBER N Not Null 1.0
2573: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
2574: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
2575: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
2576: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
2577: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
2578: -- p_debug_mode IN VARCHAR2 N Null N
2571: -- Prameters
2572: -- p_api_version IN NUMBER N Not Null 1.0
2573: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
2574: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
2575: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
2576: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
2577: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
2578: -- p_debug_mode IN VARCHAR2 N Null N
2579: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
2572: -- p_api_version IN NUMBER N Not Null 1.0
2573: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
2574: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
2575: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
2576: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
2577: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
2578: -- p_debug_mode IN VARCHAR2 N Null N
2579: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
2580: -- p_element_version_id IN NUMBER N Not Null
2607: --
2608:
2609: PROCEDURE Create_Schedule_Version(
2610: p_api_version IN NUMBER :=1.0,
2611: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
2612: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
2613: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
2614: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
2615: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
2608:
2609: PROCEDURE Create_Schedule_Version(
2610: p_api_version IN NUMBER :=1.0,
2611: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
2612: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
2613: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
2614: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
2615: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
2616: p_debug_mode IN VARCHAR2 :='N',
2609: PROCEDURE Create_Schedule_Version(
2610: p_api_version IN NUMBER :=1.0,
2611: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
2612: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
2613: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
2614: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
2615: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
2616: p_debug_mode IN VARCHAR2 :='N',
2617: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
2610: p_api_version IN NUMBER :=1.0,
2611: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
2612: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
2613: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
2614: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
2615: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
2616: p_debug_mode IN VARCHAR2 :='N',
2617: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
2618: p_element_version_id IN NUMBER,
2687: IF (p_debug_mode = 'Y') THEN
2688: pa_debug.debug('PA_TASK_PUB1.CREATE_SCHEDULE_VERSION begin');
2689: END IF;
2690:
2691: IF (p_commit = FND_API.G_TRUE) THEN
2692: savepoint create_schedule_version;
2693: END IF;
2694:
2695: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
2691: IF (p_commit = FND_API.G_TRUE) THEN
2692: savepoint create_schedule_version;
2693: END IF;
2694:
2695: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
2696: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2697: END IF;
2698:
2699:
2692: savepoint create_schedule_version;
2693: END IF;
2694:
2695: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
2696: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2697: END IF;
2698:
2699:
2700: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
2696: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2697: END IF;
2698:
2699:
2700: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
2701: FND_MSG_PUB.initialize;
2702: END IF;
2703:
2704: PA_TASK_PVT1.Create_Schedule_Version(
2761: ,x_msg_count => x_msg_count
2762: ,x_msg_data => x_msg_data
2763: );
2764:
2765: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2766: x_msg_count := FND_MSG_PUB.count_msg;
2767: IF x_msg_count = 1 then
2768: pa_interface_utils_pub.get_messages
2769: (p_encoded => FND_API.G_TRUE,
2765: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2766: x_msg_count := FND_MSG_PUB.count_msg;
2767: IF x_msg_count = 1 then
2768: pa_interface_utils_pub.get_messages
2769: (p_encoded => FND_API.G_TRUE,
2770: p_msg_index => 1,
2771: p_msg_count => l_msg_count,
2772: p_msg_data => l_msg_data,
2773: p_data => l_data,
2773: p_data => l_data,
2774: p_msg_index_out => l_msg_index_out);
2775: x_msg_data := l_data;
2776: END IF;
2777: raise FND_API.G_EXC_ERROR;
2778: END IF;
2779:
2780: x_return_status := FND_API.G_RET_STS_SUCCESS;
2781:
2776: END IF;
2777: raise FND_API.G_EXC_ERROR;
2778: END IF;
2779:
2780: x_return_status := FND_API.G_RET_STS_SUCCESS;
2781:
2782: IF (p_commit = FND_API.G_TRUE) THEN
2783: COMMIT;
2784: END IF;
2778: END IF;
2779:
2780: x_return_status := FND_API.G_RET_STS_SUCCESS;
2781:
2782: IF (p_commit = FND_API.G_TRUE) THEN
2783: COMMIT;
2784: END IF;
2785:
2786: IF (p_debug_mode = 'Y') THEN
2786: IF (p_debug_mode = 'Y') THEN
2787: pa_debug.debug('PA_TASK_PUB1.CREATE_SCHEDULE_VERSION END');
2788: END IF;
2789: EXCEPTION
2790: when FND_API.G_EXC_ERROR then
2791: if p_commit = FND_API.G_TRUE then
2792: rollback to create_schedule_version;
2793: end if;
2794: x_return_status := FND_API.G_RET_STS_ERROR;
2787: pa_debug.debug('PA_TASK_PUB1.CREATE_SCHEDULE_VERSION END');
2788: END IF;
2789: EXCEPTION
2790: when FND_API.G_EXC_ERROR then
2791: if p_commit = FND_API.G_TRUE then
2792: rollback to create_schedule_version;
2793: end if;
2794: x_return_status := FND_API.G_RET_STS_ERROR;
2795: when FND_API.G_EXC_UNEXPECTED_ERROR then
2790: when FND_API.G_EXC_ERROR then
2791: if p_commit = FND_API.G_TRUE then
2792: rollback to create_schedule_version;
2793: end if;
2794: x_return_status := FND_API.G_RET_STS_ERROR;
2795: when FND_API.G_EXC_UNEXPECTED_ERROR then
2796: if p_commit = FND_API.G_TRUE then
2797: rollback to create_schedule_version;
2798: end if;
2791: if p_commit = FND_API.G_TRUE then
2792: rollback to create_schedule_version;
2793: end if;
2794: x_return_status := FND_API.G_RET_STS_ERROR;
2795: when FND_API.G_EXC_UNEXPECTED_ERROR then
2796: if p_commit = FND_API.G_TRUE then
2797: rollback to create_schedule_version;
2798: end if;
2799: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2792: rollback to create_schedule_version;
2793: end if;
2794: x_return_status := FND_API.G_RET_STS_ERROR;
2795: when FND_API.G_EXC_UNEXPECTED_ERROR then
2796: if p_commit = FND_API.G_TRUE then
2797: rollback to create_schedule_version;
2798: end if;
2799: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2800: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
2795: when FND_API.G_EXC_UNEXPECTED_ERROR then
2796: if p_commit = FND_API.G_TRUE then
2797: rollback to create_schedule_version;
2798: end if;
2799: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2800: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
2801: p_procedure_name => 'CREATE_SCHEDULE_VERSION',
2802: p_error_text => SUBSTRB(SQLERRM,1,240));
2803: when OTHERS then
2800: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
2801: p_procedure_name => 'CREATE_SCHEDULE_VERSION',
2802: p_error_text => SUBSTRB(SQLERRM,1,240));
2803: when OTHERS then
2804: if p_commit = FND_API.G_TRUE then
2805: rollback to create_schedule_version;
2806: end if;
2807: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2808: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
2803: when OTHERS then
2804: if p_commit = FND_API.G_TRUE then
2805: rollback to create_schedule_version;
2806: end if;
2807: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2808: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
2809: p_procedure_name => 'CREATE_SCHEDULE_VERSION',
2810: p_error_text => SUBSTRB(SQLERRM,1,240));
2811: raise;
2818: -- Pre-reqs : None
2819: -- Return Value : N/A
2820: -- Prameters
2821: -- p_api_version IN NUMBER N Not Null 1.0
2822: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
2823: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
2824: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
2825: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
2826: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
2819: -- Return Value : N/A
2820: -- Prameters
2821: -- p_api_version IN NUMBER N Not Null 1.0
2822: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
2823: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
2824: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
2825: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
2826: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
2827: -- p_debug_mode IN VARCHAR2 N Null N
2820: -- Prameters
2821: -- p_api_version IN NUMBER N Not Null 1.0
2822: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
2823: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
2824: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
2825: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
2826: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
2827: -- p_debug_mode IN VARCHAR2 N Null N
2828: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
2821: -- p_api_version IN NUMBER N Not Null 1.0
2822: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
2823: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
2824: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
2825: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
2826: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
2827: -- p_debug_mode IN VARCHAR2 N Null N
2828: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
2829: -- p_element_version_id IN NUMBER N Not Null
2856: --
2857:
2858: PROCEDURE Update_Schedule_Version(
2859: p_api_version IN NUMBER :=1.0,
2860: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
2861: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
2862: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
2863: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
2864: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
2857:
2858: PROCEDURE Update_Schedule_Version(
2859: p_api_version IN NUMBER :=1.0,
2860: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
2861: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
2862: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
2863: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
2864: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
2865: p_debug_mode IN VARCHAR2 :='N',
2858: PROCEDURE Update_Schedule_Version(
2859: p_api_version IN NUMBER :=1.0,
2860: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
2861: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
2862: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
2863: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
2864: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
2865: p_debug_mode IN VARCHAR2 :='N',
2866: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
2859: p_api_version IN NUMBER :=1.0,
2860: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
2861: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
2862: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
2863: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
2864: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
2865: p_debug_mode IN VARCHAR2 :='N',
2866: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
2867: p_pev_schedule_id IN NUMBER,
2990: IF (p_debug_mode = 'Y') THEN
2991: pa_debug.debug('PA_TASK_PUB1.update_SCHEDULE_VERSION begin');
2992: END IF;
2993:
2994: IF (p_commit = FND_API.G_TRUE) THEN
2995: savepoint update_schedule_version;
2996: END IF;
2997:
2998: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
2994: IF (p_commit = FND_API.G_TRUE) THEN
2995: savepoint update_schedule_version;
2996: END IF;
2997:
2998: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
2999: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3000: END IF;
3001:
3002:
2995: savepoint update_schedule_version;
2996: END IF;
2997:
2998: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
2999: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3000: END IF;
3001:
3002:
3003: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
2999: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3000: END IF;
3001:
3002:
3003: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
3004: FND_MSG_PUB.initialize;
3005: END IF;
3006:
3007: -- Added for FP_M changes 3305199
3025: ,x_msg_count => x_msg_count
3026: ,x_msg_data => x_msg_data
3027: );
3028:
3029: IF l_return_status <> FND_API.G_RET_STS_SUCCESS then
3030: x_msg_count := FND_MSG_PUB.count_msg;
3031: If x_msg_count = 1 then
3032: pa_interface_utils_pub.get_messages
3033: (p_encoded => FND_API.G_TRUE,
3029: IF l_return_status <> FND_API.G_RET_STS_SUCCESS then
3030: x_msg_count := FND_MSG_PUB.count_msg;
3031: If x_msg_count = 1 then
3032: pa_interface_utils_pub.get_messages
3033: (p_encoded => FND_API.G_TRUE,
3034: p_msg_index => 1,
3035: p_msg_count => l_msg_count,
3036: p_msg_data => l_msg_data,
3037: p_data => l_data,
3037: p_data => l_data,
3038: p_msg_index_out => l_msg_index_out);
3039: x_msg_data := l_data;
3040: End If;
3041: raise FND_API.G_EXC_ERROR;
3042: End If;
3043: End If;
3044: -- End of FP_M changes
3045:
3098: END IF;
3099: IF l_update_task_dates_allowed = 'N' THEN
3100: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
3101: p_msg_name => 'PA_PR_PM_NO_CHG_TASK_DATES');
3102: raise FND_API.G_EXC_ERROR;
3103: END IF;
3104: END IF;
3105: END IF;
3106: END IF;
3108: -- end hyau Bug 2852753
3109:
3110:
3111: --Lock row
3112: IF( p_validate_only <> FND_API.G_TRUE) THEN
3113: BEGIN
3114: select 'x' into l_dummy
3115: from PA_PROJ_ELEM_VER_SCHEDULE
3116: where pev_schedule_id = p_pev_schedule_id
3155:
3156: IF l_msg_count > 0 THEN
3157: x_msg_count := l_msg_count;
3158: x_return_status := 'E';
3159: RAISE FND_API.G_EXC_ERROR;
3160: END IF;
3161:
3162:
3163: PA_TASK_PVT1.Update_Schedule_Version(
3220: ,x_msg_count => x_msg_count
3221: ,x_msg_data => x_msg_data
3222: );
3223:
3224: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3225: x_msg_count := FND_MSG_PUB.count_msg;
3226: IF x_msg_count = 1 then
3227: pa_interface_utils_pub.get_messages
3228: (p_encoded => FND_API.G_TRUE,
3224: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
3225: x_msg_count := FND_MSG_PUB.count_msg;
3226: IF x_msg_count = 1 then
3227: pa_interface_utils_pub.get_messages
3228: (p_encoded => FND_API.G_TRUE,
3229: p_msg_index => 1,
3230: p_msg_count => l_msg_count,
3231: p_msg_data => l_msg_data,
3232: p_data => l_data,
3232: p_data => l_data,
3233: p_msg_index_out => l_msg_index_out);
3234: x_msg_data := l_data;
3235: END IF;
3236: raise FND_API.G_EXC_ERROR;
3237: END IF;
3238:
3239: x_return_status := FND_API.G_RET_STS_SUCCESS;
3240:
3235: END IF;
3236: raise FND_API.G_EXC_ERROR;
3237: END IF;
3238:
3239: x_return_status := FND_API.G_RET_STS_SUCCESS;
3240:
3241: IF (p_commit = FND_API.G_TRUE) THEN
3242: COMMIT;
3243: END IF;
3237: END IF;
3238:
3239: x_return_status := FND_API.G_RET_STS_SUCCESS;
3240:
3241: IF (p_commit = FND_API.G_TRUE) THEN
3242: COMMIT;
3243: END IF;
3244:
3245: IF (p_debug_mode = 'Y') THEN
3245: IF (p_debug_mode = 'Y') THEN
3246: pa_debug.debug('PA_TASK_PUB1.UPDATE_SCHEDULE_VERSION END');
3247: END IF;
3248: EXCEPTION
3249: when FND_API.G_EXC_ERROR then
3250: if p_commit = FND_API.G_TRUE then
3251: rollback to update_schedule_version;
3252: end if;
3253: x_return_status := FND_API.G_RET_STS_ERROR;
3246: pa_debug.debug('PA_TASK_PUB1.UPDATE_SCHEDULE_VERSION END');
3247: END IF;
3248: EXCEPTION
3249: when FND_API.G_EXC_ERROR then
3250: if p_commit = FND_API.G_TRUE then
3251: rollback to update_schedule_version;
3252: end if;
3253: x_return_status := FND_API.G_RET_STS_ERROR;
3254: when FND_API.G_EXC_UNEXPECTED_ERROR then
3249: when FND_API.G_EXC_ERROR then
3250: if p_commit = FND_API.G_TRUE then
3251: rollback to update_schedule_version;
3252: end if;
3253: x_return_status := FND_API.G_RET_STS_ERROR;
3254: when FND_API.G_EXC_UNEXPECTED_ERROR then
3255: if p_commit = FND_API.G_TRUE then
3256: rollback to update_schedule_version;
3257: end if;
3250: if p_commit = FND_API.G_TRUE then
3251: rollback to update_schedule_version;
3252: end if;
3253: x_return_status := FND_API.G_RET_STS_ERROR;
3254: when FND_API.G_EXC_UNEXPECTED_ERROR then
3255: if p_commit = FND_API.G_TRUE then
3256: rollback to update_schedule_version;
3257: end if;
3258: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3251: rollback to update_schedule_version;
3252: end if;
3253: x_return_status := FND_API.G_RET_STS_ERROR;
3254: when FND_API.G_EXC_UNEXPECTED_ERROR then
3255: if p_commit = FND_API.G_TRUE then
3256: rollback to update_schedule_version;
3257: end if;
3258: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3259: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
3254: when FND_API.G_EXC_UNEXPECTED_ERROR then
3255: if p_commit = FND_API.G_TRUE then
3256: rollback to update_schedule_version;
3257: end if;
3258: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3259: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
3260: p_procedure_name => 'UPDATE_SCHEDULE_VERSION',
3261: p_error_text => SUBSTRB(SQLERRM,1,240));
3262: when OTHERS then
3259: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
3260: p_procedure_name => 'UPDATE_SCHEDULE_VERSION',
3261: p_error_text => SUBSTRB(SQLERRM,1,240));
3262: when OTHERS then
3263: if p_commit = FND_API.G_TRUE then
3264: rollback to update_schedule_version;
3265: end if;
3266: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3267: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
3262: when OTHERS then
3263: if p_commit = FND_API.G_TRUE then
3264: rollback to update_schedule_version;
3265: end if;
3266: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3267: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
3268: p_procedure_name => 'UPDATE_SCHEDULE_VERSION',
3269: p_error_text => SUBSTRB(SQLERRM,1,240));
3270: raise;
3275: -- Pre-reqs : None
3276: -- Return Value : N/A
3277: -- Prameters
3278: -- p_api_version IN NUMBER N Not Null 1.0
3279: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
3280: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
3281: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
3282: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
3283: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
3276: -- Return Value : N/A
3277: -- Prameters
3278: -- p_api_version IN NUMBER N Not Null 1.0
3279: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
3280: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
3281: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
3282: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
3283: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
3284: -- p_debug_mode IN VARCHAR2 N Null N
3277: -- Prameters
3278: -- p_api_version IN NUMBER N Not Null 1.0
3279: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
3280: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
3281: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
3282: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
3283: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
3284: -- p_debug_mode IN VARCHAR2 N Null N
3285: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
3278: -- p_api_version IN NUMBER N Not Null 1.0
3279: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
3280: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
3281: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
3282: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
3283: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
3284: -- p_debug_mode IN VARCHAR2 N Null N
3285: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
3286: -- p_src_project_id IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
3312: --
3313:
3314: PROCEDURE Copy_Task(
3315: p_api_version IN NUMBER :=1.0,
3316: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
3317: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
3318: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
3319: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
3320: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
3313:
3314: PROCEDURE Copy_Task(
3315: p_api_version IN NUMBER :=1.0,
3316: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
3317: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
3318: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
3319: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
3320: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
3321: p_debug_mode IN VARCHAR2 :='N',
3314: PROCEDURE Copy_Task(
3315: p_api_version IN NUMBER :=1.0,
3316: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
3317: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
3318: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
3319: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
3320: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
3321: p_debug_mode IN VARCHAR2 :='N',
3322: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
3315: p_api_version IN NUMBER :=1.0,
3316: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
3317: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
3318: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
3319: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
3320: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
3321: p_debug_mode IN VARCHAR2 :='N',
3322: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
3323: p_src_project_id IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
3868: IF (p_debug_mode = 'Y') THEN
3869: pa_debug.debug('PA_TASK_PUB1.COPY_TASK begin');
3870: END IF;
3871:
3872: IF (p_commit = FND_API.G_TRUE) THEN
3873: savepoint copy_task;
3874: END IF;
3875:
3876: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
3872: IF (p_commit = FND_API.G_TRUE) THEN
3873: savepoint copy_task;
3874: END IF;
3875:
3876: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
3877: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3878: END IF;
3879:
3880: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
3873: savepoint copy_task;
3874: END IF;
3875:
3876: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
3877: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3878: END IF;
3879:
3880: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
3881: FND_MSG_PUB.initialize;
3876: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
3877: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3878: END IF;
3879:
3880: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
3881: FND_MSG_PUB.initialize;
3882: END IF;
3883:
3884: --bug 4075697 copy_task
3956:
3957: IF ((l_same_cbs_flag = 'N')) THEN
3958: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
3959: p_msg_name => 'PA_DIFF_CBS_CANNOT_COPY');
3960: raise FND_API.G_EXC_ERROR;
3961: END IF;
3962:
3963:
3964: /* If p_structure_type = 'WORKPLAN' and
3976:
3977: IF (x_return_status <> 'Y') THEN
3978: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
3979: p_msg_name => l_error_msg_code);
3980: raise FND_API.G_EXC_ERROR;
3981: End If;
3982: End If;
3983: */ --moved below
3984:
4028: END IF;
4029: IF l_add_task_allowed = 'N' THEN
4030: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
4031: p_msg_name => 'PA_PR_PM_CANNOT_COPY');
4032: raise FND_API.G_EXC_ERROR;
4033: END IF;
4034: END IF;
4035:
4036: End IF; -- End p_called_from_bulk_Api is N
4061: x_project_id => l_src_project_id,
4062: x_return_status => l_return_status,
4063: x_error_msg_code => l_error_msg_code);
4064: --dbms_output.put_line('after proj name 2 id conv: '||l_src_project_id);
4065: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4066: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
4067: p_msg_name => l_error_msg_code);
4068: END IF;
4069: END IF;
4082: ,x_return_status => l_return_status
4083: ,x_error_message_code => l_error_msg_code
4084: );
4085: --dbms_output.put_line('after struct name 2 id conv: '||l_src_structure_id);
4086: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4087: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
4088: p_msg_name => l_error_msg_code);
4089: END IF;
4090: END IF; --End Name-Id Conversion
4105: ,x_return_status => l_return_status
4106: ,x_error_message_code => l_error_msg_code
4107: );
4108: --dbms_output.put_line('after struct ver name 2 id conv: '||l_src_structure_version_id);
4109: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4110: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
4111: p_msg_name => l_error_msg_code);
4112: END IF;
4113:
4130: ,x_task_version_id => l_src_task_version_id
4131: ,x_return_status => l_return_status
4132: ,x_error_msg_code => l_error_msg_code
4133: );
4134: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4135: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
4136: p_msg_name => l_error_msg_code);
4137: END IF;
4138: END IF; --End Name-Id Conversion
4248:
4249: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
4250: p_msg_name => 'PA_PS_NOT_ENOUGH_PARAMS' );
4251: x_msg_data := 'COPY TASK : PA_PS_NOT_ENOUGH_PARAMS';
4252: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4253: RAISE FND_API.G_EXC_ERROR;
4254: /*END IF; : 4201927 */
4255: END IF;
4256:
4249: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
4250: p_msg_name => 'PA_PS_NOT_ENOUGH_PARAMS' );
4251: x_msg_data := 'COPY TASK : PA_PS_NOT_ENOUGH_PARAMS';
4252: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4253: RAISE FND_API.G_EXC_ERROR;
4254: /*END IF; : 4201927 */
4255: END IF;
4256:
4257: /* 4201927 : Perf Fix : END IF; --move_task_version check. */
4262: ELSE
4263: l_src_wp_type := l_wp_type;
4264: END IF;
4265:
4266: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4267: x_msg_count := FND_MSG_PUB.count_msg;
4268: IF x_msg_count = 1 then
4269: pa_interface_utils_pub.get_messages
4270: (p_encoded => FND_API.G_TRUE,
4266: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4267: x_msg_count := FND_MSG_PUB.count_msg;
4268: IF x_msg_count = 1 then
4269: pa_interface_utils_pub.get_messages
4270: (p_encoded => FND_API.G_TRUE,
4271: p_msg_index => 1,
4272: p_msg_count => l_msg_count,
4273: p_msg_data => l_msg_data,
4274: p_data => l_data,
4274: p_data => l_data,
4275: p_msg_index_out => l_msg_index_out);
4276: x_msg_data := l_data;
4277: END IF;
4278: raise FND_API.G_EXC_ERROR;
4279: END IF;
4280: --If source task is empty and user not selected copy PA_ENTIRE_VERSION
4281: IF ( l_src_task_version_id IS NULL AND
4282: l_src_structure_version_id IS NOT NULL AND
4285: THEN
4286: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
4287: p_msg_name => 'PA_PS_WRONG_COPY_OPTION' );
4288: x_msg_data := 'PA_PS_WRONG_COPY_OPTION';
4289: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4290: RAISE FND_API.G_EXC_ERROR;
4291: END IF;
4292:
4293: IF p_copy_option = 'PA_TASK_ONLY' OR p_copy_option = 'PA_TASK_SUBTASK'
4286: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
4287: p_msg_name => 'PA_PS_WRONG_COPY_OPTION' );
4288: x_msg_data := 'PA_PS_WRONG_COPY_OPTION';
4289: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
4290: RAISE FND_API.G_EXC_ERROR;
4291: END IF;
4292:
4293: IF p_copy_option = 'PA_TASK_ONLY' OR p_copy_option = 'PA_TASK_SUBTASK'
4294: THEN
4342:
4343: IF (l_return_status <> 'Y') THEN
4344: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
4345: p_msg_name => l_error_msg_code);
4346: raise FND_API.G_EXC_ERROR;
4347: END IF;
4348: ELSE
4349: PA_PROJ_ELEMENTS_UTILS.Check_create_subtask_ok(
4350: p_parent_task_ver_id => l_ref_task_version_id
4353: );
4354: IF (l_return_status <> 'Y') THEN
4355: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
4356: p_msg_name => l_error_msg_code);
4357: raise FND_API.G_EXC_ERROR;
4358: END IF;
4359: END IF;
4360: --end task status changes
4361: /* not required in the context of copy_task bcoz when a task is copied, copied as financial if copied under Fin tab and
4375:
4376: IF (x_return_status <> 'Y') THEN
4377: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
4378: p_msg_name => l_error_msg_code);
4379: raise FND_API.G_EXC_ERROR;
4380: End If;
4381: END IF;
4382: End If;
4383: */
4808: l_task_id := cur_obj_rel_rec.proj_element_id;
4809: END IF;
4810: 4201927*/
4811:
4812: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4813: x_msg_count := FND_MSG_PUB.count_msg;
4814: IF x_msg_count = 1 then
4815: pa_interface_utils_pub.get_messages
4816: (p_encoded => FND_API.G_TRUE,
4812: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4813: x_msg_count := FND_MSG_PUB.count_msg;
4814: IF x_msg_count = 1 then
4815: pa_interface_utils_pub.get_messages
4816: (p_encoded => FND_API.G_TRUE,
4817: p_msg_index => 1,
4818: p_msg_count => l_msg_count,
4819: p_msg_data => l_msg_data,
4820: p_data => l_data,
4820: p_data => l_data,
4821: p_msg_index_out => l_msg_index_out);
4822: x_msg_data := l_data;
4823: END IF;
4824: raise FND_API.G_EXC_ERROR;
4825: END IF;
4826: --end bug 2846700
4827:
4828:
4847: ,p_old_pk_col_value_pairs => l_orig_proj_pk_value_pairs
4848: ,p_old_dtlevel_col_value_pairs => l_orig_task_pk_value_pairs
4849: ,p_new_pk_col_value_pairs => l_new_proj_pk_value_pairs
4850: ,p_new_dtlevel_col_value_pairs => l_new_task_pk_value_pairs
4851: ,p_commit => FND_API.G_TRUE
4852: ,x_return_status => x_return_status
4853: ,x_errorcode => l_errorcode
4854: ,x_msg_count => x_msg_count
4855: ,x_msg_data => l_msg_data );
4853: ,x_errorcode => l_errorcode
4854: ,x_msg_count => x_msg_count
4855: ,x_msg_data => l_msg_data );
4856:
4857: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4858: x_msg_count := FND_MSG_PUB.count_msg;
4859: IF x_msg_count = 1 then
4860: pa_interface_utils_pub.get_messages
4861: (p_encoded => FND_API.G_TRUE,
4857: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4858: x_msg_count := FND_MSG_PUB.count_msg;
4859: IF x_msg_count = 1 then
4860: pa_interface_utils_pub.get_messages
4861: (p_encoded => FND_API.G_TRUE,
4862: p_msg_index => 1,
4863: p_msg_count => x_msg_count,
4864: p_msg_data => l_msg_data,
4865: p_data => l_data,
4865: p_data => l_data,
4866: p_msg_index_out => l_msg_index_out);
4867: x_msg_data := l_data;
4868: END IF;
4869: raise FND_API.G_EXC_ERROR;
4870: END IF;
4871: END IF;
4872: /* End for 14209636 */
4873:
4908: ,x_msg_count => l_msg_count
4909: ,x_msg_data => l_msg_data
4910: );
4911:
4912: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4913: x_msg_count := FND_MSG_PUB.count_msg;
4914: IF x_msg_count = 1 then
4915: pa_interface_utils_pub.get_messages
4916: (p_encoded => FND_API.G_TRUE,
4912: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4913: x_msg_count := FND_MSG_PUB.count_msg;
4914: IF x_msg_count = 1 then
4915: pa_interface_utils_pub.get_messages
4916: (p_encoded => FND_API.G_TRUE,
4917: p_msg_index => 1,
4918: p_msg_count => l_msg_count,
4919: p_msg_data => l_msg_data,
4920: p_data => l_data,
4920: p_data => l_data,
4921: p_msg_index_out => l_msg_index_out);
4922: x_msg_data := l_data;
4923: END IF;
4924: raise FND_API.G_EXC_ERROR;
4925: END IF;
4926:
4927: /* bug#16083858 Adding logic to check if cbs is enabled
4928: * and whether cost codes should be copied.
4941: X_Msg_Count => l_msg_count);
4942:
4943:
4944:
4945: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4946: x_msg_count := FND_MSG_PUB.count_msg;
4947: IF x_msg_count = 1 then
4948: pa_interface_utils_pub.get_messages
4949: (p_encoded => FND_API.G_TRUE,
4945: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4946: x_msg_count := FND_MSG_PUB.count_msg;
4947: IF x_msg_count = 1 then
4948: pa_interface_utils_pub.get_messages
4949: (p_encoded => FND_API.G_TRUE,
4950: p_msg_index => 1,
4951: p_msg_count => l_msg_count,
4952: p_msg_data => l_msg_data,
4953: p_data => l_data,
4953: p_data => l_data,
4954: p_msg_index_out => l_msg_index_out);
4955: x_msg_data := l_data;
4956: END IF;
4957: raise FND_API.G_EXC_ERROR;
4958: END IF;
4959:
4960: END IF;
4961:
5065: );
5066: -- end xxlu changes
5067: /*END IF; 4201927 : This Copy API not called in Move Task Version Context. */
5068:
5069: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5070: x_msg_count := FND_MSG_PUB.count_msg;
5071: IF x_msg_count = 1 then
5072: pa_interface_utils_pub.get_messages
5073: (p_encoded => FND_API.G_TRUE,
5069: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5070: x_msg_count := FND_MSG_PUB.count_msg;
5071: IF x_msg_count = 1 then
5072: pa_interface_utils_pub.get_messages
5073: (p_encoded => FND_API.G_TRUE,
5074: p_msg_index => 1,
5075: p_msg_count => l_msg_count,
5076: p_msg_data => l_msg_data,
5077: p_data => l_data,
5077: p_data => l_data,
5078: p_msg_index_out => l_msg_index_out);
5079: x_msg_data := l_data;
5080: END IF;
5081: raise FND_API.G_EXC_ERROR;
5082: END IF;
5083: END IF;
5084: CLOSE cur_struc_type;
5085:
5096: X_Msg_Count => X_Msg_Count,
5097: X_Msg_Data => X_Msg_Data
5098: );
5099:
5100: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5101: RAISE FND_API.G_EXC_ERROR;
5102: END IF;
5103:
5104: PA_RELATIONSHIP_PVT.Copy_Inter_Project_Dependency (
5097: X_Msg_Data => X_Msg_Data
5098: );
5099:
5100: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5101: RAISE FND_API.G_EXC_ERROR;
5102: END IF;
5103:
5104: PA_RELATIONSHIP_PVT.Copy_Inter_Project_Dependency (
5105: P_Source_Ver_Tbl => l_Old_Task_Versions_Tab,
5107: X_Return_Status => X_Return_Status,
5108: X_Msg_Count => X_Msg_Count,
5109: X_Msg_Data => X_Msg_Data
5110: );
5111: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5112: RAISE FND_API.G_EXC_ERROR;
5113: END IF;
5114:
5115: End If;
5108: X_Msg_Count => X_Msg_Count,
5109: X_Msg_Data => X_Msg_Data
5110: );
5111: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5112: RAISE FND_API.G_EXC_ERROR;
5113: END IF;
5114:
5115: End If;
5116: -- End of FP_M changes
5119: IF (NOT l_src_tasks_found AND p_copy_option = 'PA_ENTIRE_VERSION')THEN
5120: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
5121: p_msg_name => 'PA_CANT_COPY_EMPTY_STRUCT_VER' );
5122: x_msg_data := 'PA_CANT_COPY_EMPTY_STRUCT_VER';
5123: x_return_status := FND_API.G_RET_STS_ERROR;
5124: RAISE FND_API.G_EXC_ERROR;
5125: END IF;
5126:
5127: /* Bug 2623999 coomnted out the code below. It is redundant and causing issues */
5120: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
5121: p_msg_name => 'PA_CANT_COPY_EMPTY_STRUCT_VER' );
5122: x_msg_data := 'PA_CANT_COPY_EMPTY_STRUCT_VER';
5123: x_return_status := FND_API.G_RET_STS_ERROR;
5124: RAISE FND_API.G_EXC_ERROR;
5125: END IF;
5126:
5127: /* Bug 2623999 coomnted out the code below. It is redundant and causing issues */
5128: /*
5192: ,x_return_status => l_return_status
5193: ,x_msg_count => l_msg_count
5194: ,x_msg_data => l_msg_data );
5195:
5196: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5197: x_msg_count := FND_MSG_PUB.count_msg;
5198: IF x_msg_count = 1 then
5199: pa_interface_utils_pub.get_messages
5200: (p_encoded => FND_API.G_TRUE,
5196: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
5197: x_msg_count := FND_MSG_PUB.count_msg;
5198: IF x_msg_count = 1 then
5199: pa_interface_utils_pub.get_messages
5200: (p_encoded => FND_API.G_TRUE,
5201: p_msg_index => 1,
5202: p_msg_count => l_msg_count,
5203: p_msg_data => l_msg_data,
5204: p_data => l_data,
5204: p_data => l_data,
5205: p_msg_index_out => l_msg_index_out);
5206: x_msg_data := l_data;
5207: END IF;
5208: raise FND_API.G_EXC_ERROR;
5209: END IF;
5210: END IF;
5211: END IF;
5212: CLOSE cur_struc_type2;
5216: /*IF PA_PROJECT_STRUCTURE_UTILS.GET_STRUC_TYPE_FOR_VERSION(p_dest_structure_version_id, 'WORKPLAN') = 'Y' then
5217: */
5218: IF l_wp_type = 'Y' then
5219: PA_STRUCT_TASK_ROLLUP_PUB.Tasks_Rollup_Unlimited(
5220: p_commit => FND_API.G_FALSE,
5221: p_element_versions => l_tasks_ver_ids,
5222: x_return_status => l_return_status,
5223: x_msg_count => l_msg_count,
5224: x_msg_data => l_msg_data);
5222: x_return_status => l_return_status,
5223: x_msg_count => l_msg_count,
5224: x_msg_data => l_msg_data);
5225:
5226: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
5227: x_msg_count := FND_MSG_PUB.count_msg;
5228: if x_msg_count = 1 then
5229: pa_interface_utils_pub.get_messages
5230: (p_encoded => FND_API.G_TRUE,
5226: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
5227: x_msg_count := FND_MSG_PUB.count_msg;
5228: if x_msg_count = 1 then
5229: pa_interface_utils_pub.get_messages
5230: (p_encoded => FND_API.G_TRUE,
5231: p_msg_index => 1,
5232: p_msg_count => l_msg_count,
5233: p_msg_data => l_msg_data,
5234: p_data => l_data,
5234: p_data => l_data,
5235: p_msg_index_out => l_msg_index_out);
5236: x_msg_data := l_data;
5237: end if;
5238: raise FND_API.G_EXC_ERROR;
5239: end if;
5240:
5241: --hsiu added for task status
5242: --if versioning is off, rollup.
5252: ,x_msg_count => l_msg_count
5253: ,x_msg_data => l_msg_data
5254: );
5255:
5256: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
5257: x_msg_count := FND_MSG_PUB.count_msg;
5258: if x_msg_count = 1 then
5259: pa_interface_utils_pub.get_messages
5260: (p_encoded => FND_API.G_TRUE,
5256: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
5257: x_msg_count := FND_MSG_PUB.count_msg;
5258: if x_msg_count = 1 then
5259: pa_interface_utils_pub.get_messages
5260: (p_encoded => FND_API.G_TRUE,
5261: p_msg_index => 1,
5262: p_msg_count => l_msg_count,
5263: p_msg_data => l_msg_data,
5264: p_data => l_data,
5264: p_data => l_data,
5265: p_msg_index_out => l_msg_index_out);
5266: x_msg_data := l_data;
5267: end if;
5268: raise FND_API.G_EXC_ERROR;
5269: end if;
5270:
5271: END IF;
5272:
5290: 4201927 */
5291: --3305199: deliverable changes
5292: IF (p_cp_deliverable_asso_flag = 'Y' AND l_wp_type = 'Y') THEN
5293: PA_DELIVERABLE_PUB.COPY_ASSOCIATIONS
5294: (p_validate_only => FND_API.G_FALSE
5295: ,p_src_task_versions_tab => l_Old_Task_Versions_Tab
5296: ,p_dest_task_versions_tab => l_New_Task_Versions_Tab
5297: ,x_return_status => l_return_status
5298: ,x_msg_count => l_msg_count
5297: ,x_return_status => l_return_status
5298: ,x_msg_count => l_msg_count
5299: ,x_msg_data => l_msg_data);
5300:
5301: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
5302: x_msg_count := FND_MSG_PUB.count_msg;
5303: if x_msg_count = 1 then
5304: pa_interface_utils_pub.get_messages
5305: (p_encoded => FND_API.G_TRUE,
5301: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
5302: x_msg_count := FND_MSG_PUB.count_msg;
5303: if x_msg_count = 1 then
5304: pa_interface_utils_pub.get_messages
5305: (p_encoded => FND_API.G_TRUE,
5306: p_msg_index => 1,
5307: p_msg_count => l_msg_count,
5308: p_msg_data => l_msg_data,
5309: p_data => l_data,
5309: p_data => l_data,
5310: p_msg_index_out => l_msg_index_out);
5311: x_msg_data := l_data;
5312: end if;
5313: raise FND_API.G_EXC_ERROR;
5314: end if;
5315: END IF;
5316: --3305199: end deliverable changes
5317:
5357: WHEN OTHERS THEN
5358: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
5359: p_procedure_name => 'COPY_TASK',
5360: p_error_text => SUBSTRB('pa_fp_planning_transaction_pub.copy_planning_transactions:'||SQLERRM,1,240));
5361: RAISE FND_API.G_EXC_ERROR;
5362: END;
5363:
5364:
5365: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
5361: RAISE FND_API.G_EXC_ERROR;
5362: END;
5363:
5364:
5365: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
5366: x_msg_count := FND_MSG_PUB.count_msg;
5367: if x_msg_count = 1 then
5368: pa_interface_utils_pub.get_messages
5369: (p_encoded => FND_API.G_TRUE,
5365: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
5366: x_msg_count := FND_MSG_PUB.count_msg;
5367: if x_msg_count = 1 then
5368: pa_interface_utils_pub.get_messages
5369: (p_encoded => FND_API.G_TRUE,
5370: p_msg_index => 1,
5371: p_msg_count => l_msg_count,
5372: p_msg_data => l_msg_data,
5373: p_data => l_data,
5373: p_data => l_data,
5374: p_msg_index_out => l_msg_index_out);
5375: x_msg_data := l_data;
5376: end if;
5377: raise FND_API.G_EXC_ERROR;
5378: end if;
5379: END IF;
5380:
5381: -- END OF BLOCK MOVED FOR P1 BUG 4210796
5424: WHEN OTHERS THEN
5425: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
5426: p_procedure_name => 'COPY_TASK',
5427: p_error_text => SUBSTRB('pa_fp_planning_transaction_pub.delete_planning_transactions:'||SQLERRM,1,240));
5428: RAISE FND_API.G_EXC_ERROR;
5429: END;
5430:
5431: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
5432: x_msg_count := FND_MSG_PUB.count_msg;
5427: p_error_text => SUBSTRB('pa_fp_planning_transaction_pub.delete_planning_transactions:'||SQLERRM,1,240));
5428: RAISE FND_API.G_EXC_ERROR;
5429: END;
5430:
5431: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
5432: x_msg_count := FND_MSG_PUB.count_msg;
5433: if x_msg_count = 1 then
5434: pa_interface_utils_pub.get_messages
5435: (p_encoded => FND_API.G_TRUE,
5431: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
5432: x_msg_count := FND_MSG_PUB.count_msg;
5433: if x_msg_count = 1 then
5434: pa_interface_utils_pub.get_messages
5435: (p_encoded => FND_API.G_TRUE,
5436: p_msg_index => 1,
5437: p_msg_count => l_msg_count,
5438: p_msg_data => l_msg_data,
5439: p_data => l_data,
5439: p_data => l_data,
5440: p_msg_index_out => l_msg_index_out);
5441: x_msg_data := l_data;
5442: end if;
5443: raise FND_API.G_EXC_ERROR;
5444: end if;
5445: END IF;
5446: END IF;
5447:
5488: WHEN OTHERS THEN
5489: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
5490: p_procedure_name => 'COPY_TASK',
5491: p_error_text => SUBSTRB('pa_fp_planning_transaction_pub.copy_planning_transactions:'||SQLERRM,1,240));
5492: RAISE FND_API.G_EXC_ERROR;
5493: END;
5494:
5495:
5496: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
5492: RAISE FND_API.G_EXC_ERROR;
5493: END;
5494:
5495:
5496: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
5497: x_msg_count := FND_MSG_PUB.count_msg;
5498: if x_msg_count = 1 then
5499: pa_interface_utils_pub.get_messages
5500: (p_encoded => FND_API.G_TRUE,
5496: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
5497: x_msg_count := FND_MSG_PUB.count_msg;
5498: if x_msg_count = 1 then
5499: pa_interface_utils_pub.get_messages
5500: (p_encoded => FND_API.G_TRUE,
5501: p_msg_index => 1,
5502: p_msg_count => l_msg_count,
5503: p_msg_data => l_msg_data,
5504: p_data => l_data,
5504: p_data => l_data,
5505: p_msg_index_out => l_msg_index_out);
5506: x_msg_data := l_data;
5507: end if;
5508: raise FND_API.G_EXC_ERROR;
5509: end if;
5510: END IF;
5511:
5512: END OF BLOCK MOVED FOR P1 BUG 4210796
5527: ,x_return_status => l_return_status
5528: ,x_msg_count => l_msg_count
5529: ,x_msg_data => l_msg_data);
5530:
5531: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
5532: x_msg_count := FND_MSG_PUB.count_msg;
5533: if x_msg_count = 1 then
5534: pa_interface_utils_pub.get_messages
5535: (p_encoded => FND_API.G_TRUE,
5531: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
5532: x_msg_count := FND_MSG_PUB.count_msg;
5533: if x_msg_count = 1 then
5534: pa_interface_utils_pub.get_messages
5535: (p_encoded => FND_API.G_TRUE,
5536: p_msg_index => 1,
5537: p_msg_count => l_msg_count,
5538: p_msg_data => l_msg_data,
5539: p_data => l_data,
5539: p_data => l_data,
5540: p_msg_index_out => l_msg_index_out);
5541: x_msg_data := l_data;
5542: end if;
5543: raise FND_API.G_EXC_ERROR;
5544: end if;
5545: --END IF;
5546: --3035902: process update flag changes
5547:
5548: --bug 4149392
5549: PA_TASK_PUB1.G_CALL_PJI_ROLLUP := NULL;
5550: --end bug 4149392
5551:
5552: x_return_status := FND_API.G_RET_STS_SUCCESS;
5553:
5554: IF (p_commit = FND_API.G_TRUE) THEN
5555: COMMIT;
5556: END IF;
5550: --end bug 4149392
5551:
5552: x_return_status := FND_API.G_RET_STS_SUCCESS;
5553:
5554: IF (p_commit = FND_API.G_TRUE) THEN
5555: COMMIT;
5556: END IF;
5557:
5558: IF (p_debug_mode = 'Y') THEN
5558: IF (p_debug_mode = 'Y') THEN
5559: pa_debug.debug('PA_TASK_PUB1.COPY_TASK END');
5560: END IF;
5561: EXCEPTION
5562: when FND_API.G_EXC_ERROR then
5563: if p_commit = FND_API.G_TRUE then
5564: rollback to Copy_Task;
5565: end if;
5566: x_return_status := FND_API.G_RET_STS_ERROR;
5559: pa_debug.debug('PA_TASK_PUB1.COPY_TASK END');
5560: END IF;
5561: EXCEPTION
5562: when FND_API.G_EXC_ERROR then
5563: if p_commit = FND_API.G_TRUE then
5564: rollback to Copy_Task;
5565: end if;
5566: x_return_status := FND_API.G_RET_STS_ERROR;
5567: when FND_API.G_EXC_UNEXPECTED_ERROR then
5562: when FND_API.G_EXC_ERROR then
5563: if p_commit = FND_API.G_TRUE then
5564: rollback to Copy_Task;
5565: end if;
5566: x_return_status := FND_API.G_RET_STS_ERROR;
5567: when FND_API.G_EXC_UNEXPECTED_ERROR then
5568: if p_commit = FND_API.G_TRUE then
5569: rollback to Copy_Task;
5570: end if;
5563: if p_commit = FND_API.G_TRUE then
5564: rollback to Copy_Task;
5565: end if;
5566: x_return_status := FND_API.G_RET_STS_ERROR;
5567: when FND_API.G_EXC_UNEXPECTED_ERROR then
5568: if p_commit = FND_API.G_TRUE then
5569: rollback to Copy_Task;
5570: end if;
5571: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5564: rollback to Copy_Task;
5565: end if;
5566: x_return_status := FND_API.G_RET_STS_ERROR;
5567: when FND_API.G_EXC_UNEXPECTED_ERROR then
5568: if p_commit = FND_API.G_TRUE then
5569: rollback to Copy_Task;
5570: end if;
5571: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5572: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
5567: when FND_API.G_EXC_UNEXPECTED_ERROR then
5568: if p_commit = FND_API.G_TRUE then
5569: rollback to Copy_Task;
5570: end if;
5571: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5572: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
5573: p_procedure_name => 'COPY_TASK',
5574: p_error_text => SUBSTRB(SQLERRM,1,240));
5575: when OTHERS then
5572: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
5573: p_procedure_name => 'COPY_TASK',
5574: p_error_text => SUBSTRB(SQLERRM,1,240));
5575: when OTHERS then
5576: if p_commit = FND_API.G_TRUE then
5577: rollback to Copy_Task;
5578: end if;
5579: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5580: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
5575: when OTHERS then
5576: if p_commit = FND_API.G_TRUE then
5577: rollback to Copy_Task;
5578: end if;
5579: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5580: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
5581: p_procedure_name => 'COPY_TASK',
5582: p_error_text => SUBSTRB(SQLERRM,1,240));
5583: raise;
5588: -- Pre-reqs : None
5589: -- Return Value : N/A
5590: -- Prameters
5591: -- p_api_version IN NUMBER N Not Null 1.0
5592: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
5593: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
5594: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
5595: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
5596: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
5589: -- Return Value : N/A
5590: -- Prameters
5591: -- p_api_version IN NUMBER N Not Null 1.0
5592: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
5593: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
5594: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
5595: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
5596: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
5597: -- p_debug_mode IN VARCHAR2 N Null N
5590: -- Prameters
5591: -- p_api_version IN NUMBER N Not Null 1.0
5592: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
5593: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
5594: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
5595: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
5596: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
5597: -- p_debug_mode IN VARCHAR2 N Null N
5598: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
5591: -- p_api_version IN NUMBER N Not Null 1.0
5592: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
5593: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
5594: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
5595: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
5596: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
5597: -- p_debug_mode IN VARCHAR2 N Null N
5598: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
5599: -- p_structure_version_id IN NUMBER := PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
5613: --
5614:
5615: PROCEDURE MOVE_TASK_VERSION (
5616: p_api_version IN NUMBER := 1.0,
5617: p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE,
5618: p_commit IN VARCHAR2 := FND_API.G_FALSE,
5619: p_validate_only IN VARCHAR2 := FND_API.G_TRUE,
5620: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
5621: p_calling_module IN VARCHAR2 := 'SELF_SERVICE',
5614:
5615: PROCEDURE MOVE_TASK_VERSION (
5616: p_api_version IN NUMBER := 1.0,
5617: p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE,
5618: p_commit IN VARCHAR2 := FND_API.G_FALSE,
5619: p_validate_only IN VARCHAR2 := FND_API.G_TRUE,
5620: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
5621: p_calling_module IN VARCHAR2 := 'SELF_SERVICE',
5622: p_debug_mode IN VARCHAR2 := 'N',
5615: PROCEDURE MOVE_TASK_VERSION (
5616: p_api_version IN NUMBER := 1.0,
5617: p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE,
5618: p_commit IN VARCHAR2 := FND_API.G_FALSE,
5619: p_validate_only IN VARCHAR2 := FND_API.G_TRUE,
5620: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
5621: p_calling_module IN VARCHAR2 := 'SELF_SERVICE',
5622: p_debug_mode IN VARCHAR2 := 'N',
5623: p_max_msg_count IN NUMBER := PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
5616: p_api_version IN NUMBER := 1.0,
5617: p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE,
5618: p_commit IN VARCHAR2 := FND_API.G_FALSE,
5619: p_validate_only IN VARCHAR2 := FND_API.G_TRUE,
5620: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
5621: p_calling_module IN VARCHAR2 := 'SELF_SERVICE',
5622: p_debug_mode IN VARCHAR2 := 'N',
5623: p_max_msg_count IN NUMBER := PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
5624: p_structure_version_id IN NUMBER := PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
5872: IF (p_debug_mode = 'Y') THEN
5873: pa_debug.debug('PA_TASK_PUB1.MOVE_TASK_VERSION begin');
5874: END IF;
5875:
5876: IF (p_commit = FND_API.G_TRUE) THEN
5877: savepoint move_task_version;
5878: END IF;
5879:
5880: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
5876: IF (p_commit = FND_API.G_TRUE) THEN
5877: savepoint move_task_version;
5878: END IF;
5879:
5880: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
5881: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5882: END IF;
5883:
5884: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
5877: savepoint move_task_version;
5878: END IF;
5879:
5880: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
5881: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5882: END IF;
5883:
5884: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
5885: FND_MSG_PUB.initialize;
5880: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
5881: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5882: END IF;
5883:
5884: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
5885: FND_MSG_PUB.initialize;
5886: END IF;
5887:
5888: --bug 4075697
5929: IF l_child_ver_id = p_ref_task_version_id THEN
5930: CLOSE get_child_ver_id;
5931: --add error PA_TSK_MV_BELOW_SELF
5932: PA_UTILS.ADD_MESSAGE('PA', 'PA_TSK_MV_BELOW_SELF');
5933: raise FND_API.G_EXC_ERROR;
5934: END IF;
5935: END LOOP;
5936: CLOSE get_child_ver_id;
5937: --end bug 3911698
5951: --Replaced the return status value to 'S' from 'Y'
5952: IF (x_return_status <> 'S') THEN
5953: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
5954: p_msg_name => l_error_msg_code);
5955: raise FND_API.G_EXC_ERROR;
5956: End If;
5957: End If;
5958: -- End of FP_M changes
5959:
5998: END IF;
5999: IF l_update_parent_task_allowed = 'N' THEN
6000: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
6001: p_msg_name => 'PA_PR_PM_NO_MOVE_TASK');
6002: raise FND_API.G_EXC_ERROR;
6003: END IF;
6004: END IF;
6005: END IF;
6006: END IF ; -- Called From Bulk API is 'N'
6027: if l_msg_count > 0 then
6028: x_msg_count := l_msg_count;
6029: if x_msg_count = 1 then
6030: pa_interface_utils_pub.get_messages
6031: (p_encoded => FND_API.G_TRUE,
6032: p_msg_index => 1,
6033: p_msg_count => l_msg_count,
6034: p_msg_data => l_msg_data,
6035: p_data => l_data,
6035: p_data => l_data,
6036: p_msg_index_out => l_msg_index_out);
6037: x_msg_data := l_data;
6038: end if;
6039: raise FND_API.G_EXC_ERROR;
6040: end if;
6041: END IF;
6042: -- end hyau. Lifecycle Phase validation Changes.
6043:
6093: );
6094: IF (l_return_status <> 'Y') THEN
6095: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
6096: p_msg_name => l_error_msg_code);
6097: raise FND_API.G_EXC_ERROR;
6098: END IF;
6099:
6100: --check if ok to create subtask
6101: IF (p_peer_or_sub = 'PEER') THEN
6123:
6124: IF (NVL(l_new_par_ver_id, -99) <> NVL (l_old_par_ver_id, -99)) THEN
6125: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
6126: p_msg_name => 'PA_CANT_CHANGE_PARENT');
6127: raise FND_API.G_EXC_ERROR;
6128: END IF;
6129: END IF;
6130: --end bug 3069306
6131:
6137:
6138: IF (l_return_status <> 'Y') THEN
6139: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
6140: p_msg_name => l_error_msg_code);
6141: raise FND_API.G_EXC_ERROR;
6142: END IF;
6143:
6144: --bug 4099488
6145: IF PA_RELATIONSHIP_UTILS.check_dependencies_valid(l_parent_ver_id, p_task_version_id) = 'N' THEN
6144: --bug 4099488
6145: IF PA_RELATIONSHIP_UTILS.check_dependencies_valid(l_parent_ver_id, p_task_version_id) = 'N' THEN
6146: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
6147: p_msg_name => 'PA_INV_MOV_TSK_DEP_ERR');
6148: raise FND_API.G_EXC_ERROR;
6149: END IF;
6150: --end bug 4099488
6151: ELSE
6152: --bug 3069306
6162:
6163: IF (NVL(l_new_par_ver_id, -99) <> NVL (l_old_par_ver_id, -99)) THEN
6164: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
6165: p_msg_name => 'PA_CANT_CHANGE_PARENT');
6166: raise FND_API.G_EXC_ERROR;
6167: END IF;
6168: END IF;
6169: --end bug 3069306
6170:
6176:
6177: IF (l_return_status <> 'Y') THEN
6178: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
6179: p_msg_name => l_error_msg_code);
6180: raise FND_API.G_EXC_ERROR;
6181: END IF;
6182:
6183: --bug 4099488
6184: IF PA_RELATIONSHIP_UTILS.check_dependencies_valid(p_ref_task_version_id, p_task_version_id) = 'N' THEN
6183: --bug 4099488
6184: IF PA_RELATIONSHIP_UTILS.check_dependencies_valid(p_ref_task_version_id, p_task_version_id) = 'N' THEN
6185: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
6186: p_msg_name => 'PA_INV_MOV_TSK_DEP_ERR');
6187: raise FND_API.G_EXC_ERROR;
6188: END IF;
6189: --end bug 4099488
6190: END IF;
6191:
6209: --
6210: IF PA_PROJ_ELEMENTS_UTILS.check_deliv_in_hierarchy(p_task_version_id,l_ref_parent_task_ver_id) = 'Y' THEN
6211: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
6212: p_msg_name => 'PA_PS_CHK_DELIV_UPDATE');
6213: RAISE FND_API.G_EXC_ERROR;
6214: END IF;
6215: --
6216: PA_TASK_PUB1.Update_Task_Version
6217: ( p_validate_only => FND_API.G_FALSE,
6213: RAISE FND_API.G_EXC_ERROR;
6214: END IF;
6215: --
6216: PA_TASK_PUB1.Update_Task_Version
6217: ( p_validate_only => FND_API.G_FALSE,
6218: p_ref_task_version_id => p_ref_task_version_id,
6219: p_peer_or_sub => p_peer_or_sub,
6220: p_task_version_id => p_task_version_id,
6221: p_record_version_number => p_record_version_number,
6227: x_msg_count := FND_MSG_PUB.count_msg;
6228:
6229: --dbms_output.put_line( 'Count '|| x_msg_count );
6230:
6231: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6232: x_msg_count := FND_MSG_PUB.count_msg;
6233: IF x_msg_count = 1 then
6234: pa_interface_utils_pub.get_messages
6235: (p_encoded => FND_API.G_TRUE,
6231: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6232: x_msg_count := FND_MSG_PUB.count_msg;
6233: IF x_msg_count = 1 then
6234: pa_interface_utils_pub.get_messages
6235: (p_encoded => FND_API.G_TRUE,
6236: p_msg_index => 1,
6237: p_msg_count => l_msg_count,
6238: p_msg_data => l_msg_data,
6239: p_data => l_data,
6239: p_data => l_data,
6240: p_msg_index_out => l_msg_index_out);
6241: x_msg_data := l_data;
6242: END IF;
6243: raise FND_API.G_EXC_ERROR;
6244: END IF;
6245:
6246:
6247: /* SELECT proj_element_id, project_id INTO l_structure_id, l_project_id
6352:
6353: --dbms_output.put_line( 'After move task old '|| x_msg_count );
6354:
6355:
6356: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6357: x_msg_count := FND_MSG_PUB.count_msg;
6358: IF x_msg_count = 1 then
6359: pa_interface_utils_pub.get_messages
6360: (p_encoded => FND_API.G_TRUE,
6356: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6357: x_msg_count := FND_MSG_PUB.count_msg;
6358: IF x_msg_count = 1 then
6359: pa_interface_utils_pub.get_messages
6360: (p_encoded => FND_API.G_TRUE,
6361: p_msg_index => 1,
6362: p_msg_count => l_msg_count,
6363: p_msg_data => l_msg_data,
6364: p_data => l_data,
6364: p_data => l_data,
6365: p_msg_index_out => l_msg_index_out);
6366: x_msg_data := l_data;
6367: END IF;
6368: raise FND_API.G_EXC_ERROR;
6369: END IF;
6370:
6371: -- merged from 85
6372: --Bug 2947492 ( Move )
6381: IF NVL( l_top_task_id, -99 ) <> NVL( l_old_top_task_id, -99 )
6382: THEN
6383: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
6384: p_msg_name => 'PA_CANT_CHANGE_PARENT');
6385: raise FND_API.G_EXC_ERROR;
6386: END IF;
6387: --End bug 2967204
6388:
6389: /*
6400: ,x_msg_count => l_msg_count
6401: ,x_msg_data => l_msg_data
6402: );
6403:
6404: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6405: x_msg_count := FND_MSG_PUB.count_msg;
6406: IF x_msg_count = 1 then
6407: pa_interface_utils_pub.get_messages
6408: (p_encoded => FND_API.G_TRUE,
6404: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6405: x_msg_count := FND_MSG_PUB.count_msg;
6406: IF x_msg_count = 1 then
6407: pa_interface_utils_pub.get_messages
6408: (p_encoded => FND_API.G_TRUE,
6409: p_msg_index => 1,
6410: p_msg_count => l_msg_count,
6411: p_msg_data => l_msg_data,
6412: p_data => l_data,
6412: p_data => l_data,
6413: p_msg_index_out => l_msg_index_out);
6414: x_msg_data := l_data;
6415: END IF;
6416: raise FND_API.G_EXC_ERROR;
6417: END IF;
6418: */ --commenting out, please refer mails from venkatesh dates 22 jan 04
6419:
6420: /* Commenting out the call to MAINTAIN_PLANNABLE_TASKS for bug 3010538
6431: , x_msg_data => l_msg_data
6432: , x_msg_count => l_msg_count
6433: );
6434:
6435: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6436: x_msg_count := FND_MSG_PUB.count_msg;
6437: IF x_msg_count = 1 then
6438: pa_interface_utils_pub.get_messages
6439: (p_encoded => FND_API.G_TRUE,
6435: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
6436: x_msg_count := FND_MSG_PUB.count_msg;
6437: IF x_msg_count = 1 then
6438: pa_interface_utils_pub.get_messages
6439: (p_encoded => FND_API.G_TRUE,
6440: p_msg_index => 1,
6441: p_msg_count => l_msg_count,
6442: p_msg_data => l_msg_data,
6443: p_data => l_data,
6443: p_data => l_data,
6444: p_msg_index_out => l_msg_index_out);
6445: x_msg_data := l_data;
6446: END IF;
6447: raise FND_API.G_EXC_ERROR;
6448: END IF;
6449: bug 3010538 */
6450:
6451: --End Bug 2947492 ( Move )
6511: ,x_return_status => l_return_status
6512: ,x_msg_count => l_msg_count
6513: ,x_msg_data => l_msg_data);
6514:
6515: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
6516: x_msg_count := FND_MSG_PUB.count_msg;
6517: if x_msg_count = 1 then
6518: pa_interface_utils_pub.get_messages
6519: (p_encoded => FND_API.G_TRUE,
6515: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
6516: x_msg_count := FND_MSG_PUB.count_msg;
6517: if x_msg_count = 1 then
6518: pa_interface_utils_pub.get_messages
6519: (p_encoded => FND_API.G_TRUE,
6520: p_msg_index => 1,
6521: p_msg_count => l_msg_count,
6522: p_msg_data => l_msg_data,
6523: p_data => l_data,
6523: p_data => l_data,
6524: p_msg_index_out => l_msg_index_out);
6525: x_msg_data := l_data;
6526: end if;
6527: raise FND_API.G_EXC_ERROR;
6528: end if;
6529: --3035902: end process update flag changes
6530: --END IF;
6531:
6542: ,x_return_status => l_return_status
6543: ,x_msg_count => l_msg_count
6544: ,x_msg_data => l_msg_data );
6545:
6546: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
6547: x_msg_count := FND_MSG_PUB.count_msg;
6548: if x_msg_count = 1 then
6549: pa_interface_utils_pub.get_messages
6550: (p_encoded => FND_API.G_TRUE,
6546: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
6547: x_msg_count := FND_MSG_PUB.count_msg;
6548: if x_msg_count = 1 then
6549: pa_interface_utils_pub.get_messages
6550: (p_encoded => FND_API.G_TRUE,
6551: p_msg_index => 1,
6552: p_msg_count => l_msg_count,
6553: p_msg_data => l_msg_data,
6554: p_data => l_data,
6554: p_data => l_data,
6555: p_msg_index_out => l_msg_index_out);
6556: x_msg_data := l_data;
6557: end if;
6558: raise FND_API.G_EXC_ERROR;
6559: end if;
6560: END IF;
6561: END IF;
6562:
6578: ,x_msg_count => x_msg_count
6579: ,x_msg_data => x_msg_data
6580: );
6581:
6582: IF l_return_status <> FND_API.G_RET_STS_SUCCESS then
6583: x_msg_count := FND_MSG_PUB.count_msg;
6584: If x_msg_count = 1 then
6585: pa_interface_utils_pub.get_messages
6586: (p_encoded => FND_API.G_TRUE,
6582: IF l_return_status <> FND_API.G_RET_STS_SUCCESS then
6583: x_msg_count := FND_MSG_PUB.count_msg;
6584: If x_msg_count = 1 then
6585: pa_interface_utils_pub.get_messages
6586: (p_encoded => FND_API.G_TRUE,
6587: p_msg_index => 1,
6588: p_msg_count => l_msg_count,
6589: p_msg_data => l_msg_data,
6590: p_data => l_data,
6590: p_data => l_data,
6591: p_msg_index_out => l_msg_index_out);
6592: x_msg_data := l_data;
6593: End If;
6594: raise FND_API.G_EXC_ERROR;
6595: End If;
6596: End If;
6597: -- End of FP_M changes
6598:
6603: l_tasks_ver_ids(l_task_cnt) := p_task_version_id;
6604:
6605: --PA_STRUCT_TASK_ROLLUP_PUB.Tasks_Rollup(
6606: PA_STRUCT_TASK_ROLLUP_PUB.TASKS_ROLLUP_UNLIMITED(
6607: p_commit => FND_API.G_FALSE,
6608: p_element_versions => l_tasks_ver_ids,
6609: x_return_status => l_return_status,
6610: x_msg_count => l_msg_count,
6611: x_msg_data => l_msg_data);
6611: x_msg_data => l_msg_data);
6612:
6613: /* Bug 5768425 End */
6614:
6615: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
6616: x_msg_count := FND_MSG_PUB.count_msg;
6617: if x_msg_count = 1 then
6618: pa_interface_utils_pub.get_messages
6619: (p_encoded => FND_API.G_TRUE,
6615: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
6616: x_msg_count := FND_MSG_PUB.count_msg;
6617: if x_msg_count = 1 then
6618: pa_interface_utils_pub.get_messages
6619: (p_encoded => FND_API.G_TRUE,
6620: p_msg_index => 1,
6621: p_msg_count => l_msg_count,
6622: p_msg_data => l_msg_data,
6623: p_data => l_data,
6623: p_data => l_data,
6624: p_msg_index_out => l_msg_index_out);
6625: x_msg_data := l_data;
6626: end if;
6627: raise FND_API.G_EXC_ERROR;
6628: end if;
6629:
6630: --hsiu added for task status
6631: --if versioning is off, rollup.
6637: ,x_msg_count => l_msg_count
6638: ,x_msg_data => l_msg_data
6639: );
6640:
6641: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
6642: x_msg_count := FND_MSG_PUB.count_msg;
6643: if x_msg_count = 1 then
6644: pa_interface_utils_pub.get_messages
6645: (p_encoded => FND_API.G_TRUE,
6641: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
6642: x_msg_count := FND_MSG_PUB.count_msg;
6643: if x_msg_count = 1 then
6644: pa_interface_utils_pub.get_messages
6645: (p_encoded => FND_API.G_TRUE,
6646: p_msg_index => 1,
6647: p_msg_count => l_msg_count,
6648: p_msg_data => l_msg_data,
6649: p_data => l_data,
6649: p_data => l_data,
6650: p_msg_index_out => l_msg_index_out);
6651: x_msg_data := l_data;
6652: end if;
6653: raise FND_API.G_EXC_ERROR;
6654: end if;
6655:
6656: IF (l_old_peer_task_id IS NOT NULL) THEN
6657: PA_STRUCT_TASK_ROLLUP_PUB.Task_Status_Rollup(
6661: ,x_msg_count => l_msg_count
6662: ,x_msg_data => l_msg_data
6663: );
6664:
6665: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
6666: x_msg_count := FND_MSG_PUB.count_msg;
6667: if x_msg_count = 1 then
6668: pa_interface_utils_pub.get_messages
6669: (p_encoded => FND_API.G_TRUE,
6665: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
6666: x_msg_count := FND_MSG_PUB.count_msg;
6667: if x_msg_count = 1 then
6668: pa_interface_utils_pub.get_messages
6669: (p_encoded => FND_API.G_TRUE,
6670: p_msg_index => 1,
6671: p_msg_count => l_msg_count,
6672: p_msg_data => l_msg_data,
6673: p_data => l_data,
6673: p_data => l_data,
6674: p_msg_index_out => l_msg_index_out);
6675: x_msg_data := l_data;
6676: end if;
6677: raise FND_API.G_EXC_ERROR;
6678: end if;
6679: END IF;
6680:
6681: END IF;
6739: WHEN OTHERS THEN
6740: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
6741: p_procedure_name => 'MOVE_TASK_VERSION',
6742: p_error_text => SUBSTRB('pa_fp_planning_transaction_pub.delete_planning_transactions:'||SQLERRM,1,240));
6743: RAISE FND_API.G_EXC_ERROR;
6744: END;
6745: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
6746: x_msg_count := FND_MSG_PUB.count_msg;
6747: if x_msg_count = 1 then
6741: p_procedure_name => 'MOVE_TASK_VERSION',
6742: p_error_text => SUBSTRB('pa_fp_planning_transaction_pub.delete_planning_transactions:'||SQLERRM,1,240));
6743: RAISE FND_API.G_EXC_ERROR;
6744: END;
6745: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
6746: x_msg_count := FND_MSG_PUB.count_msg;
6747: if x_msg_count = 1 then
6748: pa_interface_utils_pub.get_messages
6749: (p_encoded => FND_API.G_TRUE,
6745: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
6746: x_msg_count := FND_MSG_PUB.count_msg;
6747: if x_msg_count = 1 then
6748: pa_interface_utils_pub.get_messages
6749: (p_encoded => FND_API.G_TRUE,
6750: p_msg_index => 1,
6751: p_msg_count => l_msg_count,
6752: p_msg_data => l_msg_data,
6753: p_data => l_data,
6753: p_data => l_data,
6754: p_msg_index_out => l_msg_index_out);
6755: x_msg_data := l_data;
6756: end if;
6757: raise FND_API.G_EXC_ERROR;
6758: end if;
6759: END IF;
6760: END IF;
6761: end;
6763: --bug 4149392
6764: PA_TASK_PUB1.G_CALL_PJI_ROLLUP := NULL;
6765: --end bug 4149392
6766:
6767: x_return_status := FND_API.G_RET_STS_SUCCESS;
6768:
6769: IF (p_commit = FND_API.G_TRUE) THEN
6770: COMMIT;
6771: END IF;
6765: --end bug 4149392
6766:
6767: x_return_status := FND_API.G_RET_STS_SUCCESS;
6768:
6769: IF (p_commit = FND_API.G_TRUE) THEN
6770: COMMIT;
6771: END IF;
6772:
6773: IF (p_debug_mode = 'Y') THEN
6773: IF (p_debug_mode = 'Y') THEN
6774: pa_debug.debug('PA_TASK_PUB1.MOVE_TASK_VERSION END');
6775: END IF;
6776: EXCEPTION
6777: when FND_API.G_EXC_ERROR then
6778: if p_commit = FND_API.G_TRUE then
6779: rollback to move_task_version;
6780: end if;
6781: x_return_status := FND_API.G_RET_STS_ERROR;
6774: pa_debug.debug('PA_TASK_PUB1.MOVE_TASK_VERSION END');
6775: END IF;
6776: EXCEPTION
6777: when FND_API.G_EXC_ERROR then
6778: if p_commit = FND_API.G_TRUE then
6779: rollback to move_task_version;
6780: end if;
6781: x_return_status := FND_API.G_RET_STS_ERROR;
6782: when FND_API.G_EXC_UNEXPECTED_ERROR then
6777: when FND_API.G_EXC_ERROR then
6778: if p_commit = FND_API.G_TRUE then
6779: rollback to move_task_version;
6780: end if;
6781: x_return_status := FND_API.G_RET_STS_ERROR;
6782: when FND_API.G_EXC_UNEXPECTED_ERROR then
6783: if p_commit = FND_API.G_TRUE then
6784: rollback to move_task_version;
6785: end if;
6778: if p_commit = FND_API.G_TRUE then
6779: rollback to move_task_version;
6780: end if;
6781: x_return_status := FND_API.G_RET_STS_ERROR;
6782: when FND_API.G_EXC_UNEXPECTED_ERROR then
6783: if p_commit = FND_API.G_TRUE then
6784: rollback to move_task_version;
6785: end if;
6786: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6779: rollback to move_task_version;
6780: end if;
6781: x_return_status := FND_API.G_RET_STS_ERROR;
6782: when FND_API.G_EXC_UNEXPECTED_ERROR then
6783: if p_commit = FND_API.G_TRUE then
6784: rollback to move_task_version;
6785: end if;
6786: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6787: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
6782: when FND_API.G_EXC_UNEXPECTED_ERROR then
6783: if p_commit = FND_API.G_TRUE then
6784: rollback to move_task_version;
6785: end if;
6786: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6787: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
6788: p_procedure_name => 'MOVE_TASK_VERSION',
6789: p_error_text => SUBSTRB(SQLERRM,1,240));
6790: when OTHERS then
6787: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
6788: p_procedure_name => 'MOVE_TASK_VERSION',
6789: p_error_text => SUBSTRB(SQLERRM,1,240));
6790: when OTHERS then
6791: if p_commit = FND_API.G_TRUE then
6792: rollback to move_task_version;
6793: end if;
6794: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6795: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
6790: when OTHERS then
6791: if p_commit = FND_API.G_TRUE then
6792: rollback to move_task_version;
6793: end if;
6794: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6795: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
6796: p_procedure_name => 'MOVE_TASK_VERSION',
6797: p_error_text => SUBSTRB(SQLERRM,1,240));
6798: raise;
6803: -- Pre-reqs : None
6804: -- Return Value : N/A
6805: -- Prameters
6806: -- p_api_version IN NUMBER N Not Null 1.0
6807: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
6808: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
6809: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
6810: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
6811: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
6804: -- Return Value : N/A
6805: -- Prameters
6806: -- p_api_version IN NUMBER N Not Null 1.0
6807: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
6808: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
6809: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
6810: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
6811: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
6812: -- p_debug_mode IN VARCHAR2 N Null N
6805: -- Prameters
6806: -- p_api_version IN NUMBER N Not Null 1.0
6807: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
6808: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
6809: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
6810: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
6811: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
6812: -- p_debug_mode IN VARCHAR2 N Null N
6813: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
6806: -- p_api_version IN NUMBER N Not Null 1.0
6807: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
6808: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
6809: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
6810: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
6811: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
6812: -- p_debug_mode IN VARCHAR2 N Null N
6813: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
6814: -- p_structure_version_id IN NUMBER := PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
6824: --
6825:
6826: PROCEDURE INDENT_TASK_VERSION (
6827: p_api_version IN NUMBER :=1.0,
6828: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
6829: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
6830: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
6831: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
6832: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
6825:
6826: PROCEDURE INDENT_TASK_VERSION (
6827: p_api_version IN NUMBER :=1.0,
6828: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
6829: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
6830: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
6831: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
6832: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
6833: p_debug_mode IN VARCHAR2 :='N',
6826: PROCEDURE INDENT_TASK_VERSION (
6827: p_api_version IN NUMBER :=1.0,
6828: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
6829: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
6830: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
6831: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
6832: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
6833: p_debug_mode IN VARCHAR2 :='N',
6834: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
6827: p_api_version IN NUMBER :=1.0,
6828: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
6829: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
6830: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
6831: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
6832: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
6833: p_debug_mode IN VARCHAR2 :='N',
6834: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
6835: p_structure_version_id IN NUMBER := PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
6914: IF (p_debug_mode = 'Y') THEN
6915: pa_debug.debug('PA_TASK_PUB1.INDENT_TASK_VERSION begin');
6916: END IF;
6917:
6918: IF (p_commit = FND_API.G_TRUE) THEN
6919: savepoint indent_task_version;
6920: END IF;
6921:
6922: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
6918: IF (p_commit = FND_API.G_TRUE) THEN
6919: savepoint indent_task_version;
6920: END IF;
6921:
6922: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
6923: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6924: END IF;
6925:
6926: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
6919: savepoint indent_task_version;
6920: END IF;
6921:
6922: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
6923: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6924: END IF;
6925:
6926: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
6927: FND_MSG_PUB.initialize;
6922: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
6923: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6924: END IF;
6925:
6926: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
6927: FND_MSG_PUB.initialize;
6928: END IF;
6929:
6930: ----dbms_output.put_line( 'Indent Task Stage 1 ' );
6958: if l_msg_count > 0 then
6959: x_msg_count := l_msg_count;
6960: if x_msg_count = 1 then
6961: pa_interface_utils_pub.get_messages
6962: (p_encoded => FND_API.G_TRUE,
6963: p_msg_index => 1,
6964: p_msg_count => l_msg_count,
6965: p_msg_data => l_msg_data,
6966: p_data => l_data,
6966: p_data => l_data,
6967: p_msg_index_out => l_msg_index_out);
6968: x_msg_data := l_data;
6969: end if;
6970: raise FND_API.G_EXC_ERROR;
6971: end if;
6972: END IF;
6973:
6974: -- hyau
6991: if l_msg_count > 0 then
6992: x_msg_count := l_msg_count;
6993: if x_msg_count = 1 then
6994: pa_interface_utils_pub.get_messages
6995: (p_encoded => FND_API.G_TRUE,
6996: p_msg_index => 1,
6997: p_msg_count => l_msg_count,
6998: p_msg_data => l_msg_data,
6999: p_data => l_data,
6999: p_data => l_data,
7000: p_msg_index_out => l_msg_index_out);
7001: x_msg_data := l_data;
7002: end if;
7003: raise FND_API.G_EXC_ERROR;
7004: end if;
7005: END IF;
7006: -- end hyau. Lifecycle Phase validation Changes.
7007:
7044: if l_msg_count > 0 then
7045: x_msg_count := l_msg_count;
7046: if x_msg_count = 1 then
7047: pa_interface_utils_pub.get_messages
7048: (p_encoded => FND_API.G_TRUE,
7049: p_msg_index => 1,
7050: p_msg_count => l_msg_count,
7051: p_msg_data => l_msg_data,
7052: p_data => l_data,
7052: p_data => l_data,
7053: p_msg_index_out => l_msg_index_out);
7054: x_msg_data := l_data;
7055: end if;
7056: raise FND_API.G_EXC_ERROR;
7057: end if;
7058:
7059: --dbms_output.put_line( 'Indent Task Stage 6 ' );
7060:
7096:
7097: IF (l_return_status <> 'Y') THEN
7098: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
7099: p_msg_name => l_error_msg_code);
7100: raise FND_API.G_EXC_ERROR;
7101: END IF;
7102:
7103: --check if ok to create subtask
7104: IF (l_peer_or_sub = 'PEER') THEN
7113:
7114: IF (l_return_status <> 'Y') THEN
7115: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
7116: p_msg_name => l_error_msg_code);
7117: raise FND_API.G_EXC_ERROR;
7118: END IF;
7119: ELSE
7120: PA_PROJ_ELEMENTS_UTILS.Check_create_subtask_ok(
7121: p_parent_task_ver_id => l_ref_task_version_id
7125:
7126: IF (l_return_status <> 'Y') THEN
7127: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
7128: p_msg_name => l_error_msg_code);
7129: raise FND_API.G_EXC_ERROR;
7130: END IF;
7131: END IF;
7132:
7133: --end task status changes
7135:
7136: --dbms_output.put_line( 'Indent Task Stage 9 ' );
7137:
7138: PA_TASK_PUB1.Update_Task_Version
7139: ( p_validate_only => FND_API.G_FALSE,
7140: p_ref_task_version_id => l_ref_task_version_id,
7141: p_peer_or_sub => l_peer_or_sub,
7142: p_task_version_id => p_task_version_id,
7143: p_record_version_number => p_record_version_number,
7147:
7148: --dbms_output.put_line( 'Indent Task Stage 10 ' );
7149:
7150:
7151: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
7152: x_msg_count := FND_MSG_PUB.count_msg;
7153: IF x_msg_count = 1 then
7154: pa_interface_utils_pub.get_messages
7155: (p_encoded => FND_API.G_TRUE,
7151: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
7152: x_msg_count := FND_MSG_PUB.count_msg;
7153: IF x_msg_count = 1 then
7154: pa_interface_utils_pub.get_messages
7155: (p_encoded => FND_API.G_TRUE,
7156: p_msg_index => 1,
7157: p_msg_count => l_msg_count,
7158: p_msg_data => l_msg_data,
7159: p_data => l_data,
7159: p_data => l_data,
7160: p_msg_index_out => l_msg_index_out);
7161: x_msg_data := l_data;
7162: END IF;
7163: raise FND_API.G_EXC_ERROR;
7164: END IF;
7165:
7166:
7167: --dbms_output.put_line( 'Indent Task Stage 11 ' );
7256: END IF;
7257: END IF;
7258: CLOSE cur_struc_type;
7259:
7260: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
7261: x_msg_count := FND_MSG_PUB.count_msg;
7262: IF x_msg_count = 1 then
7263: pa_interface_utils_pub.get_messages
7264: (p_encoded => FND_API.G_TRUE,
7260: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
7261: x_msg_count := FND_MSG_PUB.count_msg;
7262: IF x_msg_count = 1 then
7263: pa_interface_utils_pub.get_messages
7264: (p_encoded => FND_API.G_TRUE,
7265: p_msg_index => 1,
7266: p_msg_count => l_msg_count,
7267: p_msg_data => l_msg_data,
7268: p_data => l_data,
7268: p_data => l_data,
7269: p_msg_index_out => l_msg_index_out);
7270: x_msg_data := l_data;
7271: END IF;
7272: raise FND_API.G_EXC_ERROR;
7273: END IF;
7274:
7275: --Hsiu added for date rollup; workplan only
7276:
7278: l_tasks_ver_ids.extend;
7279: l_tasks_ver_ids(l_tasks_ver_ids.count) := p_task_version_id;
7280:
7281: PA_STRUCT_TASK_ROLLUP_PUB.Tasks_Rollup(
7282: p_commit => FND_API.G_FALSE,
7283: p_element_versions => l_tasks_ver_ids,
7284: x_return_status => l_return_status,
7285: x_msg_count => l_msg_count,
7286: x_msg_data => l_msg_data);
7284: x_return_status => l_return_status,
7285: x_msg_count => l_msg_count,
7286: x_msg_data => l_msg_data);
7287:
7288: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
7289: x_msg_count := FND_MSG_PUB.count_msg;
7290: if x_msg_count = 1 then
7291: pa_interface_utils_pub.get_messages
7292: (p_encoded => FND_API.G_TRUE,
7288: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
7289: x_msg_count := FND_MSG_PUB.count_msg;
7290: if x_msg_count = 1 then
7291: pa_interface_utils_pub.get_messages
7292: (p_encoded => FND_API.G_TRUE,
7293: p_msg_index => 1,
7294: p_msg_count => l_msg_count,
7295: p_msg_data => l_msg_data,
7296: p_data => l_data,
7296: p_data => l_data,
7297: p_msg_index_out => l_msg_index_out);
7298: x_msg_data := l_data;
7299: end if;
7300: raise FND_API.G_EXC_ERROR;
7301: end if;
7302:
7303: --hsiu added for task status
7304: --if versioning is off, rollup.
7310: ,x_msg_count => l_msg_count
7311: ,x_msg_data => l_msg_data
7312: );
7313:
7314: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
7315: x_msg_count := FND_MSG_PUB.count_msg;
7316: if x_msg_count = 1 then
7317: pa_interface_utils_pub.get_messages
7318: (p_encoded => FND_API.G_TRUE,
7314: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
7315: x_msg_count := FND_MSG_PUB.count_msg;
7316: if x_msg_count = 1 then
7317: pa_interface_utils_pub.get_messages
7318: (p_encoded => FND_API.G_TRUE,
7319: p_msg_index => 1,
7320: p_msg_count => l_msg_count,
7321: p_msg_data => l_msg_data,
7322: p_data => l_data,
7322: p_data => l_data,
7323: p_msg_index_out => l_msg_index_out);
7324: x_msg_data := l_data;
7325: end if;
7326: raise FND_API.G_EXC_ERROR;
7327: end if;
7328: END IF;
7329:
7330: --end task status changes
7330: --end task status changes
7331:
7332: END IF;
7333:
7334: x_return_status := FND_API.G_RET_STS_SUCCESS;
7335:
7336: IF (p_commit = FND_API.G_TRUE) THEN
7337: COMMIT;
7338: END IF;
7332: END IF;
7333:
7334: x_return_status := FND_API.G_RET_STS_SUCCESS;
7335:
7336: IF (p_commit = FND_API.G_TRUE) THEN
7337: COMMIT;
7338: END IF;
7339:
7340: IF (p_debug_mode = 'Y') THEN
7341: pa_debug.debug('PA_TASK_PUB1.INDENT_TASK_VERSION END');
7342: END IF;
7343:
7344: EXCEPTION
7345: when FND_API.G_EXC_ERROR then
7346: if p_commit = FND_API.G_TRUE then
7347: rollback to indent_task_version;
7348: end if;
7349: x_return_status := FND_API.G_RET_STS_ERROR;
7342: END IF;
7343:
7344: EXCEPTION
7345: when FND_API.G_EXC_ERROR then
7346: if p_commit = FND_API.G_TRUE then
7347: rollback to indent_task_version;
7348: end if;
7349: x_return_status := FND_API.G_RET_STS_ERROR;
7350: when FND_API.G_EXC_UNEXPECTED_ERROR then
7345: when FND_API.G_EXC_ERROR then
7346: if p_commit = FND_API.G_TRUE then
7347: rollback to indent_task_version;
7348: end if;
7349: x_return_status := FND_API.G_RET_STS_ERROR;
7350: when FND_API.G_EXC_UNEXPECTED_ERROR then
7351: if p_commit = FND_API.G_TRUE then
7352: rollback to indent_task_version;
7353: end if;
7346: if p_commit = FND_API.G_TRUE then
7347: rollback to indent_task_version;
7348: end if;
7349: x_return_status := FND_API.G_RET_STS_ERROR;
7350: when FND_API.G_EXC_UNEXPECTED_ERROR then
7351: if p_commit = FND_API.G_TRUE then
7352: rollback to indent_task_version;
7353: end if;
7354: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
7347: rollback to indent_task_version;
7348: end if;
7349: x_return_status := FND_API.G_RET_STS_ERROR;
7350: when FND_API.G_EXC_UNEXPECTED_ERROR then
7351: if p_commit = FND_API.G_TRUE then
7352: rollback to indent_task_version;
7353: end if;
7354: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
7355: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
7350: when FND_API.G_EXC_UNEXPECTED_ERROR then
7351: if p_commit = FND_API.G_TRUE then
7352: rollback to indent_task_version;
7353: end if;
7354: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
7355: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
7356: p_procedure_name => 'INDENT_TASK_VERSION',
7357: p_error_text => SUBSTRB(SQLERRM,1,240));
7358: when OTHERS then
7355: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
7356: p_procedure_name => 'INDENT_TASK_VERSION',
7357: p_error_text => SUBSTRB(SQLERRM,1,240));
7358: when OTHERS then
7359: if p_commit = FND_API.G_TRUE then
7360: rollback to indent_task_version;
7361: end if;
7362: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
7363: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
7358: when OTHERS then
7359: if p_commit = FND_API.G_TRUE then
7360: rollback to indent_task_version;
7361: end if;
7362: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
7363: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
7364: p_procedure_name => 'INDENT_TASK_VERSION',
7365: p_error_text => SUBSTRB(SQLERRM,1,240));
7366: raise;
7373: -- Pre-reqs : None
7374: -- Return Value : N/A
7375: -- Prameters
7376: -- p_api_version IN NUMBER N Not Null 1.0
7377: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
7378: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
7379: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
7380: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
7381: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
7374: -- Return Value : N/A
7375: -- Prameters
7376: -- p_api_version IN NUMBER N Not Null 1.0
7377: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
7378: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
7379: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
7380: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
7381: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
7382: -- p_debug_mode IN VARCHAR2 N Null N
7375: -- Prameters
7376: -- p_api_version IN NUMBER N Not Null 1.0
7377: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
7378: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
7379: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
7380: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
7381: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
7382: -- p_debug_mode IN VARCHAR2 N Null N
7383: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
7376: -- p_api_version IN NUMBER N Not Null 1.0
7377: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
7378: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
7379: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
7380: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
7381: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
7382: -- p_debug_mode IN VARCHAR2 N Null N
7383: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
7384: -- p_structure_version_id IN NUMBER := PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
7394: --
7395:
7396: PROCEDURE OUTDENT_TASK_VERSION (
7397: p_api_version IN NUMBER :=1.0,
7398: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
7399: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
7400: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
7401: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
7402: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
7395:
7396: PROCEDURE OUTDENT_TASK_VERSION (
7397: p_api_version IN NUMBER :=1.0,
7398: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
7399: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
7400: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
7401: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
7402: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
7403: p_debug_mode IN VARCHAR2 :='N',
7396: PROCEDURE OUTDENT_TASK_VERSION (
7397: p_api_version IN NUMBER :=1.0,
7398: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
7399: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
7400: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
7401: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
7402: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
7403: p_debug_mode IN VARCHAR2 :='N',
7404: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
7397: p_api_version IN NUMBER :=1.0,
7398: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
7399: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
7400: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
7401: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
7402: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
7403: p_debug_mode IN VARCHAR2 :='N',
7404: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
7405: p_structure_version_id IN NUMBER := PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
7490: IF (p_debug_mode = 'Y') THEN
7491: pa_debug.debug('PA_TASK_PUB1.OUTDENT_TASK_VERSION begin');
7492: END IF;
7493:
7494: IF (p_commit = FND_API.G_TRUE) THEN
7495: savepoint outdent_task_version;
7496: END IF;
7497:
7498: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
7494: IF (p_commit = FND_API.G_TRUE) THEN
7495: savepoint outdent_task_version;
7496: END IF;
7497:
7498: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
7499: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7500: END IF;
7501:
7502: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
7495: savepoint outdent_task_version;
7496: END IF;
7497:
7498: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
7499: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7500: END IF;
7501:
7502: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
7503: FND_MSG_PUB.initialize;
7498: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
7499: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7500: END IF;
7501:
7502: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
7503: FND_MSG_PUB.initialize;
7504: END IF;
7505:
7506: --hsiu
7519: if l_msg_count > 0 then
7520: x_msg_count := l_msg_count;
7521: if x_msg_count = 1 then
7522: pa_interface_utils_pub.get_messages
7523: (p_encoded => FND_API.G_TRUE,
7524: p_msg_index => 1,
7525: p_msg_count => l_msg_count,
7526: p_msg_data => l_msg_data,
7527: p_data => l_data,
7527: p_data => l_data,
7528: p_msg_index_out => l_msg_index_out);
7529: x_msg_data := l_data;
7530: end if;
7531: raise FND_API.G_EXC_ERROR;
7532: end if;
7533: END IF;
7534:
7535: --hsiu added, for dates rollup
7560: if l_msg_count > 0 then
7561: x_msg_count := l_msg_count;
7562: if x_msg_count = 1 then
7563: pa_interface_utils_pub.get_messages
7564: (p_encoded => FND_API.G_TRUE,
7565: p_msg_index => 1,
7566: p_msg_count => l_msg_count,
7567: p_msg_data => l_msg_data,
7568: p_data => l_data,
7568: p_data => l_data,
7569: p_msg_index_out => l_msg_index_out);
7570: x_msg_data := l_data;
7571: end if;
7572: raise FND_API.G_EXC_ERROR;
7573: end if;
7574:
7575: --get the reference task version of p_task_version_id
7576: SELECT element_version_id
7598:
7599: IF (l_return_status <> 'Y') THEN
7600: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
7601: p_msg_name => l_error_msg_code);
7602: raise FND_API.G_EXC_ERROR;
7603: END IF;
7604:
7605: OPEN get_parent_version_id(l_ref_task_version_id);
7606: FETCH get_parent_version_id into l_parent_ver_id;
7613:
7614: IF (l_return_status <> 'Y') THEN
7615: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
7616: p_msg_name => l_error_msg_code);
7617: raise FND_API.G_EXC_ERROR;
7618: END IF;
7619: --task status changes ends
7620:
7621: --dbms_output.put_line( 'Before Update_Task_Version ' );
7620:
7621: --dbms_output.put_line( 'Before Update_Task_Version ' );
7622:
7623: PA_TASK_PUB1.Update_Task_Version
7624: ( p_validate_only => FND_API.G_FALSE,
7625: p_ref_task_version_id => l_ref_task_version_id,
7626: p_peer_or_sub => 'PEER',
7627: p_task_version_id => p_task_version_id,
7628: p_record_version_number => p_record_version_number,
7630: x_return_status => l_return_status,
7631: x_msg_count => l_msg_count,
7632: x_msg_data => l_msg_data );
7633:
7634: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
7635: x_msg_count := FND_MSG_PUB.count_msg;
7636: IF x_msg_count = 1 then
7637: pa_interface_utils_pub.get_messages
7638: (p_encoded => FND_API.G_TRUE,
7634: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
7635: x_msg_count := FND_MSG_PUB.count_msg;
7636: IF x_msg_count = 1 then
7637: pa_interface_utils_pub.get_messages
7638: (p_encoded => FND_API.G_TRUE,
7639: p_msg_index => 1,
7640: p_msg_count => l_msg_count,
7641: p_msg_data => l_msg_data,
7642: p_data => l_data,
7642: p_data => l_data,
7643: p_msg_index_out => l_msg_index_out);
7644: x_msg_data := l_data;
7645: END IF;
7646: raise FND_API.G_EXC_ERROR;
7647: END IF;
7648:
7649: --dbms_output.put_line( 'Before Update WBS numbers ' );
7650:
7733: END IF;
7734: END IF;
7735: CLOSE cur_struc_type;
7736:
7737: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
7738: x_msg_count := FND_MSG_PUB.count_msg;
7739: IF x_msg_count = 1 then
7740: pa_interface_utils_pub.get_messages
7741: (p_encoded => FND_API.G_TRUE,
7737: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
7738: x_msg_count := FND_MSG_PUB.count_msg;
7739: IF x_msg_count = 1 then
7740: pa_interface_utils_pub.get_messages
7741: (p_encoded => FND_API.G_TRUE,
7742: p_msg_index => 1,
7743: p_msg_count => l_msg_count,
7744: p_msg_data => l_msg_data,
7745: p_data => l_data,
7745: p_data => l_data,
7746: p_msg_index_out => l_msg_index_out);
7747: x_msg_data := l_data;
7748: END IF;
7749: raise FND_API.G_EXC_ERROR;
7750: END IF;
7751:
7752: --dbms_output.put_line( 'After Move task ' );
7753:
7762: l_rollup_task_id := p_task_version_id;
7763: END IF;
7764:
7765: PA_STRUCT_TASK_ROLLUP_PUB.Tasks_Rollup(
7766: p_commit => FND_API.G_FALSE,
7767: p_element_versions => l_tasks_ver_ids,
7768: x_return_status => l_return_status,
7769: x_msg_count => l_msg_count,
7770: x_msg_data => l_msg_data);
7768: x_return_status => l_return_status,
7769: x_msg_count => l_msg_count,
7770: x_msg_data => l_msg_data);
7771:
7772: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
7773: x_msg_count := FND_MSG_PUB.count_msg;
7774: if x_msg_count = 1 then
7775: pa_interface_utils_pub.get_messages
7776: (p_encoded => FND_API.G_TRUE,
7772: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
7773: x_msg_count := FND_MSG_PUB.count_msg;
7774: if x_msg_count = 1 then
7775: pa_interface_utils_pub.get_messages
7776: (p_encoded => FND_API.G_TRUE,
7777: p_msg_index => 1,
7778: p_msg_count => l_msg_count,
7779: p_msg_data => l_msg_data,
7780: p_data => l_data,
7780: p_data => l_data,
7781: p_msg_index_out => l_msg_index_out);
7782: x_msg_data := l_data;
7783: end if;
7784: raise FND_API.G_EXC_ERROR;
7785: end if;
7786:
7787: --hsiu added for task status
7788: --if versioning is off, rollup.
7794: ,x_msg_count => l_msg_count
7795: ,x_msg_data => l_msg_data
7796: );
7797:
7798: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
7799: x_msg_count := FND_MSG_PUB.count_msg;
7800: if x_msg_count = 1 then
7801: pa_interface_utils_pub.get_messages
7802: (p_encoded => FND_API.G_TRUE,
7798: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
7799: x_msg_count := FND_MSG_PUB.count_msg;
7800: if x_msg_count = 1 then
7801: pa_interface_utils_pub.get_messages
7802: (p_encoded => FND_API.G_TRUE,
7803: p_msg_index => 1,
7804: p_msg_count => l_msg_count,
7805: p_msg_data => l_msg_data,
7806: p_data => l_data,
7806: p_data => l_data,
7807: p_msg_index_out => l_msg_index_out);
7808: x_msg_data := l_data;
7809: end if;
7810: raise FND_API.G_EXC_ERROR;
7811: end if;
7812: END IF;
7813:
7814: --end task status changes
7814: --end task status changes
7815:
7816: END IF;
7817:
7818: x_return_status := FND_API.G_RET_STS_SUCCESS;
7819:
7820: IF (p_commit = FND_API.G_TRUE) THEN
7821: COMMIT;
7822: END IF;
7816: END IF;
7817:
7818: x_return_status := FND_API.G_RET_STS_SUCCESS;
7819:
7820: IF (p_commit = FND_API.G_TRUE) THEN
7821: COMMIT;
7822: END IF;
7823:
7824: IF (p_debug_mode = 'Y') THEN
7825: pa_debug.debug('PA_TASK_PUB1.OUTDENT_TASK_VERSION END');
7826: END IF;
7827:
7828: EXCEPTION
7829: when FND_API.G_EXC_ERROR then
7830: if p_commit = FND_API.G_TRUE then
7831: rollback to outdent_task_version;
7832: end if;
7833: x_return_status := FND_API.G_RET_STS_ERROR;
7826: END IF;
7827:
7828: EXCEPTION
7829: when FND_API.G_EXC_ERROR then
7830: if p_commit = FND_API.G_TRUE then
7831: rollback to outdent_task_version;
7832: end if;
7833: x_return_status := FND_API.G_RET_STS_ERROR;
7834: when FND_API.G_EXC_UNEXPECTED_ERROR then
7829: when FND_API.G_EXC_ERROR then
7830: if p_commit = FND_API.G_TRUE then
7831: rollback to outdent_task_version;
7832: end if;
7833: x_return_status := FND_API.G_RET_STS_ERROR;
7834: when FND_API.G_EXC_UNEXPECTED_ERROR then
7835: if p_commit = FND_API.G_TRUE then
7836: rollback to outdent_task_version;
7837: end if;
7830: if p_commit = FND_API.G_TRUE then
7831: rollback to outdent_task_version;
7832: end if;
7833: x_return_status := FND_API.G_RET_STS_ERROR;
7834: when FND_API.G_EXC_UNEXPECTED_ERROR then
7835: if p_commit = FND_API.G_TRUE then
7836: rollback to outdent_task_version;
7837: end if;
7838: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
7831: rollback to outdent_task_version;
7832: end if;
7833: x_return_status := FND_API.G_RET_STS_ERROR;
7834: when FND_API.G_EXC_UNEXPECTED_ERROR then
7835: if p_commit = FND_API.G_TRUE then
7836: rollback to outdent_task_version;
7837: end if;
7838: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
7839: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
7834: when FND_API.G_EXC_UNEXPECTED_ERROR then
7835: if p_commit = FND_API.G_TRUE then
7836: rollback to outdent_task_version;
7837: end if;
7838: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
7839: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
7840: p_procedure_name => 'OUTDENT_TASK_VERSION',
7841: p_error_text => SUBSTRB(SQLERRM,1,240));
7842: when OTHERS then
7839: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
7840: p_procedure_name => 'OUTDENT_TASK_VERSION',
7841: p_error_text => SUBSTRB(SQLERRM,1,240));
7842: when OTHERS then
7843: if p_commit = FND_API.G_TRUE then
7844: rollback to outdent_task_version;
7845: end if;
7846: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
7847: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
7842: when OTHERS then
7843: if p_commit = FND_API.G_TRUE then
7844: rollback to outdent_task_version;
7845: end if;
7846: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
7847: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
7848: p_procedure_name => 'OUTDENT_TASK_VERSION',
7849: p_error_text => SUBSTRB(SQLERRM,1,240));
7850: raise;
8030: if l_msg_count > 0 then
8031: x_msg_count := l_msg_count;
8032: if x_msg_count = 1 then
8033: pa_interface_utils_pub.get_messages
8034: (p_encoded => FND_API.G_TRUE,
8035: p_msg_index => 1,
8036: p_msg_count => l_msg_count,
8037: p_msg_data => l_msg_data,
8038: p_data => l_data,
8089: PA_UTILS.ADD_MESSAGE( p_app_short_name => 'PA'
8090: ,p_msg_name => 'PA_PS_TSK_WBS_LVL_ERR');
8091: x_msg_count := 1;
8092: pa_interface_utils_pub.get_messages
8093: (p_encoded => FND_API.G_TRUE,
8094: p_msg_index => 1,
8095: p_msg_count => l_msg_count,
8096: p_msg_data => l_msg_data,
8097: p_data => l_data,
8148: ,p_msg_name => 'PA_PS_OUTLINE_LEVEL_INVALID');
8149:
8150: x_msg_count := 1;
8151: pa_interface_utils_pub.get_messages
8152: (p_encoded => FND_API.G_TRUE,
8153: p_msg_index => 1,
8154: p_msg_count => l_msg_count,
8155: p_msg_data => l_msg_data,
8156: p_data => l_data,
8168: ,p_msg_name => 'PA_PS_OUTLINE_LEVEL_INVALID');
8169:
8170: x_msg_count := 1;
8171: pa_interface_utils_pub.get_messages
8172: (p_encoded => FND_API.G_TRUE,
8173: p_msg_index => 1,
8174: p_msg_count => l_msg_count,
8175: p_msg_data => l_msg_data,
8176: p_data => l_data,
8192: ,p_msg_name => 'PA_PS_OUTLINE_LEVEL_INVALID');
8193:
8194: x_msg_count := 1;
8195: pa_interface_utils_pub.get_messages
8196: (p_encoded => FND_API.G_TRUE,
8197: p_msg_index => 1,
8198: p_msg_count => l_msg_count,
8199: p_msg_data => l_msg_data,
8200: p_data => l_data,
8275: END IF;
8276: --3035902: end process update flag changes
8277:
8278: PA_TASK_PUB1.CREATE_TASK
8279: ( p_validate_only => FND_API.G_FALSE
8280: ,p_object_type => 'PA_TASKS'
8281: ,p_project_id => p_project_id
8282: ,p_ref_task_id => l_ref_proj_eleme_id
8283: ,p_peer_or_sub => l_peer_or_sub
8295: ,x_return_status => l_return_status
8296: ,x_msg_count => l_msg_count
8297: ,x_msg_data => l_msg_data);
8298:
8299: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
8300: x_msg_count := FND_MSG_PUB.count_msg;
8301: if x_msg_count = 1 then
8302: pa_interface_utils_pub.get_messages
8303: (p_encoded => FND_API.G_TRUE,
8299: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
8300: x_msg_count := FND_MSG_PUB.count_msg;
8301: if x_msg_count = 1 then
8302: pa_interface_utils_pub.get_messages
8303: (p_encoded => FND_API.G_TRUE,
8304: p_msg_index => 1,
8305: p_msg_count => l_msg_count,
8306: p_msg_data => l_msg_data,
8307: p_data => l_data,
8335: ,x_return_status => l_return_status
8336: ,x_msg_count => l_msg_count
8337: ,x_msg_data => l_msg_data);
8338:
8339: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
8340: x_msg_count := FND_MSG_PUB.count_msg;
8341: if x_msg_count = 1 then
8342: pa_interface_utils_pub.get_messages
8343: (p_encoded => FND_API.G_TRUE,
8339: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
8340: x_msg_count := FND_MSG_PUB.count_msg;
8341: if x_msg_count = 1 then
8342: pa_interface_utils_pub.get_messages
8343: (p_encoded => FND_API.G_TRUE,
8344: p_msg_index => 1,
8345: p_msg_count => l_msg_count,
8346: p_msg_data => l_msg_data,
8347: p_data => l_data,
8347: p_data => l_data,
8348: p_msg_index_out => l_msg_index_out);
8349: x_msg_data := l_data;
8350: end if;
8351: raise FND_API.G_EXC_ERROR;
8352: end if;
8353: --END IF;
8354: --3035902: end process update flag changes
8355:
8369: ,x_return_status => l_return_status
8370: ,x_msg_count => l_msg_count
8371: ,x_msg_data => l_msg_data );
8372:
8373: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
8374: x_msg_count := FND_MSG_PUB.count_msg;
8375: if x_msg_count = 1 then
8376: pa_interface_utils_pub.get_messages
8377: (p_encoded => FND_API.G_TRUE,
8373: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
8374: x_msg_count := FND_MSG_PUB.count_msg;
8375: if x_msg_count = 1 then
8376: pa_interface_utils_pub.get_messages
8377: (p_encoded => FND_API.G_TRUE,
8378: p_msg_index => 1,
8379: p_msg_count => l_msg_count,
8380: p_msg_data => l_msg_data,
8381: p_data => l_data,
8381: p_data => l_data,
8382: p_msg_index_out => l_msg_index_out);
8383: x_msg_data := l_data;
8384: end if;
8385: raise FND_API.G_EXC_ERROR;
8386: end if;
8387: END IF;
8388: END IF;
8389:
8429:
8430:
8431: --CREATE_TASK_VERSION
8432: PA_TASK_PUB1.CREATE_TASK_VERSION
8433: ( p_validate_only => FND_API.G_FALSE
8434: ,p_ref_task_version_id => l_ref_task_ver_id
8435: ,p_peer_or_sub => l_peer_or_sub
8436: ,p_task_id => l_task_id
8437: ,p_TASK_UNPUB_VER_STATUS_CODE => l_task_unpub_ver_status_code
8440: ,x_return_status => l_return_status
8441: ,x_msg_count => l_msg_count
8442: ,x_msg_data => l_msg_data);
8443:
8444: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
8445: x_msg_count := FND_MSG_PUB.count_msg;
8446: if x_msg_count = 1 then
8447: pa_interface_utils_pub.get_messages
8448: (p_encoded => FND_API.G_TRUE,
8444: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
8445: x_msg_count := FND_MSG_PUB.count_msg;
8446: if x_msg_count = 1 then
8447: pa_interface_utils_pub.get_messages
8448: (p_encoded => FND_API.G_TRUE,
8449: p_msg_index => 1,
8450: p_msg_count => l_msg_count,
8451: p_msg_data => l_msg_data,
8452: p_data => l_data,
8466: ,x_msg_count => l_msg_count
8467: ,x_msg_data => l_msg_data
8468: );
8469:
8470: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
8471: x_msg_count := FND_MSG_PUB.count_msg;
8472: if x_msg_count = 1 then
8473: pa_interface_utils_pub.get_messages
8474: (p_encoded => FND_API.G_TRUE,
8470: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
8471: x_msg_count := FND_MSG_PUB.count_msg;
8472: if x_msg_count = 1 then
8473: pa_interface_utils_pub.get_messages
8474: (p_encoded => FND_API.G_TRUE,
8475: p_msg_index => 1,
8476: p_msg_count => l_msg_count,
8477: p_msg_data => l_msg_data,
8478: p_data => l_data,
8488: --We will create record in pa_proj_elem_ver_schedules now for tasks created via change management flow.
8489: -- PA_TASK_PVT1.G_CHG_DOC_CNTXT will be equal to 1 only when the task is created via CD flow.
8490: if (PA_PROJECT_STRUCTURE_UTILS.GET_STRUC_TYPE_FOR_VERSION(p_structure_version_id, 'WORKPLAN') = 'Y' OR PA_TASK_PVT1.G_CHG_DOC_CNTXT = 1) then
8491: PA_TASK_PUB1.CREATE_SCHEDULE_VERSION
8492: ( p_validate_only => FND_API.G_FALSE
8493: ,p_element_version_id => l_task_version_id
8494: ,p_scheduled_start_date => nvl(p_scheduled_start_date(i), sysdate)
8495: ,p_scheduled_end_date => nvl(p_scheduled_finish_date(i),nvl(p_scheduled_start_date(i), sysdate))
8496: ,p_planned_effort => p_planned_effort(i)
8499: ,x_return_status => l_return_status
8500: ,x_msg_count => l_msg_count
8501: ,x_msg_data => l_msg_data );
8502:
8503: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
8504: x_msg_count := FND_MSG_PUB.count_msg;
8505: if x_msg_count = 1 then
8506: pa_interface_utils_pub.get_messages
8507: (p_encoded => FND_API.G_TRUE,
8503: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
8504: x_msg_count := FND_MSG_PUB.count_msg;
8505: if x_msg_count = 1 then
8506: pa_interface_utils_pub.get_messages
8507: (p_encoded => FND_API.G_TRUE,
8508: p_msg_index => 1,
8509: p_msg_count => l_msg_count,
8510: p_msg_data => l_msg_data,
8511: p_data => l_data,
8528: x_msg_count =>l_msg_count,
8529: x_msg_data =>l_msg_data);
8530:
8531:
8532: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
8533: l_msg_count := 1;
8534: x_msg_data := l_msg_data;
8535: if l_msg_count = 1 then
8536: pa_interface_utils_pub.get_messages
8533: l_msg_count := 1;
8534: x_msg_data := l_msg_data;
8535: if l_msg_count = 1 then
8536: pa_interface_utils_pub.get_messages
8537: (p_encoded => FND_API.G_TRUE,
8538: p_msg_index => 1,
8539: p_msg_count => l_msg_count,
8540: p_msg_data => l_msg_data,
8541: p_data => l_data,
8560: x_msg_count =>l_msg_count,
8561: x_msg_data =>l_msg_data);
8562:
8563:
8564: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
8565: l_msg_count := 1;
8566: x_msg_data := l_msg_data;
8567: if l_msg_count = 1 then
8568: pa_interface_utils_pub.get_messages
8565: l_msg_count := 1;
8566: x_msg_data := l_msg_data;
8567: if l_msg_count = 1 then
8568: pa_interface_utils_pub.get_messages
8569: (p_encoded => FND_API.G_TRUE,
8570: p_msg_index => 1,
8571: p_msg_count => l_msg_count,
8572: p_msg_data => l_msg_data,
8573: p_data => l_data,
8610: x_msg_count => l_msg_count,
8611: x_msg_data => l_msg_data
8612: );
8613:
8614: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
8615: x_msg_count := FND_MSG_PUB.count_msg;
8616: if x_msg_count = 1 then
8617: pa_interface_utils_pub.get_messages
8618: (p_encoded => FND_API.G_TRUE,
8614: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
8615: x_msg_count := FND_MSG_PUB.count_msg;
8616: if x_msg_count = 1 then
8617: pa_interface_utils_pub.get_messages
8618: (p_encoded => FND_API.G_TRUE,
8619: p_msg_index => 1,
8620: p_msg_count => l_msg_count,
8621: p_msg_data => l_msg_data,
8622: p_data => l_data,
8668: p_procedure_name => 'CREATE_TASKS',
8669: p_error_text => SUBSTRB('pa_fp_planning_transaction_pub.delete_planning_transactions:'||SQLERRM,1,240));
8670: RAISE API_ERROR;
8671: END;
8672: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
8673: x_msg_count := FND_MSG_PUB.count_msg;
8674: if x_msg_count = 1 then
8675: pa_interface_utils_pub.get_messages
8676: (p_encoded => FND_API.G_TRUE,
8672: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
8673: x_msg_count := FND_MSG_PUB.count_msg;
8674: if x_msg_count = 1 then
8675: pa_interface_utils_pub.get_messages
8676: (p_encoded => FND_API.G_TRUE,
8677: p_msg_index => 1,
8678: p_msg_count => l_msg_count,
8679: p_msg_data => l_msg_data,
8680: p_data => l_data,
8692: --Hsiu added for date rollup; workplan only
8693:
8694: if PA_PROJECT_STRUCTURE_UTILS.GET_STRUC_TYPE_FOR_VERSION(p_structure_version_id, 'WORKPLAN') = 'Y' then
8695: PA_STRUCT_TASK_ROLLUP_PUB.Tasks_Rollup(
8696: p_commit => FND_API.G_FALSE,
8697: p_element_versions => l_tasks_ver_ids,
8698: x_return_status => l_return_status,
8699: x_msg_count => l_msg_count,
8700: x_msg_data => l_msg_data);
8698: x_return_status => l_return_status,
8699: x_msg_count => l_msg_count,
8700: x_msg_data => l_msg_data);
8701:
8702: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
8703: x_msg_count := FND_MSG_PUB.count_msg;
8704: if x_msg_count = 1 then
8705: pa_interface_utils_pub.get_messages
8706: (p_encoded => FND_API.G_TRUE,
8702: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
8703: x_msg_count := FND_MSG_PUB.count_msg;
8704: if x_msg_count = 1 then
8705: pa_interface_utils_pub.get_messages
8706: (p_encoded => FND_API.G_TRUE,
8707: p_msg_index => 1,
8708: p_msg_count => l_msg_count,
8709: p_msg_data => l_msg_data,
8710: p_data => l_data,
8742: ,x_return_status => l_return_status
8743: ,x_msg_count => l_msg_count
8744: ,x_msg_data => l_msg_data );
8745:
8746: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
8747: x_msg_count := FND_MSG_PUB.count_msg;
8748: if x_msg_count = 1 then
8749: pa_interface_utils_pub.get_messages
8750: (p_encoded => FND_API.G_TRUE,
8746: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
8747: x_msg_count := FND_MSG_PUB.count_msg;
8748: if x_msg_count = 1 then
8749: pa_interface_utils_pub.get_messages
8750: (p_encoded => FND_API.G_TRUE,
8751: p_msg_index => 1,
8752: p_msg_count => l_msg_count,
8753: p_msg_data => l_msg_data,
8754: p_data => l_data,
8760: -- anlee end of changes
8761:
8762: END IF;
8763:
8764: x_return_status := FND_API.G_RET_STS_SUCCESS;
8765: EXCEPTION
8766: WHEN API_ERROR THEN
8767: rollback to create_tasks;
8768: x_return_status := FND_API.G_RET_STS_ERROR;
8764: x_return_status := FND_API.G_RET_STS_SUCCESS;
8765: EXCEPTION
8766: WHEN API_ERROR THEN
8767: rollback to create_tasks;
8768: x_return_status := FND_API.G_RET_STS_ERROR;
8769: WHEN OTHERS THEN
8770: rollback to create_tasks;
8771: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8772: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_STRUCTURE_TASK_PUB',
8767: rollback to create_tasks;
8768: x_return_status := FND_API.G_RET_STS_ERROR;
8769: WHEN OTHERS THEN
8770: rollback to create_tasks;
8771: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
8772: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_STRUCTURE_TASK_PUB',
8773: p_procedure_name => 'CREATE_TASKS',
8774: p_error_text => SUBSTRB(SQLERRM,1,240));
8775: raise;
8781: -- Type : Utility
8782: -- Pre-reqs : None
8783: -- Return Value : N/A
8784: -- Prameters
8785: -- p_commit IN VARCHAR2 := FND_API.G_FALSE
8786: -- p_element_versions IN PA_NUM_1000_NUM
8787: -- p_outline_level IN PA_NUM_1000_NUM
8788: -- p_top_peer_count IN NUMBER
8789: -- p_top_sub_count IN NUMBER
9325: IF l_debug_mode = 'Y' THEN
9326: pa_debug.reset_curr_function;
9327: END IF;
9328:
9329: x_return_status := FND_API.G_RET_STS_SUCCESS;
9330: EXCEPTION
9331: WHEN OTHERS THEN
9332: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
9333: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
9328:
9329: x_return_status := FND_API.G_RET_STS_SUCCESS;
9330: EXCEPTION
9331: WHEN OTHERS THEN
9332: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
9333: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
9334: p_procedure_name => 'CALC_TASK_WEIGHTS',
9335: p_error_text => SUBSTRB(SQLERRM,1,240));
9336: IF l_debug_mode = 'Y' THEN
9345: -- Pre-reqs : None
9346: -- Return Value : N/A
9347: -- Parameters
9348: -- p_api_version IN NUMBER := 1.0
9349: -- p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE
9350: -- p_commit IN VARCHAR2 := FND_API.G_FALSE
9351: -- p_validate_only IN VARCHAR2 := FND_API.G_TRUE
9352: -- p_validation_level IN VARCHAR2 := 100
9353: -- p_calling_module IN VARCHAR2 := 'SELF_SERVICE'
9346: -- Return Value : N/A
9347: -- Parameters
9348: -- p_api_version IN NUMBER := 1.0
9349: -- p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE
9350: -- p_commit IN VARCHAR2 := FND_API.G_FALSE
9351: -- p_validate_only IN VARCHAR2 := FND_API.G_TRUE
9352: -- p_validation_level IN VARCHAR2 := 100
9353: -- p_calling_module IN VARCHAR2 := 'SELF_SERVICE'
9354: -- p_debug_mode IN VARCHAR2 := 'N'
9347: -- Parameters
9348: -- p_api_version IN NUMBER := 1.0
9349: -- p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE
9350: -- p_commit IN VARCHAR2 := FND_API.G_FALSE
9351: -- p_validate_only IN VARCHAR2 := FND_API.G_TRUE
9352: -- p_validation_level IN VARCHAR2 := 100
9353: -- p_calling_module IN VARCHAR2 := 'SELF_SERVICE'
9354: -- p_debug_mode IN VARCHAR2 := 'N'
9355: -- p_max_msg_count IN NUMBER := PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
9367: --
9368: procedure Update_Task_Weighting
9369: (
9370: p_api_version IN NUMBER := 1.0
9371: ,p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE
9372: ,p_commit IN VARCHAR2 := FND_API.G_FALSE
9373: ,p_validate_only IN VARCHAR2 := FND_API.G_TRUE
9374: ,p_validation_level IN VARCHAR2 := 100
9375: ,p_calling_module IN VARCHAR2 := 'SELF_SERVICE'
9368: procedure Update_Task_Weighting
9369: (
9370: p_api_version IN NUMBER := 1.0
9371: ,p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE
9372: ,p_commit IN VARCHAR2 := FND_API.G_FALSE
9373: ,p_validate_only IN VARCHAR2 := FND_API.G_TRUE
9374: ,p_validation_level IN VARCHAR2 := 100
9375: ,p_calling_module IN VARCHAR2 := 'SELF_SERVICE'
9376: ,p_debug_mode IN VARCHAR2 := 'N'
9369: (
9370: p_api_version IN NUMBER := 1.0
9371: ,p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE
9372: ,p_commit IN VARCHAR2 := FND_API.G_FALSE
9373: ,p_validate_only IN VARCHAR2 := FND_API.G_TRUE
9374: ,p_validation_level IN VARCHAR2 := 100
9375: ,p_calling_module IN VARCHAR2 := 'SELF_SERVICE'
9376: ,p_debug_mode IN VARCHAR2 := 'N'
9377: ,p_max_msg_count IN NUMBER := PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
9391: IF (p_debug_mode = 'Y') THEN
9392: pa_debug.debug('PA_TASK_PUB1.UPDATE_TASK_WEIGHTING begin');
9393: END IF;
9394:
9395: IF (p_commit = FND_API.G_TRUE) THEN
9396: savepoint update_task_weighting;
9397: END IF;
9398:
9399: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
9395: IF (p_commit = FND_API.G_TRUE) THEN
9396: savepoint update_task_weighting;
9397: END IF;
9398:
9399: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
9400: FND_MSG_PUB.initialize;
9401: END IF;
9402:
9403: PA_TASK_PVT1.Update_Task_Weighting(
9409: ,x_msg_data => x_msg_data
9410: );
9411:
9412: EXCEPTION
9413: when FND_API.G_EXC_ERROR then
9414: if p_commit = FND_API.G_TRUE then
9415: rollback to update_task_weighting;
9416: end if;
9417: x_return_status := FND_API.G_RET_STS_ERROR;
9410: );
9411:
9412: EXCEPTION
9413: when FND_API.G_EXC_ERROR then
9414: if p_commit = FND_API.G_TRUE then
9415: rollback to update_task_weighting;
9416: end if;
9417: x_return_status := FND_API.G_RET_STS_ERROR;
9418: when FND_API.G_EXC_UNEXPECTED_ERROR then
9413: when FND_API.G_EXC_ERROR then
9414: if p_commit = FND_API.G_TRUE then
9415: rollback to update_task_weighting;
9416: end if;
9417: x_return_status := FND_API.G_RET_STS_ERROR;
9418: when FND_API.G_EXC_UNEXPECTED_ERROR then
9419: if p_commit = FND_API.G_TRUE then
9420: rollback to update_task_weighting;
9421: end if;
9414: if p_commit = FND_API.G_TRUE then
9415: rollback to update_task_weighting;
9416: end if;
9417: x_return_status := FND_API.G_RET_STS_ERROR;
9418: when FND_API.G_EXC_UNEXPECTED_ERROR then
9419: if p_commit = FND_API.G_TRUE then
9420: rollback to update_task_weighting;
9421: end if;
9422: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
9415: rollback to update_task_weighting;
9416: end if;
9417: x_return_status := FND_API.G_RET_STS_ERROR;
9418: when FND_API.G_EXC_UNEXPECTED_ERROR then
9419: if p_commit = FND_API.G_TRUE then
9420: rollback to update_task_weighting;
9421: end if;
9422: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
9423: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
9418: when FND_API.G_EXC_UNEXPECTED_ERROR then
9419: if p_commit = FND_API.G_TRUE then
9420: rollback to update_task_weighting;
9421: end if;
9422: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
9423: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
9424: p_procedure_name => 'UPDATE_TASK_WEIGHTING',
9425: p_error_text => SUBSTRB(SQLERRM,1,240));
9426: when OTHERS then
9423: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
9424: p_procedure_name => 'UPDATE_TASK_WEIGHTING',
9425: p_error_text => SUBSTRB(SQLERRM,1,240));
9426: when OTHERS then
9427: if p_commit = FND_API.G_TRUE then
9428: rollback to update_task_weighting;
9429: end if;
9430: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
9431: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
9426: when OTHERS then
9427: if p_commit = FND_API.G_TRUE then
9428: rollback to update_task_weighting;
9429: end if;
9430: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
9431: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
9432: p_procedure_name => 'UPDATE_TASK_WEIGHTING',
9433: p_error_text => SUBSTRB(SQLERRM,1,240));
9434: raise;
9438: -- Amit : Following procedure added for Bug 2838700
9439:
9440: PROCEDURE INDENT_TASK_VERSION_BULK (
9441: p_api_version IN NUMBER :=1.0,
9442: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
9443: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
9444: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
9445: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
9446: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
9439:
9440: PROCEDURE INDENT_TASK_VERSION_BULK (
9441: p_api_version IN NUMBER :=1.0,
9442: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
9443: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
9444: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
9445: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
9446: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
9447: p_debug_mode IN VARCHAR2 :='N',
9440: PROCEDURE INDENT_TASK_VERSION_BULK (
9441: p_api_version IN NUMBER :=1.0,
9442: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
9443: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
9444: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
9445: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
9446: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
9447: p_debug_mode IN VARCHAR2 :='N',
9448: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
9441: p_api_version IN NUMBER :=1.0,
9442: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
9443: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
9444: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
9445: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
9446: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
9447: p_debug_mode IN VARCHAR2 :='N',
9448: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
9449: p_structure_version_id IN NUMBER := PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
9740: IF (p_debug_mode = 'Y') THEN
9741: pa_debug.debug('PA_TASK_PUB1.INDENT_TASK_VERSION_BULK begin');
9742: END IF;
9743:
9744: IF (p_commit = FND_API.G_TRUE) THEN
9745: savepoint indent_task_version_bulk;
9746: END IF;
9747:
9748: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
9744: IF (p_commit = FND_API.G_TRUE) THEN
9745: savepoint indent_task_version_bulk;
9746: END IF;
9747:
9748: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
9749: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
9750: END IF;
9751:
9752: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
9745: savepoint indent_task_version_bulk;
9746: END IF;
9747:
9748: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
9749: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
9750: END IF;
9751:
9752: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
9753: FND_MSG_PUB.initialize;
9748: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
9749: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
9750: END IF;
9751:
9752: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
9753: FND_MSG_PUB.initialize;
9754: END IF;
9755:
9756: --bug 4075697
9800: END IF;
9801: IF l_update_parent_task_allowed = 'N' THEN
9802: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
9803: p_msg_name => 'PA_PR_PM_NO_MOVE_TASK');
9804: raise FND_API.G_EXC_ERROR;
9805: END IF;
9806: END IF;
9807: END IF;
9808:
9831: , src_proj_element_id
9832: , p_task_version_id),'N') = 'Y') THEN
9833: --deleting linked task. Error
9834: PA_UTILS.ADD_MESSAGE('PA', 'PA_PS_NO_IND_LINKED_TASK');
9835: raise FND_API.G_EXC_ERROR;
9836: END IF;
9837: END IF;
9838:
9839: -- Get Source Task Information
9858: IF ('Y' = pa_proj_elements_utils.CHECK_ELEMENT_HAS_PHASE(
9859: src_proj_element_id)) THEN
9860: --Indenting a task with phase. Error
9861: PA_UTILS.ADD_MESSAGE('PA', 'PA_LC_NO_INDENT_PHASE_TASK');
9862: raise FND_API.G_EXC_ERROR;
9863: END IF;
9864: END IF;
9865:
9866:
9866:
9867: IF src_seq_number = 1 then
9868: PA_UTILS.ADD_MESSAGE( p_app_short_name => 'PA'
9869: ,p_msg_name => 'PA_PS_CANNOT_INDENT');
9870: raise FND_API.G_EXC_ERROR;
9871: END IF;
9872:
9873: /* Bug 2843737 Added logic to populate the error message when you try to indent lowest task
9874: Also restructured the logic to get the reference task */
9886:
9887: IF src_wbs_level > ref_wbs_level then
9888: PA_UTILS.ADD_MESSAGE( p_app_short_name => 'PA'
9889: ,p_msg_name => 'PA_PS_CANNOT_INDENT');
9890: raise FND_API.G_EXC_ERROR;
9891: END IF;
9892:
9893: IF src_wbs_level = ref_wbs_level then
9894: l_peer_or_sub := 'SUB';
9956: --IF PA_PROJ_ELEMENTS_UTILS.check_deliv_in_hierarchy(p_task_version_id,ref_elem_ver_id) = 'Y' THEN
9957: IF PA_PROJ_ELEMENTS_UTILS.check_deliv_in_hierarchy(p_task_version_id, l_ref_tsk_version_id) = 'Y' THEN
9958: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
9959: p_msg_name => 'PA_PS_CHK_DELIV_UPDATE');
9960: raise FND_API.G_EXC_ERROR;
9961: END IF;
9962:
9963: --Check if ok to indent this task
9964: PA_PROJ_ELEMENTS_UTILS.Check_move_task_ok(
9969:
9970: IF (l_return_status <> 'Y') THEN
9971: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
9972: p_msg_name => l_error_msg_code);
9973: raise FND_API.G_EXC_ERROR;
9974: END IF;
9975:
9976: --check if ok to create subtask
9977: IF (l_peer_or_sub = 'PEER') THEN
9992:
9993: IF (NVL(l_new_par_ver_id, -99) <> NVL (l_old_par_ver_id, -99)) THEN
9994: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
9995: p_msg_name => 'PA_CANT_CHANGE_PARENT');
9996: raise FND_API.G_EXC_ERROR;
9997: END IF;
9998: END IF;
9999: --end bug 3069306
10000:
10006:
10007: IF (l_return_status <> 'Y') THEN
10008: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
10009: p_msg_name => l_error_msg_code);
10010: raise FND_API.G_EXC_ERROR;
10011: END IF;
10012:
10013: --bug 4099488
10014: IF PA_RELATIONSHIP_UTILS.check_dependencies_valid(l_parent_ver_id, p_task_version_id) = 'N' THEN
10013: --bug 4099488
10014: IF PA_RELATIONSHIP_UTILS.check_dependencies_valid(l_parent_ver_id, p_task_version_id) = 'N' THEN
10015: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
10016: p_msg_name => 'PA_INV_MOV_TSK_DEP_ERR');
10017: raise FND_API.G_EXC_ERROR;
10018: END IF;
10019: --end bug 4099488
10020: ELSE
10021: --bug 3069306
10031:
10032: IF (NVL(l_new_par_ver_id, -99) <> NVL (l_old_par_ver_id, -99)) THEN
10033: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
10034: p_msg_name => 'PA_CANT_CHANGE_PARENT');
10035: raise FND_API.G_EXC_ERROR;
10036: END IF;
10037: END IF;
10038: --end bug 3069306
10039:
10046:
10047: IF (l_return_status <> 'Y') THEN
10048: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
10049: p_msg_name => l_error_msg_code);
10050: raise FND_API.G_EXC_ERROR;
10051: END IF;
10052:
10053: --bug 4099488
10054: IF PA_RELATIONSHIP_UTILS.check_dependencies_valid(ref_elem_ver_id, p_task_version_id) = 'N' THEN
10053: --bug 4099488
10054: IF PA_RELATIONSHIP_UTILS.check_dependencies_valid(ref_elem_ver_id, p_task_version_id) = 'N' THEN
10055: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
10056: p_msg_name => 'PA_INV_MOV_TSK_DEP_ERR');
10057: raise FND_API.G_EXC_ERROR;
10058: END IF;
10059: --end bug 4099488
10060: END IF;
10061:
10075:
10076: IF (x_return_status <> 'S') THEN -- 4275757 : Changed from 'Y' to 'S'
10077: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
10078: p_msg_name => l_error_msg_code);
10079: raise FND_API.G_EXC_ERROR;
10080: End If;
10081: End If;
10082:
10083: --check the task is a lowest task bug 3301192
10088:
10089: The processing done by the followig two calls is made now as plsql table bulk processing
10090:
10091: PA_TASK_PUB1.Update_Task_Version
10092: ( p_validate_only => FND_API.G_FALSE,
10093: p_ref_task_version_id => l_ref_task_version_id,
10094: p_peer_or_sub => l_peer_or_sub,
10095: p_task_version_id => p_task_version_id,
10096: p_record_version_number => p_record_version_number,
10399: ,x_msg_data => l_msg_data
10400: );
10401:
10402:
10403: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
10404: x_msg_count := FND_MSG_PUB.count_msg;
10405: IF x_msg_count = 1 then
10406: pa_interface_utils_pub.get_messages
10407: (p_encoded => FND_API.G_TRUE,
10403: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
10404: x_msg_count := FND_MSG_PUB.count_msg;
10405: IF x_msg_count = 1 then
10406: pa_interface_utils_pub.get_messages
10407: (p_encoded => FND_API.G_TRUE,
10408: p_msg_index => 1,
10409: p_msg_count => l_msg_count,
10410: p_msg_data => l_msg_data,
10411: p_data => l_data,
10411: p_data => l_data,
10412: p_msg_index_out => l_msg_index_out);
10413: x_msg_data := l_data;
10414: END IF;
10415: raise FND_API.G_EXC_ERROR;
10416: END IF;
10417:
10418: --for task weighting
10419: PA_TASK_PVT1.RECALC_TASKS_WEIGHTING(
10425:
10426: x_msg_count := FND_MSG_PUB.count_msg;
10427: IF x_msg_count = 1 then
10428: pa_interface_utils_pub.get_messages
10429: (p_encoded => FND_API.G_TRUE,
10430: p_msg_index => 1,
10431: p_msg_count => l_msg_count,
10432: p_msg_data => l_msg_data,
10433: p_data => l_data,
10445:
10446: x_msg_count := FND_MSG_PUB.count_msg;
10447: IF x_msg_count = 1 then
10448: pa_interface_utils_pub.get_messages
10449: (p_encoded => FND_API.G_TRUE,
10450: p_msg_index => 1,
10451: p_msg_count => l_msg_count,
10452: p_msg_data => l_msg_data,
10453: p_data => l_data,
10524: ,x_msg_count => l_msg_count
10525: ,x_msg_data => l_msg_data );
10526:
10527: -- Merged from 85
10528: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
10529: x_msg_count := FND_MSG_PUB.count_msg;
10530: IF x_msg_count = 1 then
10531: pa_interface_utils_pub.get_messages
10532: (p_encoded => FND_API.G_TRUE,
10528: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
10529: x_msg_count := FND_MSG_PUB.count_msg;
10530: IF x_msg_count = 1 then
10531: pa_interface_utils_pub.get_messages
10532: (p_encoded => FND_API.G_TRUE,
10533: p_msg_index => 1,
10534: p_msg_count => l_msg_count,
10535: p_msg_data => l_msg_data,
10536: p_data => l_data,
10536: p_data => l_data,
10537: p_msg_index_out => l_msg_index_out);
10538: x_msg_data := l_data;
10539: END IF;
10540: raise FND_API.G_EXC_ERROR;
10541: END IF;
10542:
10543: --Bug 2947492 ( Indent )
10544: --
10552: IF NVL( l_top_task_id, -99 ) <> NVL( l_old_top_task_id, -99 )
10553: THEN
10554: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
10555: p_msg_name => 'PA_CANT_CHANGE_PARENT');
10556: raise FND_API.G_EXC_ERROR;
10557: END IF;
10558: --End bug 2967204
10559:
10560: --First call the check_reparent ok
10570: ,x_msg_count => l_msg_count
10571: ,x_msg_data => l_msg_data
10572: );
10573:
10574: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
10575: x_msg_count := FND_MSG_PUB.count_msg;
10576: IF x_msg_count = 1 then
10577: pa_interface_utils_pub.get_messages
10578: (p_encoded => FND_API.G_TRUE,
10574: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
10575: x_msg_count := FND_MSG_PUB.count_msg;
10576: IF x_msg_count = 1 then
10577: pa_interface_utils_pub.get_messages
10578: (p_encoded => FND_API.G_TRUE,
10579: p_msg_index => 1,
10580: p_msg_count => l_msg_count,
10581: p_msg_data => l_msg_data,
10582: p_data => l_data,
10582: p_data => l_data,
10583: p_msg_index_out => l_msg_index_out);
10584: x_msg_data := l_data;
10585: END IF;
10586: raise FND_API.G_EXC_ERROR;
10587: END IF;
10588: */ --commenting out. check mails form Venkatesh Jayaraman dated 22 Jan 04
10589:
10590: /* Commenting out the call to MAINTAIN_PLANNABLE_TASKS for bug 3010538
10602: , x_msg_data => l_msg_data
10603: , x_msg_count => l_msg_count
10604: );
10605:
10606: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
10607: x_msg_count := FND_MSG_PUB.count_msg;
10608: IF x_msg_count = 1 then
10609: pa_interface_utils_pub.get_messages
10610: (p_encoded => FND_API.G_TRUE,
10606: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
10607: x_msg_count := FND_MSG_PUB.count_msg;
10608: IF x_msg_count = 1 then
10609: pa_interface_utils_pub.get_messages
10610: (p_encoded => FND_API.G_TRUE,
10611: p_msg_index => 1,
10612: p_msg_count => l_msg_count,
10613: p_msg_data => l_msg_data,
10614: p_data => l_data,
10614: p_data => l_data,
10615: p_msg_index_out => l_msg_index_out);
10616: x_msg_data := l_data;
10617: END IF;
10618: raise FND_API.G_EXC_ERROR;
10619: END IF;
10620: bug 3010538 */
10621:
10622: --End Bug 2947492 ( Indent )
10638: ,x_msg_count => x_msg_count
10639: ,x_msg_data => x_msg_data
10640: );
10641:
10642: IF l_return_status <> FND_API.G_RET_STS_SUCCESS then
10643: x_msg_count := FND_MSG_PUB.count_msg;
10644: If x_msg_count = 1 then
10645: pa_interface_utils_pub.get_messages
10646: (p_encoded => FND_API.G_TRUE,
10642: IF l_return_status <> FND_API.G_RET_STS_SUCCESS then
10643: x_msg_count := FND_MSG_PUB.count_msg;
10644: If x_msg_count = 1 then
10645: pa_interface_utils_pub.get_messages
10646: (p_encoded => FND_API.G_TRUE,
10647: p_msg_index => 1,
10648: p_msg_count => l_msg_count,
10649: p_msg_data => l_msg_data,
10650: p_data => l_data,
10650: p_data => l_data,
10651: p_msg_index_out => l_msg_index_out);
10652: x_msg_data := l_data;
10653: End If;
10654: raise FND_API.G_EXC_ERROR;
10655: End If;
10656: End If;
10657: -- End of FP_M changes
10658:
10659: l_tasks_ver_ids.extend;
10660: l_tasks_ver_ids(l_tasks_ver_ids.count) := p_task_version_id;
10661:
10662: PA_STRUCT_TASK_ROLLUP_PUB.Tasks_Rollup(
10663: p_commit => FND_API.G_FALSE,
10664: p_element_versions => l_tasks_ver_ids,
10665: x_return_status => l_return_status,
10666: x_msg_count => l_msg_count,
10667: x_msg_data => l_msg_data);
10665: x_return_status => l_return_status,
10666: x_msg_count => l_msg_count,
10667: x_msg_data => l_msg_data);
10668:
10669: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
10670: x_msg_count := FND_MSG_PUB.count_msg;
10671: if x_msg_count = 1 then
10672: pa_interface_utils_pub.get_messages
10673: (p_encoded => FND_API.G_TRUE,
10669: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
10670: x_msg_count := FND_MSG_PUB.count_msg;
10671: if x_msg_count = 1 then
10672: pa_interface_utils_pub.get_messages
10673: (p_encoded => FND_API.G_TRUE,
10674: p_msg_index => 1,
10675: p_msg_count => l_msg_count,
10676: p_msg_data => l_msg_data,
10677: p_data => l_data,
10677: p_data => l_data,
10678: p_msg_index_out => l_msg_index_out);
10679: x_msg_data := l_data;
10680: end if;
10681: raise FND_API.G_EXC_ERROR;
10682: end if;
10683:
10684: --hsiu added for task status
10685: --if versioning is off, rollup.
10691: ,x_msg_count => l_msg_count
10692: ,x_msg_data => l_msg_data
10693: );
10694:
10695: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
10696: x_msg_count := FND_MSG_PUB.count_msg;
10697: if x_msg_count = 1 then
10698: pa_interface_utils_pub.get_messages
10699: (p_encoded => FND_API.G_TRUE,
10695: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
10696: x_msg_count := FND_MSG_PUB.count_msg;
10697: if x_msg_count = 1 then
10698: pa_interface_utils_pub.get_messages
10699: (p_encoded => FND_API.G_TRUE,
10700: p_msg_index => 1,
10701: p_msg_count => l_msg_count,
10702: p_msg_data => l_msg_data,
10703: p_data => l_data,
10703: p_data => l_data,
10704: p_msg_index_out => l_msg_index_out);
10705: x_msg_data := l_data;
10706: end if;
10707: raise FND_API.G_EXC_ERROR;
10708: end if;
10709: END IF;
10710:
10711: --end task status changes
10760: ,x_return_status => l_return_status
10761: ,x_msg_count => l_msg_count
10762: ,x_msg_data => l_msg_data);
10763:
10764: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
10765: x_msg_count := FND_MSG_PUB.count_msg;
10766: if x_msg_count = 1 then
10767: pa_interface_utils_pub.get_messages
10768: (p_encoded => FND_API.G_TRUE,
10764: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
10765: x_msg_count := FND_MSG_PUB.count_msg;
10766: if x_msg_count = 1 then
10767: pa_interface_utils_pub.get_messages
10768: (p_encoded => FND_API.G_TRUE,
10769: p_msg_index => 1,
10770: p_msg_count => l_msg_count,
10771: p_msg_data => l_msg_data,
10772: p_data => l_data,
10772: p_data => l_data,
10773: p_msg_index_out => l_msg_index_out);
10774: x_msg_data := l_data;
10775: end if;
10776: raise FND_API.G_EXC_ERROR;
10777: end if;
10778: END IF;
10779: --3035902: end process update flag changes
10780:
10792: ,x_return_status => l_return_status
10793: ,x_msg_count => l_msg_count
10794: ,x_msg_data => l_msg_data );
10795:
10796: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
10797: x_msg_count := FND_MSG_PUB.count_msg;
10798: if x_msg_count = 1 then
10799: pa_interface_utils_pub.get_messages
10800: (p_encoded => FND_API.G_TRUE,
10796: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
10797: x_msg_count := FND_MSG_PUB.count_msg;
10798: if x_msg_count = 1 then
10799: pa_interface_utils_pub.get_messages
10800: (p_encoded => FND_API.G_TRUE,
10801: p_msg_index => 1,
10802: p_msg_count => l_msg_count,
10803: p_msg_data => l_msg_data,
10804: p_data => l_data,
10804: p_data => l_data,
10805: p_msg_index_out => l_msg_index_out);
10806: x_msg_data := l_data;
10807: end if;
10808: raise FND_API.G_EXC_ERROR;
10809: end if;
10810: END IF;
10811: END IF;
10812:
10859: WHEN OTHERS THEN
10860: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
10861: p_procedure_name => 'INDENT_TASK_VERSION_BULK',
10862: p_error_text => SUBSTRB('pa_fp_planning_transaction_pub.delete_planning_transactions:'||SQLERRM,1,240));
10863: RAISE FND_API.G_EXC_ERROR;
10864: END;
10865:
10866: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
10867: x_msg_count := FND_MSG_PUB.count_msg;
10862: p_error_text => SUBSTRB('pa_fp_planning_transaction_pub.delete_planning_transactions:'||SQLERRM,1,240));
10863: RAISE FND_API.G_EXC_ERROR;
10864: END;
10865:
10866: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
10867: x_msg_count := FND_MSG_PUB.count_msg;
10868: if x_msg_count = 1 then
10869: pa_interface_utils_pub.get_messages
10870: (p_encoded => FND_API.G_TRUE,
10866: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
10867: x_msg_count := FND_MSG_PUB.count_msg;
10868: if x_msg_count = 1 then
10869: pa_interface_utils_pub.get_messages
10870: (p_encoded => FND_API.G_TRUE,
10871: p_msg_index => 1,
10872: p_msg_count => l_msg_count,
10873: p_msg_data => l_msg_data,
10874: p_data => l_data,
10874: p_data => l_data,
10875: p_msg_index_out => l_msg_index_out);
10876: x_msg_data := l_data;
10877: end if;
10878: raise FND_API.G_EXC_ERROR;
10879: end if;
10880: END IF; --<
10881: END IF; --<
10882:
10883: --bug 4149392
10884: PA_TASK_PUB1.G_CALL_PJI_ROLLUP := NULL;
10885: --end bug 4149392
10886:
10887: x_return_status := FND_API.G_RET_STS_SUCCESS;
10888:
10889: IF (p_commit = FND_API.G_TRUE) THEN
10890: COMMIT;
10891: END IF;
10885: --end bug 4149392
10886:
10887: x_return_status := FND_API.G_RET_STS_SUCCESS;
10888:
10889: IF (p_commit = FND_API.G_TRUE) THEN
10890: COMMIT;
10891: END IF;
10892:
10893: IF (p_debug_mode = 'Y') THEN
10894: pa_debug.debug('PA_TASK_PUB1.INDENT_TASK_VERSION_BULK END');
10895: END IF;
10896:
10897: EXCEPTION
10898: when FND_API.G_EXC_ERROR then
10899: if p_commit = FND_API.G_TRUE then
10900: rollback to indent_task_version_bulk;
10901: end if;
10902: x_return_status := FND_API.G_RET_STS_ERROR;
10895: END IF;
10896:
10897: EXCEPTION
10898: when FND_API.G_EXC_ERROR then
10899: if p_commit = FND_API.G_TRUE then
10900: rollback to indent_task_version_bulk;
10901: end if;
10902: x_return_status := FND_API.G_RET_STS_ERROR;
10903: when FND_API.G_EXC_UNEXPECTED_ERROR then
10898: when FND_API.G_EXC_ERROR then
10899: if p_commit = FND_API.G_TRUE then
10900: rollback to indent_task_version_bulk;
10901: end if;
10902: x_return_status := FND_API.G_RET_STS_ERROR;
10903: when FND_API.G_EXC_UNEXPECTED_ERROR then
10904: if p_commit = FND_API.G_TRUE then
10905: rollback to indent_task_version_bulk;
10906: end if;
10899: if p_commit = FND_API.G_TRUE then
10900: rollback to indent_task_version_bulk;
10901: end if;
10902: x_return_status := FND_API.G_RET_STS_ERROR;
10903: when FND_API.G_EXC_UNEXPECTED_ERROR then
10904: if p_commit = FND_API.G_TRUE then
10905: rollback to indent_task_version_bulk;
10906: end if;
10907: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
10900: rollback to indent_task_version_bulk;
10901: end if;
10902: x_return_status := FND_API.G_RET_STS_ERROR;
10903: when FND_API.G_EXC_UNEXPECTED_ERROR then
10904: if p_commit = FND_API.G_TRUE then
10905: rollback to indent_task_version_bulk;
10906: end if;
10907: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
10908: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
10903: when FND_API.G_EXC_UNEXPECTED_ERROR then
10904: if p_commit = FND_API.G_TRUE then
10905: rollback to indent_task_version_bulk;
10906: end if;
10907: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
10908: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
10909: p_procedure_name => 'INDENT_TASK_VERSION_BULK',
10910: p_error_text => SUBSTRB(SQLERRM,1,240));
10911: when OTHERS then
10908: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
10909: p_procedure_name => 'INDENT_TASK_VERSION_BULK',
10910: p_error_text => SUBSTRB(SQLERRM,1,240));
10911: when OTHERS then
10912: if p_commit = FND_API.G_TRUE then
10913: rollback to indent_task_version_bulk;
10914: end if;
10915: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
10916: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
10911: when OTHERS then
10912: if p_commit = FND_API.G_TRUE then
10913: rollback to indent_task_version_bulk;
10914: end if;
10915: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
10916: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
10917: p_procedure_name => 'INDENT_TASK_VERSION_BULK',
10918: p_error_text => SUBSTRB(SQLERRM,1,240));
10919: raise;
10923: -- Amit : Following procedure added for Bug 2838700
10924:
10925: PROCEDURE OUTDENT_TASK_VERSION_BULK (
10926: p_api_version IN NUMBER :=1.0,
10927: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
10928: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
10929: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
10930: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
10931: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
10924:
10925: PROCEDURE OUTDENT_TASK_VERSION_BULK (
10926: p_api_version IN NUMBER :=1.0,
10927: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
10928: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
10929: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
10930: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
10931: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
10932: p_debug_mode IN VARCHAR2 :='N',
10925: PROCEDURE OUTDENT_TASK_VERSION_BULK (
10926: p_api_version IN NUMBER :=1.0,
10927: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
10928: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
10929: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
10930: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
10931: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
10932: p_debug_mode IN VARCHAR2 :='N',
10933: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
10926: p_api_version IN NUMBER :=1.0,
10927: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
10928: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
10929: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
10930: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
10931: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
10932: p_debug_mode IN VARCHAR2 :='N',
10933: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
10934: p_structure_version_id IN NUMBER := PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
11277: IF (p_debug_mode = 'Y') THEN
11278: pa_debug.debug('PA_TASK_PUB1.OUTDENT_TASK_VERSION_BULK begin');
11279: END IF;
11280:
11281: IF (p_commit = FND_API.G_TRUE) THEN
11282: savepoint OUTDENT_task_version_bulk;
11283: END IF;
11284:
11285: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
11281: IF (p_commit = FND_API.G_TRUE) THEN
11282: savepoint OUTDENT_task_version_bulk;
11283: END IF;
11284:
11285: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
11286: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
11287: END IF;
11288:
11289: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
11282: savepoint OUTDENT_task_version_bulk;
11283: END IF;
11284:
11285: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
11286: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
11287: END IF;
11288:
11289: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
11290: FND_MSG_PUB.initialize;
11285: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
11286: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
11287: END IF;
11288:
11289: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
11290: FND_MSG_PUB.initialize;
11291: END IF;
11292:
11293: --bug 4075697
11339: END IF;
11340: IF l_update_parent_task_allowed = 'N' THEN
11341: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
11342: p_msg_name => 'PA_PR_PM_NO_MOVE_TASK');
11343: raise FND_API.G_EXC_ERROR;
11344: END IF;
11345: END IF;
11346: END IF;
11347:
11353: p_structure_version_id,
11354: p_task_version_id)) THEN
11355: --deleting linked task. Error
11356: PA_UTILS.ADD_MESSAGE('PA', 'PA_PS_NO_OUTD_LINKED_TASK');
11357: raise FND_API.G_EXC_ERROR;
11358: END IF;
11359: END IF;
11360:
11361: --hsiu added, for dates rollup
11389:
11390: IF src_wbs_level = 1 then
11391: PA_UTILS.ADD_MESSAGE( p_app_short_name => 'PA'
11392: ,p_msg_name => 'PA_PS_CANNOT_OUTDENT');
11393: raise FND_API.G_EXC_ERROR;
11394: END IF;
11395:
11396: -- Get Refernce Task Information
11397:
11419:
11420: IF src_wbs_level < ref_wbs_level then
11421: PA_UTILS.ADD_MESSAGE( p_app_short_name => 'PA'
11422: ,p_msg_name => 'PA_PS_CANNOT_OUTDENT');
11423: raise FND_API.G_EXC_ERROR;
11424: END IF;
11425:
11426: -- While Outdenting always the source task will become peer of reference task
11427: l_peer_or_sub := 'PEER';
11452: END IF;
11453:
11454: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
11455: p_msg_name => 'PA_PS_TASK_HAS_SUB_PROJ');
11456: raise FND_API.G_EXC_ERROR;
11457:
11458: end if;
11459:
11460: --Check if ok to OUTDENT this task
11466:
11467: IF (l_return_status <> 'Y') THEN
11468: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
11469: p_msg_name => l_error_msg_code);
11470: raise FND_API.G_EXC_ERROR;
11471: END IF;
11472:
11473: --check if ok to create
11474: OPEN get_parent_version_id(ref_elem_ver_id);
11488:
11489: IF (NVL(l_new_par_ver_id, -99) <> NVL (l_old_par_ver_id, -99)) THEN
11490: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
11491: p_msg_name => 'PA_CANT_CHANGE_PARENT');
11492: raise FND_API.G_EXC_ERROR;
11493: END IF;
11494: END IF;
11495: --end bug 3069306
11496:
11502:
11503: IF (l_return_status <> 'Y') THEN
11504: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
11505: p_msg_name => l_error_msg_code);
11506: raise FND_API.G_EXC_ERROR;
11507: END IF;
11508:
11509: --Bug 16013002
11510: -- Check if the task which is going to outdent is financial or not
11521: , x_err_stack => l_err_stack);
11522: IF (l_err_code <> 0) THEN
11523: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
11524: p_msg_name => substrb(l_err_stage,1,30));
11525: raise FND_API.G_EXC_ERROR;
11526: END IF;
11527: END IF;
11528: CLOSE cur_child_tasks_exists;
11529: END IF;
11545: -- IF (x_return_status <> 'Y') THEN --Bug 3831786 Commented
11546: IF (x_return_status <> 'S') THEN --Bug 3831786 Added
11547: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
11548: p_msg_name => l_error_msg_code);
11549: raise FND_API.G_EXC_ERROR;
11550: End If;
11551: End If;
11552:
11553: --check the task is a lowest task bug 3301192
11559:
11560: The processing done by the followig two calls is made now as plsql table bulk processing
11561:
11562: PA_TASK_PUB1.Update_Task_Version
11563: ( p_validate_only => FND_API.G_FALSE,
11564: p_ref_task_version_id => l_ref_task_version_id,
11565: p_peer_or_sub => 'PEER',
11566: p_task_version_id => p_task_version_id,
11567: p_record_version_number => p_record_version_number,
11644: IF (l_element_version_id_tab(j) <> p_task_version_id) Then
11645: IF PA_PROJ_ELEMENTS_UTILS.check_deliv_in_hierarchy(p_task_version_id, l_element_version_id_tab(j)) = 'Y' THEN
11646: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
11647: p_msg_name => 'PA_PS_CHK_DELIV_UPDATE');
11648: raise FND_API.G_EXC_ERROR;
11649: END IF;
11650: END IF;
11651: END LOOP;
11652: --end bug 3475920*/
11948: ,x_msg_data => l_msg_data
11949: );
11950:
11951:
11952: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
11953: x_msg_count := FND_MSG_PUB.count_msg;
11954: IF x_msg_count = 1 then
11955: pa_interface_utils_pub.get_messages
11956: (p_encoded => FND_API.G_TRUE,
11952: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
11953: x_msg_count := FND_MSG_PUB.count_msg;
11954: IF x_msg_count = 1 then
11955: pa_interface_utils_pub.get_messages
11956: (p_encoded => FND_API.G_TRUE,
11957: p_msg_index => 1,
11958: p_msg_count => l_msg_count,
11959: p_msg_data => l_msg_data,
11960: p_data => l_data,
11960: p_data => l_data,
11961: p_msg_index_out => l_msg_index_out);
11962: x_msg_data := l_data;
11963: END IF;
11964: raise FND_API.G_EXC_ERROR;
11965: END IF;
11966:
11967: -- I don't think the following code is needed. This case is impossible in case of OUTDENT
11968: IF l_update_new_child_rels = 'Y' -- AND p_action IN( 'OUTDENT' )
11980: --bug 4099488
11981: IF PA_RELATIONSHIP_UTILS.check_dependencies_valid(p_task_version_id, cur_new_child_rec.object_id_to1) = 'N' THEN
11982: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
11983: p_msg_name => 'PA_INV_MOV_TSK_DEP_ERR');
11984: raise FND_API.G_EXC_ERROR;
11985: END IF;
11986: --end bug 4099488
11987:
11988: PA_RELATIONSHIP_PVT.Update_Relationship
12012: ,x_msg_count => x_msg_count
12013: ,x_msg_data => x_msg_data
12014: );
12015:
12016: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
12017: x_msg_count := FND_MSG_PUB.count_msg;
12018: IF x_msg_count = 1 then
12019: pa_interface_utils_pub.get_messages
12020: (p_encoded => FND_API.G_TRUE,
12016: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
12017: x_msg_count := FND_MSG_PUB.count_msg;
12018: IF x_msg_count = 1 then
12019: pa_interface_utils_pub.get_messages
12020: (p_encoded => FND_API.G_TRUE,
12021: p_msg_index => 1,
12022: p_msg_count => l_msg_count,
12023: p_msg_data => l_msg_data,
12024: p_data => l_data,
12024: p_data => l_data,
12025: p_msg_index_out => l_msg_index_out);
12026: x_msg_data := l_data;
12027: END IF;
12028: raise FND_API.G_EXC_ERROR;
12029: END IF;
12030:
12031: END LOOP;
12032: END IF;
12041:
12042: x_msg_count := FND_MSG_PUB.count_msg;
12043: IF x_msg_count = 1 then
12044: pa_interface_utils_pub.get_messages
12045: (p_encoded => FND_API.G_TRUE,
12046: p_msg_index => 1,
12047: p_msg_count => l_msg_count,
12048: p_msg_data => l_msg_data,
12049: p_data => l_data,
12061:
12062: x_msg_count := FND_MSG_PUB.count_msg;
12063: IF x_msg_count = 1 then
12064: pa_interface_utils_pub.get_messages
12065: (p_encoded => FND_API.G_TRUE,
12066: p_msg_index => 1,
12067: p_msg_count => l_msg_count,
12068: p_msg_data => l_msg_data,
12069: p_data => l_data,
12161: ,x_msg_count => l_msg_count
12162: ,x_msg_data => l_msg_data
12163: );
12164:
12165: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
12166: x_msg_count := FND_MSG_PUB.count_msg;
12167: IF x_msg_count = 1 then
12168: pa_interface_utils_pub.get_messages
12169: (p_encoded => FND_API.G_TRUE,
12165: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
12166: x_msg_count := FND_MSG_PUB.count_msg;
12167: IF x_msg_count = 1 then
12168: pa_interface_utils_pub.get_messages
12169: (p_encoded => FND_API.G_TRUE,
12170: p_msg_index => 1,
12171: p_msg_count => l_msg_count,
12172: p_msg_data => l_msg_data,
12173: p_data => l_data,
12173: p_data => l_data,
12174: p_msg_index_out => l_msg_index_out);
12175: x_msg_data := l_data;
12176: END IF;
12177: raise FND_API.G_EXC_ERROR;
12178: END IF;
12179:
12180: END LOOP;
12181: --End Bug 2947492 ( outdent )
12192: ,x_return_status => l_return_status
12193: ,x_msg_count => l_msg_count
12194: ,x_msg_data => l_msg_data );
12195:
12196: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
12197: x_msg_count := FND_MSG_PUB.count_msg;
12198: IF x_msg_count = 1 then
12199: pa_interface_utils_pub.get_messages
12200: (p_encoded => FND_API.G_TRUE,
12196: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
12197: x_msg_count := FND_MSG_PUB.count_msg;
12198: IF x_msg_count = 1 then
12199: pa_interface_utils_pub.get_messages
12200: (p_encoded => FND_API.G_TRUE,
12201: p_msg_index => 1,
12202: p_msg_count => l_msg_count,
12203: p_msg_data => l_msg_data,
12204: p_data => l_data,
12204: p_data => l_data,
12205: p_msg_index_out => l_msg_index_out);
12206: x_msg_data := l_data;
12207: END IF;
12208: raise FND_API.G_EXC_ERROR;
12209: END IF;
12210:
12211: --Bug 2947492 (outdent )
12212: --
12220: IF NVL( l_top_task_id, -99 ) <> NVL( l_old_top_task_id, -99 )
12221: THEN
12222: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
12223: p_msg_name => 'PA_CANT_CHANGE_PARENT');
12224: raise FND_API.G_EXC_ERROR;
12225: END IF;
12226: --End bug 2967204
12227:
12228: /*
12238: ,x_msg_count => l_msg_count
12239: ,x_msg_data => l_msg_data
12240: );
12241:
12242: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
12243: x_msg_count := FND_MSG_PUB.count_msg;
12244: IF x_msg_count = 1 then
12245: pa_interface_utils_pub.get_messages
12246: (p_encoded => FND_API.G_TRUE,
12242: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
12243: x_msg_count := FND_MSG_PUB.count_msg;
12244: IF x_msg_count = 1 then
12245: pa_interface_utils_pub.get_messages
12246: (p_encoded => FND_API.G_TRUE,
12247: p_msg_index => 1,
12248: p_msg_count => l_msg_count,
12249: p_msg_data => l_msg_data,
12250: p_data => l_data,
12250: p_data => l_data,
12251: p_msg_index_out => l_msg_index_out);
12252: x_msg_data := l_data;
12253: END IF;
12254: raise FND_API.G_EXC_ERROR;
12255: END IF;
12256: */ --check venkatesh mail dated 22 jan 04
12257:
12258: /* Commenting out the call to MAINTAIN_PLANNABLE_TASKS for bug 3010538
12272: , x_msg_data => l_msg_data
12273: , x_msg_count => l_msg_count
12274: );
12275:
12276: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
12277: x_msg_count := FND_MSG_PUB.count_msg;
12278: IF x_msg_count = 1 then
12279: pa_interface_utils_pub.get_messages
12280: (p_encoded => FND_API.G_TRUE,
12276: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
12277: x_msg_count := FND_MSG_PUB.count_msg;
12278: IF x_msg_count = 1 then
12279: pa_interface_utils_pub.get_messages
12280: (p_encoded => FND_API.G_TRUE,
12281: p_msg_index => 1,
12282: p_msg_count => l_msg_count,
12283: p_msg_data => l_msg_data,
12284: p_data => l_data,
12284: p_data => l_data,
12285: p_msg_index_out => l_msg_index_out);
12286: x_msg_data := l_data;
12287: END IF;
12288: raise FND_API.G_EXC_ERROR;
12289: END IF;
12290: bug 3010538 */
12291:
12292: --End Bug 2947492 (outdent )
12309: ,x_msg_count => x_msg_count
12310: ,x_msg_data => x_msg_data
12311: );
12312:
12313: IF l_return_status <> FND_API.G_RET_STS_SUCCESS then
12314: x_msg_count := FND_MSG_PUB.count_msg;
12315: If x_msg_count = 1 then
12316: pa_interface_utils_pub.get_messages
12317: (p_encoded => FND_API.G_TRUE,
12313: IF l_return_status <> FND_API.G_RET_STS_SUCCESS then
12314: x_msg_count := FND_MSG_PUB.count_msg;
12315: If x_msg_count = 1 then
12316: pa_interface_utils_pub.get_messages
12317: (p_encoded => FND_API.G_TRUE,
12318: p_msg_index => 1,
12319: p_msg_count => l_msg_count,
12320: p_msg_data => l_msg_data,
12321: p_data => l_data,
12321: p_data => l_data,
12322: p_msg_index_out => l_msg_index_out);
12323: x_msg_data := l_data;
12324: End If;
12325: raise FND_API.G_EXC_ERROR;
12326: End If;
12327: End If;
12328: -- End of FP_M changes
12329:
12335: l_rollup_task_id := p_task_version_id;
12336: END IF;
12337:
12338: PA_STRUCT_TASK_ROLLUP_PUB.Tasks_Rollup(
12339: p_commit => FND_API.G_FALSE,
12340: p_element_versions => l_tasks_ver_ids,
12341: x_return_status => l_return_status,
12342: x_msg_count => l_msg_count,
12343: x_msg_data => l_msg_data);
12341: x_return_status => l_return_status,
12342: x_msg_count => l_msg_count,
12343: x_msg_data => l_msg_data);
12344:
12345: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
12346: x_msg_count := FND_MSG_PUB.count_msg;
12347: if x_msg_count = 1 then
12348: pa_interface_utils_pub.get_messages
12349: (p_encoded => FND_API.G_TRUE,
12345: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
12346: x_msg_count := FND_MSG_PUB.count_msg;
12347: if x_msg_count = 1 then
12348: pa_interface_utils_pub.get_messages
12349: (p_encoded => FND_API.G_TRUE,
12350: p_msg_index => 1,
12351: p_msg_count => l_msg_count,
12352: p_msg_data => l_msg_data,
12353: p_data => l_data,
12353: p_data => l_data,
12354: p_msg_index_out => l_msg_index_out);
12355: x_msg_data := l_data;
12356: end if;
12357: raise FND_API.G_EXC_ERROR;
12358: end if;
12359:
12360: --if versioning is off, rollup.
12361: IF ('N' = PA_WORKPLAN_ATTR_UTILS.CHECK_WP_VERSIONING_ENABLED(l_project_id)) THEN
12366: ,x_msg_count => l_msg_count
12367: ,x_msg_data => l_msg_data
12368: );
12369:
12370: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
12371: x_msg_count := FND_MSG_PUB.count_msg;
12372: if x_msg_count = 1 then
12373: pa_interface_utils_pub.get_messages
12374: (p_encoded => FND_API.G_TRUE,
12370: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
12371: x_msg_count := FND_MSG_PUB.count_msg;
12372: if x_msg_count = 1 then
12373: pa_interface_utils_pub.get_messages
12374: (p_encoded => FND_API.G_TRUE,
12375: p_msg_index => 1,
12376: p_msg_count => l_msg_count,
12377: p_msg_data => l_msg_data,
12378: p_data => l_data,
12378: p_data => l_data,
12379: p_msg_index_out => l_msg_index_out);
12380: x_msg_data := l_data;
12381: end if;
12382: raise FND_API.G_EXC_ERROR;
12383: end if;
12384: END IF;
12385:
12386: END IF;
12432: ,x_return_status => l_return_status
12433: ,x_msg_count => l_msg_count
12434: ,x_msg_data => l_msg_data);
12435:
12436: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
12437: x_msg_count := FND_MSG_PUB.count_msg;
12438: if x_msg_count = 1 then
12439: pa_interface_utils_pub.get_messages
12440: (p_encoded => FND_API.G_TRUE,
12436: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
12437: x_msg_count := FND_MSG_PUB.count_msg;
12438: if x_msg_count = 1 then
12439: pa_interface_utils_pub.get_messages
12440: (p_encoded => FND_API.G_TRUE,
12441: p_msg_index => 1,
12442: p_msg_count => l_msg_count,
12443: p_msg_data => l_msg_data,
12444: p_data => l_data,
12444: p_data => l_data,
12445: p_msg_index_out => l_msg_index_out);
12446: x_msg_data := l_data;
12447: end if;
12448: raise FND_API.G_EXC_ERROR;
12449: end if;
12450: --end if;
12451: --3035902: end process update flag changes
12452:
12465: ,x_return_status => l_return_status
12466: ,x_msg_count => l_msg_count
12467: ,x_msg_data => l_msg_data );
12468:
12469: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
12470: x_msg_count := FND_MSG_PUB.count_msg;
12471: if x_msg_count = 1 then
12472: pa_interface_utils_pub.get_messages
12473: (p_encoded => FND_API.G_TRUE,
12469: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
12470: x_msg_count := FND_MSG_PUB.count_msg;
12471: if x_msg_count = 1 then
12472: pa_interface_utils_pub.get_messages
12473: (p_encoded => FND_API.G_TRUE,
12474: p_msg_index => 1,
12475: p_msg_count => l_msg_count,
12476: p_msg_data => l_msg_data,
12477: p_data => l_data,
12477: p_data => l_data,
12478: p_msg_index_out => l_msg_index_out);
12479: x_msg_data := l_data;
12480: end if;
12481: raise FND_API.G_EXC_ERROR;
12482: end if;
12483: END IF;
12484: END IF;
12485:
12532: WHEN OTHERS then
12533: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
12534: p_procedure_name => 'OUTDENT_TASK_VERSION_BULK',
12535: p_error_text => SUBSTRB('pa_fp_planning_transaction_pub.delete_planning_transactions:'||SQLERRM,1,240));
12536: RAISE FND_API.G_EXC_ERROR;
12537: END;
12538: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
12539: x_msg_count := FND_MSG_PUB.count_msg;
12540: if x_msg_count = 1 then
12534: p_procedure_name => 'OUTDENT_TASK_VERSION_BULK',
12535: p_error_text => SUBSTRB('pa_fp_planning_transaction_pub.delete_planning_transactions:'||SQLERRM,1,240));
12536: RAISE FND_API.G_EXC_ERROR;
12537: END;
12538: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
12539: x_msg_count := FND_MSG_PUB.count_msg;
12540: if x_msg_count = 1 then
12541: pa_interface_utils_pub.get_messages
12542: (p_encoded => FND_API.G_TRUE,
12538: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
12539: x_msg_count := FND_MSG_PUB.count_msg;
12540: if x_msg_count = 1 then
12541: pa_interface_utils_pub.get_messages
12542: (p_encoded => FND_API.G_TRUE,
12543: p_msg_index => 1,
12544: p_msg_count => l_msg_count,
12545: p_msg_data => l_msg_data,
12546: p_data => l_data,
12546: p_data => l_data,
12547: p_msg_index_out => l_msg_index_out);
12548: x_msg_data := l_data;
12549: end if;
12550: raise FND_API.G_EXC_ERROR;
12551: end if;
12552: END IF; --<
12553: END IF; --<
12554: --bug 3301192
12556: --bug 4149392
12557: PA_TASK_PUB1.G_CALL_PJI_ROLLUP := NULL;
12558: --end bug 4149392
12559:
12560: x_return_status := FND_API.G_RET_STS_SUCCESS;
12561:
12562: IF (p_commit = FND_API.G_TRUE) THEN
12563: COMMIT;
12564: END IF;
12558: --end bug 4149392
12559:
12560: x_return_status := FND_API.G_RET_STS_SUCCESS;
12561:
12562: IF (p_commit = FND_API.G_TRUE) THEN
12563: COMMIT;
12564: END IF;
12565:
12566: IF (p_debug_mode = 'Y') THEN
12567: pa_debug.debug('PA_TASK_PUB1.OUTDENT_TASK_VERSION_BULK END');
12568: END IF;
12569:
12570: EXCEPTION
12571: when FND_API.G_EXC_ERROR then
12572: if p_commit = FND_API.G_TRUE then
12573: rollback to OUTDENT_task_version_bulk;
12574: end if;
12575: x_return_status := FND_API.G_RET_STS_ERROR;
12568: END IF;
12569:
12570: EXCEPTION
12571: when FND_API.G_EXC_ERROR then
12572: if p_commit = FND_API.G_TRUE then
12573: rollback to OUTDENT_task_version_bulk;
12574: end if;
12575: x_return_status := FND_API.G_RET_STS_ERROR;
12576: when FND_API.G_EXC_UNEXPECTED_ERROR then
12571: when FND_API.G_EXC_ERROR then
12572: if p_commit = FND_API.G_TRUE then
12573: rollback to OUTDENT_task_version_bulk;
12574: end if;
12575: x_return_status := FND_API.G_RET_STS_ERROR;
12576: when FND_API.G_EXC_UNEXPECTED_ERROR then
12577: if p_commit = FND_API.G_TRUE then
12578: rollback to OUTDENT_task_version_bulk;
12579: end if;
12572: if p_commit = FND_API.G_TRUE then
12573: rollback to OUTDENT_task_version_bulk;
12574: end if;
12575: x_return_status := FND_API.G_RET_STS_ERROR;
12576: when FND_API.G_EXC_UNEXPECTED_ERROR then
12577: if p_commit = FND_API.G_TRUE then
12578: rollback to OUTDENT_task_version_bulk;
12579: end if;
12580: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
12573: rollback to OUTDENT_task_version_bulk;
12574: end if;
12575: x_return_status := FND_API.G_RET_STS_ERROR;
12576: when FND_API.G_EXC_UNEXPECTED_ERROR then
12577: if p_commit = FND_API.G_TRUE then
12578: rollback to OUTDENT_task_version_bulk;
12579: end if;
12580: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
12581: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
12576: when FND_API.G_EXC_UNEXPECTED_ERROR then
12577: if p_commit = FND_API.G_TRUE then
12578: rollback to OUTDENT_task_version_bulk;
12579: end if;
12580: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
12581: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
12582: p_procedure_name => 'OUTDENT_TASK_VERSION_BULK',
12583: p_error_text => SUBSTRB(SQLERRM,1,240));
12584: when OTHERS then
12581: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
12582: p_procedure_name => 'OUTDENT_TASK_VERSION_BULK',
12583: p_error_text => SUBSTRB(SQLERRM,1,240));
12584: when OTHERS then
12585: if p_commit = FND_API.G_TRUE then
12586: rollback to OUTDENT_task_version_bulk;
12587: end if;
12588: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
12589: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
12584: when OTHERS then
12585: if p_commit = FND_API.G_TRUE then
12586: rollback to OUTDENT_task_version_bulk;
12587: end if;
12588: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
12589: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
12590: p_procedure_name => 'OUTDENT_TASK_VERSION_BULK',
12591: p_error_text => SUBSTRB(SQLERRM,1,240));
12592: raise;
12690:
12691: BEGIN
12692:
12693: --hsiu: 3604086
12694: x_return_status := FND_API.G_RET_STS_SUCCESS;
12695:
12696: l_msg_count := 0;
12697: l_return_status := FND_API.G_RET_STS_SUCCESS;
12698: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N') ; -- Bug # 4605505.
12693: --hsiu: 3604086
12694: x_return_status := FND_API.G_RET_STS_SUCCESS;
12695:
12696: l_msg_count := 0;
12697: l_return_status := FND_API.G_RET_STS_SUCCESS;
12698: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N') ; -- Bug # 4605505.
12699: j := 0 ;
12700:
12701: --hsiu: commenting out due to p1 issue.
12710: pa_debug.debug('record version id is :'||p_record_version_number_tbl(i));
12711: END IF ;
12712:
12713: -- initialization is required for every loop
12714: l_return_status := FND_API.G_RET_STS_SUCCESS ;
12715: l_msg_count := 0 ;
12716: l_msg_data := null ;
12717:
12718: -- Bug 9535723
12741: ,p_structure_version_id => p_structure_version_id
12742: ,p_called_from_api => 'BULK_DELETE' -- Bug 9535723
12743: );
12744:
12745: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
12746:
12747: j := j+1 ;
12748:
12749: SELECT e.element_number
12755: WHERE v.element_version_id = p_task_version_id_tbl(i)
12756: AND e.proj_element_id = v.proj_element_id ;
12757:
12758: PA_INTERFACE_UTILS_PUB.get_messages
12759: (p_encoded => FND_API.G_FALSE, -- Get the encoded message.
12760: p_msg_index => 1, -- Get the message at index 1.
12761: p_data => l_enc_msg_data,
12762: p_msg_index_out => l_msg_index_out);
12763:
12846: );
12847:
12848: pa_task_assignment_utils.g_require_progress_rollup := 'N';
12849:
12850: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
12851: IF l_debug_mode = 'Y' THEN
12852: pa_debug.debug('Error after PA_PROJ_TASK_STRUC_PUB.PROCESS_WBS_UPDATES_WRP');
12853: END IF;
12854: RAISE FND_API.G_EXC_ERROR;
12850: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
12851: IF l_debug_mode = 'Y' THEN
12852: pa_debug.debug('Error after PA_PROJ_TASK_STRUC_PUB.PROCESS_WBS_UPDATES_WRP');
12853: END IF;
12854: RAISE FND_API.G_EXC_ERROR;
12855: END IF;
12856:
12857: END IF;
12858: END IF ; -- end of additions for bug 9535723
12862: END IF ;
12863:
12864: EXCEPTION
12865: WHEN NO_DATA_FOUND THEN
12866: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
12867: x_msg_count := 1;
12868: x_msg_data := SQLERRM;
12869: --hsiu: commenting out due to p1 issue.
12870: -- savepoint should be issued only when p_commit
12870: -- savepoint should be issued only when p_commit
12871: -- is true, which is a missing parameter
12872: -- rollback to delete_bulk;
12873: RETURN ;
12874: WHEN FND_API.G_EXC_ERROR THEN
12875: x_return_status := FND_API.G_RET_STS_ERROR;
12876: IF x_msg_count >= 1 THEN
12877: pa_interface_utils_pub.get_messages (
12878: p_encoded => FND_API.G_TRUE,
12871: -- is true, which is a missing parameter
12872: -- rollback to delete_bulk;
12873: RETURN ;
12874: WHEN FND_API.G_EXC_ERROR THEN
12875: x_return_status := FND_API.G_RET_STS_ERROR;
12876: IF x_msg_count >= 1 THEN
12877: pa_interface_utils_pub.get_messages (
12878: p_encoded => FND_API.G_TRUE,
12879: p_msg_index => 1,
12874: WHEN FND_API.G_EXC_ERROR THEN
12875: x_return_status := FND_API.G_RET_STS_ERROR;
12876: IF x_msg_count >= 1 THEN
12877: pa_interface_utils_pub.get_messages (
12878: p_encoded => FND_API.G_TRUE,
12879: p_msg_index => 1,
12880: p_msg_count => l_msg_count,
12881: p_msg_data => l_msg_data,
12882: p_data => l_enc_msg_data,
12885: x_msg_data := l_enc_msg_data;
12886: END IF;
12887:
12888: WHEN OTHERS THEN
12889: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
12890: x_msg_count := 1;
12891: x_msg_data := SQLERRM;
12892: --hsiu: commenting out due to p1 issue.
12893: -- savepoint should be issued only when p_commit
12919: --This procedure was designed specifically to fit the flow of Self_Service Task Details page
12920: --(or any page that uses TaskAssociationsVO).
12921: PROCEDURE Update_Task_Association (
12922: p_api_version IN NUMBER :=1.0,
12923: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
12924: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
12925: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
12926: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
12927: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
12920: --(or any page that uses TaskAssociationsVO).
12921: PROCEDURE Update_Task_Association (
12922: p_api_version IN NUMBER :=1.0,
12923: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
12924: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
12925: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
12926: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
12927: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
12928: p_debug_mode IN VARCHAR2 :='N',
12921: PROCEDURE Update_Task_Association (
12922: p_api_version IN NUMBER :=1.0,
12923: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
12924: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
12925: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
12926: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
12927: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
12928: p_debug_mode IN VARCHAR2 :='N',
12929: p_max_msg_count IN NUMBER :=NULL,
12922: p_api_version IN NUMBER :=1.0,
12923: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
12924: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
12925: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
12926: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
12927: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
12928: p_debug_mode IN VARCHAR2 :='N',
12929: p_max_msg_count IN NUMBER :=NULL,
12930: p_associated_project_id IN NUMBER := NULL,
12952: l_error_msg_code VARCHAR2(30);
12953:
12954: BEGIN
12955:
12956: x_return_status := FND_API.G_RET_STS_SUCCESS;
12957:
12958: IF (p_debug_mode = 'Y') THEN
12959: pa_debug.debug('PA_TASK_PUB1.UPDATE_TASK_ASSOCIATION START');
12960: END IF;
12958: IF (p_debug_mode = 'Y') THEN
12959: pa_debug.debug('PA_TASK_PUB1.UPDATE_TASK_ASSOCIATION START');
12960: END IF;
12961:
12962: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
12963: FND_MSG_PUB.initialize;
12964: END IF;
12965:
12966: IF (p_commit = FND_API.G_TRUE) THEN
12962: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
12963: FND_MSG_PUB.initialize;
12964: END IF;
12965:
12966: IF (p_commit = FND_API.G_TRUE) THEN
12967: savepoint update_task_association;
12968: END IF;
12969:
12970: l_type_to := 'PA_PROJECTS';
12977:
12978: -- when creating a new relationship check both ids and object types
12979: IF p_relationship_id is NULL THEN
12980: IF p_task_id is NULL or l_id_to is NULL THEN
12981: x_return_status := FND_API.G_RET_STS_ERROR;
12982: l_error_msg_code:= 'PA_PS_TASK_NUMBER_NULL';
12983: ELSE
12984: IF p_task_id = l_id_to and l_type_to = 'PA_TASKS' then
12985: x_return_status := FND_API.G_RET_STS_ERROR;
12981: x_return_status := FND_API.G_RET_STS_ERROR;
12982: l_error_msg_code:= 'PA_PS_TASK_NUMBER_NULL';
12983: ELSE
12984: IF p_task_id = l_id_to and l_type_to = 'PA_TASKS' then
12985: x_return_status := FND_API.G_RET_STS_ERROR;
12986: l_error_msg_code:= 'PA_TASK_ID_INVALID';
12987: END IF;
12988: END IF;
12989: END IF;
12990:
12991: -- when updating an existing relationship check both ids and object types
12992: IF p_relationship_id is not null and l_id_to is not null THEN
12993: IF p_task_id = l_id_to and l_type_to = 'PA_TASKS' then
12994: x_return_status := FND_API.G_RET_STS_ERROR;
12995: l_error_msg_code:= 'PA_TASK_ID_INVALID';
12996: END IF;
12997: END IF;
12998:
12995: l_error_msg_code:= 'PA_TASK_ID_INVALID';
12996: END IF;
12997: END IF;
12998:
12999: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
13000: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
13001: p_msg_name => l_error_msg_code);
13002: END IF;
13003:
13001: p_msg_name => l_error_msg_code);
13002: END IF;
13003:
13004: -- Create a new association row
13005: IF p_relationship_id is NULL and x_return_status = FND_API.G_RET_STS_SUCCESS THEN
13006: PA_OBJECT_RELATIONSHIPS_PKG.INSERT_ROW(
13007: p_user_id => FND_GLOBAL.USER_ID
13008: ,p_object_type_from => 'PA_TASKS'
13009: ,p_object_id_from1 => p_task_id
13045: Delete_Association(p_relationship_id,p_record_version_number, x_return_status);
13046: END IF;
13047:
13048:
13049: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
13050: x_msg_count := FND_MSG_PUB.count_msg;
13051: IF x_msg_count = 1 then
13052: pa_interface_utils_pub.get_messages
13053: (p_encoded => FND_API.G_TRUE,
13049: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
13050: x_msg_count := FND_MSG_PUB.count_msg;
13051: IF x_msg_count = 1 then
13052: pa_interface_utils_pub.get_messages
13053: (p_encoded => FND_API.G_TRUE,
13054: p_msg_index => 1,
13055: p_msg_count => x_msg_count,
13056: p_msg_data => x_msg_data,
13057: p_data => l_data,
13057: p_data => l_data,
13058: p_msg_index_out => l_msg_index_out);
13059: x_msg_data := l_data;
13060: END IF;
13061: raise FND_API.G_EXC_ERROR;
13062: ELSE
13063: IF (p_commit = FND_API.G_TRUE) THEN
13064: COMMIT;
13065: END IF;
13059: x_msg_data := l_data;
13060: END IF;
13061: raise FND_API.G_EXC_ERROR;
13062: ELSE
13063: IF (p_commit = FND_API.G_TRUE) THEN
13064: COMMIT;
13065: END IF;
13066: END IF;
13067:
13070: END IF;
13071:
13072:
13073: EXCEPTION
13074: WHEN FND_API.G_EXC_ERROR THEN
13075: IF (p_commit = FND_API.G_TRUE) THEN
13076: ROLLBACK to update_task_association;
13077: END IF;
13078: x_msg_count := FND_MSG_PUB.count_msg;
13071:
13072:
13073: EXCEPTION
13074: WHEN FND_API.G_EXC_ERROR THEN
13075: IF (p_commit = FND_API.G_TRUE) THEN
13076: ROLLBACK to update_task_association;
13077: END IF;
13078: x_msg_count := FND_MSG_PUB.count_msg;
13079: x_return_status := FND_API.G_RET_STS_ERROR;
13075: IF (p_commit = FND_API.G_TRUE) THEN
13076: ROLLBACK to update_task_association;
13077: END IF;
13078: x_msg_count := FND_MSG_PUB.count_msg;
13079: x_return_status := FND_API.G_RET_STS_ERROR;
13080: WHEN OTHERS THEN
13081: IF (p_commit = FND_API.G_TRUE) THEN
13082: ROLLBACK to update_task_association;
13083: END IF;
13077: END IF;
13078: x_msg_count := FND_MSG_PUB.count_msg;
13079: x_return_status := FND_API.G_RET_STS_ERROR;
13080: WHEN OTHERS THEN
13081: IF (p_commit = FND_API.G_TRUE) THEN
13082: ROLLBACK to update_task_association;
13083: END IF;
13084: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
13085: x_msg_count := FND_MSG_PUB.count_msg;
13080: WHEN OTHERS THEN
13081: IF (p_commit = FND_API.G_TRUE) THEN
13082: ROLLBACK to update_task_association;
13083: END IF;
13084: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
13085: x_msg_count := FND_MSG_PUB.count_msg;
13086: --put message
13087: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
13088: p_procedure_name => 'update_task_association',
13097: --if p_relationship_id is NOT NULL then only this ONE relationship is deleted
13098: --if p_relationship_id is NULL, then ALL associations are deleted.
13099: PROCEDURE Delete_Task_Associations(
13100: p_api_version IN NUMBER :=1.0,
13101: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
13102: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
13103: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
13104: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
13105: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
13098: --if p_relationship_id is NULL, then ALL associations are deleted.
13099: PROCEDURE Delete_Task_Associations(
13100: p_api_version IN NUMBER :=1.0,
13101: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
13102: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
13103: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
13104: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
13105: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
13106: p_debug_mode IN VARCHAR2 :='N',
13099: PROCEDURE Delete_Task_Associations(
13100: p_api_version IN NUMBER :=1.0,
13101: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
13102: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
13103: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
13104: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
13105: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
13106: p_debug_mode IN VARCHAR2 :='N',
13107: p_max_msg_count IN NUMBER :=NULL,
13100: p_api_version IN NUMBER :=1.0,
13101: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
13102: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
13103: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
13104: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
13105: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
13106: p_debug_mode IN VARCHAR2 :='N',
13107: p_max_msg_count IN NUMBER :=NULL,
13108: p_relationship_type IN VARCHAR2 :='A',
13125: l_data VARCHAR2(250);
13126: l_msg_index_out NUMBER;
13127:
13128: BEGIN
13129: x_return_status := FND_API.G_RET_STS_SUCCESS;
13130:
13131: IF (p_debug_mode = 'Y') THEN
13132: pa_debug.debug('PA_TASK_PUB1.DELETE_TASK_ASSOCIATION START');
13133: END IF;
13131: IF (p_debug_mode = 'Y') THEN
13132: pa_debug.debug('PA_TASK_PUB1.DELETE_TASK_ASSOCIATION START');
13133: END IF;
13134:
13135: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
13136: FND_MSG_PUB.initialize;
13137: END IF;
13138:
13139: IF (p_commit = FND_API.G_TRUE) THEN
13135: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
13136: FND_MSG_PUB.initialize;
13137: END IF;
13138:
13139: IF (p_commit = FND_API.G_TRUE) THEN
13140: savepoint delete_task_association;
13141: END IF;
13142:
13143: --Delete just the requested relationship row
13146: ELSE
13147: IF p_task_id is not null THEN
13148: FOR task_associations_rec IN task_associations(p_task_id ) LOOP
13149: Delete_Association(task_associations_rec.object_relationship_id,null, x_return_status);
13150: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
13151: EXIT;
13152: END IF;
13153: END LOOP;
13154: END IF;
13153: END LOOP;
13154: END IF;
13155: END IF;
13156:
13157: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
13158: x_msg_count := FND_MSG_PUB.count_msg;
13159: IF x_msg_count = 1 then
13160: pa_interface_utils_pub.get_messages
13161: (p_encoded => FND_API.G_TRUE,
13157: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
13158: x_msg_count := FND_MSG_PUB.count_msg;
13159: IF x_msg_count = 1 then
13160: pa_interface_utils_pub.get_messages
13161: (p_encoded => FND_API.G_TRUE,
13162: p_msg_index => 1,
13163: p_msg_count => x_msg_count,
13164: p_msg_data => x_msg_data,
13165: p_data => l_data,
13165: p_data => l_data,
13166: p_msg_index_out => l_msg_index_out);
13167: x_msg_data := l_data;
13168: END IF;
13169: raise FND_API.G_EXC_ERROR;
13170: ELSE
13171: IF (p_commit = FND_API.G_TRUE) THEN
13172: COMMIT;
13173: END IF;
13167: x_msg_data := l_data;
13168: END IF;
13169: raise FND_API.G_EXC_ERROR;
13170: ELSE
13171: IF (p_commit = FND_API.G_TRUE) THEN
13172: COMMIT;
13173: END IF;
13174: END IF;
13175:
13179: END IF;
13180:
13181:
13182: EXCEPTION
13183: WHEN FND_API.G_EXC_ERROR THEN
13184: IF (p_commit = FND_API.G_TRUE) THEN
13185: ROLLBACK to delete_task_association;
13186: END IF;
13187: x_msg_count := FND_MSG_PUB.count_msg;
13180:
13181:
13182: EXCEPTION
13183: WHEN FND_API.G_EXC_ERROR THEN
13184: IF (p_commit = FND_API.G_TRUE) THEN
13185: ROLLBACK to delete_task_association;
13186: END IF;
13187: x_msg_count := FND_MSG_PUB.count_msg;
13188: x_return_status := FND_API.G_RET_STS_ERROR;
13184: IF (p_commit = FND_API.G_TRUE) THEN
13185: ROLLBACK to delete_task_association;
13186: END IF;
13187: x_msg_count := FND_MSG_PUB.count_msg;
13188: x_return_status := FND_API.G_RET_STS_ERROR;
13189: WHEN OTHERS THEN
13190: IF (p_commit = FND_API.G_TRUE) THEN
13191: ROLLBACK to delete_task_association;
13192: END IF;
13186: END IF;
13187: x_msg_count := FND_MSG_PUB.count_msg;
13188: x_return_status := FND_API.G_RET_STS_ERROR;
13189: WHEN OTHERS THEN
13190: IF (p_commit = FND_API.G_TRUE) THEN
13191: ROLLBACK to delete_task_association;
13192: END IF;
13193: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
13194: x_msg_count := FND_MSG_PUB.count_msg;
13189: WHEN OTHERS THEN
13190: IF (p_commit = FND_API.G_TRUE) THEN
13191: ROLLBACK to delete_task_association;
13192: END IF;
13193: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
13194: x_msg_count := FND_MSG_PUB.count_msg;
13195: --put message
13196: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
13197: p_procedure_name => 'delete_all_task_associations',
13233:
13234:
13235: EXCEPTION
13236: WHEN OTHERS THEN
13237: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
13238: --x_msg_count := FND_MSG_PUB.count_msg;
13239: --put message
13240: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
13241: p_procedure_name => 'delete_association',
13312:
13313: )IS
13314: l_ret_code VARCHAR2(1);
13315: BEGIN
13316: x_return_status := FND_API.G_RET_STS_SUCCESS;
13317: l_ret_code := has_Associations(p_task_id,p_relationship_type);
13318: IF l_ret_code = 'Y' THEN
13319: x_return_status := FND_API.G_RET_STS_ERROR;
13320: /*PA_UTILS.ADD_MESSAGE
13315: BEGIN
13316: x_return_status := FND_API.G_RET_STS_SUCCESS;
13317: l_ret_code := has_Associations(p_task_id,p_relationship_type);
13318: IF l_ret_code = 'Y' THEN
13319: x_return_status := FND_API.G_RET_STS_ERROR;
13320: /*PA_UTILS.ADD_MESSAGE
13321: (p_app_short_name => 'PA',
13322: p_msg_name => 'PA_TASK_HAS_ASSOCIATIONS');*/ --Bug 3831786 commented
13323: x_msg_data:='PA_TASK_HAS_ASSOCIATIONS'; --Bug No 3491544 Smukka Apr 07 2004
13334:
13335: )IS
13336: l_ret_code VARCHAR2(1);
13337: BEGIN
13338: x_return_status := FND_API.G_RET_STS_SUCCESS;
13339: l_ret_code := proj_has_task_associations(p_project_id,p_relationship_type);
13340: IF l_ret_code = 'Y' THEN
13341: x_return_status := FND_API.G_RET_STS_ERROR;
13342: PA_UTILS.ADD_MESSAGE
13337: BEGIN
13338: x_return_status := FND_API.G_RET_STS_SUCCESS;
13339: l_ret_code := proj_has_task_associations(p_project_id,p_relationship_type);
13340: IF l_ret_code = 'Y' THEN
13341: x_return_status := FND_API.G_RET_STS_ERROR;
13342: PA_UTILS.ADD_MESSAGE
13343: (p_app_short_name => 'PA',
13344: p_msg_name => 'PA_PROJECT_HAS_ASSOCIATIONS');
13345:
13351: --if p_relationship_id is NOT NULL then only this ONE relationship is deleted
13352: --if p_relationship_id is NULL, then ALL associations are deleted.
13353: PROCEDURE Delete_Proj_To_Task_Assoc(
13354: p_api_version IN NUMBER :=1.0,
13355: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
13356: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
13357: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
13358: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
13359: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
13352: --if p_relationship_id is NULL, then ALL associations are deleted.
13353: PROCEDURE Delete_Proj_To_Task_Assoc(
13354: p_api_version IN NUMBER :=1.0,
13355: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
13356: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
13357: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
13358: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
13359: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
13360: p_debug_mode IN VARCHAR2 :='N',
13353: PROCEDURE Delete_Proj_To_Task_Assoc(
13354: p_api_version IN NUMBER :=1.0,
13355: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
13356: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
13357: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
13358: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
13359: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
13360: p_debug_mode IN VARCHAR2 :='N',
13361: p_max_msg_count IN NUMBER :=NULL,
13354: p_api_version IN NUMBER :=1.0,
13355: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
13356: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
13357: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
13358: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
13359: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
13360: p_debug_mode IN VARCHAR2 :='N',
13361: p_max_msg_count IN NUMBER :=NULL,
13362: p_relationship_type IN VARCHAR2 :='A',
13379: l_data VARCHAR2(250);
13380: l_msg_index_out NUMBER;
13381:
13382: BEGIN
13383: x_return_status := FND_API.G_RET_STS_SUCCESS;
13384:
13385: IF (p_debug_mode = 'Y') THEN
13386: pa_debug.debug('PA_TASK_PUB1.Delete_Proj_To_Task_Assoc START');
13387: END IF;
13384:
13385: IF (p_debug_mode = 'Y') THEN
13386: pa_debug.debug('PA_TASK_PUB1.Delete_Proj_To_Task_Assoc START');
13387: END IF;
13388: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
13389: FND_MSG_PUB.initialize;
13390: END IF;
13391:
13392: IF (p_commit = FND_API.G_TRUE) THEN
13388: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
13389: FND_MSG_PUB.initialize;
13390: END IF;
13391:
13392: IF (p_commit = FND_API.G_TRUE) THEN
13393: savepoint delete_prj_to_task_assoc;
13394: END IF;
13395:
13396: --Delete just the requested relationship row
13399: ELSE
13400: IF p_project_id is not null THEN
13401: FOR task_associations_rec IN task_associations(p_project_id ) LOOP
13402: Delete_Association(task_associations_rec.object_relationship_id,null, x_return_status);
13403: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
13404: EXIT;
13405: END IF;
13406: END LOOP;
13407: END IF;
13406: END LOOP;
13407: END IF;
13408: END IF;
13409:
13410: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
13411: x_msg_count := FND_MSG_PUB.count_msg;
13412: IF x_msg_count = 1 then
13413: pa_interface_utils_pub.get_messages
13414: (p_encoded => FND_API.G_TRUE,
13410: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
13411: x_msg_count := FND_MSG_PUB.count_msg;
13412: IF x_msg_count = 1 then
13413: pa_interface_utils_pub.get_messages
13414: (p_encoded => FND_API.G_TRUE,
13415: p_msg_index => 1,
13416: p_msg_count => x_msg_count,
13417: p_msg_data => x_msg_data,
13418: p_data => l_data,
13417: p_msg_data => x_msg_data,
13418: p_data => l_data,
13419: p_msg_index_out => l_msg_index_out);
13420: x_msg_data := l_data;
13421: raise FND_API.G_EXC_ERROR;
13422: END IF;
13423: ELSE
13424: IF (p_commit = FND_API.G_TRUE) THEN
13425: COMMIT;
13420: x_msg_data := l_data;
13421: raise FND_API.G_EXC_ERROR;
13422: END IF;
13423: ELSE
13424: IF (p_commit = FND_API.G_TRUE) THEN
13425: COMMIT;
13426: END IF;
13427: END IF;
13428:
13430: pa_debug.debug('PA_TASK_PUB1.Delete_Proj_To_Task_Assoc END');
13431: END IF;
13432:
13433: EXCEPTION
13434: WHEN FND_API.G_EXC_ERROR THEN
13435: IF (p_commit = FND_API.G_TRUE) THEN
13436: ROLLBACK to delete_prj_to_task_assoc;
13437: END IF;
13438: x_msg_count := FND_MSG_PUB.count_msg;
13431: END IF;
13432:
13433: EXCEPTION
13434: WHEN FND_API.G_EXC_ERROR THEN
13435: IF (p_commit = FND_API.G_TRUE) THEN
13436: ROLLBACK to delete_prj_to_task_assoc;
13437: END IF;
13438: x_msg_count := FND_MSG_PUB.count_msg;
13439: x_return_status := FND_API.G_RET_STS_ERROR;
13435: IF (p_commit = FND_API.G_TRUE) THEN
13436: ROLLBACK to delete_prj_to_task_assoc;
13437: END IF;
13438: x_msg_count := FND_MSG_PUB.count_msg;
13439: x_return_status := FND_API.G_RET_STS_ERROR;
13440: WHEN OTHERS THEN
13441: IF (p_commit = FND_API.G_TRUE) THEN
13442: ROLLBACK to delete_prj_to_task_assoc;
13443: END IF;
13437: END IF;
13438: x_msg_count := FND_MSG_PUB.count_msg;
13439: x_return_status := FND_API.G_RET_STS_ERROR;
13440: WHEN OTHERS THEN
13441: IF (p_commit = FND_API.G_TRUE) THEN
13442: ROLLBACK to delete_prj_to_task_assoc;
13443: END IF;
13444: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
13445: --put message
13440: WHEN OTHERS THEN
13441: IF (p_commit = FND_API.G_TRUE) THEN
13442: ROLLBACK to delete_prj_to_task_assoc;
13443: END IF;
13444: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
13445: --put message
13446: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
13447: p_procedure_name => 'delete_proj_to_task_assoc',
13448: p_error_text => SUBSTRB(SQLERRM,1,240));
13451:
13452:
13453: PROCEDURE Copy_Task_Associations(
13454: p_api_version IN NUMBER :=1.0,
13455: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
13456: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
13457: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
13458: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
13459: p_debug_mode IN VARCHAR2 :='N',
13452:
13453: PROCEDURE Copy_Task_Associations(
13454: p_api_version IN NUMBER :=1.0,
13455: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
13456: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
13457: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
13458: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
13459: p_debug_mode IN VARCHAR2 :='N',
13460: p_max_msg_count IN NUMBER :=NULL,
13453: PROCEDURE Copy_Task_Associations(
13454: p_api_version IN NUMBER :=1.0,
13455: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
13456: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
13457: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
13458: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
13459: p_debug_mode IN VARCHAR2 :='N',
13460: p_max_msg_count IN NUMBER :=NULL,
13461: p_project_id_to IN NUMBER := NULL,
13502: IF (p_debug_mode = 'Y') THEN
13503: pa_debug.debug('PA_TASK_PUB1.Copy_Task_Associations START');
13504: END IF;
13505:
13506: x_return_status := FND_API.G_RET_STS_SUCCESS;
13507:
13508: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
13509: FND_MSG_PUB.initialize;
13510: END IF;
13504: END IF;
13505:
13506: x_return_status := FND_API.G_RET_STS_SUCCESS;
13507:
13508: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
13509: FND_MSG_PUB.initialize;
13510: END IF;
13511:
13512: IF (p_commit = FND_API.G_TRUE) THEN
13508: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
13509: FND_MSG_PUB.initialize;
13510: END IF;
13511:
13512: IF (p_commit = FND_API.G_TRUE) THEN
13513: savepoint copy_task_associations;
13514: END IF;
13515:
13516:
13547: ,x_return_status => x_return_status);
13548:
13549: END IF;
13550: close task_association;
13551: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
13552: EXIT;
13553: END IF;
13554: END IF;
13555: END LOOP;
13553: END IF;
13554: END IF;
13555: END LOOP;
13556:
13557: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
13558: x_msg_count := FND_MSG_PUB.count_msg;
13559: IF x_msg_count = 1 then
13560: pa_interface_utils_pub.get_messages
13561: (p_encoded => FND_API.G_TRUE,
13557: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
13558: x_msg_count := FND_MSG_PUB.count_msg;
13559: IF x_msg_count = 1 then
13560: pa_interface_utils_pub.get_messages
13561: (p_encoded => FND_API.G_TRUE,
13562: p_msg_index => 1,
13563: p_msg_count => x_msg_count,
13564: p_msg_data => x_msg_data,
13565: p_data => l_data,
13564: p_msg_data => x_msg_data,
13565: p_data => l_data,
13566: p_msg_index_out => l_msg_index_out);
13567: x_msg_data := l_data;
13568: raise FND_API.G_EXC_ERROR;
13569: END IF;
13570: ELSE
13571: IF (p_commit = FND_API.G_TRUE) THEN
13572: COMMIT;
13567: x_msg_data := l_data;
13568: raise FND_API.G_EXC_ERROR;
13569: END IF;
13570: ELSE
13571: IF (p_commit = FND_API.G_TRUE) THEN
13572: COMMIT;
13573: END IF;
13574: END IF;
13575:
13577: pa_debug.debug('PA_TASK_PUB1.Copy_Task_Associations END');
13578: END IF;
13579:
13580: EXCEPTION
13581: WHEN FND_API.G_EXC_ERROR THEN
13582: IF (p_commit = FND_API.G_TRUE) THEN
13583: ROLLBACK to copy_task_associations;
13584: END IF;
13585: x_msg_count := FND_MSG_PUB.count_msg;
13578: END IF;
13579:
13580: EXCEPTION
13581: WHEN FND_API.G_EXC_ERROR THEN
13582: IF (p_commit = FND_API.G_TRUE) THEN
13583: ROLLBACK to copy_task_associations;
13584: END IF;
13585: x_msg_count := FND_MSG_PUB.count_msg;
13586: x_return_status := FND_API.G_RET_STS_ERROR;
13582: IF (p_commit = FND_API.G_TRUE) THEN
13583: ROLLBACK to copy_task_associations;
13584: END IF;
13585: x_msg_count := FND_MSG_PUB.count_msg;
13586: x_return_status := FND_API.G_RET_STS_ERROR;
13587: WHEN OTHERS THEN
13588: IF (p_commit = FND_API.G_TRUE) THEN
13589: ROLLBACK to copy_task_associations;
13590: END IF;
13584: END IF;
13585: x_msg_count := FND_MSG_PUB.count_msg;
13586: x_return_status := FND_API.G_RET_STS_ERROR;
13587: WHEN OTHERS THEN
13588: IF (p_commit = FND_API.G_TRUE) THEN
13589: ROLLBACK to copy_task_associations;
13590: END IF;
13591: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
13592: --put message
13587: WHEN OTHERS THEN
13588: IF (p_commit = FND_API.G_TRUE) THEN
13589: ROLLBACK to copy_task_associations;
13590: END IF;
13591: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
13592: --put message
13593: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
13594: p_procedure_name => 'Copy_Task_Associations',
13595: p_error_text => SUBSTRB(SQLERRM,1,240));
13680: p_procedure_name => 'call_add_planning_txns',
13681: p_error_text => SUBSTRB('pa_fp_planning_transaction_pub.add_planning_transactions:'||SQLERRM,1,240));
13682: raise API_ERROR;
13683: END;
13684: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
13685: x_msg_count := FND_MSG_PUB.count_msg;
13686: if x_msg_count = 1 then
13687: pa_interface_utils_pub.get_messages
13688: (p_encoded => FND_API.G_TRUE,
13684: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
13685: x_msg_count := FND_MSG_PUB.count_msg;
13686: if x_msg_count = 1 then
13687: pa_interface_utils_pub.get_messages
13688: (p_encoded => FND_API.G_TRUE,
13689: p_msg_index => 1,
13690: p_msg_count => l_msg_count,
13691: p_msg_data => l_msg_data,
13692: p_data => l_data,
13696: raise API_ERROR;
13697: end if;
13698: END IF;
13699:
13700: x_return_status := FND_API.G_RET_STS_SUCCESS;
13701: EXCEPTION
13702: WHEN API_ERROR THEN
13703: x_return_status := FND_API.G_RET_STS_ERROR;
13704: WHEN OTHERS THEN
13699:
13700: x_return_status := FND_API.G_RET_STS_SUCCESS;
13701: EXCEPTION
13702: WHEN API_ERROR THEN
13703: x_return_status := FND_API.G_RET_STS_ERROR;
13704: WHEN OTHERS THEN
13705: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
13706: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
13707: p_procedure_name => 'call_add_planning_txns',
13701: EXCEPTION
13702: WHEN API_ERROR THEN
13703: x_return_status := FND_API.G_RET_STS_ERROR;
13704: WHEN OTHERS THEN
13705: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
13706: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
13707: p_procedure_name => 'call_add_planning_txns',
13708: p_error_text => SUBSTRB(SQLERRM,1,240));
13709: raise;
13710: END call_add_planning_txns;
13711:
13712: PROCEDURE update_task_det_sch_info(
13713: p_api_version IN NUMBER :=1.0,
13714: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
13715: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
13716: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
13717: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
13718: p_debug_mode IN VARCHAR2 :='N',
13711:
13712: PROCEDURE update_task_det_sch_info(
13713: p_api_version IN NUMBER :=1.0,
13714: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
13715: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
13716: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
13717: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
13718: p_debug_mode IN VARCHAR2 :='N',
13719: p_task_ver_id IN NUMBER,
13712: PROCEDURE update_task_det_sch_info(
13713: p_api_version IN NUMBER :=1.0,
13714: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
13715: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
13716: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
13717: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
13718: p_debug_mode IN VARCHAR2 :='N',
13719: p_task_ver_id IN NUMBER,
13720: p_project_id IN NUMBER,
13988: IF (p_debug_mode = 'Y') THEN
13989: pa_debug.debug('PA_TASK_PUB1.UPDATE_TASK_DET_SCH_INFO begin');
13990: END IF;
13991:
13992: IF (p_commit = FND_API.G_TRUE) THEN
13993: savepoint UPDATE_task_det_sch;
13994: END IF;
13995:
13996: l_debug_mode := NVL(FND_PROFILE.value_specific('PA_DEBUG_MODE',fnd_global.user_id,fnd_global.login_id,275,null,null), 'N');
14029: ,p_msg_name => 'PA_TP_NO_NEG_PLN');
14030:
14031: x_msg_data := 'PA_TP_NO_NEG_PLN';
14032: x_return_status := 'E';
14033: RAISE FND_API.G_EXC_ERROR;
14034: END IF;
14035:
14036: IF (((p_etc_cost <> PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM) and (nvl(p_etc_cost,0) < 0))
14037: or ((p_etc_effort <> PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM) and (nvl(p_etc_effort,0) < 0))) THEN
14040: ,p_msg_name => 'PA_TP_NO_NEG_ETC');
14041:
14042: x_msg_data := 'PA_TP_NO_NEG_ETC';
14043: x_return_status := 'E';
14044: RAISE FND_API.G_EXC_ERROR;
14045: END IF;
14046: */
14047: -- End of Bug Fix 5726773
14048:
14192: x_msg_count => l_msg_count,
14193: x_msg_data => l_msg_data
14194: );
14195:
14196: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
14197: l_msg_count := FND_MSG_PUB.count_msg;
14198: IF l_msg_count > 0 THEN
14199: x_msg_count := l_msg_count;
14200: IF x_msg_count = 1 THEN
14199: x_msg_count := l_msg_count;
14200: IF x_msg_count = 1 THEN
14201: x_msg_data := l_msg_data;
14202: END IF;
14203: RAISE FND_API.G_EXC_ERROR;
14204: END IF;
14205: END IF;
14206: END IF;
14207:
14251:
14252: /* Start Modifications to fix Bug # 3640498. */
14253:
14254: IF ((l_planned_effort = PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM) or (nvl(l_planned_effort,0) = 0)) then
14255: l_planned_effort2(1) := FND_API.G_MISS_NUM;
14256: ELSE
14257: l_planned_effort2(1) := l_planned_effort;
14258: END IF;
14259:
14292: WHEN OTHERS THEN
14293: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
14294: p_procedure_name => 'update_task_det_sch_info',
14295: p_error_text => SUBSTRB('pa_fp_planning_transaction_pub.update_planning_transactions:'||SQLERRM,1,240));
14296: RAISE FND_API.G_EXC_ERROR;
14297: END;
14298: --end 3301192 fp changes
14299: END IF; --<< l_planned_effort >>
14300:
14929: IF NVL(PA_PROJECT_PUB.G_ROLLUP_DEFER, 'N') = 'N'
14930: then
14931: -- 4591321 : Always call populate_pji_tab_for_plan
14932: pa_progress_pub.populate_pji_tab_for_plan(
14933: p_init_msg_list => FND_API.G_FALSE,
14934: p_project_id => p_project_id,
14935: p_structure_version_id => p_structure_version_id,
14936: p_baselined_str_ver_id => PA_PROJECT_STRUCTURE_UTILS.Get_Baseline_Struct_Ver(p_project_id),
14937: p_structure_type => 'WORKPLAN',
14940: x_msg_data => l_msg_data
14941: );
14942:
14943: IF l_return_status <> 'S' THEN
14944: RAISE FND_API.G_EXC_ERROR;
14945: END IF;
14946:
14947: -- Bug 3861259 End
14948:
15031: -- 14556729:Huawei Code change to defer the roll up API when G_ROLLUP_DEFER is set to Y , so that all the roll up is processed once at the end .
15032: IF NVL(PA_PROJECT_PUB.G_ROLLUP_DEFER, 'N') = 'N'
15033: then
15034: pa_progress_pub.populate_pji_tab_for_plan(
15035: p_init_msg_list => FND_API.G_FALSE,
15036: --p_calling_module => p_calling_module,
15037: p_project_id => p_project_id,
15038: p_structure_version_id => p_structure_version_id,
15039: p_baselined_str_ver_id => PA_PROJECT_STRUCTURE_UTILS.Get_Baseline_Struct_Ver(p_project_id),
15042: x_msg_count => l_msg_count,
15043: x_msg_data => l_msg_data
15044: );
15045: IF l_return_status <> 'S' THEN
15046: RAISE FND_API.G_EXC_ERROR;
15047: END IF;
15048: -- Bug 3861259 End
15049:
15050:
15077: end if;
15078:
15079: /* END: The above actions are to be performed only when p_object_type = 'PA_ASSIGNMENTS'. */
15080:
15081: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
15082: x_msg_count := FND_MSG_PUB.count_msg;
15083: if x_msg_count = 1 then
15084: pa_interface_utils_pub.get_messages
15085: (p_encoded => FND_API.G_TRUE,
15081: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
15082: x_msg_count := FND_MSG_PUB.count_msg;
15083: if x_msg_count = 1 then
15084: pa_interface_utils_pub.get_messages
15085: (p_encoded => FND_API.G_TRUE,
15086: p_msg_index => 1,
15087: p_msg_count => l_msg_count,
15088: p_msg_data => l_msg_data,
15089: p_data => l_data,
15089: p_data => l_data,
15090: p_msg_index_out => l_msg_index_out);
15091: x_msg_data := l_data;
15092: end if;
15093: raise FND_API.G_EXC_ERROR;
15094: end if;
15095:
15096: x_return_status := FND_API.G_RET_STS_SUCCESS;
15097:
15092: end if;
15093: raise FND_API.G_EXC_ERROR;
15094: end if;
15095:
15096: x_return_status := FND_API.G_RET_STS_SUCCESS;
15097:
15098: EXCEPTION
15099: WHEN FND_API.G_EXC_ERROR THEN
15100: IF (p_commit = FND_API.G_TRUE) THEN
15095:
15096: x_return_status := FND_API.G_RET_STS_SUCCESS;
15097:
15098: EXCEPTION
15099: WHEN FND_API.G_EXC_ERROR THEN
15100: IF (p_commit = FND_API.G_TRUE) THEN
15101: ROLLBACK to UPDATE_task_det_sch;
15102: END IF;
15103: x_msg_count := FND_MSG_PUB.count_msg;
15096: x_return_status := FND_API.G_RET_STS_SUCCESS;
15097:
15098: EXCEPTION
15099: WHEN FND_API.G_EXC_ERROR THEN
15100: IF (p_commit = FND_API.G_TRUE) THEN
15101: ROLLBACK to UPDATE_task_det_sch;
15102: END IF;
15103: x_msg_count := FND_MSG_PUB.count_msg;
15104: x_return_status := FND_API.G_RET_STS_ERROR;
15100: IF (p_commit = FND_API.G_TRUE) THEN
15101: ROLLBACK to UPDATE_task_det_sch;
15102: END IF;
15103: x_msg_count := FND_MSG_PUB.count_msg;
15104: x_return_status := FND_API.G_RET_STS_ERROR;
15105: WHEN OTHERS THEN
15106: IF (p_commit = FND_API.G_TRUE) THEN
15107: ROLLBACK to UPDATE_task_det_sch;
15108: END IF;
15102: END IF;
15103: x_msg_count := FND_MSG_PUB.count_msg;
15104: x_return_status := FND_API.G_RET_STS_ERROR;
15105: WHEN OTHERS THEN
15106: IF (p_commit = FND_API.G_TRUE) THEN
15107: ROLLBACK to UPDATE_task_det_sch;
15108: END IF;
15109: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
15110: x_msg_count := FND_MSG_PUB.count_msg;
15105: WHEN OTHERS THEN
15106: IF (p_commit = FND_API.G_TRUE) THEN
15107: ROLLBACK to UPDATE_task_det_sch;
15108: END IF;
15109: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
15110: x_msg_count := FND_MSG_PUB.count_msg;
15111: --put message
15112: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
15113: p_procedure_name => 'update_task_det_sch_info',
15122: -- Pre-reqs : None
15123: -- Return Value : N/A
15124: -- Prameters
15125: -- p_api_version IN NUMBER N Not Null 1.0
15126: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
15127: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
15128: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
15129: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
15130: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
15123: -- Return Value : N/A
15124: -- Prameters
15125: -- p_api_version IN NUMBER N Not Null 1.0
15126: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
15127: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
15128: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
15129: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
15130: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
15131: -- p_debug_mode IN VARCHAR2 N Null N
15124: -- Prameters
15125: -- p_api_version IN NUMBER N Not Null 1.0
15126: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
15127: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
15128: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
15129: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
15130: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
15131: -- p_debug_mode IN VARCHAR2 N Null N
15132: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
15125: -- p_api_version IN NUMBER N Not Null 1.0
15126: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
15127: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
15128: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
15129: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
15130: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
15131: -- p_debug_mode IN VARCHAR2 N Null N
15132: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
15133: -- p_src_project_id IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
15155:
15156: PROCEDURE Copy_Tasks_In_Bulk
15157: (
15158: p_api_version IN NUMBER :=1.0,
15159: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
15160: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
15161: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
15162: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
15163: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
15156: PROCEDURE Copy_Tasks_In_Bulk
15157: (
15158: p_api_version IN NUMBER :=1.0,
15159: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
15160: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
15161: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
15162: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
15163: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
15164: p_debug_mode IN VARCHAR2 :='N',
15157: (
15158: p_api_version IN NUMBER :=1.0,
15159: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
15160: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
15161: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
15162: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
15163: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
15164: p_debug_mode IN VARCHAR2 :='N',
15165: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
15158: p_api_version IN NUMBER :=1.0,
15159: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
15160: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
15161: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
15162: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
15163: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
15164: p_debug_mode IN VARCHAR2 :='N',
15165: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
15166: p_src_project_id IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
15263: FROM PA_PROJECTS_ALL
15264: WHERE project_id = c_project_id;
15265: BEGIN
15266: pa_debug.init_err_stack ('PA_TASK_PUB1.COPY_TASKS_IN_BULK');
15267: x_return_status := FND_API.G_RET_STS_SUCCESS;
15268: IF (p_debug_mode = 'Y') THEN
15269: pa_debug.debug('PA_TASK_PUB1.COPY_TASKS_IN_BULK begin');
15270: END IF;
15271:
15268: IF (p_debug_mode = 'Y') THEN
15269: pa_debug.debug('PA_TASK_PUB1.COPY_TASKS_IN_BULK begin');
15270: END IF;
15271:
15272: IF (p_commit = FND_API.G_TRUE) THEN
15273: savepoint copy_tasks_in_bulk;
15274: END IF;
15275:
15276: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
15272: IF (p_commit = FND_API.G_TRUE) THEN
15273: savepoint copy_tasks_in_bulk;
15274: END IF;
15275:
15276: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
15277: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
15278: END IF;
15279:
15280: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
15273: savepoint copy_tasks_in_bulk;
15274: END IF;
15275:
15276: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
15277: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
15278: END IF;
15279:
15280: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
15281: FND_MSG_PUB.initialize;
15276: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
15277: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
15278: END IF;
15279:
15280: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
15281: FND_MSG_PUB.initialize;
15282: END IF;
15283:
15284: IF p_calling_module = 'SELF_SERVICE' THEN
15332:
15333: IF l_add_task_allowed = 'N' THEN
15334: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
15335: p_msg_name => 'PA_PR_PM_CANNOT_COPY');
15336: raise FND_API.G_EXC_ERROR;
15337: END IF;
15338:
15339: END IF;
15340:
15351: x_project_id => l_src_project_id,
15352: x_return_status => l_return_status,
15353: x_error_msg_code => l_error_msg_code);
15354:
15355: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15356: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
15357: p_msg_name => l_error_msg_code);
15358: END IF;
15359: END IF;
15374: ,x_return_status => l_return_status
15375: ,x_error_message_code => l_error_msg_code
15376: );
15377:
15378: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15379: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
15380: p_msg_name => l_error_msg_code);
15381: END IF;
15382: END IF;
15398: ,x_return_status => l_return_status
15399: ,x_error_message_code => l_error_msg_code
15400: );
15401:
15402: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15403: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
15404: p_msg_name => l_error_msg_code);
15405: END IF;
15406:
15416:
15417: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
15418: p_msg_name => 'PA_PS_NOT_ENOUGH_PARAMS' );
15419: x_msg_data := ' BULK API : PA_PS_NOT_ENOUGH_PARAMS';
15420: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
15421: RAISE FND_API.G_EXC_ERROR;
15422: END IF;
15423:
15424: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
15417: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
15418: p_msg_name => 'PA_PS_NOT_ENOUGH_PARAMS' );
15419: x_msg_data := ' BULK API : PA_PS_NOT_ENOUGH_PARAMS';
15420: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
15421: RAISE FND_API.G_EXC_ERROR;
15422: END IF;
15423:
15424: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
15425: x_msg_count := FND_MSG_PUB.count_msg;
15420: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
15421: RAISE FND_API.G_EXC_ERROR;
15422: END IF;
15423:
15424: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
15425: x_msg_count := FND_MSG_PUB.count_msg;
15426: IF x_msg_count = 1 then
15427: pa_interface_utils_pub.get_messages
15428: (p_encoded => FND_API.G_TRUE,
15424: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
15425: x_msg_count := FND_MSG_PUB.count_msg;
15426: IF x_msg_count = 1 then
15427: pa_interface_utils_pub.get_messages
15428: (p_encoded => FND_API.G_TRUE,
15429: p_msg_index => 1,
15430: p_msg_count => l_msg_count,
15431: p_msg_data => l_msg_data,
15432: p_data => l_data,
15432: p_data => l_data,
15433: p_msg_index_out => l_msg_index_out);
15434: x_msg_data := l_data;
15435: END IF;
15436: raise FND_API.G_EXC_ERROR;
15437: END IF;
15438:
15439: IF p_copy_option NOT IN( 'PA_ENTIRE_VERSION', 'PA_TASK_ONLY', 'PA_TASK_SUBTASK' )
15440: THEN
15441:
15442: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
15443: p_msg_name => 'PA_PS_WRONG_COPY_OPTION' );
15444: x_msg_data := 'PA_PS_WRONG_COPY_OPTION';
15445: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
15446: RAISE FND_API.G_EXC_ERROR;
15447: END IF;
15448:
15449: /*====================================================================
15442: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
15443: p_msg_name => 'PA_PS_WRONG_COPY_OPTION' );
15444: x_msg_data := 'PA_PS_WRONG_COPY_OPTION';
15445: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
15446: RAISE FND_API.G_EXC_ERROR;
15447: END IF;
15448:
15449: /*====================================================================
15450: ALL BASIC VALIDATIONS COMPLETE RELEVANT TO VALIDITY OF PASSED PARAMS
15525:
15526: IF nvl(p_src_task_version_id_tbl.LAST,0)>0 THEN
15527: FOR i IN p_src_task_version_id_tbl.FIRST..p_src_task_version_id_tbl.LAST LOOP
15528: PA_TASK_PUB1.Copy_Task(
15529: p_init_msg_list => FND_API.G_FALSE,
15530: p_src_project_id => p_src_project_id,
15531: p_src_project_name => p_src_project_name,
15532: p_src_structure_id => p_src_structure_id ,
15533: p_src_structure_name => p_src_structure_name,
15561: x_return_status => x_return_status,
15562: x_msg_count => x_msg_count,
15563: x_msg_data => x_msg_data
15564: );
15565: if(x_return_status <> FND_API.G_RET_STS_SUCCESS)
15566: then
15567: RAISE FND_API.G_EXC_ERROR ;
15568: End if;
15569: END LOOP;
15563: x_msg_data => x_msg_data
15564: );
15565: if(x_return_status <> FND_API.G_RET_STS_SUCCESS)
15566: then
15567: RAISE FND_API.G_EXC_ERROR ;
15568: End if;
15569: END LOOP;
15570:
15571: END IF;
15570:
15571: END IF;
15572:
15573: END IF; /*End If Calling Module is self service*/
15574: IF (p_commit = FND_API.G_TRUE) THEN
15575: COMMIT;
15576: END IF;
15577: EXCEPTION
15578: when FND_API.G_EXC_ERROR then
15574: IF (p_commit = FND_API.G_TRUE) THEN
15575: COMMIT;
15576: END IF;
15577: EXCEPTION
15578: when FND_API.G_EXC_ERROR then
15579: if p_commit = FND_API.G_TRUE then
15580: rollback to Copy_Tasks_in_bulk;
15581: end if;
15582: x_return_status := FND_API.G_RET_STS_ERROR;
15575: COMMIT;
15576: END IF;
15577: EXCEPTION
15578: when FND_API.G_EXC_ERROR then
15579: if p_commit = FND_API.G_TRUE then
15580: rollback to Copy_Tasks_in_bulk;
15581: end if;
15582: x_return_status := FND_API.G_RET_STS_ERROR;
15583: x_msg_count := Fnd_Msg_Pub.count_msg;
15578: when FND_API.G_EXC_ERROR then
15579: if p_commit = FND_API.G_TRUE then
15580: rollback to Copy_Tasks_in_bulk;
15581: end if;
15582: x_return_status := FND_API.G_RET_STS_ERROR;
15583: x_msg_count := Fnd_Msg_Pub.count_msg;
15584: IF x_msg_count = 1 AND x_msg_data IS NULL
15585: THEN
15586: Pa_Interface_Utils_Pub.get_messages
15583: x_msg_count := Fnd_Msg_Pub.count_msg;
15584: IF x_msg_count = 1 AND x_msg_data IS NULL
15585: THEN
15586: Pa_Interface_Utils_Pub.get_messages
15587: ( p_encoded => Fnd_Api.G_TRUE
15588: , p_msg_index => 1
15589: , p_msg_count => l_msg_count
15590: , p_msg_data => l_msg_data
15591: , p_data => l_data
15591: , p_data => l_data
15592: , p_msg_index_out => l_msg_index_out);
15593: END IF;
15594: x_msg_data := l_data;
15595: when FND_API.G_EXC_UNEXPECTED_ERROR then
15596: if p_commit = FND_API.G_TRUE then
15597: rollback to Copy_Tasks_in_bulk;
15598: end if;
15599: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
15592: , p_msg_index_out => l_msg_index_out);
15593: END IF;
15594: x_msg_data := l_data;
15595: when FND_API.G_EXC_UNEXPECTED_ERROR then
15596: if p_commit = FND_API.G_TRUE then
15597: rollback to Copy_Tasks_in_bulk;
15598: end if;
15599: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
15600: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
15595: when FND_API.G_EXC_UNEXPECTED_ERROR then
15596: if p_commit = FND_API.G_TRUE then
15597: rollback to Copy_Tasks_in_bulk;
15598: end if;
15599: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
15600: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
15601: p_procedure_name => 'COPY_TASKS_IN_BULK',
15602: p_error_text => SUBSTRB(SQLERRM,1,240));
15603: when OTHERS then
15600: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
15601: p_procedure_name => 'COPY_TASKS_IN_BULK',
15602: p_error_text => SUBSTRB(SQLERRM,1,240));
15603: when OTHERS then
15604: if p_commit = FND_API.G_TRUE then
15605: rollback to Copy_Tasks_in_bulk;
15606: end if;
15607: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
15608: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
15603: when OTHERS then
15604: if p_commit = FND_API.G_TRUE then
15605: rollback to Copy_Tasks_in_bulk;
15606: end if;
15607: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
15608: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
15609: p_procedure_name => 'COPY_TASKS_IN_BULK',
15610: p_error_text => SUBSTRB(SQLERRM,1,240));
15611: raise;
15617: -- Pre-reqs : None
15618: -- Return Value : N/A
15619: -- Prameters
15620: -- p_api_version IN NUMBER N Not Null 1.0
15621: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
15622: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
15623: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
15624: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
15625: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
15618: -- Return Value : N/A
15619: -- Prameters
15620: -- p_api_version IN NUMBER N Not Null 1.0
15621: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
15622: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
15623: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
15624: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
15625: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
15626: -- p_debug_mode IN VARCHAR2 N Null N
15619: -- Prameters
15620: -- p_api_version IN NUMBER N Not Null 1.0
15621: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
15622: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
15623: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
15624: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
15625: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
15626: -- p_debug_mode IN VARCHAR2 N Null N
15627: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
15620: -- p_api_version IN NUMBER N Not Null 1.0
15621: -- p_init_msg_list IN VARCHAR2 N Not Null FND_API.TRUE
15622: -- p_commit IN VARCHAR2 N Not Null FND_API.G_FALSE
15623: -- p_validate_only IN VARCHAR2 N Not Null FND_API.G_TRUE
15624: -- p_validation_level IN NUMBER N Null FND_API.G_VALID_LEVEL_FULL
15625: -- p_calling_module IN VARCHAR2 N Null SELF_SERVICE
15626: -- p_debug_mode IN VARCHAR2 N Null N
15627: -- p_max_msg_count IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
15628: -- p_structure_version_id IN NUMBER N NULL PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
15641: -- 29-MAR-05 Modified avaithia 4269830 : Performance Tuning done
15642: --
15643: PROCEDURE MOVE_TASK_VERSIONS_IN_BULK
15644: ( p_api_version IN NUMBER := 1.0,
15645: p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE,
15646: p_commit IN VARCHAR2 := FND_API.G_FALSE,
15647: p_validate_only IN VARCHAR2 := FND_API.G_TRUE,
15648: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
15649: p_calling_module IN VARCHAR2 := 'SELF_SERVICE',
15642: --
15643: PROCEDURE MOVE_TASK_VERSIONS_IN_BULK
15644: ( p_api_version IN NUMBER := 1.0,
15645: p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE,
15646: p_commit IN VARCHAR2 := FND_API.G_FALSE,
15647: p_validate_only IN VARCHAR2 := FND_API.G_TRUE,
15648: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
15649: p_calling_module IN VARCHAR2 := 'SELF_SERVICE',
15650: p_debug_mode IN VARCHAR2 := 'N',
15643: PROCEDURE MOVE_TASK_VERSIONS_IN_BULK
15644: ( p_api_version IN NUMBER := 1.0,
15645: p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE,
15646: p_commit IN VARCHAR2 := FND_API.G_FALSE,
15647: p_validate_only IN VARCHAR2 := FND_API.G_TRUE,
15648: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
15649: p_calling_module IN VARCHAR2 := 'SELF_SERVICE',
15650: p_debug_mode IN VARCHAR2 := 'N',
15651: p_max_msg_count IN NUMBER := PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
15644: ( p_api_version IN NUMBER := 1.0,
15645: p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE,
15646: p_commit IN VARCHAR2 := FND_API.G_FALSE,
15647: p_validate_only IN VARCHAR2 := FND_API.G_TRUE,
15648: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
15649: p_calling_module IN VARCHAR2 := 'SELF_SERVICE',
15650: p_debug_mode IN VARCHAR2 := 'N',
15651: p_max_msg_count IN NUMBER := PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
15652: p_structure_version_id IN NUMBER := PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
15742:
15743: BEGIN
15744: pa_debug.init_err_stack ('PA_TASK_PUB1.MOVE_TASK_VERSIONS_IN_BULK');
15745:
15746: x_return_status := FND_API.G_RET_STS_SUCCESS ;
15747:
15748: IF (p_debug_mode = 'Y') THEN
15749: pa_debug.debug('PA_TASK_PUB1.MOVE_TASK_VERSIONS_IN_BULK begin');
15750: END IF;
15748: IF (p_debug_mode = 'Y') THEN
15749: pa_debug.debug('PA_TASK_PUB1.MOVE_TASK_VERSIONS_IN_BULK begin');
15750: END IF;
15751:
15752: IF (p_commit = FND_API.G_TRUE) THEN
15753: savepoint MOVE_TASK_VERSIONS_IN_BULK ;
15754: END IF;
15755:
15756: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
15752: IF (p_commit = FND_API.G_TRUE) THEN
15753: savepoint MOVE_TASK_VERSIONS_IN_BULK ;
15754: END IF;
15755:
15756: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
15757: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
15758: END IF;
15759:
15760: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
15753: savepoint MOVE_TASK_VERSIONS_IN_BULK ;
15754: END IF;
15755:
15756: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
15757: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
15758: END IF;
15759:
15760: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
15761: FND_MSG_PUB.initialize;
15756: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
15757: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
15758: END IF;
15759:
15760: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
15761: FND_MSG_PUB.initialize;
15762: END IF;
15763: IF p_calling_module = 'SELF_SERVICE' THEN
15764:
15805: END IF;
15806: IF l_update_parent_task_allowed = 'N' THEN
15807: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
15808: p_msg_name => 'PA_PR_PM_NO_MOVE_TASK');
15809: raise FND_API.G_EXC_ERROR;
15810: END IF;
15811: End If;
15812:
15813: End If; /* End if calling module is self service*/
15871:
15872: IF nvl(p_task_version_id_tbl.LAST,0)>0 THEN
15873: FOR i IN p_task_version_id_tbl.FIRST..p_task_version_id_tbl.LAST LOOP
15874: PA_TASK_PUB1.Move_Task_Version(
15875: p_init_msg_list => FND_API.G_FALSE,
15876: p_structure_version_id => p_structure_version_id,
15877: p_task_version_id => p_task_version_id_tbl(i),
15878: p_ref_task_version_id => ref_task_temp_version_id, --p_ref_task_version_id, -- Bug 6628382
15879: p_peer_or_sub => p_peer_or_sub,
15898: x_return_status => x_return_status,
15899: x_msg_count => x_msg_count,
15900: x_msg_data => x_msg_data
15901: );
15902: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15903: RAISE FND_API.G_EXC_ERROR ;
15904: END IF;
15905: ref_task_temp_version_id := p_task_version_id_tbl(i); -- Bug 6628382
15906: END LOOP;
15899: x_msg_count => x_msg_count,
15900: x_msg_data => x_msg_data
15901: );
15902: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15903: RAISE FND_API.G_EXC_ERROR ;
15904: END IF;
15905: ref_task_temp_version_id := p_task_version_id_tbl(i); -- Bug 6628382
15906: END LOOP;
15907:
15906: END LOOP;
15907:
15908: END IF;
15909:
15910: IF (p_commit = FND_API.G_TRUE) THEN
15911: COMMIT;
15912: END IF;
15913:
15914: EXCEPTION
15911: COMMIT;
15912: END IF;
15913:
15914: EXCEPTION
15915: when FND_API.G_EXC_ERROR then
15916: if p_commit = FND_API.G_TRUE then
15917: rollback to MOVE_TASK_VERSIONS_IN_BULK;
15918: end if;
15919: x_return_status := FND_API.G_RET_STS_ERROR;
15912: END IF;
15913:
15914: EXCEPTION
15915: when FND_API.G_EXC_ERROR then
15916: if p_commit = FND_API.G_TRUE then
15917: rollback to MOVE_TASK_VERSIONS_IN_BULK;
15918: end if;
15919: x_return_status := FND_API.G_RET_STS_ERROR;
15920: x_msg_count := Fnd_Msg_Pub.count_msg;
15915: when FND_API.G_EXC_ERROR then
15916: if p_commit = FND_API.G_TRUE then
15917: rollback to MOVE_TASK_VERSIONS_IN_BULK;
15918: end if;
15919: x_return_status := FND_API.G_RET_STS_ERROR;
15920: x_msg_count := Fnd_Msg_Pub.count_msg;
15921:
15922: IF x_msg_count = 1 AND x_msg_data IS NULL
15923: THEN
15921:
15922: IF x_msg_count = 1 AND x_msg_data IS NULL
15923: THEN
15924: Pa_Interface_Utils_Pub.get_messages
15925: ( p_encoded => Fnd_Api.G_FALSE
15926: , p_msg_index => 1
15927: , p_msg_count => l_msg_count
15928: , p_msg_data => l_msg_data
15929: , p_data => l_data
15930: , p_msg_index_out => l_msg_index_out);
15931: x_msg_data := l_data;
15932: END IF;
15933:
15934: when FND_API.G_EXC_UNEXPECTED_ERROR then
15935: if p_commit = FND_API.G_TRUE then
15936: rollback to MOVE_TASK_VERSIONS_IN_BULK;
15937: end if;
15938: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
15931: x_msg_data := l_data;
15932: END IF;
15933:
15934: when FND_API.G_EXC_UNEXPECTED_ERROR then
15935: if p_commit = FND_API.G_TRUE then
15936: rollback to MOVE_TASK_VERSIONS_IN_BULK;
15937: end if;
15938: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
15939: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
15934: when FND_API.G_EXC_UNEXPECTED_ERROR then
15935: if p_commit = FND_API.G_TRUE then
15936: rollback to MOVE_TASK_VERSIONS_IN_BULK;
15937: end if;
15938: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
15939: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
15940: p_procedure_name => 'MOVE_TASK_VERSIONS_IN_BULK',
15941: p_error_text => SUBSTRB(SQLERRM,1,240));
15942: when OTHERS then
15939: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
15940: p_procedure_name => 'MOVE_TASK_VERSIONS_IN_BULK',
15941: p_error_text => SUBSTRB(SQLERRM,1,240));
15942: when OTHERS then
15943: if p_commit = FND_API.G_TRUE then
15944: rollback to MOVE_TASK_VERSIONS_IN_BULK;
15945: end if;
15946: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
15947: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
15942: when OTHERS then
15943: if p_commit = FND_API.G_TRUE then
15944: rollback to MOVE_TASK_VERSIONS_IN_BULK;
15945: end if;
15946: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
15947: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
15948: p_procedure_name => 'MOVE_TASK_VERSIONS_IN_BULK',
15949: p_error_text => SUBSTRB(SQLERRM,1,240));
15950: raise;
15953: -- 4218932 Added below update api for update task page for bulk approach
15954:
15955: PROCEDURE Update_Task_All_Info(
15956: p_api_version IN NUMBER :=1.0,
15957: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
15958: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
15959: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
15960: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
15961: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
15954:
15955: PROCEDURE Update_Task_All_Info(
15956: p_api_version IN NUMBER :=1.0,
15957: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
15958: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
15959: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
15960: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
15961: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
15962: p_debug_mode IN VARCHAR2 :='N',
15955: PROCEDURE Update_Task_All_Info(
15956: p_api_version IN NUMBER :=1.0,
15957: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
15958: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
15959: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
15960: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
15961: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
15962: p_debug_mode IN VARCHAR2 :='N',
15963: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
15956: p_api_version IN NUMBER :=1.0,
15957: p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE,
15958: p_commit IN VARCHAR2 :=FND_API.G_FALSE,
15959: p_validate_only IN VARCHAR2 :=FND_API.G_TRUE,
15960: p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL,
15961: p_calling_module IN VARCHAR2 :='SELF_SERVICE',
15962: p_debug_mode IN VARCHAR2 :='N',
15963: p_max_msg_count IN NUMBER :=PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM,
15964: p_task_id_tbl IN SYSTEM.PA_NUM_TBL_TYPE := SYSTEM.PA_NUM_TBL_TYPE(),
16053: IF (p_debug_mode = 'Y') THEN
16054: pa_debug.debug('PA_TASK_PUB1.Update_Task_All_Info begin');
16055: END IF;
16056:
16057: IF (p_commit = FND_API.G_TRUE) THEN
16058: savepoint update_Task_all_info;
16059: END IF;
16060:
16061: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
16057: IF (p_commit = FND_API.G_TRUE) THEN
16058: savepoint update_Task_all_info;
16059: END IF;
16060:
16061: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
16062: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
16063: END IF;
16064:
16065: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
16058: savepoint update_Task_all_info;
16059: END IF;
16060:
16061: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
16062: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
16063: END IF;
16064:
16065: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
16066: FND_MSG_PUB.initialize;
16061: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
16062: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
16063: END IF;
16064:
16065: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
16066: FND_MSG_PUB.initialize;
16067: END IF;
16068:
16069: x_return_status := FND_API.G_RET_STS_SUCCESS;
16065: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
16066: FND_MSG_PUB.initialize;
16067: END IF;
16068:
16069: x_return_status := FND_API.G_RET_STS_SUCCESS;
16070:
16071: IF nvl(p_task_id_tbl.last,0) >= 1 THEN
16072: l_tcnt := 0; -- added for --bug 8301015
16073:
16130: ,x_msg_count => l_msg_count
16131: ,x_msg_data => l_msg_data
16132: );
16133:
16134: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
16135: x_msg_count := FND_MSG_PUB.count_msg;
16136: IF x_msg_count = 1 then
16137: pa_interface_utils_pub.get_messages
16138: (
16135: x_msg_count := FND_MSG_PUB.count_msg;
16136: IF x_msg_count = 1 then
16137: pa_interface_utils_pub.get_messages
16138: (
16139: p_encoded => FND_API.G_FALSE, /*Bug#9045404*/
16140: p_msg_index => 1,
16141: p_msg_count => l_msg_count,
16142: p_msg_data => l_msg_data,
16143: p_data => l_data,
16144: p_msg_index_out => l_msg_index_out
16145: );
16146: x_msg_data := l_data;
16147: END IF;
16148: raise FND_API.G_EXC_ERROR;
16149: END IF;
16150:
16151: PA_TASK_PUB1.Update_Schedule_Version
16152: (
16167: ,x_msg_count => l_msg_count
16168: ,x_msg_data => l_msg_data
16169: );
16170:
16171: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
16172: x_msg_count := FND_MSG_PUB.count_msg;
16173: IF x_msg_count = 1 then
16174: pa_interface_utils_pub.get_messages
16175: (
16172: x_msg_count := FND_MSG_PUB.count_msg;
16173: IF x_msg_count = 1 then
16174: pa_interface_utils_pub.get_messages
16175: (
16176: p_encoded => FND_API.G_TRUE,
16177: p_msg_index => 1,
16178: p_msg_count => l_msg_count,
16179: p_msg_data => l_msg_data,
16180: p_data => l_data,
16181: p_msg_index_out => l_msg_index_out
16182: );
16183: x_msg_data := l_data;
16184: END IF;
16185: raise FND_API.G_EXC_ERROR;
16186: END IF;
16187:
16188: PA_TASK_PUB1.update_task_det_sch_info
16189: (
16198: ,x_msg_count => l_msg_count
16199: ,x_msg_data => l_msg_data
16200: );
16201:
16202: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
16203: x_msg_count := FND_MSG_PUB.count_msg;
16204: IF x_msg_count = 1 then
16205: pa_interface_utils_pub.get_messages
16206: (
16203: x_msg_count := FND_MSG_PUB.count_msg;
16204: IF x_msg_count = 1 then
16205: pa_interface_utils_pub.get_messages
16206: (
16207: p_encoded => FND_API.G_TRUE,
16208: p_msg_index => 1,
16209: p_msg_count => l_msg_count,
16210: p_msg_data => l_msg_data,
16211: p_data => l_data,
16212: p_msg_index_out => l_msg_index_out
16213: );
16214: x_msg_data := l_data;
16215: END IF;
16216: raise FND_API.G_EXC_ERROR;
16217: END IF;
16218:
16219: IF p_task_weight_method = 'MANUAL' THEN
16220:
16227: ,x_msg_count => l_msg_count
16228: ,x_msg_data => l_msg_data
16229: );
16230:
16231: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
16232: x_msg_count := FND_MSG_PUB.count_msg;
16233: IF x_msg_count = 1 then
16234: pa_interface_utils_pub.get_messages
16235: (
16232: x_msg_count := FND_MSG_PUB.count_msg;
16233: IF x_msg_count = 1 then
16234: pa_interface_utils_pub.get_messages
16235: (
16236: p_encoded => FND_API.G_TRUE,
16237: p_msg_index => 1,
16238: p_msg_count => l_msg_count,
16239: p_msg_data => l_msg_data,
16240: p_data => l_data,
16241: p_msg_index_out => l_msg_index_out
16242: );
16243: x_msg_data := l_data;
16244: END IF;
16245: raise FND_API.G_EXC_ERROR;
16246: END IF;
16247: END IF;
16248:
16249: END LOOP;
16269: x_return_status => l_return_status,
16270: x_msg_count => l_msg_count,
16271: x_msg_data => l_msg_data);
16272:
16273: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
16274: PA_UTILS.ADD_MESSAGE('PA', l_msg_data);
16275: END IF;
16276:
16277: END IF;
16286: x_return_status => l_return_status,
16287: x_msg_count => l_msg_count,
16288: x_msg_data => l_msg_data);
16289:
16290: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
16291: PA_UTILS.ADD_MESSAGE('PA', l_msg_data);
16292: END IF;
16293:
16294: END IF;
16297: IF (l_msg_count > 0) THEN
16298: x_msg_count := l_msg_count;
16299: IF (x_msg_count = 1) THEN
16300: pa_interface_utils_pub.get_messages(
16301: p_encoded => FND_API.G_TRUE,
16302: p_msg_index => 1,
16303: p_data => l_data,
16304: p_msg_index_out => l_msg_index_out);
16305: x_msg_data := l_data;
16303: p_data => l_data,
16304: p_msg_index_out => l_msg_index_out);
16305: x_msg_data := l_data;
16306: END IF;
16307: RAISE FND_API.G_EXC_ERROR;
16308: END IF;
16309:
16310: EXIT when l_tcnt = l_task_dates.Last;
16311: l_tcnt := l_task_dates.NEXT(l_tcnt);
16317: /* End of changes for --bug 8301015 */
16318:
16319: END IF;
16320:
16321: IF (p_commit = FND_API.G_TRUE) THEN
16322: COMMIT;
16323: END IF;
16324:
16325: IF (p_debug_mode = 'Y') THEN
16326: pa_debug.debug('PA_TASK_PUB1.Update_Task_All_Info END');
16327: END IF;
16328:
16329: EXCEPTION
16330: when FND_API.G_EXC_ERROR then
16331: if p_commit = FND_API.G_TRUE then
16332: rollback to update_Task_all_info;
16333: end if;
16334: x_return_status := FND_API.G_RET_STS_ERROR;
16327: END IF;
16328:
16329: EXCEPTION
16330: when FND_API.G_EXC_ERROR then
16331: if p_commit = FND_API.G_TRUE then
16332: rollback to update_Task_all_info;
16333: end if;
16334: x_return_status := FND_API.G_RET_STS_ERROR;
16335: when FND_API.G_EXC_UNEXPECTED_ERROR then
16330: when FND_API.G_EXC_ERROR then
16331: if p_commit = FND_API.G_TRUE then
16332: rollback to update_Task_all_info;
16333: end if;
16334: x_return_status := FND_API.G_RET_STS_ERROR;
16335: when FND_API.G_EXC_UNEXPECTED_ERROR then
16336: if p_commit = FND_API.G_TRUE then
16337: rollback to update_Task_all_info;
16338: end if;
16331: if p_commit = FND_API.G_TRUE then
16332: rollback to update_Task_all_info;
16333: end if;
16334: x_return_status := FND_API.G_RET_STS_ERROR;
16335: when FND_API.G_EXC_UNEXPECTED_ERROR then
16336: if p_commit = FND_API.G_TRUE then
16337: rollback to update_Task_all_info;
16338: end if;
16339: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
16332: rollback to update_Task_all_info;
16333: end if;
16334: x_return_status := FND_API.G_RET_STS_ERROR;
16335: when FND_API.G_EXC_UNEXPECTED_ERROR then
16336: if p_commit = FND_API.G_TRUE then
16337: rollback to update_Task_all_info;
16338: end if;
16339: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
16340: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
16335: when FND_API.G_EXC_UNEXPECTED_ERROR then
16336: if p_commit = FND_API.G_TRUE then
16337: rollback to update_Task_all_info;
16338: end if;
16339: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
16340: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
16341: p_procedure_name => 'Update_Task_All_Info',
16342: p_error_text => SUBSTRB(SQLERRM,1,240));
16343: when OTHERS then
16340: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
16341: p_procedure_name => 'Update_Task_All_Info',
16342: p_error_text => SUBSTRB(SQLERRM,1,240));
16343: when OTHERS then
16344: if p_commit = FND_API.G_TRUE then
16345: rollback to update_Task_all_info;
16346: end if;
16347: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
16348: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
16343: when OTHERS then
16344: if p_commit = FND_API.G_TRUE then
16345: rollback to update_Task_all_info;
16346: end if;
16347: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
16348: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
16349: p_procedure_name => 'Update_Task_All_Info',
16350: p_error_text => SUBSTRB(SQLERRM,1,240));
16351: raise;
16355: -- 4429929 : Added CANCEL_TASK
16356: PROCEDURE CANCEL_TASK(
16357: p_calling_module IN VARCHAR2 :='SELF_SERVICE'
16358: ,p_api_version IN NUMBER :=1.0
16359: ,p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE
16360: ,p_validate_only IN VARCHAR2 :=FND_API.G_FALSE
16361: ,p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL
16362: ,p_calling_mode IN VARCHAR2 :=null
16363: ,p_task_id IN NUMBER
16356: PROCEDURE CANCEL_TASK(
16357: p_calling_module IN VARCHAR2 :='SELF_SERVICE'
16358: ,p_api_version IN NUMBER :=1.0
16359: ,p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE
16360: ,p_validate_only IN VARCHAR2 :=FND_API.G_FALSE
16361: ,p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL
16362: ,p_calling_mode IN VARCHAR2 :=null
16363: ,p_task_id IN NUMBER
16364: ,p_task_version_id IN NUMBER
16357: p_calling_module IN VARCHAR2 :='SELF_SERVICE'
16358: ,p_api_version IN NUMBER :=1.0
16359: ,p_init_msg_list IN VARCHAR2 :=FND_API.G_TRUE
16360: ,p_validate_only IN VARCHAR2 :=FND_API.G_FALSE
16361: ,p_validation_level IN NUMBER :=FND_API.G_VALID_LEVEL_FULL
16362: ,p_calling_mode IN VARCHAR2 :=null
16363: ,p_task_id IN NUMBER
16364: ,p_task_version_id IN NUMBER
16365: ,p_project_id IN NUMBER
16450:
16451: l_version_enabled VARCHAR2(1);
16452:
16453: BEGIN
16454: x_return_status := FND_API.G_RET_STS_SUCCESS;
16455: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
16456: SAVEPOINT CANCEL_TASK_SP;
16457:
16458: IF l_debug_mode = 'Y' THEN
16486:
16487: IF (x_return_status <> 'S') THEN
16488: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
16489: p_msg_name => l_error_message_code);
16490: raise FND_API.G_EXC_ERROR;
16491: END IF;
16492: IF l_debug_mode = 'Y' THEN
16493: pa_debug.write(l_module_name,'Calling set_new_tasks_to_TBD', 3);
16494: END IF;
16505: pa_debug.write(l_module_name,'After Call set_new_tasks_to_TBD x_return_status='||x_return_status, 3);
16506: END IF;
16507:
16508: IF (x_return_status <> 'S') THEN
16509: raise FND_API.G_EXC_ERROR;
16510: END IF;
16511:
16512: IF l_debug_mode = 'Y' THEN
16513: pa_debug.write(l_module_name,'Calling push_down_task_status', 3);
16528: pa_debug.write(l_module_name,'After Call push_down_task_status x_return_status='||x_return_status, 3);
16529: END IF;
16530:
16531: IF (x_return_status <> 'S') THEN
16532: raise FND_API.G_EXC_ERROR;
16533: END IF;
16534:
16535: l_version_enabled := PA_WORKPLAN_ATTR_UTILS.CHECK_WP_VERSIONING_ENABLED(p_project_id);
16536:
16565: --4533534
16566: --IF ((l_version_enabled = 'N') OR (l_version_enabled = 'Y' AND NVL(l_all_links.task_unpub_ver_status_code,'WORKING') <> 'PUBLISHED'))
16567:
16568: PA_RELATIONSHIP_PUB.Delete_SubProject_Association
16569: ( p_init_msg_list => FND_API.G_FALSE,
16570: p_calling_module => p_calling_module,
16571: p_object_relationships_id => l_all_links.object_relationship_id,
16572: p_record_version_number => l_all_links.record_version_number,
16573: x_return_status => x_return_status,
16578: pa_debug.write(l_module_name,'After Call Delete_SubProject_Association x_return_status='||x_return_status, 3);
16579: END IF;
16580:
16581: IF (x_return_status <> 'S') THEN
16582: raise FND_API.G_EXC_ERROR;
16583: END IF;
16584: END LOOP;
16585: END IF;
16586: END LOOP;
16584: END LOOP;
16585: END IF;
16586: END LOOP;
16587: EXCEPTION
16588: when FND_API.G_EXC_ERROR then
16589: x_return_status := FND_API.G_RET_STS_ERROR;
16590: x_msg_count := fnd_msg_pub.count_msg;
16591: ROLLBACK to CANCEL_TASK_SP;
16592: when FND_API.G_EXC_UNEXPECTED_ERROR then
16585: END IF;
16586: END LOOP;
16587: EXCEPTION
16588: when FND_API.G_EXC_ERROR then
16589: x_return_status := FND_API.G_RET_STS_ERROR;
16590: x_msg_count := fnd_msg_pub.count_msg;
16591: ROLLBACK to CANCEL_TASK_SP;
16592: when FND_API.G_EXC_UNEXPECTED_ERROR then
16593: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
16588: when FND_API.G_EXC_ERROR then
16589: x_return_status := FND_API.G_RET_STS_ERROR;
16590: x_msg_count := fnd_msg_pub.count_msg;
16591: ROLLBACK to CANCEL_TASK_SP;
16592: when FND_API.G_EXC_UNEXPECTED_ERROR then
16593: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
16594: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
16595: p_procedure_name => 'CANCEL_TASK',
16596: p_error_text => SUBSTRB(SQLERRM,1,240));
16589: x_return_status := FND_API.G_RET_STS_ERROR;
16590: x_msg_count := fnd_msg_pub.count_msg;
16591: ROLLBACK to CANCEL_TASK_SP;
16592: when FND_API.G_EXC_UNEXPECTED_ERROR then
16593: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
16594: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
16595: p_procedure_name => 'CANCEL_TASK',
16596: p_error_text => SUBSTRB(SQLERRM,1,240));
16597: x_msg_count := fnd_msg_pub.count_msg;
16596: p_error_text => SUBSTRB(SQLERRM,1,240));
16597: x_msg_count := fnd_msg_pub.count_msg;
16598: ROLLBACK to CANCEL_TASK_SP;
16599: when OTHERS then
16600: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
16601: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
16602: p_procedure_name => 'CANCEL_TASK',
16603: p_error_text => SUBSTRB(SQLERRM,1,240));
16604: x_msg_count := fnd_msg_pub.count_msg;
16609: -- Bug Fix 5593736.
16610:
16611: PROCEDURE INDENT_MULTI_TASK_VERSION
16612: (p_api_version IN NUMBER := 1.0
16613: ,p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE
16614: ,p_commit IN VARCHAR2 := FND_API.G_FALSE
16615: ,p_validate_only IN VARCHAR2 := FND_API.G_TRUE
16616: ,p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL
16617: ,p_calling_module IN VARCHAR2 := 'SELF_SERVICE'
16610:
16611: PROCEDURE INDENT_MULTI_TASK_VERSION
16612: (p_api_version IN NUMBER := 1.0
16613: ,p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE
16614: ,p_commit IN VARCHAR2 := FND_API.G_FALSE
16615: ,p_validate_only IN VARCHAR2 := FND_API.G_TRUE
16616: ,p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL
16617: ,p_calling_module IN VARCHAR2 := 'SELF_SERVICE'
16618: ,p_debug_mode IN VARCHAR2 := 'N'
16611: PROCEDURE INDENT_MULTI_TASK_VERSION
16612: (p_api_version IN NUMBER := 1.0
16613: ,p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE
16614: ,p_commit IN VARCHAR2 := FND_API.G_FALSE
16615: ,p_validate_only IN VARCHAR2 := FND_API.G_TRUE
16616: ,p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL
16617: ,p_calling_module IN VARCHAR2 := 'SELF_SERVICE'
16618: ,p_debug_mode IN VARCHAR2 := 'N'
16619: ,p_max_msg_count IN NUMBER := PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
16612: (p_api_version IN NUMBER := 1.0
16613: ,p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE
16614: ,p_commit IN VARCHAR2 := FND_API.G_FALSE
16615: ,p_validate_only IN VARCHAR2 := FND_API.G_TRUE
16616: ,p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL
16617: ,p_calling_module IN VARCHAR2 := 'SELF_SERVICE'
16618: ,p_debug_mode IN VARCHAR2 := 'N'
16619: ,p_max_msg_count IN NUMBER := PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
16620: ,p_project_id IN NUMBER
16683: IF (p_debug_mode = 'Y') THEN
16684: pa_debug.debug('PA_TASK_PUB1.INDENT_MULTI_TASK_VERSION BEGIN');
16685: END IF;
16686:
16687: IF (p_commit = FND_API.G_TRUE) THEN
16688: savepoint indent_multi_task_version;
16689: END IF;
16690:
16691: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
16687: IF (p_commit = FND_API.G_TRUE) THEN
16688: savepoint indent_multi_task_version;
16689: END IF;
16690:
16691: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
16692: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
16693: END IF;
16694:
16695: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
16688: savepoint indent_multi_task_version;
16689: END IF;
16690:
16691: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
16692: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
16693: END IF;
16694:
16695: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
16696: FND_MSG_PUB.initialize;
16691: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
16692: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
16693: END IF;
16694:
16695: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
16696: FND_MSG_PUB.initialize;
16697: END IF;
16698:
16699: x_return_status := FND_API.G_RET_STS_SUCCESS;
16695: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
16696: FND_MSG_PUB.initialize;
16697: END IF;
16698:
16699: x_return_status := FND_API.G_RET_STS_SUCCESS;
16700:
16701: -- Copy the input paramters to the local pl/sql table.
16702: for h in p_task_version_id_tbl.FIRST..p_task_version_id_tbl.LAST
16703: loop
16749: , x_return_status => l_return_status
16750: , x_msg_count => l_msg_count
16751: , x_msg_data => l_msg_data);
16752:
16753: if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then
16754:
16755: -- Store the task name and task number in the local pl/sql error table.
16756: open l_cur_task_attr(p_project_id, l_task_in_tbl(k).task_version_id);
16757: fetch l_cur_task_attr into l_task_error_tbl(k).task_name, l_task_error_tbl(k).task_number ;
16758: close l_cur_task_attr;
16759:
16760: -- Store the message code for the error message reported in the local pl/sql error table.
16761: PA_INTERFACE_UTILS_PUB.get_messages
16762: (p_encoded => FND_API.G_FALSE -- Get the encoded message.
16763: , p_msg_index => 1 -- Get the message at index 1.
16764: , p_data => l_task_error_tbl(k).error_msg
16765: , p_msg_index_out => l_msg_index_out);
16766:
16773:
16774: if (l_error_count > 0) then
16775:
16776: -- Set the return status to error.
16777: x_return_status := FND_API.G_RET_STS_ERROR;
16778:
16779: -- Clear all previous messages from the message stack.
16780: FND_MSG_PUB.initialize;
16781:
16798: ,'ERRORMSG', l_task_error_tbl(l).error_msg);
16799: end if;
16800: end loop;
16801:
16802: raise FND_API.G_EXC_ERROR;
16803:
16804: end if;
16805:
16806: IF (p_commit = FND_API.G_TRUE) THEN
16802: raise FND_API.G_EXC_ERROR;
16803:
16804: end if;
16805:
16806: IF (p_commit = FND_API.G_TRUE) THEN
16807: COMMIT;
16808: END IF;
16809:
16810: IF (p_debug_mode = 'Y') THEN
16812: END IF;
16813:
16814: EXCEPTION
16815:
16816: when FND_API.G_EXC_ERROR then
16817: if p_commit = FND_API.G_TRUE then
16818: rollback to indent_multi_task_version;
16819: end if;
16820: x_return_status := FND_API.G_RET_STS_ERROR;
16813:
16814: EXCEPTION
16815:
16816: when FND_API.G_EXC_ERROR then
16817: if p_commit = FND_API.G_TRUE then
16818: rollback to indent_multi_task_version;
16819: end if;
16820: x_return_status := FND_API.G_RET_STS_ERROR;
16821:
16816: when FND_API.G_EXC_ERROR then
16817: if p_commit = FND_API.G_TRUE then
16818: rollback to indent_multi_task_version;
16819: end if;
16820: x_return_status := FND_API.G_RET_STS_ERROR;
16821:
16822: when FND_API.G_EXC_UNEXPECTED_ERROR then
16823: if p_commit = FND_API.G_TRUE then
16824: rollback to indent_multi_task_version;
16818: rollback to indent_multi_task_version;
16819: end if;
16820: x_return_status := FND_API.G_RET_STS_ERROR;
16821:
16822: when FND_API.G_EXC_UNEXPECTED_ERROR then
16823: if p_commit = FND_API.G_TRUE then
16824: rollback to indent_multi_task_version;
16825: end if;
16826: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
16819: end if;
16820: x_return_status := FND_API.G_RET_STS_ERROR;
16821:
16822: when FND_API.G_EXC_UNEXPECTED_ERROR then
16823: if p_commit = FND_API.G_TRUE then
16824: rollback to indent_multi_task_version;
16825: end if;
16826: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
16827: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
16822: when FND_API.G_EXC_UNEXPECTED_ERROR then
16823: if p_commit = FND_API.G_TRUE then
16824: rollback to indent_multi_task_version;
16825: end if;
16826: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
16827: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
16828: p_procedure_name => 'INDENT_MULTI_TASK_VERSION',
16829: p_error_text => SUBSTRB(SQLERRM,1,240));
16830: when OTHERS then
16827: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
16828: p_procedure_name => 'INDENT_MULTI_TASK_VERSION',
16829: p_error_text => SUBSTRB(SQLERRM,1,240));
16830: when OTHERS then
16831: if p_commit = FND_API.G_TRUE then
16832: rollback to indent_multi_task_version;
16833: end if;
16834: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
16835: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
16830: when OTHERS then
16831: if p_commit = FND_API.G_TRUE then
16832: rollback to indent_multi_task_version;
16833: end if;
16834: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
16835: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
16836: p_procedure_name => 'INDENT_MULTI_TASK_VERSION',
16837: p_error_text => SUBSTRB(SQLERRM,1,240));
16838:
16841: END INDENT_MULTI_TASK_VERSION;
16842:
16843: PROCEDURE OUTDENT_MULTI_TASK_VERSION
16844: (p_api_version IN NUMBER := 1.0
16845: ,p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE
16846: ,p_commit IN VARCHAR2 := FND_API.G_FALSE
16847: ,p_validate_only IN VARCHAR2 := FND_API.G_TRUE
16848: ,p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL
16849: ,p_calling_module IN VARCHAR2 := 'SELF_SERVICE'
16842:
16843: PROCEDURE OUTDENT_MULTI_TASK_VERSION
16844: (p_api_version IN NUMBER := 1.0
16845: ,p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE
16846: ,p_commit IN VARCHAR2 := FND_API.G_FALSE
16847: ,p_validate_only IN VARCHAR2 := FND_API.G_TRUE
16848: ,p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL
16849: ,p_calling_module IN VARCHAR2 := 'SELF_SERVICE'
16850: ,p_debug_mode IN VARCHAR2 := 'N'
16843: PROCEDURE OUTDENT_MULTI_TASK_VERSION
16844: (p_api_version IN NUMBER := 1.0
16845: ,p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE
16846: ,p_commit IN VARCHAR2 := FND_API.G_FALSE
16847: ,p_validate_only IN VARCHAR2 := FND_API.G_TRUE
16848: ,p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL
16849: ,p_calling_module IN VARCHAR2 := 'SELF_SERVICE'
16850: ,p_debug_mode IN VARCHAR2 := 'N'
16851: ,p_max_msg_count IN NUMBER := PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
16844: (p_api_version IN NUMBER := 1.0
16845: ,p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE
16846: ,p_commit IN VARCHAR2 := FND_API.G_FALSE
16847: ,p_validate_only IN VARCHAR2 := FND_API.G_TRUE
16848: ,p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL
16849: ,p_calling_module IN VARCHAR2 := 'SELF_SERVICE'
16850: ,p_debug_mode IN VARCHAR2 := 'N'
16851: ,p_max_msg_count IN NUMBER := PA_INTERFACE_UTILS_PUB.G_PA_MISS_NUM
16852: ,p_project_id IN NUMBER
16915: IF (p_debug_mode = 'Y') THEN
16916: pa_debug.debug('PA_TASK_PUB1.OUTDENT_MULTI_TASK_VERSION BEGIN');
16917: END IF;
16918:
16919: IF (p_commit = FND_API.G_TRUE) THEN
16920: savepoint outdent_multi_task_version;
16921: END IF;
16922:
16923: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
16919: IF (p_commit = FND_API.G_TRUE) THEN
16920: savepoint outdent_multi_task_version;
16921: END IF;
16922:
16923: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
16924: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
16925: END IF;
16926:
16927: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
16920: savepoint outdent_multi_task_version;
16921: END IF;
16922:
16923: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
16924: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
16925: END IF;
16926:
16927: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
16928: FND_MSG_PUB.initialize;
16923: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version, p_api_version, l_api_name, g_pkg_name) then
16924: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
16925: END IF;
16926:
16927: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
16928: FND_MSG_PUB.initialize;
16929: END IF;
16930:
16931: x_return_status := FND_API.G_RET_STS_SUCCESS;
16927: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_FALSE)) THEN
16928: FND_MSG_PUB.initialize;
16929: END IF;
16930:
16931: x_return_status := FND_API.G_RET_STS_SUCCESS;
16932:
16933: -- Copy the input paramters to the local pl/sql table.
16934: for h in p_task_version_id_tbl.FIRST..p_task_version_id_tbl.LAST
16935: loop
16981: , x_return_status => l_return_status
16982: , x_msg_count => l_msg_count
16983: , x_msg_data => l_msg_data);
16984:
16985: if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then
16986:
16987: -- Store the task name and task number in the local pl/sql error table.
16988: open l_cur_task_attr(p_project_id, l_task_in_tbl(k).task_version_id);
16989: fetch l_cur_task_attr into l_task_error_tbl(k).task_name, l_task_error_tbl(k).task_number ;
16990: close l_cur_task_attr;
16991:
16992: -- Store the message code for the error message reported in the local pl/sql error table.
16993: PA_INTERFACE_UTILS_PUB.get_messages
16994: (p_encoded => FND_API.G_FALSE -- Get the encoded message.
16995: , p_msg_index => 1 -- Get the message at index 1.
16996: , p_data => l_task_error_tbl(k).error_msg
16997: , p_msg_index_out => l_msg_index_out);
16998:
17005:
17006: if (l_error_count > 0) then
17007:
17008: -- Set the return status to error.
17009: x_return_status := FND_API.G_RET_STS_ERROR;
17010:
17011: -- Clear all previous messages from the message stack.
17012: FND_MSG_PUB.initialize;
17013:
17024: ,'ERRORMSG', l_task_error_tbl(l).error_msg);
17025: end if;
17026: end loop;
17027:
17028: raise FND_API.G_EXC_ERROR;
17029:
17030: end if;
17031:
17032: IF (p_commit = FND_API.G_TRUE) THEN
17028: raise FND_API.G_EXC_ERROR;
17029:
17030: end if;
17031:
17032: IF (p_commit = FND_API.G_TRUE) THEN
17033: COMMIT;
17034: END IF;
17035:
17036: IF (p_debug_mode = 'Y') THEN
17038: END IF;
17039:
17040: EXCEPTION
17041:
17042: when FND_API.G_EXC_ERROR then
17043: if p_commit = FND_API.G_TRUE then
17044: rollback to outdent_multi_task_version;
17045: end if;
17046: x_return_status := FND_API.G_RET_STS_ERROR;
17039:
17040: EXCEPTION
17041:
17042: when FND_API.G_EXC_ERROR then
17043: if p_commit = FND_API.G_TRUE then
17044: rollback to outdent_multi_task_version;
17045: end if;
17046: x_return_status := FND_API.G_RET_STS_ERROR;
17047:
17042: when FND_API.G_EXC_ERROR then
17043: if p_commit = FND_API.G_TRUE then
17044: rollback to outdent_multi_task_version;
17045: end if;
17046: x_return_status := FND_API.G_RET_STS_ERROR;
17047:
17048: when FND_API.G_EXC_UNEXPECTED_ERROR then
17049: if p_commit = FND_API.G_TRUE then
17050: rollback to outdent_multi_task_version;
17044: rollback to outdent_multi_task_version;
17045: end if;
17046: x_return_status := FND_API.G_RET_STS_ERROR;
17047:
17048: when FND_API.G_EXC_UNEXPECTED_ERROR then
17049: if p_commit = FND_API.G_TRUE then
17050: rollback to outdent_multi_task_version;
17051: end if;
17052: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
17045: end if;
17046: x_return_status := FND_API.G_RET_STS_ERROR;
17047:
17048: when FND_API.G_EXC_UNEXPECTED_ERROR then
17049: if p_commit = FND_API.G_TRUE then
17050: rollback to outdent_multi_task_version;
17051: end if;
17052: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
17053: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
17048: when FND_API.G_EXC_UNEXPECTED_ERROR then
17049: if p_commit = FND_API.G_TRUE then
17050: rollback to outdent_multi_task_version;
17051: end if;
17052: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
17053: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
17054: p_procedure_name => 'OUTDENT_MULTI_TASK_VERSION',
17055: p_error_text => SUBSTRB(SQLERRM,1,240));
17056: when OTHERS then
17053: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
17054: p_procedure_name => 'OUTDENT_MULTI_TASK_VERSION',
17055: p_error_text => SUBSTRB(SQLERRM,1,240));
17056: when OTHERS then
17057: if p_commit = FND_API.G_TRUE then
17058: rollback to outdent_multi_task_version;
17059: end if;
17060: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
17061: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
17056: when OTHERS then
17057: if p_commit = FND_API.G_TRUE then
17058: rollback to outdent_multi_task_version;
17059: end if;
17060: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
17061: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_TASK_PUB1',
17062: p_procedure_name => 'OUTDENT_MULTI_TASK_VERSION',
17063: p_error_text => SUBSTRB(SQLERRM,1,240));
17064:
17174: from pa_projects_all
17175: where project_id = l_project_id;
17176:
17177: --hsiu: 3604086
17178: x_return_status := FND_API.G_RET_STS_SUCCESS;
17179: j:=0;
17180: l_msg_count := 0;
17181: l_return_status := FND_API.G_RET_STS_SUCCESS;
17182:
17177: --hsiu: 3604086
17178: x_return_status := FND_API.G_RET_STS_SUCCESS;
17179: j:=0;
17180: l_msg_count := 0;
17181: l_return_status := FND_API.G_RET_STS_SUCCESS;
17182:
17183: for i in p_task_id_tbl.FIRST..p_task_id_tbl.LAST loop
17184:
17185: select ppvsch.scheduled_start_date,ppvsch.scheduled_finish_date
17188: where ppe.proj_element_id = ppv.proj_element_id
17189: and ppv.element_version_id = ppvsch.element_version_id
17190: and ppe.proj_element_id = p_task_id_tbl(i);
17191:
17192: l_return_status := FND_API.G_RET_STS_SUCCESS ;
17193: l_msg_count := 0 ;
17194: l_msg_data := null ;
17195:
17196: open parent_task_status(p_task_id_tbl(i));
17200:
17201: if(l_parent_task_status is not null)
17202: then
17203: x_msg_count:=1;
17204: raise FND_API.G_EXC_ERROR;
17205: end if;
17206:
17207:
17208:
17208:
17209: PA_TASKS_MAINT_PUB.CREATE_TASK
17210: (
17211: p_calling_module => 'SELF_SERVICE'
17212: ,p_init_msg_list => FND_API.G_FALSE
17213: ,p_debug_mode => 'N'
17214: ,p_project_id => l_project_id
17215: ,p_reference_task_id => l_parent_id
17216: ,p_peer_or_sub => 'SUB'
17225: ,x_msg_count =>l_msg_count
17226: ,x_msg_data =>l_msg_data
17227: );
17228:
17229: if l_return_status = FND_API.G_RET_STS_SUCCESS THEN
17230: open task_ntf(p_task_id_tbl(i),l_project_id);
17231: fetch task_ntf into l_ntf_id;
17232: close task_ntf;
17233: if(l_ntf_id is not null)
17277: END LOOP;
17278:
17279: if j>0
17280: then
17281: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
17282: x_msg_count := 1;
17283: rollback;
17284: else
17285: x_return_status := FND_API.G_RET_STS_SUCCESS;
17281: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
17282: x_msg_count := 1;
17283: rollback;
17284: else
17285: x_return_status := FND_API.G_RET_STS_SUCCESS;
17286: x_msg_count := 0;
17287: commit;
17288: end if;
17289: x_msg_data:=l_msg_data;
17288: end if;
17289: x_msg_data:=l_msg_data;
17290: EXCEPTION
17291:
17292: WHEN FND_API.G_EXC_ERROR THEN
17293: rollback;
17294: FND_MSG_PUB.initialize;
17295:
17296: -- Populate the generic error message.
17294: FND_MSG_PUB.initialize;
17295:
17296: -- Populate the generic error message.
17297: PA_UTILS.ADD_MESSAGE('PA','PA_PARENT_TASK_UNAPPROVED');
17298: x_return_status := FND_API.G_RET_STS_ERROR;
17299: x_msg_count :=0;
17300: x_msg_data := 'PA_PARENT_TASK_UNAPPROVED';
17301:
17302: WHEN OTHERS THEN
17299: x_msg_count :=0;
17300: x_msg_data := 'PA_PARENT_TASK_UNAPPROVED';
17301:
17302: WHEN OTHERS THEN
17303: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
17304: x_msg_count := 1;
17305: x_msg_data := 'ANURAG';
17306: RAISE ;
17307: