DBA Data[Home] [Help]

APPS.PA_FP_TXN_CURRENCIES_PUB dependencies on PA_FP_TXN_CURRENCIES

Line 1: PACKAGE BODY pa_fp_txn_currencies_pub AS

1: PACKAGE BODY pa_fp_txn_currencies_pub AS
2: /* $Header: PAFPTXCB.pls 120.1 2005/08/19 16:30:38 mwasowic noship $*/
3:
4: Invalid_Arg_Exc EXCEPTION;
5: l_module_name VARCHAR2(100):= 'pa.plsql.pa_fp_txn_currencies_pub';

Line 5: l_module_name VARCHAR2(100):= 'pa.plsql.pa_fp_txn_currencies_pub';

1: PACKAGE BODY pa_fp_txn_currencies_pub AS
2: /* $Header: PAFPTXCB.pls 120.1 2005/08/19 16:30:38 mwasowic noship $*/
3:
4: Invalid_Arg_Exc EXCEPTION;
5: l_module_name VARCHAR2(100):= 'pa.plsql.pa_fp_txn_currencies_pub';
6:
7: /*===========================================================================
8: This api copies pa_fp_txn_currencies from one proj option to another.
9: If p_target_fp_preference_code isn't passed then it's vale is fetched from

Line 8: This api copies pa_fp_txn_currencies from one proj option to another.

4: Invalid_Arg_Exc EXCEPTION;
5: l_module_name VARCHAR2(100):= 'pa.plsql.pa_fp_txn_currencies_pub';
6:
7: /*===========================================================================
8: This api copies pa_fp_txn_currencies from one proj option to another.
9: If p_target_fp_preference_code isn't passed then it's vale is fetched from
10: pa_proj_fp_options table.
11:
12: 3/30/2004 Raja FP M Phase II Dev changes

Line 48: l_srce_cost_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;

44:
45: l_source_project_id pa_projects_all.project_id%TYPE;
46: l_source_fp_option_id pa_proj_fp_options.proj_fp_options_id%TYPE;
47:
48: l_srce_cost_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;
49: l_srce_rev_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;
50: l_srce_all_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;
51: l_only_projfunc_curr BOOLEAN; -- Added for #2632410.
52:

Line 49: l_srce_rev_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;

45: l_source_project_id pa_projects_all.project_id%TYPE;
46: l_source_fp_option_id pa_proj_fp_options.proj_fp_options_id%TYPE;
47:
48: l_srce_cost_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;
49: l_srce_rev_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;
50: l_srce_all_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;
51: l_only_projfunc_curr BOOLEAN; -- Added for #2632410.
52:
53: CURSOR target_fp_options_cur IS

Line 50: l_srce_all_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;

46: l_source_fp_option_id pa_proj_fp_options.proj_fp_options_id%TYPE;
47:
48: l_srce_cost_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;
49: l_srce_rev_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;
50: l_srce_all_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;
51: l_only_projfunc_curr BOOLEAN; -- Added for #2632410.
52:
53: CURSOR target_fp_options_cur IS
54: SELECT project_id

Line 76: FROM pa_fp_txn_currencies

72: proj_pf_currencies_rec proj_pf_currencies_cur%ROWTYPE;
73:
74: CURSOR default_all_curr_code IS
75: SELECT txn_currency_code
76: FROM pa_fp_txn_currencies
77: WHERE proj_fp_options_id = p_target_fp_option_id
78: AND default_all_curr_flag = 'Y';
79:
80: CURSOR default_cost_curr_code IS

Line 82: FROM pa_fp_txn_currencies

78: AND default_all_curr_flag = 'Y';
79:
80: CURSOR default_cost_curr_code IS
81: SELECT txn_currency_code
82: FROM pa_fp_txn_currencies
83: WHERE proj_fp_options_id = p_target_fp_option_id
84: AND default_cost_curr_flag = 'Y';
85:
86: CURSOR default_rev_curr_code IS

Line 88: FROM pa_fp_txn_currencies

84: AND default_cost_curr_flag = 'Y';
85:
86: CURSOR default_rev_curr_code IS
87: SELECT txn_currency_code
88: FROM pa_fp_txn_currencies
89: WHERE proj_fp_options_id = p_target_fp_option_id
90: AND default_rev_curr_flag = 'Y';
91:
92: BEGIN

Line 95: pa_debug.set_err_stack('PA_FP_TXN_CURRENCIES_PUB.Copy_Fp_Txn_Currencies');

91:
92: BEGIN
93:
94: -- Set the error stack.
95: pa_debug.set_err_stack('PA_FP_TXN_CURRENCIES_PUB.Copy_Fp_Txn_Currencies');
96:
97: -- Get the Debug mode into local variable and set it to 'Y' if its NULL
98: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
99: l_debug_mode := NVL(l_debug_mode, 'Y');

Line 194: DELETE FROM pa_fp_txn_currencies

190: END IF;
191:
192: --Delete the existing fp txn currencies of the target fp option
193:
194: DELETE FROM pa_fp_txn_currencies
195: WHERE proj_fp_options_id = p_target_fp_option_id;
196:
197: -- p_plan_in_multi_curr_flag = 'N' condition has been added (for bug :- 2706430) to insert
198: -- PC and PFC as txn currencies incase multi currency isn't enabled

Line 274: pa_debug.g_err_stage:='Inserting records into pa_fp_txn_currencies for the target ';

270:
271: ELSE -- Do the processing as it was previously
272:
273: IF P_PA_DEBUG_MODE = 'Y' THEN
274: pa_debug.g_err_stage:='Inserting records into pa_fp_txn_currencies for the target ';
275: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
276: END IF;
277:
278: INSERT INTO PA_FP_TXN_CURRENCIES (

Line 278: INSERT INTO PA_FP_TXN_CURRENCIES (

274: pa_debug.g_err_stage:='Inserting records into pa_fp_txn_currencies for the target ';
275: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
276: END IF;
277:
278: INSERT INTO PA_FP_TXN_CURRENCIES (
279: fp_txn_currency_id
280: ,proj_fp_options_id
281: ,project_id
282: ,fin_plan_type_id

Line 299: SELECT pa_fp_txn_currencies_s.NEXTVAL

295: ,project_cost_exchange_rate --fix for bug 2613901
296: ,project_rev_exchange_rate
297: ,projfunc_cost_exchange_Rate
298: ,projfunc_rev_exchange_Rate)
299: SELECT pa_fp_txn_currencies_s.NEXTVAL
300: ,p_target_fp_option_id
301: ,target_fp_options_rec.project_id --project_id of target fp option
302: ,target_fp_options_rec.fin_plan_type_id --plan_type of target fp option
303: ,target_fp_options_rec.fin_plan_version_id --plan version of target fp option

Line 319: FROM pa_fp_txn_currencies

315: ,project_cost_exchange_rate --fix for bug 2613901
316: ,project_rev_exchange_rate
317: ,projfunc_cost_exchange_Rate
318: ,projfunc_rev_exchange_Rate
319: FROM pa_fp_txn_currencies
320: WHERE proj_fp_options_id = l_source_fp_option_id;
321:
322: IF SQL%rowcount = 0 THEN
323:

Line 382: PA_FP_TXN_CURRENCIES_PUB.Set_Default_Currencies(

378: pa_debug.g_err_stage:='Calling Set_Default_Currencies';
379: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
380: END IF;
381:
382: PA_FP_TXN_CURRENCIES_PUB.Set_Default_Currencies(
383: p_target_fp_option_id => p_target_fp_option_id
384: ,p_target_preference_code => target_fp_options_rec.fin_plan_preference_code
385: ,p_approved_rev_plan_type_flag => target_fp_options_rec.approved_rev_plan_type_flag
386: ,p_srce_all_default_curr_code => l_srce_all_default_curr_code

Line 448: FND_MSG_PUB.add_exc_msg( p_pkg_name => 'PA_FP_TXN_CURRENCIES_PUB'

444: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
445: x_msg_count := 1;
446: x_msg_data := SQLERRM;
447:
448: FND_MSG_PUB.add_exc_msg( p_pkg_name => 'PA_FP_TXN_CURRENCIES_PUB'
449: ,p_procedure_name => 'COPY_FP_TXN_CURRENCIES');
450:
451: IF P_PA_DEBUG_MODE = 'Y' THEN
452: pa_debug.g_err_stage:='Unexpeted Error';

Line 497: INSERT INTO PA_FP_TXN_CURRENCIES (

493: pa_debug.g_err_stage:='Inserting project currency as default currency ';
494: pa_debug.write('Insert_Default_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
495: END IF;
496:
497: INSERT INTO PA_FP_TXN_CURRENCIES (
498: fp_txn_currency_id
499: ,proj_fp_options_id
500: ,project_id
501: ,fin_plan_type_id

Line 519: SELECT pa_fp_txn_currencies_s.NEXTVAL

515: ,project_rev_exchange_rate
516: ,projfunc_cost_exchange_Rate
517: ,projfunc_rev_exchange_Rate
518: )
519: SELECT pa_fp_txn_currencies_s.NEXTVAL
520: ,p_target_fp_option_id
521: ,p_project_id --project_id of target fp option
522: ,p_fin_plan_type_id --plan_type of target fp option
523: ,p_fin_plan_version_id --plan version of target fp option

Line 554: INSERT INTO PA_FP_TXN_CURRENCIES (

550: pa_debug.g_err_stage:='Inserting projfunc currency ';
551: pa_debug.write('Insert_Default_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
552: END IF;
553:
554: INSERT INTO PA_FP_TXN_CURRENCIES (
555: fp_txn_currency_id
556: ,proj_fp_options_id
557: ,project_id
558: ,fin_plan_type_id

Line 575: SELECT pa_fp_txn_currencies_s.NEXTVAL

571: ,project_cost_exchange_rate --fix for bug 2613901
572: ,project_rev_exchange_rate
573: ,projfunc_cost_exchange_Rate
574: ,projfunc_rev_exchange_Rate)
575: SELECT pa_fp_txn_currencies_s.NEXTVAL
576: ,p_target_fp_option_id
577: ,p_project_id --project_id of target fp option
578: ,p_fin_plan_type_id --plan_type of target fp option
579: ,p_fin_plan_version_id --plan version of target fp option

Line 606: PA_FP_TXN_CURRENCIES_PUB.Set_Default_Currencies(

602: pa_debug.g_err_stage:='Calling Set_Default_Currencies';
603: pa_debug.write('Insert_Default_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
604: END IF;
605:
606: PA_FP_TXN_CURRENCIES_PUB.Set_Default_Currencies(
607: p_target_fp_option_id => p_target_fp_option_id
608: ,p_target_preference_code => p_fin_plan_preference_code
609: ,p_approved_rev_plan_type_flag => p_approved_rev_plan_type_flag
610: ,p_srce_all_default_curr_code => NULL

Line 643: l_srce_cost_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;

639: ,p_srce_cost_default_curr_code IN VARCHAR2
640: ,p_project_currency_code IN VARCHAR2
641: ,p_projfunc_currency_code IN VARCHAR2 )
642: AS
643: l_srce_cost_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;
644: l_srce_rev_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;
645: l_srce_all_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;
646: BEGIN
647:

Line 644: l_srce_rev_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;

640: ,p_project_currency_code IN VARCHAR2
641: ,p_projfunc_currency_code IN VARCHAR2 )
642: AS
643: l_srce_cost_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;
644: l_srce_rev_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;
645: l_srce_all_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;
646: BEGIN
647:
648: IF P_PA_DEBUG_MODE = 'Y' THEN

Line 645: l_srce_all_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;

641: ,p_projfunc_currency_code IN VARCHAR2 )
642: AS
643: l_srce_cost_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;
644: l_srce_rev_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;
645: l_srce_all_default_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;
646: BEGIN
647:
648: IF P_PA_DEBUG_MODE = 'Y' THEN
649: pa_debug.g_err_stage:='Target_preference_code ='||p_target_preference_code;

Line 676: UPDATE pa_fp_txn_currencies

672: l_srce_cost_default_curr_code := p_project_currency_code;
673:
674: END IF;
675:
676: UPDATE pa_fp_txn_currencies
677: SET default_cost_curr_flag = DECODE(txn_currency_code,l_srce_cost_default_curr_code,'Y','N')
678: ,default_rev_curr_flag = 'N'
679: ,default_all_curr_flag = 'N'
680: WHERE proj_fp_options_id = p_target_fp_option_id ;

Line 717: UPDATE pa_fp_txn_currencies

713:
714: -- END IF;
715:
716:
717: UPDATE pa_fp_txn_currencies
718: SET default_cost_curr_flag = 'N'
719: ,default_rev_curr_flag = DECODE(txn_currency_code,l_srce_rev_default_curr_code,'Y','N')
720: ,default_all_curr_flag = 'N'
721: WHERE proj_fp_options_id = p_target_fp_option_id ;

Line 759: UPDATE pa_fp_txn_currencies

755: l_srce_all_default_curr_code := p_project_currency_code;
756:
757: END IF;
758:
759: UPDATE pa_fp_txn_currencies
760: SET default_cost_curr_flag = 'N'
761: ,default_rev_curr_flag = 'N'
762: ,default_all_curr_flag = DECODE(txn_currency_code,l_srce_all_default_curr_code,'Y','N')
763: WHERE proj_fp_options_id = p_target_fp_option_id ;

Line 817: UPDATE pa_fp_txn_currencies

813: pa_debug.g_err_stage:='About to update ';
814: pa_debug.write('Set_Default_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
815: END IF;
816:
817: UPDATE pa_fp_txn_currencies
818: SET default_cost_curr_flag = DECODE(txn_currency_code,l_srce_cost_default_curr_code,'Y','N')
819: ,default_rev_curr_flag = DECODE(txn_currency_code,l_srce_rev_default_curr_code,'Y','N')
820: ,default_all_curr_flag = 'N'
821: WHERE proj_fp_options_id = p_target_fp_option_id ;

Line 834: in the pa_fp_txn_currencies table.

830: END Set_Default_Currencies;
831:
832: /*==============================================================================
833: This api is used to enter the agreement currency for the control item versions
834: in the pa_fp_txn_currencies table.
835: ===============================================================================*/
836:
837: PROCEDURE enter_agreement_curr_for_ci
838: ( p_project_id IN pa_budget_versions.project_id%TYPE

Line 877: pa_debug.set_err_stack('pa_fp_txn_currencies_pub.enter_agreement_curr_for_ci');

873: BEGIN
874:
875: x_msg_count := 0;
876: x_return_status := FND_API.G_RET_STS_SUCCESS;
877: pa_debug.set_err_stack('pa_fp_txn_currencies_pub.enter_agreement_curr_for_ci');
878: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
879: l_debug_mode := NVL(l_debug_mode, 'Y');
880: IF P_PA_DEBUG_MODE = 'Y' THEN
881: pa_debug.set_process('enter_agreement_curr_for_ci: ' || 'PLSQL','LOG',l_debug_mode);

Line 987: DELETE FROM PA_FP_TXN_CURRENCIES

983: END IF;
984:
985:
986: -- Delete the entry already there (if any) for the version
987: DELETE FROM PA_FP_TXN_CURRENCIES
988: WHERE proj_fp_options_id = version_details_rec.proj_fp_options_id;
989: -- Insert into the pa_fp_txn_currencies table
990:
991: INSERT INTO PA_FP_TXN_CURRENCIES (

Line 989: -- Insert into the pa_fp_txn_currencies table

985:
986: -- Delete the entry already there (if any) for the version
987: DELETE FROM PA_FP_TXN_CURRENCIES
988: WHERE proj_fp_options_id = version_details_rec.proj_fp_options_id;
989: -- Insert into the pa_fp_txn_currencies table
990:
991: INSERT INTO PA_FP_TXN_CURRENCIES (
992: fp_txn_currency_id
993: ,proj_fp_options_id

Line 991: INSERT INTO PA_FP_TXN_CURRENCIES (

987: DELETE FROM PA_FP_TXN_CURRENCIES
988: WHERE proj_fp_options_id = version_details_rec.proj_fp_options_id;
989: -- Insert into the pa_fp_txn_currencies table
990:
991: INSERT INTO PA_FP_TXN_CURRENCIES (
992: fp_txn_currency_id
993: ,proj_fp_options_id
994: ,project_id
995: ,fin_plan_type_id

Line 1012: SELECT pa_fp_txn_currencies_s.NEXTVAL

1008: ,project_cost_exchange_rate
1009: ,project_rev_exchange_rate
1010: ,projfunc_cost_exchange_Rate
1011: ,projfunc_rev_exchange_Rate)
1012: SELECT pa_fp_txn_currencies_s.NEXTVAL
1013: ,version_details_rec.proj_fp_options_id
1014: ,p_project_id
1015: ,version_details_rec.fin_plan_type_id
1016: ,p_fin_plan_version_id

Line 1072: FND_MSG_PUB.add_exc_msg( p_pkg_name => 'pa_fp_txn_currencies_pub'

1068:
1069: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1070: x_msg_count := 1;
1071: x_msg_data := SQLERRM;
1072: FND_MSG_PUB.add_exc_msg( p_pkg_name => 'pa_fp_txn_currencies_pub'
1073: ,p_procedure_name => 'enter_agreement_curr_for_ci');
1074: IF P_PA_DEBUG_MODE = 'Y' THEN
1075: pa_debug.g_err_stage:= 'Unexpected Error'||SQLERRM;
1076: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);

Line 1084: the Project Functional currency attributes have to be inserted into pa_fp_txn_currencies table.

1080: END enter_agreement_curr_for_ci;
1081:
1082: /*===============================================================================================
1083: Bug #2632410: The following function has been added to return the flag which indicates if only
1084: the Project Functional currency attributes have to be inserted into pa_fp_txn_currencies table.
1085: Only Project Functional Currency has to be inserted in the following situations:
1086: - The Approved Revenue Flag for the Proj FP Option ID is 'Y'
1087: - The Plan level is either 'PLAN_TYPE' or 'PLAN_VERSION'
1088: - The Preference Code is either 'COST_AND_REV_SAME' or 'REVENUE_ONLY'

Line 1161: END pa_fp_txn_currencies_pub;

1157: RETURN l_insert_only_proj_func_curr;
1158:
1159: END Insert_Only_Projfunc_Curr;
1160:
1161: END pa_fp_txn_currencies_pub;