98:
99: BEGIN
100: x_msg_count := 0;
101: x_return_status := FND_API.G_RET_STS_SUCCESS;
102: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
103: FND_MSG_PUB.initialize;
104:
105: IF l_debug_mode = 'Y' THEN
106: pa_debug.set_curr_function( p_function => 'validate',
102: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
103: FND_MSG_PUB.initialize;
104:
105: IF l_debug_mode = 'Y' THEN
106: pa_debug.set_curr_function( p_function => 'validate',
107: p_debug_mode => l_debug_mode );
108: END IF;
109:
110: /* checking for business rules validate */
111:
112: l_any_error_occurred_flag := 'N';
113:
114: IF l_debug_mode = 'Y' THEN
115: pa_debug.g_err_stage:= 'Validating input parameters - Name';
116: pa_debug.write(g_module_name,pa_debug.g_err_stage,
117: pa_fp_constants_pkg.g_debug_level3);
118: END IF;
119:
112: l_any_error_occurred_flag := 'N';
113:
114: IF l_debug_mode = 'Y' THEN
115: pa_debug.g_err_stage:= 'Validating input parameters - Name';
116: pa_debug.write(g_module_name,pa_debug.g_err_stage,
117: pa_fp_constants_pkg.g_debug_level3);
118: END IF;
119:
120: validate_name
130: l_any_error_occurred_flag := 'Y';
131: end if;
132:
133: IF l_debug_mode = 'Y' THEN
134: pa_debug.g_err_stage:= 'Validating input parameters - Effective dates';
135: pa_debug.write(g_module_name,pa_debug.g_err_stage,
136: pa_fp_constants_pkg.g_debug_level3);
137: END IF;
138:
131: end if;
132:
133: IF l_debug_mode = 'Y' THEN
134: pa_debug.g_err_stage:= 'Validating input parameters - Effective dates';
135: pa_debug.write(g_module_name,pa_debug.g_err_stage,
136: pa_fp_constants_pkg.g_debug_level3);
137: END IF;
138:
139: Pa_Fin_Plan_Utils.End_date_active_val
149: l_any_error_occurred_flag := 'Y';
150: end if;
151:
152: IF l_debug_mode = 'Y' THEN
153: pa_debug.g_err_stage:= 'Validating input parameters - Amount in buckets';
154: pa_debug.write(g_module_name,pa_debug.g_err_stage,
155: pa_fp_constants_pkg.g_debug_level3);
156: END IF;
157:
150: end if;
151:
152: IF l_debug_mode = 'Y' THEN
153: pa_debug.g_err_stage:= 'Validating input parameters - Amount in buckets';
154: pa_debug.write(g_module_name,pa_debug.g_err_stage,
155: pa_fp_constants_pkg.g_debug_level3);
156: END IF;
157:
158: validate_amount_in_buckets(
181:
182: if (l_any_error_occurred_flag = 'Y') then
183:
184: IF l_debug_mode = 'Y' THEN
185: pa_debug.g_err_stage:= 'Error occured while validating parameters';
186: pa_debug.write(g_module_name,pa_debug.g_err_stage,
187: pa_fp_constants_pkg.g_debug_level3);
188: END IF;
189:
182: if (l_any_error_occurred_flag = 'Y') then
183:
184: IF l_debug_mode = 'Y' THEN
185: pa_debug.g_err_stage:= 'Error occured while validating parameters';
186: pa_debug.write(g_module_name,pa_debug.g_err_stage,
187: pa_fp_constants_pkg.g_debug_level3);
188: END IF;
189:
190: raise pa_fp_constants_pkg.Invalid_Arg_Exc;
212: x_msg_count := l_msg_count;
213: END IF;
214:
215: IF l_debug_mode = 'Y' THEN
216: pa_debug.reset_curr_function;
217: END IF;
218:
219: RETURN;
220:
229: ,p_procedure_name => 'VALIDATE'
230: ,p_error_text => x_msg_data);
231:
232: IF l_debug_mode = 'Y' THEN
233: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
234: pa_debug.write(g_module_name,pa_debug.g_err_stage,
235: pa_fp_constants_pkg.g_debug_level5);
236: pa_debug.reset_curr_function;
237: END IF;
230: ,p_error_text => x_msg_data);
231:
232: IF l_debug_mode = 'Y' THEN
233: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
234: pa_debug.write(g_module_name,pa_debug.g_err_stage,
235: pa_fp_constants_pkg.g_debug_level5);
236: pa_debug.reset_curr_function;
237: END IF;
238:
232: IF l_debug_mode = 'Y' THEN
233: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
234: pa_debug.write(g_module_name,pa_debug.g_err_stage,
235: pa_fp_constants_pkg.g_debug_level5);
236: pa_debug.reset_curr_function;
237: END IF;
238:
239: RAISE;
240:
260: begin
261:
262: x_msg_count := 0;
263: x_return_status := FND_API.G_RET_STS_SUCCESS;
264: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
265:
266: IF l_debug_mode = 'Y' THEN
267: pa_debug.set_curr_function( p_function => 'Validate_Name',
268: p_debug_mode => l_debug_mode );
263: x_return_status := FND_API.G_RET_STS_SUCCESS;
264: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
265:
266: IF l_debug_mode = 'Y' THEN
267: pa_debug.set_curr_function( p_function => 'Validate_Name',
268: p_debug_mode => l_debug_mode );
269: END IF;
270:
271: IF l_debug_mode = 'Y' THEN
268: p_debug_mode => l_debug_mode );
269: END IF;
270:
271: IF l_debug_mode = 'Y' THEN
272: pa_debug.g_err_stage:= 'Validating Spread Curve Name uniqueness';
273: pa_debug.write(g_module_name,pa_debug.g_err_stage,
274: pa_fp_constants_pkg.g_debug_level3);
275: END IF;
276:
269: END IF;
270:
271: IF l_debug_mode = 'Y' THEN
272: pa_debug.g_err_stage:= 'Validating Spread Curve Name uniqueness';
273: pa_debug.write(g_module_name,pa_debug.g_err_stage,
274: pa_fp_constants_pkg.g_debug_level3);
275: END IF;
276:
277: if p_name is NULL then
280: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
281: p_msg_name => 'PA_MANDATORY_INFO_MISSING');
282:
283: IF l_debug_mode = 'Y' THEN
284: pa_debug.g_err_stage:= 'Spread Curve Name is Null';
285: pa_debug.write(g_module_name,pa_debug.g_err_stage,pa_fp_constants_pkg.g_debug_level5);
286: END IF;
287:
288: raise pa_fp_constants_pkg.Invalid_Arg_Exc;
281: p_msg_name => 'PA_MANDATORY_INFO_MISSING');
282:
283: IF l_debug_mode = 'Y' THEN
284: pa_debug.g_err_stage:= 'Spread Curve Name is Null';
285: pa_debug.write(g_module_name,pa_debug.g_err_stage,pa_fp_constants_pkg.g_debug_level5);
286: END IF;
287:
288: raise pa_fp_constants_pkg.Invalid_Arg_Exc;
289: end if;
298:
299: /* Duplicate Name should not be entered */
300:
301: IF l_debug_mode = 'Y' THEN
302: pa_debug.g_err_stage:= 'Duplicate Spread Curve Name = '|| p_name;
303: pa_debug.write(g_module_name,pa_debug.g_err_stage,pa_fp_constants_pkg.g_debug_level5);
304: END IF;
305:
306: x_return_status := FND_API.G_RET_STS_ERROR;
299: /* Duplicate Name should not be entered */
300:
301: IF l_debug_mode = 'Y' THEN
302: pa_debug.g_err_stage:= 'Duplicate Spread Curve Name = '|| p_name;
303: pa_debug.write(g_module_name,pa_debug.g_err_stage,pa_fp_constants_pkg.g_debug_level5);
304: END IF;
305:
306: x_return_status := FND_API.G_RET_STS_ERROR;
307:
337: x_msg_count := l_msg_count;
338: END IF;
339:
340: IF l_debug_mode = 'Y' THEN
341: pa_debug.reset_curr_function;
342: END IF;
343:
344: RETURN;
345:
354: ,p_procedure_name => 'VALIDATE_NAME'
355: ,p_error_text => x_msg_data);
356:
357: IF l_debug_mode = 'Y' THEN
358: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
359: pa_debug.write(g_module_name,pa_debug.g_err_stage,
360: pa_fp_constants_pkg.g_debug_level5);
361: pa_debug.reset_curr_function;
362: END IF;
355: ,p_error_text => x_msg_data);
356:
357: IF l_debug_mode = 'Y' THEN
358: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
359: pa_debug.write(g_module_name,pa_debug.g_err_stage,
360: pa_fp_constants_pkg.g_debug_level5);
361: pa_debug.reset_curr_function;
362: END IF;
363:
357: IF l_debug_mode = 'Y' THEN
358: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
359: pa_debug.write(g_module_name,pa_debug.g_err_stage,
360: pa_fp_constants_pkg.g_debug_level5);
361: pa_debug.reset_curr_function;
362: END IF;
363:
364: RAISE;
365:
392:
393: begin
394: x_msg_count := 0;
395: x_return_status := FND_API.G_RET_STS_SUCCESS;
396: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
397:
398: IF l_debug_mode = 'Y' THEN
399: pa_debug.set_curr_function( p_function => 'validate_amount_in_buckets',
400: p_debug_mode => l_debug_mode );
395: x_return_status := FND_API.G_RET_STS_SUCCESS;
396: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
397:
398: IF l_debug_mode = 'Y' THEN
399: pa_debug.set_curr_function( p_function => 'validate_amount_in_buckets',
400: p_debug_mode => l_debug_mode );
401: END IF;
402:
403: -- Check for business rules violations
402:
403: -- Check for business rules violations
404:
405: IF l_debug_mode = 'Y' THEN
406: pa_debug.g_err_stage:= 'Validating Amount in buckets';
407: pa_debug.write(g_module_name,pa_debug.g_err_stage,
408: pa_fp_constants_pkg.g_debug_level3);
409: END IF;
410:
403: -- Check for business rules violations
404:
405: IF l_debug_mode = 'Y' THEN
406: pa_debug.g_err_stage:= 'Validating Amount in buckets';
407: pa_debug.write(g_module_name,pa_debug.g_err_stage,
408: pa_fp_constants_pkg.g_debug_level3);
409: END IF;
410:
411: if ( (nvl( p_point1 ,0) < 0 or (p_point1 <> ROUND(p_point1, 0 ))) or
425: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
426: p_msg_name => 'PA_FP_SC_BUCK_VAL_LT_ZERO');
427:
428: IF l_debug_mode = 'Y' THEN
429: pa_debug.g_err_stage:= 'Total Bucket Value is less than zero';
430: pa_debug.write(g_module_name,pa_debug.g_err_stage,pa_fp_constants_pkg.g_debug_level5);
431: END IF;
432:
433: raise pa_fp_constants_pkg.Invalid_Arg_Exc;
426: p_msg_name => 'PA_FP_SC_BUCK_VAL_LT_ZERO');
427:
428: IF l_debug_mode = 'Y' THEN
429: pa_debug.g_err_stage:= 'Total Bucket Value is less than zero';
430: pa_debug.write(g_module_name,pa_debug.g_err_stage,pa_fp_constants_pkg.g_debug_level5);
431: END IF;
432:
433: raise pa_fp_constants_pkg.Invalid_Arg_Exc;
434:
456: x_msg_count := l_msg_count;
457: END IF;
458:
459: IF l_debug_mode = 'Y' THEN
460: pa_debug.reset_curr_function;
461: END IF;
462:
463: RETURN;
464:
473: ,p_procedure_name => 'VALIDATE_AMOUNT_IN_BUCKETS'
474: ,p_error_text => x_msg_data);
475:
476: IF l_debug_mode = 'Y' THEN
477: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
478: pa_debug.write(g_module_name,pa_debug.g_err_stage,
479: pa_fp_constants_pkg.g_debug_level5);
480: pa_debug.reset_curr_function;
481: END IF;
474: ,p_error_text => x_msg_data);
475:
476: IF l_debug_mode = 'Y' THEN
477: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
478: pa_debug.write(g_module_name,pa_debug.g_err_stage,
479: pa_fp_constants_pkg.g_debug_level5);
480: pa_debug.reset_curr_function;
481: END IF;
482:
476: IF l_debug_mode = 'Y' THEN
477: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
478: pa_debug.write(g_module_name,pa_debug.g_err_stage,
479: pa_fp_constants_pkg.g_debug_level5);
480: pa_debug.reset_curr_function;
481: END IF;
482:
483: RAISE;
484: