103: g_file_name CONSTANT VARCHAR2 (12) := 'ozfvbdgb.pls';
104: g_cons_fund_mode CONSTANT VARCHAR2 (30) := 'ADJUST';
105: g_recal_flag CONSTANT VARCHAR2(1) := NVL(fnd_profile.value('OZF_BUDGET_ADJ_ALLOW_RECAL'),'N');
106: g_universal_currency CONSTANT VARCHAR2 (15) := fnd_profile.VALUE ('OZF_UNIV_CURR_CODE');
107: G_DEBUG BOOLEAN := FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_debug_high);
108:
109:
110: /*****************************************************************************************/
111: -- Start of Comments
600: ozf_utility_pvt.debug_message(' create_Act_budgets.plan_currency_code mg: ' || p_act_util_rec.plan_currency_code);
601:
602: -- Initialize message list IF p_init_msg_list is set to TRUE.
603: IF fnd_api.to_boolean (p_init_msg_list) THEN
604: fnd_msg_pub.initialize;
605: END IF;
606:
607: -- Initialize API return status to success
608: x_return_status := fnd_api.g_ret_sts_success;
1057: || l_act_budgets_rec.arc_act_budget_used_by
1058: || ' id('
1059: || l_act_budgets_rec.act_budget_used_by_id);
1060: END IF;
1061: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
1062: fnd_message.set_name ('OZF', 'OZF_NO_LEDGER_FOUND');
1063: --Message OZF_NO_LEDGER_FOUND changed fix bug 5190932
1064: --fnd_message.set_token('OBJECT_TYPE', l_act_budgets_rec.arc_act_budget_used_by);
1065: --fnd_message.set_token('OBJECT_ID', l_act_budgets_rec.act_budget_used_by_id);
1062: fnd_message.set_name ('OZF', 'OZF_NO_LEDGER_FOUND');
1063: --Message OZF_NO_LEDGER_FOUND changed fix bug 5190932
1064: --fnd_message.set_token('OBJECT_TYPE', l_act_budgets_rec.arc_act_budget_used_by);
1065: --fnd_message.set_token('OBJECT_ID', l_act_budgets_rec.act_budget_used_by_id);
1066: fnd_msg_pub.ADD;
1067: END IF;
1068: x_return_status := fnd_api.g_ret_sts_error;
1069: RAISE fnd_api.g_exc_error;
1070: END IF;
1448: COMMIT WORK;
1449: END IF;
1450:
1451: -- Standard call to get message count AND IF count is 1, get message info.
1452: fnd_msg_pub.count_and_get (
1453: p_count=> x_msg_count
1454: ,p_data=> x_msg_data
1455: ,p_encoded=> fnd_api.g_false
1456: );
1457: EXCEPTION
1458: WHEN fnd_api.g_exc_error THEN
1459: ROLLBACK TO create_act_budgets_pvt;
1460: x_return_status := fnd_api.g_ret_sts_error;
1461: fnd_msg_pub.count_and_get (
1462: p_count=> x_msg_count
1463: ,p_data=> x_msg_data
1464: ,p_encoded=> fnd_api.g_false
1465: );
1465: );
1466: WHEN fnd_api.g_exc_unexpected_error THEN
1467: ROLLBACK TO create_act_budgets_pvt;
1468: x_return_status := fnd_api.g_ret_sts_unexp_error;
1469: fnd_msg_pub.count_and_get (
1470: p_count=> x_msg_count
1471: ,p_data=> x_msg_data
1472: ,p_encoded=> fnd_api.g_false
1473: );
1474: WHEN OTHERS THEN
1475: ROLLBACK TO create_act_budgets_pvt;
1476: x_return_status := fnd_api.g_ret_sts_unexp_error;
1477:
1478: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1479: fnd_msg_pub.add_exc_msg (g_package_name, l_api_name);
1480: END IF;
1481:
1482: fnd_msg_pub.count_and_get (
1475: ROLLBACK TO create_act_budgets_pvt;
1476: x_return_status := fnd_api.g_ret_sts_unexp_error;
1477:
1478: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1479: fnd_msg_pub.add_exc_msg (g_package_name, l_api_name);
1480: END IF;
1481:
1482: fnd_msg_pub.count_and_get (
1483: p_count=> x_msg_count
1478: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
1479: fnd_msg_pub.add_exc_msg (g_package_name, l_api_name);
1480: END IF;
1481:
1482: fnd_msg_pub.count_and_get (
1483: p_count=> x_msg_count
1484: ,p_data=> x_msg_data
1485: ,p_encoded=> fnd_api.g_false
1486: );
2019: ozf_utility_pvt.debug_message(' update_Act_budgets.plan_currency_code mg: ' || p_act_util_rec.plan_currency_code);
2020:
2021: -- Initialize message list IF p_init_msg_list is set to TRUE.
2022: IF fnd_api.to_boolean (p_init_msg_list) THEN
2023: fnd_msg_pub.initialize;
2024: END IF;
2025:
2026: -- Initialize API return status to success
2027: x_return_status := fnd_api.g_ret_sts_success;
2294: , l_objfundsum_rec.plan_curr_planned_amt
2295: , l_objfundsum_rec.univ_curr_planned_amt;
2296: IF c_get_objfundsum_rec%NOTFOUND THEN
2297: CLOSE c_get_objfundsum_rec;
2298: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
2299: fnd_message.set_name('OZF', 'OZF_OBJFUNDSUM_RECORD_NOT_FOUND');
2300: fnd_msg_pub.add;
2301: END IF;
2302: RAISE fnd_api.g_exc_error;
2296: IF c_get_objfundsum_rec%NOTFOUND THEN
2297: CLOSE c_get_objfundsum_rec;
2298: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
2299: fnd_message.set_name('OZF', 'OZF_OBJFUNDSUM_RECORD_NOT_FOUND');
2300: fnd_msg_pub.add;
2301: END IF;
2302: RAISE fnd_api.g_exc_error;
2303: END IF;
2304: CLOSE c_get_objfundsum_rec;
2859: || l_act_budgets_rec.arc_act_budget_used_by
2860: || ' id('
2861: || l_act_budgets_rec.act_budget_used_by_id);
2862: END IF;
2863: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
2864: fnd_message.set_name ('OZF', 'OZF_NO_LEDGER_FOUND');
2865: --Message OZF_NO_LEDGER_FOUND changed fix bug 5190932
2866: --fnd_message.set_token('OBJECT_TYPE', l_act_budgets_rec.arc_act_budget_used_by);
2867: --fnd_message.set_token('OBJECT_ID', l_act_budgets_rec.act_budget_used_by_id);
2864: fnd_message.set_name ('OZF', 'OZF_NO_LEDGER_FOUND');
2865: --Message OZF_NO_LEDGER_FOUND changed fix bug 5190932
2866: --fnd_message.set_token('OBJECT_TYPE', l_act_budgets_rec.arc_act_budget_used_by);
2867: --fnd_message.set_token('OBJECT_ID', l_act_budgets_rec.act_budget_used_by_id);
2868: fnd_msg_pub.ADD;
2869: END IF;
2870: x_return_status := fnd_api.g_ret_sts_error;
2871: RAISE fnd_api.g_exc_error;
2872: END IF;
3002:
3003: IF (SQL%NOTFOUND) THEN
3004: -- Error, check the msg level and added an error message to the
3005: -- API message list
3006: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3007: fnd_message.set_name ('OZF', 'OZF_API_RECORD_NOT_FOUND');
3008: fnd_msg_pub.ADD;
3009: END IF;
3010:
3004: -- Error, check the msg level and added an error message to the
3005: -- API message list
3006: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3007: fnd_message.set_name ('OZF', 'OZF_API_RECORD_NOT_FOUND');
3008: fnd_msg_pub.ADD;
3009: END IF;
3010:
3011: RAISE fnd_api.g_exc_unexpected_error;
3012: END IF;
3338: COMMIT WORK;
3339: END IF;
3340:
3341: -- Standard call to get message count AND IF count is 1, get message info.
3342: fnd_msg_pub.count_and_get (
3343: p_count=> x_msg_count
3344: ,p_data=> x_msg_data
3345: ,p_encoded=> fnd_api.g_false
3346: );
3347: EXCEPTION
3348: WHEN fnd_api.g_exc_error THEN
3349: ROLLBACK TO update_act_budgets_pvt;
3350: x_return_status := fnd_api.g_ret_sts_error;
3351: fnd_msg_pub.count_and_get (
3352: p_count=> x_msg_count
3353: ,p_data=> x_msg_data
3354: ,p_encoded=> fnd_api.g_false
3355: );
3355: );
3356: WHEN fnd_api.g_exc_unexpected_error THEN
3357: ROLLBACK TO update_act_budgets_pvt;
3358: x_return_status := fnd_api.g_ret_sts_unexp_error;
3359: fnd_msg_pub.count_and_get (
3360: p_count=> x_msg_count
3361: ,p_data=> x_msg_data
3362: ,p_encoded=> fnd_api.g_false
3363: );
3364: WHEN OTHERS THEN
3365: ROLLBACK TO update_act_budgets_pvt;
3366: x_return_status := fnd_api.g_ret_sts_unexp_error;
3367:
3368: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3369: fnd_msg_pub.add_exc_msg (g_package_name, l_api_name);
3370: END IF;
3371:
3372: fnd_msg_pub.count_and_get (
3365: ROLLBACK TO update_act_budgets_pvt;
3366: x_return_status := fnd_api.g_ret_sts_unexp_error;
3367:
3368: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3369: fnd_msg_pub.add_exc_msg (g_package_name, l_api_name);
3370: END IF;
3371:
3372: fnd_msg_pub.count_and_get (
3373: p_count=> x_msg_count
3368: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3369: fnd_msg_pub.add_exc_msg (g_package_name, l_api_name);
3370: END IF;
3371:
3372: fnd_msg_pub.count_and_get (
3373: p_count=> x_msg_count
3374: ,p_data=> x_msg_data
3375: ,p_encoded=> fnd_api.g_false
3376: );
3424: END IF;
3425:
3426: -- Initialize message list IF p_init_msg_list is set to TRUE.
3427: IF fnd_api.to_boolean (p_init_msg_list) THEN
3428: fnd_msg_pub.initialize;
3429: END IF;
3430:
3431: -- Initialize API return status to success
3432: x_return_status := fnd_api.g_ret_sts_success;
3438: FETCH c_status INTO l_status_code;
3439: CLOSE c_status;
3440:
3441: IF l_status_code NOT IN ('NEW') THEN
3442: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3443: fnd_message.set_name ('OZF', 'OZF_ACT_BUDGET_NO_DELETE');
3444: fnd_msg_pub.ADD;
3445: END IF;
3446:
3440:
3441: IF l_status_code NOT IN ('NEW') THEN
3442: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3443: fnd_message.set_name ('OZF', 'OZF_ACT_BUDGET_NO_DELETE');
3444: fnd_msg_pub.ADD;
3445: END IF;
3446:
3447: RAISE fnd_api.g_exc_error;
3448: END IF;
3456: IF SQL%NOTFOUND THEN
3457: --
3458: -- Add error message to API message list.
3459: --
3460: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3461: fnd_message.set_name ('OZF', 'OZF_API_RECORD_NOT_FOUND');
3462: fnd_msg_pub.ADD;
3463: END IF;
3464:
3458: -- Add error message to API message list.
3459: --
3460: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3461: fnd_message.set_name ('OZF', 'OZF_API_RECORD_NOT_FOUND');
3462: fnd_msg_pub.ADD;
3463: END IF;
3464:
3465: RAISE fnd_api.g_exc_error;
3466: END IF;
3473: COMMIT WORK;
3474: END IF;
3475:
3476: -- Standard call to get message count AND IF count is 1, get message info.
3477: fnd_msg_pub.count_and_get (
3478: p_count=> x_msg_count
3479: ,p_data=> x_msg_data
3480: ,p_encoded=> fnd_api.g_false
3481: );
3482: EXCEPTION
3483: WHEN fnd_api.g_exc_error THEN
3484: ROLLBACK TO delete_act_budgets_pvt;
3485: x_return_status := fnd_api.g_ret_sts_error;
3486: fnd_msg_pub.count_and_get (
3487: p_count=> x_msg_count
3488: ,p_data=> x_msg_data
3489: ,p_encoded=> fnd_api.g_false
3490: );
3490: );
3491: WHEN fnd_api.g_exc_unexpected_error THEN
3492: ROLLBACK TO delete_act_budgets_pvt;
3493: x_return_status := fnd_api.g_ret_sts_unexp_error;
3494: fnd_msg_pub.count_and_get (
3495: p_count=> x_msg_count
3496: ,p_data=> x_msg_data
3497: ,p_encoded=> fnd_api.g_false
3498: );
3499: WHEN OTHERS THEN
3500: ROLLBACK TO delete_act_budgets_pvt;
3501: x_return_status := fnd_api.g_ret_sts_unexp_error;
3502:
3503: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3504: fnd_msg_pub.add_exc_msg (g_package_name, l_api_name);
3505: END IF;
3506:
3507: fnd_msg_pub.count_and_get (
3500: ROLLBACK TO delete_act_budgets_pvt;
3501: x_return_status := fnd_api.g_ret_sts_unexp_error;
3502:
3503: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3504: fnd_msg_pub.add_exc_msg (g_package_name, l_api_name);
3505: END IF;
3506:
3507: fnd_msg_pub.count_and_get (
3508: p_count=> x_msg_count
3503: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3504: fnd_msg_pub.add_exc_msg (g_package_name, l_api_name);
3505: END IF;
3506:
3507: fnd_msg_pub.count_and_get (
3508: p_count=> x_msg_count
3509: ,p_data=> x_msg_data
3510: ,p_encoded=> fnd_api.g_false
3511: );
3554: END IF;
3555:
3556: -- Initialize message list if p_init_msg_list is set to TRUE.
3557: IF fnd_api.to_boolean (p_init_msg_list) THEN
3558: fnd_msg_pub.initialize;
3559: END IF;
3560:
3561: -- Initialize API return status to success
3562: x_return_status := fnd_api.g_ret_sts_success;
3571: CLOSE c_act_budget;
3572:
3573: -- Error, check the msg level and added an error message to the
3574: -- API message list
3575: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN -- MMSG
3576: fnd_message.set_name ('OZF', 'OZF_API_RECORD_NOT_FOUND');
3577: fnd_msg_pub.ADD;
3578: END IF;
3579:
3573: -- Error, check the msg level and added an error message to the
3574: -- API message list
3575: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN -- MMSG
3576: fnd_message.set_name ('OZF', 'OZF_API_RECORD_NOT_FOUND');
3577: fnd_msg_pub.ADD;
3578: END IF;
3579:
3580: RAISE fnd_api.g_exc_error;
3581: END IF;
3584: --
3585: -- END of API body.
3586: --
3587: -- Standard call to get message count AND IF count is 1, get message info.
3588: fnd_msg_pub.count_and_get (
3589: p_count=> x_msg_count
3590: ,p_data=> x_msg_data
3591: ,p_encoded=> fnd_api.g_false
3592: );
3592: );
3593: EXCEPTION
3594: WHEN fnd_api.g_exc_error THEN
3595: x_return_status := fnd_api.g_ret_sts_error;
3596: fnd_msg_pub.count_and_get (
3597: p_count=> x_msg_count
3598: ,p_data=> x_msg_data
3599: ,p_encoded=> fnd_api.g_false
3600: );
3599: ,p_encoded=> fnd_api.g_false
3600: );
3601: WHEN fnd_api.g_exc_unexpected_error THEN
3602: x_return_status := fnd_api.g_ret_sts_unexp_error;
3603: fnd_msg_pub.count_and_get (
3604: p_count=> x_msg_count
3605: ,p_data=> x_msg_data
3606: ,p_encoded=> fnd_api.g_false
3607: );
3607: );
3608: WHEN ozf_utility_pvt.resource_locked THEN
3609: x_return_status := fnd_api.g_ret_sts_error;
3610:
3611: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3612: fnd_message.set_name ('OZF', 'OZF_API_RESOURCE_LOCKED');
3613: fnd_msg_pub.ADD;
3614: END IF;
3615:
3609: x_return_status := fnd_api.g_ret_sts_error;
3610:
3611: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3612: fnd_message.set_name ('OZF', 'OZF_API_RESOURCE_LOCKED');
3613: fnd_msg_pub.ADD;
3614: END IF;
3615:
3616: fnd_msg_pub.count_and_get (
3617: p_count=> x_msg_count
3612: fnd_message.set_name ('OZF', 'OZF_API_RESOURCE_LOCKED');
3613: fnd_msg_pub.ADD;
3614: END IF;
3615:
3616: fnd_msg_pub.count_and_get (
3617: p_count=> x_msg_count
3618: ,p_data=> x_msg_data
3619: ,p_encoded=> fnd_api.g_false
3620: );
3620: );
3621: WHEN OTHERS THEN
3622: x_return_status := fnd_api.g_ret_sts_unexp_error;
3623:
3624: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3625: fnd_msg_pub.add_exc_msg (g_package_name, l_api_name);
3626: END IF;
3627:
3628: fnd_msg_pub.count_and_get (
3621: WHEN OTHERS THEN
3622: x_return_status := fnd_api.g_ret_sts_unexp_error;
3623:
3624: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3625: fnd_msg_pub.add_exc_msg (g_package_name, l_api_name);
3626: END IF;
3627:
3628: fnd_msg_pub.count_and_get (
3629: p_count=> x_msg_count
3624: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3625: fnd_msg_pub.add_exc_msg (g_package_name, l_api_name);
3626: END IF;
3627:
3628: fnd_msg_pub.count_and_get (
3629: p_count=> x_msg_count
3630: ,p_data=> x_msg_data
3631: ,p_encoded=> fnd_api.g_false
3632: );
3671: END IF;
3672:
3673: -- Initialize message list if p_init_msg_list is set to TRUE.
3674: IF fnd_api.to_boolean (p_init_msg_list) THEN
3675: fnd_msg_pub.initialize;
3676: END IF;
3677:
3678: -- Initialize API return status to success
3679: x_return_status := fnd_api.g_ret_sts_success;
3726: --
3727: -- END of API body.
3728: --
3729: -------------------- finish --------------------------
3730: fnd_msg_pub.count_and_get (
3731: p_encoded=> fnd_api.g_false
3732: ,p_count=> x_msg_count
3733: ,p_data=> x_msg_data
3734: );
3734: );
3735: EXCEPTION
3736: WHEN fnd_api.g_exc_error THEN
3737: x_return_status := fnd_api.g_ret_sts_error;
3738: fnd_msg_pub.count_and_get (
3739: p_count=> x_msg_count
3740: ,p_data=> x_msg_data
3741: ,p_encoded=> fnd_api.g_false
3742: );
3741: ,p_encoded=> fnd_api.g_false
3742: );
3743: WHEN fnd_api.g_exc_unexpected_error THEN
3744: x_return_status := fnd_api.g_ret_sts_unexp_error;
3745: fnd_msg_pub.count_and_get (
3746: p_count=> x_msg_count
3747: ,p_data=> x_msg_data
3748: ,p_encoded=> fnd_api.g_false
3749: );
3749: );
3750: WHEN OTHERS THEN
3751: x_return_status := fnd_api.g_ret_sts_unexp_error;
3752:
3753: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3754: fnd_msg_pub.add_exc_msg (g_package_name, l_api_name);
3755: END IF;
3756:
3757: fnd_msg_pub.count_and_get (
3750: WHEN OTHERS THEN
3751: x_return_status := fnd_api.g_ret_sts_unexp_error;
3752:
3753: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3754: fnd_msg_pub.add_exc_msg (g_package_name, l_api_name);
3755: END IF;
3756:
3757: fnd_msg_pub.count_and_get (
3758: p_count=> x_msg_count
3753: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
3754: fnd_msg_pub.add_exc_msg (g_package_name, l_api_name);
3755: END IF;
3756:
3757: fnd_msg_pub.count_and_get (
3758: p_count=> x_msg_count
3759: ,p_data=> x_msg_data
3760: ,p_encoded=> fnd_api.g_false
3761: );
3791: IF ( p_act_budgets_rec.act_budget_used_by_id = fnd_api.g_miss_num
3792: OR p_act_budgets_rec.act_budget_used_by_id IS NULL
3793: ) THEN
3794: -- missing required fields
3795: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3796: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_NO_USEDBYID');
3797: fnd_msg_pub.ADD;
3798: END IF;
3799:
3793: ) THEN
3794: -- missing required fields
3795: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3796: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_NO_USEDBYID');
3797: fnd_msg_pub.ADD;
3798: END IF;
3799:
3800: x_return_status := fnd_api.g_ret_sts_error;
3801: -- If any error happens abort API.
3806: IF ( p_act_budgets_rec.budget_source_id = fnd_api.g_miss_num
3807: OR p_act_budgets_rec.budget_source_id IS NULL
3808: ) THEN
3809: -- missing required fields
3810: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3811: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_NO_SOURCEID');
3812: fnd_msg_pub.ADD;
3813: END IF;
3814:
3808: ) THEN
3809: -- missing required fields
3810: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3811: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_NO_SOURCEID');
3812: fnd_msg_pub.ADD;
3813: END IF;
3814:
3815: x_return_status := fnd_api.g_ret_sts_error;
3816: -- If any error happens abort API.
3821: IF ( p_act_budgets_rec.budget_source_type = fnd_api.g_miss_char
3822: OR p_act_budgets_rec.budget_source_type IS NULL
3823: ) THEN
3824: -- missing required fields
3825: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3826: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_NO_SOURCETYPE');
3827: fnd_msg_pub.ADD;
3828: END IF;
3829:
3823: ) THEN
3824: -- missing required fields
3825: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3826: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_NO_SOURCETYPE');
3827: fnd_msg_pub.ADD;
3828: END IF;
3829:
3830: x_return_status := fnd_api.g_ret_sts_error;
3831: -- If any error happens abort API.
3836: IF ( p_act_budgets_rec.transfer_type = fnd_api.g_miss_char
3837: OR p_act_budgets_rec.transfer_type IS NULL
3838: ) THEN
3839: -- missing required fields
3840: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3841: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_NO_TRANSYPE');
3842: fnd_msg_pub.ADD;
3843: END IF;
3844:
3838: ) THEN
3839: -- missing required fields
3840: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3841: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_NO_TRANSYPE');
3842: fnd_msg_pub.ADD;
3843: END IF;
3844:
3845: x_return_status := fnd_api.g_ret_sts_error;
3846: -- If any error happens abort API.
3851: IF ( p_act_budgets_rec.arc_act_budget_used_by = fnd_api.g_miss_char
3852: OR p_act_budgets_rec.arc_act_budget_used_by IS NULL
3853: ) THEN
3854: -- missing required fields
3855: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3856: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_NO_USEDBY');
3857: fnd_msg_pub.ADD;
3858: END IF;
3859:
3853: ) THEN
3854: -- missing required fields
3855: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3856: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_NO_USEDBY');
3857: fnd_msg_pub.ADD;
3858: END IF;
3859:
3860: x_return_status := fnd_api.g_ret_sts_error;
3861: -- If any error happens abort API.
3881: 'ozf_Act_budgets'
3882: , 'ACTIVITY_BUDGET_ID = '
3883: || p_act_budgets_rec.activity_budget_id
3884: ) = fnd_api.g_false THEN
3885: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3886: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_DUPLICATE_ID');
3887: fnd_msg_pub.ADD;
3888: END IF;
3889:
3883: || p_act_budgets_rec.activity_budget_id
3884: ) = fnd_api.g_false THEN
3885: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3886: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_DUPLICATE_ID');
3887: fnd_msg_pub.ADD;
3888: END IF;
3889:
3890: x_return_status := fnd_api.g_ret_sts_error;
3891: RETURN;
3900: IF ams_utility_pvt.check_lookup_exists (
3901: p_lookup_type=> 'AMS_SYS_ARC_QUALIFIER'
3902: ,p_lookup_code=> p_act_budgets_rec.arc_act_budget_used_by
3903: ) = fnd_api.g_false THEN
3904: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3905: ozf_utility_pvt.debug_message ( 'Used By:'||p_act_budgets_rec.arc_act_budget_used_by);
3906: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_BAD_USEDBY');
3907: fnd_msg_pub.ADD;
3908: END IF;
3903: ) = fnd_api.g_false THEN
3904: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3905: ozf_utility_pvt.debug_message ( 'Used By:'||p_act_budgets_rec.arc_act_budget_used_by);
3906: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_BAD_USEDBY');
3907: fnd_msg_pub.ADD;
3908: END IF;
3909:
3910: x_return_status := fnd_api.g_ret_sts_error;
3911: RETURN;
3919: IF ozf_utility_pvt.check_lookup_exists (
3920: p_lookup_type=> 'OZF_FUND_SOURCE'
3921: ,p_lookup_code=> p_act_budgets_rec.budget_source_type
3922: ) = fnd_api.g_false THEN
3923: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3924: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_BAD_SRCTYPE');
3925: fnd_msg_pub.ADD;
3926: END IF;
3927:
3921: ,p_lookup_code=> p_act_budgets_rec.budget_source_type
3922: ) = fnd_api.g_false THEN
3923: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3924: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_BAD_SRCTYPE');
3925: fnd_msg_pub.ADD;
3926: END IF;
3927:
3928: x_return_status := fnd_api.g_ret_sts_error;
3929: RETURN;
3980: p_table_name=> l_table_name
3981: ,p_pk_name=> l_pk_name
3982: ,p_pk_value=> l_pk_value
3983: ) = fnd_api.g_false THEN
3984: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3985: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_BAD_USEDBYID');
3986: fnd_msg_pub.ADD;
3987: END IF;
3988:
3982: ,p_pk_value=> l_pk_value
3983: ) = fnd_api.g_false THEN
3984: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
3985: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_BAD_USEDBYID');
3986: fnd_msg_pub.ADD;
3987: END IF;
3988:
3989: x_return_status := fnd_api.g_ret_sts_error;
3990: -- If any errors happen abort API/Procedure.
4048: p_table_name=> l_table_name
4049: ,p_pk_name=> l_pk_name
4050: ,p_pk_value=> l_pk_value
4051: ) = fnd_api.g_false THEN
4052: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
4053: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_BAD_SRCID');
4054: fnd_msg_pub.ADD;
4055: END IF;
4056:
4050: ,p_pk_value=> l_pk_value
4051: ) = fnd_api.g_false THEN
4052: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
4053: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_BAD_SRCID');
4054: fnd_msg_pub.ADD;
4055: END IF;
4056:
4057: x_return_status := fnd_api.g_ret_sts_error;
4058: -- If any errors happen abort API/Procedure.
4077: p_table_name=> l_table_name
4078: ,p_pk_name=> l_pk_name
4079: ,p_pk_value=> l_pk_value
4080: ) = fnd_api.g_false THEN
4081: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
4082: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_BAD_APPRID');
4083: fnd_msg_pub.ADD;
4084: END IF;
4085:
4079: ,p_pk_value=> l_pk_value
4080: ) = fnd_api.g_false THEN
4081: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
4082: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_BAD_APPRID');
4083: fnd_msg_pub.ADD;
4084: END IF;
4085:
4086: x_return_status := fnd_api.g_ret_sts_error;
4087: -- If any errors happen abort API/Procedure.
4099: p_table_name=> l_table_name
4100: ,p_pk_name=> l_pk_name
4101: ,p_pk_value=> l_pk_value
4102: ) = fnd_api.g_false THEN
4103: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
4104: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_BAD_APPRID');
4105: fnd_msg_pub.ADD;
4106: END IF;
4107:
4101: ,p_pk_value=> l_pk_value
4102: ) = fnd_api.g_false THEN
4103: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
4104: fnd_message.set_name ('OZF', 'OZF_ACT_BUDG_BAD_APPRID');
4105: fnd_msg_pub.ADD;
4106: END IF;
4107:
4108: x_return_status := fnd_api.g_ret_sts_error;
4109: -- If any errors happen abort API/Procedure.
4437: IF p_act_budgets_rec.date_required_by IS NOT NULL
4438: AND p_act_budgets_rec.date_required_by <> FND_API.G_MISS_DATE THEN
4439: IF p_act_budgets_rec.date_required_by < TRUNC(SYSDATE) THEN
4440: Fnd_Message.SET_NAME('OZF','OZF_ACT_REQDBYDATE_LT_SYSDATE');
4441: Fnd_Msg_Pub.ADD;
4442: RAISE FND_API.G_EXC_ERROR;
4443: END IF;
4444: END IF;
4445:
4478:
4479: IF c_budget%NOTFOUND THEN
4480: CLOSE c_budget;
4481:
4482: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
4483: fnd_message.set_name ('OZF', 'OZF_API_RECORD_NOT_FOUND');
4484: fnd_msg_pub.ADD;
4485: END IF;
4486:
4480: CLOSE c_budget;
4481:
4482: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error) THEN
4483: fnd_message.set_name ('OZF', 'OZF_API_RECORD_NOT_FOUND');
4484: fnd_msg_pub.ADD;
4485: END IF;
4486:
4487: RAISE fnd_api.g_exc_error;
4488: END IF;
5813:
5814: /*
5815: IF c_get_objfundsum_rec%NOTFOUND THEN
5816: CLOSE c_get_objfundsum_rec;
5817: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
5818: fnd_message.set_name('OZF', 'OZF_OBJFUNDSUM_RECORD_NOT_FOUND');
5819: fnd_msg_pub.add;
5820: END IF;
5821: RAISE fnd_api.g_exc_error;
5815: IF c_get_objfundsum_rec%NOTFOUND THEN
5816: CLOSE c_get_objfundsum_rec;
5817: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
5818: fnd_message.set_name('OZF', 'OZF_OBJFUNDSUM_RECORD_NOT_FOUND');
5819: fnd_msg_pub.add;
5820: END IF;
5821: RAISE fnd_api.g_exc_error;
5822: END IF;
5823: */
6401: , l_objfundsum_rec.plan_curr_planned_amt
6402: , l_objfundsum_rec.univ_curr_planned_amt;
6403: IF c_get_objfundsum_rec%NOTFOUND THEN
6404: CLOSE c_get_objfundsum_rec;
6405: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
6406: fnd_message.set_name('OZF', 'OZF_OBJFUNDSUM_RECORD_NOT_FOUND');
6407: fnd_msg_pub.add;
6408: END IF;
6409: RAISE fnd_api.g_exc_error;
6403: IF c_get_objfundsum_rec%NOTFOUND THEN
6404: CLOSE c_get_objfundsum_rec;
6405: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_error) THEN
6406: fnd_message.set_name('OZF', 'OZF_OBJFUNDSUM_RECORD_NOT_FOUND');
6407: fnd_msg_pub.add;
6408: END IF;
6409: RAISE fnd_api.g_exc_error;
6410: END IF;
6411: CLOSE c_get_objfundsum_rec;
6558:
6559: x_return_status := fnd_api.g_ret_sts_success;
6560:
6561: /* IF fnd_api.to_boolean (p_init_msg_list) THEN
6562: fnd_msg_pub.initialize;
6563: END IF;
6564:
6565: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name) THEN
6566: RAISE fnd_api.g_exc_unexpected_error;
6666:
6667:
6668: IF NOT (l_return_status = fnd_api.g_ret_sts_success) THEN
6669: ROLLBACK TO create_child_act_budget;
6670: fnd_msg_pub.count_and_get (
6671: p_count=> x_msg_count
6672: ,p_data=> x_msg_data
6673: ,p_encoded=> fnd_api.g_false
6674: );
6684:
6685:
6686: END LOOP;
6687:
6688: fnd_msg_pub.count_and_get (
6689: p_encoded=> fnd_api.g_false
6690: ,p_count=> x_msg_count
6691: ,p_data=> x_msg_data
6692: );
6700: EXCEPTION
6701: WHEN fnd_api.g_exc_error THEN
6702: ROLLBACK TO create_child_act_budget;
6703: x_return_status := fnd_api.g_ret_sts_error;
6704: fnd_msg_pub.count_and_get (
6705: p_count=> x_msg_count
6706: ,p_data=> x_msg_data
6707: ,p_encoded=> fnd_api.g_false
6708: );
6708: );
6709: WHEN fnd_api.g_exc_unexpected_error THEN
6710: ROLLBACK TO create_child_act_budget;
6711: x_return_status := fnd_api.g_ret_sts_unexp_error;
6712: fnd_msg_pub.count_and_get (
6713: p_count=> x_msg_count
6714: ,p_data=> x_msg_data
6715: ,p_encoded=> fnd_api.g_false
6716: );
6717: WHEN OTHERS THEN
6718: ROLLBACK TO create_child_act_budget;
6719: x_return_status := fnd_api.g_ret_sts_unexp_error;
6720:
6721: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
6722: fnd_msg_pub.add_exc_msg (g_package_name, l_api_name);
6723: END IF;
6724:
6725: fnd_msg_pub.count_and_get (
6718: ROLLBACK TO create_child_act_budget;
6719: x_return_status := fnd_api.g_ret_sts_unexp_error;
6720:
6721: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
6722: fnd_msg_pub.add_exc_msg (g_package_name, l_api_name);
6723: END IF;
6724:
6725: fnd_msg_pub.count_and_get (
6726: p_count=> x_msg_count
6721: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error) THEN
6722: fnd_msg_pub.add_exc_msg (g_package_name, l_api_name);
6723: END IF;
6724:
6725: fnd_msg_pub.count_and_get (
6726: p_count=> x_msg_count
6727: ,p_data=> x_msg_data
6728: ,p_encoded=> fnd_api.g_false
6729: );
6903: ozf_utility_pvt.debug_message(l_full_name||': start');
6904: END IF;
6905:
6906: IF Fnd_Api.To_Boolean (p_init_msg_list) THEN
6907: Fnd_Msg_Pub.Initialize;
6908: END IF;
6909:
6910: IF NOT Fnd_Api.Compatible_API_Call (L_API_VERSION,
6911: p_api_version,
7150: WHERE objfundsum_id = l_objfundsum_rec.objfundsum_id
7151: AND object_version_number = l_objfundsum_rec.object_version_number;
7152:
7153: IF (SQL%NOTFOUND) THEN
7154: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN
7155: Fnd_Message.set_name('OZF', 'OZF_API_RECORD_NOT_FOUND');
7156: Fnd_Msg_Pub.ADD;
7157: END IF;
7158: RAISE Fnd_Api.g_exc_error;
7152:
7153: IF (SQL%NOTFOUND) THEN
7154: IF Fnd_Msg_Pub.check_msg_level(Fnd_Msg_Pub.g_msg_lvl_error) THEN
7155: Fnd_Message.set_name('OZF', 'OZF_API_RECORD_NOT_FOUND');
7156: Fnd_Msg_Pub.ADD;
7157: END IF;
7158: RAISE Fnd_Api.g_exc_error;
7159: END IF;
7160:
7157: END IF;
7158: RAISE Fnd_Api.g_exc_error;
7159: END IF;
7160:
7161: Fnd_Msg_Pub.Count_And_Get (
7162: p_count => x_msg_count,
7163: p_data => x_msg_data,
7164: p_encoded => Fnd_Api.G_FALSE
7165: );
7172: EXCEPTION
7173: WHEN Fnd_Api.G_EXC_ERROR THEN
7174: ROLLBACK TO SP_update_reconcile_objfundsum;
7175: x_return_status := Fnd_Api.G_RET_STS_ERROR;
7176: Fnd_Msg_Pub.Count_And_Get (
7177: p_count => x_msg_count,
7178: p_data => x_msg_data,
7179: p_encoded => FND_API.G_FALSE
7180: );
7180: );
7181: WHEN Fnd_Api.G_EXC_UNEXPECTED_ERROR THEN
7182: ROLLBACK TO SP_update_reconcile_objfundsum;
7183: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
7184: Fnd_Msg_Pub.Count_And_Get (
7185: p_count => x_msg_count,
7186: p_data => x_msg_data,
7187: p_encoded => FND_API.G_FALSE
7188: );
7188: );
7189: WHEN OTHERS THEN
7190: ROLLBACK TO SP_update_reconcile_objfundsum;
7191: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
7192: IF Fnd_Msg_Pub.Check_Msg_Level (Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR) THEN
7193: Fnd_Msg_Pub.Add_Exc_Msg (G_PKG_NAME, L_API_NAME);
7194: END IF;
7195: Fnd_Msg_Pub.Count_And_Get (
7196: p_count => x_msg_count,
7189: WHEN OTHERS THEN
7190: ROLLBACK TO SP_update_reconcile_objfundsum;
7191: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
7192: IF Fnd_Msg_Pub.Check_Msg_Level (Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR) THEN
7193: Fnd_Msg_Pub.Add_Exc_Msg (G_PKG_NAME, L_API_NAME);
7194: END IF;
7195: Fnd_Msg_Pub.Count_And_Get (
7196: p_count => x_msg_count,
7197: p_data => x_msg_data,
7191: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
7192: IF Fnd_Msg_Pub.Check_Msg_Level (Fnd_Msg_Pub.G_MSG_LVL_UNEXP_ERROR) THEN
7193: Fnd_Msg_Pub.Add_Exc_Msg (G_PKG_NAME, L_API_NAME);
7194: END IF;
7195: Fnd_Msg_Pub.Count_And_Get (
7196: p_count => x_msg_count,
7197: p_data => x_msg_data,
7198: p_encoded => FND_API.G_FALSE
7199: );