225: if (l_valid <> 'Y') then
226: -- check that the person is allowed to have schedule
227: x_return_status := FND_API.G_RET_STS_ERROR;
228: fnd_message.set_name('PA','PA_NO_SCHEDULABLE_PERSON');
229: fnd_msg_pub.add();
230: end if;
231:
232: -- if the res belongs to the expenditure org hierarchy, check if the res's
233: -- job is schedulable
239: ,p_date => l_date );
240: IF l_job_schedulable <> 'Y' THEN
241: x_return_status := FND_API.G_RET_STS_ERROR;
242: fnd_message.set_name('PA','PA_NOT_SCHEDULABLE_JOB');
243: fnd_msg_pub.add();
244: END IF;
245: END IF;
246: end if;
247:
278: if p_calling_module = 'FORM' then
279: fnd_message.set_name('FND','FORM_RECORD_CHANGED');
280: --fnd_message.set_token('PKG_NAME','PA_PROJECT_PARTIES_PKG');
281: --fnd_message.set_token('PROCEDURE_NAME','UPDATE_ROW');
282: fnd_msg_pub.add;
283: else
284: fnd_message.set_name('PA','PA_XC_RECORD_CHANGED');
285: --fnd_message.set_token('PKG_NAME','PA_PROJECT_PARTIES_PKG');
286: --fnd_message.set_token('PROCEDURE_NAME','UPDATE_ROW');
283: else
284: fnd_message.set_name('PA','PA_XC_RECORD_CHANGED');
285: --fnd_message.set_token('PKG_NAME','PA_PROJECT_PARTIES_PKG');
286: --fnd_message.set_token('PROCEDURE_NAME','UPDATE_ROW');
287: fnd_msg_pub.add;
288:
289: end if;
290: end if;
291:
380: ,x_error_occured => l_error_occured);
381:
382: IF l_error_occured = 'PA_PR_NO_MGR_DATE_RANGE' THEN
383: /* If a Manager does not exist for the entire duration of the project */
384: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
385: pa_utils.add_message
386: ( p_app_short_name => 'PA'
387: ,p_msg_name => 'PA_PR_NO_MGR_DATE_RANGE'
388: ,p_token1 => 'START_DATE'
420: end if;
421: commit work;
422: end if;
423: end if;
424: fnd_msg_pub.count_and_get(p_count => x_msg_count,
425: p_data => x_msg_data);
426:
427: pa_debug.reset_err_stack;
428:
429: EXCEPTION
430: --Bug 5186830
431: WHEN FND_API.G_EXC_ERROR THEN
432:
433: l_msg_count := FND_MSG_PUB.count_msg;
434:
435: IF l_msg_count = 1 THEN
436: PA_INTERFACE_UTILS_PUB.get_messages
437: (p_encoded => FND_API.G_TRUE
452: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
453: fnd_message.set_name('PA','PA_UNEXPECTED_ERROR');
454: fnd_message.set_token('PKG_NAME','PA_PROJECT_PARTIES_PUB');
455: fnd_message.set_token('PROCEDURE_NAME','CREATE_PROJECT_PARTY');
456: fnd_msg_pub.add();
457: fnd_msg_pub.count_and_get(p_count => x_msg_count,
458: p_data => x_msg_data);
459: raise;
460:
453: fnd_message.set_name('PA','PA_UNEXPECTED_ERROR');
454: fnd_message.set_token('PKG_NAME','PA_PROJECT_PARTIES_PUB');
455: fnd_message.set_token('PROCEDURE_NAME','CREATE_PROJECT_PARTY');
456: fnd_msg_pub.add();
457: fnd_msg_pub.count_and_get(p_count => x_msg_count,
458: p_data => x_msg_data);
459: raise;
460:
461: WHEN OTHERS THEN
462: if p_commit = FND_API.G_TRUE then
463: rollback to project_parties;
464: end if;
465: x_return_status := fnd_api.g_ret_sts_unexp_error;
466: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_PROJECT_PARTIES_PUB',
467: p_procedure_name => pa_debug.G_err_stack,
468: p_error_text => SUBSTRB(SQLERRM,1,240));
469: raise;
470:
590: IF (l_valid <> 'Y') then
591: -- check that the person is allowed to have schedule
592: x_return_status := FND_API.G_RET_STS_ERROR;
593: fnd_message.set_name('PA','PA_NO_SCHEDULABLE_PERSON');
594: fnd_msg_pub.add();
595: END IF;
596:
597: -- if the res belongs to the expenditure org hierarchy, check if the res's
598: -- job is schedulable
607:
608: IF l_job_schedulable <> 'Y' THEN
609: x_return_status := FND_API.G_RET_STS_ERROR;
610: fnd_message.set_name('PA','PA_NOT_SCHEDULABLE_JOB');
611: fnd_msg_pub.add();
612: END IF;
613: END IF;
614: END IF;
615: if x_return_status = FND_API.G_RET_STS_SUCCESS then
753: if p_calling_module = 'FORM' then
754: fnd_message.set_name('FND','FORM_RECORD_CHANGED');
755: --fnd_message.set_token('PKG_NAME','PA_PROJECT_PARTIES_PKG');
756: --fnd_message.set_token('PROCEDURE_NAME','UPDATE_ROW');
757: fnd_msg_pub.add;
758: else
759: fnd_message.set_name('PA','PA_XC_RECORD_CHANGED');
760: --fnd_message.set_token('PKG_NAME',to_char(p_project_party_id));
761: --fnd_message.set_token('PROCEDURE_NAME',to_char(p_record_version_number));
758: else
759: fnd_message.set_name('PA','PA_XC_RECORD_CHANGED');
760: --fnd_message.set_token('PKG_NAME',to_char(p_project_party_id));
761: --fnd_message.set_token('PROCEDURE_NAME',to_char(p_record_version_number));
762: fnd_msg_pub.add;
763:
764: end if;
765: end if;
766:
791: ,x_error_occured => l_error_occured);
792:
793: IF l_error_occured = 'PA_PR_NO_MGR_DATE_RANGE' THEN
794: /* If a Manager does not exist for the entire duration of the project */
795: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
796: pa_utils.add_message
797: ( p_app_short_name => 'PA'
798: ,p_msg_name => 'PA_PR_NO_MGR_DATE_RANGE'
799: ,p_token1 => 'START_DATE'
830: END IF;
831: end if;
832: commit work;
833: end if;
834: fnd_msg_pub.count_and_get(p_count => x_msg_count,
835: p_data => x_msg_data);
836:
837: pa_debug.reset_err_stack;
838:
840:
841: -- bug 5856712
842: WHEN FND_API.G_EXC_ERROR THEN
843:
844: l_msg_count := FND_MSG_PUB.count_msg;
845:
846: IF l_msg_count = 1 THEN
847: PA_INTERFACE_UTILS_PUB.get_messages
848: (p_encoded => FND_API.G_TRUE
863: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
864: fnd_message.set_name('PA','PA_UNEXPECTED_ERROR');
865: fnd_message.set_token('PKG_NAME','PA_PROJECT_PARTIES_PUB');
866: fnd_message.set_token('PROCEDURE_NAME','UPDATE_PROJECT_PARTY');
867: fnd_msg_pub.add();
868: fnd_msg_pub.count_and_get(p_count => x_msg_count,
869: p_data => x_msg_data);
870: raise;
871:
864: fnd_message.set_name('PA','PA_UNEXPECTED_ERROR');
865: fnd_message.set_token('PKG_NAME','PA_PROJECT_PARTIES_PUB');
866: fnd_message.set_token('PROCEDURE_NAME','UPDATE_PROJECT_PARTY');
867: fnd_msg_pub.add();
868: fnd_msg_pub.count_and_get(p_count => x_msg_count,
869: p_data => x_msg_data);
870: raise;
871:
872:
874: if p_commit = fnd_api.G_TRUE then
875: rollback to project_parties;
876: end if;
877: x_return_status := fnd_api.g_ret_sts_unexp_error;
878: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_PROJECT_PARTIES_PUB',
879: p_procedure_name => pa_debug.g_err_stack,
880: p_error_text => SUBSTRB(SQLERRM,1,240));
881: fnd_msg_pub.count_and_get(p_count => x_msg_count,
882: p_data => x_msg_data);
877: x_return_status := fnd_api.g_ret_sts_unexp_error;
878: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_PROJECT_PARTIES_PUB',
879: p_procedure_name => pa_debug.g_err_stack,
880: p_error_text => SUBSTRB(SQLERRM,1,240));
881: fnd_msg_pub.count_and_get(p_count => x_msg_count,
882: p_data => x_msg_data);
883:
884: raise;
885:
1087: ,x_error_occured => l_error_occured);
1088:
1089: IF l_error_occured = 'PA_PR_NO_MGR_DATE_RANGE' THEN
1090: /* If a Manager does not exist for the entire duration of the project */
1091: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
1092: pa_utils.add_message
1093: ( p_app_short_name => 'PA'
1094: ,p_msg_name => 'PA_PR_NO_MGR_DATE_RANGE'
1095: ,p_token1 => 'START_DATE'
1128: end if;
1129: commit work;
1130: end if;
1131:
1132: fnd_msg_pub.count_and_get(p_count => x_msg_count,
1133: p_data => x_msg_data);
1134: end if;
1135:
1136: pa_debug.reset_err_stack;
1141: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1142: fnd_message.set_name('PA','PA_UNEXPECTED_ERROR');
1143: fnd_message.set_token('PKG_NAME','PA_PROJECT_PARTIES_PVT');
1144: fnd_message.set_token('PROCEDURE_NAME','DELETE_PROJECT_PARTY');
1145: fnd_msg_pub.add();
1146: fnd_msg_pub.count_and_get(p_count => x_msg_count,
1147: p_data => x_msg_data);
1148: raise;
1149:
1142: fnd_message.set_name('PA','PA_UNEXPECTED_ERROR');
1143: fnd_message.set_token('PKG_NAME','PA_PROJECT_PARTIES_PVT');
1144: fnd_message.set_token('PROCEDURE_NAME','DELETE_PROJECT_PARTY');
1145: fnd_msg_pub.add();
1146: fnd_msg_pub.count_and_get(p_count => x_msg_count,
1147: p_data => x_msg_data);
1148: raise;
1149:
1150: WHEN NO_DATA_FOUND THEN
1185: FND_MESSAGE.Set_Name('PA', 'PA_XC_ROW_ALREADY_LOCKED');
1186: x_msg_data := FND_MESSAGE.get;
1187: x_return_status := FND_API.G_RET_STS_ERROR;
1188: else
1189: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_PROJECT_PARTIES_PUB',
1190: p_procedure_name => pa_debug.g_err_stack,
1191: p_error_text => SUBSTRB(SQLERRM,1,240));
1192: x_return_status := FND_API.G_RET_STS_ERROR;
1193: end if;