72:
73: BEGIN
74: x_msg_count := 0;
75: x_return_status := FND_API.G_RET_STS_SUCCESS;
76: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
77: FND_MSG_PUB.initialize;
78:
79: IF l_debug_mode = 'Y' THEN
80: pa_debug.set_curr_function( p_function => 'validate',
76: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
77: FND_MSG_PUB.initialize;
78:
79: IF l_debug_mode = 'Y' THEN
80: pa_debug.set_curr_function( p_function => 'validate',
81: p_debug_mode => l_debug_mode );
82: END IF;
83:
84: /* checking for business rules validate */
85:
86: l_any_error_occurred_flag := 'N';
87:
88: IF l_debug_mode = 'Y' THEN
89: pa_debug.g_err_stage:= 'Validating input parameters - Name';
90: pa_debug.write(g_module_name,pa_debug.g_err_stage,
91: pa_fp_constants_pkg.g_debug_level3);
92: END IF;
93:
86: l_any_error_occurred_flag := 'N';
87:
88: IF l_debug_mode = 'Y' THEN
89: pa_debug.g_err_stage:= 'Validating input parameters - Name';
90: pa_debug.write(g_module_name,pa_debug.g_err_stage,
91: pa_fp_constants_pkg.g_debug_level3);
92: END IF;
93:
94: validate_name
104: l_any_error_occurred_flag := 'Y';
105: end if;
106:
107: IF l_debug_mode = 'Y' THEN
108: pa_debug.g_err_stage:= 'Validating input parameters - Effective dates';
109: pa_debug.write(g_module_name,pa_debug.g_err_stage,
110: pa_fp_constants_pkg.g_debug_level3);
111: END IF;
112:
105: end if;
106:
107: IF l_debug_mode = 'Y' THEN
108: pa_debug.g_err_stage:= 'Validating input parameters - Effective dates';
109: pa_debug.write(g_module_name,pa_debug.g_err_stage,
110: pa_fp_constants_pkg.g_debug_level3);
111: END IF;
112:
113: Pa_Fin_Plan_Utils.End_date_active_val
123: l_any_error_occurred_flag := 'Y';
124: end if;
125:
126: IF l_debug_mode = 'Y' THEN
127: pa_debug.g_err_stage:= 'Validating input parameters - Amount in buckets';
128: pa_debug.write(g_module_name,pa_debug.g_err_stage,
129: pa_fp_constants_pkg.g_debug_level3);
130: END IF;
131:
124: end if;
125:
126: IF l_debug_mode = 'Y' THEN
127: pa_debug.g_err_stage:= 'Validating input parameters - Amount in buckets';
128: pa_debug.write(g_module_name,pa_debug.g_err_stage,
129: pa_fp_constants_pkg.g_debug_level3);
130: END IF;
131:
132: validate_amount_in_buckets(
155:
156: if (l_any_error_occurred_flag = 'Y') then
157:
158: IF l_debug_mode = 'Y' THEN
159: pa_debug.g_err_stage:= 'Error occured while validating parameters';
160: pa_debug.write(g_module_name,pa_debug.g_err_stage,
161: pa_fp_constants_pkg.g_debug_level3);
162: END IF;
163:
156: if (l_any_error_occurred_flag = 'Y') then
157:
158: IF l_debug_mode = 'Y' THEN
159: pa_debug.g_err_stage:= 'Error occured while validating parameters';
160: pa_debug.write(g_module_name,pa_debug.g_err_stage,
161: pa_fp_constants_pkg.g_debug_level3);
162: END IF;
163:
164: raise pa_fp_constants_pkg.Invalid_Arg_Exc;
186: x_msg_count := l_msg_count;
187: END IF;
188:
189: IF l_debug_mode = 'Y' THEN
190: pa_debug.reset_curr_function;
191: END IF;
192:
193: RETURN;
194:
203: ,p_procedure_name => 'VALIDATE'
204: ,p_error_text => x_msg_data);
205:
206: IF l_debug_mode = 'Y' THEN
207: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
208: pa_debug.write(g_module_name,pa_debug.g_err_stage,
209: pa_fp_constants_pkg.g_debug_level5);
210: pa_debug.reset_curr_function;
211: END IF;
204: ,p_error_text => x_msg_data);
205:
206: IF l_debug_mode = 'Y' THEN
207: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
208: pa_debug.write(g_module_name,pa_debug.g_err_stage,
209: pa_fp_constants_pkg.g_debug_level5);
210: pa_debug.reset_curr_function;
211: END IF;
212:
206: IF l_debug_mode = 'Y' THEN
207: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
208: pa_debug.write(g_module_name,pa_debug.g_err_stage,
209: pa_fp_constants_pkg.g_debug_level5);
210: pa_debug.reset_curr_function;
211: END IF;
212:
213: RAISE;
214:
234: begin
235:
236: x_msg_count := 0;
237: x_return_status := FND_API.G_RET_STS_SUCCESS;
238: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
239:
240: IF l_debug_mode = 'Y' THEN
241: pa_debug.set_curr_function( p_function => 'Validate_Name',
242: p_debug_mode => l_debug_mode );
237: x_return_status := FND_API.G_RET_STS_SUCCESS;
238: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
239:
240: IF l_debug_mode = 'Y' THEN
241: pa_debug.set_curr_function( p_function => 'Validate_Name',
242: p_debug_mode => l_debug_mode );
243: END IF;
244:
245: IF l_debug_mode = 'Y' THEN
242: p_debug_mode => l_debug_mode );
243: END IF;
244:
245: IF l_debug_mode = 'Y' THEN
246: pa_debug.g_err_stage:= 'Validating Spread Curve Name uniqueness';
247: pa_debug.write(g_module_name,pa_debug.g_err_stage,
248: pa_fp_constants_pkg.g_debug_level3);
249: END IF;
250:
243: END IF;
244:
245: IF l_debug_mode = 'Y' THEN
246: pa_debug.g_err_stage:= 'Validating Spread Curve Name uniqueness';
247: pa_debug.write(g_module_name,pa_debug.g_err_stage,
248: pa_fp_constants_pkg.g_debug_level3);
249: END IF;
250:
251: if p_name is NULL then
254: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
255: p_msg_name => 'PA_MANDATORY_INFO_MISSING');
256:
257: IF l_debug_mode = 'Y' THEN
258: pa_debug.g_err_stage:= 'Spread Curve Name is Null';
259: pa_debug.write(g_module_name,pa_debug.g_err_stage,pa_fp_constants_pkg.g_debug_level5);
260: END IF;
261:
262: raise pa_fp_constants_pkg.Invalid_Arg_Exc;
255: p_msg_name => 'PA_MANDATORY_INFO_MISSING');
256:
257: IF l_debug_mode = 'Y' THEN
258: pa_debug.g_err_stage:= 'Spread Curve Name is Null';
259: pa_debug.write(g_module_name,pa_debug.g_err_stage,pa_fp_constants_pkg.g_debug_level5);
260: END IF;
261:
262: raise pa_fp_constants_pkg.Invalid_Arg_Exc;
263: end if;
272:
273: /* Duplicate Name should not be entered */
274:
275: IF l_debug_mode = 'Y' THEN
276: pa_debug.g_err_stage:= 'Duplicate Spread Curve Name = '|| p_name;
277: pa_debug.write(g_module_name,pa_debug.g_err_stage,pa_fp_constants_pkg.g_debug_level5);
278: END IF;
279:
280: x_return_status := FND_API.G_RET_STS_ERROR;
273: /* Duplicate Name should not be entered */
274:
275: IF l_debug_mode = 'Y' THEN
276: pa_debug.g_err_stage:= 'Duplicate Spread Curve Name = '|| p_name;
277: pa_debug.write(g_module_name,pa_debug.g_err_stage,pa_fp_constants_pkg.g_debug_level5);
278: END IF;
279:
280: x_return_status := FND_API.G_RET_STS_ERROR;
281:
311: x_msg_count := l_msg_count;
312: END IF;
313:
314: IF l_debug_mode = 'Y' THEN
315: pa_debug.reset_curr_function;
316: END IF;
317:
318: RETURN;
319:
328: ,p_procedure_name => 'VALIDATE_NAME'
329: ,p_error_text => x_msg_data);
330:
331: IF l_debug_mode = 'Y' THEN
332: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
333: pa_debug.write(g_module_name,pa_debug.g_err_stage,
334: pa_fp_constants_pkg.g_debug_level5);
335: pa_debug.reset_curr_function;
336: END IF;
329: ,p_error_text => x_msg_data);
330:
331: IF l_debug_mode = 'Y' THEN
332: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
333: pa_debug.write(g_module_name,pa_debug.g_err_stage,
334: pa_fp_constants_pkg.g_debug_level5);
335: pa_debug.reset_curr_function;
336: END IF;
337:
331: IF l_debug_mode = 'Y' THEN
332: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
333: pa_debug.write(g_module_name,pa_debug.g_err_stage,
334: pa_fp_constants_pkg.g_debug_level5);
335: pa_debug.reset_curr_function;
336: END IF;
337:
338: RAISE;
339:
366:
367: begin
368: x_msg_count := 0;
369: x_return_status := FND_API.G_RET_STS_SUCCESS;
370: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
371:
372: IF l_debug_mode = 'Y' THEN
373: pa_debug.set_curr_function( p_function => 'validate_amount_in_buckets',
374: p_debug_mode => l_debug_mode );
369: x_return_status := FND_API.G_RET_STS_SUCCESS;
370: l_debug_mode := NVL(FND_PROFILE.value('PA_DEBUG_MODE'),'N');
371:
372: IF l_debug_mode = 'Y' THEN
373: pa_debug.set_curr_function( p_function => 'validate_amount_in_buckets',
374: p_debug_mode => l_debug_mode );
375: END IF;
376:
377: -- Check for business rules violations
376:
377: -- Check for business rules violations
378:
379: IF l_debug_mode = 'Y' THEN
380: pa_debug.g_err_stage:= 'Validating Amount in buckets';
381: pa_debug.write(g_module_name,pa_debug.g_err_stage,
382: pa_fp_constants_pkg.g_debug_level3);
383: END IF;
384:
377: -- Check for business rules violations
378:
379: IF l_debug_mode = 'Y' THEN
380: pa_debug.g_err_stage:= 'Validating Amount in buckets';
381: pa_debug.write(g_module_name,pa_debug.g_err_stage,
382: pa_fp_constants_pkg.g_debug_level3);
383: END IF;
384:
385: if ( (nvl( p_point1 ,0) < 0 or (p_point1 <> ROUND(p_point1, 0 ))) or
399: PA_UTILS.ADD_MESSAGE(p_app_short_name => 'PA',
400: p_msg_name => 'PA_FP_SC_BUCK_VAL_LT_ZERO');
401:
402: IF l_debug_mode = 'Y' THEN
403: pa_debug.g_err_stage:= 'Total Bucket Value is less than zero';
404: pa_debug.write(g_module_name,pa_debug.g_err_stage,pa_fp_constants_pkg.g_debug_level5);
405: END IF;
406:
407: raise pa_fp_constants_pkg.Invalid_Arg_Exc;
400: p_msg_name => 'PA_FP_SC_BUCK_VAL_LT_ZERO');
401:
402: IF l_debug_mode = 'Y' THEN
403: pa_debug.g_err_stage:= 'Total Bucket Value is less than zero';
404: pa_debug.write(g_module_name,pa_debug.g_err_stage,pa_fp_constants_pkg.g_debug_level5);
405: END IF;
406:
407: raise pa_fp_constants_pkg.Invalid_Arg_Exc;
408:
430: x_msg_count := l_msg_count;
431: END IF;
432:
433: IF l_debug_mode = 'Y' THEN
434: pa_debug.reset_curr_function;
435: END IF;
436:
437: RETURN;
438:
447: ,p_procedure_name => 'VALIDATE_AMOUNT_IN_BUCKETS'
448: ,p_error_text => x_msg_data);
449:
450: IF l_debug_mode = 'Y' THEN
451: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
452: pa_debug.write(g_module_name,pa_debug.g_err_stage,
453: pa_fp_constants_pkg.g_debug_level5);
454: pa_debug.reset_curr_function;
455: END IF;
448: ,p_error_text => x_msg_data);
449:
450: IF l_debug_mode = 'Y' THEN
451: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
452: pa_debug.write(g_module_name,pa_debug.g_err_stage,
453: pa_fp_constants_pkg.g_debug_level5);
454: pa_debug.reset_curr_function;
455: END IF;
456:
450: IF l_debug_mode = 'Y' THEN
451: pa_debug.g_err_stage:= 'Unexpected Error'||x_msg_data;
452: pa_debug.write(g_module_name,pa_debug.g_err_stage,
453: pa_fp_constants_pkg.g_debug_level5);
454: pa_debug.reset_curr_function;
455: END IF;
456:
457: RAISE;
458: