DBA Data[Home] [Help]

APPS.PA_FIN_PLAN_UTILS dependencies on PA_FP_TXN_CURRENCIES

Line 841: -- 1. pa_fp_txn_currencies

837: -- Refer to Update "16-JAN-04 sagarwal" in the history above.
838: -- This has been added as part of code merge
839: -- This procedure deletes the Financial Planning data pertaining
840: -- to the project id given as input parameter from
841: -- 1. pa_fp_txn_currencies
842: -- 2. pa_proj_fp_options
843: -- 3. pa_fp_elements
844: -- 4. pa_proj_period_profiles
845: --==========================================================================

Line 848: p_project_id IN PA_FP_TXN_CURRENCIES.PROJECT_ID%TYPE

844: -- 4. pa_proj_period_profiles
845: --==========================================================================
846:
847: procedure Delete_Fp_Options(
848: p_project_id IN PA_FP_TXN_CURRENCIES.PROJECT_ID%TYPE
849: , x_err_code IN OUT NOCOPY NUMBER) --File.Sql.39 bug 4440895
850: is
851: begin
852:

Line 856: -- delete from pa_fp_txn_currencies table

852:
853: -- delete from pa_proj_fp_options table
854: delete from pa_proj_fp_options where project_id=p_project_id;
855:
856: -- delete from pa_fp_txn_currencies table
857: delete from pa_fp_txn_currencies where project_id=p_project_id;
858:
859: /* Changes for FPM, Tracking Bug No - 3354518
860: Commenting out code below for delete statment from pa_fp_elements

Line 857: delete from pa_fp_txn_currencies where project_id=p_project_id;

853: -- delete from pa_proj_fp_options table
854: delete from pa_proj_fp_options where project_id=p_project_id;
855:
856: -- delete from pa_fp_txn_currencies table
857: delete from pa_fp_txn_currencies where project_id=p_project_id;
858:
859: /* Changes for FPM, Tracking Bug No - 3354518
860: Commenting out code below for delete statment from pa_fp_elements
861: as this table is getting obsoleted */

Line 898: -- This procedure updates the Project Currency in pa_fp_txn_currencies

894: --=========================================================================
895: --bug #3224177
896: -- Refer to Update "16-JAN-04 sagarwal" in the history above.
897: -- This has been added as part of code merge
898: -- This procedure updates the Project Currency in pa_fp_txn_currencies
899: -- whenever Porject currency is updated
900:
901: -- FP M Phase II Development
902: -- Bug 3583619

Line 913: (p_project_id IN PA_FP_TXN_CURRENCIES.PROJECT_ID%TYPE

909: -- options of the project should be updated when this api is called.
910: -- Rewritten the complete api to update multiple options
911: --==========================================================================
912: PROCEDURE Update_Txn_Currencies
913: (p_project_id IN PA_FP_TXN_CURRENCIES.PROJECT_ID%TYPE
914: ,p_proj_curr_code IN PA_FP_TXN_CURRENCIES.TXN_CURRENCY_CODE%TYPE)
915: is
916: cursor get_all_fp_options_cur is
917: select proj_fp_options_id

Line 914: ,p_proj_curr_code IN PA_FP_TXN_CURRENCIES.TXN_CURRENCY_CODE%TYPE)

910: -- Rewritten the complete api to update multiple options
911: --==========================================================================
912: PROCEDURE Update_Txn_Currencies
913: (p_project_id IN PA_FP_TXN_CURRENCIES.PROJECT_ID%TYPE
914: ,p_proj_curr_code IN PA_FP_TXN_CURRENCIES.TXN_CURRENCY_CODE%TYPE)
915: is
916: cursor get_all_fp_options_cur is
917: select proj_fp_options_id
918: from pa_proj_fp_options

Line 926: from pa_fp_txn_currencies

922:
923: cursor get_project_currency (c_proj_fp_options_id NUMBER)is
924: select fp_txn_currency_id,
925: txn_currency_code
926: from pa_fp_txn_currencies
927: where project_id = p_project_id
928: and project_currency_flag='Y'
929: and proj_fp_options_id = c_proj_fp_options_id;
930:

Line 934: from pa_fp_txn_currencies

930:
931: cursor get_proj_func_currency (c_proj_fp_options_id NUMBER)is
932: select fp_txn_currency_id,
933: txn_currency_code
934: from pa_fp_txn_currencies
935: where project_id = p_project_id
936: and projfunc_currency_flag='Y'
937: and proj_fp_options_id = c_proj_fp_options_id;
938:

Line 941: from pa_fp_txn_currencies

937: and proj_fp_options_id = c_proj_fp_options_id;
938:
939: cursor check_proj_currency_exists (c_proj_fp_options_id NUMBER)is
940: select fp_txn_currency_id
941: from pa_fp_txn_currencies
942: where project_id = p_project_id
943: and txn_currency_code = p_proj_curr_code
944: and project_currency_flag='N'
945: and proj_fp_options_id = c_proj_fp_options_id;

Line 955: l_proj_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;

951: INDEX BY BINARY_INTEGER;
952: l_plan_in_multi_curr_tbl plan_in_multi_curr_tbl;
953: cnt NUMBER := 0;
954:
955: l_proj_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;
956: l_projfunc_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;
957: l_txn_currency_id NUMBER;
958: l_pc_currency_id NUMBER;
959: l_pfc_currency_id NUMBER;

Line 956: l_projfunc_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;

952: l_plan_in_multi_curr_tbl plan_in_multi_curr_tbl;
953: cnt NUMBER := 0;
954:
955: l_proj_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;
956: l_projfunc_curr_code pa_fp_txn_currencies.txn_currency_code%TYPE;
957: l_txn_currency_id NUMBER;
958: l_pc_currency_id NUMBER;
959: l_pfc_currency_id NUMBER;
960:

Line 1003: delete from pa_fp_txn_currencies

999: if (l_txn_currency_id is not NULL) then
1000:
1001: -- delete the old project currency
1002:
1003: delete from pa_fp_txn_currencies
1004: where fp_txn_currency_id = l_txn_currency_id;
1005:
1006: -- check if the new project currency selected by user is PFC
1007: if (l_pfc_currency_id <> l_txn_currency_id) then

Line 1009: update pa_fp_txn_currencies

1005:
1006: -- check if the new project currency selected by user is PFC
1007: if (l_pfc_currency_id <> l_txn_currency_id) then
1008:
1009: update pa_fp_txn_currencies
1010: set txn_currency_code = p_proj_curr_code
1011: where fp_txn_currency_id = l_pc_currency_id;
1012:
1013: else

Line 1016: update pa_fp_txn_currencies

1012:
1013: else
1014: -- new PC selected by user is PFC
1015:
1016: update pa_fp_txn_currencies
1017: set txn_currency_code = p_proj_curr_code,
1018: projfunc_currency_flag = 'Y'
1019: where fp_txn_currency_id = l_pc_currency_id;
1020: end if; -- END FOR l_pfc_currency_id <> l_txn_currency_id

Line 1022: update pa_fp_txn_currencies

1018: projfunc_currency_flag = 'Y'
1019: where fp_txn_currency_id = l_pc_currency_id;
1020: end if; -- END FOR l_pfc_currency_id <> l_txn_currency_id
1021: else
1022: update pa_fp_txn_currencies
1023: set txn_currency_code = p_proj_curr_code
1024: where fp_txn_currency_id = l_pc_currency_id;
1025:
1026: end if;

Line 1031: update pa_fp_txn_currencies

1027: else
1028: -- project currency and project functional currency are the same
1029: -- update PC flag to N
1030:
1031: update pa_fp_txn_currencies
1032: set project_currency_flag='N'
1033: where fp_txn_currency_id = l_pc_currency_id;
1034:
1035: if (l_txn_currency_id is not NULL) then

Line 1037: update pa_fp_txn_currencies

1033: where fp_txn_currency_id = l_pc_currency_id;
1034:
1035: if (l_txn_currency_id is not NULL) then
1036: -- if already existing txn currency is selected as PC
1037: update pa_fp_txn_currencies
1038: set project_currency_flag='Y'
1039: where fp_txn_currency_id = l_txn_currency_id;
1040: else
1041: -- insert the new PC

Line 1043: INSERT INTO PA_FP_TXN_CURRENCIES (

1039: where fp_txn_currency_id = l_txn_currency_id;
1040: else
1041: -- insert the new PC
1042:
1043: INSERT INTO PA_FP_TXN_CURRENCIES (
1044: fp_txn_currency_id
1045: ,proj_fp_options_id
1046: ,project_id
1047: ,fin_plan_type_id

Line 1065: SELECT pa_fp_txn_currencies_s.NEXTVAL

1061: ,project_rev_exchange_rate
1062: ,projfunc_cost_exchange_Rate
1063: ,projfunc_rev_exchange_Rate
1064: )
1065: SELECT pa_fp_txn_currencies_s.NEXTVAL
1066: , PROJ_FP_OPTIONS_ID
1067: , PROJECT_ID
1068: , FIN_PLAN_TYPE_ID
1069: , FIN_PLAN_VERSION_ID

Line 1085: FROM PA_FP_TXN_CURRENCIES

1081: , PROJECT_COST_EXCHANGE_RATE
1082: , PROJECT_REV_EXCHANGE_RATE
1083: , PROJFUNC_COST_EXCHANGE_RATE
1084: , PROJFUNC_REV_EXCHANGE_RATE
1085: FROM PA_FP_TXN_CURRENCIES
1086: where fp_txn_currency_id = l_pc_currency_id;
1087: end if; -- l_txn_currency_id is not NULL ends
1088: end if; -- l_proj_curr_code <> l_projfunc_curr_code ends
1089: end if; -- trim(l_proj_curr_code) <> trim(p_proj_curr_code)

Line 2822: p_txn_currency_code IN pa_fp_txn_currencies.txn_currency_code%TYPE

2818: END Check_Version_Name_Or_Id;
2819:
2820: PROCEDURE Check_Currency_Name_Or_Code
2821: (
2822: p_txn_currency_code IN pa_fp_txn_currencies.txn_currency_code%TYPE
2823: ,p_currency_code_name IN VARCHAR2
2824: ,p_check_id_flag IN VARCHAR2
2825: ,x_txn_currency_code OUT NOCOPY pa_fp_txn_currencies.txn_currency_code%TYPE --File.Sql.39 bug 4440895
2826: ,x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895

Line 2825: ,x_txn_currency_code OUT NOCOPY pa_fp_txn_currencies.txn_currency_code%TYPE --File.Sql.39 bug 4440895

2821: (
2822: p_txn_currency_code IN pa_fp_txn_currencies.txn_currency_code%TYPE
2823: ,p_currency_code_name IN VARCHAR2
2824: ,p_check_id_flag IN VARCHAR2
2825: ,x_txn_currency_code OUT NOCOPY pa_fp_txn_currencies.txn_currency_code%TYPE --File.Sql.39 bug 4440895
2826: ,x_return_status OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
2827: ,x_msg_count OUT NOCOPY NUMBER --File.Sql.39 bug 4440895
2828: ,x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
2829: ) IS

Line 2843: FROM pa_fp_txn_currencies

2839:
2840: IF p_check_id_flag = 'Y' THEN
2841: SELECT txn_currency_code
2842: INTO x_txn_currency_code
2843: FROM pa_fp_txn_currencies
2844: WHERE txn_currency_code = p_txn_currency_code;
2845: ELSIF p_check_id_flag = 'N' THEN
2846: x_txn_currency_code := p_txn_currency_code;
2847: END IF;

Line 3540: Modified the second exists clause to avoid FT scan on pa_fp_txn_currencies

3536: return VARCHAR2 is
3537: l_return VARCHAR2(1) := 'N';
3538: BEGIN
3539: /* Bug 3106741
3540: Modified the second exists clause to avoid FT scan on pa_fp_txn_currencies
3541: table. As an index is available on proj_fp_options_id for the above table,
3542: pa_proj_fp_options table has been included to fetch all the options that
3543: belong to a given project.
3544: */

Line 3569: from pa_fp_txn_currencies fpcurr,

3565: pa.project_id = p_project_id and
3566: pfo.fin_plan_option_level_code = 'PLAN_TYPE');
3567: /* commented for bug 3224177 starts
3568: OR exists (Select 'x'
3569: from pa_fp_txn_currencies fpcurr,
3570: pa_proj_fp_options pfo, -- bug 3106741
3571: pa_projects_all pa
3572: where pa.project_currency_code = fpcurr.txn_currency_code
3573: and pa.project_id = fpcurr.project_id