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:
502: BEGIN
503:
504: x_msg_count := 0;
505: x_return_status := FND_API.G_RET_STS_SUCCESS;
506: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
507:
508: IF l_debug_mode = 'Y' THEN
509: PA_DEBUG.set_curr_function( p_function => 'CREATE_MAPPING',
510: p_debug_mode => l_debug_mode );
505: x_return_status := FND_API.G_RET_STS_SUCCESS;
506: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
507:
508: IF l_debug_mode = 'Y' THEN
509: PA_DEBUG.set_curr_function( p_function => 'CREATE_MAPPING',
510: p_debug_mode => l_debug_mode );
511: END IF;
512:
513: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_TRUE)) THEN
518: savepoint CREATE_MAPPING_PUBLIC;
519: END IF;
520:
521: IF l_debug_mode = 'Y' THEN
522: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : Printing Input parameters';
523: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
524: l_debug_level3);
525:
526: Pa_Debug.WRITE(g_module_name,'p_wp_task_name'||':'||p_wp_task_name,
519: END IF;
520:
521: IF l_debug_mode = 'Y' THEN
522: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : Printing Input parameters';
523: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
524: l_debug_level3);
525:
526: Pa_Debug.WRITE(g_module_name,'p_wp_task_name'||':'||p_wp_task_name,
527: l_debug_level3);
522: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : Printing Input parameters';
523: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
524: l_debug_level3);
525:
526: Pa_Debug.WRITE(g_module_name,'p_wp_task_name'||':'||p_wp_task_name,
527: l_debug_level3);
528:
529: Pa_Debug.WRITE(g_module_name,'p_wp_task_version_id'||':'||p_wp_task_version_id,
530: l_debug_level3);
525:
526: Pa_Debug.WRITE(g_module_name,'p_wp_task_name'||':'||p_wp_task_name,
527: l_debug_level3);
528:
529: Pa_Debug.WRITE(g_module_name,'p_wp_task_version_id'||':'||p_wp_task_version_id,
530: l_debug_level3);
531:
532: Pa_Debug.WRITE(g_module_name,'p_parent_str_version_id'||':'||p_parent_str_version_id,
533: l_debug_level3);
528:
529: Pa_Debug.WRITE(g_module_name,'p_wp_task_version_id'||':'||p_wp_task_version_id,
530: l_debug_level3);
531:
532: Pa_Debug.WRITE(g_module_name,'p_parent_str_version_id'||':'||p_parent_str_version_id,
533: l_debug_level3);
534:
535: Pa_Debug.WRITE(g_module_name,'p_fp_task_version_id'||':'||p_fp_task_version_id,
536: l_debug_level3);
531:
532: Pa_Debug.WRITE(g_module_name,'p_parent_str_version_id'||':'||p_parent_str_version_id,
533: l_debug_level3);
534:
535: Pa_Debug.WRITE(g_module_name,'p_fp_task_version_id'||':'||p_fp_task_version_id,
536: l_debug_level3);
537: Pa_Debug.WRITE(g_module_name,'p_fp_task_name'||':'||p_fp_task_name,
538: l_debug_level3);
539: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
533: l_debug_level3);
534:
535: Pa_Debug.WRITE(g_module_name,'p_fp_task_version_id'||':'||p_fp_task_version_id,
536: l_debug_level3);
537: Pa_Debug.WRITE(g_module_name,'p_fp_task_name'||':'||p_fp_task_name,
538: l_debug_level3);
539: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
540: l_debug_level3);
541: END IF;
535: Pa_Debug.WRITE(g_module_name,'p_fp_task_version_id'||':'||p_fp_task_version_id,
536: l_debug_level3);
537: Pa_Debug.WRITE(g_module_name,'p_fp_task_name'||':'||p_fp_task_name,
538: l_debug_level3);
539: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
540: l_debug_level3);
541: END IF;
542:
543: IF l_debug_mode = 'Y' THEN
540: l_debug_level3);
541: END IF;
542:
543: IF l_debug_mode = 'Y' THEN
544: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : Validating Input parameters';
545: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage, l_debug_level3);
546: END IF;
547:
548: --Check if project id is null , raise an error
541: END IF;
542:
543: IF l_debug_mode = 'Y' THEN
544: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : Validating Input parameters';
545: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage, l_debug_level3);
546: END IF;
547:
548: --Check if project id is null , raise an error
549: IF (p_project_id is NULL)
548: --Check if project id is null , raise an error
549: IF (p_project_id is NULL)
550: THEN
551: IF l_debug_mode = 'Y' THEN
552: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : project id can not be null';
553: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
554: l_debug_level3);
555: END IF;
556: RAISE Invalid_Arg_Exc_WP;
549: IF (p_project_id is NULL)
550: THEN
551: IF l_debug_mode = 'Y' THEN
552: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : project id can not be null';
553: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
554: l_debug_level3);
555: END IF;
556: RAISE Invalid_Arg_Exc_WP;
557: END IF;
570: )
571: )
572: THEN
573: IF l_debug_mode = 'Y' THEN
574: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : Both work plan task id and task name are null';
575: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
576: l_debug_level3);
577: END IF;
578: RAISE Invalid_Arg_Exc_WP;
571: )
572: THEN
573: IF l_debug_mode = 'Y' THEN
574: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : Both work plan task id and task name are null';
575: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
576: l_debug_level3);
577: END IF;
578: RAISE Invalid_Arg_Exc_WP;
579: END IF;
587: )
588: )
589: THEN
590: IF l_debug_mode = 'Y' THEN
591: 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';
592: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
593: l_debug_level3);
594: END IF;
595: RAISE Invalid_Arg_Exc_WP;
588: )
589: THEN
590: IF l_debug_mode = 'Y' THEN
591: 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';
592: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
593: l_debug_level3);
594: END IF;
595: RAISE Invalid_Arg_Exc_WP;
596: END IF;
629: ELSIF ( p_fp_task_name IS NOT NULL AND p_fp_task_name <> FND_API.G_MISS_CHAR )
630: THEN
631: -- get the fp_task_version_id and place it in l_fp_task_version_id;
632: -- Assuming there will be only one version for the FP task.
633: Pa_Debug.WRITE('test',l_fp_task_version_id, l_debug_level3);
634: OPEN c_get_fp_task_ver_id_frm_name ( p_fp_task_name , p_project_id );
635: FETCH c_get_fp_task_ver_id_frm_name INTO l_fp_task_version_id ;
636: IF ( c_get_fp_task_ver_id_frm_name%NOTFOUND )
637: THEN
643:
644: END IF;
645:
646: IF l_debug_mode = 'Y' THEN
647: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : Calling PA_PROJ_STRUC_MAPPING_UTILS.CHECK_CREATE_MAPPING_OK ';
648: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage, l_debug_level3);
649: END IF;
650:
651: -- Call util API to check whether the mapping can be created
644: END IF;
645:
646: IF l_debug_mode = 'Y' THEN
647: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : Calling PA_PROJ_STRUC_MAPPING_UTILS.CHECK_CREATE_MAPPING_OK ';
648: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage, l_debug_level3);
649: END IF;
650:
651: -- Call util API to check whether the mapping can be created
652: PA_PROJ_STRUC_MAPPING_UTILS.CHECK_CREATE_MAPPING_OK
666: THEN
667:
668: -- Mapping can't be created
669: IF l_debug_mode = 'Y' THEN
670: Pa_Debug.g_err_stage:= ' PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : '|| l_error_message_code;
671: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
672: l_debug_level3);
673: END IF;
674: Pa_Utils.ADD_MESSAGE
667:
668: -- Mapping can't be created
669: IF l_debug_mode = 'Y' THEN
670: Pa_Debug.g_err_stage:= ' PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : '|| l_error_message_code;
671: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
672: l_debug_level3);
673: END IF;
674: Pa_Utils.ADD_MESSAGE
675: ( p_app_short_name => 'PA',
677: RAISE FND_API.G_EXC_ERROR;
678: ELSE
679: -- Mapping Can be created, call public API to create mapping
680: IF l_debug_mode = 'Y' THEN
681: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : Calling create'||l_wp_task_version_id||l_fp_task_version_id;
682: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
683: l_debug_level3);
684: END IF;
685:
678: ELSE
679: -- Mapping Can be created, call public API to create mapping
680: IF l_debug_mode = 'Y' THEN
681: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : CREATE_MAPPING : Calling create'||l_wp_task_version_id||l_fp_task_version_id;
682: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
683: l_debug_level3);
684: END IF;
685:
686: --Call public API to create the mapping
736: ELSE
737: x_msg_count := l_msg_count;
738: END IF;
739: IF l_debug_mode = 'Y' THEN
740: Pa_Debug.reset_curr_function;
741: END IF;
742:
743: WHEN Invalid_Arg_Exc_WP THEN
744:
755: , p_procedure_name => 'CREATE_MAPPING'
756: , p_error_text => x_msg_data);
757:
758: IF l_debug_mode = 'Y' THEN
759: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
760: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
761: l_debug_level5);
762: Pa_Debug.reset_curr_function;
763: END IF;
756: , p_error_text => x_msg_data);
757:
758: IF l_debug_mode = 'Y' THEN
759: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
760: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
761: l_debug_level5);
762: Pa_Debug.reset_curr_function;
763: END IF;
764: RAISE;
758: IF l_debug_mode = 'Y' THEN
759: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
760: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
761: l_debug_level5);
762: Pa_Debug.reset_curr_function;
763: END IF;
764: RAISE;
765:
766:
772:
773: IF (p_commit = FND_API.G_TRUE) THEN
774: ROLLBACK TO CREATE_MAPPING_PUBLIC;
775: END IF;
776: Pa_Debug.g_err_stage:= 'x_msg_count='||x_msg_count;
777: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage, l_debug_level5);
778:
779:
780: Fnd_Msg_Pub.add_exc_msg
773: IF (p_commit = FND_API.G_TRUE) THEN
774: ROLLBACK TO CREATE_MAPPING_PUBLIC;
775: END IF;
776: Pa_Debug.g_err_stage:= 'x_msg_count='||x_msg_count;
777: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage, l_debug_level5);
778:
779:
780: Fnd_Msg_Pub.add_exc_msg
781: ( p_pkg_name => 'PA_PROJ_STRUC_MAPPING_PUB'
780: Fnd_Msg_Pub.add_exc_msg
781: ( p_pkg_name => 'PA_PROJ_STRUC_MAPPING_PUB'
782: , p_procedure_name => 'CREATE_MAPPING'
783: , p_error_text => x_msg_data);
784: Pa_Debug.g_err_stage:= 'x_msg_count='||x_msg_count;
785: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage, l_debug_level5);
786:
787:
788: IF l_debug_mode = 'Y' THEN
781: ( p_pkg_name => 'PA_PROJ_STRUC_MAPPING_PUB'
782: , p_procedure_name => 'CREATE_MAPPING'
783: , p_error_text => x_msg_data);
784: Pa_Debug.g_err_stage:= 'x_msg_count='||x_msg_count;
785: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage, l_debug_level5);
786:
787:
788: IF l_debug_mode = 'Y' THEN
789: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
785: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage, l_debug_level5);
786:
787:
788: IF l_debug_mode = 'Y' THEN
789: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
790: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
791: l_debug_level5);
792: Pa_Debug.reset_curr_function;
793: END IF;
786:
787:
788: IF l_debug_mode = 'Y' THEN
789: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
790: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
791: l_debug_level5);
792: Pa_Debug.reset_curr_function;
793: END IF;
794: RAISE;
788: IF l_debug_mode = 'Y' THEN
789: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
790: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
791: l_debug_level5);
792: Pa_Debug.reset_curr_function;
793: END IF;
794: RAISE;
795: END CREATE_MAPPING ;
796:
923: BEGIN
924:
925: x_msg_count := 0;
926: x_return_status := FND_API.G_RET_STS_SUCCESS;
927: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
928:
929: IF l_debug_mode = 'Y' THEN
930: PA_DEBUG.set_curr_function( p_function => 'UPDATE_MAPPING',
931: p_debug_mode => l_debug_mode );
926: x_return_status := FND_API.G_RET_STS_SUCCESS;
927: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
928:
929: IF l_debug_mode = 'Y' THEN
930: PA_DEBUG.set_curr_function( p_function => 'UPDATE_MAPPING',
931: p_debug_mode => l_debug_mode );
932: END IF;
933:
934: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_TRUE)) THEN
939: savepoint UPDATE_MAPPING_PUBLIC;
940: END IF;
941:
942: IF l_debug_mode = 'Y' THEN
943: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : UPDATE_MAPPING : Printing Input parameters';
944: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
945: l_debug_level3);
946:
947: Pa_Debug.WRITE(g_module_name,'p_structure_type'||':'||p_structure_type,
940: END IF;
941:
942: IF l_debug_mode = 'Y' THEN
943: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : UPDATE_MAPPING : Printing Input parameters';
944: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
945: l_debug_level3);
946:
947: Pa_Debug.WRITE(g_module_name,'p_structure_type'||':'||p_structure_type,
948: l_debug_level3);
943: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : UPDATE_MAPPING : Printing Input parameters';
944: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
945: l_debug_level3);
946:
947: Pa_Debug.WRITE(g_module_name,'p_structure_type'||':'||p_structure_type,
948: l_debug_level3);
949:
950: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
951: l_debug_level3);
946:
947: Pa_Debug.WRITE(g_module_name,'p_structure_type'||':'||p_structure_type,
948: l_debug_level3);
949:
950: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
951: l_debug_level3);
952:
953: Pa_Debug.WRITE(g_module_name,'p_wp_task_name'||':'||p_wp_task_name,
954: l_debug_level3);
949:
950: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
951: l_debug_level3);
952:
953: Pa_Debug.WRITE(g_module_name,'p_wp_task_name'||':'||p_wp_task_name,
954: l_debug_level3);
955:
956: Pa_Debug.WRITE(g_module_name,'p_wp_prnt_str_ver_id'||':'||p_wp_prnt_str_ver_id,
957: l_debug_level3);
952:
953: Pa_Debug.WRITE(g_module_name,'p_wp_task_name'||':'||p_wp_task_name,
954: l_debug_level3);
955:
956: Pa_Debug.WRITE(g_module_name,'p_wp_prnt_str_ver_id'||':'||p_wp_prnt_str_ver_id,
957: l_debug_level3);
958: Pa_Debug.WRITE(g_module_name,'p_wp_task_version_id'||':'||p_wp_task_version_id,
959: l_debug_level3);
960: Pa_Debug.WRITE(g_module_name,'p_fp_task_name'||':'||p_fp_task_name,
954: l_debug_level3);
955:
956: Pa_Debug.WRITE(g_module_name,'p_wp_prnt_str_ver_id'||':'||p_wp_prnt_str_ver_id,
957: l_debug_level3);
958: Pa_Debug.WRITE(g_module_name,'p_wp_task_version_id'||':'||p_wp_task_version_id,
959: l_debug_level3);
960: Pa_Debug.WRITE(g_module_name,'p_fp_task_name'||':'||p_fp_task_name,
961: l_debug_level3);
962:
956: Pa_Debug.WRITE(g_module_name,'p_wp_prnt_str_ver_id'||':'||p_wp_prnt_str_ver_id,
957: l_debug_level3);
958: Pa_Debug.WRITE(g_module_name,'p_wp_task_version_id'||':'||p_wp_task_version_id,
959: l_debug_level3);
960: Pa_Debug.WRITE(g_module_name,'p_fp_task_name'||':'||p_fp_task_name,
961: l_debug_level3);
962:
963: Pa_Debug.WRITE(g_module_name,'p_fp_task_version_id'||':'||p_fp_task_version_id,
964: l_debug_level3);
959: l_debug_level3);
960: Pa_Debug.WRITE(g_module_name,'p_fp_task_name'||':'||p_fp_task_name,
961: l_debug_level3);
962:
963: Pa_Debug.WRITE(g_module_name,'p_fp_task_version_id'||':'||p_fp_task_version_id,
964: l_debug_level3);
965: END IF;
966:
967: IF l_debug_mode = 'Y' THEN
964: l_debug_level3);
965: END IF;
966:
967: IF l_debug_mode = 'Y' THEN
968: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : UPDATE_MAPPING : Validating Input parameters';
969: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
970: l_debug_level3);
971: END IF;
972:
965: END IF;
966:
967: IF l_debug_mode = 'Y' THEN
968: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : UPDATE_MAPPING : Validating Input parameters';
969: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
970: l_debug_level3);
971: END IF;
972:
973: -- if PROJECT id IS NULL RAISE ERROR MESSAGE
973: -- if PROJECT id IS NULL RAISE ERROR MESSAGE
974: IF (p_project_id is NULL)
975: THEN
976: IF l_debug_mode = 'Y' THEN
977: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : UPDATE_MAPPING : project id can not be null';
978: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
979: l_debug_level3);
980: END IF;
981: RAISE Invalid_Arg_Exc_WP;
974: IF (p_project_id is NULL)
975: THEN
976: IF l_debug_mode = 'Y' THEN
977: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : UPDATE_MAPPING : project id can not be null';
978: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
979: l_debug_level3);
980: END IF;
981: RAISE Invalid_Arg_Exc_WP;
982: END IF;
995: )
996: )
997: THEN
998: IF l_debug_mode = 'Y' THEN
999: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : UPDATE_MAPPING : Both of tasks id and tasks name are null';
1000: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1001: l_debug_level3);
1002: END IF;
1003: RAISE Invalid_Arg_Exc_WP;
996: )
997: THEN
998: IF l_debug_mode = 'Y' THEN
999: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : UPDATE_MAPPING : Both of tasks id and tasks name are null';
1000: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1001: l_debug_level3);
1002: END IF;
1003: RAISE Invalid_Arg_Exc_WP;
1004: END IF;
1012: )
1013: )
1014: THEN
1015: IF l_debug_mode = 'Y' THEN
1016: 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';
1017: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1018: l_debug_level3);
1019: END IF;
1020: RAISE Invalid_Arg_Exc_WP;
1013: )
1014: THEN
1015: IF l_debug_mode = 'Y' THEN
1016: 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';
1017: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1018: l_debug_level3);
1019: END IF;
1020: RAISE Invalid_Arg_Exc_WP;
1021: END IF;
1169: ELSE
1170: x_msg_count := l_msg_count;
1171: END IF;
1172: IF l_debug_mode = 'Y' THEN
1173: Pa_Debug.reset_curr_function;
1174: END IF;
1175:
1176: WHEN Invalid_Arg_Exc_WP THEN
1177:
1200: , p_procedure_name => 'UPDATE_MAPPING'
1201: , p_error_text => x_msg_data);
1202:
1203: IF l_debug_mode = 'Y' THEN
1204: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1205: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1206: l_debug_level5);
1207: Pa_Debug.reset_curr_function;
1208: END IF;
1201: , p_error_text => x_msg_data);
1202:
1203: IF l_debug_mode = 'Y' THEN
1204: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1205: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1206: l_debug_level5);
1207: Pa_Debug.reset_curr_function;
1208: END IF;
1209:
1203: IF l_debug_mode = 'Y' THEN
1204: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1205: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1206: l_debug_level5);
1207: Pa_Debug.reset_curr_function;
1208: END IF;
1209:
1210:
1211: WHEN OTHERS THEN
1235: , p_procedure_name => 'UPDATE_MAPPING'
1236: , p_error_text => x_msg_data);
1237:
1238: IF l_debug_mode = 'Y' THEN
1239: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1240: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1241: l_debug_level5);
1242: Pa_Debug.reset_curr_function;
1243: END IF;
1236: , p_error_text => x_msg_data);
1237:
1238: IF l_debug_mode = 'Y' THEN
1239: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1240: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1241: l_debug_level5);
1242: Pa_Debug.reset_curr_function;
1243: END IF;
1244:
1238: IF l_debug_mode = 'Y' THEN
1239: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1240: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1241: l_debug_level5);
1242: Pa_Debug.reset_curr_function;
1243: END IF;
1244:
1245: END UPDATE_MAPPING ;
1246:
1387:
1388: x_msg_count := 0;
1389: l_user_id := FND_GLOBAL.USER_ID;
1390: x_return_status := FND_API.G_RET_STS_SUCCESS;
1391: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
1392:
1393:
1394: IF l_debug_mode = 'Y' THEN
1395: PA_DEBUG.set_curr_function( p_function => 'COPY_MAPPING',
1391: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
1392:
1393:
1394: IF l_debug_mode = 'Y' THEN
1395: PA_DEBUG.set_curr_function( p_function => 'COPY_MAPPING',
1396: p_debug_mode => l_debug_mode );
1397: END IF;
1398:
1399: IF l_debug_mode = 'Y' THEN
1396: p_debug_mode => l_debug_mode );
1397: END IF;
1398:
1399: IF l_debug_mode = 'Y' THEN
1400: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : COPY_MAPPING : Printing Input parameters';
1401: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1402: l_debug_level3);
1403: Pa_Debug.WRITE(g_module_name,'p_context'||p_context,l_debug_level3);
1404: Pa_Debug.WRITE(g_module_name,'p_src_project_id'||p_src_project_id,l_debug_level3);
1397: END IF;
1398:
1399: IF l_debug_mode = 'Y' THEN
1400: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : COPY_MAPPING : Printing Input parameters';
1401: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1402: l_debug_level3);
1403: Pa_Debug.WRITE(g_module_name,'p_context'||p_context,l_debug_level3);
1404: Pa_Debug.WRITE(g_module_name,'p_src_project_id'||p_src_project_id,l_debug_level3);
1405: Pa_Debug.WRITE(g_module_name,'p_dest_project_id'||p_dest_project_id,l_debug_level3);
1399: IF l_debug_mode = 'Y' THEN
1400: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : COPY_MAPPING : Printing Input parameters';
1401: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1402: l_debug_level3);
1403: Pa_Debug.WRITE(g_module_name,'p_context'||p_context,l_debug_level3);
1404: Pa_Debug.WRITE(g_module_name,'p_src_project_id'||p_src_project_id,l_debug_level3);
1405: Pa_Debug.WRITE(g_module_name,'p_dest_project_id'||p_dest_project_id,l_debug_level3);
1406: Pa_Debug.WRITE(g_module_name,'p_src_str_version_id'||p_src_str_version_id,l_debug_level3);
1407: Pa_Debug.WRITE(g_module_name,'p_dest_str_version_id'||p_dest_str_version_id,l_debug_level3);
1400: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : COPY_MAPPING : Printing Input parameters';
1401: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1402: l_debug_level3);
1403: Pa_Debug.WRITE(g_module_name,'p_context'||p_context,l_debug_level3);
1404: Pa_Debug.WRITE(g_module_name,'p_src_project_id'||p_src_project_id,l_debug_level3);
1405: Pa_Debug.WRITE(g_module_name,'p_dest_project_id'||p_dest_project_id,l_debug_level3);
1406: Pa_Debug.WRITE(g_module_name,'p_src_str_version_id'||p_src_str_version_id,l_debug_level3);
1407: Pa_Debug.WRITE(g_module_name,'p_dest_str_version_id'||p_dest_str_version_id,l_debug_level3);
1408: END IF;
1401: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1402: l_debug_level3);
1403: Pa_Debug.WRITE(g_module_name,'p_context'||p_context,l_debug_level3);
1404: Pa_Debug.WRITE(g_module_name,'p_src_project_id'||p_src_project_id,l_debug_level3);
1405: Pa_Debug.WRITE(g_module_name,'p_dest_project_id'||p_dest_project_id,l_debug_level3);
1406: Pa_Debug.WRITE(g_module_name,'p_src_str_version_id'||p_src_str_version_id,l_debug_level3);
1407: Pa_Debug.WRITE(g_module_name,'p_dest_str_version_id'||p_dest_str_version_id,l_debug_level3);
1408: END IF;
1409:
1402: l_debug_level3);
1403: Pa_Debug.WRITE(g_module_name,'p_context'||p_context,l_debug_level3);
1404: Pa_Debug.WRITE(g_module_name,'p_src_project_id'||p_src_project_id,l_debug_level3);
1405: Pa_Debug.WRITE(g_module_name,'p_dest_project_id'||p_dest_project_id,l_debug_level3);
1406: Pa_Debug.WRITE(g_module_name,'p_src_str_version_id'||p_src_str_version_id,l_debug_level3);
1407: Pa_Debug.WRITE(g_module_name,'p_dest_str_version_id'||p_dest_str_version_id,l_debug_level3);
1408: END IF;
1409:
1410: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_TRUE)) THEN
1403: Pa_Debug.WRITE(g_module_name,'p_context'||p_context,l_debug_level3);
1404: Pa_Debug.WRITE(g_module_name,'p_src_project_id'||p_src_project_id,l_debug_level3);
1405: Pa_Debug.WRITE(g_module_name,'p_dest_project_id'||p_dest_project_id,l_debug_level3);
1406: Pa_Debug.WRITE(g_module_name,'p_src_str_version_id'||p_src_str_version_id,l_debug_level3);
1407: Pa_Debug.WRITE(g_module_name,'p_dest_str_version_id'||p_dest_str_version_id,l_debug_level3);
1408: END IF;
1409:
1410: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_TRUE)) THEN
1411: FND_MSG_PUB.initialize;
1411: FND_MSG_PUB.initialize;
1412: END IF;
1413:
1414: IF l_debug_mode = 'Y' THEN
1415: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : COPY_MAPPING : Validating Input parameters';
1416: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1417: l_debug_level3);
1418: END IF;
1419:
1412: END IF;
1413:
1414: IF l_debug_mode = 'Y' THEN
1415: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : COPY_MAPPING : Validating Input parameters';
1416: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1417: l_debug_level3);
1418: END IF;
1419:
1420: IF ( p_context IS NULL ) THEN
1417: l_debug_level3);
1418: END IF;
1419:
1420: IF ( p_context IS NULL ) THEN
1421: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : COPY_MAPPING : p_context is mandatory and cant be null';
1422: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1423: l_debug_level3);
1424:
1425: RAISE Invalid_Arg_Exc_WP;
1418: END IF;
1419:
1420: IF ( p_context IS NULL ) THEN
1421: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : COPY_MAPPING : p_context is mandatory and cant be null';
1422: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1423: l_debug_level3);
1424:
1425: RAISE Invalid_Arg_Exc_WP;
1426: END IF;
1433: OR ( p_dest_project_id IS NULL OR p_dest_project_id = FND_API.G_MISS_NUM )
1434: OR ( p_src_project_id = p_dest_project_id )
1435: )
1436: THEN
1437: 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';
1438: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1439: l_debug_level3);
1440:
1441: RAISE Invalid_Arg_Exc_WP;
1434: OR ( p_src_project_id = p_dest_project_id )
1435: )
1436: THEN
1437: 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';
1438: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1439: l_debug_level3);
1440:
1441: RAISE Invalid_Arg_Exc_WP;
1442:
1558: OR( p_dest_str_version_id IS NULL OR p_dest_str_version_id = FND_API.G_MISS_NUM )
1559: OR( p_src_project_id IS NULL OR p_src_project_id = FND_API.G_MISS_NUM )
1560: ) THEN
1561:
1562: 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';
1563: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1564: l_debug_level3);
1565: RAISE Invalid_Arg_Exc_WP;
1566: END IF;
1559: OR( p_src_project_id IS NULL OR p_src_project_id = FND_API.G_MISS_NUM )
1560: ) THEN
1561:
1562: 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';
1563: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1564: l_debug_level3);
1565: RAISE Invalid_Arg_Exc_WP;
1566: END IF;
1567:
1591: FETCH c_get_mapped_task_ver_id INTO l_from_dest_task_ver_id ( iCounter );
1592: CLOSE c_get_mapped_task_ver_id;
1593: END LOOP;
1594:
1595: Pa_Debug.WRITE(g_module_name,'l_from_task_id_tbl.COUNT '||l_from_task_id_tbl.COUNT ,l_debug_level3);
1596:
1597: -- Insert into PA_OBJECT_RELATIONSHIPS
1598: --bug 3574885, the forall should be called only when l_from_dest_task_ver_id is not empty
1599: --rtarway ,bug 3916440, the forall should be called only when l_src_to_tasks_id_tbl is not empty
1657: );
1658: END IF;
1659: END IF;
1660:
1661: Pa_Debug.WRITE(g_module_name,'After Completing insert',l_debug_level3);
1662:
1663: EXCEPTION
1664:
1665: WHEN FND_API.G_EXC_ERROR THEN
1681: ELSE
1682: x_msg_count := l_msg_count;
1683: END IF;
1684: IF l_debug_mode = 'Y' THEN
1685: Pa_Debug.reset_curr_function;
1686: END IF;
1687:
1688: WHEN Invalid_Arg_Exc_WP THEN
1689:
1696: , p_procedure_name => 'COPY_MAPPING'
1697: , p_error_text => x_msg_data);
1698:
1699: IF l_debug_mode = 'Y' THEN
1700: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1701: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1702: l_debug_level5);
1703: Pa_Debug.reset_curr_function;
1704: END IF;
1697: , p_error_text => x_msg_data);
1698:
1699: IF l_debug_mode = 'Y' THEN
1700: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1701: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1702: l_debug_level5);
1703: Pa_Debug.reset_curr_function;
1704: END IF;
1705: RAISE;
1699: IF l_debug_mode = 'Y' THEN
1700: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1701: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1702: l_debug_level5);
1703: Pa_Debug.reset_curr_function;
1704: END IF;
1705: RAISE;
1706:
1707: WHEN OTHERS THEN
1716: , p_procedure_name => 'COPY_MAPPING'
1717: , p_error_text => x_msg_data);
1718:
1719: IF l_debug_mode = 'Y' THEN
1720: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1721: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1722: l_debug_level5);
1723: Pa_Debug.reset_curr_function;
1724: END IF;
1717: , p_error_text => x_msg_data);
1718:
1719: IF l_debug_mode = 'Y' THEN
1720: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1721: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1722: l_debug_level5);
1723: Pa_Debug.reset_curr_function;
1724: END IF;
1725: RAISE;
1719: IF l_debug_mode = 'Y' THEN
1720: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1721: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1722: l_debug_level5);
1723: Pa_Debug.reset_curr_function;
1724: END IF;
1725: RAISE;
1726:
1727: END COPY_MAPPING ;
1805:
1806: x_msg_count := 0;
1807: x_return_status := FND_API.G_RET_STS_SUCCESS;
1808:
1809: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
1810: --l_debug_mode := NVL(p_debug_mode,'N');
1811: IF l_debug_mode = 'Y' THEN
1812: PA_DEBUG.set_curr_function( p_function => 'DELETE_ALL_MAPPING',
1813: p_debug_mode => l_debug_mode );
1808:
1809: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
1810: --l_debug_mode := NVL(p_debug_mode,'N');
1811: IF l_debug_mode = 'Y' THEN
1812: PA_DEBUG.set_curr_function( p_function => 'DELETE_ALL_MAPPING',
1813: p_debug_mode => l_debug_mode );
1814: END IF;
1815:
1816: IF l_debug_mode = 'Y' THEN
1813: p_debug_mode => l_debug_mode );
1814: END IF;
1815:
1816: IF l_debug_mode = 'Y' THEN
1817: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_ALL_MAPPING : Printing Input parameters';
1818: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1819: l_debug_level3);
1820:
1821: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
1814: END IF;
1815:
1816: IF l_debug_mode = 'Y' THEN
1817: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_ALL_MAPPING : Printing Input parameters';
1818: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1819: l_debug_level3);
1820:
1821: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
1822: l_debug_level3);
1817: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_ALL_MAPPING : Printing Input parameters';
1818: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1819: l_debug_level3);
1820:
1821: Pa_Debug.WRITE(g_module_name,'p_project_id'||':'||p_project_id,
1822: l_debug_level3);
1823: END IF;
1824:
1825: IF FND_API.TO_BOOLEAN(nvl(p_init_msg_list,FND_API.G_TRUE)) THEN
1830: savepoint DELETE_ALL_MAPPING_PUBLIC;
1831: END IF;
1832:
1833: IF l_debug_mode = 'Y' THEN
1834: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_ALL_MAPPING : Validating Input parameters';
1835: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1836: l_debug_level3);
1837: END IF;
1838:
1831: END IF;
1832:
1833: IF l_debug_mode = 'Y' THEN
1834: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_ALL_MAPPING : Validating Input parameters';
1835: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1836: l_debug_level3);
1837: END IF;
1838:
1839: IF ( p_project_id IS NULL )
1838:
1839: IF ( p_project_id IS NULL )
1840: THEN
1841: IF l_debug_mode = 'Y' THEN
1842: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_ALL_MAPPING : p_project_id can not be null';
1843: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1844: l_debug_level3);
1845: END IF;
1846: RAISE Invalid_Arg_Exc_WP;
1839: IF ( p_project_id IS NULL )
1840: THEN
1841: IF l_debug_mode = 'Y' THEN
1842: Pa_Debug.g_err_stage:= 'PA_PROJ_STRUC_MAPPING_PUB : DELETE_ALL_MAPPING : p_project_id can not be null';
1843: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1844: l_debug_level3);
1845: END IF;
1846: RAISE Invalid_Arg_Exc_WP;
1847: END IF;
1892: ELSE
1893: x_msg_count := l_msg_count;
1894: END IF;
1895: IF l_debug_mode = 'Y' THEN
1896: Pa_Debug.reset_curr_function;
1897: END IF;
1898:
1899: WHEN Invalid_Arg_Exc_WP THEN
1900:
1913: , p_procedure_name => 'DELETE_ALL_MAPPING'
1914: , p_error_text => x_msg_data);
1915:
1916: IF l_debug_mode = 'Y' THEN
1917: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1918: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1919: l_debug_level5);
1920: Pa_Debug.reset_curr_function;
1921: END IF;
1914: , p_error_text => x_msg_data);
1915:
1916: IF l_debug_mode = 'Y' THEN
1917: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1918: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1919: l_debug_level5);
1920: Pa_Debug.reset_curr_function;
1921: END IF;
1922: RAISE;
1916: IF l_debug_mode = 'Y' THEN
1917: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1918: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1919: l_debug_level5);
1920: Pa_Debug.reset_curr_function;
1921: END IF;
1922: RAISE;
1923:
1924: WHEN OTHERS THEN
1940: , p_procedure_name => 'DELETE_ALL_MAPPING'
1941: , p_error_text => x_msg_data);
1942:
1943: IF l_debug_mode = 'Y' THEN
1944: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1945: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1946: l_debug_level5);
1947: Pa_Debug.reset_curr_function;
1948: END IF;
1941: , p_error_text => x_msg_data);
1942:
1943: IF l_debug_mode = 'Y' THEN
1944: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1945: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1946: l_debug_level5);
1947: Pa_Debug.reset_curr_function;
1948: END IF;
1949: RAISE;
1943: IF l_debug_mode = 'Y' THEN
1944: Pa_Debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
1945: Pa_Debug.WRITE(g_module_name,Pa_Debug.g_err_stage,
1946: l_debug_level5);
1947: Pa_Debug.reset_curr_function;
1948: END IF;
1949: RAISE;
1950: END DELETE_ALL_MAPPING ;
1951: