15: are copied from source to target option
16:
17: ============================================================================*/
18:
19: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
20:
21: PROCEDURE Copy_Fp_Txn_Currencies (
22: p_source_fp_option_id IN NUMBER
23: ,p_target_fp_option_id IN NUMBER
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');
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');
100:
101: -- Initialize the return status to success
102: x_return_status := FND_API.G_RET_STS_SUCCESS;
101: -- Initialize the return status to success
102: x_return_status := FND_API.G_RET_STS_SUCCESS;
103: x_msg_count := 0;
104:
105: IF P_PA_DEBUG_MODE = 'Y' THEN
106: pa_debug.set_process('Copy_Fp_Txn_Currencies: ' || 'PLSQL','LOG',l_debug_mode);
107: END IF;
108:
109: -- Check for business rules violations
102: x_return_status := FND_API.G_RET_STS_SUCCESS;
103: x_msg_count := 0;
104:
105: IF P_PA_DEBUG_MODE = 'Y' THEN
106: pa_debug.set_process('Copy_Fp_Txn_Currencies: ' || 'PLSQL','LOG',l_debug_mode);
107: END IF;
108:
109: -- Check for business rules violations
110:
107: END IF;
108:
109: -- Check for business rules violations
110:
111: IF P_PA_DEBUG_MODE = 'Y' THEN
112: pa_debug.g_err_stage:='Validating input parameters';
113: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
114: END IF;
115:
108:
109: -- Check for business rules violations
110:
111: IF P_PA_DEBUG_MODE = 'Y' THEN
112: pa_debug.g_err_stage:='Validating input parameters';
113: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
114: END IF;
115:
116: -- Check if source and target fp option ids are null
109: -- Check for business rules violations
110:
111: IF P_PA_DEBUG_MODE = 'Y' THEN
112: pa_debug.g_err_stage:='Validating input parameters';
113: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
114: END IF;
115:
116: -- Check if source and target fp option ids are null
117:
118: IF (p_target_fp_option_id IS NULL) OR
119: (p_plan_in_multi_curr_flag IS NULL)
120: THEN
121:
122: IF P_PA_DEBUG_MODE = 'Y' THEN
123: pa_debug.g_err_stage:='Target_fp_option_id = '||p_target_fp_option_id;
124: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,5);
125: pa_debug.g_err_stage:='Target_fp_option_id = '||p_plan_in_multi_curr_flag;
126: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,5);
119: (p_plan_in_multi_curr_flag IS NULL)
120: THEN
121:
122: IF P_PA_DEBUG_MODE = 'Y' THEN
123: pa_debug.g_err_stage:='Target_fp_option_id = '||p_target_fp_option_id;
124: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,5);
125: pa_debug.g_err_stage:='Target_fp_option_id = '||p_plan_in_multi_curr_flag;
126: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,5);
127: END IF;
120: THEN
121:
122: IF P_PA_DEBUG_MODE = 'Y' THEN
123: pa_debug.g_err_stage:='Target_fp_option_id = '||p_target_fp_option_id;
124: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,5);
125: pa_debug.g_err_stage:='Target_fp_option_id = '||p_plan_in_multi_curr_flag;
126: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,5);
127: END IF;
128:
121:
122: IF P_PA_DEBUG_MODE = 'Y' THEN
123: pa_debug.g_err_stage:='Target_fp_option_id = '||p_target_fp_option_id;
124: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,5);
125: pa_debug.g_err_stage:='Target_fp_option_id = '||p_plan_in_multi_curr_flag;
126: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,5);
127: END IF;
128:
129: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
122: IF P_PA_DEBUG_MODE = 'Y' THEN
123: pa_debug.g_err_stage:='Target_fp_option_id = '||p_target_fp_option_id;
124: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,5);
125: pa_debug.g_err_stage:='Target_fp_option_id = '||p_plan_in_multi_curr_flag;
126: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,5);
127: END IF;
128:
129: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
130: p_msg_name => 'PA_FP_INV_PARAM_PASSED');
132: RAISE Invalid_Arg_Exc;
133:
134: END IF;
135:
136: IF P_PA_DEBUG_MODE = 'Y' THEN
137: pa_debug.g_err_stage:='Parameter validation complete';
138: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
139: END IF;
140:
133:
134: END IF;
135:
136: IF P_PA_DEBUG_MODE = 'Y' THEN
137: pa_debug.g_err_stage:='Parameter validation complete';
138: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
139: END IF;
140:
141: -- Fetch project id,plan type id,plan version id and preference code of target
134: END IF;
135:
136: IF P_PA_DEBUG_MODE = 'Y' THEN
137: pa_debug.g_err_stage:='Parameter validation complete';
138: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
139: END IF;
140:
141: -- Fetch project id,plan type id,plan version id and preference code of target
142: -- from pa_proj_fp_options
140:
141: -- Fetch project id,plan type id,plan version id and preference code of target
142: -- from pa_proj_fp_options
143:
144: IF P_PA_DEBUG_MODE = 'Y' THEN
145: pa_debug.g_err_stage:='Opening target_fp_options_cur';
146: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
147: END IF;
148:
141: -- Fetch project id,plan type id,plan version id and preference code of target
142: -- from pa_proj_fp_options
143:
144: IF P_PA_DEBUG_MODE = 'Y' THEN
145: pa_debug.g_err_stage:='Opening target_fp_options_cur';
146: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
147: END IF;
148:
149: OPEN target_fp_options_cur;
142: -- from pa_proj_fp_options
143:
144: IF P_PA_DEBUG_MODE = 'Y' THEN
145: pa_debug.g_err_stage:='Opening target_fp_options_cur';
146: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
147: END IF;
148:
149: OPEN target_fp_options_cur;
150: FETCH target_fp_options_cur INTO target_fp_options_rec;
149: OPEN target_fp_options_cur;
150: FETCH target_fp_options_cur INTO target_fp_options_rec;
151: CLOSE target_fp_options_cur;
152:
153: IF P_PA_DEBUG_MODE = 'Y' THEN
154: pa_debug.g_err_stage:='Project_id ='||target_fp_options_rec.project_id;
155: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
156: pa_debug.g_err_stage:='Fin_plan_type_id ='||target_fp_options_rec.fin_plan_type_id;
157: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
150: FETCH target_fp_options_cur INTO target_fp_options_rec;
151: CLOSE target_fp_options_cur;
152:
153: IF P_PA_DEBUG_MODE = 'Y' THEN
154: pa_debug.g_err_stage:='Project_id ='||target_fp_options_rec.project_id;
155: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
156: pa_debug.g_err_stage:='Fin_plan_type_id ='||target_fp_options_rec.fin_plan_type_id;
157: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
158: pa_debug.g_err_stage:='Fin_plan_preference_code ='||target_fp_options_rec.fin_plan_preference_code;
151: CLOSE target_fp_options_cur;
152:
153: IF P_PA_DEBUG_MODE = 'Y' THEN
154: pa_debug.g_err_stage:='Project_id ='||target_fp_options_rec.project_id;
155: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
156: pa_debug.g_err_stage:='Fin_plan_type_id ='||target_fp_options_rec.fin_plan_type_id;
157: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
158: pa_debug.g_err_stage:='Fin_plan_preference_code ='||target_fp_options_rec.fin_plan_preference_code;
159: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
152:
153: IF P_PA_DEBUG_MODE = 'Y' THEN
154: pa_debug.g_err_stage:='Project_id ='||target_fp_options_rec.project_id;
155: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
156: pa_debug.g_err_stage:='Fin_plan_type_id ='||target_fp_options_rec.fin_plan_type_id;
157: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
158: pa_debug.g_err_stage:='Fin_plan_preference_code ='||target_fp_options_rec.fin_plan_preference_code;
159: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
160: pa_debug.g_err_stage:='Fin_plan_version_id ='||target_fp_options_rec.fin_plan_version_id;
153: IF P_PA_DEBUG_MODE = 'Y' THEN
154: pa_debug.g_err_stage:='Project_id ='||target_fp_options_rec.project_id;
155: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
156: pa_debug.g_err_stage:='Fin_plan_type_id ='||target_fp_options_rec.fin_plan_type_id;
157: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
158: pa_debug.g_err_stage:='Fin_plan_preference_code ='||target_fp_options_rec.fin_plan_preference_code;
159: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
160: pa_debug.g_err_stage:='Fin_plan_version_id ='||target_fp_options_rec.fin_plan_version_id;
161: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
154: pa_debug.g_err_stage:='Project_id ='||target_fp_options_rec.project_id;
155: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
156: pa_debug.g_err_stage:='Fin_plan_type_id ='||target_fp_options_rec.fin_plan_type_id;
157: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
158: pa_debug.g_err_stage:='Fin_plan_preference_code ='||target_fp_options_rec.fin_plan_preference_code;
159: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
160: pa_debug.g_err_stage:='Fin_plan_version_id ='||target_fp_options_rec.fin_plan_version_id;
161: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
162: END IF;
155: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
156: pa_debug.g_err_stage:='Fin_plan_type_id ='||target_fp_options_rec.fin_plan_type_id;
157: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
158: pa_debug.g_err_stage:='Fin_plan_preference_code ='||target_fp_options_rec.fin_plan_preference_code;
159: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
160: pa_debug.g_err_stage:='Fin_plan_version_id ='||target_fp_options_rec.fin_plan_version_id;
161: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
162: END IF;
163:
156: pa_debug.g_err_stage:='Fin_plan_type_id ='||target_fp_options_rec.fin_plan_type_id;
157: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
158: pa_debug.g_err_stage:='Fin_plan_preference_code ='||target_fp_options_rec.fin_plan_preference_code;
159: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
160: pa_debug.g_err_stage:='Fin_plan_version_id ='||target_fp_options_rec.fin_plan_version_id;
161: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
162: END IF;
163:
164: --Fetch project and project functional currencies for target project
157: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
158: pa_debug.g_err_stage:='Fin_plan_preference_code ='||target_fp_options_rec.fin_plan_preference_code;
159: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
160: pa_debug.g_err_stage:='Fin_plan_version_id ='||target_fp_options_rec.fin_plan_version_id;
161: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
162: END IF;
163:
164: --Fetch project and project functional currencies for target project
165:
162: END IF;
163:
164: --Fetch project and project functional currencies for target project
165:
166: IF P_PA_DEBUG_MODE = 'Y' THEN
167: pa_debug.g_err_stage:='Opening proj_pf_currencies_cur';
168: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
169: END IF;
170:
163:
164: --Fetch project and project functional currencies for target project
165:
166: IF P_PA_DEBUG_MODE = 'Y' THEN
167: pa_debug.g_err_stage:='Opening proj_pf_currencies_cur';
168: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
169: END IF;
170:
171: OPEN proj_pf_currencies_cur(target_fp_options_rec.project_id);
164: --Fetch project and project functional currencies for target project
165:
166: IF P_PA_DEBUG_MODE = 'Y' THEN
167: pa_debug.g_err_stage:='Opening proj_pf_currencies_cur';
168: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
169: END IF;
170:
171: OPEN proj_pf_currencies_cur(target_fp_options_rec.project_id);
172: FETCH proj_pf_currencies_cur INTO proj_pf_currencies_rec;
171: OPEN proj_pf_currencies_cur(target_fp_options_rec.project_id);
172: FETCH proj_pf_currencies_cur INTO proj_pf_currencies_rec;
173: CLOSE proj_pf_currencies_cur;
174:
175: IF P_PA_DEBUG_MODE = 'Y' THEN
176: pa_debug.g_err_stage:='project_currency_code='||proj_pf_currencies_rec.project_currency_code;
177: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
178: pa_debug.g_err_stage:='projfunc_currency_code='||proj_pf_currencies_rec.projfunc_currency_code;
179: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
172: FETCH proj_pf_currencies_cur INTO proj_pf_currencies_rec;
173: CLOSE proj_pf_currencies_cur;
174:
175: IF P_PA_DEBUG_MODE = 'Y' THEN
176: pa_debug.g_err_stage:='project_currency_code='||proj_pf_currencies_rec.project_currency_code;
177: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
178: pa_debug.g_err_stage:='projfunc_currency_code='||proj_pf_currencies_rec.projfunc_currency_code;
179: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
180: END IF;
173: CLOSE proj_pf_currencies_cur;
174:
175: IF P_PA_DEBUG_MODE = 'Y' THEN
176: pa_debug.g_err_stage:='project_currency_code='||proj_pf_currencies_rec.project_currency_code;
177: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
178: pa_debug.g_err_stage:='projfunc_currency_code='||proj_pf_currencies_rec.projfunc_currency_code;
179: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
180: END IF;
181:
174:
175: IF P_PA_DEBUG_MODE = 'Y' THEN
176: pa_debug.g_err_stage:='project_currency_code='||proj_pf_currencies_rec.project_currency_code;
177: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
178: pa_debug.g_err_stage:='projfunc_currency_code='||proj_pf_currencies_rec.projfunc_currency_code;
179: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
180: END IF;
181:
182: IF p_source_fp_option_id IS NULL THEN
175: IF P_PA_DEBUG_MODE = 'Y' THEN
176: pa_debug.g_err_stage:='project_currency_code='||proj_pf_currencies_rec.project_currency_code;
177: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
178: pa_debug.g_err_stage:='projfunc_currency_code='||proj_pf_currencies_rec.projfunc_currency_code;
179: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
180: END IF;
181:
182: IF p_source_fp_option_id IS NULL THEN
183:
207: THEN
208:
209: --Calling Insert_Default_Currencies api
210:
211: IF P_PA_DEBUG_MODE = 'Y' THEN
212: pa_debug.g_err_stage:='Calling Insert_Default_Currencies api';
213: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
214: END IF;
215:
208:
209: --Calling Insert_Default_Currencies api
210:
211: IF P_PA_DEBUG_MODE = 'Y' THEN
212: pa_debug.g_err_stage:='Calling Insert_Default_Currencies api';
213: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
214: END IF;
215:
216: Insert_Default_Currencies(
209: --Calling Insert_Default_Currencies api
210:
211: IF P_PA_DEBUG_MODE = 'Y' THEN
212: pa_debug.g_err_stage:='Calling Insert_Default_Currencies api';
213: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
214: END IF;
215:
216: Insert_Default_Currencies(
217: p_project_id => target_fp_options_rec.project_id
226: ELSE -- Raja 3/30/2004 FP M phase II Dev changes IF p_plan_in_multi_curr_flag = 'Y' THEN
227:
228: --Fetch project id of source fp option
229:
230: IF P_PA_DEBUG_MODE = 'Y' THEN
231: pa_debug.g_err_stage:='Fetching source project id';
232: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
233: END IF;
234:
227:
228: --Fetch project id of source fp option
229:
230: IF P_PA_DEBUG_MODE = 'Y' THEN
231: pa_debug.g_err_stage:='Fetching source project id';
232: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
233: END IF;
234:
235: SELECT project_id
228: --Fetch project id of source fp option
229:
230: IF P_PA_DEBUG_MODE = 'Y' THEN
231: pa_debug.g_err_stage:='Fetching source project id';
232: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
233: END IF;
234:
235: SELECT project_id
236: INTO l_source_project_id
242:
243: /* Getting the l_only_projfunc_curr_flg to determine if only the Project
244: Functional currency has to be inserted. */
245:
246: IF P_PA_DEBUG_MODE = 'Y' THEN
247: pa_debug.g_err_stage:='Calling Insert_Only_Projfunc_Curr';
248: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
249: END IF;
250:
243: /* Getting the l_only_projfunc_curr_flg to determine if only the Project
244: Functional currency has to be inserted. */
245:
246: IF P_PA_DEBUG_MODE = 'Y' THEN
247: pa_debug.g_err_stage:='Calling Insert_Only_Projfunc_Curr';
248: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
249: END IF;
250:
251: l_only_projfunc_curr := Insert_Only_Projfunc_Curr( p_proj_fp_options_id => p_target_fp_option_id
244: Functional currency has to be inserted. */
245:
246: IF P_PA_DEBUG_MODE = 'Y' THEN
247: pa_debug.g_err_stage:='Calling Insert_Only_Projfunc_Curr';
248: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
249: END IF;
250:
251: l_only_projfunc_curr := Insert_Only_Projfunc_Curr( p_proj_fp_options_id => p_target_fp_option_id
252: ,p_approved_rev_plan_type_flag => p_approved_rev_plan_type_flag );
252: ,p_approved_rev_plan_type_flag => p_approved_rev_plan_type_flag );
253:
254: IF l_only_projfunc_curr = TRUE THEN -- Call Insert Default currencies to insert only proj func record.
255:
256: IF P_PA_DEBUG_MODE = 'Y' THEN
257: pa_debug.g_err_stage:='Calling Insert_Default_Currencies to insert projfunc record.';
258: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
259: END IF;
260:
253:
254: IF l_only_projfunc_curr = TRUE THEN -- Call Insert Default currencies to insert only proj func record.
255:
256: IF P_PA_DEBUG_MODE = 'Y' THEN
257: pa_debug.g_err_stage:='Calling Insert_Default_Currencies to insert projfunc record.';
258: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
259: END IF;
260:
261: Insert_Default_Currencies(
254: IF l_only_projfunc_curr = TRUE THEN -- Call Insert Default currencies to insert only proj func record.
255:
256: IF P_PA_DEBUG_MODE = 'Y' THEN
257: pa_debug.g_err_stage:='Calling Insert_Default_Currencies to insert projfunc record.';
258: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
259: END IF;
260:
261: Insert_Default_Currencies(
262: p_project_id => target_fp_options_rec.project_id
269: ,p_target_fp_option_id => p_target_fp_option_id );
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:
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 (
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 (
279: fp_txn_currency_id
322: IF SQL%rowcount = 0 THEN
323:
324: --Insert default currencies if no records exist for source fp options id
325:
326: IF P_PA_DEBUG_MODE = 'Y' THEN
327: pa_debug.g_err_stage:='Calling Insert_Default_Currencies api ';
328: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
329: END IF;
330:
323:
324: --Insert default currencies if no records exist for source fp options id
325:
326: IF P_PA_DEBUG_MODE = 'Y' THEN
327: pa_debug.g_err_stage:='Calling Insert_Default_Currencies api ';
328: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
329: END IF;
330:
331: Insert_Default_Currencies(
324: --Insert default currencies if no records exist for source fp options id
325:
326: IF P_PA_DEBUG_MODE = 'Y' THEN
327: pa_debug.g_err_stage:='Calling Insert_Default_Currencies api ';
328: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
329: END IF;
330:
331: Insert_Default_Currencies(
332: p_project_id => target_fp_options_rec.project_id
373: END IF;
374:
375: --Call Set_Default_Currencies private procedure
376:
377: IF P_PA_DEBUG_MODE = 'Y' THEN
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:
374:
375: --Call Set_Default_Currencies private procedure
376:
377: IF P_PA_DEBUG_MODE = 'Y' THEN
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(
375: --Call Set_Default_Currencies private procedure
376:
377: IF P_PA_DEBUG_MODE = 'Y' THEN
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
394: END IF; --l_only_projfunc_curr_flg = 'Y'
395:
396: END IF; -- l_source_fp_option_id null/not null
397:
398: IF P_PA_DEBUG_MODE = 'Y' THEN
399: pa_debug.g_err_stage:='Exiting Copy_Fp_Txn_Currencies';
400: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
401: END IF;
402:
395:
396: END IF; -- l_source_fp_option_id null/not null
397:
398: IF P_PA_DEBUG_MODE = 'Y' THEN
399: pa_debug.g_err_stage:='Exiting Copy_Fp_Txn_Currencies';
400: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
401: END IF;
402:
403: --Reset the error stack
396: END IF; -- l_source_fp_option_id null/not null
397:
398: IF P_PA_DEBUG_MODE = 'Y' THEN
399: pa_debug.g_err_stage:='Exiting Copy_Fp_Txn_Currencies';
400: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
401: END IF;
402:
403: --Reset the error stack
404:
401: END IF;
402:
403: --Reset the error stack
404:
405: pa_debug.reset_err_stack;
406:
407: EXCEPTION
408:
409: WHEN Invalid_Arg_Exc THEN
430: END IF;
431:
432: x_return_status := FND_API.G_RET_STS_ERROR;
433:
434: IF P_PA_DEBUG_MODE = 'Y' THEN
435: pa_debug.g_err_stage:='Invalid Arguments Passed';
436: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,5);
437: END IF;
438: pa_debug.reset_err_stack;
431:
432: x_return_status := FND_API.G_RET_STS_ERROR;
433:
434: IF P_PA_DEBUG_MODE = 'Y' THEN
435: pa_debug.g_err_stage:='Invalid Arguments Passed';
436: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,5);
437: END IF;
438: pa_debug.reset_err_stack;
439:
432: x_return_status := FND_API.G_RET_STS_ERROR;
433:
434: IF P_PA_DEBUG_MODE = 'Y' THEN
435: pa_debug.g_err_stage:='Invalid Arguments Passed';
436: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,5);
437: END IF;
438: pa_debug.reset_err_stack;
439:
440: RAISE;
434: IF P_PA_DEBUG_MODE = 'Y' THEN
435: pa_debug.g_err_stage:='Invalid Arguments Passed';
436: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,5);
437: END IF;
438: pa_debug.reset_err_stack;
439:
440: RAISE;
441:
442: WHEN Others THEN
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';
453: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,5);
454: END IF;
455: pa_debug.reset_err_stack;
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';
453: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,5);
454: END IF;
455: pa_debug.reset_err_stack;
456: RAISE ;
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';
453: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,5);
454: END IF;
455: pa_debug.reset_err_stack;
456: RAISE ;
457:
451: IF P_PA_DEBUG_MODE = 'Y' THEN
452: pa_debug.g_err_stage:='Unexpeted Error';
453: pa_debug.write('Copy_Fp_Txn_Currencies: ' || l_module_name,pa_debug.g_err_stage,5);
454: END IF;
455: pa_debug.reset_err_stack;
456: RAISE ;
457:
458: END Copy_Fp_Txn_Currencies;
459:
478: /* #2632410: Modified the below logic to insert the Project Currency Record
479: when the l_only_proj_func_curr returned by Insert_Only_Projfunc_Curr is
480: FALSE. */
481:
482: IF P_PA_DEBUG_MODE = 'Y' THEN
483: pa_debug.g_err_stage:='Calling Insert_Only_Projfunc_Curr - 1';
484: pa_debug.write('Insert_Default_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
485: END IF;
486:
479: when the l_only_proj_func_curr returned by Insert_Only_Projfunc_Curr is
480: FALSE. */
481:
482: IF P_PA_DEBUG_MODE = 'Y' THEN
483: pa_debug.g_err_stage:='Calling Insert_Only_Projfunc_Curr - 1';
484: pa_debug.write('Insert_Default_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
485: END IF;
486:
487: l_only_proj_func_curr := Insert_Only_Projfunc_Curr( p_proj_fp_options_id => p_target_fp_option_id
480: FALSE. */
481:
482: IF P_PA_DEBUG_MODE = 'Y' THEN
483: pa_debug.g_err_stage:='Calling Insert_Only_Projfunc_Curr - 1';
484: pa_debug.write('Insert_Default_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
485: END IF;
486:
487: l_only_proj_func_curr := Insert_Only_Projfunc_Curr( p_proj_fp_options_id => p_target_fp_option_id
488: ,p_approved_rev_plan_type_flag => p_approved_rev_plan_type_flag );--For bug 2998696
488: ,p_approved_rev_plan_type_flag => p_approved_rev_plan_type_flag );--For bug 2998696
489:
490: IF l_only_proj_func_curr = FALSE THEN --Do not insert any proj currency rec if flag is TRUE
491:
492: IF P_PA_DEBUG_MODE = 'Y' THEN
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:
489:
490: IF l_only_proj_func_curr = FALSE THEN --Do not insert any proj currency rec if flag is TRUE
491:
492: IF P_PA_DEBUG_MODE = 'Y' THEN
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 (
490: IF l_only_proj_func_curr = FALSE THEN --Do not insert any proj currency rec if flag is TRUE
491:
492: IF P_PA_DEBUG_MODE = 'Y' THEN
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
545:
546: IF (p_projfunc_currency_code <> p_project_currency_code OR
547: l_only_proj_func_curr = TRUE) THEN
548:
549: IF P_PA_DEBUG_MODE = 'Y' THEN
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:
546: IF (p_projfunc_currency_code <> p_project_currency_code OR
547: l_only_proj_func_curr = TRUE) THEN
548:
549: IF P_PA_DEBUG_MODE = 'Y' THEN
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 (
547: l_only_proj_func_curr = TRUE) THEN
548:
549: IF P_PA_DEBUG_MODE = 'Y' THEN
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
597: END IF;
598:
599: --To set the default currencies call Set_Default_Currencies
600:
601: IF P_PA_DEBUG_MODE = 'Y' THEN
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:
598:
599: --To set the default currencies call Set_Default_Currencies
600:
601: IF P_PA_DEBUG_MODE = 'Y' THEN
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(
599: --To set the default currencies call Set_Default_Currencies
600:
601: IF P_PA_DEBUG_MODE = 'Y' THEN
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
612: ,p_srce_cost_default_curr_code => NULL
613: ,p_project_currency_code => p_project_currency_code
614: ,p_projfunc_currency_code => p_projfunc_currency_code );
615:
616: IF P_PA_DEBUG_MODE = 'Y' THEN
617: pa_debug.g_err_stage:='Exiting Insert_Default_Currencies ';
618: pa_debug.write('Insert_Default_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
619: END IF;
620:
613: ,p_project_currency_code => p_project_currency_code
614: ,p_projfunc_currency_code => p_projfunc_currency_code );
615:
616: IF P_PA_DEBUG_MODE = 'Y' THEN
617: pa_debug.g_err_stage:='Exiting Insert_Default_Currencies ';
618: pa_debug.write('Insert_Default_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
619: END IF;
620:
621: EXCEPTION
614: ,p_projfunc_currency_code => p_projfunc_currency_code );
615:
616: IF P_PA_DEBUG_MODE = 'Y' THEN
617: pa_debug.g_err_stage:='Exiting Insert_Default_Currencies ';
618: pa_debug.write('Insert_Default_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
619: END IF;
620:
621: EXCEPTION
622: WHEN OTHERS THEN
619: END IF;
620:
621: EXCEPTION
622: WHEN OTHERS THEN
623: IF P_PA_DEBUG_MODE = 'Y' THEN
624: pa_debug.g_err_stage:='EXCEPTION Insert_Default_Currencies ' || SQLERRM;
625: pa_debug.write('Insert_Default_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
626: END IF;
627: RAISE;
620:
621: EXCEPTION
622: WHEN OTHERS THEN
623: IF P_PA_DEBUG_MODE = 'Y' THEN
624: pa_debug.g_err_stage:='EXCEPTION Insert_Default_Currencies ' || SQLERRM;
625: pa_debug.write('Insert_Default_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
626: END IF;
627: RAISE;
628: END Insert_Default_Currencies;
621: EXCEPTION
622: WHEN OTHERS THEN
623: IF P_PA_DEBUG_MODE = 'Y' THEN
624: pa_debug.g_err_stage:='EXCEPTION Insert_Default_Currencies ' || SQLERRM;
625: pa_debug.write('Insert_Default_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
626: END IF;
627: RAISE;
628: END Insert_Default_Currencies;
629: /*===========================================================================
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;
650: pa_debug.write('Set_Default_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
651: END IF;
652:
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;
650: pa_debug.write('Set_Default_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
651: END IF;
652:
653:
646: BEGIN
647:
648: IF P_PA_DEBUG_MODE = 'Y' THEN
649: pa_debug.g_err_stage:='Target_preference_code ='||p_target_preference_code;
650: pa_debug.write('Set_Default_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
651: END IF;
652:
653:
654: IF p_target_preference_code = PA_FP_CONSTANTS_PKG.G_PREF_COST_ONLY THEN
808: END IF;
809:
810: -- END IF;
811:
812: IF P_PA_DEBUG_MODE = 'Y' THEN
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:
809:
810: -- END IF;
811:
812: IF P_PA_DEBUG_MODE = 'Y' THEN
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
810: -- END IF;
811:
812: IF P_PA_DEBUG_MODE = 'Y' THEN
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')
821: WHERE proj_fp_options_id = p_target_fp_option_id ;
822:
823: END IF; --preference code
824:
825: IF P_PA_DEBUG_MODE = 'Y' THEN
826: pa_debug.g_err_stage:='Exiting Set_Default_Currencies ';
827: pa_debug.write('Set_Default_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
828: END IF;
829:
822:
823: END IF; --preference code
824:
825: IF P_PA_DEBUG_MODE = 'Y' THEN
826: pa_debug.g_err_stage:='Exiting Set_Default_Currencies ';
827: pa_debug.write('Set_Default_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
828: END IF;
829:
830: END Set_Default_Currencies;
823: END IF; --preference code
824:
825: IF P_PA_DEBUG_MODE = 'Y' THEN
826: pa_debug.g_err_stage:='Exiting Set_Default_Currencies ';
827: pa_debug.write('Set_Default_Currencies: ' || l_module_name,pa_debug.g_err_stage,3);
828: END IF;
829:
830: END Set_Default_Currencies;
831:
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);
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);
882: END IF;
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);
882: END IF;
883:
884: -- Check for business rules violations
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);
882: END IF;
883:
884: -- Check for business rules violations
885:
882: END IF;
883:
884: -- Check for business rules violations
885:
886: IF P_PA_DEBUG_MODE = 'Y' THEN
887: pa_debug.g_err_stage:= 'Validating input parameters';
888: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
889: END IF;
890:
883:
884: -- Check for business rules violations
885:
886: IF P_PA_DEBUG_MODE = 'Y' THEN
887: pa_debug.g_err_stage:= 'Validating input parameters';
888: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
889: END IF;
890:
891: --Check if plan version id is null
884: -- Check for business rules violations
885:
886: IF P_PA_DEBUG_MODE = 'Y' THEN
887: pa_debug.g_err_stage:= 'Validating input parameters';
888: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
889: END IF;
890:
891: --Check if plan version id is null
892:
893: IF (p_project_id IS NULL) OR
894: (p_fin_plan_version_id IS NULL) OR
895: (p_ci_id IS NULL)
896: THEN
897: IF P_PA_DEBUG_MODE = 'Y' THEN
898: pa_debug.g_err_stage:= 'p_project_id = '|| p_project_id;
899: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
900: pa_debug.g_err_stage:= 'p_fin_plan_version_id = '|| p_fin_plan_version_id;
901: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
894: (p_fin_plan_version_id IS NULL) OR
895: (p_ci_id IS NULL)
896: THEN
897: IF P_PA_DEBUG_MODE = 'Y' THEN
898: pa_debug.g_err_stage:= 'p_project_id = '|| p_project_id;
899: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
900: pa_debug.g_err_stage:= 'p_fin_plan_version_id = '|| p_fin_plan_version_id;
901: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
902: pa_debug.g_err_stage:= 'p_ci_id = '|| p_ci_id;
895: (p_ci_id IS NULL)
896: THEN
897: IF P_PA_DEBUG_MODE = 'Y' THEN
898: pa_debug.g_err_stage:= 'p_project_id = '|| p_project_id;
899: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
900: pa_debug.g_err_stage:= 'p_fin_plan_version_id = '|| p_fin_plan_version_id;
901: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
902: pa_debug.g_err_stage:= 'p_ci_id = '|| p_ci_id;
903: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
896: THEN
897: IF P_PA_DEBUG_MODE = 'Y' THEN
898: pa_debug.g_err_stage:= 'p_project_id = '|| p_project_id;
899: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
900: pa_debug.g_err_stage:= 'p_fin_plan_version_id = '|| p_fin_plan_version_id;
901: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
902: pa_debug.g_err_stage:= 'p_ci_id = '|| p_ci_id;
903: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
904: END IF;
897: IF P_PA_DEBUG_MODE = 'Y' THEN
898: pa_debug.g_err_stage:= 'p_project_id = '|| p_project_id;
899: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
900: pa_debug.g_err_stage:= 'p_fin_plan_version_id = '|| p_fin_plan_version_id;
901: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
902: pa_debug.g_err_stage:= 'p_ci_id = '|| p_ci_id;
903: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
904: END IF;
905:
898: pa_debug.g_err_stage:= 'p_project_id = '|| p_project_id;
899: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
900: pa_debug.g_err_stage:= 'p_fin_plan_version_id = '|| p_fin_plan_version_id;
901: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
902: pa_debug.g_err_stage:= 'p_ci_id = '|| p_ci_id;
903: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
904: END IF;
905:
906: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
899: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
900: pa_debug.g_err_stage:= 'p_fin_plan_version_id = '|| p_fin_plan_version_id;
901: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
902: pa_debug.g_err_stage:= 'p_ci_id = '|| p_ci_id;
903: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
904: END IF;
905:
906: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
907: p_msg_name => 'PA_FP_INV_PARAM_PASSED');
910: END IF;
911:
912: -- Using the project_id and ci_id fetch the agreement_currency
913:
914: IF P_PA_DEBUG_MODE = 'Y' THEN
915: pa_debug.g_err_stage:='Fetching the agreement details';
916: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
917: END IF;
918:
911:
912: -- Using the project_id and ci_id fetch the agreement_currency
913:
914: IF P_PA_DEBUG_MODE = 'Y' THEN
915: pa_debug.g_err_stage:='Fetching the agreement details';
916: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
917: END IF;
918:
919: Pa_Fp_Control_Items_Utils.get_fp_ci_agreement_dtls(
912: -- Using the project_id and ci_id fetch the agreement_currency
913:
914: IF P_PA_DEBUG_MODE = 'Y' THEN
915: pa_debug.g_err_stage:='Fetching the agreement details';
916: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
917: END IF;
918:
919: Pa_Fp_Control_Items_Utils.get_fp_ci_agreement_dtls(
920: p_project_id => p_project_id
928:
929: IF (l_agreement_currency_code IS NULL) OR
930: (l_return_status <> FND_API.G_RET_STS_SUCCESS)
931: THEN
932: IF P_PA_DEBUG_MODE = 'Y' THEN
933: pa_debug.g_err_stage:='Agreement_currency_code is null';
934: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
935: END IF;
936: RAISE PA_FP_CONSTANTS_PKG.Invalid_Arg_Exc;
929: IF (l_agreement_currency_code IS NULL) OR
930: (l_return_status <> FND_API.G_RET_STS_SUCCESS)
931: THEN
932: IF P_PA_DEBUG_MODE = 'Y' THEN
933: pa_debug.g_err_stage:='Agreement_currency_code is null';
934: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
935: END IF;
936: RAISE PA_FP_CONSTANTS_PKG.Invalid_Arg_Exc;
937: END IF;
930: (l_return_status <> FND_API.G_RET_STS_SUCCESS)
931: THEN
932: IF P_PA_DEBUG_MODE = 'Y' THEN
933: pa_debug.g_err_stage:='Agreement_currency_code is null';
934: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
935: END IF;
936: RAISE PA_FP_CONSTANTS_PKG.Invalid_Arg_Exc;
937: END IF;
938:
937: END IF;
938:
939: -- Get the required details of the fin plan version from the fp options table
940:
941: IF P_PA_DEBUG_MODE = 'Y' THEN
942: pa_debug.g_err_stage:='Fetching the version details';
943: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
944: END IF;
945:
938:
939: -- Get the required details of the fin plan version from the fp options table
940:
941: IF P_PA_DEBUG_MODE = 'Y' THEN
942: pa_debug.g_err_stage:='Fetching the version details';
943: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
944: END IF;
945:
946: OPEN version_details_cur;
939: -- Get the required details of the fin plan version from the fp options table
940:
941: IF P_PA_DEBUG_MODE = 'Y' THEN
942: pa_debug.g_err_stage:='Fetching the version details';
943: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
944: END IF;
945:
946: OPEN version_details_cur;
947: FETCH version_details_cur INTO version_details_rec;
963: );
964:
965: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
966:
967: IF P_PA_DEBUG_MODE = 'Y' THEN
968: pa_debug.g_err_stage:= 'Could not obtain currency info for the project';
969: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,
970: pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
971: END IF;
964:
965: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
966:
967: IF P_PA_DEBUG_MODE = 'Y' THEN
968: pa_debug.g_err_stage:= 'Could not obtain currency info for the project';
969: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,
970: pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
971: END IF;
972: RAISE PA_FP_CONSTANTS_PKG.Invalid_Arg_Exc;
965: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
966:
967: IF P_PA_DEBUG_MODE = 'Y' THEN
968: pa_debug.g_err_stage:= 'Could not obtain currency info for the project';
969: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,
970: pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
971: END IF;
972: RAISE PA_FP_CONSTANTS_PKG.Invalid_Arg_Exc;
973: END IF;
966:
967: IF P_PA_DEBUG_MODE = 'Y' THEN
968: pa_debug.g_err_stage:= 'Could not obtain currency info for the project';
969: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,
970: pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
971: END IF;
972: RAISE PA_FP_CONSTANTS_PKG.Invalid_Arg_Exc;
973: END IF;
974:
1030: ,NULL -- projfunc_cost_exchange_Rate
1031: ,NULL -- projfunc_rev_exchange_Rate
1032: FROM DUAL;
1033:
1034: IF P_PA_DEBUG_MODE = 'Y' THEN
1035: pa_debug.g_err_stage:= 'Exiting enter_agreement_curr_for_ci';
1036: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
1037: END IF;
1038: pa_debug.reset_err_stack;
1031: ,NULL -- projfunc_rev_exchange_Rate
1032: FROM DUAL;
1033:
1034: IF P_PA_DEBUG_MODE = 'Y' THEN
1035: pa_debug.g_err_stage:= 'Exiting enter_agreement_curr_for_ci';
1036: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
1037: END IF;
1038: pa_debug.reset_err_stack;
1039:
1032: FROM DUAL;
1033:
1034: IF P_PA_DEBUG_MODE = 'Y' THEN
1035: pa_debug.g_err_stage:= 'Exiting enter_agreement_curr_for_ci';
1036: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
1037: END IF;
1038: pa_debug.reset_err_stack;
1039:
1040: EXCEPTION
1034: IF P_PA_DEBUG_MODE = 'Y' THEN
1035: pa_debug.g_err_stage:= 'Exiting enter_agreement_curr_for_ci';
1036: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
1037: END IF;
1038: pa_debug.reset_err_stack;
1039:
1040: EXCEPTION
1041:
1042: WHEN PA_FP_CONSTANTS_PKG.Invalid_Arg_Exc THEN
1056: ELSE
1057: x_msg_count := l_msg_count;
1058: END IF;
1059:
1060: IF P_PA_DEBUG_MODE = 'Y' THEN
1061: pa_debug.g_err_stage:= 'Invalid Arguments Passed';
1062: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
1063: END IF;
1064: pa_debug.reset_err_stack;
1057: x_msg_count := l_msg_count;
1058: END IF;
1059:
1060: IF P_PA_DEBUG_MODE = 'Y' THEN
1061: pa_debug.g_err_stage:= 'Invalid Arguments Passed';
1062: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
1063: END IF;
1064: pa_debug.reset_err_stack;
1065: RAISE;
1058: END IF;
1059:
1060: IF P_PA_DEBUG_MODE = 'Y' THEN
1061: pa_debug.g_err_stage:= 'Invalid Arguments Passed';
1062: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
1063: END IF;
1064: pa_debug.reset_err_stack;
1065: RAISE;
1066:
1060: IF P_PA_DEBUG_MODE = 'Y' THEN
1061: pa_debug.g_err_stage:= 'Invalid Arguments Passed';
1062: pa_debug.write('enter_agreement_curr_for_ci: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL5);
1063: END IF;
1064: pa_debug.reset_err_stack;
1065: RAISE;
1066:
1067: WHEN others THEN
1068:
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);
1077: END IF;
1078: pa_debug.reset_err_stack;
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);
1077: END IF;
1078: pa_debug.reset_err_stack;
1079: RAISE;
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);
1077: END IF;
1078: pa_debug.reset_err_stack;
1079: RAISE;
1080: END 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);
1077: END IF;
1078: pa_debug.reset_err_stack;
1079: RAISE;
1080: END enter_agreement_curr_for_ci;
1081:
1082: /*===============================================================================================
1104: l_insert_only_proj_func_curr BOOLEAN;
1105:
1106: BEGIN
1107:
1108: IF P_PA_DEBUG_MODE = 'Y' THEN
1109: pa_debug.g_err_stage:='In Insert_Only_Projfunc_Curr';
1110: pa_debug.write('Insert_Only_Projfunc_Curr: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
1111: END IF;
1112:
1105:
1106: BEGIN
1107:
1108: IF P_PA_DEBUG_MODE = 'Y' THEN
1109: pa_debug.g_err_stage:='In Insert_Only_Projfunc_Curr';
1110: pa_debug.write('Insert_Only_Projfunc_Curr: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
1111: END IF;
1112:
1113: l_insert_only_proj_func_curr := FALSE;
1106: BEGIN
1107:
1108: IF P_PA_DEBUG_MODE = 'Y' THEN
1109: pa_debug.g_err_stage:='In Insert_Only_Projfunc_Curr';
1110: pa_debug.write('Insert_Only_Projfunc_Curr: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
1111: END IF;
1112:
1113: l_insert_only_proj_func_curr := FALSE;
1114:
1114:
1115: /* Bug 3668370 Raja FP M changes Even for AR versions there can be multiple txn currencies
1116: -- Getting the Proj FP Option details for the Proj FP Option ID.
1117:
1118: IF P_PA_DEBUG_MODE = 'Y' THEN
1119: pa_debug.g_err_stage:='Getting the FP Option details';
1120: pa_debug.write('Insert_Only_Projfunc_Curr: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
1121: END IF;
1122:
1115: /* Bug 3668370 Raja FP M changes Even for AR versions there can be multiple txn currencies
1116: -- Getting the Proj FP Option details for the Proj FP Option ID.
1117:
1118: IF P_PA_DEBUG_MODE = 'Y' THEN
1119: pa_debug.g_err_stage:='Getting the FP Option details';
1120: pa_debug.write('Insert_Only_Projfunc_Curr: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
1121: END IF;
1122:
1123: SELECT fin_plan_option_level_code
1116: -- Getting the Proj FP Option details for the Proj FP Option ID.
1117:
1118: IF P_PA_DEBUG_MODE = 'Y' THEN
1119: pa_debug.g_err_stage:='Getting the FP Option details';
1120: pa_debug.write('Insert_Only_Projfunc_Curr: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
1121: END IF;
1122:
1123: SELECT fin_plan_option_level_code
1124: ,fin_plan_preference_code
1128: ,l_approved_rev_plan_type_flag
1129: FROM pa_proj_fp_options
1130: WHERE proj_fp_options_id = p_proj_fp_options_id;
1131:
1132: IF P_PA_DEBUG_MODE = 'Y' THEN
1133: pa_debug.g_err_stage:='Approved Revenue Flag is Y';
1134: pa_debug.write('Insert_Only_Projfunc_Curr: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
1135: END IF;
1136:
1129: FROM pa_proj_fp_options
1130: WHERE proj_fp_options_id = p_proj_fp_options_id;
1131:
1132: IF P_PA_DEBUG_MODE = 'Y' THEN
1133: pa_debug.g_err_stage:='Approved Revenue Flag is Y';
1134: pa_debug.write('Insert_Only_Projfunc_Curr: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
1135: END IF;
1136:
1137: IF l_approved_rev_plan_type_flag = 'Y' AND
1130: WHERE proj_fp_options_id = p_proj_fp_options_id;
1131:
1132: IF P_PA_DEBUG_MODE = 'Y' THEN
1133: pa_debug.g_err_stage:='Approved Revenue Flag is Y';
1134: pa_debug.write('Insert_Only_Projfunc_Curr: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
1135: END IF;
1136:
1137: IF l_approved_rev_plan_type_flag = 'Y' AND
1138: (l_planning_level IN (PA_FP_CONSTANTS_PKG.G_OPTION_LEVEL_PLAN_TYPE,
1144: -- Planning Level is Plan Type/Plan Version,
1145: -- Fin Plan Preference code is Cost_And_Rev_Same/Revenue_Only.
1146: -- For all the above conditions, set the l_insert_only_proj_func_curr as TRUE
1147:
1148: IF P_PA_DEBUG_MODE = 'Y' THEN
1149: pa_debug.g_err_stage:='Setting the l_insert_only_proj_func_curr as TRUE';
1150: pa_debug.write('Insert_Only_Projfunc_Curr: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
1151: END IF;
1152:
1145: -- Fin Plan Preference code is Cost_And_Rev_Same/Revenue_Only.
1146: -- For all the above conditions, set the l_insert_only_proj_func_curr as TRUE
1147:
1148: IF P_PA_DEBUG_MODE = 'Y' THEN
1149: pa_debug.g_err_stage:='Setting the l_insert_only_proj_func_curr as TRUE';
1150: pa_debug.write('Insert_Only_Projfunc_Curr: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
1151: END IF;
1152:
1153: l_insert_only_proj_func_curr := TRUE;
1146: -- For all the above conditions, set the l_insert_only_proj_func_curr as TRUE
1147:
1148: IF P_PA_DEBUG_MODE = 'Y' THEN
1149: pa_debug.g_err_stage:='Setting the l_insert_only_proj_func_curr as TRUE';
1150: pa_debug.write('Insert_Only_Projfunc_Curr: ' || l_module_name,pa_debug.g_err_stage,PA_FP_CONSTANTS_PKG.G_DEBUG_LEVEL3);
1151: END IF;
1152:
1153: l_insert_only_proj_func_curr := TRUE;
1154: