88: l_project_exchange_rate pa_project_fundings.project_exchange_rate%TYPE;
89: l_projfunc_exchange_rate pa_project_fundings.projfunc_exchange_rate%TYPE;
90: BEGIN
91:
92: x_return_status := FND_API.G_RET_STS_SUCCESS;
93: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
94: l_debug_mode := NVL(l_debug_mode, 'Y');
95: /* the above default is set for testing purpose only
96: need to set to 'N' after testing */
179: NVL(Approved_Rev_Plan_Type_Flag,'N') = 'Y' AND
180: CI_ID IS NULL;
181: EXCEPTION
182: WHEN NO_DATA_FOUND THEN
183: x_return_status := FND_API.G_RET_STS_ERROR;
184: PA_UTILS.ADD_MESSAGE( p_app_short_name => 'PA',
185: p_msg_name => 'PA_FP_CI_NO_CURR_WK_VERSION');
186: IF l_debug_mode = 'Y' THEN
187: PA_DEBUG.Reset_Err_Stack;
267: x_err_stage => l_err_stage,
268: x_err_stack => l_err_stack );
269:
270: IF (l_err_code <> 0) THEN
271: x_return_status := FND_API.G_RET_STS_ERROR;
272: /* x_msg_count := FND_MSG_PUB.Count_Msg;
273: IF x_msg_count = 1 THEN
274: PA_INTERFACE_UTILS_PUB.get_messages
275: (p_encoded => FND_API.G_TRUE,
271: x_return_status := FND_API.G_RET_STS_ERROR;
272: /* x_msg_count := FND_MSG_PUB.Count_Msg;
273: IF x_msg_count = 1 THEN
274: PA_INTERFACE_UTILS_PUB.get_messages
275: (p_encoded => FND_API.G_TRUE,
276: p_msg_index => 1,
277: p_msg_count => 1,
278: p_msg_data => l_msg_data ,
279: p_data => x_msg_data,
330: ,x_msg => 'upd agr allowed flag '||l_upd_agr_allowed
331: ,x_log_level => 5);
332: END IF;
333: IF l_upd_agr_allowed = 'N' THEN
334: x_return_status := FND_API.G_RET_STS_ERROR;
335: /* x_msg_count := FND_MSG_PUB.Count_Msg;
336: IF x_msg_count = 1 THEN
337: PA_INTERFACE_UTILS_PUB.get_messages
338: (p_encoded => FND_API.G_TRUE,
334: x_return_status := FND_API.G_RET_STS_ERROR;
335: /* x_msg_count := FND_MSG_PUB.Count_Msg;
336: IF x_msg_count = 1 THEN
337: PA_INTERFACE_UTILS_PUB.get_messages
338: (p_encoded => FND_API.G_TRUE,
339: p_msg_index => 1,
340: p_msg_count => 1,
341: p_msg_data => l_msg_data ,
342: p_data => x_msg_data,
456: PA_UTILS.ADD_MESSAGE(
457: p_app_short_name => 'PA',
458: p_msg_name => 'PA_INVD_FUND_ALLOC_AMG' );
459:
460: x_return_status := FND_API.G_RET_STS_ERROR;
461: /* x_msg_count := FND_MSG_PUB.Count_Msg;
462: IF x_msg_count = 1 THEN
463: PA_INTERFACE_UTILS_PUB.get_messages
464: (p_encoded => FND_API.G_TRUE,
460: x_return_status := FND_API.G_RET_STS_ERROR;
461: /* x_msg_count := FND_MSG_PUB.Count_Msg;
462: IF x_msg_count = 1 THEN
463: PA_INTERFACE_UTILS_PUB.get_messages
464: (p_encoded => FND_API.G_TRUE,
465: p_msg_index => 1,
466: p_msg_count => 1,
467: p_msg_data => l_msg_data ,
468: p_data => x_msg_data,
536: ELSIF l_ci_ver_planning_level = 'P' AND
537: l_funding_level = 'T' THEN
538: PA_UTILS.ADD_MESSAGE( p_app_short_name => 'PA',
539: p_msg_name => 'PA_FP_CI_FUNDING_LEVEL' );
540: x_return_status := FND_API.G_RET_STS_ERROR;
541: IF l_debug_mode = 'Y' THEN
542: PA_DEBUG.Reset_Err_Stack;
543: END IF;
544: RETURN;
671: ,x_log_level => 5);
672: END IF;
673:
674: IF l_add_funding_ok_flag <> 'Y' THEN
675: x_return_status := FND_API.G_RET_STS_ERROR;
676: /* x_msg_count := FND_MSG_PUB.Count_Msg;
677: IF x_msg_count = 1 THEN
678: PA_INTERFACE_UTILS_PUB.get_messages
679: (p_encoded => FND_API.G_TRUE,
675: x_return_status := FND_API.G_RET_STS_ERROR;
676: /* x_msg_count := FND_MSG_PUB.Count_Msg;
677: IF x_msg_count = 1 THEN
678: PA_INTERFACE_UTILS_PUB.get_messages
679: (p_encoded => FND_API.G_TRUE,
680: p_msg_index => 1,
681: p_msg_count => 1,
682: p_msg_data => l_msg_data ,
683: p_data => x_msg_data,
765: IF (l_err_code <> 0) THEN
766: PA_UTILS.ADD_MESSAGE(
767: p_app_short_name => 'PA',
768: p_msg_name => l_err_stage );
769: x_return_status := FND_API.G_RET_STS_ERROR;
770: /* x_msg_count := FND_MSG_PUB.Count_Msg;
771: IF x_msg_count = 1 THEN
772: PA_INTERFACE_UTILS_PUB.get_messages
773: (p_encoded => FND_API.G_TRUE,
769: x_return_status := FND_API.G_RET_STS_ERROR;
770: /* x_msg_count := FND_MSG_PUB.Count_Msg;
771: IF x_msg_count = 1 THEN
772: PA_INTERFACE_UTILS_PUB.get_messages
773: (p_encoded => FND_API.G_TRUE,
774: p_msg_index => 1,
775: p_msg_count => 1,
776: p_msg_data => l_msg_data ,
777: p_data => x_msg_data,
818: ,x_msg => 'aft calling link api : ret status '||
819: x_return_status
820: ,x_log_level => 5);
821: END IF;
822: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
823: IF l_debug_mode = 'Y' THEN
824: PA_DEBUG.Reset_Err_Stack;
825: END IF;
826: RETURN;
839: IF l_debug_mode = 'Y' THEN
840: PA_DEBUG.Reset_Err_Stack;
841: END IF;
842:
843: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
844: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_FP_CI_IMPLEMENT_PKG',
845: p_procedure_name => 'CREATE_CI_IMPACT_FUND_LINES',
846: p_error_text => SUBSTRB(SQLERRM,1,240));
847:
893: if the Cost and Revenue amounts are planned separately and
894: both the target versions are undergoing WBS process update
895: changes. */
896: BEGIN
897: x_return_status := FND_API.G_RET_STS_SUCCESS;
898:
899: l_user_id := FND_GLOBAL.USER_ID;
900: l_wbs_update_flag := 'Y';
901:
928: for getting the status details as we are already
929: getting information from pa_budget_versions table. */
930:
931: IF l_plan_proc_code = 'WUP' AND l_wbs_update_flag = 'Y' THEN
932: x_return_status := FND_API.G_RET_STS_ERROR;
933: l_chk_flag := 'N';
934: l_wbs_update_flag := 'N';
935: IF l_request_id IS NOT NULL THEN
936: l_request_id_v := LTRIM(RTRIM(TO_CHAR(l_request_id)));
950: /* checking for Submitted status */
951:
952: IF l_budget_status_code = 'S' AND l_chk_flag = 'Y' THEN
953: l_chk_flag := 'N';
954: x_return_status := FND_API.G_RET_STS_ERROR;
955: IF l_version_type = 'ALL' THEN
956: PA_UTILS.ADD_MESSAGE( p_app_short_name => 'PA',
957: p_msg_name => 'PA_FP_MERGE_ALL_SUBMIT');
958: ELSE
983: IF l_locked_by_person_id IS NOT NULL AND
984: l_locked_by_person_id <> l_person_id AND
985: l_chk_flag = 'Y' THEN
986: l_locked_by_name := pa_fin_plan_utils.get_person_name(l_locked_by_person_id );
987: x_return_status := FND_API.G_RET_STS_ERROR;
988: IF l_version_type = 'ALL' THEN
989: PA_UTILS.ADD_MESSAGE( p_app_short_name => 'PA',
990: p_msg_name => 'PA_FP_MERGE_ALL_LCK',
991: p_token1 => 'LOCKBY',
1015:
1016: EXCEPTION
1017: WHEN OTHERS THEN
1018:
1019: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1020: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_FP_CI_IMPLEMENT_PKG',
1021: p_procedure_name => 'CHK_PLAN_VER_FOR_MERGE',
1022: p_error_text => SUBSTRB(SQLERRM,1,240));
1023: