96:
97: x_msg_count := 0;
98: x_return_status := FND_API.G_RET_STS_SUCCESS;
99:
100: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
101: IF l_debug_mode = 'Y' THEN
102: PA_DEBUG.set_curr_function( p_function => 'DELETE_MAPPING',
103: p_debug_mode => l_debug_mode );
104: END IF;
98: x_return_status := FND_API.G_RET_STS_SUCCESS;
99:
100: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
101: IF l_debug_mode = 'Y' THEN
102: PA_DEBUG.set_curr_function( p_function => 'DELETE_MAPPING',
103: p_debug_mode => l_debug_mode );
104: END IF;
105:
106: IF l_debug_mode = 'Y' THEN
103: p_debug_mode => l_debug_mode );
104: END IF;
105:
106: IF l_debug_mode = 'Y' THEN
107: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_MAPPING : Printing Input parameters';
108: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
109: l_debug_level3);
110:
111: Pa_Debug.WRITE(g_module_name,'p_wp_from_task_name'||':'||p_wp_from_task_name,
104: END IF;
105:
106: IF l_debug_mode = 'Y' THEN
107: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_MAPPING : Printing Input parameters';
108: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
109: l_debug_level3);
110:
111: Pa_Debug.WRITE(g_module_name,'p_wp_from_task_name'||':'||p_wp_from_task_name,
112: l_debug_level3);
107: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_MAPPING : Printing Input parameters';
108: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
109: l_debug_level3);
110:
111: Pa_Debug.WRITE(g_module_name,'p_wp_from_task_name'||':'||p_wp_from_task_name,
112: l_debug_level3);
113:
114: Pa_Debug.WRITE(g_module_name,'p_wp_task_version_id'||':'||p_wp_task_version_id,
115: l_debug_level3);
110:
111: Pa_Debug.WRITE(g_module_name,'p_wp_from_task_name'||':'||p_wp_from_task_name,
112: l_debug_level3);
113:
114: Pa_Debug.WRITE(g_module_name,'p_wp_task_version_id'||':'||p_wp_task_version_id,
115: l_debug_level3);
116:
117: Pa_Debug.WRITE(g_module_name,'p_fp_task_version_id'||':'||p_fp_task_version_id,
118: l_debug_level3);
113:
114: Pa_Debug.WRITE(g_module_name,'p_wp_task_version_id'||':'||p_wp_task_version_id,
115: l_debug_level3);
116:
117: Pa_Debug.WRITE(g_module_name,'p_fp_task_version_id'||':'||p_fp_task_version_id,
118: l_debug_level3);
119: END IF;
120:
121: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_TRUE)) THEN
126: savepoint DELETE_MAPPING_PUBLIC;
127: END IF;
128:
129: IF l_debug_mode = 'Y' THEN
130: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_MAPPING : Validating Input parameters';
131: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
132: l_debug_level3);
133: END IF;
134:
127: END IF;
128:
129: IF l_debug_mode = 'Y' THEN
130: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_MAPPING : Validating Input parameters';
131: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
132: l_debug_level3);
133: END IF;
134:
135: IF (
137: ( p_fp_task_version_id IS NULL OR p_fp_task_version_id = FND_API.G_MISS_NUM )
138: )
139: THEN
140: IF l_debug_mode = 'Y' THEN
141: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_MAPPING : Both p_wp_task_version_id and p_fp_task_version_id are null';
142: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
143: l_debug_level3);
144: END IF;
145: RAISE Invalid_Arg_Exc_WP;
138: )
139: THEN
140: IF l_debug_mode = 'Y' THEN
141: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_MAPPING : Both p_wp_task_version_id and p_fp_task_version_id are null';
142: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
143: l_debug_level3);
144: END IF;
145: RAISE Invalid_Arg_Exc_WP;
146: END IF;
158: -- Raise exception and populate error message
159: IF ( c_get_mapping_frm_wp_fp_task%NOTFOUND )
160: THEN
161: IF l_debug_mode = 'Y' THEN
162: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_MAPPING : No Mapping Exists';
163: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
164: l_debug_level3);
165: END IF;
166: -- Bug 4142254 : Record has been changes error make sense for Self Service, but from AMG
159: IF ( c_get_mapping_frm_wp_fp_task%NOTFOUND )
160: THEN
161: IF l_debug_mode = 'Y' THEN
162: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_MAPPING : No Mapping Exists';
163: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
164: l_debug_level3);
165: END IF;
166: -- Bug 4142254 : Record has been changes error make sense for Self Service, but from AMG
167: -- it should be "Mapping does not exist between the given tasks."
179: -- if any row found, delete the row
180: IF (l_object_relationship_id IS NOT NULL)
181: THEN
182: IF l_debug_mode = 'Y' THEN
183: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_MAPPING : Calling delete';
184: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
185: l_debug_level3);
186: END IF;
187:
180: IF (l_object_relationship_id IS NOT NULL)
181: THEN
182: IF l_debug_mode = 'Y' THEN
183: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_MAPPING : Calling delete';
184: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
185: l_debug_level3);
186: END IF;
187:
188: -- Call public API for deleting the relationship
216:
217: IF (l_object_relationship_id IS NOT NULL)
218: THEN
219: IF l_debug_mode = 'Y' THEN
220: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_MAPPING : Calling delete';
221: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
222: l_debug_level3);
223: END IF;
224:
217: IF (l_object_relationship_id IS NOT NULL)
218: THEN
219: IF l_debug_mode = 'Y' THEN
220: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_MAPPING : Calling delete';
221: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
222: l_debug_level3);
223: END IF;
224:
225: -- Call public API for deleting the relationship
245: END IF;
246:
247: ELSE
248: IF l_debug_mode = 'Y' THEN
249: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_MAPPING : Mapping does not exist for the passed WP task ID';
250: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
251: l_debug_level3);
252: END IF;
253: END IF;--IF (l_object_relationship_id IS NOT NULL) ENDS
246:
247: ELSE
248: IF l_debug_mode = 'Y' THEN
249: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_MAPPING : Mapping does not exist for the passed WP task ID';
250: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
251: l_debug_level3);
252: END IF;
253: END IF;--IF (l_object_relationship_id IS NOT NULL) ENDS
254:
323: ELSE
324: x_msg_count := l_msg_count;
325: END IF;
326: IF l_debug_mode = 'Y' THEN
327: Pa_Debug.reset_curr_function;
328: END IF;
329:
330: WHEN Invalid_Arg_Exc_WP THEN
331:
353: , p_procedure_name => 'DELETE_MAPPING'
354: , p_error_text => x_msg_data);
355:
356: IF l_debug_mode = 'Y' THEN
357: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
358: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
359: l_debug_level5);
360: Pa_Debug.reset_curr_function;
361: END IF;
354: , p_error_text => x_msg_data);
355:
356: IF l_debug_mode = 'Y' THEN
357: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
358: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
359: l_debug_level5);
360: Pa_Debug.reset_curr_function;
361: END IF;
362: RAISE;
356: IF l_debug_mode = 'Y' THEN
357: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
358: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
359: l_debug_level5);
360: Pa_Debug.reset_curr_function;
361: END IF;
362: RAISE;
363:
364: WHEN OTHERS THEN
388: , p_procedure_name => 'DELETE_MAPPING'
389: , p_error_text => x_msg_data);
390:
391: IF l_debug_mode = 'Y' THEN
392: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
393: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
394: l_debug_level5);
395: Pa_Debug.reset_curr_function;
396: END IF;
389: , p_error_text => x_msg_data);
390:
391: IF l_debug_mode = 'Y' THEN
392: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
393: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
394: l_debug_level5);
395: Pa_Debug.reset_curr_function;
396: END IF;
397: RAISE;
391: IF l_debug_mode = 'Y' THEN
392: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
393: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
394: l_debug_level5);
395: Pa_Debug.reset_curr_function;
396: END IF;
397: RAISE;
398: END DELETE_MAPPING ;
399:
508: BEGIN
509:
510: x_msg_count := 0;
511: x_return_status := FND_API.G_RET_STS_SUCCESS;
512: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
513:
514: IF l_debug_mode = 'Y' THEN
515: PA_DEBUG.set_curr_function( p_function => 'CREATE_MAPPING',
516: p_debug_mode => l_debug_mode );
511: x_return_status := FND_API.G_RET_STS_SUCCESS;
512: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
513:
514: IF l_debug_mode = 'Y' THEN
515: PA_DEBUG.set_curr_function( p_function => 'CREATE_MAPPING',
516: p_debug_mode => l_debug_mode );
517: END IF;
518:
519: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_TRUE)) THEN
524: savepoint CREATE_MAPPING_PUBLIC;
525: END IF;
526:
527: IF l_debug_mode = 'Y' THEN
528: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : Printing Input parameters';
529: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
530: l_debug_level3);
531:
532: Pa_Debug.WRITE(g_module_name,'p_wp_task_name'||':'||p_wp_task_name,
525: END IF;
526:
527: IF l_debug_mode = 'Y' THEN
528: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : Printing Input parameters';
529: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
530: l_debug_level3);
531:
532: Pa_Debug.WRITE(g_module_name,'p_wp_task_name'||':'||p_wp_task_name,
533: l_debug_level3);
528: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : Printing Input parameters';
529: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
530: l_debug_level3);
531:
532: Pa_Debug.WRITE(g_module_name,'p_wp_task_name'||':'||p_wp_task_name,
533: l_debug_level3);
534:
535: Pa_Debug.WRITE(g_module_name,'p_wp_task_version_id'||':'||p_wp_task_version_id,
536: l_debug_level3);
531:
532: Pa_Debug.WRITE(g_module_name,'p_wp_task_name'||':'||p_wp_task_name,
533: l_debug_level3);
534:
535: Pa_Debug.WRITE(g_module_name,'p_wp_task_version_id'||':'||p_wp_task_version_id,
536: l_debug_level3);
537:
538: Pa_Debug.WRITE(g_module_name,'p_parent_str_version_id'||':'||p_parent_str_version_id,
539: l_debug_level3);
534:
535: Pa_Debug.WRITE(g_module_name,'p_wp_task_version_id'||':'||p_wp_task_version_id,
536: l_debug_level3);
537:
538: Pa_Debug.WRITE(g_module_name,'p_parent_str_version_id'||':'||p_parent_str_version_id,
539: l_debug_level3);
540:
541: Pa_Debug.WRITE(g_module_name,'p_fp_task_version_id'||':'||p_fp_task_version_id,
542: l_debug_level3);
537:
538: Pa_Debug.WRITE(g_module_name,'p_parent_str_version_id'||':'||p_parent_str_version_id,
539: l_debug_level3);
540:
541: Pa_Debug.WRITE(g_module_name,'p_fp_task_version_id'||':'||p_fp_task_version_id,
542: l_debug_level3);
543: Pa_Debug.WRITE(g_module_name,'p_fp_task_name'||':'||p_fp_task_name,
544: l_debug_level3);
545: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
539: l_debug_level3);
540:
541: Pa_Debug.WRITE(g_module_name,'p_fp_task_version_id'||':'||p_fp_task_version_id,
542: l_debug_level3);
543: Pa_Debug.WRITE(g_module_name,'p_fp_task_name'||':'||p_fp_task_name,
544: l_debug_level3);
545: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
546: l_debug_level3);
547: END IF;
541: Pa_Debug.WRITE(g_module_name,'p_fp_task_version_id'||':'||p_fp_task_version_id,
542: l_debug_level3);
543: Pa_Debug.WRITE(g_module_name,'p_fp_task_name'||':'||p_fp_task_name,
544: l_debug_level3);
545: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
546: l_debug_level3);
547: END IF;
548:
549: IF l_debug_mode = 'Y' THEN
546: l_debug_level3);
547: END IF;
548:
549: IF l_debug_mode = 'Y' THEN
550: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : Validating Input parameters';
551: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage, l_debug_level3);
552: END IF;
553:
554: --Check if project id is null , raise an error
547: END IF;
548:
549: IF l_debug_mode = 'Y' THEN
550: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : Validating Input parameters';
551: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage, l_debug_level3);
552: END IF;
553:
554: --Check if project id is null , raise an error
555: IF (p_project_id is NULL)
554: --Check if project id is null , raise an error
555: IF (p_project_id is NULL)
556: THEN
557: IF l_debug_mode = 'Y' THEN
558: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : project id can not be null';
559: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
560: l_debug_level3);
561: END IF;
562: RAISE Invalid_Arg_Exc_WP;
555: IF (p_project_id is NULL)
556: THEN
557: IF l_debug_mode = 'Y' THEN
558: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : project id can not be null';
559: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
560: l_debug_level3);
561: END IF;
562: RAISE Invalid_Arg_Exc_WP;
563: END IF;
601: )
602: )
603: THEN
604: IF l_debug_mode = 'Y' THEN
605: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : Both work plan task id and task name are null';
606: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
607: l_debug_level3);
608: END IF;
609: RAISE Invalid_Arg_Exc_WP;
602: )
603: THEN
604: IF l_debug_mode = 'Y' THEN
605: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : Both work plan task id and task name are null';
606: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
607: l_debug_level3);
608: END IF;
609: RAISE Invalid_Arg_Exc_WP;
610: END IF;
618: )
619: )
620: THEN
621: IF l_debug_mode = 'Y' THEN
622: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : parent structue version id can not be null, if wp task name is not null';
623: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
624: l_debug_level3);
625: END IF;
626: RAISE Invalid_Arg_Exc_WP;
619: )
620: THEN
621: IF l_debug_mode = 'Y' THEN
622: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : parent structue version id can not be null, if wp task name is not null';
623: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
624: l_debug_level3);
625: END IF;
626: RAISE Invalid_Arg_Exc_WP;
627: END IF;
660: ELSIF ( p_fp_task_name IS NOT NULL AND p_fp_task_name <> FND_API.G_MISS_CHAR )
661: THEN
662: -- get the fp_task_version_id and place it in l_fp_task_version_id;
663: -- Assuming there will be only one version for the FP task.
664: Pa_Debug.WRITE('test',l_fp_task_version_id, l_debug_level3);
665: OPEN c_get_fp_task_ver_id_frm_name ( p_fp_task_name , p_project_id );
666: FETCH c_get_fp_task_ver_id_frm_name INTO l_fp_task_version_id ;
667: IF ( c_get_fp_task_ver_id_frm_name%NOTFOUND )
668: THEN
674:
675: END IF;
676:
677: IF l_debug_mode = 'Y' THEN
678: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : Calling PA_PROJ_STRUC_MAPPING_UTILS.CHECK_CREATE_MAPPING_OK ';
679: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage, l_debug_level3);
680: END IF;
681:
682: -- Call util API to check whether the mapping can be created
675: END IF;
676:
677: IF l_debug_mode = 'Y' THEN
678: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : Calling PA_PROJ_STRUC_MAPPING_UTILS.CHECK_CREATE_MAPPING_OK ';
679: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage, l_debug_level3);
680: END IF;
681:
682: -- Call util API to check whether the mapping can be created
683: PA_PROJ_STRUC_MAPPING_UTILS.CHECK_CREATE_MAPPING_OK
697: THEN
698:
699: -- Mapping can't be created
700: IF l_debug_mode = 'Y' THEN
701: Pa_Debug.g_err_stage:= ' PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : '|| l_error_message_code;
702: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
703: l_debug_level3);
704: END IF;
705: Pa_Utils.ADD_MESSAGE
698:
699: -- Mapping can't be created
700: IF l_debug_mode = 'Y' THEN
701: Pa_Debug.g_err_stage:= ' PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : '|| l_error_message_code;
702: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
703: l_debug_level3);
704: END IF;
705: Pa_Utils.ADD_MESSAGE
706: ( p_app_short_name => 'PA',
708: RAISE FND_API.G_EXC_ERROR;
709: ELSE
710: -- Mapping Can be created, call public API to create mapping
711: IF l_debug_mode = 'Y' THEN
712: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : Calling create'||l_wp_task_version_id||l_fp_task_version_id;
713: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
714: l_debug_level3);
715: END IF;
716:
709: ELSE
710: -- Mapping Can be created, call public API to create mapping
711: IF l_debug_mode = 'Y' THEN
712: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : Calling create'||l_wp_task_version_id||l_fp_task_version_id;
713: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
714: l_debug_level3);
715: END IF;
716:
717: --Call public API to create the mapping
767: ELSE
768: x_msg_count := l_msg_count;
769: END IF;
770: IF l_debug_mode = 'Y' THEN
771: Pa_Debug.reset_curr_function;
772: END IF;
773:
774: WHEN Invalid_Arg_Exc_WP THEN
775:
786: , p_procedure_name => 'CREATE_MAPPING'
787: , p_error_text => x_msg_data);
788:
789: IF l_debug_mode = 'Y' THEN
790: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
791: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
792: l_debug_level5);
793: Pa_Debug.reset_curr_function;
794: END IF;
787: , p_error_text => x_msg_data);
788:
789: IF l_debug_mode = 'Y' THEN
790: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
791: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
792: l_debug_level5);
793: Pa_Debug.reset_curr_function;
794: END IF;
795: RAISE;
789: IF l_debug_mode = 'Y' THEN
790: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
791: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
792: l_debug_level5);
793: Pa_Debug.reset_curr_function;
794: END IF;
795: RAISE;
796:
797:
803:
804: IF (p_commit = FND_API.G_TRUE) THEN
805: ROLLBACK TO CREATE_MAPPING_PUBLIC;
806: END IF;
807: Pa_Debug.g_err_stage:= 'x_msg_count='||x_msg_count;
808: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage, l_debug_level5);
809:
810:
811: Fnd_Msg_Pub.add_exc_msg
804: IF (p_commit = FND_API.G_TRUE) THEN
805: ROLLBACK TO CREATE_MAPPING_PUBLIC;
806: END IF;
807: Pa_Debug.g_err_stage:= 'x_msg_count='||x_msg_count;
808: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage, l_debug_level5);
809:
810:
811: Fnd_Msg_Pub.add_exc_msg
812: ( p_pkg_name => 'PA_PROJ_STRUC_MAPPING_PUB'
811: Fnd_Msg_Pub.add_exc_msg
812: ( p_pkg_name => 'PA_PROJ_STRUC_MAPPING_PUB'
813: , p_procedure_name => 'CREATE_MAPPING'
814: , p_error_text => x_msg_data);
815: Pa_Debug.g_err_stage:= 'x_msg_count='||x_msg_count;
816: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage, l_debug_level5);
817:
818:
819: IF l_debug_mode = 'Y' THEN
812: ( p_pkg_name => 'PA_PROJ_STRUC_MAPPING_PUB'
813: , p_procedure_name => 'CREATE_MAPPING'
814: , p_error_text => x_msg_data);
815: Pa_Debug.g_err_stage:= 'x_msg_count='||x_msg_count;
816: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage, l_debug_level5);
817:
818:
819: IF l_debug_mode = 'Y' THEN
820: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
816: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage, l_debug_level5);
817:
818:
819: IF l_debug_mode = 'Y' THEN
820: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
821: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
822: l_debug_level5);
823: Pa_Debug.reset_curr_function;
824: END IF;
817:
818:
819: IF l_debug_mode = 'Y' THEN
820: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
821: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
822: l_debug_level5);
823: Pa_Debug.reset_curr_function;
824: END IF;
825: RAISE;
819: IF l_debug_mode = 'Y' THEN
820: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
821: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
822: l_debug_level5);
823: Pa_Debug.reset_curr_function;
824: END IF;
825: RAISE;
826: END CREATE_MAPPING ;
827:
954: BEGIN
955:
956: x_msg_count := 0;
957: x_return_status := FND_API.G_RET_STS_SUCCESS;
958: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
959:
960:
961: IF l_debug_mode = 'Y' THEN
962: PA_DEBUG.set_curr_function( p_function => 'UPDATE_MAPPING',
958: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
959:
960:
961: IF l_debug_mode = 'Y' THEN
962: PA_DEBUG.set_curr_function( p_function => 'UPDATE_MAPPING',
963: p_debug_mode => l_debug_mode );
964: END IF;
965:
966: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_TRUE)) THEN
971: savepoint UPDATE_MAPPING_PUBLIC;
972: END IF;
973:
974: IF l_debug_mode = 'Y' THEN
975: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : UPDATE_MAPPING : Printing Input parameters';
976: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
977: l_debug_level3);
978:
979: Pa_Debug.WRITE(g_module_name,'p_structure_type'||':'||p_structure_type,
972: END IF;
973:
974: IF l_debug_mode = 'Y' THEN
975: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : UPDATE_MAPPING : Printing Input parameters';
976: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
977: l_debug_level3);
978:
979: Pa_Debug.WRITE(g_module_name,'p_structure_type'||':'||p_structure_type,
980: l_debug_level3);
975: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : UPDATE_MAPPING : Printing Input parameters';
976: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
977: l_debug_level3);
978:
979: Pa_Debug.WRITE(g_module_name,'p_structure_type'||':'||p_structure_type,
980: l_debug_level3);
981:
982: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
983: l_debug_level3);
978:
979: Pa_Debug.WRITE(g_module_name,'p_structure_type'||':'||p_structure_type,
980: l_debug_level3);
981:
982: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
983: l_debug_level3);
984:
985: Pa_Debug.WRITE(g_module_name,'p_wp_task_name'||':'||p_wp_task_name,
986: l_debug_level3);
981:
982: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
983: l_debug_level3);
984:
985: Pa_Debug.WRITE(g_module_name,'p_wp_task_name'||':'||p_wp_task_name,
986: l_debug_level3);
987:
988: Pa_Debug.WRITE(g_module_name,'p_wp_prnt_str_ver_id'||':'||p_wp_prnt_str_ver_id,
989: l_debug_level3);
984:
985: Pa_Debug.WRITE(g_module_name,'p_wp_task_name'||':'||p_wp_task_name,
986: l_debug_level3);
987:
988: Pa_Debug.WRITE(g_module_name,'p_wp_prnt_str_ver_id'||':'||p_wp_prnt_str_ver_id,
989: l_debug_level3);
990: Pa_Debug.WRITE(g_module_name,'p_wp_task_version_id'||':'||p_wp_task_version_id,
991: l_debug_level3);
992: Pa_Debug.WRITE(g_module_name,'p_fp_task_name'||':'||p_fp_task_name,
986: l_debug_level3);
987:
988: Pa_Debug.WRITE(g_module_name,'p_wp_prnt_str_ver_id'||':'||p_wp_prnt_str_ver_id,
989: l_debug_level3);
990: Pa_Debug.WRITE(g_module_name,'p_wp_task_version_id'||':'||p_wp_task_version_id,
991: l_debug_level3);
992: Pa_Debug.WRITE(g_module_name,'p_fp_task_name'||':'||p_fp_task_name,
993: l_debug_level3);
994:
988: Pa_Debug.WRITE(g_module_name,'p_wp_prnt_str_ver_id'||':'||p_wp_prnt_str_ver_id,
989: l_debug_level3);
990: Pa_Debug.WRITE(g_module_name,'p_wp_task_version_id'||':'||p_wp_task_version_id,
991: l_debug_level3);
992: Pa_Debug.WRITE(g_module_name,'p_fp_task_name'||':'||p_fp_task_name,
993: l_debug_level3);
994:
995: Pa_Debug.WRITE(g_module_name,'p_fp_task_version_id'||':'||p_fp_task_version_id,
996: l_debug_level3);
991: l_debug_level3);
992: Pa_Debug.WRITE(g_module_name,'p_fp_task_name'||':'||p_fp_task_name,
993: l_debug_level3);
994:
995: Pa_Debug.WRITE(g_module_name,'p_fp_task_version_id'||':'||p_fp_task_version_id,
996: l_debug_level3);
997: END IF;
998:
999: IF l_debug_mode = 'Y' THEN
996: l_debug_level3);
997: END IF;
998:
999: IF l_debug_mode = 'Y' THEN
1000: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : UPDATE_MAPPING : Validating Input parameters';
1001: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1002: l_debug_level3);
1003: END IF;
1004:
997: END IF;
998:
999: IF l_debug_mode = 'Y' THEN
1000: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : UPDATE_MAPPING : Validating Input parameters';
1001: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1002: l_debug_level3);
1003: END IF;
1004:
1005: -- if PROJECT id IS NULL RAISE ERROR MESSAGE
1005: -- if PROJECT id IS NULL RAISE ERROR MESSAGE
1006: IF (p_project_id is NULL)
1007: THEN
1008: IF l_debug_mode = 'Y' THEN
1009: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : UPDATE_MAPPING : project id can not be null';
1010: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1011: l_debug_level3);
1012: END IF;
1013: RAISE Invalid_Arg_Exc_WP;
1006: IF (p_project_id is NULL)
1007: THEN
1008: IF l_debug_mode = 'Y' THEN
1009: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : UPDATE_MAPPING : project id can not be null';
1010: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1011: l_debug_level3);
1012: END IF;
1013: RAISE Invalid_Arg_Exc_WP;
1014: END IF;
1027: )
1028: )
1029: THEN
1030: IF l_debug_mode = 'Y' THEN
1031: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : UPDATE_MAPPING : Both of tasks id and tasks name are null';
1032: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1033: l_debug_level3);
1034: END IF;
1035: RAISE Invalid_Arg_Exc_WP;
1028: )
1029: THEN
1030: IF l_debug_mode = 'Y' THEN
1031: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : UPDATE_MAPPING : Both of tasks id and tasks name are null';
1032: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1033: l_debug_level3);
1034: END IF;
1035: RAISE Invalid_Arg_Exc_WP;
1036: END IF;
1044: )
1045: )
1046: THEN
1047: IF l_debug_mode = 'Y' THEN
1048: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : UPDATE_MAPPING : parent structue version id can not be null, if wp task name is not null';
1049: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1050: l_debug_level3);
1051: END IF;
1052: RAISE Invalid_Arg_Exc_WP;
1045: )
1046: THEN
1047: IF l_debug_mode = 'Y' THEN
1048: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : UPDATE_MAPPING : parent structue version id can not be null, if wp task name is not null';
1049: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1050: l_debug_level3);
1051: END IF;
1052: RAISE Invalid_Arg_Exc_WP;
1053: END IF;
1165: END IF;
1166:
1167: -- Bug 10053423
1168: IF l_debug_mode = 'Y' THEN
1169: pa_debug.reset_curr_function;
1170: pa_debug.write(g_module_name, 'UPDATE_MAPPING: Exiting succesfully',5);
1171: END IF;
1172:
1173: EXCEPTION
1166:
1167: -- Bug 10053423
1168: IF l_debug_mode = 'Y' THEN
1169: pa_debug.reset_curr_function;
1170: pa_debug.write(g_module_name, 'UPDATE_MAPPING: Exiting succesfully',5);
1171: END IF;
1172:
1173: EXCEPTION
1174:
1207: ELSE
1208: x_msg_count := l_msg_count;
1209: END IF;
1210: IF l_debug_mode = 'Y' THEN
1211: Pa_Debug.reset_curr_function;
1212: END IF;
1213:
1214: WHEN Invalid_Arg_Exc_WP THEN
1215:
1238: , p_procedure_name => 'UPDATE_MAPPING'
1239: , p_error_text => x_msg_data);
1240:
1241: IF l_debug_mode = 'Y' THEN
1242: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1243: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1244: l_debug_level5);
1245: Pa_Debug.reset_curr_function;
1246: END IF;
1239: , p_error_text => x_msg_data);
1240:
1241: IF l_debug_mode = 'Y' THEN
1242: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1243: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1244: l_debug_level5);
1245: Pa_Debug.reset_curr_function;
1246: END IF;
1247:
1241: IF l_debug_mode = 'Y' THEN
1242: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1243: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1244: l_debug_level5);
1245: Pa_Debug.reset_curr_function;
1246: END IF;
1247:
1248:
1249: WHEN OTHERS THEN
1273: , p_procedure_name => 'UPDATE_MAPPING'
1274: , p_error_text => x_msg_data);
1275:
1276: IF l_debug_mode = 'Y' THEN
1277: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1278: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1279: l_debug_level5);
1280: Pa_Debug.reset_curr_function;
1281: END IF;
1274: , p_error_text => x_msg_data);
1275:
1276: IF l_debug_mode = 'Y' THEN
1277: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1278: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1279: l_debug_level5);
1280: Pa_Debug.reset_curr_function;
1281: END IF;
1282:
1276: IF l_debug_mode = 'Y' THEN
1277: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1278: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1279: l_debug_level5);
1280: Pa_Debug.reset_curr_function;
1281: END IF;
1282:
1283: END UPDATE_MAPPING ;
1284:
1425:
1426: x_msg_count := 0;
1427: l_user_id := FND_GLOBAL.USER_ID;
1428: x_return_status := FND_API.G_RET_STS_SUCCESS;
1429: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
1430:
1431:
1432: IF l_debug_mode = 'Y' THEN
1433: PA_DEBUG.set_curr_function( p_function => 'COPY_MAPPING',
1429: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
1430:
1431:
1432: IF l_debug_mode = 'Y' THEN
1433: PA_DEBUG.set_curr_function( p_function => 'COPY_MAPPING',
1434: p_debug_mode => l_debug_mode );
1435: END IF;
1436:
1437: IF l_debug_mode = 'Y' THEN
1434: p_debug_mode => l_debug_mode );
1435: END IF;
1436:
1437: IF l_debug_mode = 'Y' THEN
1438: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : COPY_MAPPING : Printing Input parameters';
1439: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1440: l_debug_level3);
1441: Pa_Debug.WRITE(g_module_name,'p_context'||p_context,l_debug_level3);
1442: Pa_Debug.WRITE(g_module_name,'p_src_project_id'||p_src_project_id,l_debug_level3);
1435: END IF;
1436:
1437: IF l_debug_mode = 'Y' THEN
1438: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : COPY_MAPPING : Printing Input parameters';
1439: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1440: l_debug_level3);
1441: Pa_Debug.WRITE(g_module_name,'p_context'||p_context,l_debug_level3);
1442: Pa_Debug.WRITE(g_module_name,'p_src_project_id'||p_src_project_id,l_debug_level3);
1443: Pa_Debug.WRITE(g_module_name,'p_dest_project_id'||p_dest_project_id,l_debug_level3);
1437: IF l_debug_mode = 'Y' THEN
1438: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : COPY_MAPPING : Printing Input parameters';
1439: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1440: l_debug_level3);
1441: Pa_Debug.WRITE(g_module_name,'p_context'||p_context,l_debug_level3);
1442: Pa_Debug.WRITE(g_module_name,'p_src_project_id'||p_src_project_id,l_debug_level3);
1443: Pa_Debug.WRITE(g_module_name,'p_dest_project_id'||p_dest_project_id,l_debug_level3);
1444: Pa_Debug.WRITE(g_module_name,'p_src_str_version_id'||p_src_str_version_id,l_debug_level3);
1445: Pa_Debug.WRITE(g_module_name,'p_dest_str_version_id'||p_dest_str_version_id,l_debug_level3);
1438: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : COPY_MAPPING : Printing Input parameters';
1439: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1440: l_debug_level3);
1441: Pa_Debug.WRITE(g_module_name,'p_context'||p_context,l_debug_level3);
1442: Pa_Debug.WRITE(g_module_name,'p_src_project_id'||p_src_project_id,l_debug_level3);
1443: Pa_Debug.WRITE(g_module_name,'p_dest_project_id'||p_dest_project_id,l_debug_level3);
1444: Pa_Debug.WRITE(g_module_name,'p_src_str_version_id'||p_src_str_version_id,l_debug_level3);
1445: Pa_Debug.WRITE(g_module_name,'p_dest_str_version_id'||p_dest_str_version_id,l_debug_level3);
1446: END IF;
1439: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1440: l_debug_level3);
1441: Pa_Debug.WRITE(g_module_name,'p_context'||p_context,l_debug_level3);
1442: Pa_Debug.WRITE(g_module_name,'p_src_project_id'||p_src_project_id,l_debug_level3);
1443: Pa_Debug.WRITE(g_module_name,'p_dest_project_id'||p_dest_project_id,l_debug_level3);
1444: Pa_Debug.WRITE(g_module_name,'p_src_str_version_id'||p_src_str_version_id,l_debug_level3);
1445: Pa_Debug.WRITE(g_module_name,'p_dest_str_version_id'||p_dest_str_version_id,l_debug_level3);
1446: END IF;
1447:
1440: l_debug_level3);
1441: Pa_Debug.WRITE(g_module_name,'p_context'||p_context,l_debug_level3);
1442: Pa_Debug.WRITE(g_module_name,'p_src_project_id'||p_src_project_id,l_debug_level3);
1443: Pa_Debug.WRITE(g_module_name,'p_dest_project_id'||p_dest_project_id,l_debug_level3);
1444: Pa_Debug.WRITE(g_module_name,'p_src_str_version_id'||p_src_str_version_id,l_debug_level3);
1445: Pa_Debug.WRITE(g_module_name,'p_dest_str_version_id'||p_dest_str_version_id,l_debug_level3);
1446: END IF;
1447:
1448: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_TRUE)) THEN
1441: Pa_Debug.WRITE(g_module_name,'p_context'||p_context,l_debug_level3);
1442: Pa_Debug.WRITE(g_module_name,'p_src_project_id'||p_src_project_id,l_debug_level3);
1443: Pa_Debug.WRITE(g_module_name,'p_dest_project_id'||p_dest_project_id,l_debug_level3);
1444: Pa_Debug.WRITE(g_module_name,'p_src_str_version_id'||p_src_str_version_id,l_debug_level3);
1445: Pa_Debug.WRITE(g_module_name,'p_dest_str_version_id'||p_dest_str_version_id,l_debug_level3);
1446: END IF;
1447:
1448: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_TRUE)) THEN
1449: FND_MSG_PUB.initialize;
1449: FND_MSG_PUB.initialize;
1450: END IF;
1451:
1452: IF l_debug_mode = 'Y' THEN
1453: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : COPY_MAPPING : Validating Input parameters';
1454: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1455: l_debug_level3);
1456: END IF;
1457:
1450: END IF;
1451:
1452: IF l_debug_mode = 'Y' THEN
1453: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : COPY_MAPPING : Validating Input parameters';
1454: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1455: l_debug_level3);
1456: END IF;
1457:
1458: IF ( p_context IS NULL ) THEN
1455: l_debug_level3);
1456: END IF;
1457:
1458: IF ( p_context IS NULL ) THEN
1459: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : COPY_MAPPING : p_context is mandatory and cant be null';
1460: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1461: l_debug_level3);
1462:
1463: RAISE Invalid_Arg_Exc_WP;
1456: END IF;
1457:
1458: IF ( p_context IS NULL ) THEN
1459: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : COPY_MAPPING : p_context is mandatory and cant be null';
1460: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1461: l_debug_level3);
1462:
1463: RAISE Invalid_Arg_Exc_WP;
1464: END IF;
1471: OR ( p_dest_project_id IS NULL OR p_dest_project_id = FND_API.G_MISS_NUM )
1472: OR ( p_src_project_id = p_dest_project_id )
1473: )
1474: THEN
1475: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : COPY_MAPPING : if p_context is Copy Project , both src and destination project id will be required';
1476: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1477: l_debug_level3);
1478:
1479: RAISE Invalid_Arg_Exc_WP;
1472: OR ( p_src_project_id = p_dest_project_id )
1473: )
1474: THEN
1475: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : COPY_MAPPING : if p_context is Copy Project , both src and destination project id will be required';
1476: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1477: l_debug_level3);
1478:
1479: RAISE Invalid_Arg_Exc_WP;
1480:
1596: OR( p_dest_str_version_id IS NULL OR p_dest_str_version_id = FND_API.G_MISS_NUM )
1597: OR( p_src_project_id IS NULL OR p_src_project_id = FND_API.G_MISS_NUM )
1598: ) THEN
1599:
1600: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : COPY_MAPPING : if p_context is create_working_version,both src and destination str ver id will be required';
1601: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1602: l_debug_level3);
1603: RAISE Invalid_Arg_Exc_WP;
1604: END IF;
1597: OR( p_src_project_id IS NULL OR p_src_project_id = FND_API.G_MISS_NUM )
1598: ) THEN
1599:
1600: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : COPY_MAPPING : if p_context is create_working_version,both src and destination str ver id will be required';
1601: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1602: l_debug_level3);
1603: RAISE Invalid_Arg_Exc_WP;
1604: END IF;
1605:
1629: FETCH c_get_mapped_task_ver_id INTO l_from_dest_task_ver_id ( iCounter );
1630: CLOSE c_get_mapped_task_ver_id;
1631: END LOOP;
1632:
1633: Pa_Debug.WRITE(g_module_name,'l_from_task_id_tbl.COUNT '||l_from_task_id_tbl.COUNT ,l_debug_level3);
1634:
1635: -- Insert into PA_OBJECT_RELATIONSHIPS
1636: --bug 3574885, the forall should be called only when l_from_dest_task_ver_id is not empty
1637: --rtarway ,bug 3916440, the forall should be called only when l_src_to_tasks_id_tbl is not empty
1695: );
1696: END IF;
1697: END IF;
1698:
1699: Pa_Debug.WRITE(g_module_name,'After Completing insert',l_debug_level3);
1700:
1701: EXCEPTION
1702:
1703: WHEN FND_API.G_EXC_ERROR THEN
1719: ELSE
1720: x_msg_count := l_msg_count;
1721: END IF;
1722: IF l_debug_mode = 'Y' THEN
1723: Pa_Debug.reset_curr_function;
1724: END IF;
1725:
1726: WHEN Invalid_Arg_Exc_WP THEN
1727:
1734: , p_procedure_name => 'COPY_MAPPING'
1735: , p_error_text => x_msg_data);
1736:
1737: IF l_debug_mode = 'Y' THEN
1738: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1739: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1740: l_debug_level5);
1741: Pa_Debug.reset_curr_function;
1742: END IF;
1735: , p_error_text => x_msg_data);
1736:
1737: IF l_debug_mode = 'Y' THEN
1738: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1739: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1740: l_debug_level5);
1741: Pa_Debug.reset_curr_function;
1742: END IF;
1743: RAISE;
1737: IF l_debug_mode = 'Y' THEN
1738: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1739: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1740: l_debug_level5);
1741: Pa_Debug.reset_curr_function;
1742: END IF;
1743: RAISE;
1744:
1745: WHEN OTHERS THEN
1754: , p_procedure_name => 'COPY_MAPPING'
1755: , p_error_text => x_msg_data);
1756:
1757: IF l_debug_mode = 'Y' THEN
1758: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1759: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1760: l_debug_level5);
1761: Pa_Debug.reset_curr_function;
1762: END IF;
1755: , p_error_text => x_msg_data);
1756:
1757: IF l_debug_mode = 'Y' THEN
1758: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1759: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1760: l_debug_level5);
1761: Pa_Debug.reset_curr_function;
1762: END IF;
1763: RAISE;
1757: IF l_debug_mode = 'Y' THEN
1758: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1759: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1760: l_debug_level5);
1761: Pa_Debug.reset_curr_function;
1762: END IF;
1763: RAISE;
1764:
1765: END COPY_MAPPING ;
1843:
1844: x_msg_count := 0;
1845: x_return_status := FND_API.G_RET_STS_SUCCESS;
1846:
1847: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
1848: --l_debug_mode := NVL(p_debug_mode,'N');
1849: IF l_debug_mode = 'Y' THEN
1850: PA_DEBUG.set_curr_function( p_function => 'DELETE_ALL_MAPPING',
1851: p_debug_mode => l_debug_mode );
1846:
1847: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
1848: --l_debug_mode := NVL(p_debug_mode,'N');
1849: IF l_debug_mode = 'Y' THEN
1850: PA_DEBUG.set_curr_function( p_function => 'DELETE_ALL_MAPPING',
1851: p_debug_mode => l_debug_mode );
1852: END IF;
1853:
1854: IF l_debug_mode = 'Y' THEN
1851: p_debug_mode => l_debug_mode );
1852: END IF;
1853:
1854: IF l_debug_mode = 'Y' THEN
1855: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_ALL_MAPPING : Printing Input parameters';
1856: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1857: l_debug_level3);
1858:
1859: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
1852: END IF;
1853:
1854: IF l_debug_mode = 'Y' THEN
1855: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_ALL_MAPPING : Printing Input parameters';
1856: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1857: l_debug_level3);
1858:
1859: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
1860: l_debug_level3);
1855: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_ALL_MAPPING : Printing Input parameters';
1856: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1857: l_debug_level3);
1858:
1859: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
1860: l_debug_level3);
1861: END IF;
1862:
1863: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_TRUE)) THEN
1868: savepoint DELETE_ALL_MAPPING_PUBLIC;
1869: END IF;
1870:
1871: IF l_debug_mode = 'Y' THEN
1872: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_ALL_MAPPING : Validating Input parameters';
1873: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1874: l_debug_level3);
1875: END IF;
1876:
1869: END IF;
1870:
1871: IF l_debug_mode = 'Y' THEN
1872: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_ALL_MAPPING : Validating Input parameters';
1873: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1874: l_debug_level3);
1875: END IF;
1876:
1877: IF ( p_project_id IS NULL )
1876:
1877: IF ( p_project_id IS NULL )
1878: THEN
1879: IF l_debug_mode = 'Y' THEN
1880: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_ALL_MAPPING : p_project_id can not be null';
1881: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1882: l_debug_level3);
1883: END IF;
1884: RAISE Invalid_Arg_Exc_WP;
1877: IF ( p_project_id IS NULL )
1878: THEN
1879: IF l_debug_mode = 'Y' THEN
1880: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_ALL_MAPPING : p_project_id can not be null';
1881: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1882: l_debug_level3);
1883: END IF;
1884: RAISE Invalid_Arg_Exc_WP;
1885: END IF;
1930: ELSE
1931: x_msg_count := l_msg_count;
1932: END IF;
1933: IF l_debug_mode = 'Y' THEN
1934: Pa_Debug.reset_curr_function;
1935: END IF;
1936:
1937: WHEN Invalid_Arg_Exc_WP THEN
1938:
1951: , p_procedure_name => 'DELETE_ALL_MAPPING'
1952: , p_error_text => x_msg_data);
1953:
1954: IF l_debug_mode = 'Y' THEN
1955: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1956: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1957: l_debug_level5);
1958: Pa_Debug.reset_curr_function;
1959: END IF;
1952: , p_error_text => x_msg_data);
1953:
1954: IF l_debug_mode = 'Y' THEN
1955: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1956: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1957: l_debug_level5);
1958: Pa_Debug.reset_curr_function;
1959: END IF;
1960: RAISE;
1954: IF l_debug_mode = 'Y' THEN
1955: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1956: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1957: l_debug_level5);
1958: Pa_Debug.reset_curr_function;
1959: END IF;
1960: RAISE;
1961:
1962: WHEN OTHERS THEN
1978: , p_procedure_name => 'DELETE_ALL_MAPPING'
1979: , p_error_text => x_msg_data);
1980:
1981: IF l_debug_mode = 'Y' THEN
1982: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1983: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1984: l_debug_level5);
1985: Pa_Debug.reset_curr_function;
1986: END IF;
1979: , p_error_text => x_msg_data);
1980:
1981: IF l_debug_mode = 'Y' THEN
1982: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1983: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1984: l_debug_level5);
1985: Pa_Debug.reset_curr_function;
1986: END IF;
1987: RAISE;
1981: IF l_debug_mode = 'Y' THEN
1982: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1983: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1984: l_debug_level5);
1985: Pa_Debug.reset_curr_function;
1986: END IF;
1987: RAISE;
1988: END DELETE_ALL_MAPPING ;
1989: