126: ,p_parent_process_key IN VARCHAR2
127: ,p_parent_context IN VARCHAR2
128: ,p_parent_approval_flag IN VARCHAR2
129: ,p_continue_flow IN VARCHAR2
130: ,p_child_approval_flag IN VARCHAR2 := fnd_api.g_false
131: -- 10/22/2001 mpande Changed code different owner allocation bug
132: ,p_requestor_owner_flag IN VARCHAR2 := 'N'
133: ,x_start_flow_flag OUT NOCOPY VARCHAR2
134: -- added on 03/20/03
234:
235:
236: EXCEPTION
237: WHEN OTHERS THEN
238: RAISE Fnd_Api.g_exc_error;
239: ozf_utility_pvt.debug_message('Exception in raising business event');
240: END;
241:
242: /*****************************************************************************************/
256: -- End of Comments
257: /*****************************************************************************************/
258: PROCEDURE create_act_budgets (
259: p_api_version IN NUMBER
260: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
261: ,p_commit IN VARCHAR2 := fnd_api.g_false
262: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
263: ,x_return_status OUT NOCOPY VARCHAR2
264: ,x_msg_count OUT NOCOPY NUMBER
257: /*****************************************************************************************/
258: PROCEDURE create_act_budgets (
259: p_api_version IN NUMBER
260: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
261: ,p_commit IN VARCHAR2 := fnd_api.g_false
262: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
263: ,x_return_status OUT NOCOPY VARCHAR2
264: ,x_msg_count OUT NOCOPY NUMBER
265: ,x_msg_data OUT NOCOPY VARCHAR2
258: PROCEDURE create_act_budgets (
259: p_api_version IN NUMBER
260: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
261: ,p_commit IN VARCHAR2 := fnd_api.g_false
262: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
263: ,x_return_status OUT NOCOPY VARCHAR2
264: ,x_msg_count OUT NOCOPY NUMBER
265: ,x_msg_data OUT NOCOPY VARCHAR2
266: ,p_act_budgets_rec IN act_budgets_rec_type
277: ,x_msg_data => x_msg_data
278: ,p_act_budgets_rec => p_act_budgets_rec
279: ,p_act_util_rec => G_MISS_ACT_UTIL_REC
280: ,x_act_budget_id => x_act_budget_id
281: ,p_approval_flag => fnd_api.g_false
282: --p_approval_flag IN VARCHAR2 := fnd_api.g_false means approval required
283: );
284:
285: END create_act_budgets;
278: ,p_act_budgets_rec => p_act_budgets_rec
279: ,p_act_util_rec => G_MISS_ACT_UTIL_REC
280: ,x_act_budget_id => x_act_budget_id
281: ,p_approval_flag => fnd_api.g_false
282: --p_approval_flag IN VARCHAR2 := fnd_api.g_false means approval required
283: );
284:
285: END create_act_budgets;
286:
290: * added x_utilized_amount
291: */
292: PROCEDURE create_act_budgets (
293: p_api_version IN NUMBER
294: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
295: ,p_commit IN VARCHAR2 := fnd_api.g_false
296: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
297: ,x_return_status OUT NOCOPY VARCHAR2
298: ,x_msg_count OUT NOCOPY NUMBER
291: */
292: PROCEDURE create_act_budgets (
293: p_api_version IN NUMBER
294: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
295: ,p_commit IN VARCHAR2 := fnd_api.g_false
296: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
297: ,x_return_status OUT NOCOPY VARCHAR2
298: ,x_msg_count OUT NOCOPY NUMBER
299: ,x_msg_data OUT NOCOPY VARCHAR2
292: PROCEDURE create_act_budgets (
293: p_api_version IN NUMBER
294: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
295: ,p_commit IN VARCHAR2 := fnd_api.g_false
296: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
297: ,x_return_status OUT NOCOPY VARCHAR2
298: ,x_msg_count OUT NOCOPY NUMBER
299: ,x_msg_data OUT NOCOPY VARCHAR2
300: ,p_act_budgets_rec IN act_budgets_rec_type
299: ,x_msg_data OUT NOCOPY VARCHAR2
300: ,p_act_budgets_rec IN act_budgets_rec_type
301: ,p_act_util_rec IN act_util_rec_type
302: ,x_act_budget_id OUT NOCOPY NUMBER
303: ,p_approval_flag IN VARCHAR2 := fnd_api.g_false
304: ) IS
305: l_utilized_amount NUMBER;
306: BEGIN
307: create_act_budgets (
328: * for TPA Parallel Execution ER Bug#9614703.
329: *****************************************************************************/
330: PROCEDURE create_act_budgets (
331: p_api_version IN NUMBER
332: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
333: ,p_commit IN VARCHAR2 := fnd_api.g_false
334: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
335: ,x_return_status OUT NOCOPY VARCHAR2
336: ,x_msg_count OUT NOCOPY NUMBER
329: *****************************************************************************/
330: PROCEDURE create_act_budgets (
331: p_api_version IN NUMBER
332: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
333: ,p_commit IN VARCHAR2 := fnd_api.g_false
334: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
335: ,x_return_status OUT NOCOPY VARCHAR2
336: ,x_msg_count OUT NOCOPY NUMBER
337: ,x_msg_data OUT NOCOPY VARCHAR2
330: PROCEDURE create_act_budgets (
331: p_api_version IN NUMBER
332: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
333: ,p_commit IN VARCHAR2 := fnd_api.g_false
334: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
335: ,x_return_status OUT NOCOPY VARCHAR2
336: ,x_msg_count OUT NOCOPY NUMBER
337: ,x_msg_data OUT NOCOPY VARCHAR2
338: ,p_act_budgets_rec IN act_budgets_rec_type
337: ,x_msg_data OUT NOCOPY VARCHAR2
338: ,p_act_budgets_rec IN act_budgets_rec_type
339: ,p_act_util_rec IN act_util_rec_type
340: ,x_act_budget_id OUT NOCOPY NUMBER
341: ,p_approval_flag IN VARCHAR2 := fnd_api.g_false
342: ,x_utilized_amount OUT NOCOPY NUMBER
343: ) IS
344: l_utilized_amount NUMBER;
345: l_resale_batch_id NUMBER;
375:
376: --nirprasa added for bug
377: PROCEDURE create_act_budgets (
378: p_api_version IN NUMBER
379: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
380: ,p_commit IN VARCHAR2 := fnd_api.g_false
381: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
382: ,x_return_status OUT NOCOPY VARCHAR2
383: ,x_msg_count OUT NOCOPY NUMBER
376: --nirprasa added for bug
377: PROCEDURE create_act_budgets (
378: p_api_version IN NUMBER
379: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
380: ,p_commit IN VARCHAR2 := fnd_api.g_false
381: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
382: ,x_return_status OUT NOCOPY VARCHAR2
383: ,x_msg_count OUT NOCOPY NUMBER
384: ,x_msg_data OUT NOCOPY VARCHAR2
377: PROCEDURE create_act_budgets (
378: p_api_version IN NUMBER
379: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
380: ,p_commit IN VARCHAR2 := fnd_api.g_false
381: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
382: ,x_return_status OUT NOCOPY VARCHAR2
383: ,x_msg_count OUT NOCOPY NUMBER
384: ,x_msg_data OUT NOCOPY VARCHAR2
385: ,p_act_budgets_rec IN act_budgets_rec_type
384: ,x_msg_data OUT NOCOPY VARCHAR2
385: ,p_act_budgets_rec IN act_budgets_rec_type
386: ,p_act_util_rec IN act_util_rec_type
387: ,x_act_budget_id OUT NOCOPY NUMBER
388: ,p_approval_flag IN VARCHAR2 := fnd_api.g_false
389: ,x_utilized_amount OUT NOCOPY NUMBER
390: ,x_utilization_id OUT NOCOPY NUMBER
391: ) IS
392: l_utilized_amount NUMBER;
435: -- 14-Aug-2000 choang Modified for spec signature change.
436: -- 22-Feb-2001 mpande Modified for Hornet changes.
437: -- 29-OCT-2001 feliu Modified for recalculating committment.
438: -- 12/18/2001 mpande Added code for checkbook _v
439: -- p_approval_flag IN VARCHAR2 := fnd_api.g_false means approval required
440: -- request amount would always be in act_budget_used_by curr
441: -- 27/10/2009 muthsubr Overloaded create_act_budgets adding p_use_fund_staging_tables,
442: -- px_ozf_funds_old_rectype, px_ozf_funds_new_rectype for bug#8867381.
443: -- 29/11/2010 muthsubr Altered px_ozf_funds_new_rectype to px_ozf_funds_new_tbl
445: -- End of Comments
446: /*****************************************************************************************/
447: PROCEDURE create_act_budgets (
448: p_api_version IN NUMBER
449: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
450: ,p_commit IN VARCHAR2 := fnd_api.g_false
451: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
452: ,x_return_status OUT NOCOPY VARCHAR2
453: ,x_msg_count OUT NOCOPY NUMBER
446: /*****************************************************************************************/
447: PROCEDURE create_act_budgets (
448: p_api_version IN NUMBER
449: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
450: ,p_commit IN VARCHAR2 := fnd_api.g_false
451: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
452: ,x_return_status OUT NOCOPY VARCHAR2
453: ,x_msg_count OUT NOCOPY NUMBER
454: ,x_msg_data OUT NOCOPY VARCHAR2
447: PROCEDURE create_act_budgets (
448: p_api_version IN NUMBER
449: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
450: ,p_commit IN VARCHAR2 := fnd_api.g_false
451: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
452: ,x_return_status OUT NOCOPY VARCHAR2
453: ,x_msg_count OUT NOCOPY NUMBER
454: ,x_msg_data OUT NOCOPY VARCHAR2
455: ,p_act_budgets_rec IN act_budgets_rec_type
454: ,x_msg_data OUT NOCOPY VARCHAR2
455: ,p_act_budgets_rec IN act_budgets_rec_type
456: ,p_act_util_rec IN act_util_rec_type
457: ,x_act_budget_id OUT NOCOPY NUMBER
458: ,p_approval_flag IN VARCHAR2 := fnd_api.g_false
459: ,x_utilized_amount OUT NOCOPY NUMBER -- yzhao: 06/21/2004 added for chargeback
460: ,p_resale_batch_id IN NUMBER
461: ,p_batch_type IN VARCHAR2
462: ,p_use_fund_staging_tables IN VARCHAR2
491: END create_act_budgets;
492:
493: PROCEDURE create_act_budgets (
494: p_api_version IN NUMBER
495: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
496: ,p_commit IN VARCHAR2 := fnd_api.g_false
497: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
498: ,x_return_status OUT NOCOPY VARCHAR2
499: ,x_msg_count OUT NOCOPY NUMBER
492:
493: PROCEDURE create_act_budgets (
494: p_api_version IN NUMBER
495: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
496: ,p_commit IN VARCHAR2 := fnd_api.g_false
497: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
498: ,x_return_status OUT NOCOPY VARCHAR2
499: ,x_msg_count OUT NOCOPY NUMBER
500: ,x_msg_data OUT NOCOPY VARCHAR2
493: PROCEDURE create_act_budgets (
494: p_api_version IN NUMBER
495: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
496: ,p_commit IN VARCHAR2 := fnd_api.g_false
497: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
498: ,x_return_status OUT NOCOPY VARCHAR2
499: ,x_msg_count OUT NOCOPY NUMBER
500: ,x_msg_data OUT NOCOPY VARCHAR2
501: ,p_act_budgets_rec IN act_budgets_rec_type
500: ,x_msg_data OUT NOCOPY VARCHAR2
501: ,p_act_budgets_rec IN act_budgets_rec_type
502: ,p_act_util_rec IN act_util_rec_type
503: ,x_act_budget_id OUT NOCOPY NUMBER
504: ,p_approval_flag IN VARCHAR2 := fnd_api.g_false
505: ,x_utilized_amount OUT NOCOPY NUMBER -- yzhao: 06/21/2004 added for chargeback
506: ,p_resale_batch_id IN NUMBER
507: ,p_batch_type IN VARCHAR2
508: ,p_use_fund_staging_tables IN VARCHAR2
567: l_fc_amount NUMBER;
568: l_set_of_books_id NUMBER;
569: l_mrc_sob_type_code VARCHAR2(30);
570: l_fc_currency_code VARCHAR2(150);
571: l_exchange_rate_type VARCHAR2(150) := FND_API.G_MISS_CHAR;
572: l_exchange_rate NUMBER;
573: -- mpande for changed checkbook view 12/17/2001
574: l_src_curr_request_amt NUMBER;
575: l_src_currency VARCHAR2(150);
592: -- Standard Start of API savepoint
593: SAVEPOINT create_act_budgets_pvt;
594:
595: -- Standard call to check for call compatibility.
596: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_package_name) THEN
597: RAISE fnd_api.g_exc_unexpected_error;
598: END IF;
599:
600: ozf_utility_pvt.debug_message(' create_Act_budgets.plan_currency_code mg: ' || p_act_util_rec.plan_currency_code);
593: SAVEPOINT create_act_budgets_pvt;
594:
595: -- Standard call to check for call compatibility.
596: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_package_name) THEN
597: RAISE fnd_api.g_exc_unexpected_error;
598: END IF;
599:
600: ozf_utility_pvt.debug_message(' create_Act_budgets.plan_currency_code mg: ' || p_act_util_rec.plan_currency_code);
601:
599:
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
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;
609:
610: -- API body
611: -- Initialize default values before validation
612: -- Get ID for activity budget from sequence.
630: ozf_utility_pvt.debug_message ('act_budget_used_by_id '||l_act_budgets_rec.act_budget_used_by_id);
631: END IF;
632:
633: IF l_act_budgets_rec.request_currency IS NULL
634: OR l_act_budgets_rec.request_currency = FND_API.G_MISS_CHAR THEN
635: l_act_budgets_rec.request_currency :=
636: get_object_currency (
637: l_act_budgets_rec.arc_act_budget_used_by
638: ,l_act_budgets_rec.act_budget_used_by_id
723: );
724: END IF;
725: */
726:
727: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
728: RAISE fnd_api.g_exc_unexpected_error;
729: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
730: RAISE fnd_api.g_exc_error;
731: END IF;
724: END IF;
725: */
726:
727: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
728: RAISE fnd_api.g_exc_unexpected_error;
729: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
730: RAISE fnd_api.g_exc_error;
731: END IF;
732: END IF;
725: */
726:
727: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
728: RAISE fnd_api.g_exc_unexpected_error;
729: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
730: RAISE fnd_api.g_exc_error;
731: END IF;
732: END IF;
733: END IF;
726:
727: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
728: RAISE fnd_api.g_exc_unexpected_error;
729: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
730: RAISE fnd_api.g_exc_error;
731: END IF;
732: END IF;
733: END IF;
734: END IF;
735: /* End OF Change mpande 12/19/2001 */
736:
737: IF l_act_budgets_rec.request_currency IS NULL THEN
738: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
739: x_return_status := fnd_api.g_ret_sts_error;
740: END IF;
741:
742: IF l_return_status = fnd_api.g_ret_sts_error THEN
743: RAISE fnd_api.g_exc_error;
738: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
739: x_return_status := fnd_api.g_ret_sts_error;
740: END IF;
741:
742: IF l_return_status = fnd_api.g_ret_sts_error THEN
743: RAISE fnd_api.g_exc_error;
744: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
745: RAISE fnd_api.g_exc_unexpected_error;
746: END IF;
739: x_return_status := fnd_api.g_ret_sts_error;
740: END IF;
741:
742: IF l_return_status = fnd_api.g_ret_sts_error THEN
743: RAISE fnd_api.g_exc_error;
744: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
745: RAISE fnd_api.g_exc_unexpected_error;
746: END IF;
747:
740: END IF;
741:
742: IF l_return_status = fnd_api.g_ret_sts_error THEN
743: RAISE fnd_api.g_exc_error;
744: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
745: RAISE fnd_api.g_exc_unexpected_error;
746: END IF;
747:
748: -- Added 04/26/2001 mpande for new functionality changes for hornet
741:
742: IF l_return_status = fnd_api.g_ret_sts_error THEN
743: RAISE fnd_api.g_exc_error;
744: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
745: RAISE fnd_api.g_exc_unexpected_error;
746: END IF;
747:
748: -- Added 04/26/2001 mpande for new functionality changes for hornet
749: ---System Populates the parent Source Id
752: l_act_budgets_rec.approved_amount := l_act_budgets_rec.request_amount;
753: l_act_budgets_rec.approved_original_amount := l_act_budgets_rec.request_amount;
754: l_act_budgets_rec.approved_in_currency := l_act_budgets_rec.request_currency;
755:
756: ELSIF p_approval_flag = fnd_api.g_true THEN -- Added by feliu for recalculating committment.
757: l_act_budgets_rec.status_code := 'APPROVED';
758: -- yzhao: 10/20/2003 automatically populate approved amount, currency information if it is not passed in
759: --l_act_budgets_rec.approved_amount := l_act_budgets_rec.approved_amount;
760: --l_act_budgets_rec.approved_original_amount := l_act_budgets_rec.approved_original_amount;
788:
789: -- yzhao: 10/20/2003 automatically populate approved amount, currency information if it is not passed in
790: IF l_act_budgets_rec.status_code = 'APPROVED' THEN
791: IF l_act_budgets_rec.approval_date IS NULL OR
792: l_act_budgets_rec.approval_date = fnd_api.g_miss_date THEN
793: l_act_budgets_rec.approval_date := sysdate;
794: END IF;
795:
796: IF l_act_budgets_rec.approver_id IS NULL OR
793: l_act_budgets_rec.approval_date := sysdate;
794: END IF;
795:
796: IF l_act_budgets_rec.approver_id IS NULL OR
797: l_act_budgets_rec.approver_id = fnd_api.g_miss_num THEN
798: l_act_budgets_rec.approver_id := ams_utility_pvt.get_resource_id (fnd_global.user_id);
799: END IF;
800:
801: IF l_act_budgets_rec.approved_amount IS NULL OR
798: l_act_budgets_rec.approver_id := ams_utility_pvt.get_resource_id (fnd_global.user_id);
799: END IF;
800:
801: IF l_act_budgets_rec.approved_amount IS NULL OR
802: l_act_budgets_rec.approved_amount = fnd_api.g_miss_num THEN
803: l_act_budgets_rec.approved_amount := l_act_budgets_rec.request_amount;
804: END IF;
805:
806: IF l_act_budgets_rec.approved_in_currency IS NULL OR
803: l_act_budgets_rec.approved_amount := l_act_budgets_rec.request_amount;
804: END IF;
805:
806: IF l_act_budgets_rec.approved_in_currency IS NULL OR
807: l_act_budgets_rec.approved_in_currency = fnd_api.g_miss_char THEN
808: l_act_budgets_rec.approved_in_currency :=
809: get_object_currency (
810: l_act_budgets_rec.budget_source_type
811: ,l_act_budgets_rec.budget_source_id
815: IF l_act_budgets_rec.approved_in_currency <> l_transaction_currency
816: AND l_act_budgets_rec.arc_act_budget_used_by = 'OFFR' THEN
817: l_act_budgets_rec.approved_in_currency := l_transaction_currency;
818: END IF;
819: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
820: RAISE fnd_api.g_exc_unexpected_error;
821: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
822: RAISE fnd_api.g_exc_error;
823: END IF;
816: AND l_act_budgets_rec.arc_act_budget_used_by = 'OFFR' THEN
817: l_act_budgets_rec.approved_in_currency := l_transaction_currency;
818: END IF;
819: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
820: RAISE fnd_api.g_exc_unexpected_error;
821: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
822: RAISE fnd_api.g_exc_error;
823: END IF;
824: END IF;
817: l_act_budgets_rec.approved_in_currency := l_transaction_currency;
818: END IF;
819: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
820: RAISE fnd_api.g_exc_unexpected_error;
821: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
822: RAISE fnd_api.g_exc_error;
823: END IF;
824: END IF;
825:
818: END IF;
819: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
820: RAISE fnd_api.g_exc_unexpected_error;
821: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
822: RAISE fnd_api.g_exc_error;
823: END IF;
824: END IF;
825:
826:
825:
826:
827:
828: IF l_act_budgets_rec.approved_original_amount IS NULL OR
829: l_act_budgets_rec.approved_original_amount = fnd_api.g_miss_num THEN
830:
831: IF l_act_budgets_rec.request_currency = l_act_budgets_rec.approved_in_currency THEN
832: -- don't need to convert if currencies are equal
833: l_act_budgets_rec.approved_original_amount := l_act_budgets_rec.request_amount;
879: END IF;
880: */
881:
882:
883: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
884: RAISE fnd_api.g_exc_unexpected_error;
885: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
886: RAISE fnd_api.g_exc_error;
887: END IF;
880: */
881:
882:
883: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
884: RAISE fnd_api.g_exc_unexpected_error;
885: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
886: RAISE fnd_api.g_exc_error;
887: END IF;
888: END IF;
881:
882:
883: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
884: RAISE fnd_api.g_exc_unexpected_error;
885: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
886: RAISE fnd_api.g_exc_error;
887: END IF;
888: END IF;
889: END IF;
882:
883: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
884: RAISE fnd_api.g_exc_unexpected_error;
885: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
886: RAISE fnd_api.g_exc_error;
887: END IF;
888: END IF;
889: END IF;
890: END IF; -- IF l_act_budgets_rec.status_code = 'APPROVED' THEN
891:
892: l_act_budgets_rec.user_status_id :=
893: ozf_utility_pvt.get_default_user_status (l_status_type, l_act_budgets_rec.status_code);
894:
895: IF l_return_status = fnd_api.g_ret_sts_error THEN
896: RAISE fnd_api.g_exc_error;
897: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
898: RAISE fnd_api.g_exc_unexpected_error;
899: END IF;
892: l_act_budgets_rec.user_status_id :=
893: ozf_utility_pvt.get_default_user_status (l_status_type, l_act_budgets_rec.status_code);
894:
895: IF l_return_status = fnd_api.g_ret_sts_error THEN
896: RAISE fnd_api.g_exc_error;
897: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
898: RAISE fnd_api.g_exc_unexpected_error;
899: END IF;
900:
893: ozf_utility_pvt.get_default_user_status (l_status_type, l_act_budgets_rec.status_code);
894:
895: IF l_return_status = fnd_api.g_ret_sts_error THEN
896: RAISE fnd_api.g_exc_error;
897: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
898: RAISE fnd_api.g_exc_unexpected_error;
899: END IF;
900:
901:
894:
895: IF l_return_status = fnd_api.g_ret_sts_error THEN
896: RAISE fnd_api.g_exc_error;
897: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
898: RAISE fnd_api.g_exc_unexpected_error;
899: END IF;
900:
901:
902: ----------------------- validate -----------------------
932: OPEN c_get_conversion_type(l_act_util_rec.org_id);
933: FETCH c_get_conversion_type INTO l_exchange_rate_type;
934: CLOSE c_get_conversion_type;
935: ELSE
936: l_exchange_rate_type := FND_API.G_MISS_CHAR;
937: END IF;
938:
939: IF NVL(l_act_budgets_rec.request_amount,0) <> 0 THEN
940:
969: ,x_to_amount => l_act_budgets_rec.src_curr_req_amt
970: ,x_rate => l_rate);
971: END IF;
972:
973: IF l_return_status = fnd_api.g_ret_sts_error THEN
974: RAISE fnd_api.g_exc_error;
975: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
976: RAISE fnd_api.g_exc_unexpected_error;
977: END IF;
970: ,x_rate => l_rate);
971: END IF;
972:
973: IF l_return_status = fnd_api.g_ret_sts_error THEN
974: RAISE fnd_api.g_exc_error;
975: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
976: RAISE fnd_api.g_exc_unexpected_error;
977: END IF;
978: END IF;
971: END IF;
972:
973: IF l_return_status = fnd_api.g_ret_sts_error THEN
974: RAISE fnd_api.g_exc_error;
975: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
976: RAISE fnd_api.g_exc_unexpected_error;
977: END IF;
978: END IF;
979:
972:
973: IF l_return_status = fnd_api.g_ret_sts_error THEN
974: RAISE fnd_api.g_exc_error;
975: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
976: RAISE fnd_api.g_exc_unexpected_error;
977: END IF;
978: END IF;
979:
980: validate_act_budgets (
978: END IF;
979:
980: validate_act_budgets (
981: p_api_version=> 1.0
982: ,p_init_msg_list=> fnd_api.g_false
983: ,p_validation_level=> p_validation_level
984: ,x_return_status=> l_return_status
985: ,x_msg_count=> x_msg_count
986: ,x_msg_data=> x_msg_data
987: ,p_act_budgets_rec=> l_act_budgets_rec
988: );
989:
990: -- If any errors happen abort API.
991: IF l_return_status = fnd_api.g_ret_sts_error THEN
992: RAISE fnd_api.g_exc_error;
993: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
994: RAISE fnd_api.g_exc_unexpected_error;
995: END IF;
988: );
989:
990: -- If any errors happen abort API.
991: IF l_return_status = fnd_api.g_ret_sts_error THEN
992: RAISE fnd_api.g_exc_error;
993: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
994: RAISE fnd_api.g_exc_unexpected_error;
995: END IF;
996: -- Added 04/26/2001 mpande for new functionality changes for hornet
989:
990: -- If any errors happen abort API.
991: IF l_return_status = fnd_api.g_ret_sts_error THEN
992: RAISE fnd_api.g_exc_error;
993: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
994: RAISE fnd_api.g_exc_unexpected_error;
995: END IF;
996: -- Added 04/26/2001 mpande for new functionality changes for hornet
997: IF l_act_budgets_rec.budget_source_type = 'FUND'
990: -- If any errors happen abort API.
991: IF l_return_status = fnd_api.g_ret_sts_error THEN
992: RAISE fnd_api.g_exc_error;
993: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
994: RAISE fnd_api.g_exc_unexpected_error;
995: END IF;
996: -- Added 04/26/2001 mpande for new functionality changes for hornet
997: IF l_act_budgets_rec.budget_source_type = 'FUND'
998: AND l_act_budgets_rec.arc_act_budget_used_by = 'FUND' THEN
1033: || l_act_budgets_rec.act_budget_used_by_id
1034: || ') returns ' || l_return_status
1035: || ' ledger_id=' || l_ledger_id);
1036: END IF;
1037: IF l_return_status = fnd_api.g_ret_sts_error THEN
1038: RAISE fnd_api.g_exc_error;
1039: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1040: RAISE fnd_api.g_exc_unexpected_error;
1041: END IF;
1034: || ') returns ' || l_return_status
1035: || ' ledger_id=' || l_ledger_id);
1036: END IF;
1037: IF l_return_status = fnd_api.g_ret_sts_error THEN
1038: RAISE fnd_api.g_exc_error;
1039: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1040: RAISE fnd_api.g_exc_unexpected_error;
1041: END IF;
1042: END IF;
1035: || ' ledger_id=' || l_ledger_id);
1036: END IF;
1037: IF l_return_status = fnd_api.g_ret_sts_error THEN
1038: RAISE fnd_api.g_exc_error;
1039: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1040: RAISE fnd_api.g_exc_unexpected_error;
1041: END IF;
1042: END IF;
1043:
1036: END IF;
1037: IF l_return_status = fnd_api.g_ret_sts_error THEN
1038: RAISE fnd_api.g_exc_error;
1039: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1040: RAISE fnd_api.g_exc_unexpected_error;
1041: END IF;
1042: END IF;
1043:
1044: --kdass 16-NOV-2005 bug 4728515 - for quota, bypass ledger check
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;
1071: ELSE
1072:
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;
1071: ELSE
1072:
1073:
1116: ,x_return_status => l_return_status);
1117:
1118: END IF;
1119:
1120: IF l_return_status = fnd_api.g_ret_sts_error THEN
1121: RAISE fnd_api.g_exc_error;
1122: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1123: RAISE fnd_api.g_exc_unexpected_error;
1124: END IF;
1117:
1118: END IF;
1119:
1120: IF l_return_status = fnd_api.g_ret_sts_error THEN
1121: RAISE fnd_api.g_exc_error;
1122: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1123: RAISE fnd_api.g_exc_unexpected_error;
1124: END IF;
1125: END IF;
1118: END IF;
1119:
1120: IF l_return_status = fnd_api.g_ret_sts_error THEN
1121: RAISE fnd_api.g_exc_error;
1122: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1123: RAISE fnd_api.g_exc_unexpected_error;
1124: END IF;
1125: END IF;
1126: END IF;
1119:
1120: IF l_return_status = fnd_api.g_ret_sts_error THEN
1121: RAISE fnd_api.g_exc_error;
1122: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1123: RAISE fnd_api.g_exc_unexpected_error;
1124: END IF;
1125: END IF;
1126: END IF;
1127: END IF;
1294: ,x_return_status=> l_return_status
1295: );
1296: END IF;
1297:
1298: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1299: RAISE fnd_api.g_exc_error;
1300: END IF;
1301:
1302: -- update the fudn for release and reserve
1295: );
1296: END IF;
1297:
1298: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1299: RAISE fnd_api.g_exc_error;
1300: END IF;
1301:
1302: -- update the fudn for release and reserve
1303: -- if the adjust_flag = 'Y' or null then only update the fund otherwise donot.
1304: -- during fund updating this flag is passed 'N'
1305: IF l_act_budgets_rec.transfer_type IN ('RELEASE', 'RESERVE')
1306: AND NVL (l_act_budgets_rec.adjusted_flag, 'Y') = 'Y' THEN
1307: ozf_fund_request_apr_pvt.approve_holdback (
1308: p_commit=> fnd_api.g_false
1309: ,p_act_budget_id=> l_act_budget_id
1310: ,p_transfer_type=> l_act_budgets_rec.transfer_type
1311: ,p_transac_fund_id=> l_act_budgets_rec.budget_source_id
1312: ,p_requester_id=> l_act_budgets_rec.requester_id
1316: ,x_msg_count=> x_msg_count
1317: ,x_msg_data=> x_msg_data
1318: );
1319:
1320: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1321: RAISE fnd_api.g_exc_error;
1322: END IF;
1323: END IF;
1324:
1317: ,x_msg_data=> x_msg_data
1318: );
1319:
1320: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1321: RAISE fnd_api.g_exc_error;
1322: END IF;
1323: END IF;
1324:
1325: -- 02/23/2001 mpande whenever user enters a amount as utlized
1358: ,x_utilization_id => x_utilization_id --nirprasa - added for Bug 9383565
1359: );
1360:
1361:
1362: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1363: RAISE fnd_api.g_exc_unexpected_error;
1364: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
1365: RAISE fnd_api.g_exc_error;
1366: END IF;
1359: );
1360:
1361:
1362: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1363: RAISE fnd_api.g_exc_unexpected_error;
1364: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
1365: RAISE fnd_api.g_exc_error;
1366: END IF;
1367: END IF;
1360:
1361:
1362: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1363: RAISE fnd_api.g_exc_unexpected_error;
1364: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
1365: RAISE fnd_api.g_exc_error;
1366: END IF;
1367: END IF;
1368:
1361:
1362: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1363: RAISE fnd_api.g_exc_unexpected_error;
1364: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
1365: RAISE fnd_api.g_exc_error;
1366: END IF;
1367: END IF;
1368:
1369: IF (l_act_budgets_rec.arc_act_budget_used_by ='CAMP' AND l_act_budgets_rec.budget_source_type = 'CSCH') OR
1378: p_exchange_rate_type => l_exchange_rate_type
1379:
1380: );
1381:
1382: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1383: RAISE fnd_api.g_exc_unexpected_error;
1384: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
1385: RAISE fnd_api.g_exc_error;
1386: END IF;
1379:
1380: );
1381:
1382: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1383: RAISE fnd_api.g_exc_unexpected_error;
1384: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
1385: RAISE fnd_api.g_exc_error;
1386: END IF;
1387:
1380: );
1381:
1382: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1383: RAISE fnd_api.g_exc_unexpected_error;
1384: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
1385: RAISE fnd_api.g_exc_error;
1386: END IF;
1387:
1388: END IF;
1381:
1382: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1383: RAISE fnd_api.g_exc_unexpected_error;
1384: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
1385: RAISE fnd_api.g_exc_error;
1386: END IF;
1387:
1388: END IF;
1389:
1405: ,px_ozf_funds_old_rectype => px_ozf_funds_old_rectype
1406: ,px_ozf_funds_new_tbl => px_ozf_funds_new_tbl -- For TPA Parallel Execution ER Bug#9614703
1407: );
1408:
1409: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1410: RAISE fnd_api.g_exc_unexpected_error;
1411: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
1412: RAISE fnd_api.g_exc_error;
1413: END IF;
1406: ,px_ozf_funds_new_tbl => px_ozf_funds_new_tbl -- For TPA Parallel Execution ER Bug#9614703
1407: );
1408:
1409: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1410: RAISE fnd_api.g_exc_unexpected_error;
1411: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
1412: RAISE fnd_api.g_exc_error;
1413: END IF;
1414: END IF;
1407: );
1408:
1409: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1410: RAISE fnd_api.g_exc_unexpected_error;
1411: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
1412: RAISE fnd_api.g_exc_error;
1413: END IF;
1414: END IF;
1415: -- Add by feliu on 05/22/04 for referal.
1408:
1409: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
1410: RAISE fnd_api.g_exc_unexpected_error;
1411: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
1412: RAISE fnd_api.g_exc_error;
1413: END IF;
1414: END IF;
1415: -- Add by feliu on 05/22/04 for referal.
1416: IF l_act_budgets_rec.status_code = 'PENDING_VALIDATION' THEN
1434: ,x_msg_count=> x_msg_count
1435: ,x_msg_data=> x_msg_data
1436: );
1437:
1438: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1439: RAISE fnd_api.g_exc_error;
1440: END IF;
1441: END IF;
1442: /***** END OF Addition for Partner ********/
1435: ,x_msg_data=> x_msg_data
1436: );
1437:
1438: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1439: RAISE fnd_api.g_exc_error;
1440: END IF;
1441: END IF;
1442: /***** END OF Addition for Partner ********/
1443: --
1443: --
1444: -- END of API body.
1445: --
1446: -- Standard check of p_commit.
1447: IF fnd_api.to_boolean (p_commit) THEN
1448: COMMIT WORK;
1449: END IF;
1450:
1451: -- Standard call to get message count AND IF count is 1, get message info.
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;
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
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
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: );
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;
1462: p_count=> x_msg_count
1463: ,p_data=> x_msg_data
1464: ,p_encoded=> fnd_api.g_false
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
1464: ,p_encoded=> fnd_api.g_false
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
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;
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 (
1483: p_count=> x_msg_count
1484: ,p_data=> x_msg_data
1485: ,p_encoded=> fnd_api.g_false
1486: );
1487: END create_act_budgets;
1488:
1489:
1503: -- End of Comments
1504: /*****************************************************************************************/
1505: PROCEDURE update_act_budgets (
1506: p_api_version IN NUMBER
1507: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1508: ,p_commit IN VARCHAR2 := fnd_api.g_false
1509: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1510: ,x_return_status OUT NOCOPY VARCHAR2
1511: ,x_msg_count OUT NOCOPY NUMBER
1504: /*****************************************************************************************/
1505: PROCEDURE update_act_budgets (
1506: p_api_version IN NUMBER
1507: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1508: ,p_commit IN VARCHAR2 := fnd_api.g_false
1509: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1510: ,x_return_status OUT NOCOPY VARCHAR2
1511: ,x_msg_count OUT NOCOPY NUMBER
1512: ,x_msg_data OUT NOCOPY VARCHAR2
1505: PROCEDURE update_act_budgets (
1506: p_api_version IN NUMBER
1507: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1508: ,p_commit IN VARCHAR2 := fnd_api.g_false
1509: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1510: ,x_return_status OUT NOCOPY VARCHAR2
1511: ,x_msg_count OUT NOCOPY NUMBER
1512: ,x_msg_data OUT NOCOPY VARCHAR2
1513: ,p_act_budgets_rec IN act_budgets_rec_type
1522: ,x_return_status=> x_return_status
1523: ,x_msg_count=> x_msg_count
1524: ,x_msg_data=> x_msg_data
1525: ,p_act_budgets_rec=> p_act_budgets_rec
1526: ,p_parent_process_flag=> fnd_api.g_false
1527: ,p_parent_process_key=> fnd_api.g_miss_char
1528: ,p_parent_context=> fnd_api.g_miss_char
1529: ,p_parent_approval_flag=> fnd_api.g_false
1530: ,p_continue_flow=> fnd_api.g_false
1523: ,x_msg_count=> x_msg_count
1524: ,x_msg_data=> x_msg_data
1525: ,p_act_budgets_rec=> p_act_budgets_rec
1526: ,p_parent_process_flag=> fnd_api.g_false
1527: ,p_parent_process_key=> fnd_api.g_miss_char
1528: ,p_parent_context=> fnd_api.g_miss_char
1529: ,p_parent_approval_flag=> fnd_api.g_false
1530: ,p_continue_flow=> fnd_api.g_false
1531: ,p_child_approval_flag=> fnd_api.g_false
1524: ,x_msg_data=> x_msg_data
1525: ,p_act_budgets_rec=> p_act_budgets_rec
1526: ,p_parent_process_flag=> fnd_api.g_false
1527: ,p_parent_process_key=> fnd_api.g_miss_char
1528: ,p_parent_context=> fnd_api.g_miss_char
1529: ,p_parent_approval_flag=> fnd_api.g_false
1530: ,p_continue_flow=> fnd_api.g_false
1531: ,p_child_approval_flag=> fnd_api.g_false
1532: -- 10/22/2001 mpande Changed code different owner allocation bug
1525: ,p_act_budgets_rec=> p_act_budgets_rec
1526: ,p_parent_process_flag=> fnd_api.g_false
1527: ,p_parent_process_key=> fnd_api.g_miss_char
1528: ,p_parent_context=> fnd_api.g_miss_char
1529: ,p_parent_approval_flag=> fnd_api.g_false
1530: ,p_continue_flow=> fnd_api.g_false
1531: ,p_child_approval_flag=> fnd_api.g_false
1532: -- 10/22/2001 mpande Changed code different owner allocation bug
1533: ,p_requestor_owner_flag => 'N'
1526: ,p_parent_process_flag=> fnd_api.g_false
1527: ,p_parent_process_key=> fnd_api.g_miss_char
1528: ,p_parent_context=> fnd_api.g_miss_char
1529: ,p_parent_approval_flag=> fnd_api.g_false
1530: ,p_continue_flow=> fnd_api.g_false
1531: ,p_child_approval_flag=> fnd_api.g_false
1532: -- 10/22/2001 mpande Changed code different owner allocation bug
1533: ,p_requestor_owner_flag => 'N'
1534: ,x_utilized_amount => l_utilized_amount
1527: ,p_parent_process_key=> fnd_api.g_miss_char
1528: ,p_parent_context=> fnd_api.g_miss_char
1529: ,p_parent_approval_flag=> fnd_api.g_false
1530: ,p_continue_flow=> fnd_api.g_false
1531: ,p_child_approval_flag=> fnd_api.g_false
1532: -- 10/22/2001 mpande Changed code different owner allocation bug
1533: ,p_requestor_owner_flag => 'N'
1534: ,x_utilized_amount => l_utilized_amount
1535: );
1549: -- End of Comments
1550: /*****************************************************************************************/
1551: PROCEDURE update_act_budgets (
1552: p_api_version IN NUMBER
1553: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1554: ,p_commit IN VARCHAR2 := fnd_api.g_false
1555: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1556: ,x_return_status OUT NOCOPY VARCHAR2
1557: ,x_msg_count OUT NOCOPY NUMBER
1550: /*****************************************************************************************/
1551: PROCEDURE update_act_budgets (
1552: p_api_version IN NUMBER
1553: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1554: ,p_commit IN VARCHAR2 := fnd_api.g_false
1555: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1556: ,x_return_status OUT NOCOPY VARCHAR2
1557: ,x_msg_count OUT NOCOPY NUMBER
1558: ,x_msg_data OUT NOCOPY VARCHAR2
1551: PROCEDURE update_act_budgets (
1552: p_api_version IN NUMBER
1553: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1554: ,p_commit IN VARCHAR2 := fnd_api.g_false
1555: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1556: ,x_return_status OUT NOCOPY VARCHAR2
1557: ,x_msg_count OUT NOCOPY NUMBER
1558: ,x_msg_data OUT NOCOPY VARCHAR2
1559: ,p_act_budgets_rec IN act_budgets_rec_type
1573: ,x_msg_count=> x_msg_count
1574: ,x_msg_data=> x_msg_data
1575: ,p_act_budgets_rec=> p_act_budgets_rec
1576: ,p_child_approval_flag=> p_child_approval_flag
1577: ,p_parent_process_flag=> fnd_api.g_false
1578: ,p_parent_process_key=> fnd_api.g_miss_char
1579: ,p_parent_context=> fnd_api.g_miss_char
1580: ,p_parent_approval_flag=> fnd_api.g_false
1581: ,p_continue_flow=> fnd_api.g_false
1574: ,x_msg_data=> x_msg_data
1575: ,p_act_budgets_rec=> p_act_budgets_rec
1576: ,p_child_approval_flag=> p_child_approval_flag
1577: ,p_parent_process_flag=> fnd_api.g_false
1578: ,p_parent_process_key=> fnd_api.g_miss_char
1579: ,p_parent_context=> fnd_api.g_miss_char
1580: ,p_parent_approval_flag=> fnd_api.g_false
1581: ,p_continue_flow=> fnd_api.g_false
1582: -- 10/22/2001 mpande Changed code different owner allocation bug
1575: ,p_act_budgets_rec=> p_act_budgets_rec
1576: ,p_child_approval_flag=> p_child_approval_flag
1577: ,p_parent_process_flag=> fnd_api.g_false
1578: ,p_parent_process_key=> fnd_api.g_miss_char
1579: ,p_parent_context=> fnd_api.g_miss_char
1580: ,p_parent_approval_flag=> fnd_api.g_false
1581: ,p_continue_flow=> fnd_api.g_false
1582: -- 10/22/2001 mpande Changed code different owner allocation bug
1583: ,p_requestor_owner_flag => p_requestor_owner_flag
1576: ,p_child_approval_flag=> p_child_approval_flag
1577: ,p_parent_process_flag=> fnd_api.g_false
1578: ,p_parent_process_key=> fnd_api.g_miss_char
1579: ,p_parent_context=> fnd_api.g_miss_char
1580: ,p_parent_approval_flag=> fnd_api.g_false
1581: ,p_continue_flow=> fnd_api.g_false
1582: -- 10/22/2001 mpande Changed code different owner allocation bug
1583: ,p_requestor_owner_flag => p_requestor_owner_flag
1584: ,p_act_util_rec => p_act_util_rec
1577: ,p_parent_process_flag=> fnd_api.g_false
1578: ,p_parent_process_key=> fnd_api.g_miss_char
1579: ,p_parent_context=> fnd_api.g_miss_char
1580: ,p_parent_approval_flag=> fnd_api.g_false
1581: ,p_continue_flow=> fnd_api.g_false
1582: -- 10/22/2001 mpande Changed code different owner allocation bug
1583: ,p_requestor_owner_flag => p_requestor_owner_flag
1584: ,p_act_util_rec => p_act_util_rec
1585: ,x_utilized_amount => l_utilized_amount
1591: -- yzhao: 06/21/2004 added x_utilized_amount to return actual utilized amount
1592: */
1593: PROCEDURE update_act_budgets (
1594: p_api_version IN NUMBER
1595: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1596: ,p_commit IN VARCHAR2 := fnd_api.g_false
1597: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1598: ,x_return_status OUT NOCOPY VARCHAR2
1599: ,x_msg_count OUT NOCOPY NUMBER
1592: */
1593: PROCEDURE update_act_budgets (
1594: p_api_version IN NUMBER
1595: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1596: ,p_commit IN VARCHAR2 := fnd_api.g_false
1597: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1598: ,x_return_status OUT NOCOPY VARCHAR2
1599: ,x_msg_count OUT NOCOPY NUMBER
1600: ,x_msg_data OUT NOCOPY VARCHAR2
1593: PROCEDURE update_act_budgets (
1594: p_api_version IN NUMBER
1595: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1596: ,p_commit IN VARCHAR2 := fnd_api.g_false
1597: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1598: ,x_return_status OUT NOCOPY VARCHAR2
1599: ,x_msg_count OUT NOCOPY NUMBER
1600: ,x_msg_data OUT NOCOPY VARCHAR2
1601: ,p_act_budgets_rec IN act_budgets_rec_type
1615: ,x_msg_count=> x_msg_count
1616: ,x_msg_data=> x_msg_data
1617: ,p_act_budgets_rec=> p_act_budgets_rec
1618: ,p_child_approval_flag=> p_child_approval_flag
1619: ,p_parent_process_flag=> fnd_api.g_false
1620: ,p_parent_process_key=> fnd_api.g_miss_char
1621: ,p_parent_context=> fnd_api.g_miss_char
1622: ,p_parent_approval_flag=> fnd_api.g_false
1623: ,p_continue_flow=> fnd_api.g_false
1616: ,x_msg_data=> x_msg_data
1617: ,p_act_budgets_rec=> p_act_budgets_rec
1618: ,p_child_approval_flag=> p_child_approval_flag
1619: ,p_parent_process_flag=> fnd_api.g_false
1620: ,p_parent_process_key=> fnd_api.g_miss_char
1621: ,p_parent_context=> fnd_api.g_miss_char
1622: ,p_parent_approval_flag=> fnd_api.g_false
1623: ,p_continue_flow=> fnd_api.g_false
1624: -- 10/22/2001 mpande Changed code different owner allocation bug
1617: ,p_act_budgets_rec=> p_act_budgets_rec
1618: ,p_child_approval_flag=> p_child_approval_flag
1619: ,p_parent_process_flag=> fnd_api.g_false
1620: ,p_parent_process_key=> fnd_api.g_miss_char
1621: ,p_parent_context=> fnd_api.g_miss_char
1622: ,p_parent_approval_flag=> fnd_api.g_false
1623: ,p_continue_flow=> fnd_api.g_false
1624: -- 10/22/2001 mpande Changed code different owner allocation bug
1625: ,p_requestor_owner_flag => p_requestor_owner_flag
1618: ,p_child_approval_flag=> p_child_approval_flag
1619: ,p_parent_process_flag=> fnd_api.g_false
1620: ,p_parent_process_key=> fnd_api.g_miss_char
1621: ,p_parent_context=> fnd_api.g_miss_char
1622: ,p_parent_approval_flag=> fnd_api.g_false
1623: ,p_continue_flow=> fnd_api.g_false
1624: -- 10/22/2001 mpande Changed code different owner allocation bug
1625: ,p_requestor_owner_flag => p_requestor_owner_flag
1626: ,p_act_util_rec => p_act_util_rec
1619: ,p_parent_process_flag=> fnd_api.g_false
1620: ,p_parent_process_key=> fnd_api.g_miss_char
1621: ,p_parent_context=> fnd_api.g_miss_char
1622: ,p_parent_approval_flag=> fnd_api.g_false
1623: ,p_continue_flow=> fnd_api.g_false
1624: -- 10/22/2001 mpande Changed code different owner allocation bug
1625: ,p_requestor_owner_flag => p_requestor_owner_flag
1626: ,p_act_util_rec => p_act_util_rec
1627: ,x_utilized_amount => x_utilized_amount
1641: -- End Of Comments
1642: /****************************************************************************/
1643: PROCEDURE update_act_budgets (
1644: p_api_version IN NUMBER
1645: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1646: ,p_commit IN VARCHAR2 := fnd_api.g_false
1647: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1648: ,x_return_status OUT NOCOPY VARCHAR2
1649: ,x_msg_count OUT NOCOPY NUMBER
1642: /****************************************************************************/
1643: PROCEDURE update_act_budgets (
1644: p_api_version IN NUMBER
1645: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1646: ,p_commit IN VARCHAR2 := fnd_api.g_false
1647: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1648: ,x_return_status OUT NOCOPY VARCHAR2
1649: ,x_msg_count OUT NOCOPY NUMBER
1650: ,x_msg_data OUT NOCOPY VARCHAR2
1643: PROCEDURE update_act_budgets (
1644: p_api_version IN NUMBER
1645: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1646: ,p_commit IN VARCHAR2 := fnd_api.g_false
1647: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1648: ,x_return_status OUT NOCOPY VARCHAR2
1649: ,x_msg_count OUT NOCOPY NUMBER
1650: ,x_msg_data OUT NOCOPY VARCHAR2
1651: ,p_act_budgets_rec IN act_budgets_rec_type
1653: ,p_parent_process_key IN VARCHAR2
1654: ,p_parent_context IN VARCHAR2
1655: ,p_parent_approval_flag IN VARCHAR2
1656: ,p_continue_flow IN VARCHAR2
1657: ,p_child_approval_flag IN VARCHAR2 := fnd_api.g_false
1658: ,p_requestor_owner_flag IN VARCHAR2 := 'N'
1659: ,p_act_util_rec IN act_util_rec_type := NULL
1660: ) IS
1661: l_utilized_amount NUMBER;
1683:
1684:
1685: PROCEDURE update_act_budgets (
1686: p_api_version IN NUMBER
1687: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1688: ,p_commit IN VARCHAR2 := fnd_api.g_false
1689: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1690: ,x_return_status OUT NOCOPY VARCHAR2
1691: ,x_msg_count OUT NOCOPY NUMBER
1684:
1685: PROCEDURE update_act_budgets (
1686: p_api_version IN NUMBER
1687: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1688: ,p_commit IN VARCHAR2 := fnd_api.g_false
1689: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1690: ,x_return_status OUT NOCOPY VARCHAR2
1691: ,x_msg_count OUT NOCOPY NUMBER
1692: ,x_msg_data OUT NOCOPY VARCHAR2
1685: PROCEDURE update_act_budgets (
1686: p_api_version IN NUMBER
1687: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1688: ,p_commit IN VARCHAR2 := fnd_api.g_false
1689: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1690: ,x_return_status OUT NOCOPY VARCHAR2
1691: ,x_msg_count OUT NOCOPY NUMBER
1692: ,x_msg_data OUT NOCOPY VARCHAR2
1693: ,p_act_budgets_rec IN act_budgets_rec_type
1695: ,p_parent_process_key IN VARCHAR2
1696: ,p_parent_context IN VARCHAR2
1697: ,p_parent_approval_flag IN VARCHAR2
1698: ,p_continue_flow IN VARCHAR2
1699: ,p_child_approval_flag IN VARCHAR2 := fnd_api.g_false
1700: ,p_requestor_owner_flag IN VARCHAR2 := 'N'
1701: ,p_act_util_rec IN act_util_rec_type := NULL
1702: ,x_utilized_amount OUT NOCOPY NUMBER
1703: ) IS
1729:
1730:
1731: PROCEDURE update_act_budgets (
1732: p_api_version IN NUMBER
1733: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1734: ,p_commit IN VARCHAR2 := fnd_api.g_false
1735: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1736: ,x_return_status OUT NOCOPY VARCHAR2
1737: ,x_msg_count OUT NOCOPY NUMBER
1730:
1731: PROCEDURE update_act_budgets (
1732: p_api_version IN NUMBER
1733: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1734: ,p_commit IN VARCHAR2 := fnd_api.g_false
1735: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1736: ,x_return_status OUT NOCOPY VARCHAR2
1737: ,x_msg_count OUT NOCOPY NUMBER
1738: ,x_msg_data OUT NOCOPY VARCHAR2
1731: PROCEDURE update_act_budgets (
1732: p_api_version IN NUMBER
1733: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1734: ,p_commit IN VARCHAR2 := fnd_api.g_false
1735: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1736: ,x_return_status OUT NOCOPY VARCHAR2
1737: ,x_msg_count OUT NOCOPY NUMBER
1738: ,x_msg_data OUT NOCOPY VARCHAR2
1739: ,p_act_budgets_rec IN act_budgets_rec_type
1741: ,p_parent_process_key IN VARCHAR2
1742: ,p_parent_context IN VARCHAR2
1743: ,p_parent_approval_flag IN VARCHAR2
1744: ,p_continue_flow IN VARCHAR2
1745: ,p_child_approval_flag IN VARCHAR2 := fnd_api.g_false
1746: ,p_requestor_owner_flag IN VARCHAR2 := 'N'
1747: ,p_act_util_rec IN act_util_rec_type := NULL
1748: ,x_utilized_amount OUT NOCOPY NUMBER -- yzhao: 06/21/2004 added to return actual utilized amount\
1749: ,x_utilization_id OUT NOCOPY NUMBER ) IS
1805: -- End Of Comments
1806: /****************************************************************************/
1807: PROCEDURE update_act_budgets (
1808: p_api_version IN NUMBER
1809: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1810: ,p_commit IN VARCHAR2 := fnd_api.g_false
1811: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1812: ,x_return_status OUT NOCOPY VARCHAR2
1813: ,x_msg_count OUT NOCOPY NUMBER
1806: /****************************************************************************/
1807: PROCEDURE update_act_budgets (
1808: p_api_version IN NUMBER
1809: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1810: ,p_commit IN VARCHAR2 := fnd_api.g_false
1811: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1812: ,x_return_status OUT NOCOPY VARCHAR2
1813: ,x_msg_count OUT NOCOPY NUMBER
1814: ,x_msg_data OUT NOCOPY VARCHAR2
1807: PROCEDURE update_act_budgets (
1808: p_api_version IN NUMBER
1809: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1810: ,p_commit IN VARCHAR2 := fnd_api.g_false
1811: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1812: ,x_return_status OUT NOCOPY VARCHAR2
1813: ,x_msg_count OUT NOCOPY NUMBER
1814: ,x_msg_data OUT NOCOPY VARCHAR2
1815: ,p_old_act_budgets_rec IN act_budgets_rec_type
1818: ,p_parent_process_key IN VARCHAR2
1819: ,p_parent_context IN VARCHAR2
1820: ,p_parent_approval_flag IN VARCHAR2
1821: ,p_continue_flow IN VARCHAR2
1822: ,p_child_approval_flag IN VARCHAR2 := fnd_api.g_false
1823: ,p_requestor_owner_flag IN VARCHAR2 := 'N'
1824: ,p_act_util_rec IN act_util_rec_type -- For Bug#8867381 removed ':= NULL'
1825: ,x_utilized_amount OUT NOCOPY NUMBER -- yzhao: 06/21/2004 added to return actual utilized amount
1826: ,p_batch_type IN VARCHAR2
1860: END update_act_budgets;
1861:
1862: PROCEDURE update_act_budgets (
1863: p_api_version IN NUMBER
1864: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1865: ,p_commit IN VARCHAR2 := fnd_api.g_false
1866: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1867: ,x_return_status OUT NOCOPY VARCHAR2
1868: ,x_msg_count OUT NOCOPY NUMBER
1861:
1862: PROCEDURE update_act_budgets (
1863: p_api_version IN NUMBER
1864: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1865: ,p_commit IN VARCHAR2 := fnd_api.g_false
1866: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1867: ,x_return_status OUT NOCOPY VARCHAR2
1868: ,x_msg_count OUT NOCOPY NUMBER
1869: ,x_msg_data OUT NOCOPY VARCHAR2
1862: PROCEDURE update_act_budgets (
1863: p_api_version IN NUMBER
1864: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
1865: ,p_commit IN VARCHAR2 := fnd_api.g_false
1866: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
1867: ,x_return_status OUT NOCOPY VARCHAR2
1868: ,x_msg_count OUT NOCOPY NUMBER
1869: ,x_msg_data OUT NOCOPY VARCHAR2
1870: ,p_old_act_budgets_rec IN act_budgets_rec_type
1873: ,p_parent_process_key IN VARCHAR2
1874: ,p_parent_context IN VARCHAR2
1875: ,p_parent_approval_flag IN VARCHAR2
1876: ,p_continue_flow IN VARCHAR2
1877: ,p_child_approval_flag IN VARCHAR2 := fnd_api.g_false
1878: ,p_requestor_owner_flag IN VARCHAR2 := 'N'
1879: ,p_act_util_rec IN act_util_rec_type -- For Bug#8867381 removed ':= NULL'
1880: ,x_utilized_amount OUT NOCOPY NUMBER -- yzhao: 06/21/2004 added to return actual utilized amount
1881: ,p_batch_type IN VARCHAR2
1944: l_fc_amount NUMBER;
1945: l_set_of_books_id NUMBER;
1946: l_mrc_sob_type_code VARCHAR2(30);
1947: l_fc_currency_code VARCHAR2(150);
1948: l_exchange_rate_type VARCHAR2(30) := FND_API.G_MISS_CHAR; --Added for bug 7030415
1949: l_exchange_rate NUMBER;
1950: -- mpande for changed checkbook view 12/17/2001
1951: l_src_curr_request_amt NUMBER;
1952: l_src_currency VARCHAR2(150);
2011: -- Standard Start of API savepoint
2012: SAVEPOINT update_act_budgets_pvt;
2013:
2014: -- Standard call to check for call compatibility.
2015: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_package_name) THEN
2016: RAISE fnd_api.g_exc_unexpected_error;
2017: END IF;
2018:
2019: ozf_utility_pvt.debug_message(' update_Act_budgets.plan_currency_code mg: ' || p_act_util_rec.plan_currency_code);
2012: SAVEPOINT update_act_budgets_pvt;
2013:
2014: -- Standard call to check for call compatibility.
2015: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_package_name) THEN
2016: RAISE fnd_api.g_exc_unexpected_error;
2017: END IF;
2018:
2019: ozf_utility_pvt.debug_message(' update_Act_budgets.plan_currency_code mg: ' || p_act_util_rec.plan_currency_code);
2020:
2018:
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
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;
2028: --
2029: -- API body
2030: --
2031: complete_act_budgets_rec (p_act_budgets_rec, l_act_budgets_rec);
2032: -- we have to set the currency always because the activity currency might change
2033: -- after creation of the budgets
2034: --nirprasa, get the transaction currency for null currency offers
2035: IF l_act_budgets_rec.request_currency IS NULL
2036: OR l_act_budgets_rec.request_currency = FND_API.G_MISS_CHAR THEN
2037: l_act_budgets_rec.request_currency :=
2038: get_object_currency (
2039: l_act_budgets_rec.arc_act_budget_used_by
2040: ,l_act_budgets_rec.act_budget_used_by_id
2075: ozf_utility_pvt.debug_message ('l_transaction_currency '||l_transaction_currency);
2076: END IF;
2077: -- do this only if it is null because , in other case request amount should be passed correctly
2078: IF p_act_budgets_rec.request_amount IS NULL AND p_act_budgets_rec.src_curr_req_amt IS NOT NULL
2079: AND p_act_budgets_rec.src_curr_req_amt <> FND_API.g_miss_num THEN
2080:
2081: IF l_act_budgets_rec.request_currency = l_act_budgets_rec.approved_in_currency THEN
2082: -- don't need to convert if currencies are equal
2083: l_act_budgets_rec.request_amount := l_act_budgets_rec.src_curr_req_amt;
2124: );
2125: END IF;
2126: */
2127:
2128: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2129: RAISE fnd_api.g_exc_unexpected_error;
2130: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2131: RAISE fnd_api.g_exc_error;
2132: END IF;
2125: END IF;
2126: */
2127:
2128: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2129: RAISE fnd_api.g_exc_unexpected_error;
2130: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2131: RAISE fnd_api.g_exc_error;
2132: END IF;
2133: END IF;
2126: */
2127:
2128: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2129: RAISE fnd_api.g_exc_unexpected_error;
2130: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2131: RAISE fnd_api.g_exc_error;
2132: END IF;
2133: END IF;
2134: END IF;
2127:
2128: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2129: RAISE fnd_api.g_exc_unexpected_error;
2130: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2131: RAISE fnd_api.g_exc_error;
2132: END IF;
2133: END IF;
2134: END IF;
2135: END IF;
2136: /* End OF CHange mpande 12/19/2001 */
2137:
2138: IF l_act_budgets_rec.request_currency IS NULL THEN
2139: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
2140: x_return_status := fnd_api.g_ret_sts_error;
2141: END IF;
2142:
2143: IF l_return_status = fnd_api.g_ret_sts_error THEN
2144: RAISE fnd_api.g_exc_error;
2139: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
2140: x_return_status := fnd_api.g_ret_sts_error;
2141: END IF;
2142:
2143: IF l_return_status = fnd_api.g_ret_sts_error THEN
2144: RAISE fnd_api.g_exc_error;
2145: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2146: RAISE fnd_api.g_exc_unexpected_error;
2147: END IF;
2140: x_return_status := fnd_api.g_ret_sts_error;
2141: END IF;
2142:
2143: IF l_return_status = fnd_api.g_ret_sts_error THEN
2144: RAISE fnd_api.g_exc_error;
2145: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2146: RAISE fnd_api.g_exc_unexpected_error;
2147: END IF;
2148:
2141: END IF;
2142:
2143: IF l_return_status = fnd_api.g_ret_sts_error THEN
2144: RAISE fnd_api.g_exc_error;
2145: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2146: RAISE fnd_api.g_exc_unexpected_error;
2147: END IF;
2148:
2149: IF l_act_budgets_rec.user_status_id IS NULL THEN
2142:
2143: IF l_return_status = fnd_api.g_ret_sts_error THEN
2144: RAISE fnd_api.g_exc_error;
2145: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2146: RAISE fnd_api.g_exc_unexpected_error;
2147: END IF;
2148:
2149: IF l_act_budgets_rec.user_status_id IS NULL THEN
2150: l_act_budgets_rec.user_status_id :=
2162:
2163: IF c_current_status%NOTFOUND THEN
2164: CLOSE c_current_status;
2165: ozf_utility_pvt.error_message ('OZF_API_RECORD_NOT_FOUND');
2166: RAISE fnd_api.g_exc_unexpected_error;
2167: END IF;
2168:
2169: CLOSE c_current_status;
2170:
2171:
2172:
2173: IF l_old_status_code = 'CLOSED' THEN
2174: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_REJECTED');
2175: RAISE fnd_api.g_exc_error;
2176: ELSIF l_old_status_code = 'REJECTED' THEN
2177: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_REJECTED');
2178: RAISE fnd_api.g_exc_error;
2179: --
2174: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_REJECTED');
2175: RAISE fnd_api.g_exc_error;
2176: ELSIF l_old_status_code = 'REJECTED' THEN
2177: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_REJECTED');
2178: RAISE fnd_api.g_exc_error;
2179: --
2180: -- Cases of valid approval:
2181: -- 1) WF approval process responds to request to APPROVE, in which case, old status
2182: -- equals PENDING and new status equals APPROVED.
2216: ,px_ozf_funds_old_rectype => px_ozf_funds_old_rectype
2217: ,px_ozf_funds_new_tbl => px_ozf_funds_new_tbl -- For TPA Parallel Execution ER - 9614703
2218: );
2219:
2220: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2221: RAISE fnd_api.g_exc_unexpected_error;
2222: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2223: RAISE fnd_api.g_exc_error;
2224: END IF;
2217: ,px_ozf_funds_new_tbl => px_ozf_funds_new_tbl -- For TPA Parallel Execution ER - 9614703
2218: );
2219:
2220: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2221: RAISE fnd_api.g_exc_unexpected_error;
2222: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2223: RAISE fnd_api.g_exc_error;
2224: END IF;
2225:
2218: );
2219:
2220: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2221: RAISE fnd_api.g_exc_unexpected_error;
2222: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2223: RAISE fnd_api.g_exc_error;
2224: END IF;
2225:
2226: complete_act_budgets_rec (l_temp_rec, l_act_budgets_rec);
2219:
2220: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2221: RAISE fnd_api.g_exc_unexpected_error;
2222: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2223: RAISE fnd_api.g_exc_error;
2224: END IF;
2225:
2226: complete_act_budgets_rec (l_temp_rec, l_act_budgets_rec);
2227: ELSIF l_old_status_code = 'PENDING'
2253: ,p_from_amount=> l_act_budgets_rec.request_amount
2254: ,x_to_amount=> l_fund_rec.planned_amt
2255: );
2256:
2257: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2258: RAISE fnd_api.g_exc_unexpected_error;
2259: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2260: RAISE fnd_api.g_exc_error;
2261: END IF;
2254: ,x_to_amount=> l_fund_rec.planned_amt
2255: );
2256:
2257: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2258: RAISE fnd_api.g_exc_unexpected_error;
2259: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2260: RAISE fnd_api.g_exc_error;
2261: END IF;
2262: END IF;
2255: );
2256:
2257: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2258: RAISE fnd_api.g_exc_unexpected_error;
2259: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2260: RAISE fnd_api.g_exc_error;
2261: END IF;
2262: END IF;
2263:
2256:
2257: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2258: RAISE fnd_api.g_exc_unexpected_error;
2259: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2260: RAISE fnd_api.g_exc_error;
2261: END IF;
2262: END IF;
2263:
2264: -- R12: yzhao BEGIN ozf_object_fund_summary decrease planned_amount
2274: ,p_from_amount=> l_act_budgets_rec.request_amount
2275: ,x_to_amount=> l_univ_amount
2276: );
2277:
2278: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2279: RAISE fnd_api.g_exc_unexpected_error;
2280: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2281: RAISE fnd_api.g_exc_error;
2282: END IF;
2275: ,x_to_amount=> l_univ_amount
2276: );
2277:
2278: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2279: RAISE fnd_api.g_exc_unexpected_error;
2280: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2281: RAISE fnd_api.g_exc_error;
2282: END IF;
2283: END IF;
2276: );
2277:
2278: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2279: RAISE fnd_api.g_exc_unexpected_error;
2280: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2281: RAISE fnd_api.g_exc_error;
2282: END IF;
2283: END IF;
2284:
2277:
2278: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2279: RAISE fnd_api.g_exc_unexpected_error;
2280: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2281: RAISE fnd_api.g_exc_error;
2282: END IF;
2283: END IF;
2284:
2285:
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;
2305: l_objfundsum_rec.planned_amt := NVL(l_objfundsum_rec.planned_amt, 0) + NVL (l_fund_rec.planned_amt, 0);
2306: l_objfundsum_rec.plan_curr_planned_amt := NVL(l_objfundsum_rec.plan_curr_planned_amt, 0)
2307: + NVL(l_act_budgets_rec.request_amount, 0);
2308: l_objfundsum_rec.univ_curr_planned_amt := NVL(l_objfundsum_rec.univ_curr_planned_amt, 0) + NVL(l_univ_amount, 0);
2309: ozf_objfundsum_pvt.update_objfundsum(
2310: p_api_version => 1.0,
2311: p_init_msg_list => Fnd_Api.G_FALSE,
2312: p_validation_level => Fnd_Api.G_VALID_LEVEL_NONE,
2313: p_objfundsum_rec => l_objfundsum_rec,
2314: x_return_status => l_return_status,
2315: x_msg_count => x_msg_count,
2308: l_objfundsum_rec.univ_curr_planned_amt := NVL(l_objfundsum_rec.univ_curr_planned_amt, 0) + NVL(l_univ_amount, 0);
2309: ozf_objfundsum_pvt.update_objfundsum(
2310: p_api_version => 1.0,
2311: p_init_msg_list => Fnd_Api.G_FALSE,
2312: p_validation_level => Fnd_Api.G_VALID_LEVEL_NONE,
2313: p_objfundsum_rec => l_objfundsum_rec,
2314: x_return_status => l_return_status,
2315: x_msg_count => x_msg_count,
2316: x_msg_data => x_msg_data
2314: x_return_status => l_return_status,
2315: x_msg_count => x_msg_count,
2316: x_msg_data => x_msg_data
2317: );
2318: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2319: RAISE fnd_api.g_exc_unexpected_error;
2320: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2321: RAISE fnd_api.g_exc_error;
2322: END IF;
2315: x_msg_count => x_msg_count,
2316: x_msg_data => x_msg_data
2317: );
2318: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2319: RAISE fnd_api.g_exc_unexpected_error;
2320: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2321: RAISE fnd_api.g_exc_error;
2322: END IF;
2323: -- R12: yzhao END ozf_object_fund_summary decrease planned_amount
2316: x_msg_data => x_msg_data
2317: );
2318: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2319: RAISE fnd_api.g_exc_unexpected_error;
2320: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2321: RAISE fnd_api.g_exc_error;
2322: END IF;
2323: -- R12: yzhao END ozf_object_fund_summary decrease planned_amount
2324: END IF;
2317: );
2318: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2319: RAISE fnd_api.g_exc_unexpected_error;
2320: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2321: RAISE fnd_api.g_exc_error;
2322: END IF;
2323: -- R12: yzhao END ozf_object_fund_summary decrease planned_amount
2324: END IF;
2325:
2328: l_fund_rec.planned_amt := l_fund_planned_amount
2329: - l_fund_rec.planned_amt;
2330: ozf_funds_pvt.update_fund (
2331: p_api_version=> 1.0
2332: ,p_init_msg_list=> fnd_api.g_false
2333: , -- allow the calling API to handle
2334: p_commit=> fnd_api.g_false
2335: , -- allow the calling API to handle
2336: p_validation_level=> p_validation_level
2330: ozf_funds_pvt.update_fund (
2331: p_api_version=> 1.0
2332: ,p_init_msg_list=> fnd_api.g_false
2333: , -- allow the calling API to handle
2334: p_commit=> fnd_api.g_false
2335: , -- allow the calling API to handle
2336: p_validation_level=> p_validation_level
2337: ,x_return_status=> l_return_status
2338: ,x_msg_count=> x_msg_count
2340: ,p_fund_rec=> l_fund_rec
2341: ,p_mode=> g_cons_fund_mode
2342: );
2343:
2344: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2345: RAISE fnd_api.g_exc_unexpected_error;
2346: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2347: RAISE fnd_api.g_exc_error;
2348: END IF;
2341: ,p_mode=> g_cons_fund_mode
2342: );
2343:
2344: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2345: RAISE fnd_api.g_exc_unexpected_error;
2346: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2347: RAISE fnd_api.g_exc_error;
2348: END IF;
2349:
2342: );
2343:
2344: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2345: RAISE fnd_api.g_exc_unexpected_error;
2346: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2347: RAISE fnd_api.g_exc_error;
2348: END IF;
2349:
2350: END IF; -- if source type = FUND
2343:
2344: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2345: RAISE fnd_api.g_exc_unexpected_error;
2346: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2347: RAISE fnd_api.g_exc_error;
2348: END IF;
2349:
2350: END IF; -- if source type = FUND
2351: ELSIF (l_old_status_code = 'PENDING' OR l_old_status_code = 'PENDING_VALIDATION')
2416: ,p_from_amount=> l_act_budgets_rec.request_amount
2417: ,x_to_amount=> l_fund_rec.planned_amt
2418: );
2419:
2420: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2421: RAISE fnd_api.g_exc_unexpected_error;
2422: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2423: RAISE fnd_api.g_exc_error;
2424: END IF;
2417: ,x_to_amount=> l_fund_rec.planned_amt
2418: );
2419:
2420: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2421: RAISE fnd_api.g_exc_unexpected_error;
2422: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2423: RAISE fnd_api.g_exc_error;
2424: END IF;
2425: END IF;
2418: );
2419:
2420: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2421: RAISE fnd_api.g_exc_unexpected_error;
2422: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2423: RAISE fnd_api.g_exc_error;
2424: END IF;
2425: END IF;
2426:
2419:
2420: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2421: RAISE fnd_api.g_exc_unexpected_error;
2422: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2423: RAISE fnd_api.g_exc_error;
2424: END IF;
2425: END IF;
2426:
2427: -- R12: yzhao BEGIN ozf_object_fund_summary increase planned_amount
2437: ,p_from_amount=> l_act_budgets_rec.request_amount
2438: ,x_to_amount=> l_univ_amount
2439: );
2440:
2441: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2442: RAISE fnd_api.g_exc_unexpected_error;
2443: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2444: RAISE fnd_api.g_exc_error;
2445: END IF;
2438: ,x_to_amount=> l_univ_amount
2439: );
2440:
2441: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2442: RAISE fnd_api.g_exc_unexpected_error;
2443: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2444: RAISE fnd_api.g_exc_error;
2445: END IF;
2446: END IF;
2439: );
2440:
2441: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2442: RAISE fnd_api.g_exc_unexpected_error;
2443: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2444: RAISE fnd_api.g_exc_error;
2445: END IF;
2446: END IF;
2447:
2440:
2441: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2442: RAISE fnd_api.g_exc_unexpected_error;
2443: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2444: RAISE fnd_api.g_exc_error;
2445: END IF;
2446: END IF;
2447:
2448: l_objfundsum_rec := NULL;
2466: l_objfundsum_rec.univ_curr_planned_amt := NVL(l_objfundsum_rec.univ_curr_planned_amt, 0) + NVL(l_univ_amount, 0);
2467: IF l_objfundsum_rec.objfundsum_id IS NULL THEN
2468: ozf_objfundsum_pvt.create_objfundsum(
2469: p_api_version => 1.0,
2470: p_init_msg_list => Fnd_Api.G_FALSE,
2471: p_validation_level => Fnd_Api.G_VALID_LEVEL_NONE,
2472: p_objfundsum_rec => l_objfundsum_rec,
2473: x_return_status => l_return_status,
2474: x_msg_count => x_msg_count,
2467: IF l_objfundsum_rec.objfundsum_id IS NULL THEN
2468: ozf_objfundsum_pvt.create_objfundsum(
2469: p_api_version => 1.0,
2470: p_init_msg_list => Fnd_Api.G_FALSE,
2471: p_validation_level => Fnd_Api.G_VALID_LEVEL_NONE,
2472: p_objfundsum_rec => l_objfundsum_rec,
2473: x_return_status => l_return_status,
2474: x_msg_count => x_msg_count,
2475: x_msg_data => x_msg_data,
2479:
2480: IF p_use_fund_staging_tables <> 'T' THEN
2481: ozf_objfundsum_pvt.update_objfundsum(
2482: p_api_version => 1.0,
2483: p_init_msg_list => Fnd_Api.G_FALSE,
2484: p_validation_level => Fnd_Api.G_VALID_LEVEL_NONE,
2485: p_objfundsum_rec => l_objfundsum_rec,
2486: x_return_status => l_return_status,
2487: x_msg_count => x_msg_count,
2480: IF p_use_fund_staging_tables <> 'T' THEN
2481: ozf_objfundsum_pvt.update_objfundsum(
2482: p_api_version => 1.0,
2483: p_init_msg_list => Fnd_Api.G_FALSE,
2484: p_validation_level => Fnd_Api.G_VALID_LEVEL_NONE,
2485: p_objfundsum_rec => l_objfundsum_rec,
2486: x_return_status => l_return_status,
2487: x_msg_count => x_msg_count,
2488: x_msg_data => x_msg_data
2487: x_msg_count => x_msg_count,
2488: x_msg_data => x_msg_data
2489: );
2490: END IF;
2491: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2492: RAISE fnd_api.g_exc_unexpected_error;
2493: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2494: RAISE fnd_api.g_exc_error;
2495: END IF;
2488: x_msg_data => x_msg_data
2489: );
2490: END IF;
2491: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2492: RAISE fnd_api.g_exc_unexpected_error;
2493: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2494: RAISE fnd_api.g_exc_error;
2495: END IF;
2496: -- R12: yzhao END insert/update ozf_object_fund_summary table for planned_amount
2489: );
2490: END IF;
2491: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2492: RAISE fnd_api.g_exc_unexpected_error;
2493: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2494: RAISE fnd_api.g_exc_error;
2495: END IF;
2496: -- R12: yzhao END insert/update ozf_object_fund_summary table for planned_amount
2497: END IF;
2490: END IF;
2491: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2492: RAISE fnd_api.g_exc_unexpected_error;
2493: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2494: RAISE fnd_api.g_exc_error;
2495: END IF;
2496: -- R12: yzhao END insert/update ozf_object_fund_summary table for planned_amount
2497: END IF;
2498:
2507: IF l_exceed_flag = 'N' THEN
2508: IF OZF_ACTBUDGETRULES_PVT.budget_has_enough_money (
2509: p_source_id=> l_act_budgets_rec.budget_source_id
2510: ,p_approved_amount=> l_fund_rec.planned_amt
2511: ) = fnd_api.g_false THEN
2512: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_MONEY');
2513: RAISE fnd_api.g_exc_error;
2514: END IF;
2515: END IF;
2509: p_source_id=> l_act_budgets_rec.budget_source_id
2510: ,p_approved_amount=> l_fund_rec.planned_amt
2511: ) = fnd_api.g_false THEN
2512: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_MONEY');
2513: RAISE fnd_api.g_exc_error;
2514: END IF;
2515: END IF;
2516:
2517: ozf_funds_pvt.update_fund (
2515: END IF;
2516:
2517: ozf_funds_pvt.update_fund (
2518: p_api_version=> 1.0
2519: ,p_init_msg_list=> fnd_api.g_false
2520: ,p_commit=> fnd_api.g_false
2521: ,p_validation_level=> p_validation_level
2522: ,x_return_status=> l_return_status
2523: ,x_msg_count=> x_msg_count
2516:
2517: ozf_funds_pvt.update_fund (
2518: p_api_version=> 1.0
2519: ,p_init_msg_list=> fnd_api.g_false
2520: ,p_commit=> fnd_api.g_false
2521: ,p_validation_level=> p_validation_level
2522: ,x_return_status=> l_return_status
2523: ,x_msg_count=> x_msg_count
2524: ,x_msg_data=> x_msg_data
2525: ,p_fund_rec=> l_fund_rec
2526: ,p_mode=> g_cons_fund_mode
2527: );
2528:
2529: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2530: RAISE fnd_api.g_exc_unexpected_error;
2531: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2532: RAISE fnd_api.g_exc_error;
2533: END IF;
2526: ,p_mode=> g_cons_fund_mode
2527: );
2528:
2529: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2530: RAISE fnd_api.g_exc_unexpected_error;
2531: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2532: RAISE fnd_api.g_exc_error;
2533: END IF;
2534:
2527: );
2528:
2529: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2530: RAISE fnd_api.g_exc_unexpected_error;
2531: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2532: RAISE fnd_api.g_exc_error;
2533: END IF;
2534:
2535: END IF; -- if source type = FUND
2528:
2529: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2530: RAISE fnd_api.g_exc_unexpected_error;
2531: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2532: RAISE fnd_api.g_exc_error;
2533: END IF;
2534:
2535: END IF; -- if source type = FUND
2536:
2551: ,p_requestor_owner_flag => p_requestor_owner_flag ---- added 10/19/2001 mpande
2552: ,x_start_flow_flag => l_start_flow_flag -- if 'Y', need start workflow after updating.
2553: );
2554:
2555: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2556: RAISE fnd_api.g_exc_unexpected_error;
2557: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2558: RAISE fnd_api.g_exc_error;
2559: END IF;
2552: ,x_start_flow_flag => l_start_flow_flag -- if 'Y', need start workflow after updating.
2553: );
2554:
2555: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2556: RAISE fnd_api.g_exc_unexpected_error;
2557: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2558: RAISE fnd_api.g_exc_error;
2559: END IF;
2560:
2553: );
2554:
2555: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2556: RAISE fnd_api.g_exc_unexpected_error;
2557: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2558: RAISE fnd_api.g_exc_error;
2559: END IF;
2560:
2561: END IF; -- if new.status_code = APPROVED
2554:
2555: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2556: RAISE fnd_api.g_exc_unexpected_error;
2557: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2558: RAISE fnd_api.g_exc_error;
2559: END IF;
2560:
2561: END IF; -- if new.status_code = APPROVED
2562:
2577: AND l_act_budgets_rec.arc_act_budget_used_by = 'OFFR' THEN
2578: l_act_budgets_rec.approved_in_currency := l_transaction_currency;
2579: END IF;
2580:
2581: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2582: RAISE fnd_api.g_exc_unexpected_error;
2583: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2584: RAISE fnd_api.g_exc_error;
2585: END IF;
2578: l_act_budgets_rec.approved_in_currency := l_transaction_currency;
2579: END IF;
2580:
2581: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2582: RAISE fnd_api.g_exc_unexpected_error;
2583: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2584: RAISE fnd_api.g_exc_error;
2585: END IF;
2586:
2579: END IF;
2580:
2581: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2582: RAISE fnd_api.g_exc_unexpected_error;
2583: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2584: RAISE fnd_api.g_exc_error;
2585: END IF;
2586:
2587: IF l_act_budgets_rec.request_currency = l_act_budgets_rec.approved_in_currency THEN
2580:
2581: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2582: RAISE fnd_api.g_exc_unexpected_error;
2583: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2584: RAISE fnd_api.g_exc_error;
2585: END IF;
2586:
2587: IF l_act_budgets_rec.request_currency = l_act_budgets_rec.approved_in_currency THEN
2588: -- don't need to convert if currencies are equal
2641:
2642: END IF;
2643: */
2644:
2645: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2646: RAISE fnd_api.g_exc_unexpected_error;
2647: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2648: RAISE fnd_api.g_exc_error;
2649: END IF;
2642: END IF;
2643: */
2644:
2645: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2646: RAISE fnd_api.g_exc_unexpected_error;
2647: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2648: RAISE fnd_api.g_exc_error;
2649: END IF;
2650: END IF;
2643: */
2644:
2645: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2646: RAISE fnd_api.g_exc_unexpected_error;
2647: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2648: RAISE fnd_api.g_exc_error;
2649: END IF;
2650: END IF;
2651: END IF;
2644:
2645: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2646: RAISE fnd_api.g_exc_unexpected_error;
2647: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2648: RAISE fnd_api.g_exc_error;
2649: END IF;
2650: END IF;
2651: END IF;
2652: END IF;
2691: OPEN c_get_conversion_type(l_act_util_rec.org_id);
2692: FETCH c_get_conversion_type INTO l_exchange_rate_type;
2693: CLOSE c_get_conversion_type;
2694: ELSE
2695: l_exchange_rate_type := FND_API.G_MISS_CHAR;
2696: END IF;
2697:
2698: IF NVL(l_act_budgets_rec.request_amount,0) <> 0 THEN
2699:
2728: ,x_to_amount => l_src_curr_request_amt
2729: ,x_rate => l_rate);
2730: END IF;
2731:
2732: IF l_return_status = fnd_api.g_ret_sts_error THEN
2733: RAISE fnd_api.g_exc_error;
2734: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2735: RAISE fnd_api.g_exc_unexpected_error;
2736: END IF;
2729: ,x_rate => l_rate);
2730: END IF;
2731:
2732: IF l_return_status = fnd_api.g_ret_sts_error THEN
2733: RAISE fnd_api.g_exc_error;
2734: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2735: RAISE fnd_api.g_exc_unexpected_error;
2736: END IF;
2737: END IF;
2730: END IF;
2731:
2732: IF l_return_status = fnd_api.g_ret_sts_error THEN
2733: RAISE fnd_api.g_exc_error;
2734: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2735: RAISE fnd_api.g_exc_unexpected_error;
2736: END IF;
2737: END IF;
2738: IF G_DEBUG THEN
2731:
2732: IF l_return_status = fnd_api.g_ret_sts_error THEN
2733: RAISE fnd_api.g_exc_error;
2734: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2735: RAISE fnd_api.g_exc_unexpected_error;
2736: END IF;
2737: END IF;
2738: IF G_DEBUG THEN
2739: ozf_utility_pvt.debug_message ( l_api_name
2747: ,x_return_status=> l_return_status
2748: );
2749:
2750: -- If any errors happen abort API.
2751: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2752: RAISE fnd_api.g_exc_unexpected_error;
2753: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2754: RAISE fnd_api.g_exc_error;
2755: END IF;
2748: );
2749:
2750: -- If any errors happen abort API.
2751: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2752: RAISE fnd_api.g_exc_unexpected_error;
2753: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2754: RAISE fnd_api.g_exc_error;
2755: END IF;
2756: END IF;
2749:
2750: -- If any errors happen abort API.
2751: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2752: RAISE fnd_api.g_exc_unexpected_error;
2753: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2754: RAISE fnd_api.g_exc_error;
2755: END IF;
2756: END IF;
2757:
2750: -- If any errors happen abort API.
2751: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2752: RAISE fnd_api.g_exc_unexpected_error;
2753: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2754: RAISE fnd_api.g_exc_error;
2755: END IF;
2756: END IF;
2757:
2758: IF G_DEBUG THEN
2766: ,p_validation_mode=> jtf_plsql_api.g_update
2767: ,x_return_status=> l_return_status
2768: );
2769:
2770: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2771: RAISE fnd_api.g_exc_unexpected_error;
2772: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2773: RAISE fnd_api.g_exc_error;
2774: END IF;
2767: ,x_return_status=> l_return_status
2768: );
2769:
2770: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2771: RAISE fnd_api.g_exc_unexpected_error;
2772: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2773: RAISE fnd_api.g_exc_error;
2774: END IF;
2775: END IF;
2768: );
2769:
2770: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2771: RAISE fnd_api.g_exc_unexpected_error;
2772: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2773: RAISE fnd_api.g_exc_error;
2774: END IF;
2775: END IF;
2776:
2769:
2770: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2771: RAISE fnd_api.g_exc_unexpected_error;
2772: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
2773: RAISE fnd_api.g_exc_error;
2774: END IF;
2775: END IF;
2776:
2777: -- Added 04/26/2001 mpande for new functionality changes for hornet
2782: l_act_budgets_rec.approval_date := SYSDATE;
2783: END IF;
2784: END IF;
2785:
2786: IF l_return_status = fnd_api.g_ret_sts_error THEN
2787: RAISE fnd_api.g_exc_error;
2788: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2789: RAISE fnd_api.g_exc_unexpected_error;
2790: END IF;
2783: END IF;
2784: END IF;
2785:
2786: IF l_return_status = fnd_api.g_ret_sts_error THEN
2787: RAISE fnd_api.g_exc_error;
2788: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2789: RAISE fnd_api.g_exc_unexpected_error;
2790: END IF;
2791:
2784: END IF;
2785:
2786: IF l_return_status = fnd_api.g_ret_sts_error THEN
2787: RAISE fnd_api.g_exc_error;
2788: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2789: RAISE fnd_api.g_exc_unexpected_error;
2790: END IF;
2791:
2792:
2785:
2786: IF l_return_status = fnd_api.g_ret_sts_error THEN
2787: RAISE fnd_api.g_exc_error;
2788: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2789: RAISE fnd_api.g_exc_unexpected_error;
2790: END IF;
2791:
2792:
2793:
2833: || ' id('
2834: || l_act_budgets_rec.act_budget_used_by_id
2835: || ') returns ' || l_return_status
2836: || ' ledger_id=' || l_ledger_id);
2837: IF l_return_status = fnd_api.g_ret_sts_error THEN
2838: RAISE fnd_api.g_exc_error;
2839: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2840: RAISE fnd_api.g_exc_unexpected_error;
2841: END IF;
2834: || l_act_budgets_rec.act_budget_used_by_id
2835: || ') returns ' || l_return_status
2836: || ' ledger_id=' || l_ledger_id);
2837: IF l_return_status = fnd_api.g_ret_sts_error THEN
2838: RAISE fnd_api.g_exc_error;
2839: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2840: RAISE fnd_api.g_exc_unexpected_error;
2841: END IF;
2842: END IF;
2835: || ') returns ' || l_return_status
2836: || ' ledger_id=' || l_ledger_id);
2837: IF l_return_status = fnd_api.g_ret_sts_error THEN
2838: RAISE fnd_api.g_exc_error;
2839: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2840: RAISE fnd_api.g_exc_unexpected_error;
2841: END IF;
2842: END IF;
2843:
2836: || ' ledger_id=' || l_ledger_id);
2837: IF l_return_status = fnd_api.g_ret_sts_error THEN
2838: RAISE fnd_api.g_exc_error;
2839: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2840: RAISE fnd_api.g_exc_unexpected_error;
2841: END IF;
2842: END IF;
2843:
2844:
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;
2873: ELSE
2874: --Added for bug 7030415
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;
2873: ELSE
2874: --Added for bug 7030415
2875: OPEN c_get_conversion_type(l_act_util_rec.org_id);
2910: ,x_exchange_rate => l_exchange_rate
2911: ,x_return_status => l_return_status);
2912: END IF;
2913:
2914: IF l_return_status = fnd_api.g_ret_sts_error THEN
2915: RAISE fnd_api.g_exc_error;
2916: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2917: RAISE fnd_api.g_exc_unexpected_error;
2918: END IF;
2911: ,x_return_status => l_return_status);
2912: END IF;
2913:
2914: IF l_return_status = fnd_api.g_ret_sts_error THEN
2915: RAISE fnd_api.g_exc_error;
2916: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2917: RAISE fnd_api.g_exc_unexpected_error;
2918: END IF;
2919: END IF;
2912: END IF;
2913:
2914: IF l_return_status = fnd_api.g_ret_sts_error THEN
2915: RAISE fnd_api.g_exc_error;
2916: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2917: RAISE fnd_api.g_exc_unexpected_error;
2918: END IF;
2919: END IF;
2920: END IF;
2913:
2914: IF l_return_status = fnd_api.g_ret_sts_error THEN
2915: RAISE fnd_api.g_exc_error;
2916: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
2917: RAISE fnd_api.g_exc_unexpected_error;
2918: END IF;
2919: END IF;
2920: END IF;
2921: END IF;
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;
3013:
3014: /*IF l_act_budgets_rec.transfer_type = 'UTILIZED'
3015: AND l_src_currency <> l_act_budgets_rec.request_currency THEN
3019: END IF;*/
3020:
3021: ELSE
3022: --//Copied the following code from above to rectify Scan Data offer activation issue (+)
3023: IF l_act_budgets_rec.request_amount IS NULL OR l_act_budgets_rec.request_amount = FND_API.G_MISS_NUM THEN
3024: l_act_budgets_rec.request_amount := 0;
3025: END IF;
3026: IF l_act_budgets_rec.approved_amount IS NULL OR l_act_budgets_rec.approved_amount = FND_API.G_MISS_NUM THEN
3027: l_act_budgets_rec.approved_amount := 0;
3022: --//Copied the following code from above to rectify Scan Data offer activation issue (+)
3023: IF l_act_budgets_rec.request_amount IS NULL OR l_act_budgets_rec.request_amount = FND_API.G_MISS_NUM THEN
3024: l_act_budgets_rec.request_amount := 0;
3025: END IF;
3026: IF l_act_budgets_rec.approved_amount IS NULL OR l_act_budgets_rec.approved_amount = FND_API.G_MISS_NUM THEN
3027: l_act_budgets_rec.approved_amount := 0;
3028: END IF;
3029: IF l_act_budgets_rec.approved_original_amount IS NULL OR l_act_budgets_rec.approved_original_amount = FND_API.G_MISS_NUM THEN
3030: l_act_budgets_rec.approved_original_amount := 0;
3025: END IF;
3026: IF l_act_budgets_rec.approved_amount IS NULL OR l_act_budgets_rec.approved_amount = FND_API.G_MISS_NUM THEN
3027: l_act_budgets_rec.approved_amount := 0;
3028: END IF;
3029: IF l_act_budgets_rec.approved_original_amount IS NULL OR l_act_budgets_rec.approved_original_amount = FND_API.G_MISS_NUM THEN
3030: l_act_budgets_rec.approved_original_amount := 0;
3031: END IF;
3032: IF l_fc_amount IS NULL OR l_fc_amount = FND_API.G_MISS_NUM THEN
3033: l_fc_amount := 0;
3028: END IF;
3029: IF l_act_budgets_rec.approved_original_amount IS NULL OR l_act_budgets_rec.approved_original_amount = FND_API.G_MISS_NUM THEN
3030: l_act_budgets_rec.approved_original_amount := 0;
3031: END IF;
3032: IF l_fc_amount IS NULL OR l_fc_amount = FND_API.G_MISS_NUM THEN
3033: l_fc_amount := 0;
3034: END IF;
3035: IF l_act_budgets_rec.parent_src_apprvd_amt IS NULL OR l_act_budgets_rec.parent_src_apprvd_amt = FND_API.G_MISS_NUM THEN
3036: l_act_budgets_rec.parent_src_apprvd_amt := 0;
3031: END IF;
3032: IF l_fc_amount IS NULL OR l_fc_amount = FND_API.G_MISS_NUM THEN
3033: l_fc_amount := 0;
3034: END IF;
3035: IF l_act_budgets_rec.parent_src_apprvd_amt IS NULL OR l_act_budgets_rec.parent_src_apprvd_amt = FND_API.G_MISS_NUM THEN
3036: l_act_budgets_rec.parent_src_apprvd_amt := 0;
3037: END IF;
3038: IF l_src_curr_request_amt IS NULL OR l_src_curr_request_amt = FND_API.G_MISS_NUM THEN
3039: l_src_curr_request_amt := 0;
3034: END IF;
3035: IF l_act_budgets_rec.parent_src_apprvd_amt IS NULL OR l_act_budgets_rec.parent_src_apprvd_amt = FND_API.G_MISS_NUM THEN
3036: l_act_budgets_rec.parent_src_apprvd_amt := 0;
3037: END IF;
3038: IF l_src_curr_request_amt IS NULL OR l_src_curr_request_amt = FND_API.G_MISS_NUM THEN
3039: l_src_curr_request_amt := 0;
3040: END IF;
3041: --//rectify Scan Data offer activation issue (-)
3042:
3162:
3163: END IF;
3164:
3165: IF l_act_budgets_rec.COMMENT IS NOT NULL
3166: AND l_act_budgets_rec.COMMENT <> fnd_api.g_miss_char THEN
3167: OZF_ACTBUDGETRULES_PVT.create_note (
3168: p_activity_type=> 'FREQ'
3169: ,p_activity_id=> l_act_budgets_rec.activity_budget_id
3170: ,p_note=> l_act_budgets_rec.COMMENT
3177: ,x_msg_data=> x_msg_data
3178: ,x_return_status=> l_return_status
3179: );
3180:
3181: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3182: RAISE fnd_api.g_exc_error;
3183: END IF;
3184: END IF;
3185:
3178: ,x_return_status=> l_return_status
3179: );
3180:
3181: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3182: RAISE fnd_api.g_exc_error;
3183: END IF;
3184: END IF;
3185:
3186: IF l_act_budgets_rec.justification IS NOT NULL
3183: END IF;
3184: END IF;
3185:
3186: IF l_act_budgets_rec.justification IS NOT NULL
3187: AND l_act_budgets_rec.justification <> fnd_api.g_miss_char THEN
3188: OZF_ACTBUDGETRULES_PVT.create_note (
3189: p_activity_type=> 'FREQ'
3190: ,p_activity_id=> l_act_budgets_rec.activity_budget_id
3191: ,p_note=> l_act_budgets_rec.justification
3198: ,x_msg_data=> x_msg_data
3199: ,x_return_status=> l_return_status
3200: );
3201:
3202: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3203: RAISE fnd_api.g_exc_error;
3204: END IF;
3205: END IF;
3206:
3199: ,x_return_status=> l_return_status
3200: );
3201:
3202: IF l_return_status <> fnd_api.g_ret_sts_success THEN
3203: RAISE fnd_api.g_exc_error;
3204: END IF;
3205: END IF;
3206:
3207: -- 06/25/2001 mpande changed
3253: ,x_utilization_id => x_utilization_id --nirprasa - added for Bug 9383565
3254: );
3255:
3256:
3257: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3258: RAISE fnd_api.g_exc_unexpected_error;
3259: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
3260: RAISE fnd_api.g_exc_error;
3261: END IF;
3254: );
3255:
3256:
3257: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3258: RAISE fnd_api.g_exc_unexpected_error;
3259: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
3260: RAISE fnd_api.g_exc_error;
3261: END IF;
3262: END IF; --l_act_budgets_rec.transfer_type = 'UTILIZED'
3255:
3256:
3257: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3258: RAISE fnd_api.g_exc_unexpected_error;
3259: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
3260: RAISE fnd_api.g_exc_error;
3261: END IF;
3262: END IF; --l_act_budgets_rec.transfer_type = 'UTILIZED'
3263:
3256:
3257: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3258: RAISE fnd_api.g_exc_unexpected_error;
3259: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
3260: RAISE fnd_api.g_exc_error;
3261: END IF;
3262: END IF; --l_act_budgets_rec.transfer_type = 'UTILIZED'
3263:
3264: IF (l_act_budgets_rec.budget_source_type ='CAMP' AND l_act_budgets_rec.arc_act_budget_used_by = 'CSCH') OR
3277: p_exchange_rate_type => l_exchange_rate_type
3278: );
3279:
3280:
3281: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3282: RAISE fnd_api.g_exc_unexpected_error;
3283: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
3284: RAISE fnd_api.g_exc_error;
3285: END IF;
3278: );
3279:
3280:
3281: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3282: RAISE fnd_api.g_exc_unexpected_error;
3283: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
3284: RAISE fnd_api.g_exc_error;
3285: END IF;
3286:
3279:
3280:
3281: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3282: RAISE fnd_api.g_exc_unexpected_error;
3283: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
3284: RAISE fnd_api.g_exc_error;
3285: END IF;
3286:
3287: END IF;
3280:
3281: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3282: RAISE fnd_api.g_exc_unexpected_error;
3283: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
3284: RAISE fnd_api.g_exc_error;
3285: END IF;
3286:
3287: END IF;
3288:
3300: -- initiate WF approval and return; WF will
3301: -- call an API to update the relevent columns.
3302:
3303: -- check to see if commit is needed before returning
3304: IF fnd_api.to_boolean (p_commit) THEN
3305: COMMIT WORK;
3306: END IF;
3307:
3308: RETURN;
3333:
3334: -- END of API body.
3335: --
3336: -- Standard check of p_commit.
3337: IF fnd_api.to_boolean (p_commit) THEN
3338: COMMIT WORK;
3339: END IF;
3340:
3341: -- Standard call to get message count AND IF count is 1, get message info.
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;
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
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
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: );
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;
3352: p_count=> x_msg_count
3353: ,p_data=> x_msg_data
3354: ,p_encoded=> fnd_api.g_false
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
3354: ,p_encoded=> fnd_api.g_false
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
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;
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 (
3373: p_count=> x_msg_count
3374: ,p_data=> x_msg_data
3375: ,p_encoded=> fnd_api.g_false
3376: );
3377: END update_act_budgets;
3378:
3379:
3392: -- End of Comments
3393: /*****************************************************************************************/
3394: PROCEDURE delete_act_budgets (
3395: p_api_version IN NUMBER
3396: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3397: ,p_commit IN VARCHAR2 := fnd_api.g_false
3398: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
3399: ,x_return_status OUT NOCOPY VARCHAR2
3400: ,x_msg_count OUT NOCOPY NUMBER
3393: /*****************************************************************************************/
3394: PROCEDURE delete_act_budgets (
3395: p_api_version IN NUMBER
3396: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3397: ,p_commit IN VARCHAR2 := fnd_api.g_false
3398: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
3399: ,x_return_status OUT NOCOPY VARCHAR2
3400: ,x_msg_count OUT NOCOPY NUMBER
3401: ,x_msg_data OUT NOCOPY VARCHAR2
3394: PROCEDURE delete_act_budgets (
3395: p_api_version IN NUMBER
3396: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3397: ,p_commit IN VARCHAR2 := fnd_api.g_false
3398: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
3399: ,x_return_status OUT NOCOPY VARCHAR2
3400: ,x_msg_count OUT NOCOPY NUMBER
3401: ,x_msg_data OUT NOCOPY VARCHAR2
3402: ,p_act_budget_id IN NUMBER
3418: -- Standard Start of API savepoint
3419: SAVEPOINT delete_act_budgets_pvt;
3420:
3421: -- Standard call to check for call compatibility.
3422: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_package_name) THEN
3423: RAISE fnd_api.g_exc_unexpected_error;
3424: END IF;
3425:
3426: -- Initialize message list IF p_init_msg_list is set to TRUE.
3419: SAVEPOINT delete_act_budgets_pvt;
3420:
3421: -- Standard call to check for call compatibility.
3422: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_package_name) THEN
3423: RAISE fnd_api.g_exc_unexpected_error;
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
3423: RAISE fnd_api.g_exc_unexpected_error;
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
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;
3433: --
3434: -- API body
3435: --
3436:
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;
3449:
3450: -- Perform the database operation
3451: -- Delete header data
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;
3467:
3468: --
3469: -- END of API body.
3468: --
3469: -- END of API body.
3470: --
3471: -- Standard check of p_commit.
3472: IF fnd_api.to_boolean (p_commit) THEN
3473: COMMIT WORK;
3474: END IF;
3475:
3476: -- Standard call to get message count AND IF count is 1, get message info.
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;
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
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
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: );
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;
3487: p_count=> x_msg_count
3488: ,p_data=> x_msg_data
3489: ,p_encoded=> fnd_api.g_false
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
3489: ,p_encoded=> fnd_api.g_false
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
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;
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 (
3508: p_count=> x_msg_count
3509: ,p_data=> x_msg_data
3510: ,p_encoded=> fnd_api.g_false
3511: );
3512: END delete_act_budgets;
3513:
3514:
3526: -- End of Comments
3527: /*****************************************************************************************/
3528: PROCEDURE lock_act_budgets (
3529: p_api_version IN NUMBER
3530: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3531: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
3532: ,x_return_status OUT NOCOPY VARCHAR2
3533: ,x_msg_count OUT NOCOPY NUMBER
3534: ,x_msg_data OUT NOCOPY VARCHAR2
3527: /*****************************************************************************************/
3528: PROCEDURE lock_act_budgets (
3529: p_api_version IN NUMBER
3530: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3531: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
3532: ,x_return_status OUT NOCOPY VARCHAR2
3533: ,x_msg_count OUT NOCOPY NUMBER
3534: ,x_msg_data OUT NOCOPY VARCHAR2
3535: ,p_act_budget_id IN NUMBER
3548: AND object_version_number = p_object_version
3549: FOR UPDATE OF activity_budget_id NOWAIT;
3550: BEGIN
3551: -- Standard call to check for call compatibility.
3552: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_package_name) THEN
3553: RAISE fnd_api.g_exc_unexpected_error;
3554: END IF;
3555:
3556: -- Initialize message list if p_init_msg_list is set to TRUE.
3549: FOR UPDATE OF activity_budget_id NOWAIT;
3550: BEGIN
3551: -- Standard call to check for call compatibility.
3552: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_package_name) THEN
3553: RAISE fnd_api.g_exc_unexpected_error;
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
3553: RAISE fnd_api.g_exc_unexpected_error;
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
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;
3563: --
3564: -- API body
3565: --
3566: -- Perform the database operation
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;
3582:
3583: CLOSE c_act_budget;
3584: --
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: );
3593: EXCEPTION
3594: WHEN fnd_api.g_exc_error THEN
3595: x_return_status := fnd_api.g_ret_sts_error;
3590: ,p_data=> x_msg_data
3591: ,p_encoded=> fnd_api.g_false
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
3591: ,p_encoded=> fnd_api.g_false
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
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: );
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 (
3597: p_count=> x_msg_count
3598: ,p_data=> x_msg_data
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
3598: ,p_data=> x_msg_data
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
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: );
3608: WHEN ozf_utility_pvt.resource_locked THEN
3609: x_return_status := fnd_api.g_ret_sts_error;
3610:
3605: ,p_data=> x_msg_data
3606: ,p_encoded=> fnd_api.g_false
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;
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: );
3621: WHEN OTHERS THEN
3622: x_return_status := fnd_api.g_ret_sts_unexp_error;
3623:
3618: ,p_data=> x_msg_data
3619: ,p_encoded=> fnd_api.g_false
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 (
3629: p_count=> x_msg_count
3630: ,p_data=> x_msg_data
3631: ,p_encoded=> fnd_api.g_false
3632: );
3633: END lock_act_budgets;
3634:
3635:
3647: -- End of Comments
3648: /*****************************************************************************************/
3649: PROCEDURE validate_act_budgets (
3650: p_api_version IN NUMBER
3651: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3652: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
3653: ,x_return_status OUT NOCOPY VARCHAR2
3654: ,x_msg_count OUT NOCOPY NUMBER
3655: ,x_msg_data OUT NOCOPY VARCHAR2
3648: /*****************************************************************************************/
3649: PROCEDURE validate_act_budgets (
3650: p_api_version IN NUMBER
3651: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
3652: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
3653: ,x_return_status OUT NOCOPY VARCHAR2
3654: ,x_msg_count OUT NOCOPY NUMBER
3655: ,x_msg_data OUT NOCOPY VARCHAR2
3656: ,p_act_budgets_rec IN act_budgets_rec_type
3665: l_act_budgets_rec act_budgets_rec_type := p_act_budgets_rec;
3666: l_act_budget_id NUMBER;
3667: BEGIN
3668: -- Standard call to check for call compatibility.
3669: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_package_name) THEN
3670: RAISE fnd_api.g_exc_unexpected_error;
3671: END IF;
3672:
3673: -- Initialize message list if p_init_msg_list is set to TRUE.
3666: l_act_budget_id NUMBER;
3667: BEGIN
3668: -- Standard call to check for call compatibility.
3669: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_package_name) THEN
3670: RAISE fnd_api.g_exc_unexpected_error;
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
3670: RAISE fnd_api.g_exc_unexpected_error;
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
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;
3680: --
3681: -- API body
3682: --
3683: IF G_DEBUG THEN
3692: ,x_return_status=> l_return_status
3693: );
3694:
3695: -- If any errors happen abort API.
3696: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3697: RAISE fnd_api.g_exc_unexpected_error;
3698: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
3699: RAISE fnd_api.g_exc_error;
3700: END IF;
3693: );
3694:
3695: -- If any errors happen abort API.
3696: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3697: RAISE fnd_api.g_exc_unexpected_error;
3698: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
3699: RAISE fnd_api.g_exc_error;
3700: END IF;
3701: END IF;
3694:
3695: -- If any errors happen abort API.
3696: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3697: RAISE fnd_api.g_exc_unexpected_error;
3698: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
3699: RAISE fnd_api.g_exc_error;
3700: END IF;
3701: END IF;
3702:
3695: -- If any errors happen abort API.
3696: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3697: RAISE fnd_api.g_exc_unexpected_error;
3698: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
3699: RAISE fnd_api.g_exc_error;
3700: END IF;
3701: END IF;
3702:
3703: -- Perform cross attribute validation and missing attribute checks. Record
3714: ,x_return_status=> l_return_status
3715: );
3716:
3717: -- If any errors happen abort API.
3718: IF l_return_status = fnd_api.g_ret_sts_error THEN
3719: RAISE fnd_api.g_exc_error;
3720: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3721: RAISE fnd_api.g_exc_unexpected_error;
3722: END IF;
3715: );
3716:
3717: -- If any errors happen abort API.
3718: IF l_return_status = fnd_api.g_ret_sts_error THEN
3719: RAISE fnd_api.g_exc_error;
3720: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3721: RAISE fnd_api.g_exc_unexpected_error;
3722: END IF;
3723: END IF;
3716:
3717: -- If any errors happen abort API.
3718: IF l_return_status = fnd_api.g_ret_sts_error THEN
3719: RAISE fnd_api.g_exc_error;
3720: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3721: RAISE fnd_api.g_exc_unexpected_error;
3722: END IF;
3723: END IF;
3724:
3717: -- If any errors happen abort API.
3718: IF l_return_status = fnd_api.g_ret_sts_error THEN
3719: RAISE fnd_api.g_exc_error;
3720: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
3721: RAISE fnd_api.g_exc_unexpected_error;
3722: END IF;
3723: END IF;
3724:
3725:
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: );
3735: EXCEPTION
3732: ,p_count=> x_msg_count
3733: ,p_data=> x_msg_data
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
3733: ,p_data=> x_msg_data
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
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: );
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 (
3739: p_count=> x_msg_count
3740: ,p_data=> x_msg_data
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
3740: ,p_data=> x_msg_data
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
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: );
3750: WHEN OTHERS THEN
3751: x_return_status := fnd_api.g_ret_sts_unexp_error;
3752:
3747: ,p_data=> x_msg_data
3748: ,p_encoded=> fnd_api.g_false
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 (
3758: p_count=> x_msg_count
3759: ,p_data=> x_msg_data
3760: ,p_encoded=> fnd_api.g_false
3761: );
3762: END validate_act_budgets;
3763:
3764:
3784: l_pk_name VARCHAR2 (30);
3785: l_pk_value VARCHAR2 (30);
3786: BEGIN
3787: -- Initialize API/Procedure return status to success
3788: x_return_status := fnd_api.g_ret_sts_success;
3789:
3790: -- Check required parameters
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
3787: -- Initialize API/Procedure return status to success
3788: x_return_status := fnd_api.g_ret_sts_success;
3789:
3790: -- Check required parameters
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:
3800: x_return_status := fnd_api.g_ret_sts_error;
3801: -- If any error happens abort API.
3802: RETURN;
3803: END IF;
3804:
3802: RETURN;
3803: END IF;
3804:
3805: --- budget sourrce id
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:
3815: x_return_status := fnd_api.g_ret_sts_error;
3816: -- If any error happens abort API.
3817: RETURN;
3818: END IF;
3819:
3817: RETURN;
3818: END IF;
3819:
3820: -- budget source type
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:
3830: x_return_status := fnd_api.g_ret_sts_error;
3831: -- If any error happens abort API.
3832: RETURN;
3833: END IF;
3834:
3832: RETURN;
3833: END IF;
3834:
3835: -- transfer type
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:
3845: x_return_status := fnd_api.g_ret_sts_error;
3846: -- If any error happens abort API.
3847: RETURN;
3848: END IF;
3849:
3847: RETURN;
3848: END IF;
3849:
3850: -- arc_act_budget_used_by
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:
3860: x_return_status := fnd_api.g_ret_sts_error;
3861: -- If any error happens abort API.
3862: RETURN;
3863: END IF;
3864:
3867: -- cannot be updated, so failure condition should
3868: -- only happen during create.
3869:
3870: IF ( p_act_budgets_rec.request_currency IS NULL
3871: OR p_act_budgets_rec.request_currency = fnd_api.g_miss_char
3872: ) THEN
3873: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
3874: x_return_status := fnd_api.g_ret_sts_error;
3875: RETURN;
3870: IF ( p_act_budgets_rec.request_currency IS NULL
3871: OR p_act_budgets_rec.request_currency = fnd_api.g_miss_char
3872: ) THEN
3873: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
3874: x_return_status := fnd_api.g_ret_sts_error;
3875: RETURN;
3876: END IF;
3877: -- Validate uniqueness
3878: IF p_validation_mode = jtf_plsql_api.g_create
3880: IF ozf_utility_pvt.check_uniqueness (
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;
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;
3892: END IF;
3893: END IF;
3894:
3895: --
3896: -- check for lookups....arc_act_budget_used_by
3897: -- TO DO: check ozf object in ozf lookup OZF_SYS_ARC_QUALIFIER, ams object in ams lookup AMS_SYS_ARC_QUALIFIER
3898:
3899: IF p_act_budgets_rec.arc_act_budget_used_by <> fnd_api.g_miss_char THEN
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
3899: IF p_act_budgets_rec.arc_act_budget_used_by <> fnd_api.g_miss_char THEN
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;
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;
3912: END IF;
3913: END IF;
3914:
3914:
3915: --
3916: -- check for lookups....BUDGET_SOURCE_TYPE
3917: --
3918: IF p_act_budgets_rec.budget_source_type <> fnd_api.g_miss_char THEN
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
3918: IF p_act_budgets_rec.budget_source_type <> fnd_api.g_miss_char THEN
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;
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;
3930: END IF;
3931: END IF;
3932:
3933: --
3934: -- Begin Validate Referential
3935: --
3936: -- Check FK parameter: act_budget_used_by_id #1
3937: IF p_act_budgets_rec.act_budget_used_by_id <> fnd_api.g_miss_num THEN
3938: IF p_act_budgets_rec.arc_act_budget_used_by = ('EVEH') THEN
3939: l_table_name := 'AMS_EVENT_HEADERS_VL';
3940: l_pk_name := 'EVENT_HEADER_ID';
3941: ELSIF p_act_budgets_rec.arc_act_budget_used_by IN ( 'EVEO','EONE') THEN
3979: IF ozf_utility_pvt.check_fk_exists (
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;
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.
3991: RETURN;
3992: END IF; -- check_fk_exists
3993: END IF;
3993: END IF;
3994:
3995: -- Check FK parameter: BUDGET_SOURCE_ID #2
3996: -- Partner funds will not have a budget source ID
3997: IF p_act_budgets_rec.budget_source_id <> fnd_api.g_miss_num
3998: AND p_act_budgets_rec.budget_source_id IS NOT NULL THEN
3999: IF p_act_budgets_rec.budget_source_type = 'EVEH' THEN
4000: l_table_name := 'AMS_EVENT_HEADERS_VL';
4001: l_pk_name := 'EVENT_HEADER_ID';
4032: OR p_act_budgets_rec.budget_source_type = 'PRIC' THEN
4033: l_table_name := 'QP_LIST_HEADERS_ALL_B'; -- Fix for bug # 14724414
4034: l_pk_name := 'LIST_HEADER_ID';
4035: ELSIF p_act_budgets_rec.owner_id IS NOT NULL or
4036: p_act_budgets_rec.owner_id <> FND_API.g_miss_num THEN
4037: l_table_name := 'ams_jtf_rs_emp_v';
4038: l_pk_name := 'RESOURCE_ID';
4039: -- 03/21/2002 mpande added because Deliverables reconciliation was not working properly
4040: ELSIF p_act_budgets_rec.budget_source_type = 'DELV' THEN
4047: IF ozf_utility_pvt.check_fk_exists (
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;
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.
4059: RETURN;
4060: END IF; -- check_fk_exists
4061: END IF;
4067: following update on UTILIZED record failed with approver not exists error,
4068: which does not make sense.
4069:
4070: -- Check FK parameter: approver_id
4071: IF p_act_budgets_rec.approver_id <> fnd_api.g_miss_num THEN
4072: l_table_name := 'ams_jtf_rs_emp_v';
4073: l_pk_name := 'RESOURCE_ID';
4074: l_pk_value := p_act_budgets_rec.approver_id;
4075:
4076: IF ozf_utility_pvt.check_fk_exists (
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;
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.
4088: RETURN;
4089: END IF; -- check_fk_exists
4090: END IF;
4089: END IF; -- check_fk_exists
4090: END IF;
4091:
4092: -- Check FK parameter: approver_id
4093: IF p_act_budgets_rec.requester_id <> fnd_api.g_miss_num THEN
4094: l_table_name := 'ams_jtf_rs_emp_v';
4095: l_pk_name := 'RESOURCE_ID';
4096: l_pk_value := p_act_budgets_rec.requester_id;
4097:
4098: IF ozf_utility_pvt.check_fk_exists (
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;
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.
4110: RETURN;
4111: END IF; -- check_fk_exists
4112: END IF;
4147: -- Status Local Variables
4148: l_return_status VARCHAR2 (1); -- Return value from procedures
4149: l_owner_currency VARCHAR2 (15);
4150: -- flag indicating it is a fund to fund transfer.
4151: l_fund_transfer_flag VARCHAR2 (1) := fnd_api.g_false;
4152: l_check_amount NUMBER := 0 ;
4153: l_old_approved_amount NUMBER := 0 ;
4154: l_dummy VARCHAR2(3);
4155: l_exc_util_check VARCHAR2(1):= 'F';
4188:
4189:
4190: BEGIN
4191: -- Standard call to check for call compatibility.
4192: IF NOT fnd_api.compatible_api_call (l_api_version, l_api_version, l_api_name, g_package_name) THEN
4193: RAISE fnd_api.g_exc_unexpected_error;
4194: END IF;
4195:
4196: -- Initialize API return status to success
4189:
4190: BEGIN
4191: -- Standard call to check for call compatibility.
4192: IF NOT fnd_api.compatible_api_call (l_api_version, l_api_version, l_api_name, g_package_name) THEN
4193: RAISE fnd_api.g_exc_unexpected_error;
4194: END IF;
4195:
4196: -- Initialize API return status to success
4197: x_return_status := fnd_api.g_ret_sts_success;
4193: RAISE fnd_api.g_exc_unexpected_error;
4194: END IF;
4195:
4196: -- Initialize API return status to success
4197: x_return_status := fnd_api.g_ret_sts_success;
4198:
4199: --
4200: -- API body
4201: /****************** commented by mpande 02/10/2001 only for INternal rollout*************
4202: /****************** changed by mpande**********************
4203: ---budget requested amount should always be positive be it credit or debit transaction --
4204: IF NVL(p_act_budgets_rec.request_amount,0) <= 0 THEN
4205: OZF_Utility_PVT.error_message ('OZF_ACT_BUDG_NEG_REQUEST');
4206: x_return_status := FND_API.g_ret_sts_error;
4207: END IF;
4208: ********************************************************************************************/
4209:
4210: -- 22-Feb-2001 mpande
4225: -- fixed by feliu on 02/02/2006.
4226: IF p_act_budgets_rec.transfer_type <> 'UTILIZED' THEN
4227: IF NVL (p_act_budgets_rec.request_amount, 0) <0 THEN
4228: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NEG_REQUEST');
4229: x_return_status := fnd_api.g_ret_sts_error;
4230: END IF;
4231: END IF;
4232: -- END IF;
4233:
4235: --budget spent amount cannot be greateer than the approved amount
4236: /* 03/01/2002 mpande commented this is not there any more
4237: IF NVL (p_act_budgets_rec.spent_amount, 0) > NVL (p_act_budgets_rec.approved_amount, 0) THEN
4238: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_EXCESS_SPENT');
4239: x_return_status := fnd_api.g_ret_sts_error;
4240: END IF;
4241: */
4242:
4243: -- 04/10/2001 mpande Hornet changes
4242:
4243: -- 04/10/2001 mpande Hornet changes
4244: IF p_act_budgets_rec.arc_act_budget_used_by = 'FUND'
4245: AND p_act_budgets_rec.budget_source_type = 'FUND' THEN
4246: l_fund_transfer_flag := fnd_api.g_true;
4247: END IF;
4248:
4249: IF l_fund_transfer_flag = fnd_api.g_false THEN
4250: -- only utilized records could be updated. transfer, request cannot be updated
4245: AND p_act_budgets_rec.budget_source_type = 'FUND' THEN
4246: l_fund_transfer_flag := fnd_api.g_true;
4247: END IF;
4248:
4249: IF l_fund_transfer_flag = fnd_api.g_false THEN
4250: -- only utilized records could be updated. transfer, request cannot be updated
4251: IF p_validation_mode = jtf_plsql_api.g_update THEN
4252: OPEN c_current_amount;
4253: FETCH c_current_amount INTO l_old_approved_amount;
4254:
4255: IF c_current_amount%NOTFOUND THEN
4256: CLOSE c_current_amount;
4257: ozf_utility_pvt.error_message ('OZF_API_RECORD_NOT_FOUND');
4258: RAISE fnd_api.g_exc_unexpected_error;
4259: END IF;
4260:
4261: CLOSE c_current_amount;
4262: END IF;
4290: CLOSE c_get_budget_ledger_id;
4291:
4292: IF NVL(l_budgetLedger, 0) <> 0 AND NVL(l_budgetLedger, 0) <> l_offerLedger THEN
4293: ozf_utility_pvt.error_message ('OZF_BUDGET_OFFR_LEDG_MISMATCH');
4294: x_return_status := fnd_api.g_ret_sts_error;
4295: RAISE fnd_api.g_exc_error;
4296: END IF;
4297:
4298: END IF;
4291:
4292: IF NVL(l_budgetLedger, 0) <> 0 AND NVL(l_budgetLedger, 0) <> l_offerLedger THEN
4293: ozf_utility_pvt.error_message ('OZF_BUDGET_OFFR_LEDG_MISMATCH');
4294: x_return_status := fnd_api.g_ret_sts_error;
4295: RAISE fnd_api.g_exc_error;
4296: END IF;
4297:
4298: END IF;
4299: END IF;
4357: ,l_return_status
4358: );
4359: END IF;
4360:
4361: IF l_return_status <> fnd_api.g_ret_sts_success THEN
4362: x_return_status := fnd_api.g_ret_sts_error;
4363: END IF;
4364: -- donot check for utilized and transfer records -- they are not souring 08/09/2001 mpande
4365: -- Request amount can not more than estimated amount when object is DRAFT status.
4358: );
4359: END IF;
4360:
4361: IF l_return_status <> fnd_api.g_ret_sts_success THEN
4362: x_return_status := fnd_api.g_ret_sts_error;
4363: END IF;
4364: -- donot check for utilized and transfer records -- they are not souring 08/09/2001 mpande
4365: -- Request amount can not more than estimated amount when object is DRAFT status.
4366: -- don't validate for child records from sourcing from parent.
4370: p_object_type=> p_act_budgets_rec.arc_act_budget_used_by
4371: ,p_object_id=> p_act_budgets_rec.act_budget_used_by_id
4372: ,p_request_amount=> p_act_budgets_rec.request_amount
4373: ,p_act_budget_id=> p_act_budgets_rec.activity_budget_id
4374: ) = fnd_api.g_false THEN
4375: ozf_utility_pvt.error_message ( 'OZF_ACT_BUDG_EXC_OBJ_AMT');
4376: x_return_status := fnd_api.g_ret_sts_error;
4377: END IF;
4378: END IF ;
4372: ,p_request_amount=> p_act_budgets_rec.request_amount
4373: ,p_act_budget_id=> p_act_budgets_rec.activity_budget_id
4374: ) = fnd_api.g_false THEN
4375: ozf_utility_pvt.error_message ( 'OZF_ACT_BUDG_EXC_OBJ_AMT');
4376: x_return_status := fnd_api.g_ret_sts_error;
4377: END IF;
4378: END IF ;
4379:
4380: --- we will match activity and category for others also later
4387: ,p_act_budgets_rec.budget_source_id
4388: ,l_return_status
4389: );
4390:
4391: IF l_return_status <> fnd_api.g_ret_sts_success THEN
4392: x_return_status := fnd_api.g_ret_sts_error;
4393: END IF;
4394: END IF; */
4395: -- 10/30/2001 mpande commented prod and market validation
4388: ,l_return_status
4389: );
4390:
4391: IF l_return_status <> fnd_api.g_ret_sts_success THEN
4392: x_return_status := fnd_api.g_ret_sts_error;
4393: END IF;
4394: END IF; */
4395: -- 10/30/2001 mpande commented prod and market validation
4396: -- as per Leela.
4402: ,p_act_budgets_rec.budget_source_id
4403: ,l_return_status
4404: );
4405:
4406: IF l_return_status <> fnd_api.g_ret_sts_success THEN
4407: x_return_status := fnd_api.g_ret_sts_error;
4408: ELSE
4409: /* yzhao: 07/20/2001 check product eligibility
4410: OZF_ACTBUDGETRULES_PVT.check_prod_elig_match (
4403: ,l_return_status
4404: );
4405:
4406: IF l_return_status <> fnd_api.g_ret_sts_success THEN
4407: x_return_status := fnd_api.g_ret_sts_error;
4408: ELSE
4409: /* yzhao: 07/20/2001 check product eligibility
4410: OZF_ACTBUDGETRULES_PVT.check_prod_elig_match (
4411: p_act_budgets_rec.act_budget_used_by_id,
4413: p_act_budgets_rec.budget_source_id,
4414: l_return_status
4415: );
4416:
4417: IF l_return_status <> fnd_api.g_ret_sts_success THEN
4418: x_return_status := fnd_api.g_ret_sts_error;
4419: END IF;
4420: END IF;
4421: END IF;
4414: l_return_status
4415: );
4416:
4417: IF l_return_status <> fnd_api.g_ret_sts_success THEN
4418: x_return_status := fnd_api.g_ret_sts_error;
4419: END IF;
4420: END IF;
4421: END IF;
4422: */
4427: IF p_act_budgets_rec.transfer_type NOT IN ('UTILIZED', 'RELEASE', 'RESERVE') THEN
4428: IF p_act_budgets_rec.arc_act_budget_used_by = p_act_budgets_rec.budget_source_type THEN
4429: IF p_act_budgets_rec.act_budget_used_by_id = p_act_budgets_rec.budget_source_id THEN
4430: ozf_utility_pvt.error_message ('OZF_FROM_TO_TRANSFER_SAME');
4431: x_return_status := fnd_api.g_ret_sts_error;
4432: END IF;
4433: END IF;
4434: END IF;
4435: -- put in checks for date: required by date cannot be less than sysdate
4434: END IF;
4435: -- put in checks for date: required by date cannot be less than sysdate
4436:
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;
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:
4446: --
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;
4489:
4490: CLOSE c_budget;
4491:
4493: -- Usually, object_version_number is required from API calls,
4494: -- but this exception is made because approvals and rejections
4495: -- do not have to be synced to the screen record. The same
4496: -- may apply for account closing.
4497: IF p_act_budgets_rec.object_version_number = fnd_api.g_miss_num THEN
4498: x_act_budgets_rec.object_version_number := NULL;
4499: END IF;
4500: IF p_act_budgets_rec.object_version_number IS NULL THEN
4501: x_act_budgets_rec.object_version_number := l_act_budgets_rec.object_version_number;
4500: IF p_act_budgets_rec.object_version_number IS NULL THEN
4501: x_act_budgets_rec.object_version_number := l_act_budgets_rec.object_version_number;
4502: END IF;
4503:
4504: IF p_act_budgets_rec.act_budget_used_by_id = fnd_api.g_miss_num THEN
4505: x_act_budgets_rec.act_budget_used_by_id := NULL;
4506: END IF;
4507: IF p_act_budgets_rec.act_budget_used_by_id IS NULL THEN
4508: x_act_budgets_rec.act_budget_used_by_id := l_act_budgets_rec.act_budget_used_by_id;
4507: IF p_act_budgets_rec.act_budget_used_by_id IS NULL THEN
4508: x_act_budgets_rec.act_budget_used_by_id := l_act_budgets_rec.act_budget_used_by_id;
4509: END IF;
4510:
4511: IF p_act_budgets_rec.arc_act_budget_used_by = fnd_api.g_miss_char THEN
4512: x_act_budgets_rec.arc_act_budget_used_by := NULL;
4513: END IF;
4514: IF p_act_budgets_rec.arc_act_budget_used_by IS NULL THEN
4515: x_act_budgets_rec.arc_act_budget_used_by := l_act_budgets_rec.arc_act_budget_used_by;
4514: IF p_act_budgets_rec.arc_act_budget_used_by IS NULL THEN
4515: x_act_budgets_rec.arc_act_budget_used_by := l_act_budgets_rec.arc_act_budget_used_by;
4516: END IF;
4517:
4518: IF p_act_budgets_rec.budget_source_type = fnd_api.g_miss_char THEN
4519: x_act_budgets_rec.budget_source_type := NULL;
4520: END IF;
4521: IF p_act_budgets_rec.budget_source_type IS NULL THEN
4522: x_act_budgets_rec.budget_source_type := l_act_budgets_rec.budget_source_type;
4521: IF p_act_budgets_rec.budget_source_type IS NULL THEN
4522: x_act_budgets_rec.budget_source_type := l_act_budgets_rec.budget_source_type;
4523: END IF;
4524:
4525: IF p_act_budgets_rec.budget_source_id = fnd_api.g_miss_num THEN
4526: x_act_budgets_rec.budget_source_id := NULL;
4527: END IF;
4528: IF p_act_budgets_rec.budget_source_id IS NULL THEN
4529: x_act_budgets_rec.budget_source_id := l_act_budgets_rec.budget_source_id;
4528: IF p_act_budgets_rec.budget_source_id IS NULL THEN
4529: x_act_budgets_rec.budget_source_id := l_act_budgets_rec.budget_source_id;
4530: END IF;
4531:
4532: IF p_act_budgets_rec.transaction_type = fnd_api.g_miss_char THEN
4533: x_act_budgets_rec.transaction_type := NULL;
4534: END IF;
4535: IF p_act_budgets_rec.transaction_type IS NULL THEN
4536: x_act_budgets_rec.transaction_type := l_act_budgets_rec.transaction_type;
4535: IF p_act_budgets_rec.transaction_type IS NULL THEN
4536: x_act_budgets_rec.transaction_type := l_act_budgets_rec.transaction_type;
4537: END IF;
4538:
4539: IF p_act_budgets_rec.request_amount = fnd_api.g_miss_num THEN
4540: x_act_budgets_rec.request_amount := NULL;
4541: END IF;
4542: IF p_act_budgets_rec.request_amount IS NULL THEN
4543: x_act_budgets_rec.request_amount := l_act_budgets_rec.request_amount;
4542: IF p_act_budgets_rec.request_amount IS NULL THEN
4543: x_act_budgets_rec.request_amount := l_act_budgets_rec.request_amount;
4544: END IF;
4545:
4546: IF p_act_budgets_rec.request_currency = fnd_api.g_miss_char THEN
4547: x_act_budgets_rec.request_currency := NULL;
4548: END IF;
4549: IF p_act_budgets_rec.request_currency IS NULL THEN
4550: x_act_budgets_rec.request_currency := l_act_budgets_rec.request_currency;
4549: IF p_act_budgets_rec.request_currency IS NULL THEN
4550: x_act_budgets_rec.request_currency := l_act_budgets_rec.request_currency;
4551: END IF;
4552:
4553: IF p_act_budgets_rec.request_date = fnd_api.g_miss_date THEN
4554: x_act_budgets_rec.request_date := NULL;
4555: END IF;
4556: IF p_act_budgets_rec.request_date IS NULL THEN
4557: x_act_budgets_rec.request_date := l_act_budgets_rec.request_date;
4556: IF p_act_budgets_rec.request_date IS NULL THEN
4557: x_act_budgets_rec.request_date := l_act_budgets_rec.request_date;
4558: END IF;
4559:
4560: IF p_act_budgets_rec.status_code = fnd_api.g_miss_char THEN
4561: x_act_budgets_rec.status_code := NULL;
4562: END IF;
4563: IF p_act_budgets_rec.status_code IS NULL THEN
4564: x_act_budgets_rec.status_code := l_act_budgets_rec.status_code;
4563: IF p_act_budgets_rec.status_code IS NULL THEN
4564: x_act_budgets_rec.status_code := l_act_budgets_rec.status_code;
4565: END IF;
4566:
4567: IF p_act_budgets_rec.approved_amount = fnd_api.g_miss_num THEN
4568: x_act_budgets_rec.approved_amount := NULL;
4569: END IF;
4570: IF p_act_budgets_rec.approved_amount IS NULL THEN
4571: x_act_budgets_rec.approved_amount := l_act_budgets_rec.approved_amount;
4570: IF p_act_budgets_rec.approved_amount IS NULL THEN
4571: x_act_budgets_rec.approved_amount := l_act_budgets_rec.approved_amount;
4572: END IF;
4573:
4574: IF p_act_budgets_rec.approved_original_amount = fnd_api.g_miss_num THEN
4575: x_act_budgets_rec.approved_original_amount := NULL;
4576: END IF;
4577: IF p_act_budgets_rec.approved_original_amount IS NULL THEN
4578: x_act_budgets_rec.approved_original_amount := l_act_budgets_rec.approved_original_amount;
4577: IF p_act_budgets_rec.approved_original_amount IS NULL THEN
4578: x_act_budgets_rec.approved_original_amount := l_act_budgets_rec.approved_original_amount;
4579: END IF;
4580:
4581: IF p_act_budgets_rec.approved_in_currency = fnd_api.g_miss_char THEN
4582: x_act_budgets_rec.approved_in_currency := NULL;
4583: END IF;
4584: IF p_act_budgets_rec.approved_in_currency IS NULL THEN
4585: x_act_budgets_rec.approved_in_currency := l_act_budgets_rec.approved_in_currency;
4584: IF p_act_budgets_rec.approved_in_currency IS NULL THEN
4585: x_act_budgets_rec.approved_in_currency := l_act_budgets_rec.approved_in_currency;
4586: END IF;
4587:
4588: IF p_act_budgets_rec.approval_date = fnd_api.g_miss_date THEN
4589: x_act_budgets_rec.approval_date := NULL;
4590: END IF;
4591: IF p_act_budgets_rec.approval_date IS NULL THEN
4592: x_act_budgets_rec.approval_date := l_act_budgets_rec.approval_date;
4591: IF p_act_budgets_rec.approval_date IS NULL THEN
4592: x_act_budgets_rec.approval_date := l_act_budgets_rec.approval_date;
4593: END IF;
4594:
4595: IF p_act_budgets_rec.approver_id = fnd_api.g_miss_num THEN
4596: x_act_budgets_rec.approver_id := NULL;
4597: END IF;
4598: IF p_act_budgets_rec.approver_id IS NULL THEN
4599: x_act_budgets_rec.approver_id := l_act_budgets_rec.approver_id;
4598: IF p_act_budgets_rec.approver_id IS NULL THEN
4599: x_act_budgets_rec.approver_id := l_act_budgets_rec.approver_id;
4600: END IF;
4601:
4602: IF p_act_budgets_rec.spent_amount = fnd_api.g_miss_num THEN
4603: x_act_budgets_rec.spent_amount := NULL;
4604: END IF;
4605: IF p_act_budgets_rec.spent_amount IS NULL THEN
4606: x_act_budgets_rec.spent_amount := l_act_budgets_rec.spent_amount;
4605: IF p_act_budgets_rec.spent_amount IS NULL THEN
4606: x_act_budgets_rec.spent_amount := l_act_budgets_rec.spent_amount;
4607: END IF;
4608:
4609: IF p_act_budgets_rec.partner_po_number = fnd_api.g_miss_char THEN
4610: x_act_budgets_rec.partner_po_number := NULL;
4611: END IF;
4612: IF p_act_budgets_rec.partner_po_number IS NULL THEN
4613: x_act_budgets_rec.partner_po_number := l_act_budgets_rec.partner_po_number;
4612: IF p_act_budgets_rec.partner_po_number IS NULL THEN
4613: x_act_budgets_rec.partner_po_number := l_act_budgets_rec.partner_po_number;
4614: END IF;
4615:
4616: IF p_act_budgets_rec.partner_po_date = fnd_api.g_miss_date THEN
4617: x_act_budgets_rec.partner_po_date := NULL;
4618: END IF;
4619: IF p_act_budgets_rec.partner_po_date IS NULL THEN
4620: x_act_budgets_rec.partner_po_date := l_act_budgets_rec.partner_po_date;
4619: IF p_act_budgets_rec.partner_po_date IS NULL THEN
4620: x_act_budgets_rec.partner_po_date := l_act_budgets_rec.partner_po_date;
4621: END IF;
4622:
4623: IF p_act_budgets_rec.partner_po_approver = fnd_api.g_miss_char THEN
4624: x_act_budgets_rec.partner_po_approver := NULL;
4625: END IF;
4626: IF p_act_budgets_rec.partner_po_approver IS NULL THEN
4627: x_act_budgets_rec.partner_po_approver := l_act_budgets_rec.partner_po_approver;
4626: IF p_act_budgets_rec.partner_po_approver IS NULL THEN
4627: x_act_budgets_rec.partner_po_approver := l_act_budgets_rec.partner_po_approver;
4628: END IF;
4629:
4630: IF p_act_budgets_rec.posted_flag = fnd_api.g_miss_char THEN
4631: x_act_budgets_rec.posted_flag := NULL;
4632: END IF;
4633: IF p_act_budgets_rec.posted_flag IS NULL THEN
4634: x_act_budgets_rec.posted_flag := l_act_budgets_rec.posted_flag;
4633: IF p_act_budgets_rec.posted_flag IS NULL THEN
4634: x_act_budgets_rec.posted_flag := l_act_budgets_rec.posted_flag;
4635: END IF;
4636:
4637: IF p_act_budgets_rec.adjusted_flag = fnd_api.g_miss_char THEN
4638: x_act_budgets_rec.adjusted_flag := NULL;
4639: END IF;
4640: IF p_act_budgets_rec.adjusted_flag IS NULL THEN
4641: x_act_budgets_rec.adjusted_flag := l_act_budgets_rec.adjusted_flag;
4640: IF p_act_budgets_rec.adjusted_flag IS NULL THEN
4641: x_act_budgets_rec.adjusted_flag := l_act_budgets_rec.adjusted_flag;
4642: END IF;
4643:
4644: IF p_act_budgets_rec.transfer_type = fnd_api.g_miss_char THEN
4645: x_act_budgets_rec.transfer_type := NULL;
4646: END IF;
4647: IF p_act_budgets_rec.transfer_type IS NULL THEN
4648: x_act_budgets_rec.transfer_type := l_act_budgets_rec.transfer_type;
4647: IF p_act_budgets_rec.transfer_type IS NULL THEN
4648: x_act_budgets_rec.transfer_type := l_act_budgets_rec.transfer_type;
4649: END IF;
4650:
4651: IF p_act_budgets_rec.reason_code = fnd_api.g_miss_char THEN
4652: x_act_budgets_rec.reason_code := NULL;
4653: END IF;
4654: IF p_act_budgets_rec.reason_code IS NULL THEN
4655: x_act_budgets_rec.reason_code := l_act_budgets_rec.reason_code;
4654: IF p_act_budgets_rec.reason_code IS NULL THEN
4655: x_act_budgets_rec.reason_code := l_act_budgets_rec.reason_code;
4656: END IF;
4657:
4658: IF p_act_budgets_rec.requester_id = fnd_api.g_miss_num THEN
4659: x_act_budgets_rec.requester_id := NULL;
4660: END IF;
4661: IF p_act_budgets_rec.requester_id IS NULL THEN
4662: x_act_budgets_rec.requester_id := l_act_budgets_rec.requester_id;
4661: IF p_act_budgets_rec.requester_id IS NULL THEN
4662: x_act_budgets_rec.requester_id := l_act_budgets_rec.requester_id;
4663: END IF;
4664:
4665: IF p_act_budgets_rec.date_required_by = fnd_api.g_miss_date THEN
4666: x_act_budgets_rec.date_required_by := NULL;
4667: END IF;
4668: IF p_act_budgets_rec.date_required_by IS NULL THEN
4669: x_act_budgets_rec.date_required_by := l_act_budgets_rec.date_required_by;
4668: IF p_act_budgets_rec.date_required_by IS NULL THEN
4669: x_act_budgets_rec.date_required_by := l_act_budgets_rec.date_required_by;
4670: END IF;
4671:
4672: IF p_act_budgets_rec.contact_id = fnd_api.g_miss_num THEN
4673: x_act_budgets_rec.contact_id := NULL;
4674: END IF;
4675: IF p_act_budgets_rec.contact_id IS NULL THEN
4676: x_act_budgets_rec.contact_id := l_act_budgets_rec.contact_id;
4675: IF p_act_budgets_rec.contact_id IS NULL THEN
4676: x_act_budgets_rec.contact_id := l_act_budgets_rec.contact_id;
4677: END IF;
4678:
4679: IF p_act_budgets_rec.parent_act_budget_id = fnd_api.g_miss_num THEN
4680: x_act_budgets_rec.parent_act_budget_id := NULL;
4681: END IF;
4682: IF p_act_budgets_rec.parent_act_budget_id IS NULL THEN
4683: x_act_budgets_rec.parent_act_budget_id := l_act_budgets_rec.parent_act_budget_id;
4685:
4686: --kdass 24-JUN-2005 fix for bug 4440342, set parent_source_id to null so that the API get_parent_src is called
4687: /*
4688:
4689: IF p_act_budgets_rec.parent_source_id = fnd_api.g_miss_num THEN
4690: x_act_budgets_rec.parent_source_id := NULL;
4691: END IF;
4692: IF p_act_budgets_rec.parent_source_id IS NULL THEN
4693: x_act_budgets_rec.parent_source_id := l_act_budgets_rec.parent_source_id;
4693: x_act_budgets_rec.parent_source_id := l_act_budgets_rec.parent_source_id;
4694: END IF;
4695: */
4696:
4697: IF p_act_budgets_rec.src_curr_req_amt = fnd_api.g_miss_num THEN
4698: x_act_budgets_rec.src_curr_req_amt := NULL;
4699: END IF;
4700: IF p_act_budgets_rec.src_curr_req_amt IS NULL THEN
4701: x_act_budgets_rec.src_curr_req_amt := l_act_budgets_rec.src_curr_request_amt;
4701: x_act_budgets_rec.src_curr_req_amt := l_act_budgets_rec.src_curr_request_amt;
4702: END IF;
4703:
4704:
4705: IF p_act_budgets_rec.partner_holding_type = fnd_api.g_miss_char THEN
4706: x_act_budgets_rec.partner_holding_type := NULL;
4707: END IF;
4708: IF p_act_budgets_rec.partner_holding_type IS NULL THEN
4709: x_act_budgets_rec.partner_holding_type := l_act_budgets_rec.partner_holding_type;
4708: IF p_act_budgets_rec.partner_holding_type IS NULL THEN
4709: x_act_budgets_rec.partner_holding_type := l_act_budgets_rec.partner_holding_type;
4710: END IF;
4711:
4712: IF p_act_budgets_rec.partner_address_id = fnd_api.g_miss_num THEN
4713: x_act_budgets_rec.partner_address_id := NULL;
4714: END IF;
4715: IF p_act_budgets_rec.partner_address_id IS NULL THEN
4716: x_act_budgets_rec.partner_address_id := l_act_budgets_rec.partner_address_id;
4715: IF p_act_budgets_rec.partner_address_id IS NULL THEN
4716: x_act_budgets_rec.partner_address_id := l_act_budgets_rec.partner_address_id;
4717: END IF;
4718:
4719: IF p_act_budgets_rec.vendor_id = fnd_api.g_miss_num THEN
4720: x_act_budgets_rec.vendor_id := NULL;
4721: END IF;
4722: IF p_act_budgets_rec.vendor_id IS NULL THEN
4723: x_act_budgets_rec.vendor_id := l_act_budgets_rec.vendor_id;
4722: IF p_act_budgets_rec.vendor_id IS NULL THEN
4723: x_act_budgets_rec.vendor_id := l_act_budgets_rec.vendor_id;
4724: END IF;
4725:
4726: IF p_act_budgets_rec.owner_id = fnd_api.g_miss_num THEN
4727: x_act_budgets_rec.owner_id := NULL;
4728: END IF;
4729: IF p_act_budgets_rec.owner_id IS NULL THEN
4730: x_act_budgets_rec.owner_id := l_act_budgets_rec.owner_id;
4729: IF p_act_budgets_rec.owner_id IS NULL THEN
4730: x_act_budgets_rec.owner_id := l_act_budgets_rec.owner_id;
4731: END IF;
4732:
4733: IF p_act_budgets_rec.recal_flag = fnd_api.g_miss_char THEN
4734: x_act_budgets_rec.recal_flag := NULL;
4735: END IF;
4736: IF p_act_budgets_rec.recal_flag IS NULL THEN
4737: x_act_budgets_rec.recal_flag := l_act_budgets_rec.recal_flag;
4736: IF p_act_budgets_rec.recal_flag IS NULL THEN
4737: x_act_budgets_rec.recal_flag := l_act_budgets_rec.recal_flag;
4738: END IF;
4739:
4740: IF p_act_budgets_rec.attribute_category = fnd_api.g_miss_char THEN
4741: x_act_budgets_rec.attribute_category := NULL;
4742: END IF;
4743: IF p_act_budgets_rec.attribute_category IS NULL THEN
4744: x_act_budgets_rec.attribute_category := l_act_budgets_rec.attribute_category;
4743: IF p_act_budgets_rec.attribute_category IS NULL THEN
4744: x_act_budgets_rec.attribute_category := l_act_budgets_rec.attribute_category;
4745: END IF;
4746:
4747: IF p_act_budgets_rec.attribute1 = fnd_api.g_miss_char THEN
4748: x_act_budgets_rec.attribute1 := NULL;
4749: END IF;
4750: IF p_act_budgets_rec.attribute1 IS NULL THEN
4751: x_act_budgets_rec.attribute1 := l_act_budgets_rec.attribute1;
4750: IF p_act_budgets_rec.attribute1 IS NULL THEN
4751: x_act_budgets_rec.attribute1 := l_act_budgets_rec.attribute1;
4752: END IF;
4753:
4754: IF p_act_budgets_rec.attribute2 = fnd_api.g_miss_char THEN
4755: x_act_budgets_rec.attribute2 := NULL;
4756: END IF;
4757: IF p_act_budgets_rec.attribute2 IS NULL THEN
4758: x_act_budgets_rec.attribute2 := l_act_budgets_rec.attribute2;
4757: IF p_act_budgets_rec.attribute2 IS NULL THEN
4758: x_act_budgets_rec.attribute2 := l_act_budgets_rec.attribute2;
4759: END IF;
4760:
4761: IF p_act_budgets_rec.attribute3 = fnd_api.g_miss_char THEN
4762: x_act_budgets_rec.attribute3 := NULL;
4763: END IF;
4764: IF p_act_budgets_rec.attribute3 IS NULL THEN
4765: x_act_budgets_rec.attribute3 := l_act_budgets_rec.attribute3;
4764: IF p_act_budgets_rec.attribute3 IS NULL THEN
4765: x_act_budgets_rec.attribute3 := l_act_budgets_rec.attribute3;
4766: END IF;
4767:
4768: IF p_act_budgets_rec.attribute4 = fnd_api.g_miss_char THEN
4769: x_act_budgets_rec.attribute4 := NULL;
4770: END IF;
4771: IF p_act_budgets_rec.attribute4 IS NULL THEN
4772: x_act_budgets_rec.attribute4 := l_act_budgets_rec.attribute4;
4771: IF p_act_budgets_rec.attribute4 IS NULL THEN
4772: x_act_budgets_rec.attribute4 := l_act_budgets_rec.attribute4;
4773: END IF;
4774:
4775: IF p_act_budgets_rec.attribute5 = fnd_api.g_miss_char THEN
4776: x_act_budgets_rec.attribute5 := NULL;
4777: END IF;
4778: IF p_act_budgets_rec.attribute5 IS NULL THEN
4779: x_act_budgets_rec.attribute5 := l_act_budgets_rec.attribute5;
4778: IF p_act_budgets_rec.attribute5 IS NULL THEN
4779: x_act_budgets_rec.attribute5 := l_act_budgets_rec.attribute5;
4780: END IF;
4781:
4782: IF p_act_budgets_rec.attribute6 = fnd_api.g_miss_char THEN
4783: x_act_budgets_rec.attribute6 := NULL;
4784: END IF;
4785: IF p_act_budgets_rec.attribute6 IS NULL THEN
4786: x_act_budgets_rec.attribute6 := l_act_budgets_rec.attribute6;
4785: IF p_act_budgets_rec.attribute6 IS NULL THEN
4786: x_act_budgets_rec.attribute6 := l_act_budgets_rec.attribute6;
4787: END IF;
4788:
4789: IF p_act_budgets_rec.attribute7 = fnd_api.g_miss_char THEN
4790: x_act_budgets_rec.attribute7 := NULL;
4791: END IF;
4792: IF p_act_budgets_rec.attribute7 IS NULL THEN
4793: x_act_budgets_rec.attribute7 := l_act_budgets_rec.attribute7;
4792: IF p_act_budgets_rec.attribute7 IS NULL THEN
4793: x_act_budgets_rec.attribute7 := l_act_budgets_rec.attribute7;
4794: END IF;
4795:
4796: IF p_act_budgets_rec.attribute8 = fnd_api.g_miss_char THEN
4797: x_act_budgets_rec.attribute8 := NULL;
4798: END IF;
4799: IF p_act_budgets_rec.attribute8 IS NULL THEN
4800: x_act_budgets_rec.attribute8 := l_act_budgets_rec.attribute8;
4799: IF p_act_budgets_rec.attribute8 IS NULL THEN
4800: x_act_budgets_rec.attribute8 := l_act_budgets_rec.attribute8;
4801: END IF;
4802:
4803: IF p_act_budgets_rec.attribute9 = fnd_api.g_miss_char THEN
4804: x_act_budgets_rec.attribute9 := NULL;
4805: END IF;
4806: IF p_act_budgets_rec.attribute9 IS NULL THEN
4807: x_act_budgets_rec.attribute9 := l_act_budgets_rec.attribute9;
4806: IF p_act_budgets_rec.attribute9 IS NULL THEN
4807: x_act_budgets_rec.attribute9 := l_act_budgets_rec.attribute9;
4808: END IF;
4809:
4810: IF p_act_budgets_rec.attribute10 = fnd_api.g_miss_char THEN
4811: x_act_budgets_rec.attribute10 := NULL;
4812: END IF;
4813: IF p_act_budgets_rec.attribute10 IS NULL THEN
4814: x_act_budgets_rec.attribute10 := l_act_budgets_rec.attribute10;
4813: IF p_act_budgets_rec.attribute10 IS NULL THEN
4814: x_act_budgets_rec.attribute10 := l_act_budgets_rec.attribute10;
4815: END IF;
4816:
4817: IF p_act_budgets_rec.attribute11 = fnd_api.g_miss_char THEN
4818: x_act_budgets_rec.attribute11 := NULL;
4819: END IF;
4820: IF p_act_budgets_rec.attribute11 IS NULL THEN
4821: x_act_budgets_rec.attribute11 := l_act_budgets_rec.attribute11;
4820: IF p_act_budgets_rec.attribute11 IS NULL THEN
4821: x_act_budgets_rec.attribute11 := l_act_budgets_rec.attribute11;
4822: END IF;
4823:
4824: IF p_act_budgets_rec.attribute12 = fnd_api.g_miss_char THEN
4825: x_act_budgets_rec.attribute12 := NULL;
4826: END IF;
4827: IF p_act_budgets_rec.attribute12 IS NULL THEN
4828: x_act_budgets_rec.attribute12 := l_act_budgets_rec.attribute12;
4827: IF p_act_budgets_rec.attribute12 IS NULL THEN
4828: x_act_budgets_rec.attribute12 := l_act_budgets_rec.attribute12;
4829: END IF;
4830:
4831: IF p_act_budgets_rec.attribute13 = fnd_api.g_miss_char THEN
4832: x_act_budgets_rec.attribute13 := NULL;
4833: END IF;
4834: IF p_act_budgets_rec.attribute13 IS NULL THEN
4835: x_act_budgets_rec.attribute13 := l_act_budgets_rec.attribute13;
4834: IF p_act_budgets_rec.attribute13 IS NULL THEN
4835: x_act_budgets_rec.attribute13 := l_act_budgets_rec.attribute13;
4836: END IF;
4837:
4838: IF p_act_budgets_rec.attribute14 = fnd_api.g_miss_char THEN
4839: x_act_budgets_rec.attribute14 := NULL;
4840: END IF;
4841: IF p_act_budgets_rec.attribute14 IS NULL THEN
4842: x_act_budgets_rec.attribute14 := l_act_budgets_rec.attribute14;
4841: IF p_act_budgets_rec.attribute14 IS NULL THEN
4842: x_act_budgets_rec.attribute14 := l_act_budgets_rec.attribute14;
4843: END IF;
4844:
4845: IF p_act_budgets_rec.attribute15 = fnd_api.g_miss_char THEN
4846: x_act_budgets_rec.attribute15 := NULL;
4847: END IF;
4848: IF p_act_budgets_rec.attribute15 IS NULL THEN
4849: x_act_budgets_rec.attribute15 := l_act_budgets_rec.attribute15;
4848: IF p_act_budgets_rec.attribute15 IS NULL THEN
4849: x_act_budgets_rec.attribute15 := l_act_budgets_rec.attribute15;
4850: END IF;
4851: --added by feliu since 11.5.9
4852: /* IF p_act_budgets_rec.user_status_id = fnd_api.g_miss_num THEN
4853: x_act_budgets_rec.user_status_id := l_act_budgets_rec.user_status_id;
4854: END IF;
4855: */
4856: IF p_act_budgets_rec.parent_src_curr = fnd_api.g_miss_char THEN
4852: /* IF p_act_budgets_rec.user_status_id = fnd_api.g_miss_num THEN
4853: x_act_budgets_rec.user_status_id := l_act_budgets_rec.user_status_id;
4854: END IF;
4855: */
4856: IF p_act_budgets_rec.parent_src_curr = fnd_api.g_miss_char THEN
4857: x_act_budgets_rec.parent_src_curr := NULL;
4858: END IF;
4859: IF p_act_budgets_rec.parent_src_curr IS NULL THEN
4860: x_act_budgets_rec.parent_src_curr := l_act_budgets_rec.parent_src_curr;
4859: IF p_act_budgets_rec.parent_src_curr IS NULL THEN
4860: x_act_budgets_rec.parent_src_curr := l_act_budgets_rec.parent_src_curr;
4861: END IF;
4862:
4863: IF p_act_budgets_rec.parent_src_apprvd_amt = fnd_api.g_miss_num THEN
4864: x_act_budgets_rec.parent_src_apprvd_amt := NULL;
4865: END IF;
4866: IF p_act_budgets_rec.parent_src_apprvd_amt IS NULL THEN
4867: x_act_budgets_rec.parent_src_apprvd_amt := l_act_budgets_rec.parent_src_apprvd_amt;
4876: --
4877: -- NAME
4878: -- Init_Act_Budgets_Rec
4879: -- PURPOSE
4880: -- Initialize all column values to FND_API.g_miss_char/num/date
4881: -- HISTORY
4882: -- 15-Aug-2000 choang Created.
4883: -- 22-Feb-2001 mpande Modified for Hornet changes.
4884: /*****************************************************************************************/
4910: ,p_parent_process_key IN VARCHAR2
4911: ,p_parent_context IN VARCHAR2
4912: ,p_parent_approval_flag IN VARCHAR2
4913: ,p_continue_flow IN VARCHAR2
4914: ,p_child_approval_flag IN VARCHAR2 := fnd_api.g_false -- -- added 05/22/2001 mpande
4915: ,p_requestor_owner_flag IN VARCHAR2 := 'N' -- -- added 10/19/2001 mpande
4916: ,x_start_flow_flag OUT NOCOPY VARCHAR2
4917: ) IS
4918: l_budget_status_type CONSTANT VARCHAR2 (30) := 'OZF_BUDGETSOURCE_STATUS';
4960: l_approval_for_id := p_act_budget_rec.act_budget_used_by_id;
4961: l_approval_fm_id := p_act_budget_rec.budget_source_id;
4962:
4963: -- submit for budget approval
4964: IF p_child_approval_flag = fnd_api.g_false THEN
4965: -- yzhao: 03/14/2003 when p_requestor_owner_flag=Y, it is from allocation, should bypass workflow approval
4966: l_allocation_flag := p_requestor_owner_flag;
4967: ozf_fund_request_apr_pvt.create_fund_request (
4968: p_commit=> fnd_api.g_false
4964: IF p_child_approval_flag = fnd_api.g_false THEN
4965: -- yzhao: 03/14/2003 when p_requestor_owner_flag=Y, it is from allocation, should bypass workflow approval
4966: l_allocation_flag := p_requestor_owner_flag;
4967: ozf_fund_request_apr_pvt.create_fund_request (
4968: p_commit=> fnd_api.g_false
4969: ,p_approval_for_id=> l_approval_for_id
4970: ,p_requester_id=> p_act_budget_rec.requester_id
4971: ,p_requested_amount=> p_act_budget_rec.request_amount
4972: ,p_approval_fm=> 'FUND'
4987: IF l_is_requestor_owner ='N' THEN
4988: l_start_flow_flag := 'Y';
4989: END IF;
4990:
4991: IF l_return_status = fnd_api.g_ret_sts_error THEN
4992: RAISE fnd_api.g_exc_error;
4993: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4994: RAISE fnd_api.g_exc_unexpected_error;
4995: END IF;
4988: l_start_flow_flag := 'Y';
4989: END IF;
4990:
4991: IF l_return_status = fnd_api.g_ret_sts_error THEN
4992: RAISE fnd_api.g_exc_error;
4993: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4994: RAISE fnd_api.g_exc_unexpected_error;
4995: END IF;
4996:
4989: END IF;
4990:
4991: IF l_return_status = fnd_api.g_ret_sts_error THEN
4992: RAISE fnd_api.g_exc_error;
4993: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4994: RAISE fnd_api.g_exc_unexpected_error;
4995: END IF;
4996:
4997: ELSE
4990:
4991: IF l_return_status = fnd_api.g_ret_sts_error THEN
4992: RAISE fnd_api.g_exc_error;
4993: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
4994: RAISE fnd_api.g_exc_unexpected_error;
4995: END IF;
4996:
4997: ELSE
4998: -- 10/22/2001 mpande Changed code different owner allocation bug
5006: ,p_act_budget_rec.budget_source_id
5007: ,l_return_status
5008: );
5009:
5010: IF l_return_status = fnd_api.g_ret_sts_error THEN
5011: RAISE fnd_api.g_exc_error;
5012: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5013: RAISE fnd_api.g_exc_unexpected_error;
5014: END IF;
5007: ,l_return_status
5008: );
5009:
5010: IF l_return_status = fnd_api.g_ret_sts_error THEN
5011: RAISE fnd_api.g_exc_error;
5012: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5013: RAISE fnd_api.g_exc_unexpected_error;
5014: END IF;
5015:
5008: );
5009:
5010: IF l_return_status = fnd_api.g_ret_sts_error THEN
5011: RAISE fnd_api.g_exc_error;
5012: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5013: RAISE fnd_api.g_exc_unexpected_error;
5014: END IF;
5015:
5016: IF l_approved_in_currency <> p_act_budget_rec.request_currency THEN
5009:
5010: IF l_return_status = fnd_api.g_ret_sts_error THEN
5011: RAISE fnd_api.g_exc_error;
5012: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5013: RAISE fnd_api.g_exc_unexpected_error;
5014: END IF;
5015:
5016: IF l_approved_in_currency <> p_act_budget_rec.request_currency THEN
5017: ozf_utility_pvt.convert_currency (
5021: ,p_from_amount=> p_act_budget_rec.request_amount
5022: ,x_to_amount=> l_approved_amount
5023: );
5024:
5025: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5026: RAISE fnd_api.g_exc_unexpected_error;
5027: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5028: RAISE fnd_api.g_exc_error;
5029: END IF;
5022: ,x_to_amount=> l_approved_amount
5023: );
5024:
5025: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5026: RAISE fnd_api.g_exc_unexpected_error;
5027: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5028: RAISE fnd_api.g_exc_error;
5029: END IF;
5030: ELSE
5023: );
5024:
5025: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5026: RAISE fnd_api.g_exc_unexpected_error;
5027: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5028: RAISE fnd_api.g_exc_error;
5029: END IF;
5030: ELSE
5031: l_approved_amount := p_act_budget_rec.request_amount;
5024:
5025: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5026: RAISE fnd_api.g_exc_unexpected_error;
5027: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5028: RAISE fnd_api.g_exc_error;
5029: END IF;
5030: ELSE
5031: l_approved_amount := p_act_budget_rec.request_amount;
5032: END IF;
5054: ,p_act_budget_rec.act_budget_used_by_id
5055: ,p_act_budget_rec.budget_source_type
5056: ,p_act_budget_rec.budget_source_id
5057: ,p_act_budget_rec.transfer_type
5058: ) = fnd_api.g_true THEN
5059:
5060: --
5061: -- For performance considerations, consolidate the three
5062: -- cursor open and fetches into one by using DECODE on
5071: FETCH c_user_status_id INTO l_reject_status;
5072: CLOSE c_user_status_id;
5073: ams_approval_pvt.start_lineapproval (
5074: p_api_version=> 1.0
5075: ,p_init_msg_list=> fnd_api.g_false
5076: ,p_commit=> fnd_api.g_false
5077: ,p_validation_level=> fnd_api.g_valid_level_full
5078: ,x_return_status=> l_return_status
5079: ,x_msg_data=> x_msg_data
5072: CLOSE c_user_status_id;
5073: ams_approval_pvt.start_lineapproval (
5074: p_api_version=> 1.0
5075: ,p_init_msg_list=> fnd_api.g_false
5076: ,p_commit=> fnd_api.g_false
5077: ,p_validation_level=> fnd_api.g_valid_level_full
5078: ,x_return_status=> l_return_status
5079: ,x_msg_data=> x_msg_data
5080: ,x_msg_count=> x_msg_count
5073: ams_approval_pvt.start_lineapproval (
5074: p_api_version=> 1.0
5075: ,p_init_msg_list=> fnd_api.g_false
5076: ,p_commit=> fnd_api.g_false
5077: ,p_validation_level=> fnd_api.g_valid_level_full
5078: ,x_return_status=> l_return_status
5079: ,x_msg_data=> x_msg_data
5080: ,x_msg_count=> x_msg_count
5081: ,p_user_id=> ozf_utility_pvt.get_resource_id (fnd_global.user_id)
5089: ,p_parent_approval_flag=> p_parent_approval_flag
5090: ,p_continue_flow=> p_continue_flow
5091: );
5092:
5093: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5094: RAISE fnd_api.g_exc_unexpected_error;
5095: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5096: RAISE fnd_api.g_exc_error;
5097: END IF;
5090: ,p_continue_flow=> p_continue_flow
5091: );
5092:
5093: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5094: RAISE fnd_api.g_exc_unexpected_error;
5095: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5096: RAISE fnd_api.g_exc_error;
5097: END IF;
5098: ELSE
5091: );
5092:
5093: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5094: RAISE fnd_api.g_exc_unexpected_error;
5095: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5096: RAISE fnd_api.g_exc_error;
5097: END IF;
5098: ELSE
5099:
5092:
5093: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5094: RAISE fnd_api.g_exc_unexpected_error;
5095: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5096: RAISE fnd_api.g_exc_error;
5097: END IF;
5098: ELSE
5099:
5100: l_approved_in_currency := get_object_currency (
5102: ,p_act_budget_rec.budget_source_id
5103: ,l_return_status
5104: );
5105:
5106: IF l_return_status = fnd_api.g_ret_sts_error THEN
5107: RAISE fnd_api.g_exc_error;
5108: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5109: RAISE fnd_api.g_exc_unexpected_error;
5110: END IF;
5103: ,l_return_status
5104: );
5105:
5106: IF l_return_status = fnd_api.g_ret_sts_error THEN
5107: RAISE fnd_api.g_exc_error;
5108: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5109: RAISE fnd_api.g_exc_unexpected_error;
5110: END IF;
5111:
5104: );
5105:
5106: IF l_return_status = fnd_api.g_ret_sts_error THEN
5107: RAISE fnd_api.g_exc_error;
5108: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5109: RAISE fnd_api.g_exc_unexpected_error;
5110: END IF;
5111:
5112: IF l_approved_in_currency <> p_act_budget_rec.request_currency THEN
5105:
5106: IF l_return_status = fnd_api.g_ret_sts_error THEN
5107: RAISE fnd_api.g_exc_error;
5108: ELSIF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5109: RAISE fnd_api.g_exc_unexpected_error;
5110: END IF;
5111:
5112: IF l_approved_in_currency <> p_act_budget_rec.request_currency THEN
5113: ozf_utility_pvt.convert_currency (
5117: ,p_from_amount=> p_act_budget_rec.request_amount
5118: ,x_to_amount=> l_approved_amount
5119: );
5120:
5121: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5122: RAISE fnd_api.g_exc_unexpected_error;
5123: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5124: RAISE fnd_api.g_exc_error;
5125: END IF;
5118: ,x_to_amount=> l_approved_amount
5119: );
5120:
5121: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5122: RAISE fnd_api.g_exc_unexpected_error;
5123: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5124: RAISE fnd_api.g_exc_error;
5125: END IF;
5126: ELSE
5119: );
5120:
5121: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5122: RAISE fnd_api.g_exc_unexpected_error;
5123: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5124: RAISE fnd_api.g_exc_error;
5125: END IF;
5126: ELSE
5127: l_approved_amount := p_act_budget_rec.request_amount;
5120:
5121: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5122: RAISE fnd_api.g_exc_unexpected_error;
5123: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5124: RAISE fnd_api.g_exc_error;
5125: END IF;
5126: ELSE
5127: l_approved_amount := p_act_budget_rec.request_amount;
5128: END IF;
5248: FROM ozf_request_headers_all_b
5249: WHERE request_header_id = p_object_id;
5250:
5251: BEGIN
5252: x_return_status := fnd_api.g_ret_sts_success;
5253:
5254: -- Campaign
5255: IF p_object = 'CAMP' THEN
5256: OPEN c_campaign;
5258:
5259: IF c_campaign%NOTFOUND THEN
5260: CLOSE c_campaign;
5261: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5262: x_return_status := fnd_api.g_ret_sts_error;
5263: RAISE fnd_api.g_exc_error;
5264: END IF;
5265:
5266: CLOSE c_campaign;
5259: IF c_campaign%NOTFOUND THEN
5260: CLOSE c_campaign;
5261: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5262: x_return_status := fnd_api.g_ret_sts_error;
5263: RAISE fnd_api.g_exc_error;
5264: END IF;
5265:
5266: CLOSE c_campaign;
5267: -- Campaign Schdules
5271:
5272: IF c_campaign_schl%NOTFOUND THEN
5273: CLOSE c_campaign_schl;
5274: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5275: x_return_status := fnd_api.g_ret_sts_error;
5276: RAISE fnd_api.g_exc_error;
5277: END IF;
5278:
5279: CLOSE c_campaign_schl;
5272: IF c_campaign_schl%NOTFOUND THEN
5273: CLOSE c_campaign_schl;
5274: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5275: x_return_status := fnd_api.g_ret_sts_error;
5276: RAISE fnd_api.g_exc_error;
5277: END IF;
5278:
5279: CLOSE c_campaign_schl;
5280: -- Event Header/Rollup Event
5284:
5285: IF c_eheader%NOTFOUND THEN
5286: CLOSE c_eheader;
5287: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5288: x_return_status := fnd_api.g_ret_sts_error;
5289: RAISE fnd_api.g_exc_error;
5290: END IF;
5291:
5292: CLOSE c_eheader;
5285: IF c_eheader%NOTFOUND THEN
5286: CLOSE c_eheader;
5287: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5288: x_return_status := fnd_api.g_ret_sts_error;
5289: RAISE fnd_api.g_exc_error;
5290: END IF;
5291:
5292: CLOSE c_eheader;
5293: -- Event Offer/Execution Event
5297:
5298: IF c_eoffer%NOTFOUND THEN
5299: CLOSE c_eoffer;
5300: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5301: x_return_status := fnd_api.g_ret_sts_error;
5302: RAISE fnd_api.g_exc_error;
5303: END IF;
5304:
5305: CLOSE c_eoffer;
5298: IF c_eoffer%NOTFOUND THEN
5299: CLOSE c_eoffer;
5300: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5301: x_return_status := fnd_api.g_ret_sts_error;
5302: RAISE fnd_api.g_exc_error;
5303: END IF;
5304:
5305: CLOSE c_eoffer;
5306: -- Deliverable
5310:
5311: IF c_deliverable%NOTFOUND THEN
5312: CLOSE c_deliverable;
5313: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5314: x_return_status := fnd_api.g_ret_sts_error;
5315: RAISE fnd_api.g_exc_error;
5316: END IF;
5317:
5318: CLOSE c_deliverable;
5311: IF c_deliverable%NOTFOUND THEN
5312: CLOSE c_deliverable;
5313: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5314: x_return_status := fnd_api.g_ret_sts_error;
5315: RAISE fnd_api.g_exc_error;
5316: END IF;
5317:
5318: CLOSE c_deliverable;
5319: ELSIF p_object = 'FUND' THEN
5322:
5323: IF c_fund%NOTFOUND THEN
5324: CLOSE c_fund;
5325: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5326: x_return_status := fnd_api.g_ret_sts_error;
5327: RAISE fnd_api.g_exc_error;
5328: END IF;
5329:
5330: CLOSE c_fund;
5323: IF c_fund%NOTFOUND THEN
5324: CLOSE c_fund;
5325: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5326: x_return_status := fnd_api.g_ret_sts_error;
5327: RAISE fnd_api.g_exc_error;
5328: END IF;
5329:
5330: CLOSE c_fund;
5331: -- yzhao: 10/20/2003 for price list ELSIF p_object = 'OFFR' THEN
5335:
5336: IF c_offer%NOTFOUND THEN
5337: CLOSE c_offer;
5338: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5339: x_return_status := fnd_api.g_ret_sts_error;
5340: RAISE fnd_api.g_exc_error;
5341: END IF;
5342:
5343: CLOSE c_offer;
5336: IF c_offer%NOTFOUND THEN
5337: CLOSE c_offer;
5338: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5339: x_return_status := fnd_api.g_ret_sts_error;
5340: RAISE fnd_api.g_exc_error;
5341: END IF;
5342:
5343: CLOSE c_offer;
5344: ELSIF p_object = 'PRIC' THEN
5347:
5348: IF c_pricelist%NOTFOUND THEN
5349: CLOSE c_pricelist;
5350: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5351: x_return_status := fnd_api.g_ret_sts_error;
5352: RAISE fnd_api.g_exc_error;
5353: END IF;
5354:
5355: CLOSE c_pricelist;
5348: IF c_pricelist%NOTFOUND THEN
5349: CLOSE c_pricelist;
5350: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5351: x_return_status := fnd_api.g_ret_sts_error;
5352: RAISE fnd_api.g_exc_error;
5353: END IF;
5354:
5355: CLOSE c_pricelist;
5356: ELSIF p_object = 'WKST' THEN
5359:
5360: IF c_worksheet%NOTFOUND THEN
5361: CLOSE c_worksheet;
5362: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5363: x_return_status := fnd_api.g_ret_sts_error;
5364: RAISE fnd_api.g_exc_error;
5365: END IF;
5366:
5367: CLOSE c_worksheet;
5360: IF c_worksheet%NOTFOUND THEN
5361: CLOSE c_worksheet;
5362: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5363: x_return_status := fnd_api.g_ret_sts_error;
5364: RAISE fnd_api.g_exc_error;
5365: END IF;
5366:
5367: CLOSE c_worksheet;
5368: ELSIF p_object = 'SOFT_FUND' THEN
5371:
5372: IF c_soft_fund%NOTFOUND THEN
5373: CLOSE c_soft_fund;
5374: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5375: x_return_status := fnd_api.g_ret_sts_error;
5376: RAISE fnd_api.g_exc_error;
5377: END IF;
5378:
5379: CLOSE c_soft_fund;
5372: IF c_soft_fund%NOTFOUND THEN
5373: CLOSE c_soft_fund;
5374: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5375: x_return_status := fnd_api.g_ret_sts_error;
5376: RAISE fnd_api.g_exc_error;
5377: END IF;
5378:
5379: CLOSE c_soft_fund;
5380: ELSIF p_object = 'SPECIAL_PRICE' THEN
5383:
5384: IF c_special_price%NOTFOUND THEN
5385: CLOSE c_special_price;
5386: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5387: x_return_status := fnd_api.g_ret_sts_error;
5388: RAISE fnd_api.g_exc_error;
5389: END IF;
5390:
5391: CLOSE c_special_price;
5384: IF c_special_price%NOTFOUND THEN
5385: CLOSE c_special_price;
5386: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5387: x_return_status := fnd_api.g_ret_sts_error;
5388: RAISE fnd_api.g_exc_error;
5389: END IF;
5390:
5391: CLOSE c_special_price;
5392: ELSE
5391: CLOSE c_special_price;
5392: ELSE
5393:
5394: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5395: x_return_status := fnd_api.g_ret_sts_error;
5396: RAISE fnd_api.g_exc_error;
5397: END IF;
5398:
5399: RETURN l_currency_code;
5392: ELSE
5393:
5394: ozf_utility_pvt.error_message ('OZF_ACT_BUDG_NO_CURRENCY');
5395: x_return_status := fnd_api.g_ret_sts_error;
5396: RAISE fnd_api.g_exc_error;
5397: END IF;
5398:
5399: RETURN l_currency_code;
5400: EXCEPTION
5398:
5399: RETURN l_currency_code;
5400: EXCEPTION
5401: WHEN OTHERS THEN
5402: x_return_status := fnd_api.g_ret_sts_error;
5403:
5404: IF c_campaign%ISOPEN THEN
5405: CLOSE c_campaign;
5406: END IF;
5528: l_fund_object_version_number NUMBER;
5529: l_fund_currency_tc VARCHAR2 (15); -- a fund's transactional currency code
5530: l_fund_planned_amount NUMBER;
5531: l_fund_committed_amount NUMBER;
5532: l_fund_transfer_flag VARCHAR2 (1) := fnd_api.g_false;
5533: l_fund_recal_committed_amount NUMBER;
5534: l_univ_planned_amount NUMBER;
5535: l_univ_committed_amount NUMBER;
5536: l_objfundsum_rec ozf_objfundsum_pvt.objfundsum_rec_type := NULL;
5572:
5573: -- The from currency should be passed in before currency
5574: -- conversion can be performed.
5575: IF p_act_budget_rec.approved_in_currency IS NULL
5576: OR p_act_budget_rec.approved_in_currency = fnd_api.g_miss_char THEN
5577: ozf_utility_pvt.error_message ('OZF_ACT_BUDGET_NO_APPR_CURR');
5578: RAISE fnd_api.g_exc_error;
5579: END IF;
5580:
5574: -- conversion can be performed.
5575: IF p_act_budget_rec.approved_in_currency IS NULL
5576: OR p_act_budget_rec.approved_in_currency = fnd_api.g_miss_char THEN
5577: ozf_utility_pvt.error_message ('OZF_ACT_BUDGET_NO_APPR_CURR');
5578: RAISE fnd_api.g_exc_error;
5579: END IF;
5580:
5581: --Added for bug 7425189
5582: l_fund_reconc_msg := fnd_message.get_string ('OZF', 'OZF_FUND_RECONCILE');
5590: IF ozf_ACTBUDGETRULES_PVT.source_has_enough_money (
5591: p_source_type => p_act_budget_rec.budget_source_type,
5592: p_source_id => p_act_budget_rec.budget_source_id,
5593: p_approved_amount => p_act_budget_rec.approved_original_amount
5594: ) = FND_API.g_false THEN
5595: ozf_Utility_PVT.error_message ('OZF_ACT_BUDG_NO_MONEY');
5596: RAISE FND_API.g_exc_error;
5597: END IF;
5598: END IF;
5592: p_source_id => p_act_budget_rec.budget_source_id,
5593: p_approved_amount => p_act_budget_rec.approved_original_amount
5594: ) = FND_API.g_false THEN
5595: ozf_Utility_PVT.error_message ('OZF_ACT_BUDG_NO_MONEY');
5596: RAISE FND_API.g_exc_error;
5597: END IF;
5598: END IF;
5599:
5600: IF p_mode = 'UPDATE' THEN
5693: );
5694: END IF;
5695: */
5696:
5697: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5698: RAISE fnd_api.g_exc_unexpected_error;
5699: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5700: RAISE fnd_api.g_exc_error;
5701: END IF;
5694: END IF;
5695: */
5696:
5697: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5698: RAISE fnd_api.g_exc_unexpected_error;
5699: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5700: RAISE fnd_api.g_exc_error;
5701: END IF;
5702: END IF;
5695: */
5696:
5697: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5698: RAISE fnd_api.g_exc_unexpected_error;
5699: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5700: RAISE fnd_api.g_exc_error;
5701: END IF;
5702: END IF;
5703: ELSE
5696:
5697: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5698: RAISE fnd_api.g_exc_unexpected_error;
5699: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5700: RAISE fnd_api.g_exc_error;
5701: END IF;
5702: END IF;
5703: ELSE
5704: -- approved_original_amount is not null.
5749:
5750: END IF;
5751: */
5752:
5753: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5754: RAISE fnd_api.g_exc_unexpected_error;
5755: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5756: RAISE fnd_api.g_exc_error;
5757: END IF;
5750: END IF;
5751: */
5752:
5753: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5754: RAISE fnd_api.g_exc_unexpected_error;
5755: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5756: RAISE fnd_api.g_exc_error;
5757: END IF;
5758: END IF;
5751: */
5752:
5753: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5754: RAISE fnd_api.g_exc_unexpected_error;
5755: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5756: RAISE fnd_api.g_exc_error;
5757: END IF;
5758: END IF;
5759: END IF;
5752:
5753: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5754: RAISE fnd_api.g_exc_unexpected_error;
5755: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5756: RAISE fnd_api.g_exc_error;
5757: END IF;
5758: END IF;
5759: END IF;
5760: END IF;
5764: l_temp_rec.approval_date := NVL (p_act_budget_rec.approval_date, SYSDATE);
5765:
5766: IF l_temp_rec.budget_source_type = 'FUND'
5767: AND l_temp_rec.arc_act_budget_used_by = 'FUND' THEN
5768: l_fund_transfer_flag := fnd_api.g_true;
5769: END IF;
5770:
5771: IF l_fund_transfer_flag = fnd_api.g_false THEN
5772: -- if the budget source is a fund , then the
5767: AND l_temp_rec.arc_act_budget_used_by = 'FUND' THEN
5768: l_fund_transfer_flag := fnd_api.g_true;
5769: END IF;
5770:
5771: IF l_fund_transfer_flag = fnd_api.g_false THEN
5772: -- if the budget source is a fund , then the
5773: -- fund's planned amount must be decreased
5774: -- by the request_amount during approval
5775: -- submission.
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: */
5824: FETCH c_get_objfundsum_rec INTO l_objfundsum_rec.objfundsum_id
5825: , l_objfundsum_rec.object_version_number
5888: ,x_to_amount=> l_fund_rec.planned_amt
5889: );
5890: END IF;
5891: */
5892: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5893: RAISE fnd_api.g_exc_unexpected_error;
5894: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5895: RAISE fnd_api.g_exc_error;
5896: END IF;
5889: );
5890: END IF;
5891: */
5892: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5893: RAISE fnd_api.g_exc_unexpected_error;
5894: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5895: RAISE fnd_api.g_exc_error;
5896: END IF;
5897: END IF;
5890: END IF;
5891: */
5892: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5893: RAISE fnd_api.g_exc_unexpected_error;
5894: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5895: RAISE fnd_api.g_exc_error;
5896: END IF;
5897: END IF;
5898:
5891: */
5892: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5893: RAISE fnd_api.g_exc_unexpected_error;
5894: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5895: RAISE fnd_api.g_exc_error;
5896: END IF;
5897: END IF;
5898:
5899: IF l_temp_rec.transfer_type = 'REQUEST' THEN
5920: ,p_from_amount=> l_temp_rec.approved_original_amount
5921: ,x_to_amount=> l_fund_rec.committed_amt
5922: );
5923:
5924: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5925: RAISE fnd_api.g_exc_unexpected_error;
5926: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5927: RAISE fnd_api.g_exc_error;
5928: END IF;
5921: ,x_to_amount=> l_fund_rec.committed_amt
5922: );
5923:
5924: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5925: RAISE fnd_api.g_exc_unexpected_error;
5926: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5927: RAISE fnd_api.g_exc_error;
5928: END IF;
5929: END IF;
5922: );
5923:
5924: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5925: RAISE fnd_api.g_exc_unexpected_error;
5926: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5927: RAISE fnd_api.g_exc_error;
5928: END IF;
5929: END IF;
5930: ELSE
5923:
5924: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5925: RAISE fnd_api.g_exc_unexpected_error;
5926: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5927: RAISE fnd_api.g_exc_error;
5928: END IF;
5929: END IF;
5930: ELSE
5931: -- in case of transfer the fund amount is approved amount
5979: ,p_from_amount=> l_temp_rec.request_amount
5980: ,x_to_amount=> l_univ_planned_amount
5981: );
5982: END IF;
5983: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5984: RAISE fnd_api.g_exc_unexpected_error;
5985: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5986: RAISE fnd_api.g_exc_error;
5987: END IF;
5980: ,x_to_amount=> l_univ_planned_amount
5981: );
5982: END IF;
5983: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5984: RAISE fnd_api.g_exc_unexpected_error;
5985: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5986: RAISE fnd_api.g_exc_error;
5987: END IF;
5988: */
5981: );
5982: END IF;
5983: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5984: RAISE fnd_api.g_exc_unexpected_error;
5985: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5986: RAISE fnd_api.g_exc_error;
5987: END IF;
5988: */
5989:
5982: END IF;
5983: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
5984: RAISE fnd_api.g_exc_unexpected_error;
5985: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
5986: RAISE fnd_api.g_exc_error;
5987: END IF;
5988: */
5989:
5990: IF l_temp_rec.request_amount = l_temp_rec.approved_amount THEN
6028: );
6029: END IF;
6030: */
6031:
6032: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6033: RAISE fnd_api.g_exc_unexpected_error;
6034: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6035: RAISE fnd_api.g_exc_error;
6036: END IF;
6029: END IF;
6030: */
6031:
6032: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6033: RAISE fnd_api.g_exc_unexpected_error;
6034: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6035: RAISE fnd_api.g_exc_error;
6036: END IF;
6037: END IF;
6030: */
6031:
6032: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6033: RAISE fnd_api.g_exc_unexpected_error;
6034: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6035: RAISE fnd_api.g_exc_error;
6036: END IF;
6037: END IF;
6038: END IF;
6031:
6032: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6033: RAISE fnd_api.g_exc_unexpected_error;
6034: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6035: RAISE fnd_api.g_exc_error;
6036: END IF;
6037: END IF;
6038: END IF;
6039:
6167: -- and changed px_ozf_funds_new_rectype to px_ozf_funds_new_tbl.
6168:
6169: ozf_funds_pvt.update_fund (
6170: p_api_version=> 1.0
6171: ,p_init_msg_list=> fnd_api.g_false
6172: ,p_commit=> fnd_api.g_false
6173: ,p_validation_level=> fnd_api.g_valid_level_full
6174: ,x_return_status=> l_return_status
6175: ,x_msg_count=> x_msg_count
6168:
6169: ozf_funds_pvt.update_fund (
6170: p_api_version=> 1.0
6171: ,p_init_msg_list=> fnd_api.g_false
6172: ,p_commit=> fnd_api.g_false
6173: ,p_validation_level=> fnd_api.g_valid_level_full
6174: ,x_return_status=> l_return_status
6175: ,x_msg_count=> x_msg_count
6176: ,x_msg_data=> x_msg_data
6169: ozf_funds_pvt.update_fund (
6170: p_api_version=> 1.0
6171: ,p_init_msg_list=> fnd_api.g_false
6172: ,p_commit=> fnd_api.g_false
6173: ,p_validation_level=> fnd_api.g_valid_level_full
6174: ,x_return_status=> l_return_status
6175: ,x_msg_count=> x_msg_count
6176: ,x_msg_data=> x_msg_data
6177: ,p_fund_rec=> l_fund_rec
6182: ,px_ozf_funds_old_rectype => px_ozf_funds_old_rectype
6183: ,px_ozf_funds_new_tbl => px_ozf_funds_new_tbl -- For TPA Parallel Execution ER Bug#9614703
6184: );
6185:
6186: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6187: RAISE fnd_api.g_exc_unexpected_error;
6188: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6189: RAISE fnd_api.g_exc_error;
6190: END IF;
6183: ,px_ozf_funds_new_tbl => px_ozf_funds_new_tbl -- For TPA Parallel Execution ER Bug#9614703
6184: );
6185:
6186: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6187: RAISE fnd_api.g_exc_unexpected_error;
6188: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6189: RAISE fnd_api.g_exc_error;
6190: END IF;
6191:
6184: );
6185:
6186: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6187: RAISE fnd_api.g_exc_unexpected_error;
6188: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6189: RAISE fnd_api.g_exc_error;
6190: END IF;
6191:
6192: -- R12: yzhao ozf_object_fund_summary update planned_amount/committed_amount
6185:
6186: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6187: RAISE fnd_api.g_exc_unexpected_error;
6188: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6189: RAISE fnd_api.g_exc_error;
6190: END IF;
6191:
6192: -- R12: yzhao ozf_object_fund_summary update planned_amount/committed_amount
6193:
6212: END IF;
6213:
6214: ozf_objfundsum_pvt.create_objfundsum(
6215: p_api_version => 1.0,
6216: p_init_msg_list => Fnd_Api.G_FALSE,
6217: p_validation_level => Fnd_Api.G_VALID_LEVEL_NONE,
6218: p_objfundsum_rec => l_objfundsum_rec,
6219: p_conv_date => p_act_budget_rec.exchange_rate_date, --bug 8532055
6220: x_return_status => l_return_status,
6213:
6214: ozf_objfundsum_pvt.create_objfundsum(
6215: p_api_version => 1.0,
6216: p_init_msg_list => Fnd_Api.G_FALSE,
6217: p_validation_level => Fnd_Api.G_VALID_LEVEL_NONE,
6218: p_objfundsum_rec => l_objfundsum_rec,
6219: p_conv_date => p_act_budget_rec.exchange_rate_date, --bug 8532055
6220: x_return_status => l_return_status,
6221: x_msg_count => x_msg_count,
6235: IF p_use_fund_staging_tables <> 'T' THEN
6236:
6237: ozf_objfundsum_pvt.update_objfundsum(
6238: p_api_version => 1.0,
6239: p_init_msg_list => Fnd_Api.G_FALSE,
6240: p_validation_level => Fnd_Api.G_VALID_LEVEL_NONE,
6241: p_objfundsum_rec => l_objfundsum_rec,
6242: p_conv_date => p_act_budget_rec.exchange_rate_date, --bug 7425189, 8532055
6243: x_return_status => l_return_status,
6236:
6237: ozf_objfundsum_pvt.update_objfundsum(
6238: p_api_version => 1.0,
6239: p_init_msg_list => Fnd_Api.G_FALSE,
6240: p_validation_level => Fnd_Api.G_VALID_LEVEL_NONE,
6241: p_objfundsum_rec => l_objfundsum_rec,
6242: p_conv_date => p_act_budget_rec.exchange_rate_date, --bug 7425189, 8532055
6243: x_return_status => l_return_status,
6244: x_msg_count => x_msg_count,
6258: ozf_utility_pvt.debug_message('******************************************************************');
6259: END IF;
6260: update_reconcile_objfundsum(
6261: p_api_version => 1.0,
6262: p_init_msg_list => Fnd_Api.G_FALSE,
6263: p_validation_level => Fnd_Api.G_VALID_LEVEL_NONE,
6264: p_objfundsum_rec => l_objfundsum_rec,
6265: p_conv_date => p_act_budget_rec.exchange_rate_date,
6266: x_return_status => l_return_status,
6259: END IF;
6260: update_reconcile_objfundsum(
6261: p_api_version => 1.0,
6262: p_init_msg_list => Fnd_Api.G_FALSE,
6263: p_validation_level => Fnd_Api.G_VALID_LEVEL_NONE,
6264: p_objfundsum_rec => l_objfundsum_rec,
6265: p_conv_date => p_act_budget_rec.exchange_rate_date,
6266: x_return_status => l_return_status,
6267: x_msg_count => x_msg_count,
6269: );
6270: ELSE
6271: ozf_objfundsum_pvt.update_objfundsum(
6272: p_api_version => 1.0,
6273: p_init_msg_list => Fnd_Api.G_FALSE,
6274: p_validation_level => Fnd_Api.G_VALID_LEVEL_NONE,
6275: p_objfundsum_rec => l_objfundsum_rec,
6276: x_return_status => l_return_status,
6277: x_msg_count => x_msg_count,
6270: ELSE
6271: ozf_objfundsum_pvt.update_objfundsum(
6272: p_api_version => 1.0,
6273: p_init_msg_list => Fnd_Api.G_FALSE,
6274: p_validation_level => Fnd_Api.G_VALID_LEVEL_NONE,
6275: p_objfundsum_rec => l_objfundsum_rec,
6276: x_return_status => l_return_status,
6277: x_msg_count => x_msg_count,
6278: x_msg_data => x_msg_data
6281: */
6282: END IF;
6283:
6284:
6285: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6286: RAISE fnd_api.g_exc_unexpected_error;
6287: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6288: RAISE fnd_api.g_exc_error;
6289: END IF;
6282: END IF;
6283:
6284:
6285: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6286: RAISE fnd_api.g_exc_unexpected_error;
6287: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6288: RAISE fnd_api.g_exc_error;
6289: END IF;
6290: -- R12: yzhao END ozf_object_fund_summary decrease planned_amount/committed_amount
6283:
6284:
6285: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6286: RAISE fnd_api.g_exc_unexpected_error;
6287: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6288: RAISE fnd_api.g_exc_error;
6289: END IF;
6290: -- R12: yzhao END ozf_object_fund_summary decrease planned_amount/committed_amount
6291:
6284:
6285: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6286: RAISE fnd_api.g_exc_unexpected_error;
6287: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6288: RAISE fnd_api.g_exc_error;
6289: END IF;
6290: -- R12: yzhao END ozf_object_fund_summary decrease planned_amount/committed_amount
6291:
6292: END IF; -- end for fund check
6383: ,p_from_amount=> l_temp_rec.request_amount
6384: ,x_to_amount=> l_fund_rec.planned_amt
6385: );
6386:
6387: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6388: RAISE fnd_api.g_exc_unexpected_error;
6389: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6390: RAISE fnd_api.g_exc_error;
6391: END IF;
6384: ,x_to_amount=> l_fund_rec.planned_amt
6385: );
6386:
6387: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6388: RAISE fnd_api.g_exc_unexpected_error;
6389: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6390: RAISE fnd_api.g_exc_error;
6391: END IF;
6392: END IF;
6385: );
6386:
6387: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6388: RAISE fnd_api.g_exc_unexpected_error;
6389: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6390: RAISE fnd_api.g_exc_error;
6391: END IF;
6392: END IF;
6393:
6386:
6387: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6388: RAISE fnd_api.g_exc_unexpected_error;
6389: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6390: RAISE fnd_api.g_exc_error;
6391: END IF;
6392: END IF;
6393:
6394: -- R12: yzhao ozf_object_fund_summary decrease planned_amt
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;
6412: IF g_universal_currency = l_temp_rec.request_currency THEN
6413: l_univ_planned_amount := l_temp_rec.request_amount;
6420: ,p_to_currency=> g_universal_currency
6421: ,p_from_amount=> l_temp_rec.request_amount
6422: ,x_to_amount=> l_univ_planned_amount
6423: );
6424: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6425: RAISE fnd_api.g_exc_unexpected_error;
6426: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6427: RAISE fnd_api.g_exc_error;
6428: END IF;
6421: ,p_from_amount=> l_temp_rec.request_amount
6422: ,x_to_amount=> l_univ_planned_amount
6423: );
6424: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6425: RAISE fnd_api.g_exc_unexpected_error;
6426: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6427: RAISE fnd_api.g_exc_error;
6428: END IF;
6429: END IF;
6422: ,x_to_amount=> l_univ_planned_amount
6423: );
6424: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6425: RAISE fnd_api.g_exc_unexpected_error;
6426: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6427: RAISE fnd_api.g_exc_error;
6428: END IF;
6429: END IF;
6430:
6423: );
6424: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6425: RAISE fnd_api.g_exc_unexpected_error;
6426: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6427: RAISE fnd_api.g_exc_error;
6428: END IF;
6429: END IF;
6430:
6431: IF p_use_fund_staging_tables <> 'T' THEN
6436: l_objfundsum_rec.univ_curr_planned_amt := NVL(l_objfundsum_rec.univ_curr_planned_amt, 0)
6437: - NVL(l_univ_planned_amount, 0);
6438: ozf_objfundsum_pvt.update_objfundsum(
6439: p_api_version => 1.0,
6440: p_init_msg_list => Fnd_Api.G_FALSE,
6441: p_validation_level => Fnd_Api.G_VALID_LEVEL_NONE,
6442: p_objfundsum_rec => l_objfundsum_rec,
6443: x_return_status => l_return_status,
6444: x_msg_count => x_msg_count,
6437: - NVL(l_univ_planned_amount, 0);
6438: ozf_objfundsum_pvt.update_objfundsum(
6439: p_api_version => 1.0,
6440: p_init_msg_list => Fnd_Api.G_FALSE,
6441: p_validation_level => Fnd_Api.G_VALID_LEVEL_NONE,
6442: p_objfundsum_rec => l_objfundsum_rec,
6443: x_return_status => l_return_status,
6444: x_msg_count => x_msg_count,
6445: x_msg_data => x_msg_data
6443: x_return_status => l_return_status,
6444: x_msg_count => x_msg_count,
6445: x_msg_data => x_msg_data
6446: );
6447: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6448: RAISE fnd_api.g_exc_unexpected_error;
6449: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6450: RAISE fnd_api.g_exc_error;
6451: END IF;
6444: x_msg_count => x_msg_count,
6445: x_msg_data => x_msg_data
6446: );
6447: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6448: RAISE fnd_api.g_exc_unexpected_error;
6449: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6450: RAISE fnd_api.g_exc_error;
6451: END IF;
6452: -- R12: yzhao END ozf_object_fund_summary decrease planned amount
6445: x_msg_data => x_msg_data
6446: );
6447: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6448: RAISE fnd_api.g_exc_unexpected_error;
6449: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6450: RAISE fnd_api.g_exc_error;
6451: END IF;
6452: -- R12: yzhao END ozf_object_fund_summary decrease planned amount
6453: END IF;
6446: );
6447: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6448: RAISE fnd_api.g_exc_unexpected_error;
6449: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6450: RAISE fnd_api.g_exc_error;
6451: END IF;
6452: -- R12: yzhao END ozf_object_fund_summary decrease planned amount
6453: END IF;
6454:
6458: NVL (l_fund_planned_amount, 0)
6459: - NVL (l_fund_rec.planned_amt, 0);
6460: ozf_funds_pvt.update_fund (
6461: p_api_version=> 1.0
6462: ,p_init_msg_list=> fnd_api.g_false
6463: , -- allow the calling API to handle
6464: p_commit=> fnd_api.g_false
6465: , -- allow the calling API to handle
6466: p_validation_level=> fnd_api.g_valid_level_full
6460: ozf_funds_pvt.update_fund (
6461: p_api_version=> 1.0
6462: ,p_init_msg_list=> fnd_api.g_false
6463: , -- allow the calling API to handle
6464: p_commit=> fnd_api.g_false
6465: , -- allow the calling API to handle
6466: p_validation_level=> fnd_api.g_valid_level_full
6467: ,x_return_status=> l_return_status
6468: ,x_msg_count=> x_msg_count
6462: ,p_init_msg_list=> fnd_api.g_false
6463: , -- allow the calling API to handle
6464: p_commit=> fnd_api.g_false
6465: , -- allow the calling API to handle
6466: p_validation_level=> fnd_api.g_valid_level_full
6467: ,x_return_status=> l_return_status
6468: ,x_msg_count=> x_msg_count
6469: ,x_msg_data=> x_msg_data
6470: ,p_fund_rec=> l_fund_rec
6470: ,p_fund_rec=> l_fund_rec
6471: ,p_mode=> g_cons_fund_mode
6472: );
6473:
6474: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6475: RAISE fnd_api.g_exc_unexpected_error;
6476: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6477: RAISE fnd_api.g_exc_error;
6478: END IF;
6471: ,p_mode=> g_cons_fund_mode
6472: );
6473:
6474: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6475: RAISE fnd_api.g_exc_unexpected_error;
6476: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6477: RAISE fnd_api.g_exc_error;
6478: END IF;
6479: END IF; -- if source type = FUND
6472: );
6473:
6474: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6475: RAISE fnd_api.g_exc_unexpected_error;
6476: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6477: RAISE fnd_api.g_exc_error;
6478: END IF;
6479: END IF; -- if source type = FUND
6480:
6473:
6474: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6475: RAISE fnd_api.g_exc_unexpected_error;
6476: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6477: RAISE fnd_api.g_exc_error;
6478: END IF;
6479: END IF; -- if source type = FUND
6480:
6481: x_act_budget_rec := l_temp_rec;
6506: x_return_status OUT NOCOPY VARCHAR2,
6507: x_msg_count OUT NOCOPY NUMBER,
6508: x_msg_data OUT NOCOPY VARCHAR2,
6509: p_act_budgets_rec IN ozf_actbudgets_pvt.act_budgets_rec_type,
6510: p_exchange_rate_type IN VARCHAR2 DEFAULT FND_API.G_MISS_CHAR
6511: ) IS
6512:
6513: l_return_status VARCHAR2 (10) := fnd_api.g_ret_sts_success;
6514: l_api_name CONSTANT VARCHAR2 (30) := 'create_child_act_budget';
6509: p_act_budgets_rec IN ozf_actbudgets_pvt.act_budgets_rec_type,
6510: p_exchange_rate_type IN VARCHAR2 DEFAULT FND_API.G_MISS_CHAR
6511: ) IS
6512:
6513: l_return_status VARCHAR2 (10) := fnd_api.g_ret_sts_success;
6514: l_api_name CONSTANT VARCHAR2 (30) := 'create_child_act_budget';
6515: l_api_version CONSTANT NUMBER := 1.0;
6516: l_msg_data VARCHAR2 (2000);
6517: l_msg_count NUMBER;
6555: IF G_DEBUG THEN
6556: ozf_utility_pvt.debug_message ( l_full_name || ': start');
6557: END IF;
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;
6557: END IF;
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
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;
6567: END IF;
6568: */
6569:
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;
6567: END IF;
6568: */
6569:
6570: l_act_budgets_rec.transfer_type := p_act_budgets_rec.transfer_type;
6660: ,x_msg_data=> l_msg_data
6661: ,p_act_budgets_rec=> l_act_budgets_rec
6662: ,p_act_util_rec=> l_act_util_rec
6663: ,x_act_budget_id=> l_act_budget_id
6664: ,p_approval_flag=> fnd_api.g_true
6665: );
6666:
6667:
6668: IF NOT (l_return_status = fnd_api.g_ret_sts_success) THEN
6664: ,p_approval_flag=> fnd_api.g_true
6665: );
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
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: );
6675: END IF;
6676:
6677: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6673: ,p_encoded=> fnd_api.g_false
6674: );
6675: END IF;
6676:
6677: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6678: RAISE fnd_api.g_exc_unexpected_error;
6679: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6680: RAISE fnd_api.g_exc_error;
6681: END IF;
6674: );
6675: END IF;
6676:
6677: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6678: RAISE fnd_api.g_exc_unexpected_error;
6679: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6680: RAISE fnd_api.g_exc_error;
6681: END IF;
6682:
6675: END IF;
6676:
6677: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6678: RAISE fnd_api.g_exc_unexpected_error;
6679: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6680: RAISE fnd_api.g_exc_error;
6681: END IF;
6682:
6683: EXIT WHEN l_amount_remaining <= 0;
6676:
6677: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6678: RAISE fnd_api.g_exc_unexpected_error;
6679: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6680: RAISE fnd_api.g_exc_error;
6681: END IF;
6682:
6683: EXIT WHEN l_amount_remaining <= 0;
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: );
6693:
6697: || ': end');
6698: END IF;
6699:
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
6699:
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
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: );
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;
6705: p_count=> x_msg_count
6706: ,p_data=> x_msg_data
6707: ,p_encoded=> fnd_api.g_false
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
6707: ,p_encoded=> fnd_api.g_false
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
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;
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 (
6726: p_count=> x_msg_count
6727: ,p_data=> x_msg_data
6728: ,p_encoded=> fnd_api.g_false
6729: );
6730:
6731: END create_child_act_budget;
6732:
6782: ,p_conv_date=> p_conv_date
6783: ,p_from_amount=> p_amount_1
6784: ,x_to_amount=> x_amount_2
6785: );
6786: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6787: RAISE fnd_api.g_exc_unexpected_error;
6788: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6789: RAISE fnd_api.g_exc_error;
6790: END IF;
6783: ,p_from_amount=> p_amount_1
6784: ,x_to_amount=> x_amount_2
6785: );
6786: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6787: RAISE fnd_api.g_exc_unexpected_error;
6788: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6789: RAISE fnd_api.g_exc_error;
6790: END IF;
6791: END IF;
6784: ,x_to_amount=> x_amount_2
6785: );
6786: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6787: RAISE fnd_api.g_exc_unexpected_error;
6788: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6789: RAISE fnd_api.g_exc_error;
6790: END IF;
6791: END IF;
6792: END IF;
6785: );
6786: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6787: RAISE fnd_api.g_exc_unexpected_error;
6788: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6789: RAISE fnd_api.g_exc_error;
6790: END IF;
6791: END IF;
6792: END IF;
6793:
6803: ,p_conv_date=> p_conv_date
6804: ,p_from_amount=> p_amount_1
6805: ,x_to_amount=> x_amount_3
6806: );
6807: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6808: RAISE fnd_api.g_exc_unexpected_error;
6809: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6810: RAISE fnd_api.g_exc_error;
6811: END IF;
6804: ,p_from_amount=> p_amount_1
6805: ,x_to_amount=> x_amount_3
6806: );
6807: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6808: RAISE fnd_api.g_exc_unexpected_error;
6809: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6810: RAISE fnd_api.g_exc_error;
6811: END IF;
6812: END IF;
6805: ,x_to_amount=> x_amount_3
6806: );
6807: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6808: RAISE fnd_api.g_exc_unexpected_error;
6809: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6810: RAISE fnd_api.g_exc_error;
6811: END IF;
6812: END IF;
6813: END IF;
6806: );
6807: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6808: RAISE fnd_api.g_exc_unexpected_error;
6809: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6810: RAISE fnd_api.g_exc_error;
6811: END IF;
6812: END IF;
6813: END IF;
6814: ELSE
6824: ,p_conv_date=> p_conv_date
6825: ,p_from_amount=> p_amount_2
6826: ,x_to_amount=> x_amount_1
6827: );
6828: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6829: RAISE fnd_api.g_exc_unexpected_error;
6830: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6831: RAISE fnd_api.g_exc_error;
6832: END IF;
6825: ,p_from_amount=> p_amount_2
6826: ,x_to_amount=> x_amount_1
6827: );
6828: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6829: RAISE fnd_api.g_exc_unexpected_error;
6830: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6831: RAISE fnd_api.g_exc_error;
6832: END IF;
6833: END IF;
6826: ,x_to_amount=> x_amount_1
6827: );
6828: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6829: RAISE fnd_api.g_exc_unexpected_error;
6830: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6831: RAISE fnd_api.g_exc_error;
6832: END IF;
6833: END IF;
6834:
6827: );
6828: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6829: RAISE fnd_api.g_exc_unexpected_error;
6830: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6831: RAISE fnd_api.g_exc_error;
6832: END IF;
6833: END IF;
6834:
6835: IF NVL(p_amount_3, 0) = 0 THEN
6844: ,p_conv_date=> p_conv_date
6845: ,p_from_amount=> p_amount_2
6846: ,x_to_amount=> x_amount_3
6847: );
6848: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6849: RAISE fnd_api.g_exc_unexpected_error;
6850: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6851: RAISE fnd_api.g_exc_error;
6852: END IF;
6845: ,p_from_amount=> p_amount_2
6846: ,x_to_amount=> x_amount_3
6847: );
6848: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6849: RAISE fnd_api.g_exc_unexpected_error;
6850: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6851: RAISE fnd_api.g_exc_error;
6852: END IF;
6853: END IF;
6846: ,x_to_amount=> x_amount_3
6847: );
6848: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6849: RAISE fnd_api.g_exc_unexpected_error;
6850: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6851: RAISE fnd_api.g_exc_error;
6852: END IF;
6853: END IF;
6854: END IF;
6847: );
6848: IF l_return_status = fnd_api.g_ret_sts_unexp_error THEN
6849: RAISE fnd_api.g_exc_unexpected_error;
6850: ELSIF l_return_status = fnd_api.g_ret_sts_error THEN
6851: RAISE fnd_api.g_exc_error;
6852: END IF;
6853: END IF;
6854: END IF;
6855: END IF;
6870: -- HISTORY
6871:
6872: PROCEDURE update_reconcile_objfundsum (
6873: p_api_version IN NUMBER,
6874: p_init_msg_list IN VARCHAR2 := Fnd_Api.G_FALSE,
6875: p_validation_level IN NUMBER := Fnd_Api.G_VALID_LEVEL_FULL,
6876: p_objfundsum_rec IN OZF_OBJFUNDSUM_PVT.objfundsum_rec_type,
6877: p_conv_date IN DATE,
6878: x_return_status OUT NOCOPY VARCHAR2,
6871:
6872: PROCEDURE update_reconcile_objfundsum (
6873: p_api_version IN NUMBER,
6874: p_init_msg_list IN VARCHAR2 := Fnd_Api.G_FALSE,
6875: p_validation_level IN NUMBER := Fnd_Api.G_VALID_LEVEL_FULL,
6876: p_objfundsum_rec IN OZF_OBJFUNDSUM_PVT.objfundsum_rec_type,
6877: p_conv_date IN DATE,
6878: x_return_status OUT NOCOPY VARCHAR2,
6879: x_msg_count OUT NOCOPY NUMBER,
6884: L_API_VERSION CONSTANT NUMBER := 1.0;
6885: L_API_NAME CONSTANT VARCHAR2(30) := 'update_reconcile_objfundsum';
6886: L_FULL_NAME CONSTANT VARCHAR2(60) := g_pkg_name ||'.'|| l_api_name;
6887:
6888: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
6889: l_objfundsum_rec OZF_OBJFUNDSUM_PVT.objfundsum_rec_type := p_objfundsum_rec;
6890: l_amount_1 NUMBER;
6891: l_amount_2 NUMBER;
6892: l_amount_3 NUMBER;
6902: IF (G_DEBUG) THEN
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,
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,
6912: L_API_NAME,
6913: G_PKG_NAME)
6914: THEN
6911: p_api_version,
6912: L_API_NAME,
6913: G_PKG_NAME)
6914: THEN
6915: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
6916: END IF;
6917:
6918: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
6919:
6914: THEN
6915: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
6916: END IF;
6917:
6918: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
6919:
6920: IF (G_DEBUG) THEN
6921: ozf_utility_pvt.debug_message(l_full_name ||': validate');
6922: END IF;
6940: x_msg_data => x_msg_data
6941: );
6942:
6943:
6944: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
6945: RAISE Fnd_Api.G_EXC_ERROR;
6946: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
6947: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
6948: END IF;
6941: );
6942:
6943:
6944: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
6945: RAISE Fnd_Api.G_EXC_ERROR;
6946: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
6947: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
6948: END IF;
6949: l_objfundsum_rec.plan_curr_planned_amt := l_amount_1;
6942:
6943:
6944: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
6945: RAISE Fnd_Api.G_EXC_ERROR;
6946: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
6947: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
6948: END IF;
6949: l_objfundsum_rec.plan_curr_planned_amt := l_amount_1;
6950: l_objfundsum_rec.planned_amt := l_amount_2;
6943:
6944: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
6945: RAISE Fnd_Api.G_EXC_ERROR;
6946: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
6947: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
6948: END IF;
6949: l_objfundsum_rec.plan_curr_planned_amt := l_amount_1;
6950: l_objfundsum_rec.planned_amt := l_amount_2;
6951: l_objfundsum_rec.univ_curr_planned_amt := l_amount_3;
6966: x_return_status => l_return_status,
6967: x_msg_count => x_msg_count,
6968: x_msg_data => x_msg_data
6969: );
6970: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
6971: RAISE Fnd_Api.G_EXC_ERROR;
6972: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
6973: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
6974: END IF;
6967: x_msg_count => x_msg_count,
6968: x_msg_data => x_msg_data
6969: );
6970: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
6971: RAISE Fnd_Api.G_EXC_ERROR;
6972: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
6973: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
6974: END IF;
6975:
6968: x_msg_data => x_msg_data
6969: );
6970: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
6971: RAISE Fnd_Api.G_EXC_ERROR;
6972: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
6973: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
6974: END IF;
6975:
6976:
6969: );
6970: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
6971: RAISE Fnd_Api.G_EXC_ERROR;
6972: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
6973: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
6974: END IF;
6975:
6976:
6977:
6995: x_return_status => l_return_status,
6996: x_msg_count => x_msg_count,
6997: x_msg_data => x_msg_data
6998: );
6999: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
7000: RAISE Fnd_Api.G_EXC_ERROR;
7001: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
7002: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
7003: END IF;
6996: x_msg_count => x_msg_count,
6997: x_msg_data => x_msg_data
6998: );
6999: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
7000: RAISE Fnd_Api.G_EXC_ERROR;
7001: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
7002: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
7003: END IF;
7004: l_objfundsum_rec.plan_curr_recal_committed_amt := l_amount_1;
6997: x_msg_data => x_msg_data
6998: );
6999: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
7000: RAISE Fnd_Api.G_EXC_ERROR;
7001: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
7002: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
7003: END IF;
7004: l_objfundsum_rec.plan_curr_recal_committed_amt := l_amount_1;
7005: l_objfundsum_rec.recal_committed_amt := l_amount_2;
6998: );
6999: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
7000: RAISE Fnd_Api.G_EXC_ERROR;
7001: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
7002: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
7003: END IF;
7004: l_objfundsum_rec.plan_curr_recal_committed_amt := l_amount_1;
7005: l_objfundsum_rec.recal_committed_amt := l_amount_2;
7006: l_objfundsum_rec.univ_curr_recal_committed_amt := l_amount_3;
7019: x_return_status => l_return_status,
7020: x_msg_count => x_msg_count,
7021: x_msg_data => x_msg_data
7022: );
7023: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
7024: RAISE Fnd_Api.G_EXC_ERROR;
7025: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
7026: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
7027: END IF;
7020: x_msg_count => x_msg_count,
7021: x_msg_data => x_msg_data
7022: );
7023: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
7024: RAISE Fnd_Api.G_EXC_ERROR;
7025: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
7026: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
7027: END IF;
7028:
7021: x_msg_data => x_msg_data
7022: );
7023: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
7024: RAISE Fnd_Api.G_EXC_ERROR;
7025: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
7026: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
7027: END IF;
7028:
7029: l_objfundsum_rec.plan_curr_utilized_amt := l_amount_1;
7022: );
7023: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
7024: RAISE Fnd_Api.G_EXC_ERROR;
7025: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
7026: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
7027: END IF;
7028:
7029: l_objfundsum_rec.plan_curr_utilized_amt := l_amount_1;
7030: l_objfundsum_rec.utilized_amt := l_amount_2;
7044: x_return_status => l_return_status,
7045: x_msg_count => x_msg_count,
7046: x_msg_data => x_msg_data
7047: );
7048: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
7049: RAISE Fnd_Api.G_EXC_ERROR;
7050: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
7051: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
7052: END IF;
7045: x_msg_count => x_msg_count,
7046: x_msg_data => x_msg_data
7047: );
7048: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
7049: RAISE Fnd_Api.G_EXC_ERROR;
7050: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
7051: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
7052: END IF;
7053: l_objfundsum_rec.plan_curr_earned_amt := l_amount_1;
7046: x_msg_data => x_msg_data
7047: );
7048: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
7049: RAISE Fnd_Api.G_EXC_ERROR;
7050: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
7051: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
7052: END IF;
7053: l_objfundsum_rec.plan_curr_earned_amt := l_amount_1;
7054: l_objfundsum_rec.earned_amt := l_amount_2;
7047: );
7048: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
7049: RAISE Fnd_Api.G_EXC_ERROR;
7050: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
7051: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
7052: END IF;
7053: l_objfundsum_rec.plan_curr_earned_amt := l_amount_1;
7054: l_objfundsum_rec.earned_amt := l_amount_2;
7055: l_objfundsum_rec.univ_curr_earned_amt := l_amount_3;
7068: x_return_status => l_return_status,
7069: x_msg_count => x_msg_count,
7070: x_msg_data => x_msg_data
7071: );
7072: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
7073: RAISE Fnd_Api.G_EXC_ERROR;
7074: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
7075: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
7076: END IF;
7069: x_msg_count => x_msg_count,
7070: x_msg_data => x_msg_data
7071: );
7072: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
7073: RAISE Fnd_Api.G_EXC_ERROR;
7074: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
7075: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
7076: END IF;
7077: l_objfundsum_rec.plan_curr_paid_amt := l_amount_1;
7070: x_msg_data => x_msg_data
7071: );
7072: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
7073: RAISE Fnd_Api.G_EXC_ERROR;
7074: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
7075: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
7076: END IF;
7077: l_objfundsum_rec.plan_curr_paid_amt := l_amount_1;
7078: l_objfundsum_rec.paid_amt := l_amount_2;
7071: );
7072: IF l_return_status = Fnd_Api.G_RET_STS_ERROR THEN
7073: RAISE Fnd_Api.G_EXC_ERROR;
7074: ELSIF l_return_status = Fnd_Api.G_RET_STS_UNEXP_ERROR THEN
7075: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
7076: END IF;
7077: l_objfundsum_rec.plan_curr_paid_amt := l_amount_1;
7078: l_objfundsum_rec.paid_amt := l_amount_2;
7079: l_objfundsum_rec.univ_curr_paid_amt := l_amount_3;
7087: x_msg_count => x_msg_count,
7088: x_msg_data => x_msg_data,
7089: x_return_status => l_return_status
7090: );
7091: IF l_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
7092: RAISE Fnd_Api.g_exc_unexpected_error;
7093: ELSIF l_return_status = Fnd_Api.g_ret_sts_error THEN
7094: RAISE Fnd_Api.g_exc_error;
7095: END IF;
7088: x_msg_data => x_msg_data,
7089: x_return_status => l_return_status
7090: );
7091: IF l_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
7092: RAISE Fnd_Api.g_exc_unexpected_error;
7093: ELSIF l_return_status = Fnd_Api.g_ret_sts_error THEN
7094: RAISE Fnd_Api.g_exc_error;
7095: END IF;
7096: END IF;
7089: x_return_status => l_return_status
7090: );
7091: IF l_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
7092: RAISE Fnd_Api.g_exc_unexpected_error;
7093: ELSIF l_return_status = Fnd_Api.g_ret_sts_error THEN
7094: RAISE Fnd_Api.g_exc_error;
7095: END IF;
7096: END IF;
7097:
7090: );
7091: IF l_return_status = Fnd_Api.g_ret_sts_unexp_error THEN
7092: RAISE Fnd_Api.g_exc_unexpected_error;
7093: ELSIF l_return_status = Fnd_Api.g_ret_sts_error THEN
7094: RAISE Fnd_Api.g_exc_error;
7095: END IF;
7096: END IF;
7097:
7098:
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:
7161: Fnd_Msg_Pub.Count_And_Get (
7162: p_count => x_msg_count,
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: );
7166:
7167: IF (G_DEBUG) THEN
7168: ozf_utility_pvt.debug_message(l_full_name ||': end');
7169: END IF;
7170:
7171:
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,
7171:
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
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: );
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;
7177: p_count => x_msg_count,
7178: p_data => x_msg_data,
7179: p_encoded => FND_API.G_FALSE
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,
7179: p_encoded => FND_API.G_FALSE
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
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: );
7189: WHEN OTHERS THEN
7190: ROLLBACK TO SP_update_reconcile_objfundsum;
7191: x_return_status := Fnd_Api.G_RET_STS_UNEXP_ERROR;
7187: p_encoded => FND_API.G_FALSE
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 (
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: );
7200: END update_reconcile_objfundsum;
7201: */
7202: