DBA Data[Home] [Help]

APPS.CN_PLAN_ELEMENT_PUB dependencies on FND_API

Line 17: x_return_status := fnd_api.g_ret_sts_success;

13: l_tmp_exist NUMBER := 0;
14:
15: BEGIN
16: -- set the Status
17: x_return_status := fnd_api.g_ret_sts_success;
18:
19:
20: IF p_payment_group_code is null
21: THEN

Line 41: RAISE fnd_api.g_exc_error;

37: fnd_message.set_token ('OBJ_NAME', p_payment_group_code);
38: fnd_msg_pub.ADD;
39: END IF;
40:
41: RAISE fnd_api.g_exc_error;
42: END IF;
43:
44: END IF;
45:

Line 47: WHEN fnd_api.g_exc_error

43:
44: END IF;
45:
46: EXCEPTION
47: WHEN fnd_api.g_exc_error
48: THEN
49: x_return_status := fnd_api.g_ret_sts_error;
50:
51: WHEN fnd_api.g_exc_unexpected_error

Line 49: x_return_status := fnd_api.g_ret_sts_error;

45:
46: EXCEPTION
47: WHEN fnd_api.g_exc_error
48: THEN
49: x_return_status := fnd_api.g_ret_sts_error;
50:
51: WHEN fnd_api.g_exc_unexpected_error
52: THEN
53: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 51: WHEN fnd_api.g_exc_unexpected_error

47: WHEN fnd_api.g_exc_error
48: THEN
49: x_return_status := fnd_api.g_ret_sts_error;
50:
51: WHEN fnd_api.g_exc_unexpected_error
52: THEN
53: x_return_status := fnd_api.g_ret_sts_unexp_error;
54:
55: WHEN OTHERS

Line 53: x_return_status := fnd_api.g_ret_sts_unexp_error;

49: x_return_status := fnd_api.g_ret_sts_error;
50:
51: WHEN fnd_api.g_exc_unexpected_error
52: THEN
53: x_return_status := fnd_api.g_ret_sts_unexp_error;
54:
55: WHEN OTHERS
56: THEN
57: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 57: x_return_status := fnd_api.g_ret_sts_unexp_error;

53: x_return_status := fnd_api.g_ret_sts_unexp_error;
54:
55: WHEN OTHERS
56: THEN
57: x_return_status := fnd_api.g_ret_sts_unexp_error;
58:
59: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
60: THEN
61: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 91: RAISE fnd_api.g_exc_error;

87: IF p_org_id IS NULL
88: THEN
89: fnd_message.set_name ('FND', 'MO_OU_REQUIRED');
90: fnd_msg_pub.ADD;
91: RAISE fnd_api.g_exc_error;
92: END IF;
93: END;
94:
95: /* ****************** */

Line 111: IF p_return_status = fnd_api.g_ret_sts_error

107: p_return_status IN VARCHAR2
108: )
109: IS
110: BEGIN
111: IF p_return_status = fnd_api.g_ret_sts_error
112: THEN
113: RAISE fnd_api.g_exc_error;
114: ELSIF p_return_status = fnd_api.g_ret_sts_unexp_error
115: THEN

Line 113: RAISE fnd_api.g_exc_error;

109: IS
110: BEGIN
111: IF p_return_status = fnd_api.g_ret_sts_error
112: THEN
113: RAISE fnd_api.g_exc_error;
114: ELSIF p_return_status = fnd_api.g_ret_sts_unexp_error
115: THEN
116: RAISE fnd_api.g_exc_unexpected_error;
117: END IF;

Line 114: ELSIF p_return_status = fnd_api.g_ret_sts_unexp_error

110: BEGIN
111: IF p_return_status = fnd_api.g_ret_sts_error
112: THEN
113: RAISE fnd_api.g_exc_error;
114: ELSIF p_return_status = fnd_api.g_ret_sts_unexp_error
115: THEN
116: RAISE fnd_api.g_exc_unexpected_error;
117: END IF;
118: END;

Line 116: RAISE fnd_api.g_exc_unexpected_error;

112: THEN
113: RAISE fnd_api.g_exc_error;
114: ELSIF p_return_status = fnd_api.g_ret_sts_unexp_error
115: THEN
116: RAISE fnd_api.g_exc_unexpected_error;
117: END IF;
118: END;
119:
120: /* ****************** */

Line 162: -- Assign NULL value if code = FND_API.G_MISS_CHAR

158: l_incentive_type cn_lookups.meaning%TYPE;
159: l_flag VARCHAR2 (10);
160: BEGIN
161: -- Trim code, remove all blank spaces at begin/end of the string
162: -- Assign NULL value if code = FND_API.G_MISS_CHAR
163: l_element_type := RTRIM (LTRIM (p_element_type));
164: l_incentive_type := RTRIM (LTRIM (p_incentive_type));
165:
166: -- Convert x_quota_type_code

Line 175: IF l_element_type = fnd_api.g_miss_char

171: WHERE lookup_type = 'QUOTA_TYPE' AND UPPER (meaning) = UPPER (l_element_type);
172: EXCEPTION
173: WHEN NO_DATA_FOUND
174: THEN
175: IF l_element_type = fnd_api.g_miss_char
176: THEN
177: x_quota_type_code := fnd_api.g_miss_char;
178: ELSE
179: x_quota_type_code := SUBSTRB (l_element_type, 1, 30);

Line 177: x_quota_type_code := fnd_api.g_miss_char;

173: WHEN NO_DATA_FOUND
174: THEN
175: IF l_element_type = fnd_api.g_miss_char
176: THEN
177: x_quota_type_code := fnd_api.g_miss_char;
178: ELSE
179: x_quota_type_code := SUBSTRB (l_element_type, 1, 30);
180: END IF;
181: END;

Line 192: IF l_incentive_type = fnd_api.g_miss_char

188: WHERE lookup_type = 'INCENTIVE_TYPE' AND UPPER (meaning) = UPPER (l_incentive_type);
189: EXCEPTION
190: WHEN NO_DATA_FOUND
191: THEN
192: IF l_incentive_type = fnd_api.g_miss_char
193: THEN
194: x_incentive_type_code := fnd_api.g_miss_char;
195: ELSE
196: x_incentive_type_code := SUBSTRB (l_incentive_type, 1, 30);

Line 194: x_incentive_type_code := fnd_api.g_miss_char;

190: WHEN NO_DATA_FOUND
191: THEN
192: IF l_incentive_type = fnd_api.g_miss_char
193: THEN
194: x_incentive_type_code := fnd_api.g_miss_char;
195: ELSE
196: x_incentive_type_code := SUBSTRB (l_incentive_type, 1, 30);
197: END IF;
198: END;

Line 201: SELECT DECODE (p_payee_assign_flag, fnd_api.g_miss_char, 'No', NULL, 'No', LTRIM (RTRIM (p_payee_assign_flag)))

197: END IF;
198: END;
199:
200: -- Convert x_payee_assign_flag
201: SELECT DECODE (p_payee_assign_flag, fnd_api.g_miss_char, 'No', NULL, 'No', LTRIM (RTRIM (p_payee_assign_flag)))
202: INTO l_flag
203: FROM SYS.DUAL;
204:
205: BEGIN

Line 217: SELECT DECODE (p_vesting_flag, fnd_api.g_miss_char, 'No', NULL, 'No', LTRIM (RTRIM (p_vesting_flag)))

213: x_payee_assign_flag := SUBSTRB (l_flag, 1, 1);
214: END;
215:
216: -- Convert x_vesting_flag
217: SELECT DECODE (p_vesting_flag, fnd_api.g_miss_char, 'No', NULL, 'No', LTRIM (RTRIM (p_vesting_flag)))
218: INTO l_flag
219: FROM SYS.DUAL;
220:
221: BEGIN

Line 233: SELECT DECODE (p_addup_from_rev_class_flag, fnd_api.g_miss_char, 'No', NULL, 'No', LTRIM (RTRIM (p_addup_from_rev_class_flag)))

229: x_vesting_flag := SUBSTRB (l_flag, 1, 1);
230: END;
231:
232: -- Convert x_addup_rev_class_flag
233: SELECT DECODE (p_addup_from_rev_class_flag, fnd_api.g_miss_char, 'No', NULL, 'No', LTRIM (RTRIM (p_addup_from_rev_class_flag)))
234: INTO l_flag
235: FROM SYS.DUAL;
236:
237: BEGIN

Line 249: SELECT DECODE (p_rt_sched_custom_flag, fnd_api.g_miss_char, 'No', NULL, 'No', LTRIM (RTRIM (p_rt_sched_custom_flag)))

245: x_addup_from_rev_class_flag := SUBSTRB (l_flag, 1, 1);
246: END;
247:
248: -- Convert x_rate_cust_flag
249: SELECT DECODE (p_rt_sched_custom_flag, fnd_api.g_miss_char, 'No', NULL, 'No', LTRIM (RTRIM (p_rt_sched_custom_flag)))
250: INTO l_flag
251: FROM SYS.DUAL;
252:
253: BEGIN

Line 285: x_return_status := fnd_api.g_ret_sts_success;

281: IS
282: l_pe_rec cn_chk_plan_element_pkg.pe_rec_type := cn_chk_plan_element_pkg.g_miss_pe_rec;
283: BEGIN
284: -- Set the Status
285: x_return_status := fnd_api.g_ret_sts_success;
286: x_loading_status := p_loading_status;
287: -- Remove the Left and Right Spaces.
288: l_pe_rec.NAME := p_plan_element_rec.NAME;
289: l_pe_rec.interval_name := p_plan_element_rec.interval_name;

Line 384: SELECT DECODE (p_plan_element_rec.target, fnd_api.g_miss_num, 0, NULL, 0, p_plan_element_rec.target)

380: x_addup_from_rev_class_flag => l_pe_rec.addup_from_rev_class_flag
381: );
382:
383: -- Assign Default value if null or G_MISS_NUM
384: SELECT DECODE (p_plan_element_rec.target, fnd_api.g_miss_num, 0, NULL, 0, p_plan_element_rec.target)
385: INTO l_pe_rec.target
386: FROM SYS.DUAL;
387:
388: -- Assign Default value if null or G_MISS_NUM

Line 389: SELECT DECODE (p_plan_element_rec.payment_amount, fnd_api.g_miss_num, 0, NULL, 0, p_plan_element_rec.payment_amount)

385: INTO l_pe_rec.target
386: FROM SYS.DUAL;
387:
388: -- Assign Default value if null or G_MISS_NUM
389: SELECT DECODE (p_plan_element_rec.payment_amount, fnd_api.g_miss_num, 0, NULL, 0, p_plan_element_rec.payment_amount)
390: INTO l_pe_rec.payment_amount
391: FROM SYS.DUAL;
392:
393: -- Assign Default value if null or G_MISS_NUM

Line 394: SELECT DECODE (p_plan_element_rec.performance_goal, fnd_api.g_miss_num, 0, NULL, 0, p_plan_element_rec.performance_goal)

390: INTO l_pe_rec.payment_amount
391: FROM SYS.DUAL;
392:
393: -- Assign Default value if null or G_MISS_NUM
394: SELECT DECODE (p_plan_element_rec.performance_goal, fnd_api.g_miss_num, 0, NULL, 0, p_plan_element_rec.performance_goal)
395: INTO l_pe_rec.performance_goal
396: FROM SYS.DUAL;
397:
398: -- Return the Converted Value

Line 418: x_return_status := fnd_api.g_ret_sts_success;

414: IS
415: l_api_name CONSTANT VARCHAR2 (30) := 'Chk_Pe_Required';
416: l_loading_status VARCHAR2 (80);
417: BEGIN
418: x_return_status := fnd_api.g_ret_sts_success;
419: x_loading_status := p_loading_status;
420:
421: -- Check if plan element name is missing or null
422: IF ((cn_api.chk_miss_char_para (p_char_para => p_pe_rec.NAME,

Line 427: ) = fnd_api.g_true

423: p_para_name => cn_chk_plan_element_pkg.g_pe_name,
424: p_loading_status => x_loading_status,
425: x_loading_status => l_loading_status
426: )
427: ) = fnd_api.g_true
428: )
429: THEN
430: RAISE fnd_api.g_exc_error;
431: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_pe_rec.NAME,

Line 430: RAISE fnd_api.g_exc_error;

426: )
427: ) = fnd_api.g_true
428: )
429: THEN
430: RAISE fnd_api.g_exc_error;
431: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_pe_rec.NAME,
432: p_obj_name => cn_chk_plan_element_pkg.g_pe_name,
433: p_loading_status => x_loading_status,
434: x_loading_status => l_loading_status

Line 436: ) = fnd_api.g_true

432: p_obj_name => cn_chk_plan_element_pkg.g_pe_name,
433: p_loading_status => x_loading_status,
434: x_loading_status => l_loading_status
435: )
436: ) = fnd_api.g_true
437: )
438: THEN
439: RAISE fnd_api.g_exc_error;
440: END IF;

Line 439: RAISE fnd_api.g_exc_error;

435: )
436: ) = fnd_api.g_true
437: )
438: THEN
439: RAISE fnd_api.g_exc_error;
440: END IF;
441:
442: -- Check quota_type_code can not be missing or NULL
443: IF ((cn_api.chk_miss_char_para (p_char_para => p_pe_rec.quota_type_code,

Line 448: ) = fnd_api.g_true

444: p_para_name => cn_chk_plan_element_pkg.g_element_type,
445: p_loading_status => x_loading_status,
446: x_loading_status => l_loading_status
447: )
448: ) = fnd_api.g_true
449: )
450: THEN
451: RAISE fnd_api.g_exc_error;
452: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_pe_rec.quota_type_code,

Line 451: RAISE fnd_api.g_exc_error;

447: )
448: ) = fnd_api.g_true
449: )
450: THEN
451: RAISE fnd_api.g_exc_error;
452: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_pe_rec.quota_type_code,
453: p_obj_name => cn_chk_plan_element_pkg.g_element_type,
454: p_loading_status => x_loading_status,
455: x_loading_status => l_loading_status

Line 457: ) = fnd_api.g_true

453: p_obj_name => cn_chk_plan_element_pkg.g_element_type,
454: p_loading_status => x_loading_status,
455: x_loading_status => l_loading_status
456: )
457: ) = fnd_api.g_true
458: )
459: THEN
460: RAISE fnd_api.g_exc_error;
461: END IF;

Line 460: RAISE fnd_api.g_exc_error;

456: )
457: ) = fnd_api.g_true
458: )
459: THEN
460: RAISE fnd_api.g_exc_error;
461: END IF;
462:
463: -- Check credit_type can not be missing or NULL
464: IF ((cn_api.chk_miss_char_para (p_char_para => p_pe_rec.credit_type,

Line 469: ) = fnd_api.g_true

465: p_para_name => cn_chk_plan_element_pkg.g_credit_type_name,
466: p_loading_status => x_loading_status,
467: x_loading_status => l_loading_status
468: )
469: ) = fnd_api.g_true
470: )
471: THEN
472: RAISE fnd_api.g_exc_error;
473: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_pe_rec.credit_type,

Line 472: RAISE fnd_api.g_exc_error;

468: )
469: ) = fnd_api.g_true
470: )
471: THEN
472: RAISE fnd_api.g_exc_error;
473: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_pe_rec.credit_type,
474: p_obj_name => cn_chk_plan_element_pkg.g_credit_type_name,
475: p_loading_status => x_loading_status,
476: x_loading_status => l_loading_status

Line 478: ) = fnd_api.g_true

474: p_obj_name => cn_chk_plan_element_pkg.g_credit_type_name,
475: p_loading_status => x_loading_status,
476: x_loading_status => l_loading_status
477: )
478: ) = fnd_api.g_true
479: )
480: THEN
481: RAISE fnd_api.g_exc_error;
482: END IF;

Line 481: RAISE fnd_api.g_exc_error;

477: )
478: ) = fnd_api.g_true
479: )
480: THEN
481: RAISE fnd_api.g_exc_error;
482: END IF;
483:
484: -- Check credit_type_id can not be missing or NULL
485: IF (p_pe_rec.credit_type IS NOT NULL AND p_pe_rec.credit_type_id IS NULL)

Line 495: RAISE fnd_api.g_exc_error;

491: fnd_msg_pub.ADD;
492: END IF;
493:
494: x_loading_status := 'CREDIT_TYPE_NOT_EXIST';
495: RAISE fnd_api.g_exc_error;
496: END IF;
497:
498: -- Check interval_type_id can not be missing or NULL
499: IF (p_pe_rec.interval_name IS NOT NULL AND p_pe_rec.interval_type_id IS NULL)

Line 509: RAISE fnd_api.g_exc_error;

505: fnd_msg_pub.ADD;
506: END IF;
507:
508: x_loading_status := 'INTERVAL_TYPE_NOT_EXIST';
509: RAISE fnd_api.g_exc_error;
510: END IF;
511:
512: -- Check incentive_type_code can not be missing or NULL
513: IF ((cn_api.chk_miss_char_para (p_char_para => p_pe_rec.incentive_type_code,

Line 518: ) = fnd_api.g_true

514: p_para_name => cn_chk_plan_element_pkg.g_incentive_type_code,
515: p_loading_status => x_loading_status,
516: x_loading_status => l_loading_status
517: )
518: ) = fnd_api.g_true
519: )
520: THEN
521: RAISE fnd_api.g_exc_error;
522: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_pe_rec.incentive_type_code,

Line 521: RAISE fnd_api.g_exc_error;

517: )
518: ) = fnd_api.g_true
519: )
520: THEN
521: RAISE fnd_api.g_exc_error;
522: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_pe_rec.incentive_type_code,
523: p_obj_name => cn_chk_plan_element_pkg.g_incentive_type_code,
524: p_loading_status => x_loading_status,
525: x_loading_status => l_loading_status

Line 527: ) = fnd_api.g_true

523: p_obj_name => cn_chk_plan_element_pkg.g_incentive_type_code,
524: p_loading_status => x_loading_status,
525: x_loading_status => l_loading_status
526: )
527: ) = fnd_api.g_true
528: )
529: THEN
530: RAISE fnd_api.g_exc_error;
531: END IF;

Line 530: RAISE fnd_api.g_exc_error;

526: )
527: ) = fnd_api.g_true
528: )
529: THEN
530: RAISE fnd_api.g_exc_error;
531: END IF;
532:
533: -- Check Start Date can not be missing or NULL
534: IF ((cn_chk_plan_element_pkg.chk_miss_date_para (p_date_para => p_pe_rec.start_date,

Line 539: ) = fnd_api.g_true

535: p_para_name => cn_chk_plan_element_pkg.g_start_date,
536: p_loading_status => x_loading_status,
537: x_loading_status => l_loading_status
538: )
539: ) = fnd_api.g_true
540: )
541: THEN
542: RAISE fnd_api.g_exc_error;
543: ELSIF ((cn_chk_plan_element_pkg.chk_null_date_para (p_date_para => p_pe_rec.start_date,

Line 542: RAISE fnd_api.g_exc_error;

538: )
539: ) = fnd_api.g_true
540: )
541: THEN
542: RAISE fnd_api.g_exc_error;
543: ELSIF ((cn_chk_plan_element_pkg.chk_null_date_para (p_date_para => p_pe_rec.start_date,
544: p_obj_name => cn_chk_plan_element_pkg.g_start_date,
545: p_loading_status => x_loading_status,
546: x_loading_status => l_loading_status

Line 548: ) = fnd_api.g_true

544: p_obj_name => cn_chk_plan_element_pkg.g_start_date,
545: p_loading_status => x_loading_status,
546: x_loading_status => l_loading_status
547: )
548: ) = fnd_api.g_true
549: )
550: THEN
551: RAISE fnd_api.g_exc_error;
552: END IF;

Line 551: RAISE fnd_api.g_exc_error;

547: )
548: ) = fnd_api.g_true
549: )
550: THEN
551: RAISE fnd_api.g_exc_error;
552: END IF;
553:
554: -- Check interval name can not be missing or NULL
555: IF ((cn_api.chk_miss_char_para (p_char_para => p_pe_rec.interval_name,

Line 560: ) = fnd_api.g_true

556: p_para_name => cn_chk_plan_element_pkg.g_interval_name,
557: p_loading_status => x_loading_status,
558: x_loading_status => l_loading_status
559: )
560: ) = fnd_api.g_true
561: )
562: THEN
563: RAISE fnd_api.g_exc_error;
564: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_pe_rec.interval_name,

Line 563: RAISE fnd_api.g_exc_error;

559: )
560: ) = fnd_api.g_true
561: )
562: THEN
563: RAISE fnd_api.g_exc_error;
564: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_pe_rec.interval_name,
565: p_obj_name => cn_chk_plan_element_pkg.g_interval_name,
566: p_loading_status => x_loading_status,
567: x_loading_status => l_loading_status

Line 569: ) = fnd_api.g_true

565: p_obj_name => cn_chk_plan_element_pkg.g_interval_name,
566: p_loading_status => x_loading_status,
567: x_loading_status => l_loading_status
568: )
569: ) = fnd_api.g_true
570: )
571: THEN
572: RAISE fnd_api.g_exc_error;
573: END IF;

Line 572: RAISE fnd_api.g_exc_error;

568: )
569: ) = fnd_api.g_true
570: )
571: THEN
572: RAISE fnd_api.g_exc_error;
573: END IF;
574: -- end of chk_pe_required
575: EXCEPTION
576: WHEN fnd_api.g_exc_error

Line 576: WHEN fnd_api.g_exc_error

572: RAISE fnd_api.g_exc_error;
573: END IF;
574: -- end of chk_pe_required
575: EXCEPTION
576: WHEN fnd_api.g_exc_error
577: THEN
578: x_return_status := fnd_api.g_ret_sts_error;
579: WHEN fnd_api.g_exc_unexpected_error
580: THEN

Line 578: x_return_status := fnd_api.g_ret_sts_error;

574: -- end of chk_pe_required
575: EXCEPTION
576: WHEN fnd_api.g_exc_error
577: THEN
578: x_return_status := fnd_api.g_ret_sts_error;
579: WHEN fnd_api.g_exc_unexpected_error
580: THEN
581: x_return_status := fnd_api.g_ret_sts_unexp_error;
582: x_loading_status := 'UNEXPECTED_ERR';

Line 579: WHEN fnd_api.g_exc_unexpected_error

575: EXCEPTION
576: WHEN fnd_api.g_exc_error
577: THEN
578: x_return_status := fnd_api.g_ret_sts_error;
579: WHEN fnd_api.g_exc_unexpected_error
580: THEN
581: x_return_status := fnd_api.g_ret_sts_unexp_error;
582: x_loading_status := 'UNEXPECTED_ERR';
583: WHEN OTHERS

Line 581: x_return_status := fnd_api.g_ret_sts_unexp_error;

577: THEN
578: x_return_status := fnd_api.g_ret_sts_error;
579: WHEN fnd_api.g_exc_unexpected_error
580: THEN
581: x_return_status := fnd_api.g_ret_sts_unexp_error;
582: x_loading_status := 'UNEXPECTED_ERR';
583: WHEN OTHERS
584: THEN
585: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 585: x_return_status := fnd_api.g_ret_sts_unexp_error;

581: x_return_status := fnd_api.g_ret_sts_unexp_error;
582: x_loading_status := 'UNEXPECTED_ERR';
583: WHEN OTHERS
584: THEN
585: x_return_status := fnd_api.g_ret_sts_unexp_error;
586: x_loading_status := 'UNEXPECTED_ERR';
587:
588: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
589: THEN

Line 620: x_return_status := fnd_api.g_ret_sts_success;

616:
617: l_pe_csr c_pe_csr%ROWTYPE;
618: l_api_name CONSTANT VARCHAR2 (30) := 'chk_pe_consistent';
619: BEGIN
620: x_return_status := fnd_api.g_ret_sts_success;
621: x_loading_status := p_loading_status;
622:
623: OPEN c_pe_csr;
624:

Line 630: RAISE fnd_api.g_exc_unexpected_error;

626: INTO l_pe_csr;
627:
628: IF c_pe_csr%NOTFOUND
629: THEN
630: RAISE fnd_api.g_exc_unexpected_error;
631: END IF;
632:
633: -- Check description consistent
634: IF (l_pe_csr.description <> p_pe_rec.description)

Line 647: RAISE fnd_api.g_exc_error;

643: fnd_msg_pub.ADD;
644: END IF;
645:
646: x_loading_status := 'CN_PLN_NOT_CONSISTENT';
647: RAISE fnd_api.g_exc_error;
648: END IF;
649:
650: -- Check quota_type_code consistent
651: IF (l_pe_csr.quota_type_code <> p_pe_rec.quota_type_code)

Line 664: RAISE fnd_api.g_exc_error;

660: fnd_msg_pub.ADD;
661: END IF;
662:
663: x_loading_status := 'CN_PLN_NOT_CONSISTENT';
664: RAISE fnd_api.g_exc_error;
665: END IF;
666:
667: -- Check target consistent
668: IF (l_pe_csr.target <> p_pe_rec.target)

Line 681: RAISE fnd_api.g_exc_error;

677: fnd_msg_pub.ADD;
678: END IF;
679:
680: x_loading_status := 'CN_PLN_NOT_CONSISTENT';
681: RAISE fnd_api.g_exc_error;
682: END IF;
683:
684: CLOSE c_pe_csr;
685: EXCEPTION

Line 686: WHEN fnd_api.g_exc_error

682: END IF;
683:
684: CLOSE c_pe_csr;
685: EXCEPTION
686: WHEN fnd_api.g_exc_error
687: THEN
688: x_return_status := fnd_api.g_ret_sts_error;
689: WHEN fnd_api.g_exc_unexpected_error
690: THEN

Line 688: x_return_status := fnd_api.g_ret_sts_error;

684: CLOSE c_pe_csr;
685: EXCEPTION
686: WHEN fnd_api.g_exc_error
687: THEN
688: x_return_status := fnd_api.g_ret_sts_error;
689: WHEN fnd_api.g_exc_unexpected_error
690: THEN
691: x_return_status := fnd_api.g_ret_sts_unexp_error;
692: x_loading_status := 'UNEXPECTED_ERR';

Line 689: WHEN fnd_api.g_exc_unexpected_error

685: EXCEPTION
686: WHEN fnd_api.g_exc_error
687: THEN
688: x_return_status := fnd_api.g_ret_sts_error;
689: WHEN fnd_api.g_exc_unexpected_error
690: THEN
691: x_return_status := fnd_api.g_ret_sts_unexp_error;
692: x_loading_status := 'UNEXPECTED_ERR';
693: WHEN OTHERS

Line 691: x_return_status := fnd_api.g_ret_sts_unexp_error;

687: THEN
688: x_return_status := fnd_api.g_ret_sts_error;
689: WHEN fnd_api.g_exc_unexpected_error
690: THEN
691: x_return_status := fnd_api.g_ret_sts_unexp_error;
692: x_loading_status := 'UNEXPECTED_ERR';
693: WHEN OTHERS
694: THEN
695: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 695: x_return_status := fnd_api.g_ret_sts_unexp_error;

691: x_return_status := fnd_api.g_ret_sts_unexp_error;
692: x_loading_status := 'UNEXPECTED_ERR';
693: WHEN OTHERS
694: THEN
695: x_return_status := fnd_api.g_ret_sts_unexp_error;
696: x_loading_status := 'UNEXPECTED_ERR';
697:
698: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
699: THEN

Line 796: x_return_status := fnd_api.g_ret_sts_success;

792: l_api_name CONSTANT VARCHAR2 (30) := 'Valid_Lookup_Code';
793: l_tmp_exist NUMBER := 0;
794: BEGIN
795: -- set the Status
796: x_return_status := fnd_api.g_ret_sts_success;
797: x_loading_status := p_loading_status;
798:
799: -- Check/Valid quota_type_code
800: SELECT COUNT (*)

Line 815: RAISE fnd_api.g_exc_error;

811: fnd_msg_pub.ADD;
812: END IF;
813:
814: x_loading_status := 'CN_INVALID_DATA';
815: RAISE fnd_api.g_exc_error;
816: END IF;
817:
818: -- Check/Valid Incentive Type
819: SELECT COUNT (*)

Line 834: RAISE fnd_api.g_exc_error;

830: fnd_msg_pub.ADD;
831: END IF;
832:
833: x_loading_status := 'CN_INVALID_DATA';
834: RAISE fnd_api.g_exc_error;
835: END IF;
836: -- End valid lookup code
837: EXCEPTION
838: WHEN fnd_api.g_exc_error

Line 838: WHEN fnd_api.g_exc_error

834: RAISE fnd_api.g_exc_error;
835: END IF;
836: -- End valid lookup code
837: EXCEPTION
838: WHEN fnd_api.g_exc_error
839: THEN
840: x_return_status := fnd_api.g_ret_sts_error;
841: WHEN fnd_api.g_exc_unexpected_error
842: THEN

Line 840: x_return_status := fnd_api.g_ret_sts_error;

836: -- End valid lookup code
837: EXCEPTION
838: WHEN fnd_api.g_exc_error
839: THEN
840: x_return_status := fnd_api.g_ret_sts_error;
841: WHEN fnd_api.g_exc_unexpected_error
842: THEN
843: x_return_status := fnd_api.g_ret_sts_unexp_error;
844: x_loading_status := 'UNEXPECTED_ERR';

Line 841: WHEN fnd_api.g_exc_unexpected_error

837: EXCEPTION
838: WHEN fnd_api.g_exc_error
839: THEN
840: x_return_status := fnd_api.g_ret_sts_error;
841: WHEN fnd_api.g_exc_unexpected_error
842: THEN
843: x_return_status := fnd_api.g_ret_sts_unexp_error;
844: x_loading_status := 'UNEXPECTED_ERR';
845: WHEN OTHERS

Line 843: x_return_status := fnd_api.g_ret_sts_unexp_error;

839: THEN
840: x_return_status := fnd_api.g_ret_sts_error;
841: WHEN fnd_api.g_exc_unexpected_error
842: THEN
843: x_return_status := fnd_api.g_ret_sts_unexp_error;
844: x_loading_status := 'UNEXPECTED_ERR';
845: WHEN OTHERS
846: THEN
847: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 847: x_return_status := fnd_api.g_ret_sts_unexp_error;

843: x_return_status := fnd_api.g_ret_sts_unexp_error;
844: x_loading_status := 'UNEXPECTED_ERR';
845: WHEN OTHERS
846: THEN
847: x_return_status := fnd_api.g_ret_sts_unexp_error;
848: x_loading_status := 'UNEXPECTED_ERR';
849:
850: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
851: THEN

Line 889: x_return_status := fnd_api.g_ret_sts_success;

885: -- Insert Rate Quota Assigs
886: -- first table count is 0
887:
888: -- Set Status
889: x_return_status := fnd_api.g_ret_sts_success;
890: x_loading_status := p_loading_status;
891:
892: -- Check if the Count is O and the QUOTA TYPE IS FORMULA
893: -- Call the Chk_formula_rate_date Procedure to check all the Start

Line 918: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN

914: p_calc_formula_name => p_pe_rec.calc_formula_name,
915: p_loading_status => x_loading_status,
916: x_loading_status => x_loading_status ) ;
917: -- error if the status is not success
918: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN
919: RAISE FND_API.G_EXC_ERROR ;
920: END IF;*/
921: IF p_pe_rec.calc_formula_id IS NOT NULL AND NVL (p_pe_rec_old.calc_formula_id, 0) <> NVL (p_pe_rec.calc_formula_id, 0)
922: THEN

Line 919: RAISE FND_API.G_EXC_ERROR ;

915: p_loading_status => x_loading_status,
916: x_loading_status => x_loading_status ) ;
917: -- error if the status is not success
918: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN
919: RAISE FND_API.G_EXC_ERROR ;
920: END IF;*/
921: IF p_pe_rec.calc_formula_id IS NOT NULL AND NVL (p_pe_rec_old.calc_formula_id, 0) <> NVL (p_pe_rec.calc_formula_id, 0)
922: THEN
923: -- check all the formula rate start date fall under the quota date

Line 937: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN

933: p_calc_formula_name => p_pe_rec.calc_formula_name,
934: p_loading_status => x_loading_status,
935: x_loading_status => x_loading_status ) ;
936: -- error if the status is not success
937: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN
938: RAISE FND_API.G_EXC_ERROR ;
939: END IF;*/
940:
941: -- call the Table handler for batch insert. we betten

Line 938: RAISE FND_API.G_EXC_ERROR ;

934: p_loading_status => x_loading_status,
935: x_loading_status => x_loading_status ) ;
936: -- error if the status is not success
937: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN
938: RAISE FND_API.G_EXC_ERROR ;
939: END IF;*/
940:
941: -- call the Table handler for batch insert. we betten
942: -- DO IN TABLE handler itself

Line 964: IF (x_return_status <> fnd_api.g_ret_sts_success)

960: x_loading_status => x_loading_status,
961: x_object_version_number => l_object_version_number
962: );
963:
964: IF (x_return_status <> fnd_api.g_ret_sts_success)
965: THEN
966: RAISE fnd_api.g_exc_error;
967: END IF;
968: -- if table count is > 0 but the quota type code is NONE

Line 966: RAISE fnd_api.g_exc_error;

962: );
963:
964: IF (x_return_status <> fnd_api.g_ret_sts_success)
965: THEN
966: RAISE fnd_api.g_exc_error;
967: END IF;
968: -- if table count is > 0 but the quota type code is NONE
969: -- then raise an error
970: ELSIF p_pe_rec.quota_type_code = 'NONE' AND p_rt_quota_asgns_rec_tbl.COUNT > 0

Line 981: RAISE fnd_api.g_exc_error;

977: fnd_msg_pub.ADD;
978: END IF;
979:
980: x_loading_status := 'QUOTA_CANNOT_HAVE_RATES';
981: RAISE fnd_api.g_exc_error;
982: END IF;
983: -- End of rate_quotas
984: EXCEPTION
985: WHEN fnd_api.g_exc_error

Line 985: WHEN fnd_api.g_exc_error

981: RAISE fnd_api.g_exc_error;
982: END IF;
983: -- End of rate_quotas
984: EXCEPTION
985: WHEN fnd_api.g_exc_error
986: THEN
987: x_return_status := fnd_api.g_ret_sts_error;
988: WHEN fnd_api.g_exc_unexpected_error
989: THEN

Line 987: x_return_status := fnd_api.g_ret_sts_error;

983: -- End of rate_quotas
984: EXCEPTION
985: WHEN fnd_api.g_exc_error
986: THEN
987: x_return_status := fnd_api.g_ret_sts_error;
988: WHEN fnd_api.g_exc_unexpected_error
989: THEN
990: x_return_status := fnd_api.g_ret_sts_unexp_error;
991: x_loading_status := 'UNEXPECTED_ERR';

Line 988: WHEN fnd_api.g_exc_unexpected_error

984: EXCEPTION
985: WHEN fnd_api.g_exc_error
986: THEN
987: x_return_status := fnd_api.g_ret_sts_error;
988: WHEN fnd_api.g_exc_unexpected_error
989: THEN
990: x_return_status := fnd_api.g_ret_sts_unexp_error;
991: x_loading_status := 'UNEXPECTED_ERR';
992: WHEN OTHERS

Line 990: x_return_status := fnd_api.g_ret_sts_unexp_error;

986: THEN
987: x_return_status := fnd_api.g_ret_sts_error;
988: WHEN fnd_api.g_exc_unexpected_error
989: THEN
990: x_return_status := fnd_api.g_ret_sts_unexp_error;
991: x_loading_status := 'UNEXPECTED_ERR';
992: WHEN OTHERS
993: THEN
994: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 994: x_return_status := fnd_api.g_ret_sts_unexp_error;

990: x_return_status := fnd_api.g_ret_sts_unexp_error;
991: x_loading_status := 'UNEXPECTED_ERR';
992: WHEN OTHERS
993: THEN
994: x_return_status := fnd_api.g_ret_sts_unexp_error;
995: x_loading_status := 'UNEXPECTED_ERR';
996:
997: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
998: THEN

Line 1035: x_return_status := fnd_api.g_ret_sts_success;

1031: -- Insert Rate Quota Assigs
1032: -- first table count is 0
1033:
1034: -- Set Status
1035: x_return_status := fnd_api.g_ret_sts_success;
1036: x_loading_status := p_loading_status;
1037:
1038: -- Check if the Count is O and the QUOTA TYPE IS FORMULA
1039: -- Call the Chk_formula_rate_date Procedure to check all the Start

Line 1062: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN

1058: p_calc_formula_name => p_pe_rec.calc_formula_name,
1059: p_loading_status => x_loading_status,
1060: x_loading_status => x_loading_status ) ;
1061: -- error if the status is not success
1062: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN
1063: RAISE FND_API.G_EXC_ERROR ;
1064: END IF;*/
1065: -- call the Table handler for batch insert.
1066: cn_rt_quota_asgns_pkg.INSERT_RECORD (x_quota_id => p_pe_rec.quota_id, x_calc_formula_id => p_pe_rec.calc_formula_id);

Line 1063: RAISE FND_API.G_EXC_ERROR ;

1059: p_loading_status => x_loading_status,
1060: x_loading_status => x_loading_status ) ;
1061: -- error if the status is not success
1062: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN
1063: RAISE FND_API.G_EXC_ERROR ;
1064: END IF;*/
1065: -- call the Table handler for batch insert.
1066: cn_rt_quota_asgns_pkg.INSERT_RECORD (x_quota_id => p_pe_rec.quota_id, x_calc_formula_id => p_pe_rec.calc_formula_id);
1067: END IF;

Line 1087: IF (x_return_status <> fnd_api.g_ret_sts_success)

1083: x_loading_status => x_loading_status,
1084: x_object_version_number => l_object_version_number
1085: );
1086:
1087: IF (x_return_status <> fnd_api.g_ret_sts_success)
1088: THEN
1089: RAISE fnd_api.g_exc_error;
1090: END IF;
1091: -- if table count is > 0 but the quota type code is NONE

Line 1089: RAISE fnd_api.g_exc_error;

1085: );
1086:
1087: IF (x_return_status <> fnd_api.g_ret_sts_success)
1088: THEN
1089: RAISE fnd_api.g_exc_error;
1090: END IF;
1091: -- if table count is > 0 but the quota type code is NONE
1092: -- then raise an error
1093: ELSIF p_pe_rec.quota_type_code = 'NONE' AND p_rt_quota_asgns_rec_tbl.COUNT > 0

Line 1104: RAISE fnd_api.g_exc_error;

1100: fnd_msg_pub.ADD;
1101: END IF;
1102:
1103: x_loading_status := 'QUOTA_CANNOT_HAVE_RATES';
1104: RAISE fnd_api.g_exc_error;
1105: END IF;
1106: -- End of rate_quotas
1107: EXCEPTION
1108: WHEN fnd_api.g_exc_error

Line 1108: WHEN fnd_api.g_exc_error

1104: RAISE fnd_api.g_exc_error;
1105: END IF;
1106: -- End of rate_quotas
1107: EXCEPTION
1108: WHEN fnd_api.g_exc_error
1109: THEN
1110: x_return_status := fnd_api.g_ret_sts_error;
1111: WHEN fnd_api.g_exc_unexpected_error
1112: THEN

Line 1110: x_return_status := fnd_api.g_ret_sts_error;

1106: -- End of rate_quotas
1107: EXCEPTION
1108: WHEN fnd_api.g_exc_error
1109: THEN
1110: x_return_status := fnd_api.g_ret_sts_error;
1111: WHEN fnd_api.g_exc_unexpected_error
1112: THEN
1113: x_return_status := fnd_api.g_ret_sts_unexp_error;
1114: x_loading_status := 'UNEXPECTED_ERR';

Line 1111: WHEN fnd_api.g_exc_unexpected_error

1107: EXCEPTION
1108: WHEN fnd_api.g_exc_error
1109: THEN
1110: x_return_status := fnd_api.g_ret_sts_error;
1111: WHEN fnd_api.g_exc_unexpected_error
1112: THEN
1113: x_return_status := fnd_api.g_ret_sts_unexp_error;
1114: x_loading_status := 'UNEXPECTED_ERR';
1115: WHEN OTHERS

Line 1113: x_return_status := fnd_api.g_ret_sts_unexp_error;

1109: THEN
1110: x_return_status := fnd_api.g_ret_sts_error;
1111: WHEN fnd_api.g_exc_unexpected_error
1112: THEN
1113: x_return_status := fnd_api.g_ret_sts_unexp_error;
1114: x_loading_status := 'UNEXPECTED_ERR';
1115: WHEN OTHERS
1116: THEN
1117: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1117: x_return_status := fnd_api.g_ret_sts_unexp_error;

1113: x_return_status := fnd_api.g_ret_sts_unexp_error;
1114: x_loading_status := 'UNEXPECTED_ERR';
1115: WHEN OTHERS
1116: THEN
1117: x_return_status := fnd_api.g_ret_sts_unexp_error;
1118: x_loading_status := 'UNEXPECTED_ERR';
1119:
1120: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
1121: THEN

Line 1153: x_return_status := fnd_api.g_ret_sts_success;

1149: l_tmp NUMBER;
1150: l_api_name CONSTANT VARCHAR2 (30) := 'Update_Period_quotas';
1151: BEGIN
1152: -- Set Status
1153: x_return_status := fnd_api.g_ret_sts_success;
1154: x_loading_status := p_loading_status;
1155:
1156: -- Check if the formula id is not null and has ITD flag is Y
1157: -- and check if table.COUNT is zero the call the table handler

Line 1162: OR NVL (p_pe_rec.end_date, fnd_api.g_miss_date) <> NVL (p_pe_rec_old.end_date, fnd_api.g_miss_date)

1158: -- to create the Period Quotas.
1159: -- if the count is > 0 then Call the Group Package procedure
1160: -- to Create the Custom Period Quotas
1161: IF p_pe_rec_old.start_date <> p_pe_rec.start_date
1162: OR NVL (p_pe_rec.end_date, fnd_api.g_miss_date) <> NVL (p_pe_rec_old.end_date, fnd_api.g_miss_date)
1163: --clku, bug 3058608
1164: /*OR
1165: Nvl(p_pe_rec_old.calc_formula_id,0) <> Nvl(p_pe_rec.calc_formula_id,0)*/
1166: THEN

Line 1196: IF (x_return_status <> fnd_api.g_ret_sts_success)

1192: );
1193: -- if the return status is not success then raise an Error
1194: END IF;
1195:
1196: IF (x_return_status <> fnd_api.g_ret_sts_success)
1197: THEN
1198: RAISE fnd_api.g_exc_error;
1199: END IF;
1200: -- END IF; -- clku, enhancement 2380234

Line 1198: RAISE fnd_api.g_exc_error;

1194: END IF;
1195:
1196: IF (x_return_status <> fnd_api.g_ret_sts_success)
1197: THEN
1198: RAISE fnd_api.g_exc_error;
1199: END IF;
1200: -- END IF; -- clku, enhancement 2380234
1201: ELSE
1202: --fix for the Bug 6193694

Line 1222: WHEN fnd_api.g_exc_error

1218: -- 2462767, we do not check for formula ID anymore,END IF; -- formula id is NOT NULL
1219: END IF;
1220: -- End Period_Quotas
1221: EXCEPTION
1222: WHEN fnd_api.g_exc_error
1223: THEN
1224: x_return_status := fnd_api.g_ret_sts_error;
1225: WHEN fnd_api.g_exc_unexpected_error
1226: THEN

Line 1224: x_return_status := fnd_api.g_ret_sts_error;

1220: -- End Period_Quotas
1221: EXCEPTION
1222: WHEN fnd_api.g_exc_error
1223: THEN
1224: x_return_status := fnd_api.g_ret_sts_error;
1225: WHEN fnd_api.g_exc_unexpected_error
1226: THEN
1227: x_return_status := fnd_api.g_ret_sts_unexp_error;
1228: x_loading_status := 'UNEXPECTED_ERR';

Line 1225: WHEN fnd_api.g_exc_unexpected_error

1221: EXCEPTION
1222: WHEN fnd_api.g_exc_error
1223: THEN
1224: x_return_status := fnd_api.g_ret_sts_error;
1225: WHEN fnd_api.g_exc_unexpected_error
1226: THEN
1227: x_return_status := fnd_api.g_ret_sts_unexp_error;
1228: x_loading_status := 'UNEXPECTED_ERR';
1229: WHEN OTHERS

Line 1227: x_return_status := fnd_api.g_ret_sts_unexp_error;

1223: THEN
1224: x_return_status := fnd_api.g_ret_sts_error;
1225: WHEN fnd_api.g_exc_unexpected_error
1226: THEN
1227: x_return_status := fnd_api.g_ret_sts_unexp_error;
1228: x_loading_status := 'UNEXPECTED_ERR';
1229: WHEN OTHERS
1230: THEN
1231: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1231: x_return_status := fnd_api.g_ret_sts_unexp_error;

1227: x_return_status := fnd_api.g_ret_sts_unexp_error;
1228: x_loading_status := 'UNEXPECTED_ERR';
1229: WHEN OTHERS
1230: THEN
1231: x_return_status := fnd_api.g_ret_sts_unexp_error;
1232: x_loading_status := 'UNEXPECTED_ERR';
1233:
1234: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
1235: THEN

Line 1267: x_return_status := fnd_api.g_ret_sts_success;

1263: l_tmp NUMBER;
1264: l_api_name CONSTANT VARCHAR2 (30) := 'Create_Period_quotas';
1265: BEGIN
1266: -- Set Status
1267: x_return_status := fnd_api.g_ret_sts_success;
1268: x_loading_status := p_loading_status;
1269:
1270: -- Check if the formula id is not null and has ITD flag is Y
1271: -- and check if table.COUNT is zero the call the table handler

Line 1302: IF (x_return_status <> fnd_api.g_ret_sts_success)

1298: p_is_duplicate => p_is_duplicate
1299: );
1300:
1301: -- if the return status is not success then raise an Error
1302: IF (x_return_status <> fnd_api.g_ret_sts_success)
1303: THEN
1304: RAISE fnd_api.g_exc_error;
1305: END IF;
1306: END IF; -- period table count = 0

Line 1304: RAISE fnd_api.g_exc_error;

1300:
1301: -- if the return status is not success then raise an Error
1302: IF (x_return_status <> fnd_api.g_ret_sts_success)
1303: THEN
1304: RAISE fnd_api.g_exc_error;
1305: END IF;
1306: END IF; -- period table count = 0
1307: -- ITD falg is N but they are passing the period quotas info its
1308: -- an error

Line 1318: RAISE FND_API.G_EXC_ERROR ;

1314: FND_MESSAGE.SET_NAME ('CN' , 'CN_QUOTA_CANNOT_HAVE_PERIODS');
1315: FND_MSG_PUB.Add;
1316: END IF;
1317: x_loading_status := 'QUOTA_CANNOT_HAVE_PERIODS';
1318: RAISE FND_API.G_EXC_ERROR ;
1319: --END IF; -- clku, enhancement 2380234*/
1320: -- 2462767, we do not check for formula ID anymore,END IF; -- formula id is NOT NULL
1321: -- End Period_Quotas
1322: EXCEPTION

Line 1323: WHEN fnd_api.g_exc_error

1319: --END IF; -- clku, enhancement 2380234*/
1320: -- 2462767, we do not check for formula ID anymore,END IF; -- formula id is NOT NULL
1321: -- End Period_Quotas
1322: EXCEPTION
1323: WHEN fnd_api.g_exc_error
1324: THEN
1325: x_return_status := fnd_api.g_ret_sts_error;
1326: WHEN fnd_api.g_exc_unexpected_error
1327: THEN

Line 1325: x_return_status := fnd_api.g_ret_sts_error;

1321: -- End Period_Quotas
1322: EXCEPTION
1323: WHEN fnd_api.g_exc_error
1324: THEN
1325: x_return_status := fnd_api.g_ret_sts_error;
1326: WHEN fnd_api.g_exc_unexpected_error
1327: THEN
1328: x_return_status := fnd_api.g_ret_sts_unexp_error;
1329: x_loading_status := 'UNEXPECTED_ERR';

Line 1326: WHEN fnd_api.g_exc_unexpected_error

1322: EXCEPTION
1323: WHEN fnd_api.g_exc_error
1324: THEN
1325: x_return_status := fnd_api.g_ret_sts_error;
1326: WHEN fnd_api.g_exc_unexpected_error
1327: THEN
1328: x_return_status := fnd_api.g_ret_sts_unexp_error;
1329: x_loading_status := 'UNEXPECTED_ERR';
1330: WHEN OTHERS

Line 1328: x_return_status := fnd_api.g_ret_sts_unexp_error;

1324: THEN
1325: x_return_status := fnd_api.g_ret_sts_error;
1326: WHEN fnd_api.g_exc_unexpected_error
1327: THEN
1328: x_return_status := fnd_api.g_ret_sts_unexp_error;
1329: x_loading_status := 'UNEXPECTED_ERR';
1330: WHEN OTHERS
1331: THEN
1332: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1332: x_return_status := fnd_api.g_ret_sts_unexp_error;

1328: x_return_status := fnd_api.g_ret_sts_unexp_error;
1329: x_loading_status := 'UNEXPECTED_ERR';
1330: WHEN OTHERS
1331: THEN
1332: x_return_status := fnd_api.g_ret_sts_unexp_error;
1333: x_loading_status := 'UNEXPECTED_ERR';
1334:
1335: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
1336: THEN

Line 1368: x_return_status := fnd_api.g_ret_sts_success;

1364: l_meaning cn_lookups.meaning%TYPE;
1365: l_loading_status VARCHAR2 (80);
1366: BEGIN
1367: -- Set Status
1368: x_return_status := fnd_api.g_ret_sts_success;
1369: x_loading_status := p_loading_status;
1370:
1371: -- Trx Factor data should be loaded from p_trx_factor_rec_tbl,
1372: -- Since we insert data with default value already, so need to

Line 1414: RAISE fnd_api.g_exc_error;

1410: fnd_msg_pub.ADD;
1411: END IF;
1412:
1413: x_loading_status := 'REV_CLASS_NOT_ASSIGNED';
1414: RAISE fnd_api.g_exc_error;
1415: END IF;
1416:
1417: -- check the revenue class exists
1418: IF l_rev_class_id IS NULL AND l_trx_factor_rec_tbl (OUTER).rev_class_name IS NOT NULL

Line 1427: RAISE fnd_api.g_exc_error;

1423: fnd_msg_pub.ADD;
1424: END IF;
1425:
1426: x_loading_status := 'CN_REV_CLASS_NOT_EXIST';
1427: RAISE fnd_api.g_exc_error;
1428: END IF;
1429:
1430: -- get the quota rule id using the quota id and revenue class id
1431: l_quota_rule_id := cn_chk_plan_element_pkg.get_quota_rule_id (p_quota_id => p_quota_id, p_rev_class_id => l_rev_class_id);

Line 1445: RAISE fnd_api.g_exc_error;

1441: fnd_msg_pub.ADD;
1442: END IF;
1443:
1444: x_loading_status := 'QUOTA_RULE_NOT_EXIST';
1445: RAISE fnd_api.g_exc_error;
1446: END IF;
1447:
1448: FOR INNER IN p_trx_factor_rec_tbl.FIRST .. p_trx_factor_rec_tbl.LAST
1449: LOOP

Line 1465: RAISE fnd_api.g_exc_error;

1461: fnd_msg_pub.ADD;
1462: END IF;
1463:
1464: x_loading_status := 'CN_TRX_TYPE_NOT_EXISTS';
1465: RAISE fnd_api.g_exc_error;
1466: END IF;
1467:
1468: UPDATE cn_trx_factors
1469: SET event_factor = p_trx_factor_rec_tbl (OUTER).event_factor

Line 1486: IF (x_return_status <> fnd_api.g_ret_sts_success) OR x_loading_status NOT IN ('CN_UPDATED', 'CN_INSERTED')

1482: x_loading_status => l_loading_status
1483: );
1484: x_loading_status := l_loading_status;
1485:
1486: IF (x_return_status <> fnd_api.g_ret_sts_success) OR x_loading_status NOT IN ('CN_UPDATED', 'CN_INSERTED')
1487: THEN
1488: RAISE fnd_api.g_exc_error;
1489: END IF;
1490: END LOOP; -- Outer trx Loop

Line 1488: RAISE fnd_api.g_exc_error;

1484: x_loading_status := l_loading_status;
1485:
1486: IF (x_return_status <> fnd_api.g_ret_sts_success) OR x_loading_status NOT IN ('CN_UPDATED', 'CN_INSERTED')
1487: THEN
1488: RAISE fnd_api.g_exc_error;
1489: END IF;
1490: END LOOP; -- Outer trx Loop
1491: -- End Trx Factors
1492: EXCEPTION

Line 1493: WHEN fnd_api.g_exc_error

1489: END IF;
1490: END LOOP; -- Outer trx Loop
1491: -- End Trx Factors
1492: EXCEPTION
1493: WHEN fnd_api.g_exc_error
1494: THEN
1495: x_return_status := fnd_api.g_ret_sts_error;
1496: WHEN fnd_api.g_exc_unexpected_error
1497: THEN

Line 1495: x_return_status := fnd_api.g_ret_sts_error;

1491: -- End Trx Factors
1492: EXCEPTION
1493: WHEN fnd_api.g_exc_error
1494: THEN
1495: x_return_status := fnd_api.g_ret_sts_error;
1496: WHEN fnd_api.g_exc_unexpected_error
1497: THEN
1498: x_return_status := fnd_api.g_ret_sts_unexp_error;
1499: x_loading_status := 'UNEXPECTED_ERR';

Line 1496: WHEN fnd_api.g_exc_unexpected_error

1492: EXCEPTION
1493: WHEN fnd_api.g_exc_error
1494: THEN
1495: x_return_status := fnd_api.g_ret_sts_error;
1496: WHEN fnd_api.g_exc_unexpected_error
1497: THEN
1498: x_return_status := fnd_api.g_ret_sts_unexp_error;
1499: x_loading_status := 'UNEXPECTED_ERR';
1500: WHEN OTHERS

Line 1498: x_return_status := fnd_api.g_ret_sts_unexp_error;

1494: THEN
1495: x_return_status := fnd_api.g_ret_sts_error;
1496: WHEN fnd_api.g_exc_unexpected_error
1497: THEN
1498: x_return_status := fnd_api.g_ret_sts_unexp_error;
1499: x_loading_status := 'UNEXPECTED_ERR';
1500: WHEN OTHERS
1501: THEN
1502: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1502: x_return_status := fnd_api.g_ret_sts_unexp_error;

1498: x_return_status := fnd_api.g_ret_sts_unexp_error;
1499: x_loading_status := 'UNEXPECTED_ERR';
1500: WHEN OTHERS
1501: THEN
1502: x_return_status := fnd_api.g_ret_sts_unexp_error;
1503: x_loading_status := 'UNEXPECTED_ERR';
1504:
1505: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
1506: THEN

Line 1540: x_return_status := fnd_api.g_ret_sts_success;

1536: FROM cn_quotas_v q
1537: WHERE q.NAME = pe_name;
1538: BEGIN
1539: -- Initialize API return status to success
1540: x_return_status := fnd_api.g_ret_sts_success;
1541: x_loading_status := p_loading_status;
1542:
1543: -- Get the Old record quota id and Formula id to update and
1544: -- delete the rate Quota assigns, in the table handler

Line 1551: ) = fnd_api.g_true

1547: p_para_name => cn_chk_plan_element_pkg.g_pe_name,
1548: p_loading_status => x_loading_status,
1549: x_loading_status => l_loading_status
1550: )
1551: ) = fnd_api.g_true
1552: )
1553: THEN
1554: RAISE fnd_api.g_exc_error;
1555: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_quota_name_old,

Line 1554: RAISE fnd_api.g_exc_error;

1550: )
1551: ) = fnd_api.g_true
1552: )
1553: THEN
1554: RAISE fnd_api.g_exc_error;
1555: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_quota_name_old,
1556: p_obj_name => cn_chk_plan_element_pkg.g_pe_name,
1557: p_loading_status => x_loading_status,
1558: x_loading_status => l_loading_status

Line 1560: ) = fnd_api.g_true

1556: p_obj_name => cn_chk_plan_element_pkg.g_pe_name,
1557: p_loading_status => x_loading_status,
1558: x_loading_status => l_loading_status
1559: )
1560: ) = fnd_api.g_true
1561: )
1562: THEN
1563: RAISE fnd_api.g_exc_error;
1564: END IF;

Line 1563: RAISE fnd_api.g_exc_error;

1559: )
1560: ) = fnd_api.g_true
1561: )
1562: THEN
1563: RAISE fnd_api.g_exc_error;
1564: END IF;
1565:
1566: -- get the old plan element record
1567: OPEN c_pe_rec_old_csr (p_quota_name_old);

Line 1587: RAISE fnd_api.g_exc_error;

1583: fnd_msg_pub.ADD;
1584: END IF;
1585:
1586: x_loading_status := 'CN_PLN_NOT_EXIST';
1587: RAISE fnd_api.g_exc_error;
1588: END IF;
1589: END IF;
1590:
1591: -- Standard message count

Line 1592: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

1588: END IF;
1589: END IF;
1590:
1591: -- Standard message count
1592: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1593: -- end check_quota_exists
1594: EXCEPTION
1595: WHEN fnd_api.g_exc_error
1596: THEN

Line 1595: WHEN fnd_api.g_exc_error

1591: -- Standard message count
1592: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1593: -- end check_quota_exists
1594: EXCEPTION
1595: WHEN fnd_api.g_exc_error
1596: THEN
1597: x_return_status := fnd_api.g_ret_sts_error;
1598: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1599: WHEN fnd_api.g_exc_unexpected_error

Line 1597: x_return_status := fnd_api.g_ret_sts_error;

1593: -- end check_quota_exists
1594: EXCEPTION
1595: WHEN fnd_api.g_exc_error
1596: THEN
1597: x_return_status := fnd_api.g_ret_sts_error;
1598: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1599: WHEN fnd_api.g_exc_unexpected_error
1600: THEN
1601: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1598: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

1594: EXCEPTION
1595: WHEN fnd_api.g_exc_error
1596: THEN
1597: x_return_status := fnd_api.g_ret_sts_error;
1598: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1599: WHEN fnd_api.g_exc_unexpected_error
1600: THEN
1601: x_return_status := fnd_api.g_ret_sts_unexp_error;
1602: x_loading_status := 'UNEXPECTED_ERR';

Line 1599: WHEN fnd_api.g_exc_unexpected_error

1595: WHEN fnd_api.g_exc_error
1596: THEN
1597: x_return_status := fnd_api.g_ret_sts_error;
1598: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1599: WHEN fnd_api.g_exc_unexpected_error
1600: THEN
1601: x_return_status := fnd_api.g_ret_sts_unexp_error;
1602: x_loading_status := 'UNEXPECTED_ERR';
1603: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

Line 1601: x_return_status := fnd_api.g_ret_sts_unexp_error;

1597: x_return_status := fnd_api.g_ret_sts_error;
1598: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1599: WHEN fnd_api.g_exc_unexpected_error
1600: THEN
1601: x_return_status := fnd_api.g_ret_sts_unexp_error;
1602: x_loading_status := 'UNEXPECTED_ERR';
1603: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1604: WHEN OTHERS
1605: THEN

Line 1603: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

1599: WHEN fnd_api.g_exc_unexpected_error
1600: THEN
1601: x_return_status := fnd_api.g_ret_sts_unexp_error;
1602: x_loading_status := 'UNEXPECTED_ERR';
1603: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1604: WHEN OTHERS
1605: THEN
1606: x_return_status := fnd_api.g_ret_sts_unexp_error;
1607: x_loading_status := 'UNEXPECTED_ERR';

Line 1606: x_return_status := fnd_api.g_ret_sts_unexp_error;

1602: x_loading_status := 'UNEXPECTED_ERR';
1603: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1604: WHEN OTHERS
1605: THEN
1606: x_return_status := fnd_api.g_ret_sts_unexp_error;
1607: x_loading_status := 'UNEXPECTED_ERR';
1608:
1609: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
1610: THEN

Line 1614: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

1610: THEN
1611: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1612: END IF;
1613:
1614: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1615: END check_quota_exists;
1616:
1617: -- -------------------------------------------------------------------------+-+
1618: --| Procedure: Valid_plan_Element

Line 1638: x_return_status := fnd_api.g_ret_sts_success;

1634: l_same_pe NUMBER;
1635: l_loading_status VARCHAR2 (80);
1636: BEGIN
1637: -- Initialize API return status to success
1638: x_return_status := fnd_api.g_ret_sts_success;
1639: x_loading_status := p_loading_status;
1640: -- API body
1641: -- check for required data in Plan Element
1642: -- Check MISS and NULL parameters

Line 1650: IF (x_return_status <> fnd_api.g_ret_sts_success)

1646: x_loading_status => l_loading_status
1647: );
1648: x_loading_status := l_loading_status;
1649:
1650: IF (x_return_status <> fnd_api.g_ret_sts_success)
1651: THEN
1652: RAISE fnd_api.g_exc_error;
1653: END IF;
1654:

Line 1652: RAISE fnd_api.g_exc_error;

1648: x_loading_status := l_loading_status;
1649:
1650: IF (x_return_status <> fnd_api.g_ret_sts_success)
1651: THEN
1652: RAISE fnd_api.g_exc_error;
1653: END IF;
1654:
1655: -- If Plan already exist, check for consistentent
1656: IF p_pe_rec.quota_id IS NOT NULL AND p_quota_name_old IS NULL

Line 1665: IF (x_return_status <> fnd_api.g_ret_sts_success)

1661: x_loading_status => l_loading_status
1662: );
1663: x_loading_status := l_loading_status;
1664:
1665: IF (x_return_status <> fnd_api.g_ret_sts_success)
1666: THEN
1667: RAISE fnd_api.g_exc_error;
1668: END IF;
1669:

Line 1667: RAISE fnd_api.g_exc_error;

1663: x_loading_status := l_loading_status;
1664:
1665: IF (x_return_status <> fnd_api.g_ret_sts_success)
1666: THEN
1667: RAISE fnd_api.g_exc_error;
1668: END IF;
1669:
1670: x_loading_status := 'PLN_QUOTA_EXISTS';
1671: GOTO end_api_body;

Line 1684: RAISE fnd_api.g_exc_error;

1680: fnd_msg_pub.ADD;
1681: END IF;
1682:
1683: x_loading_status := 'INVALID_END_DATE';
1684: RAISE fnd_api.g_exc_error;
1685: END IF;
1686:
1687: -- Formula name is not null but the ID is not in the Database
1688: -- Raise an Error

Line 1699: RAISE fnd_api.g_exc_error;

1695: fnd_msg_pub.ADD;
1696: END IF;
1697:
1698: x_loading_status := 'FORMULA_NOT_EXIST';
1699: RAISE fnd_api.g_exc_error;
1700: END IF;
1701:
1702: -- Validate All lookup codes, must have valid value
1703: valid_lookup_code (x_return_status => x_return_status,

Line 1710: IF (x_return_status <> fnd_api.g_ret_sts_success)

1706: x_loading_status => l_loading_status
1707: );
1708: x_loading_status := l_loading_status;
1709:
1710: IF (x_return_status <> fnd_api.g_ret_sts_success)
1711: THEN
1712: RAISE fnd_api.g_exc_error;
1713: END IF;
1714:

Line 1712: RAISE fnd_api.g_exc_error;

1708: x_loading_status := l_loading_status;
1709:
1710: IF (x_return_status <> fnd_api.g_ret_sts_success)
1711: THEN
1712: RAISE fnd_api.g_exc_error;
1713: END IF;
1714:
1715: -- Validate the Quota Type with the Respective Column
1716: -- Check if the quota type is formula then the formula name must be not null

Line 1729: IF (x_return_status <> fnd_api.g_ret_sts_success)

1725: x_loading_status => l_loading_status
1726: );
1727: x_loading_status := l_loading_status;
1728:
1729: IF (x_return_status <> fnd_api.g_ret_sts_success)
1730: THEN
1731: x_loading_status := 'INVALID_DATA';
1732: RAISE fnd_api.g_exc_error;
1733: END IF;

Line 1732: RAISE fnd_api.g_exc_error;

1728:
1729: IF (x_return_status <> fnd_api.g_ret_sts_success)
1730: THEN
1731: x_loading_status := 'INVALID_DATA';
1732: RAISE fnd_api.g_exc_error;
1733: END IF;
1734: ELSIF (p_pe_rec.quota_type_code = 'EXTERNAL')
1735: THEN
1736: -- if Quota type is External Package name is Mandatory and

Line 1745: IF (x_return_status <> fnd_api.g_ret_sts_success)

1741: x_loading_status => l_loading_status
1742: );
1743: x_loading_status := l_loading_status;
1744:
1745: IF (x_return_status <> fnd_api.g_ret_sts_success)
1746: THEN
1747: x_loading_status := 'INVALID_DATA';
1748: RAISE fnd_api.g_exc_error;
1749: END IF;

Line 1748: RAISE fnd_api.g_exc_error;

1744:
1745: IF (x_return_status <> fnd_api.g_ret_sts_success)
1746: THEN
1747: x_loading_status := 'INVALID_DATA';
1748: RAISE fnd_api.g_exc_error;
1749: END IF;
1750: ELSIF (p_pe_rec.quota_type_code = 'NONE')
1751: THEN
1752: -- If quota type is NONE, both Formula and package must be null

Line 1760: IF (x_return_status <> fnd_api.g_ret_sts_success)

1756: x_loading_status => l_loading_status
1757: );
1758: x_loading_status := l_loading_status;
1759:
1760: IF (x_return_status <> fnd_api.g_ret_sts_success)
1761: THEN
1762: x_loading_status := 'INVALID_DATA';
1763: RAISE fnd_api.g_exc_error;
1764: END IF;

Line 1763: RAISE fnd_api.g_exc_error;

1759:
1760: IF (x_return_status <> fnd_api.g_ret_sts_success)
1761: THEN
1762: x_loading_status := 'INVALID_DATA';
1763: RAISE fnd_api.g_exc_error;
1764: END IF;
1765: END IF;
1766:
1767: -- End of API body.

Line 1771: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

1767: -- End of API body.
1768: <>
1769: NULL;
1770: -- Standard call to get message count and if count is 1, get message info.
1771: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1772: -- end valid_plan_element
1773: EXCEPTION
1774: WHEN fnd_api.g_exc_error
1775: THEN

Line 1774: WHEN fnd_api.g_exc_error

1770: -- Standard call to get message count and if count is 1, get message info.
1771: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1772: -- end valid_plan_element
1773: EXCEPTION
1774: WHEN fnd_api.g_exc_error
1775: THEN
1776: x_return_status := fnd_api.g_ret_sts_error;
1777: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1778: WHEN fnd_api.g_exc_unexpected_error

Line 1776: x_return_status := fnd_api.g_ret_sts_error;

1772: -- end valid_plan_element
1773: EXCEPTION
1774: WHEN fnd_api.g_exc_error
1775: THEN
1776: x_return_status := fnd_api.g_ret_sts_error;
1777: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1778: WHEN fnd_api.g_exc_unexpected_error
1779: THEN
1780: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1777: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

1773: EXCEPTION
1774: WHEN fnd_api.g_exc_error
1775: THEN
1776: x_return_status := fnd_api.g_ret_sts_error;
1777: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1778: WHEN fnd_api.g_exc_unexpected_error
1779: THEN
1780: x_return_status := fnd_api.g_ret_sts_unexp_error;
1781: x_loading_status := 'UNEXPECTED_ERR';

Line 1778: WHEN fnd_api.g_exc_unexpected_error

1774: WHEN fnd_api.g_exc_error
1775: THEN
1776: x_return_status := fnd_api.g_ret_sts_error;
1777: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1778: WHEN fnd_api.g_exc_unexpected_error
1779: THEN
1780: x_return_status := fnd_api.g_ret_sts_unexp_error;
1781: x_loading_status := 'UNEXPECTED_ERR';
1782: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

Line 1780: x_return_status := fnd_api.g_ret_sts_unexp_error;

1776: x_return_status := fnd_api.g_ret_sts_error;
1777: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1778: WHEN fnd_api.g_exc_unexpected_error
1779: THEN
1780: x_return_status := fnd_api.g_ret_sts_unexp_error;
1781: x_loading_status := 'UNEXPECTED_ERR';
1782: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1783: WHEN OTHERS
1784: THEN

Line 1782: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

1778: WHEN fnd_api.g_exc_unexpected_error
1779: THEN
1780: x_return_status := fnd_api.g_ret_sts_unexp_error;
1781: x_loading_status := 'UNEXPECTED_ERR';
1782: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1783: WHEN OTHERS
1784: THEN
1785: x_return_status := fnd_api.g_ret_sts_unexp_error;
1786: x_loading_status := 'UNEXPECTED_ERR';

Line 1785: x_return_status := fnd_api.g_ret_sts_unexp_error;

1781: x_loading_status := 'UNEXPECTED_ERR';
1782: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1783: WHEN OTHERS
1784: THEN
1785: x_return_status := fnd_api.g_ret_sts_unexp_error;
1786: x_loading_status := 'UNEXPECTED_ERR';
1787:
1788: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
1789: THEN

Line 1793: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

1789: THEN
1790: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1791: END IF;
1792:
1793: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1794: END valid_plan_element;
1795:
1796: --|--------------------------------------------------------------------------+
1797: --|Procedure: Check Valid Update

Line 1835: x_return_status := fnd_api.g_ret_sts_success;

1831: FROM cn_quotas_v q
1832: WHERE q.NAME = pe_name;
1833: BEGIN
1834: -- Initialize API return status to success
1835: x_return_status := fnd_api.g_ret_sts_success;
1836: x_loading_status := p_loading_status;
1837:
1838: -- Get the Old record quota id and Formula id to update and
1839: -- delete the rate Quota assigns, in the table handler

Line 1871: RAISE fnd_api.g_exc_error;

1867: fnd_msg_pub.ADD;
1868: END IF;
1869:
1870: x_loading_status := 'CN_PLN_NOT_EXIST';
1871: RAISE fnd_api.g_exc_error;
1872: ELSIF p_new_pe_rec.quota_id IS NOT NULL
1873: THEN
1874: x_loading_status := 'PLN_QUOTA_EXISTS';
1875: END IF;

Line 1890: RAISE fnd_api.g_exc_error;

1886: fnd_msg_pub.ADD;
1887: END IF;
1888:
1889: x_loading_status := 'CN_PLN_EXISTS';
1890: RAISE fnd_api.g_exc_error;
1891: END IF;
1892: END IF;
1893:
1894: -- Assiged quota to comp plan check if the start date and the end date changes.

Line 1896: OR TRUNC (NVL (p_new_pe_rec.end_date, fnd_api.g_miss_date)) <> TRUNC (NVL (x_old_pe_rec.end_date, fnd_api.g_miss_date))

1892: END IF;
1893:
1894: -- Assiged quota to comp plan check if the start date and the end date changes.
1895: IF TRUNC (p_new_pe_rec.start_date) <> TRUNC (x_old_pe_rec.start_date)
1896: OR TRUNC (NVL (p_new_pe_rec.end_date, fnd_api.g_miss_date)) <> TRUNC (NVL (x_old_pe_rec.end_date, fnd_api.g_miss_date))
1897: THEN
1898: cn_chk_plan_element_pkg.chk_comp_plan_date (x_return_status => x_return_status,
1899: p_start_date => p_new_pe_rec.start_date,
1900: p_end_date => p_new_pe_rec.end_date,

Line 1908: IF (x_return_status <> fnd_api.g_ret_sts_success)

1904: x_loading_status => l_loading_status
1905: );
1906: x_loading_status := l_loading_status;
1907:
1908: IF (x_return_status <> fnd_api.g_ret_sts_success)
1909: THEN
1910: RAISE fnd_api.g_exc_error;
1911: END IF;
1912:

Line 1910: RAISE fnd_api.g_exc_error;

1906: x_loading_status := l_loading_status;
1907:
1908: IF (x_return_status <> fnd_api.g_ret_sts_success)
1909: THEN
1910: RAISE fnd_api.g_exc_error;
1911: END IF;
1912:
1913: -- Check the Plan Element start date and end date fall with in the rt_formula_asgns
1914: IF p_new_pe_rec.calc_formula_id IS NOT NULL

Line 1930: IF (x_return_status <> fnd_api.g_ret_sts_success)

1926: x_loading_status := l_loading_status;
1927: END IF;
1928:
1929: -- error if the status is not success
1930: IF (x_return_status <> fnd_api.g_ret_sts_success)
1931: THEN
1932: RAISE fnd_api.g_exc_error;
1933: END IF;
1934: END IF;

Line 1932: RAISE fnd_api.g_exc_error;

1928:
1929: -- error if the status is not success
1930: IF (x_return_status <> fnd_api.g_ret_sts_success)
1931: THEN
1932: RAISE fnd_api.g_exc_error;
1933: END IF;
1934: END IF;
1935:
1936: -- Check the Plan Element start date and end date fall with in the uplift start date

Line 1951: IF (x_return_status <> fnd_api.g_ret_sts_success)

1947: );
1948: x_loading_status := l_loading_status;
1949:
1950: -- error if the status is not success
1951: IF (x_return_status <> fnd_api.g_ret_sts_success)
1952: THEN
1953: RAISE fnd_api.g_exc_error;
1954: END IF;
1955: END IF;

Line 1953: RAISE fnd_api.g_exc_error;

1949:
1950: -- error if the status is not success
1951: IF (x_return_status <> fnd_api.g_ret_sts_success)
1952: THEN
1953: RAISE fnd_api.g_exc_error;
1954: END IF;
1955: END IF;
1956: END IF;
1957:

Line 1970: IF (x_return_status <> fnd_api.g_ret_sts_success)

1966: );
1967: x_loading_status := l_loading_status;
1968:
1969: -- Raise an Error if the Status is not success
1970: IF (x_return_status <> fnd_api.g_ret_sts_success)
1971: THEN
1972: RAISE fnd_api.g_exc_error;
1973: END IF;
1974:

Line 1972: RAISE fnd_api.g_exc_error;

1968:
1969: -- Raise an Error if the Status is not success
1970: IF (x_return_status <> fnd_api.g_ret_sts_success)
1971: THEN
1972: RAISE fnd_api.g_exc_error;
1973: END IF;
1974:
1975: -- Standard call to get message count and if count is 1, get message info.
1976: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

Line 1976: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

1972: RAISE fnd_api.g_exc_error;
1973: END IF;
1974:
1975: -- Standard call to get message count and if count is 1, get message info.
1976: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1977: -- End of Check_valid_update
1978: EXCEPTION
1979: WHEN fnd_api.g_exc_error
1980: THEN

Line 1979: WHEN fnd_api.g_exc_error

1975: -- Standard call to get message count and if count is 1, get message info.
1976: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1977: -- End of Check_valid_update
1978: EXCEPTION
1979: WHEN fnd_api.g_exc_error
1980: THEN
1981: x_return_status := fnd_api.g_ret_sts_error;
1982: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1983: WHEN fnd_api.g_exc_unexpected_error

Line 1981: x_return_status := fnd_api.g_ret_sts_error;

1977: -- End of Check_valid_update
1978: EXCEPTION
1979: WHEN fnd_api.g_exc_error
1980: THEN
1981: x_return_status := fnd_api.g_ret_sts_error;
1982: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1983: WHEN fnd_api.g_exc_unexpected_error
1984: THEN
1985: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1982: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

1978: EXCEPTION
1979: WHEN fnd_api.g_exc_error
1980: THEN
1981: x_return_status := fnd_api.g_ret_sts_error;
1982: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1983: WHEN fnd_api.g_exc_unexpected_error
1984: THEN
1985: x_return_status := fnd_api.g_ret_sts_unexp_error;
1986: x_loading_status := 'UNEXPECTED_ERR';

Line 1983: WHEN fnd_api.g_exc_unexpected_error

1979: WHEN fnd_api.g_exc_error
1980: THEN
1981: x_return_status := fnd_api.g_ret_sts_error;
1982: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1983: WHEN fnd_api.g_exc_unexpected_error
1984: THEN
1985: x_return_status := fnd_api.g_ret_sts_unexp_error;
1986: x_loading_status := 'UNEXPECTED_ERR';
1987: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

Line 1985: x_return_status := fnd_api.g_ret_sts_unexp_error;

1981: x_return_status := fnd_api.g_ret_sts_error;
1982: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1983: WHEN fnd_api.g_exc_unexpected_error
1984: THEN
1985: x_return_status := fnd_api.g_ret_sts_unexp_error;
1986: x_loading_status := 'UNEXPECTED_ERR';
1987: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1988: WHEN OTHERS
1989: THEN

Line 1987: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

1983: WHEN fnd_api.g_exc_unexpected_error
1984: THEN
1985: x_return_status := fnd_api.g_ret_sts_unexp_error;
1986: x_loading_status := 'UNEXPECTED_ERR';
1987: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1988: WHEN OTHERS
1989: THEN
1990: x_return_status := fnd_api.g_ret_sts_unexp_error;
1991: x_loading_status := 'UNEXPECTED_ERR';

Line 1990: x_return_status := fnd_api.g_ret_sts_unexp_error;

1986: x_loading_status := 'UNEXPECTED_ERR';
1987: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1988: WHEN OTHERS
1989: THEN
1990: x_return_status := fnd_api.g_ret_sts_unexp_error;
1991: x_loading_status := 'UNEXPECTED_ERR';
1992:
1993: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
1994: THEN

Line 1998: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

1994: THEN
1995: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1996: END IF;
1997:
1998: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1999: END check_valid_update;
2000:
2001: --|--------------------------------------------------------------------------+
2002: --|Procedure: Create_plan_element

Line 2060: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)

2056: -- Standard Start of API savepoint
2057: SAVEPOINT create_plan_element;
2058:
2059: -- Standard call to check for call compatibility.
2060: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
2061: THEN
2062: RAISE fnd_api.g_exc_unexpected_error;
2063: END IF;
2064:

Line 2062: RAISE fnd_api.g_exc_unexpected_error;

2058:
2059: -- Standard call to check for call compatibility.
2060: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
2061: THEN
2062: RAISE fnd_api.g_exc_unexpected_error;
2063: END IF;
2064:
2065: -- Initialize message list if p_init_msg_list is set to TRUE.
2066: IF fnd_api.to_boolean (p_init_msg_list)

Line 2066: IF fnd_api.to_boolean (p_init_msg_list)

2062: RAISE fnd_api.g_exc_unexpected_error;
2063: END IF;
2064:
2065: -- Initialize message list if p_init_msg_list is set to TRUE.
2066: IF fnd_api.to_boolean (p_init_msg_list)
2067: THEN
2068: fnd_msg_pub.initialize;
2069: END IF;
2070:

Line 2072: x_return_status := fnd_api.g_ret_sts_success;

2068: fnd_msg_pub.initialize;
2069: END IF;
2070:
2071: -- Initialize API return status to success
2072: x_return_status := fnd_api.g_ret_sts_success;
2073: x_loading_status := 'CN_INSERTED';
2074:
2075: -- START OF MOAC ORG_ID VALIDATION
2076: l_org_id := p_plan_element_rec.org_id;

Line 2099: IF (x_return_status <> fnd_api.g_ret_sts_success)

2095: -- Validate Payment group code
2096: validate_payment_group_code(x_return_status => x_return_status,
2097: p_payment_group_code => p_payment_group_code);
2098:
2099: IF (x_return_status <> fnd_api.g_ret_sts_success)
2100: THEN
2101: RAISE fnd_api.g_exc_error;
2102: ELSE
2103: l_p_plan_element_rec.payment_group_code := p_payment_group_code;

Line 2101: RAISE fnd_api.g_exc_error;

2097: p_payment_group_code => p_payment_group_code);
2098:
2099: IF (x_return_status <> fnd_api.g_ret_sts_success)
2100: THEN
2101: RAISE fnd_api.g_exc_error;
2102: ELSE
2103: l_p_plan_element_rec.payment_group_code := p_payment_group_code;
2104: END IF;
2105:

Line 2113: p_commit => fnd_api.g_false,

2109: IF jtf_usr_hks.ok_to_execute ('CN_PLAN_ELEMENT_PUB', 'CREATE_PLAN_ELEMENT', 'B', 'C')
2110: THEN
2111: cn_plan_element_cuhk.create_plan_element_pre (p_api_version => p_api_version,
2112: p_init_msg_list => p_init_msg_list,
2113: p_commit => fnd_api.g_false,
2114: p_validation_level => p_validation_level,
2115: x_return_status => x_return_status,
2116: x_msg_count => x_msg_count,
2117: x_msg_data => x_msg_data,

Line 2127: IF (x_return_status = fnd_api.g_ret_sts_error)

2123: p_rt_quota_asgns_rec_tbl => l_p_rt_quota_asgns_rec_tbl,
2124: x_loading_status => x_loading_status
2125: );
2126:
2127: IF (x_return_status = fnd_api.g_ret_sts_error)
2128: THEN
2129: RAISE fnd_api.g_exc_error;
2130: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2131: THEN

Line 2129: RAISE fnd_api.g_exc_error;

2125: );
2126:
2127: IF (x_return_status = fnd_api.g_ret_sts_error)
2128: THEN
2129: RAISE fnd_api.g_exc_error;
2130: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2131: THEN
2132: RAISE fnd_api.g_exc_unexpected_error;
2133: END IF;

Line 2130: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)

2126:
2127: IF (x_return_status = fnd_api.g_ret_sts_error)
2128: THEN
2129: RAISE fnd_api.g_exc_error;
2130: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2131: THEN
2132: RAISE fnd_api.g_exc_unexpected_error;
2133: END IF;
2134: END IF;

Line 2132: RAISE fnd_api.g_exc_unexpected_error;

2128: THEN
2129: RAISE fnd_api.g_exc_error;
2130: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2131: THEN
2132: RAISE fnd_api.g_exc_unexpected_error;
2133: END IF;
2134: END IF;
2135:
2136: IF jtf_usr_hks.ok_to_execute ('CN_PLAN_ELEMENT_PUB', 'CREATE_PLAN_ELEMENT', 'B', 'V')

Line 2140: p_commit => fnd_api.g_false,

2136: IF jtf_usr_hks.ok_to_execute ('CN_PLAN_ELEMENT_PUB', 'CREATE_PLAN_ELEMENT', 'B', 'V')
2137: THEN
2138: cn_plan_element_vuhk.create_plan_element_pre (p_api_version => p_api_version,
2139: p_init_msg_list => p_init_msg_list,
2140: p_commit => fnd_api.g_false,
2141: p_validation_level => p_validation_level,
2142: x_return_status => x_return_status,
2143: x_msg_count => x_msg_count,
2144: x_msg_data => x_msg_data,

Line 2154: IF (x_return_status = fnd_api.g_ret_sts_error)

2150: p_rt_quota_asgns_rec_tbl => l_p_rt_quota_asgns_rec_tbl,
2151: x_loading_status => x_loading_status
2152: );
2153:
2154: IF (x_return_status = fnd_api.g_ret_sts_error)
2155: THEN
2156: RAISE fnd_api.g_exc_error;
2157: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2158: THEN

Line 2156: RAISE fnd_api.g_exc_error;

2152: );
2153:
2154: IF (x_return_status = fnd_api.g_ret_sts_error)
2155: THEN
2156: RAISE fnd_api.g_exc_error;
2157: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2158: THEN
2159: RAISE fnd_api.g_exc_unexpected_error;
2160: END IF;

Line 2157: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)

2153:
2154: IF (x_return_status = fnd_api.g_ret_sts_error)
2155: THEN
2156: RAISE fnd_api.g_exc_error;
2157: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2158: THEN
2159: RAISE fnd_api.g_exc_unexpected_error;
2160: END IF;
2161: END IF;

Line 2159: RAISE fnd_api.g_exc_unexpected_error;

2155: THEN
2156: RAISE fnd_api.g_exc_error;
2157: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2158: THEN
2159: RAISE fnd_api.g_exc_unexpected_error;
2160: END IF;
2161: END IF;
2162:
2163: -- Store the User Input Value into The Local Variable.

Line 2172: IF (x_return_status <> fnd_api.g_ret_sts_success)

2168: x_loading_status => l_loading_status
2169: );
2170: x_loading_status := l_loading_status;
2171:
2172: IF (x_return_status <> fnd_api.g_ret_sts_success)
2173: THEN
2174: RAISE fnd_api.g_exc_error;
2175: END IF;
2176:

Line 2174: RAISE fnd_api.g_exc_error;

2170: x_loading_status := l_loading_status;
2171:
2172: IF (x_return_status <> fnd_api.g_ret_sts_success)
2173: THEN
2174: RAISE fnd_api.g_exc_error;
2175: END IF;
2176:
2177: --
2178: -- Validate Plan Element

Line 2206: IF (x_return_status <> fnd_api.g_ret_sts_success)

2202:
2203: -- Case 2 Plan Element exists and adding new child records like quota rules,
2204: -- uplifts, trx factors, period quotas ( if no child record is passed
2205: -- then it is an error saying duplicate Plan element
2206: IF (x_return_status <> fnd_api.g_ret_sts_success)
2207: THEN
2208: RAISE fnd_api.g_exc_error;
2209: ELSIF (x_loading_status <> 'PLN_QUOTA_EXISTS')
2210: THEN

Line 2208: RAISE fnd_api.g_exc_error;

2204: -- uplifts, trx factors, period quotas ( if no child record is passed
2205: -- then it is an error saying duplicate Plan element
2206: IF (x_return_status <> fnd_api.g_ret_sts_success)
2207: THEN
2208: RAISE fnd_api.g_exc_error;
2209: ELSIF (x_loading_status <> 'PLN_QUOTA_EXISTS')
2210: THEN
2211: --x_status_code VARCHAR2,
2212: --clku PAYMENT ENHANCEMENT

Line 2296: IF (x_return_status <> fnd_api.g_ret_sts_success)

2292: );
2293: x_loading_status := l_loading_status;
2294:
2295: -- Raise an Error if Fail Status
2296: IF (x_return_status <> fnd_api.g_ret_sts_success)
2297: THEN
2298: RAISE fnd_api.g_exc_error;
2299: ELSE
2300: x_loading_status := 'CN_INSERTED';

Line 2298: RAISE fnd_api.g_exc_error;

2294:
2295: -- Raise an Error if Fail Status
2296: IF (x_return_status <> fnd_api.g_ret_sts_success)
2297: THEN
2298: RAISE fnd_api.g_exc_error;
2299: ELSE
2300: x_loading_status := 'CN_INSERTED';
2301: END IF;
2302:

Line 2322: IF (x_return_status <> fnd_api.g_ret_sts_success)

2318: );
2319: x_loading_status := l_loading_status;
2320:
2321: -- Raise an Error if the Status is Failedx
2322: IF (x_return_status <> fnd_api.g_ret_sts_success)
2323: THEN
2324: RAISE fnd_api.g_exc_error;
2325: ELSE
2326: x_loading_status := 'CN_INSERTED';

Line 2324: RAISE fnd_api.g_exc_error;

2320:
2321: -- Raise an Error if the Status is Failedx
2322: IF (x_return_status <> fnd_api.g_ret_sts_success)
2323: THEN
2324: RAISE fnd_api.g_exc_error;
2325: ELSE
2326: x_loading_status := 'CN_INSERTED';
2327: END IF;
2328: -- Plan Quota exists then check for period quotas in passed then

Line 2355: IF (x_return_status = fnd_api.g_ret_sts_success)

2351: );
2352: x_loading_status := l_loading_status;
2353:
2354: -- Raise an error if the Return status is not success
2355: IF (x_return_status = fnd_api.g_ret_sts_success)
2356: THEN
2357: x_loading_status := 'CN_INSERTED';
2358: ELSE
2359: RAISE fnd_api.g_exc_error;

Line 2359: RAISE fnd_api.g_exc_error;

2355: IF (x_return_status = fnd_api.g_ret_sts_success)
2356: THEN
2357: x_loading_status := 'CN_INSERTED';
2358: ELSE
2359: RAISE fnd_api.g_exc_error;
2360: END IF;
2361: END IF;
2362:
2363: -- Check for the Rate Quota Assigns

Line 2385: IF (x_return_status = fnd_api.g_ret_sts_success)

2381: );
2382: x_loading_status := l_loading_status;
2383:
2384: -- Raise an Error, if the Return status is not success
2385: IF (x_return_status = fnd_api.g_ret_sts_success)
2386: THEN
2387: x_loading_status := 'CN_INSERTED';
2388: ELSE
2389: RAISE fnd_api.g_exc_error;

Line 2389: RAISE fnd_api.g_exc_error;

2385: IF (x_return_status = fnd_api.g_ret_sts_success)
2386: THEN
2387: x_loading_status := 'CN_INSERTED';
2388: ELSE
2389: RAISE fnd_api.g_exc_error;
2390: END IF;
2391: END IF;
2392: -- Check if all the children is not passed then there is a duplicate
2393: -- Quotas

Line 2419: RAISE fnd_api.g_exc_error;

2415: x_loading_status := 'CN_INSERTED';
2416: END IF;
2417: ELSE
2418: -- Un known loading status
2419: RAISE fnd_api.g_exc_error;
2420: END IF;
2421:
2422: -- Issue the Commit and recreate the Save Point.
2423: IF fnd_api.to_boolean (p_commit)

Line 2423: IF fnd_api.to_boolean (p_commit)

2419: RAISE fnd_api.g_exc_error;
2420: END IF;
2421:
2422: -- Issue the Commit and recreate the Save Point.
2423: IF fnd_api.to_boolean (p_commit)
2424: THEN
2425: COMMIT WORK;
2426: END IF;
2427:

Line 2455: IF (x_return_status <> fnd_api.g_ret_sts_success)

2451: );
2452:
2453: -- standard check to insert status if the return status is not succes
2454: -- raise an error
2455: IF (x_return_status <> fnd_api.g_ret_sts_success)
2456: THEN
2457: RAISE fnd_api.g_exc_error;
2458: END IF;
2459: -- case 3:

Line 2457: RAISE fnd_api.g_exc_error;

2453: -- standard check to insert status if the return status is not succes
2454: -- raise an error
2455: IF (x_return_status <> fnd_api.g_ret_sts_success)
2456: THEN
2457: RAISE fnd_api.g_exc_error;
2458: END IF;
2459: -- case 3:
2460: -- Plan Element Exists, Revenue Class record is not passed but
2461: -- cusomizing the trx factors.

Line 2480: IF (x_return_status <> fnd_api.g_ret_sts_success)

2476: );
2477: x_loading_status := l_loading_status;
2478:
2479: -- Raise an Error if the return status not success
2480: IF (x_return_status <> fnd_api.g_ret_sts_success)
2481: THEN
2482: RAISE fnd_api.g_exc_error;
2483: END IF;
2484: END IF;

Line 2482: RAISE fnd_api.g_exc_error;

2478:
2479: -- Raise an Error if the return status not success
2480: IF (x_return_status <> fnd_api.g_ret_sts_success)
2481: THEN
2482: RAISE fnd_api.g_exc_error;
2483: END IF;
2484: END IF;
2485: END IF; -- end if x_loading_status = 'CN_INSERTED'
2486:

Line 2489: IF (x_return_status <> fnd_api.g_ret_sts_success)

2485: END IF; -- end if x_loading_status = 'CN_INSERTED'
2486:
2487: -- If Quota Exists, Quota Rule Exists or not then the quota Rule uplift
2488: -- Counter is > 0 then insert the Uplift Record.
2489: IF (x_return_status <> fnd_api.g_ret_sts_success)
2490: THEN
2491: RAISE fnd_api.g_exc_error;
2492: ELSIF l_p_rev_uplift_rec_tbl.COUNT > 0 AND x_loading_status = 'CN_INSERTED'
2493: THEN

Line 2491: RAISE fnd_api.g_exc_error;

2487: -- If Quota Exists, Quota Rule Exists or not then the quota Rule uplift
2488: -- Counter is > 0 then insert the Uplift Record.
2489: IF (x_return_status <> fnd_api.g_ret_sts_success)
2490: THEN
2491: RAISE fnd_api.g_exc_error;
2492: ELSIF l_p_rev_uplift_rec_tbl.COUNT > 0 AND x_loading_status = 'CN_INSERTED'
2493: THEN
2494: -- call the group API to create the quota rule uplifts
2495: FOR i IN l_p_rev_uplift_rec_tbl.FIRST .. l_p_rev_uplift_rec_tbl.LAST LOOP

Line 2522: IF (x_return_status <> fnd_api.g_ret_sts_success)

2518: x_loading_status => x_loading_status
2519: );
2520:
2521: -- Raise an Error if the Status is not success
2522: IF (x_return_status <> fnd_api.g_ret_sts_success)
2523: THEN
2524: RAISE fnd_api.g_exc_error;
2525: ELSIF (x_loading_status <> 'CN_INSERTED')
2526: THEN

Line 2524: RAISE fnd_api.g_exc_error;

2520:
2521: -- Raise an Error if the Status is not success
2522: IF (x_return_status <> fnd_api.g_ret_sts_success)
2523: THEN
2524: RAISE fnd_api.g_exc_error;
2525: ELSIF (x_loading_status <> 'CN_INSERTED')
2526: THEN
2527: RAISE fnd_api.g_exc_error;
2528: END IF;

Line 2527: RAISE fnd_api.g_exc_error;

2523: THEN
2524: RAISE fnd_api.g_exc_error;
2525: ELSIF (x_loading_status <> 'CN_INSERTED')
2526: THEN
2527: RAISE fnd_api.g_exc_error;
2528: END IF;
2529: END IF;
2530:
2531: /* Post processing */

Line 2536: p_commit => fnd_api.g_false,

2532: IF jtf_usr_hks.ok_to_execute ('CN_PLAN_ELEMENT_PUB', 'CREATE_PLAN_ELEMENT', 'A', 'V')
2533: THEN
2534: cn_plan_element_vuhk.create_plan_element_post (p_api_version => p_api_version,
2535: p_init_msg_list => p_init_msg_list,
2536: p_commit => fnd_api.g_false,
2537: p_validation_level => p_validation_level,
2538: x_return_status => x_return_status,
2539: x_msg_count => x_msg_count,
2540: x_msg_data => x_msg_data,

Line 2550: IF (x_return_status = fnd_api.g_ret_sts_error)

2546: p_rt_quota_asgns_rec_tbl => l_p_rt_quota_asgns_rec_tbl,
2547: x_loading_status => x_loading_status
2548: );
2549:
2550: IF (x_return_status = fnd_api.g_ret_sts_error)
2551: THEN
2552: RAISE fnd_api.g_exc_error;
2553: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2554: THEN

Line 2552: RAISE fnd_api.g_exc_error;

2548: );
2549:
2550: IF (x_return_status = fnd_api.g_ret_sts_error)
2551: THEN
2552: RAISE fnd_api.g_exc_error;
2553: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2554: THEN
2555: RAISE fnd_api.g_exc_unexpected_error;
2556: END IF;

Line 2553: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)

2549:
2550: IF (x_return_status = fnd_api.g_ret_sts_error)
2551: THEN
2552: RAISE fnd_api.g_exc_error;
2553: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2554: THEN
2555: RAISE fnd_api.g_exc_unexpected_error;
2556: END IF;
2557: END IF;

Line 2555: RAISE fnd_api.g_exc_unexpected_error;

2551: THEN
2552: RAISE fnd_api.g_exc_error;
2553: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2554: THEN
2555: RAISE fnd_api.g_exc_unexpected_error;
2556: END IF;
2557: END IF;
2558:
2559: IF jtf_usr_hks.ok_to_execute ('CN_PLAN_ELEMENT_PUB', 'CREATE_PLAN_ELEMENT', 'A', 'C')

Line 2563: p_commit => fnd_api.g_false,

2559: IF jtf_usr_hks.ok_to_execute ('CN_PLAN_ELEMENT_PUB', 'CREATE_PLAN_ELEMENT', 'A', 'C')
2560: THEN
2561: cn_plan_element_cuhk.create_plan_element_post (p_api_version => p_api_version,
2562: p_init_msg_list => p_init_msg_list,
2563: p_commit => fnd_api.g_false,
2564: p_validation_level => p_validation_level,
2565: x_return_status => x_return_status,
2566: x_msg_count => x_msg_count,
2567: x_msg_data => x_msg_data,

Line 2577: IF (x_return_status = fnd_api.g_ret_sts_error)

2573: p_rt_quota_asgns_rec_tbl => l_p_rt_quota_asgns_rec_tbl,
2574: x_loading_status => x_loading_status
2575: );
2576:
2577: IF (x_return_status = fnd_api.g_ret_sts_error)
2578: THEN
2579: RAISE fnd_api.g_exc_error;
2580: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2581: THEN

Line 2579: RAISE fnd_api.g_exc_error;

2575: );
2576:
2577: IF (x_return_status = fnd_api.g_ret_sts_error)
2578: THEN
2579: RAISE fnd_api.g_exc_error;
2580: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2581: THEN
2582: RAISE fnd_api.g_exc_unexpected_error;
2583: END IF;

Line 2580: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)

2576:
2577: IF (x_return_status = fnd_api.g_ret_sts_error)
2578: THEN
2579: RAISE fnd_api.g_exc_error;
2580: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2581: THEN
2582: RAISE fnd_api.g_exc_unexpected_error;
2583: END IF;
2584: END IF;

Line 2582: RAISE fnd_api.g_exc_unexpected_error;

2578: THEN
2579: RAISE fnd_api.g_exc_error;
2580: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2581: THEN
2582: RAISE fnd_api.g_exc_unexpected_error;
2583: END IF;
2584: END IF;
2585:
2586: /* Following code is for message generation */

Line 2612: IF (x_return_status = fnd_api.g_ret_sts_error)

2608: p_oai_array => l_oai_array,
2609: x_return_code => x_return_status
2610: );
2611:
2612: IF (x_return_status = fnd_api.g_ret_sts_error)
2613: THEN
2614: RAISE fnd_api.g_exc_error;
2615: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2616: THEN

Line 2614: RAISE fnd_api.g_exc_error;

2610: );
2611:
2612: IF (x_return_status = fnd_api.g_ret_sts_error)
2613: THEN
2614: RAISE fnd_api.g_exc_error;
2615: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2616: THEN
2617: RAISE fnd_api.g_exc_unexpected_error;
2618: END IF;

Line 2615: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)

2611:
2612: IF (x_return_status = fnd_api.g_ret_sts_error)
2613: THEN
2614: RAISE fnd_api.g_exc_error;
2615: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2616: THEN
2617: RAISE fnd_api.g_exc_unexpected_error;
2618: END IF;
2619: END IF;

Line 2617: RAISE fnd_api.g_exc_unexpected_error;

2613: THEN
2614: RAISE fnd_api.g_exc_error;
2615: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2616: THEN
2617: RAISE fnd_api.g_exc_unexpected_error;
2618: END IF;
2619: END IF;
2620: END IF;
2621:

Line 2622: x_return_status := fnd_api.g_ret_sts_success;

2618: END IF;
2619: END IF;
2620: END IF;
2621:
2622: x_return_status := fnd_api.g_ret_sts_success;
2623:
2624: -- End of API body
2625: <>
2626: NULL;

Line 2629: IF fnd_api.to_boolean (p_commit)

2625: <>
2626: NULL;
2627:
2628: -- Standard check of p_commit.
2629: IF fnd_api.to_boolean (p_commit)
2630: THEN
2631: COMMIT WORK;
2632: END IF;
2633:

Line 2637: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

2633:
2634: --
2635: -- Standard call to get message count and if count is 1, get message info.
2636: --
2637: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
2638: EXCEPTION
2639: WHEN fnd_api.g_exc_error
2640: THEN
2641: ROLLBACK TO create_plan_element;

Line 2639: WHEN fnd_api.g_exc_error

2635: -- Standard call to get message count and if count is 1, get message info.
2636: --
2637: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
2638: EXCEPTION
2639: WHEN fnd_api.g_exc_error
2640: THEN
2641: ROLLBACK TO create_plan_element;
2642: x_return_status := fnd_api.g_ret_sts_error;
2643: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

Line 2642: x_return_status := fnd_api.g_ret_sts_error;

2638: EXCEPTION
2639: WHEN fnd_api.g_exc_error
2640: THEN
2641: ROLLBACK TO create_plan_element;
2642: x_return_status := fnd_api.g_ret_sts_error;
2643: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
2644: WHEN fnd_api.g_exc_unexpected_error
2645: THEN
2646: ROLLBACK TO create_plan_element;

Line 2643: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

2639: WHEN fnd_api.g_exc_error
2640: THEN
2641: ROLLBACK TO create_plan_element;
2642: x_return_status := fnd_api.g_ret_sts_error;
2643: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
2644: WHEN fnd_api.g_exc_unexpected_error
2645: THEN
2646: ROLLBACK TO create_plan_element;
2647: x_loading_status := 'UNEXPECTED_ERR';

Line 2644: WHEN fnd_api.g_exc_unexpected_error

2640: THEN
2641: ROLLBACK TO create_plan_element;
2642: x_return_status := fnd_api.g_ret_sts_error;
2643: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
2644: WHEN fnd_api.g_exc_unexpected_error
2645: THEN
2646: ROLLBACK TO create_plan_element;
2647: x_loading_status := 'UNEXPECTED_ERR';
2648: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 2648: x_return_status := fnd_api.g_ret_sts_unexp_error;

2644: WHEN fnd_api.g_exc_unexpected_error
2645: THEN
2646: ROLLBACK TO create_plan_element;
2647: x_loading_status := 'UNEXPECTED_ERR';
2648: x_return_status := fnd_api.g_ret_sts_unexp_error;
2649: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
2650: WHEN COLLECTION_IS_NULL
2651: THEN
2652: ROLLBACK TO create_plan_element;

Line 2649: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

2645: THEN
2646: ROLLBACK TO create_plan_element;
2647: x_loading_status := 'UNEXPECTED_ERR';
2648: x_return_status := fnd_api.g_ret_sts_unexp_error;
2649: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
2650: WHEN COLLECTION_IS_NULL
2651: THEN
2652: ROLLBACK TO create_plan_element;
2653: x_loading_status := 'COLLECTION_IS_NULL';

Line 2654: x_return_status := fnd_api.g_ret_sts_unexp_error;

2650: WHEN COLLECTION_IS_NULL
2651: THEN
2652: ROLLBACK TO create_plan_element;
2653: x_loading_status := 'COLLECTION_IS_NULL';
2654: x_return_status := fnd_api.g_ret_sts_unexp_error;
2655:
2656: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
2657: THEN
2658: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 2661: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

2657: THEN
2658: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2659: END IF;
2660:
2661: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
2662: WHEN SUBSCRIPT_BEYOND_COUNT
2663: THEN
2664: ROLLBACK TO create_plan_element;
2665: x_loading_status := 'SUBSCRIPT_BEYOND_COUNT';

Line 2666: x_return_status := fnd_api.g_ret_sts_unexp_error;

2662: WHEN SUBSCRIPT_BEYOND_COUNT
2663: THEN
2664: ROLLBACK TO create_plan_element;
2665: x_loading_status := 'SUBSCRIPT_BEYOND_COUNT';
2666: x_return_status := fnd_api.g_ret_sts_unexp_error;
2667:
2668: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
2669: THEN
2670: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 2673: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

2669: THEN
2670: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2671: END IF;
2672:
2673: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
2674: WHEN SUBSCRIPT_OUTSIDE_LIMIT
2675: THEN
2676: ROLLBACK TO create_plan_element;
2677: x_loading_status := 'SUBSCRIPT_OUTSIDE_LIMIT';

Line 2678: x_return_status := fnd_api.g_ret_sts_unexp_error;

2674: WHEN SUBSCRIPT_OUTSIDE_LIMIT
2675: THEN
2676: ROLLBACK TO create_plan_element;
2677: x_loading_status := 'SUBSCRIPT_OUTSIDE_LIMIT';
2678: x_return_status := fnd_api.g_ret_sts_unexp_error;
2679:
2680: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
2681: THEN
2682: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 2685: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

2681: THEN
2682: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2683: END IF;
2684:
2685: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
2686: WHEN OTHERS
2687: THEN
2688: ROLLBACK TO create_plan_element;
2689: x_loading_status := 'UNEXPECTED_ERR';

Line 2690: x_return_status := fnd_api.g_ret_sts_unexp_error;

2686: WHEN OTHERS
2687: THEN
2688: ROLLBACK TO create_plan_element;
2689: x_loading_status := 'UNEXPECTED_ERR';
2690: x_return_status := fnd_api.g_ret_sts_unexp_error;
2691:
2692: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
2693: THEN
2694: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 2697: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

2693: THEN
2694: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
2695: END IF;
2696:
2697: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
2698: END create_plan_element;
2699:
2700: --***********************Very Important Please Read**************************
2701: -- 1. You Must the pass the full new record for update and the Unique key

Line 2826: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)

2822: -- Standard Start of API savepoint
2823: SAVEPOINT update_plan_element;
2824:
2825: -- Standard call to check for call compatibility.
2826: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
2827: THEN
2828: RAISE fnd_api.g_exc_unexpected_error;
2829: END IF;
2830:

Line 2828: RAISE fnd_api.g_exc_unexpected_error;

2824:
2825: -- Standard call to check for call compatibility.
2826: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
2827: THEN
2828: RAISE fnd_api.g_exc_unexpected_error;
2829: END IF;
2830:
2831: -- Initialize message list if p_init_msg_list is set to TRUE.
2832: IF fnd_api.to_boolean (p_init_msg_list)

Line 2832: IF fnd_api.to_boolean (p_init_msg_list)

2828: RAISE fnd_api.g_exc_unexpected_error;
2829: END IF;
2830:
2831: -- Initialize message list if p_init_msg_list is set to TRUE.
2832: IF fnd_api.to_boolean (p_init_msg_list)
2833: THEN
2834: fnd_msg_pub.initialize;
2835: END IF;
2836:

Line 2838: x_return_status := fnd_api.g_ret_sts_success;

2834: fnd_msg_pub.initialize;
2835: END IF;
2836:
2837: -- Initialize API return status to success
2838: x_return_status := fnd_api.g_ret_sts_success;
2839: x_loading_status := 'CN_UPDATED';
2840:
2841: -- START OF MOAC ORG_ID VALIDATION
2842: l_org_id := p_new_plan_element_rec.org_id;

Line 2867: IF (x_return_status <> fnd_api.g_ret_sts_success)

2863:
2864: validate_payment_group_code(x_return_status => x_return_status,
2865: p_payment_group_code => l_p_new_plan_element_rec.payment_group_code);
2866:
2867: IF (x_return_status <> fnd_api.g_ret_sts_success)
2868: THEN
2869: RAISE fnd_api.g_exc_error;
2870: END IF;
2871:

Line 2869: RAISE fnd_api.g_exc_error;

2865: p_payment_group_code => l_p_new_plan_element_rec.payment_group_code);
2866:
2867: IF (x_return_status <> fnd_api.g_ret_sts_success)
2868: THEN
2869: RAISE fnd_api.g_exc_error;
2870: END IF;
2871:
2872: /* pre processing call */
2873: IF jtf_usr_hks.ok_to_execute ('CN_PLAN_ELEMENT_PUB', 'UPDATE_PLAN_ELEMENT', 'B', 'C')

Line 2877: p_commit => fnd_api.g_false,

2873: IF jtf_usr_hks.ok_to_execute ('CN_PLAN_ELEMENT_PUB', 'UPDATE_PLAN_ELEMENT', 'B', 'C')
2874: THEN
2875: cn_plan_element_cuhk.update_plan_element_pre (p_api_version => p_api_version,
2876: p_init_msg_list => p_init_msg_list,
2877: p_commit => fnd_api.g_false,
2878: p_validation_level => p_validation_level,
2879: x_return_status => x_return_status,
2880: x_msg_count => x_msg_count,
2881: x_msg_data => x_msg_data,

Line 2892: IF (x_return_status = fnd_api.g_ret_sts_error)

2888: p_rt_quota_asgns_rec_tbl => l_p_rt_quota_asgns_rec_tbl,
2889: x_loading_status => x_loading_status
2890: );
2891:
2892: IF (x_return_status = fnd_api.g_ret_sts_error)
2893: THEN
2894: RAISE fnd_api.g_exc_error;
2895: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2896: THEN

Line 2894: RAISE fnd_api.g_exc_error;

2890: );
2891:
2892: IF (x_return_status = fnd_api.g_ret_sts_error)
2893: THEN
2894: RAISE fnd_api.g_exc_error;
2895: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2896: THEN
2897: RAISE fnd_api.g_exc_unexpected_error;
2898: END IF;

Line 2895: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)

2891:
2892: IF (x_return_status = fnd_api.g_ret_sts_error)
2893: THEN
2894: RAISE fnd_api.g_exc_error;
2895: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2896: THEN
2897: RAISE fnd_api.g_exc_unexpected_error;
2898: END IF;
2899: END IF;

Line 2897: RAISE fnd_api.g_exc_unexpected_error;

2893: THEN
2894: RAISE fnd_api.g_exc_error;
2895: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2896: THEN
2897: RAISE fnd_api.g_exc_unexpected_error;
2898: END IF;
2899: END IF;
2900:
2901: IF jtf_usr_hks.ok_to_execute ('CN_PLAN_ELEMENT_PUB', 'UPDATE_PLAN_ELEMENT', 'B', 'V')

Line 2905: p_commit => fnd_api.g_false,

2901: IF jtf_usr_hks.ok_to_execute ('CN_PLAN_ELEMENT_PUB', 'UPDATE_PLAN_ELEMENT', 'B', 'V')
2902: THEN
2903: cn_plan_element_vuhk.update_plan_element_pre (p_api_version => p_api_version,
2904: p_init_msg_list => p_init_msg_list,
2905: p_commit => fnd_api.g_false,
2906: p_validation_level => p_validation_level,
2907: x_return_status => x_return_status,
2908: x_msg_count => x_msg_count,
2909: x_msg_data => x_msg_data,

Line 2920: IF (x_return_status = fnd_api.g_ret_sts_error)

2916: p_rt_quota_asgns_rec_tbl => l_p_rt_quota_asgns_rec_tbl,
2917: x_loading_status => x_loading_status
2918: );
2919:
2920: IF (x_return_status = fnd_api.g_ret_sts_error)
2921: THEN
2922: RAISE fnd_api.g_exc_error;
2923: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2924: THEN

Line 2922: RAISE fnd_api.g_exc_error;

2918: );
2919:
2920: IF (x_return_status = fnd_api.g_ret_sts_error)
2921: THEN
2922: RAISE fnd_api.g_exc_error;
2923: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2924: THEN
2925: RAISE fnd_api.g_exc_unexpected_error;
2926: END IF;

Line 2923: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)

2919:
2920: IF (x_return_status = fnd_api.g_ret_sts_error)
2921: THEN
2922: RAISE fnd_api.g_exc_error;
2923: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2924: THEN
2925: RAISE fnd_api.g_exc_unexpected_error;
2926: END IF;
2927: END IF;

Line 2925: RAISE fnd_api.g_exc_unexpected_error;

2921: THEN
2922: RAISE fnd_api.g_exc_error;
2923: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
2924: THEN
2925: RAISE fnd_api.g_exc_unexpected_error;
2926: END IF;
2927: END IF;
2928:
2929: -- Store the User Input Value into The Local Variable.

Line 2993: IF (x_return_status <> fnd_api.g_ret_sts_success)

2989: x_loading_status := l_loading_status;
2990: END IF;
2991:
2992: -- Raise an Error
2993: IF (x_return_status <> fnd_api.g_ret_sts_success)
2994: THEN
2995: RAISE fnd_api.g_exc_error;
2996: ELSIF (x_loading_status = 'CN_UPDATED')
2997: THEN

Line 2995: RAISE fnd_api.g_exc_error;

2991:
2992: -- Raise an Error
2993: IF (x_return_status <> fnd_api.g_ret_sts_success)
2994: THEN
2995: RAISE fnd_api.g_exc_error;
2996: ELSIF (x_loading_status = 'CN_UPDATED')
2997: THEN
2998: l_pe_rec.quota_id := l_pe_rec_old.quota_id;
2999: -- Table Handler

Line 3088: IF (x_return_status <> fnd_api.g_ret_sts_success)

3084: x_loading_status => l_loading_status
3085: );
3086: x_loading_status := l_loading_status;
3087:
3088: IF (x_return_status <> fnd_api.g_ret_sts_success)
3089: THEN
3090: RAISE fnd_api.g_exc_error;
3091: END IF;
3092:

Line 3090: RAISE fnd_api.g_exc_error;

3086: x_loading_status := l_loading_status;
3087:
3088: IF (x_return_status <> fnd_api.g_ret_sts_success)
3089: THEN
3090: RAISE fnd_api.g_exc_error;
3091: END IF;
3092:
3093: -- check if we need to update the cn_srp_period_quotas ext table. If yes, update the table
3094:

Line 3173: IF (x_return_status <> fnd_api.g_ret_sts_success)

3169: x_loading_status => l_loading_status
3170: );
3171: x_loading_status := l_loading_status;
3172:
3173: IF (x_return_status <> fnd_api.g_ret_sts_success)
3174: THEN
3175: RAISE fnd_api.g_exc_error;
3176: END IF;
3177:

Line 3175: RAISE fnd_api.g_exc_error;

3171: x_loading_status := l_loading_status;
3172:
3173: IF (x_return_status <> fnd_api.g_ret_sts_success)
3174: THEN
3175: RAISE fnd_api.g_exc_error;
3176: END IF;
3177:
3178: -- IF the aboce return Status IS success and one of COUNT is
3179: -- Greater than 0 Then set the status as CN_CHILD and

Line 3181: IF (x_return_status = fnd_api.g_ret_sts_success)

3177:
3178: -- IF the aboce return Status IS success and one of COUNT is
3179: -- Greater than 0 Then set the status as CN_CHILD and
3180: -- Call the Respective child Procedures
3181: IF (x_return_status = fnd_api.g_ret_sts_success)
3182: AND (l_p_revenue_class_rec_tbl.COUNT > 0 OR l_p_trx_factor_rec_tbl.COUNT > 0 OR l_p_rev_uplift_rec_tbl.COUNT > 0)
3183: THEN
3184: x_loading_status := 'CN_CHILD';
3185: END IF;

Line 3189: IF fnd_api.to_boolean (p_commit)

3185: END IF;
3186: END IF;
3187:
3188: -- Issue the Commit Before start the Child Process
3189: IF fnd_api.to_boolean (p_commit)
3190: THEN
3191: COMMIT WORK;
3192: END IF;
3193:

Line 3218: IF (x_return_status <> fnd_api.g_ret_sts_success)

3214: );
3215:
3216: -- if the Status is not success or the Loading Status is <> CN_UPDATED
3217: -- then Raise an Error
3218: IF (x_return_status <> fnd_api.g_ret_sts_success)
3219: THEN
3220: RAISE fnd_api.g_exc_error;
3221: ELSIF (x_loading_status <> 'CN_UPDATED')
3222: THEN

Line 3220: RAISE fnd_api.g_exc_error;

3216: -- if the Status is not success or the Loading Status is <> CN_UPDATED
3217: -- then Raise an Error
3218: IF (x_return_status <> fnd_api.g_ret_sts_success)
3219: THEN
3220: RAISE fnd_api.g_exc_error;
3221: ELSIF (x_loading_status <> 'CN_UPDATED')
3222: THEN
3223: RAISE fnd_api.g_exc_error;
3224: END IF;

Line 3223: RAISE fnd_api.g_exc_error;

3219: THEN
3220: RAISE fnd_api.g_exc_error;
3221: ELSIF (x_loading_status <> 'CN_UPDATED')
3222: THEN
3223: RAISE fnd_api.g_exc_error;
3224: END IF;
3225: ELSIF (l_p_revenue_class_rec_tbl.COUNT = 0 AND l_p_trx_factor_rec_tbl.COUNT > 0)
3226: THEN
3227: -- Trx Factor data should be loaded from p_trx_factor_rec_tbl,

Line 3291: IF (x_return_status <> fnd_api.g_ret_sts_success) OR x_loading_status NOT IN ('CN_UPDATED', 'CN_INSERTED')

3287: );
3288: x_loading_status := l_loading_status;
3289:
3290: -- Raise an Error if the Status Is not success
3291: IF (x_return_status <> fnd_api.g_ret_sts_success) OR x_loading_status NOT IN ('CN_UPDATED', 'CN_INSERTED')
3292: THEN
3293: RAISE fnd_api.g_exc_error;
3294: END IF;
3295: END LOOP; -- Outer trx Loop

Line 3293: RAISE fnd_api.g_exc_error;

3289:
3290: -- Raise an Error if the Status Is not success
3291: IF (x_return_status <> fnd_api.g_ret_sts_success) OR x_loading_status NOT IN ('CN_UPDATED', 'CN_INSERTED')
3292: THEN
3293: RAISE fnd_api.g_exc_error;
3294: END IF;
3295: END LOOP; -- Outer trx Loop
3296: END IF;
3297:

Line 3330: IF (x_return_status <> fnd_api.g_ret_sts_success)

3326: x_loading_status => x_loading_status
3327: );
3328:
3329: -- Raise an Error if the Status is not SUCCESS or NOT CN_UPDATED
3330: IF (x_return_status <> fnd_api.g_ret_sts_success)
3331: THEN
3332: RAISE fnd_api.g_exc_error;
3333: ELSIF (x_loading_status <> 'CN_UPDATED')
3334: THEN

Line 3332: RAISE fnd_api.g_exc_error;

3328:
3329: -- Raise an Error if the Status is not SUCCESS or NOT CN_UPDATED
3330: IF (x_return_status <> fnd_api.g_ret_sts_success)
3331: THEN
3332: RAISE fnd_api.g_exc_error;
3333: ELSIF (x_loading_status <> 'CN_UPDATED')
3334: THEN
3335: RAISE fnd_api.g_exc_error;
3336: END IF;

Line 3335: RAISE fnd_api.g_exc_error;

3331: THEN
3332: RAISE fnd_api.g_exc_error;
3333: ELSIF (x_loading_status <> 'CN_UPDATED')
3334: THEN
3335: RAISE fnd_api.g_exc_error;
3336: END IF;
3337: END IF;
3338:
3339: -- Check the Period Quotas counter Parameter if it is > 0 THEN

Line 3359: IF (x_return_status <> fnd_api.g_ret_sts_success)

3355: );
3356:
3357: -- If the Return status is not success or not CN_UPDATED then
3358: -- Raise an Error
3359: IF (x_return_status <> fnd_api.g_ret_sts_success)
3360: THEN
3361: RAISE fnd_api.g_exc_error;
3362: ELSIF (x_loading_status <> 'CN_UPDATED')
3363: THEN

Line 3361: RAISE fnd_api.g_exc_error;

3357: -- If the Return status is not success or not CN_UPDATED then
3358: -- Raise an Error
3359: IF (x_return_status <> fnd_api.g_ret_sts_success)
3360: THEN
3361: RAISE fnd_api.g_exc_error;
3362: ELSIF (x_loading_status <> 'CN_UPDATED')
3363: THEN
3364: RAISE fnd_api.g_exc_error;
3365: END IF;

Line 3364: RAISE fnd_api.g_exc_error;

3360: THEN
3361: RAISE fnd_api.g_exc_error;
3362: ELSIF (x_loading_status <> 'CN_UPDATED')
3363: THEN
3364: RAISE fnd_api.g_exc_error;
3365: END IF;
3366: END IF;
3367:
3368: -- Check the Rate QUota assigns table Parameter count if > 0

Line 3390: IF (x_return_status <> fnd_api.g_ret_sts_success)

3386: );
3387:
3388: -- Raise an Error if the return status is not success or
3389: -- return loading status is NOT CN_UPDATED
3390: IF (x_return_status <> fnd_api.g_ret_sts_success)
3391: THEN
3392: RAISE fnd_api.g_exc_error;
3393: ELSIF (x_loading_status <> 'CN_UPDATED')
3394: THEN

Line 3392: RAISE fnd_api.g_exc_error;

3388: -- Raise an Error if the return status is not success or
3389: -- return loading status is NOT CN_UPDATED
3390: IF (x_return_status <> fnd_api.g_ret_sts_success)
3391: THEN
3392: RAISE fnd_api.g_exc_error;
3393: ELSIF (x_loading_status <> 'CN_UPDATED')
3394: THEN
3395: RAISE fnd_api.g_exc_error;
3396: END IF;

Line 3395: RAISE fnd_api.g_exc_error;

3391: THEN
3392: RAISE fnd_api.g_exc_error;
3393: ELSIF (x_loading_status <> 'CN_UPDATED')
3394: THEN
3395: RAISE fnd_api.g_exc_error;
3396: END IF;
3397: END IF;
3398: END IF; -- end if x_loading_status = 'CN_CHILD'
3399:

Line 3405: p_commit => fnd_api.g_false,

3401: IF jtf_usr_hks.ok_to_execute ('CN_PLAN_ELEMENT_PUB', 'UPDATE_PLAN_ELEMENT', 'A', 'V')
3402: THEN
3403: cn_plan_element_vuhk.update_plan_element_post (p_api_version => p_api_version,
3404: p_init_msg_list => p_init_msg_list,
3405: p_commit => fnd_api.g_false,
3406: p_validation_level => p_validation_level,
3407: x_return_status => x_return_status,
3408: x_msg_count => x_msg_count,
3409: x_msg_data => x_msg_data,

Line 3420: IF (x_return_status = fnd_api.g_ret_sts_error)

3416: p_rt_quota_asgns_rec_tbl => l_p_rt_quota_asgns_rec_tbl,
3417: x_loading_status => x_loading_status
3418: );
3419:
3420: IF (x_return_status = fnd_api.g_ret_sts_error)
3421: THEN
3422: RAISE fnd_api.g_exc_error;
3423: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
3424: THEN

Line 3422: RAISE fnd_api.g_exc_error;

3418: );
3419:
3420: IF (x_return_status = fnd_api.g_ret_sts_error)
3421: THEN
3422: RAISE fnd_api.g_exc_error;
3423: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
3424: THEN
3425: RAISE fnd_api.g_exc_unexpected_error;
3426: END IF;

Line 3423: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)

3419:
3420: IF (x_return_status = fnd_api.g_ret_sts_error)
3421: THEN
3422: RAISE fnd_api.g_exc_error;
3423: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
3424: THEN
3425: RAISE fnd_api.g_exc_unexpected_error;
3426: END IF;
3427: END IF;

Line 3425: RAISE fnd_api.g_exc_unexpected_error;

3421: THEN
3422: RAISE fnd_api.g_exc_error;
3423: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
3424: THEN
3425: RAISE fnd_api.g_exc_unexpected_error;
3426: END IF;
3427: END IF;
3428:
3429: IF jtf_usr_hks.ok_to_execute ('CN_PLAN_ELEMENT_PUB', 'UPDATE_PLAN_ELEMENT', 'A', 'C')

Line 3433: p_commit => fnd_api.g_false,

3429: IF jtf_usr_hks.ok_to_execute ('CN_PLAN_ELEMENT_PUB', 'UPDATE_PLAN_ELEMENT', 'A', 'C')
3430: THEN
3431: cn_plan_element_cuhk.update_plan_element_post (p_api_version => p_api_version,
3432: p_init_msg_list => p_init_msg_list,
3433: p_commit => fnd_api.g_false,
3434: p_validation_level => p_validation_level,
3435: x_return_status => x_return_status,
3436: x_msg_count => x_msg_count,
3437: x_msg_data => x_msg_data,

Line 3448: IF (x_return_status = fnd_api.g_ret_sts_error)

3444: p_rt_quota_asgns_rec_tbl => l_p_rt_quota_asgns_rec_tbl,
3445: x_loading_status => x_loading_status
3446: );
3447:
3448: IF (x_return_status = fnd_api.g_ret_sts_error)
3449: THEN
3450: RAISE fnd_api.g_exc_error;
3451: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
3452: THEN

Line 3450: RAISE fnd_api.g_exc_error;

3446: );
3447:
3448: IF (x_return_status = fnd_api.g_ret_sts_error)
3449: THEN
3450: RAISE fnd_api.g_exc_error;
3451: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
3452: THEN
3453: RAISE fnd_api.g_exc_unexpected_error;
3454: END IF;

Line 3451: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)

3447:
3448: IF (x_return_status = fnd_api.g_ret_sts_error)
3449: THEN
3450: RAISE fnd_api.g_exc_error;
3451: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
3452: THEN
3453: RAISE fnd_api.g_exc_unexpected_error;
3454: END IF;
3455: END IF;

Line 3453: RAISE fnd_api.g_exc_unexpected_error;

3449: THEN
3450: RAISE fnd_api.g_exc_error;
3451: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
3452: THEN
3453: RAISE fnd_api.g_exc_unexpected_error;
3454: END IF;
3455: END IF;
3456:
3457: /* Following code is for message generation */

Line 3484: IF (x_return_status = fnd_api.g_ret_sts_error)

3480: p_oai_array => l_oai_array,
3481: x_return_code => x_return_status
3482: );
3483:
3484: IF (x_return_status = fnd_api.g_ret_sts_error)
3485: THEN
3486: RAISE fnd_api.g_exc_error;
3487: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
3488: THEN

Line 3486: RAISE fnd_api.g_exc_error;

3482: );
3483:
3484: IF (x_return_status = fnd_api.g_ret_sts_error)
3485: THEN
3486: RAISE fnd_api.g_exc_error;
3487: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
3488: THEN
3489: RAISE fnd_api.g_exc_unexpected_error;
3490: END IF;

Line 3487: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)

3483:
3484: IF (x_return_status = fnd_api.g_ret_sts_error)
3485: THEN
3486: RAISE fnd_api.g_exc_error;
3487: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
3488: THEN
3489: RAISE fnd_api.g_exc_unexpected_error;
3490: END IF;
3491: END IF;

Line 3489: RAISE fnd_api.g_exc_unexpected_error;

3485: THEN
3486: RAISE fnd_api.g_exc_error;
3487: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
3488: THEN
3489: RAISE fnd_api.g_exc_unexpected_error;
3490: END IF;
3491: END IF;
3492: END IF;
3493:

Line 3494: x_return_status := fnd_api.g_ret_sts_success;

3490: END IF;
3491: END IF;
3492: END IF;
3493:
3494: x_return_status := fnd_api.g_ret_sts_success;
3495:
3496: -- Standard check of p_commit.
3497: IF fnd_api.to_boolean (p_commit)
3498: THEN

Line 3497: IF fnd_api.to_boolean (p_commit)

3493:
3494: x_return_status := fnd_api.g_ret_sts_success;
3495:
3496: -- Standard check of p_commit.
3497: IF fnd_api.to_boolean (p_commit)
3498: THEN
3499: COMMIT WORK;
3500: END IF;
3501:

Line 3503: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

3499: COMMIT WORK;
3500: END IF;
3501:
3502: -- Standard call to get message count and if count is 1, get message info.
3503: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
3504: -- End of Update Plan Element
3505: EXCEPTION
3506: WHEN fnd_api.g_exc_error
3507: THEN

Line 3506: WHEN fnd_api.g_exc_error

3502: -- Standard call to get message count and if count is 1, get message info.
3503: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
3504: -- End of Update Plan Element
3505: EXCEPTION
3506: WHEN fnd_api.g_exc_error
3507: THEN
3508: ROLLBACK TO update_plan_element;
3509: x_return_status := fnd_api.g_ret_sts_error;
3510: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

Line 3509: x_return_status := fnd_api.g_ret_sts_error;

3505: EXCEPTION
3506: WHEN fnd_api.g_exc_error
3507: THEN
3508: ROLLBACK TO update_plan_element;
3509: x_return_status := fnd_api.g_ret_sts_error;
3510: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
3511: WHEN fnd_api.g_exc_unexpected_error
3512: THEN
3513: ROLLBACK TO update_plan_element;

Line 3510: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

3506: WHEN fnd_api.g_exc_error
3507: THEN
3508: ROLLBACK TO update_plan_element;
3509: x_return_status := fnd_api.g_ret_sts_error;
3510: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
3511: WHEN fnd_api.g_exc_unexpected_error
3512: THEN
3513: ROLLBACK TO update_plan_element;
3514: x_loading_status := 'UNEXPECTED_ERR';

Line 3511: WHEN fnd_api.g_exc_unexpected_error

3507: THEN
3508: ROLLBACK TO update_plan_element;
3509: x_return_status := fnd_api.g_ret_sts_error;
3510: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
3511: WHEN fnd_api.g_exc_unexpected_error
3512: THEN
3513: ROLLBACK TO update_plan_element;
3514: x_loading_status := 'UNEXPECTED_ERR';
3515: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3515: x_return_status := fnd_api.g_ret_sts_unexp_error;

3511: WHEN fnd_api.g_exc_unexpected_error
3512: THEN
3513: ROLLBACK TO update_plan_element;
3514: x_loading_status := 'UNEXPECTED_ERR';
3515: x_return_status := fnd_api.g_ret_sts_unexp_error;
3516: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
3517: WHEN COLLECTION_IS_NULL
3518: THEN
3519: ROLLBACK TO update_plan_element;

Line 3516: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

3512: THEN
3513: ROLLBACK TO update_plan_element;
3514: x_loading_status := 'UNEXPECTED_ERR';
3515: x_return_status := fnd_api.g_ret_sts_unexp_error;
3516: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
3517: WHEN COLLECTION_IS_NULL
3518: THEN
3519: ROLLBACK TO update_plan_element;
3520: x_loading_status := 'COLLECTION_IS_NULL';

Line 3521: x_return_status := fnd_api.g_ret_sts_unexp_error;

3517: WHEN COLLECTION_IS_NULL
3518: THEN
3519: ROLLBACK TO update_plan_element;
3520: x_loading_status := 'COLLECTION_IS_NULL';
3521: x_return_status := fnd_api.g_ret_sts_unexp_error;
3522:
3523: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
3524: THEN
3525: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 3528: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

3524: THEN
3525: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
3526: END IF;
3527:
3528: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
3529: WHEN SUBSCRIPT_BEYOND_COUNT
3530: THEN
3531: ROLLBACK TO update_plan_element;
3532: x_loading_status := 'SUBSCRIPT_BEYOND_COUNT';

Line 3533: x_return_status := fnd_api.g_ret_sts_unexp_error;

3529: WHEN SUBSCRIPT_BEYOND_COUNT
3530: THEN
3531: ROLLBACK TO update_plan_element;
3532: x_loading_status := 'SUBSCRIPT_BEYOND_COUNT';
3533: x_return_status := fnd_api.g_ret_sts_unexp_error;
3534:
3535: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
3536: THEN
3537: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 3540: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

3536: THEN
3537: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
3538: END IF;
3539:
3540: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
3541: WHEN SUBSCRIPT_OUTSIDE_LIMIT
3542: THEN
3543: ROLLBACK TO update_plan_element;
3544: x_loading_status := 'SUBSCRIPT_OUTSIDE_LIMIT';

Line 3545: x_return_status := fnd_api.g_ret_sts_unexp_error;

3541: WHEN SUBSCRIPT_OUTSIDE_LIMIT
3542: THEN
3543: ROLLBACK TO update_plan_element;
3544: x_loading_status := 'SUBSCRIPT_OUTSIDE_LIMIT';
3545: x_return_status := fnd_api.g_ret_sts_unexp_error;
3546:
3547: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
3548: THEN
3549: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 3552: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

3548: THEN
3549: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
3550: END IF;
3551:
3552: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
3553: WHEN OTHERS
3554: THEN
3555: ROLLBACK TO update_plan_element;
3556: x_loading_status := 'UNEXPECTED_ERR';

Line 3557: x_return_status := fnd_api.g_ret_sts_unexp_error;

3553: WHEN OTHERS
3554: THEN
3555: ROLLBACK TO update_plan_element;
3556: x_loading_status := 'UNEXPECTED_ERR';
3557: x_return_status := fnd_api.g_ret_sts_unexp_error;
3558:
3559: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
3560: THEN
3561: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 3564: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

3560: THEN
3561: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
3562: END IF;
3563:
3564: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
3565: END update_plan_element;
3566:
3567: -- End Update Plan Element
3568:

Line 3629: x_return_status := fnd_api.g_ret_sts_success;

3625: BEGIN
3626: -- Standard Start of API savepoint
3627: SAVEPOINT process_input_records;
3628: -- Initialize API return status to success
3629: x_return_status := fnd_api.g_ret_sts_success;
3630: l_p_quota_name := p_quota_rec.NAME;
3631: x_loading_status := 'CN_DELETED';
3632:
3633: /* Resolve the quota_id and quota_name from */

Line 3640: ) = fnd_api.g_true

3636: p_para_name => cn_chk_plan_element_pkg.g_pe_name,
3637: p_loading_status => x_loading_status,
3638: x_loading_status => l_loading_status
3639: )
3640: ) = fnd_api.g_true
3641: )
3642: THEN
3643: RAISE fnd_api.g_exc_error;
3644: END IF;

Line 3643: RAISE fnd_api.g_exc_error;

3639: )
3640: ) = fnd_api.g_true
3641: )
3642: THEN
3643: RAISE fnd_api.g_exc_error;
3644: END IF;
3645:
3646: /* 2. if it is null character */
3647: IF ((cn_api.chk_null_char_para (p_char_para => l_p_quota_name,

Line 3652: ) = fnd_api.g_true

3648: p_obj_name => cn_chk_plan_element_pkg.g_pe_name,
3649: p_loading_status => x_loading_status,
3650: x_loading_status => l_loading_status
3651: )
3652: ) = fnd_api.g_true
3653: )
3654: THEN
3655: RAISE fnd_api.g_exc_error;
3656: END IF;

Line 3655: RAISE fnd_api.g_exc_error;

3651: )
3652: ) = fnd_api.g_true
3653: )
3654: THEN
3655: RAISE fnd_api.g_exc_error;
3656: END IF;
3657:
3658: /* 3. Org Id Validations to begin */
3659: l_org_id := p_quota_rec.org_id;

Line 3686: RAISE fnd_api.g_exc_error;

3682: fnd_msg_pub.ADD;
3683: END IF;
3684:
3685: x_loading_status := 'CN_PLN_NOT_EXIST';
3686: RAISE fnd_api.g_exc_error;
3687: END IF;
3688:
3689: p_quota_rec.quota_id := l_quota_id;
3690:

Line 3716: WHEN fnd_api.g_exc_error

3712: p_rt_quota_asgns_rec_tbl (i).org_id := l_org_id;
3713: END LOOP;
3714: END IF;
3715: EXCEPTION
3716: WHEN fnd_api.g_exc_error
3717: THEN
3718: ROLLBACK TO process_input_records;
3719: x_return_status := fnd_api.g_ret_sts_error;
3720: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

Line 3719: x_return_status := fnd_api.g_ret_sts_error;

3715: EXCEPTION
3716: WHEN fnd_api.g_exc_error
3717: THEN
3718: ROLLBACK TO process_input_records;
3719: x_return_status := fnd_api.g_ret_sts_error;
3720: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
3721: WHEN fnd_api.g_exc_unexpected_error
3722: THEN
3723: ROLLBACK TO process_input_records;

Line 3720: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

3716: WHEN fnd_api.g_exc_error
3717: THEN
3718: ROLLBACK TO process_input_records;
3719: x_return_status := fnd_api.g_ret_sts_error;
3720: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
3721: WHEN fnd_api.g_exc_unexpected_error
3722: THEN
3723: ROLLBACK TO process_input_records;
3724: x_loading_status := 'UNEXPECTED_ERR';

Line 3721: WHEN fnd_api.g_exc_unexpected_error

3717: THEN
3718: ROLLBACK TO process_input_records;
3719: x_return_status := fnd_api.g_ret_sts_error;
3720: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
3721: WHEN fnd_api.g_exc_unexpected_error
3722: THEN
3723: ROLLBACK TO process_input_records;
3724: x_loading_status := 'UNEXPECTED_ERR';
3725: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3725: x_return_status := fnd_api.g_ret_sts_unexp_error;

3721: WHEN fnd_api.g_exc_unexpected_error
3722: THEN
3723: ROLLBACK TO process_input_records;
3724: x_loading_status := 'UNEXPECTED_ERR';
3725: x_return_status := fnd_api.g_ret_sts_unexp_error;
3726: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
3727: WHEN OTHERS
3728: THEN
3729: ROLLBACK TO process_input_records;

Line 3726: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

3722: THEN
3723: ROLLBACK TO process_input_records;
3724: x_loading_status := 'UNEXPECTED_ERR';
3725: x_return_status := fnd_api.g_ret_sts_unexp_error;
3726: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
3727: WHEN OTHERS
3728: THEN
3729: ROLLBACK TO process_input_records;
3730: x_loading_status := 'UNEXPECTED_ERR';

Line 3731: x_return_status := fnd_api.g_ret_sts_unexp_error;

3727: WHEN OTHERS
3728: THEN
3729: ROLLBACK TO process_input_records;
3730: x_loading_status := 'UNEXPECTED_ERR';
3731: x_return_status := fnd_api.g_ret_sts_unexp_error;
3732:
3733: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
3734: THEN
3735: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 3738: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

3734: THEN
3735: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
3736: END IF;
3737:
3738: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
3739: END process_input_records;
3740:
3741: PROCEDURE delete_plan_element (
3742: p_api_version IN NUMBER := 0,

Line 3791: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)

3787: -- Standard Start of API savepoint
3788: SAVEPOINT delete_plan_element;
3789:
3790: -- Standard call to check for call compatibility.
3791: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
3792: THEN
3793: RAISE fnd_api.g_exc_unexpected_error;
3794: END IF;
3795:

Line 3793: RAISE fnd_api.g_exc_unexpected_error;

3789:
3790: -- Standard call to check for call compatibility.
3791: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
3792: THEN
3793: RAISE fnd_api.g_exc_unexpected_error;
3794: END IF;
3795:
3796: -- Initialize message list if p_init_msg_list is set to TRUE.
3797: IF fnd_api.to_boolean (p_init_msg_list)

Line 3797: IF fnd_api.to_boolean (p_init_msg_list)

3793: RAISE fnd_api.g_exc_unexpected_error;
3794: END IF;
3795:
3796: -- Initialize message list if p_init_msg_list is set to TRUE.
3797: IF fnd_api.to_boolean (p_init_msg_list)
3798: THEN
3799: fnd_msg_pub.initialize;
3800: END IF;
3801:

Line 3803: x_return_status := fnd_api.g_ret_sts_success;

3799: fnd_msg_pub.initialize;
3800: END IF;
3801:
3802: -- Initialize API return status to success
3803: x_return_status := fnd_api.g_ret_sts_success;
3804: x_loading_status := 'CN_DELETED';
3805:
3806: -- START OF MOAC ORG_ID VALIDATION
3807: l_val_org_id := p_quota_rec.org_id;

Line 3844: p_commit => fnd_api.g_false,

3840: IF jtf_usr_hks.ok_to_execute ('CN_PLAN_ELEMENT_PUB', 'DELETE_PLAN_ELEMENT', 'B', 'C')
3841: THEN
3842: cn_plan_element_cuhk.delete_plan_element_pre (p_api_version => p_api_version,
3843: p_init_msg_list => p_init_msg_list,
3844: p_commit => fnd_api.g_false,
3845: p_validation_level => p_validation_level,
3846: x_return_status => x_return_status,
3847: x_msg_count => x_msg_count,
3848: x_msg_data => x_msg_data,

Line 3863: p_commit => fnd_api.g_false,

3859: IF jtf_usr_hks.ok_to_execute ('CN_PLAN_ELEMENT_PUB', 'DELETE_PLAN_ELEMENT', 'B', 'V')
3860: THEN
3861: cn_plan_element_vuhk.delete_plan_element_pre (p_api_version => p_api_version,
3862: p_init_msg_list => p_init_msg_list,
3863: p_commit => fnd_api.g_false,
3864: p_validation_level => p_validation_level,
3865: x_return_status => x_return_status,
3866: x_msg_count => x_msg_count,
3867: x_msg_data => x_msg_data,

Line 3878: IF (x_return_status = fnd_api.g_ret_sts_success AND x_loading_status = 'CN_DELETED')

3874: check_status (p_return_status => x_return_status);
3875: END IF;
3876:
3877: /* ## MAIN IF BEGINS ## */
3878: IF (x_return_status = fnd_api.g_ret_sts_success AND x_loading_status = 'CN_DELETED')
3879: THEN
3880: -- This is calling the group API (cnxgqrub.pls)
3881: -- Needs refactoring
3882: -- Check if the Uplift Rec table count is > 0

Line 3961: IF (x_return_status <> fnd_api.g_ret_sts_success)

3957: x_loading_status => x_loading_status
3958: );
3959:
3960: -- if the Return status is not success then Raise an Error
3961: IF (x_return_status <> fnd_api.g_ret_sts_success)
3962: THEN
3963: RAISE fnd_api.g_exc_error;
3964: END IF;
3965: END IF;

Line 3963: RAISE fnd_api.g_exc_error;

3959:
3960: -- if the Return status is not success then Raise an Error
3961: IF (x_return_status <> fnd_api.g_ret_sts_success)
3962: THEN
3963: RAISE fnd_api.g_exc_error;
3964: END IF;
3965: END IF;
3966:
3967: /* If no Child record is Passed then Delete the Parent Record

Line 3997: p_commit => fnd_api.g_false,

3993: IF jtf_usr_hks.ok_to_execute ('CN_PLAN_ELEMENT_PUB', 'DELETE_PLAN_ELEMENT', 'A', 'V')
3994: THEN
3995: cn_plan_element_vuhk.delete_plan_element_post (p_api_version => p_api_version,
3996: p_init_msg_list => p_init_msg_list,
3997: p_commit => fnd_api.g_false,
3998: p_validation_level => p_validation_level,
3999: x_return_status => x_return_status,
4000: x_msg_count => x_msg_count,
4001: x_msg_data => x_msg_data,

Line 4015: p_commit => fnd_api.g_false,

4011: IF jtf_usr_hks.ok_to_execute ('CN_PLAN_ELEMENT_PUB', 'DELETE_PLAN_ELEMENT', 'A', 'C')
4012: THEN
4013: cn_plan_element_cuhk.delete_plan_element_post (p_api_version => p_api_version,
4014: p_init_msg_list => p_init_msg_list,
4015: p_commit => fnd_api.g_false,
4016: p_validation_level => p_validation_level,
4017: x_return_status => x_return_status,
4018: x_msg_count => x_msg_count,
4019: x_msg_data => x_msg_data,

Line 4056: x_return_status := fnd_api.g_ret_sts_success;

4052: check_status (p_return_status => x_return_status);
4053: END IF;
4054: END IF;
4055:
4056: x_return_status := fnd_api.g_ret_sts_success;
4057:
4058: -- Standard Commit.
4059: IF fnd_api.to_boolean (p_commit)
4060: THEN

Line 4059: IF fnd_api.to_boolean (p_commit)

4055:
4056: x_return_status := fnd_api.g_ret_sts_success;
4057:
4058: -- Standard Commit.
4059: IF fnd_api.to_boolean (p_commit)
4060: THEN
4061: COMMIT WORK;
4062: END IF;
4063:

Line 4067: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

4063:
4064: --
4065: -- Standard call to get message count and if count is 1, get message info.
4066: --
4067: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4068: -- End of Delete Plan Element
4069: EXCEPTION
4070: WHEN fnd_api.g_exc_error
4071: THEN

Line 4070: WHEN fnd_api.g_exc_error

4066: --
4067: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4068: -- End of Delete Plan Element
4069: EXCEPTION
4070: WHEN fnd_api.g_exc_error
4071: THEN
4072: ROLLBACK TO delete_plan_element;
4073: x_return_status := fnd_api.g_ret_sts_error;
4074: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

Line 4073: x_return_status := fnd_api.g_ret_sts_error;

4069: EXCEPTION
4070: WHEN fnd_api.g_exc_error
4071: THEN
4072: ROLLBACK TO delete_plan_element;
4073: x_return_status := fnd_api.g_ret_sts_error;
4074: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4075: WHEN fnd_api.g_exc_unexpected_error
4076: THEN
4077: ROLLBACK TO delete_plan_element;

Line 4074: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

4070: WHEN fnd_api.g_exc_error
4071: THEN
4072: ROLLBACK TO delete_plan_element;
4073: x_return_status := fnd_api.g_ret_sts_error;
4074: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4075: WHEN fnd_api.g_exc_unexpected_error
4076: THEN
4077: ROLLBACK TO delete_plan_element;
4078: x_loading_status := 'UNEXPECTED_ERR';

Line 4075: WHEN fnd_api.g_exc_unexpected_error

4071: THEN
4072: ROLLBACK TO delete_plan_element;
4073: x_return_status := fnd_api.g_ret_sts_error;
4074: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4075: WHEN fnd_api.g_exc_unexpected_error
4076: THEN
4077: ROLLBACK TO delete_plan_element;
4078: x_loading_status := 'UNEXPECTED_ERR';
4079: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 4079: x_return_status := fnd_api.g_ret_sts_unexp_error;

4075: WHEN fnd_api.g_exc_unexpected_error
4076: THEN
4077: ROLLBACK TO delete_plan_element;
4078: x_loading_status := 'UNEXPECTED_ERR';
4079: x_return_status := fnd_api.g_ret_sts_unexp_error;
4080: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4081: WHEN OTHERS
4082: THEN
4083: ROLLBACK TO delete_plan_element;

Line 4080: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

4076: THEN
4077: ROLLBACK TO delete_plan_element;
4078: x_loading_status := 'UNEXPECTED_ERR';
4079: x_return_status := fnd_api.g_ret_sts_unexp_error;
4080: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4081: WHEN OTHERS
4082: THEN
4083: ROLLBACK TO delete_plan_element;
4084: x_loading_status := 'UNEXPECTED_ERR';

Line 4085: x_return_status := fnd_api.g_ret_sts_unexp_error;

4081: WHEN OTHERS
4082: THEN
4083: ROLLBACK TO delete_plan_element;
4084: x_loading_status := 'UNEXPECTED_ERR';
4085: x_return_status := fnd_api.g_ret_sts_unexp_error;
4086:
4087: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
4088: THEN
4089: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 4092: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

4088: THEN
4089: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
4090: END IF;
4091:
4092: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4093: END delete_plan_element;
4094:
4095: -- -------------------------------------------------------------------------+
4096: -- | Procedure: Get_Plan_Element

Line 4104: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,

4100: -- | Quota name and Pass it back to the calling Place.
4101: -- -------------------------------------------------------------------------+
4102: PROCEDURE get_plan_element (
4103: p_api_version IN NUMBER,
4104: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
4105: p_commit IN VARCHAR2 := fnd_api.g_false,
4106: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
4107: x_return_status OUT NOCOPY VARCHAR2,
4108: x_msg_count OUT NOCOPY NUMBER,

Line 4105: p_commit IN VARCHAR2 := fnd_api.g_false,

4101: -- -------------------------------------------------------------------------+
4102: PROCEDURE get_plan_element (
4103: p_api_version IN NUMBER,
4104: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
4105: p_commit IN VARCHAR2 := fnd_api.g_false,
4106: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
4107: x_return_status OUT NOCOPY VARCHAR2,
4108: x_msg_count OUT NOCOPY NUMBER,
4109: x_msg_data OUT NOCOPY VARCHAR2,

Line 4106: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,

4102: PROCEDURE get_plan_element (
4103: p_api_version IN NUMBER,
4104: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
4105: p_commit IN VARCHAR2 := fnd_api.g_false,
4106: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
4107: x_return_status OUT NOCOPY VARCHAR2,
4108: x_msg_count OUT NOCOPY NUMBER,
4109: x_msg_data OUT NOCOPY VARCHAR2,
4110: p_plan_element_name IN cn_quotas.NAME%TYPE,

Line 4363: IF NOT fnd_api.compatible_api_call (p_api_version, p_api_version, l_api_name, g_pkg_name)

4359: -- Standard Start of API savepoint
4360: SAVEPOINT get_plan_element;
4361:
4362: -- Standard call to check for call compatibility.
4363: IF NOT fnd_api.compatible_api_call (p_api_version, p_api_version, l_api_name, g_pkg_name)
4364: THEN
4365: RAISE fnd_api.g_exc_unexpected_error;
4366: END IF;
4367:

Line 4365: RAISE fnd_api.g_exc_unexpected_error;

4361:
4362: -- Standard call to check for call compatibility.
4363: IF NOT fnd_api.compatible_api_call (p_api_version, p_api_version, l_api_name, g_pkg_name)
4364: THEN
4365: RAISE fnd_api.g_exc_unexpected_error;
4366: END IF;
4367:
4368: -- Initialize message list if p_init_msg_list is set to TRUE.
4369: IF fnd_api.to_boolean (p_init_msg_list)

Line 4369: IF fnd_api.to_boolean (p_init_msg_list)

4365: RAISE fnd_api.g_exc_unexpected_error;
4366: END IF;
4367:
4368: -- Initialize message list if p_init_msg_list is set to TRUE.
4369: IF fnd_api.to_boolean (p_init_msg_list)
4370: THEN
4371: fnd_msg_pub.initialize;
4372: END IF;
4373:

Line 4375: x_return_status := fnd_api.g_ret_sts_success;

4371: fnd_msg_pub.initialize;
4372: END IF;
4373:
4374: -- Initialize API return status to success
4375: x_return_status := fnd_api.g_ret_sts_success;
4376: x_loading_status := 'CN_RETURNED';
4377: -- API body
4378: -- Remove the spaces in the Quota name
4379: l_pe_name := LTRIM (RTRIM (p_plan_element_name));

Line 4566: IF fnd_api.to_boolean (p_commit)

4562: CLOSE c_rt_quota_asgns_rec_csr;
4563:
4564: -- End of API body.
4565: -- Standard check of p_commit.
4566: IF fnd_api.to_boolean (p_commit)
4567: THEN
4568: COMMIT WORK;
4569: END IF;
4570:

Line 4574: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

4570:
4571: <>
4572: NULL;
4573: -- Standard call to get message count and if count is 1, get message info.
4574: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4575: -- END get plan element
4576: EXCEPTION
4577: WHEN fnd_api.g_exc_error
4578: THEN

Line 4577: WHEN fnd_api.g_exc_error

4573: -- Standard call to get message count and if count is 1, get message info.
4574: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4575: -- END get plan element
4576: EXCEPTION
4577: WHEN fnd_api.g_exc_error
4578: THEN
4579: ROLLBACK TO get_plan_element;
4580: x_return_status := fnd_api.g_ret_sts_error;
4581: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

Line 4580: x_return_status := fnd_api.g_ret_sts_error;

4576: EXCEPTION
4577: WHEN fnd_api.g_exc_error
4578: THEN
4579: ROLLBACK TO get_plan_element;
4580: x_return_status := fnd_api.g_ret_sts_error;
4581: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4582: WHEN fnd_api.g_exc_unexpected_error
4583: THEN
4584: ROLLBACK TO get_plan_element;

Line 4581: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

4577: WHEN fnd_api.g_exc_error
4578: THEN
4579: ROLLBACK TO get_plan_element;
4580: x_return_status := fnd_api.g_ret_sts_error;
4581: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4582: WHEN fnd_api.g_exc_unexpected_error
4583: THEN
4584: ROLLBACK TO get_plan_element;
4585: x_loading_status := 'UNEXPECTED_ERR';

Line 4582: WHEN fnd_api.g_exc_unexpected_error

4578: THEN
4579: ROLLBACK TO get_plan_element;
4580: x_return_status := fnd_api.g_ret_sts_error;
4581: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4582: WHEN fnd_api.g_exc_unexpected_error
4583: THEN
4584: ROLLBACK TO get_plan_element;
4585: x_loading_status := 'UNEXPECTED_ERR';
4586: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 4586: x_return_status := fnd_api.g_ret_sts_unexp_error;

4582: WHEN fnd_api.g_exc_unexpected_error
4583: THEN
4584: ROLLBACK TO get_plan_element;
4585: x_loading_status := 'UNEXPECTED_ERR';
4586: x_return_status := fnd_api.g_ret_sts_unexp_error;
4587: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4588: WHEN COLLECTION_IS_NULL
4589: THEN
4590: ROLLBACK TO get_plan_element;

Line 4587: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

4583: THEN
4584: ROLLBACK TO get_plan_element;
4585: x_loading_status := 'UNEXPECTED_ERR';
4586: x_return_status := fnd_api.g_ret_sts_unexp_error;
4587: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4588: WHEN COLLECTION_IS_NULL
4589: THEN
4590: ROLLBACK TO get_plan_element;
4591: x_loading_status := 'COLLECTION_IS_NULL';

Line 4592: x_return_status := fnd_api.g_ret_sts_unexp_error;

4588: WHEN COLLECTION_IS_NULL
4589: THEN
4590: ROLLBACK TO get_plan_element;
4591: x_loading_status := 'COLLECTION_IS_NULL';
4592: x_return_status := fnd_api.g_ret_sts_unexp_error;
4593:
4594: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
4595: THEN
4596: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 4599: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

4595: THEN
4596: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
4597: END IF;
4598:
4599: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4600: WHEN NO_DATA_FOUND
4601: THEN
4602: ROLLBACK TO get_plan_element;
4603: x_loading_status := 'NO_DATA_FOUND';

Line 4604: x_return_status := fnd_api.g_ret_sts_unexp_error;

4600: WHEN NO_DATA_FOUND
4601: THEN
4602: ROLLBACK TO get_plan_element;
4603: x_loading_status := 'NO_DATA_FOUND';
4604: x_return_status := fnd_api.g_ret_sts_unexp_error;
4605:
4606: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
4607: THEN
4608: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 4611: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

4607: THEN
4608: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
4609: END IF;
4610:
4611: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4612: WHEN SUBSCRIPT_BEYOND_COUNT
4613: THEN
4614: ROLLBACK TO get_plan_element;
4615: x_loading_status := 'SUBSCRIPT_BEYOND_COUNT';

Line 4616: x_return_status := fnd_api.g_ret_sts_unexp_error;

4612: WHEN SUBSCRIPT_BEYOND_COUNT
4613: THEN
4614: ROLLBACK TO get_plan_element;
4615: x_loading_status := 'SUBSCRIPT_BEYOND_COUNT';
4616: x_return_status := fnd_api.g_ret_sts_unexp_error;
4617:
4618: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
4619: THEN
4620: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 4623: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

4619: THEN
4620: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
4621: END IF;
4622:
4623: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4624: WHEN SUBSCRIPT_OUTSIDE_LIMIT
4625: THEN
4626: ROLLBACK TO get_plan_element;
4627: x_loading_status := 'SUBSCRIPT_OUTSIDE_LIMIT';

Line 4628: x_return_status := fnd_api.g_ret_sts_unexp_error;

4624: WHEN SUBSCRIPT_OUTSIDE_LIMIT
4625: THEN
4626: ROLLBACK TO get_plan_element;
4627: x_loading_status := 'SUBSCRIPT_OUTSIDE_LIMIT';
4628: x_return_status := fnd_api.g_ret_sts_unexp_error;
4629:
4630: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
4631: THEN
4632: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 4635: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

4631: THEN
4632: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
4633: END IF;
4634:
4635: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4636: WHEN OTHERS
4637: THEN
4638: ROLLBACK TO get_plan_element;
4639: x_loading_status := 'UNEXPECTED_ERR';

Line 4640: x_return_status := fnd_api.g_ret_sts_unexp_error;

4636: WHEN OTHERS
4637: THEN
4638: ROLLBACK TO get_plan_element;
4639: x_loading_status := 'UNEXPECTED_ERR';
4640: x_return_status := fnd_api.g_ret_sts_unexp_error;
4641:
4642: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
4643: THEN
4644: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 4647: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

4643: THEN
4644: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
4645: END IF;
4646:
4647: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4648: END get_plan_element;
4649:
4650: -- -------------------------------------------------------------------------+
4651: -- | Procedure: Duplicate_Plan_Element

Line 4698: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)

4694: -- Standard Start of API savepoint
4695: SAVEPOINT duplicate_pe;
4696:
4697: -- Standard call to check for call compatibility.
4698: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
4699: THEN
4700: RAISE fnd_api.g_exc_unexpected_error;
4701: END IF;
4702:

Line 4700: RAISE fnd_api.g_exc_unexpected_error;

4696:
4697: -- Standard call to check for call compatibility.
4698: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
4699: THEN
4700: RAISE fnd_api.g_exc_unexpected_error;
4701: END IF;
4702:
4703: -- Initialize message list if p_init_msg_list is set to TRUE.
4704: IF fnd_api.to_boolean (p_init_msg_list)

Line 4704: IF fnd_api.to_boolean (p_init_msg_list)

4700: RAISE fnd_api.g_exc_unexpected_error;
4701: END IF;
4702:
4703: -- Initialize message list if p_init_msg_list is set to TRUE.
4704: IF fnd_api.to_boolean (p_init_msg_list)
4705: THEN
4706: fnd_msg_pub.initialize;
4707: END IF;
4708:

Line 4710: x_return_status := fnd_api.g_ret_sts_success;

4706: fnd_msg_pub.initialize;
4707: END IF;
4708:
4709: -- Initialize API return status to success
4710: x_return_status := fnd_api.g_ret_sts_success;
4711: x_loading_status := 'CN_INSERTED';
4712:
4713: -- START OF MOAC ORG_ID VALIDATION
4714: l_org_id := p_org_id;

Line 4732: p_commit => fnd_api.g_false,

4728: IF jtf_usr_hks.ok_to_execute ('CN_PLAN_ELEMENT_PUB', 'DUPLICATE_PLAN_ELEMENT', 'B', 'C')
4729: THEN
4730: cn_plan_element_cuhk.duplicate_plan_element_pre (p_api_version => p_api_version,
4731: p_init_msg_list => p_init_msg_list,
4732: p_commit => fnd_api.g_false,
4733: p_validation_level => p_validation_level,
4734: x_return_status => x_return_status,
4735: x_msg_count => x_msg_count,
4736: x_msg_data => x_msg_data,

Line 4742: IF (x_return_status = fnd_api.g_ret_sts_error)

4738: x_plan_element_name => l_x_plan_element_name,
4739: x_loading_status => x_loading_status
4740: );
4741:
4742: IF (x_return_status = fnd_api.g_ret_sts_error)
4743: THEN
4744: RAISE fnd_api.g_exc_error;
4745: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
4746: THEN

Line 4744: RAISE fnd_api.g_exc_error;

4740: );
4741:
4742: IF (x_return_status = fnd_api.g_ret_sts_error)
4743: THEN
4744: RAISE fnd_api.g_exc_error;
4745: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
4746: THEN
4747: RAISE fnd_api.g_exc_unexpected_error;
4748: END IF;

Line 4745: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)

4741:
4742: IF (x_return_status = fnd_api.g_ret_sts_error)
4743: THEN
4744: RAISE fnd_api.g_exc_error;
4745: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
4746: THEN
4747: RAISE fnd_api.g_exc_unexpected_error;
4748: END IF;
4749: END IF;

Line 4747: RAISE fnd_api.g_exc_unexpected_error;

4743: THEN
4744: RAISE fnd_api.g_exc_error;
4745: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
4746: THEN
4747: RAISE fnd_api.g_exc_unexpected_error;
4748: END IF;
4749: END IF;
4750:
4751: IF jtf_usr_hks.ok_to_execute ('CN_PLAN_ELEMENT_PUB', 'DUPLICATE_PLAN_ELEMENT', 'B', 'V')

Line 4755: p_commit => fnd_api.g_false,

4751: IF jtf_usr_hks.ok_to_execute ('CN_PLAN_ELEMENT_PUB', 'DUPLICATE_PLAN_ELEMENT', 'B', 'V')
4752: THEN
4753: cn_plan_element_vuhk.duplicate_plan_element_pre (p_api_version => p_api_version,
4754: p_init_msg_list => p_init_msg_list,
4755: p_commit => fnd_api.g_false,
4756: p_validation_level => p_validation_level,
4757: x_return_status => x_return_status,
4758: x_msg_count => x_msg_count,
4759: x_msg_data => x_msg_data,

Line 4765: IF (x_return_status = fnd_api.g_ret_sts_error)

4761: x_plan_element_name => l_x_plan_element_name,
4762: x_loading_status => x_loading_status
4763: );
4764:
4765: IF (x_return_status = fnd_api.g_ret_sts_error)
4766: THEN
4767: RAISE fnd_api.g_exc_error;
4768: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
4769: THEN

Line 4767: RAISE fnd_api.g_exc_error;

4763: );
4764:
4765: IF (x_return_status = fnd_api.g_ret_sts_error)
4766: THEN
4767: RAISE fnd_api.g_exc_error;
4768: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
4769: THEN
4770: RAISE fnd_api.g_exc_unexpected_error;
4771: END IF;

Line 4768: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)

4764:
4765: IF (x_return_status = fnd_api.g_ret_sts_error)
4766: THEN
4767: RAISE fnd_api.g_exc_error;
4768: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
4769: THEN
4770: RAISE fnd_api.g_exc_unexpected_error;
4771: END IF;
4772: END IF;

Line 4770: RAISE fnd_api.g_exc_unexpected_error;

4766: THEN
4767: RAISE fnd_api.g_exc_error;
4768: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
4769: THEN
4770: RAISE fnd_api.g_exc_unexpected_error;
4771: END IF;
4772: END IF;
4773:
4774: -- Call the Local Procedure get Plan Element to Populate the old

Line 4792: IF (x_return_status <> fnd_api.g_ret_sts_success) OR (x_loading_status = 'CN_PLN_NOT_EXIST')

4788: x_loading_status => x_loading_status
4789: );
4790:
4791: -- IF the Return Status is not success or Plan Element name
4792: IF (x_return_status <> fnd_api.g_ret_sts_success) OR (x_loading_status = 'CN_PLN_NOT_EXIST')
4793: THEN
4794: RAISE fnd_api.g_exc_error;
4795: END IF;
4796:

Line 4794: RAISE fnd_api.g_exc_error;

4790:
4791: -- IF the Return Status is not success or Plan Element name
4792: IF (x_return_status <> fnd_api.g_ret_sts_success) OR (x_loading_status = 'CN_PLN_NOT_EXIST')
4793: THEN
4794: RAISE fnd_api.g_exc_error;
4795: END IF;
4796:
4797: -- Check if the Plan Element name is > 30 Then Raise an Warning
4798: -- Commented the code because of inline copy new behavior

Line 4840: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN

4836: x_msg_count => x_msg_count,
4837: x_msg_data => x_msg_data
4838: );
4839:
4840: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4841: RAISE FND_API.G_EXC_ERROR;
4842: END IF;
4843:
4844: l_plan_element_rec.NAME := l_x_plan_element_name;

Line 4841: RAISE FND_API.G_EXC_ERROR;

4837: x_msg_data => x_msg_data
4838: );
4839:
4840: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
4841: RAISE FND_API.G_EXC_ERROR;
4842: END IF;
4843:
4844: l_plan_element_rec.NAME := l_x_plan_element_name;
4845:

Line 4857: RAISE fnd_api.g_exc_error;

4853: fnd_msg_pub.ADD;
4854: END IF;
4855:
4856: x_loading_status := 'CN_PLN_EXISTS';
4857: RAISE fnd_api.g_exc_error;
4858: END IF;
4859:
4860: -- Call the Create_plan_element Procedure to Create the Plan ELement
4861: create_plan_element (p_api_version => 1.0,

Line 4876: IF (x_loading_status = 'PLN_QUOTA_RULE_FACTORS_NOT_100') AND (x_return_status = fnd_api.g_ret_sts_success)

4872: p_is_duplicate => 'Y'
4873: );
4874:
4875: -- Raise an Error if the Status IS Success
4876: IF (x_loading_status = 'PLN_QUOTA_RULE_FACTORS_NOT_100') AND (x_return_status = fnd_api.g_ret_sts_success)
4877: THEN
4878: l_warning_flag := 'Y';
4879: ELSIF (x_return_status <> fnd_api.g_ret_sts_success) OR (x_loading_status = 'PLN_QUOTA_EXISTS') OR (x_loading_status = 'PLN_QUOTA_REV_EXISTS')
4880: THEN

Line 4879: ELSIF (x_return_status <> fnd_api.g_ret_sts_success) OR (x_loading_status = 'PLN_QUOTA_EXISTS') OR (x_loading_status = 'PLN_QUOTA_REV_EXISTS')

4875: -- Raise an Error if the Status IS Success
4876: IF (x_loading_status = 'PLN_QUOTA_RULE_FACTORS_NOT_100') AND (x_return_status = fnd_api.g_ret_sts_success)
4877: THEN
4878: l_warning_flag := 'Y';
4879: ELSIF (x_return_status <> fnd_api.g_ret_sts_success) OR (x_loading_status = 'PLN_QUOTA_EXISTS') OR (x_loading_status = 'PLN_QUOTA_REV_EXISTS')
4880: THEN
4881: RAISE fnd_api.g_exc_error;
4882: END IF;
4883:

Line 4881: RAISE fnd_api.g_exc_error;

4877: THEN
4878: l_warning_flag := 'Y';
4879: ELSIF (x_return_status <> fnd_api.g_ret_sts_success) OR (x_loading_status = 'PLN_QUOTA_EXISTS') OR (x_loading_status = 'PLN_QUOTA_REV_EXISTS')
4880: THEN
4881: RAISE fnd_api.g_exc_error;
4882: END IF;
4883:
4884: -- Check for the Warning Flag
4885: IF (x_return_status = fnd_api.g_ret_sts_success) AND (x_loading_status = 'CN_INSERTED')

Line 4885: IF (x_return_status = fnd_api.g_ret_sts_success) AND (x_loading_status = 'CN_INSERTED')

4881: RAISE fnd_api.g_exc_error;
4882: END IF;
4883:
4884: -- Check for the Warning Flag
4885: IF (x_return_status = fnd_api.g_ret_sts_success) AND (x_loading_status = 'CN_INSERTED')
4886: OR (x_loading_status = 'PLN_QUOTA_RULE_FACTORS_NOT_100')
4887: THEN
4888: x_loading_status := 'CN_INSERTED';
4889:

Line 4900: p_commit => fnd_api.g_false,

4896: IF jtf_usr_hks.ok_to_execute ('CN_PLAN_ELEMENT_PUB', 'DUPLICATE_PLAN_ELEMENT', 'A', 'V')
4897: THEN
4898: cn_plan_element_vuhk.duplicate_plan_element_post (p_api_version => p_api_version,
4899: p_init_msg_list => p_init_msg_list,
4900: p_commit => fnd_api.g_false,
4901: p_validation_level => p_validation_level,
4902: x_return_status => x_return_status,
4903: x_msg_count => x_msg_count,
4904: x_msg_data => x_msg_data,

Line 4910: IF (x_return_status = fnd_api.g_ret_sts_error)

4906: x_plan_element_name => l_x_plan_element_name,
4907: x_loading_status => x_loading_status
4908: );
4909:
4910: IF (x_return_status = fnd_api.g_ret_sts_error)
4911: THEN
4912: RAISE fnd_api.g_exc_error;
4913: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
4914: THEN

Line 4912: RAISE fnd_api.g_exc_error;

4908: );
4909:
4910: IF (x_return_status = fnd_api.g_ret_sts_error)
4911: THEN
4912: RAISE fnd_api.g_exc_error;
4913: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
4914: THEN
4915: RAISE fnd_api.g_exc_unexpected_error;
4916: END IF;

Line 4913: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)

4909:
4910: IF (x_return_status = fnd_api.g_ret_sts_error)
4911: THEN
4912: RAISE fnd_api.g_exc_error;
4913: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
4914: THEN
4915: RAISE fnd_api.g_exc_unexpected_error;
4916: END IF;
4917: END IF;

Line 4915: RAISE fnd_api.g_exc_unexpected_error;

4911: THEN
4912: RAISE fnd_api.g_exc_error;
4913: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
4914: THEN
4915: RAISE fnd_api.g_exc_unexpected_error;
4916: END IF;
4917: END IF;
4918:
4919: IF jtf_usr_hks.ok_to_execute ('CN_PLAN_ELEMENT_PUB', 'DUPLICATE_PLAN_ELEMENT', 'A', 'C')

Line 4923: p_commit => fnd_api.g_false,

4919: IF jtf_usr_hks.ok_to_execute ('CN_PLAN_ELEMENT_PUB', 'DUPLICATE_PLAN_ELEMENT', 'A', 'C')
4920: THEN
4921: cn_plan_element_cuhk.duplicate_plan_element_post (p_api_version => p_api_version,
4922: p_init_msg_list => p_init_msg_list,
4923: p_commit => fnd_api.g_false,
4924: p_validation_level => p_validation_level,
4925: x_return_status => x_return_status,
4926: x_msg_count => x_msg_count,
4927: x_msg_data => x_msg_data,

Line 4933: IF (x_return_status = fnd_api.g_ret_sts_error)

4929: x_plan_element_name => l_x_plan_element_name,
4930: x_loading_status => x_loading_status
4931: );
4932:
4933: IF (x_return_status = fnd_api.g_ret_sts_error)
4934: THEN
4935: RAISE fnd_api.g_exc_error;
4936: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
4937: THEN

Line 4935: RAISE fnd_api.g_exc_error;

4931: );
4932:
4933: IF (x_return_status = fnd_api.g_ret_sts_error)
4934: THEN
4935: RAISE fnd_api.g_exc_error;
4936: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
4937: THEN
4938: RAISE fnd_api.g_exc_unexpected_error;
4939: END IF;

Line 4936: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)

4932:
4933: IF (x_return_status = fnd_api.g_ret_sts_error)
4934: THEN
4935: RAISE fnd_api.g_exc_error;
4936: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
4937: THEN
4938: RAISE fnd_api.g_exc_unexpected_error;
4939: END IF;
4940: END IF;

Line 4938: RAISE fnd_api.g_exc_unexpected_error;

4934: THEN
4935: RAISE fnd_api.g_exc_error;
4936: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
4937: THEN
4938: RAISE fnd_api.g_exc_unexpected_error;
4939: END IF;
4940: END IF;
4941:
4942: -- x_plan_element_name := l_x_plan_element_name;

Line 4964: IF (x_return_status = fnd_api.g_ret_sts_error)

4960: p_oai_array => l_oai_array,
4961: x_return_code => x_return_status
4962: );
4963:
4964: IF (x_return_status = fnd_api.g_ret_sts_error)
4965: THEN
4966: RAISE fnd_api.g_exc_error;
4967: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
4968: THEN

Line 4966: RAISE fnd_api.g_exc_error;

4962: );
4963:
4964: IF (x_return_status = fnd_api.g_ret_sts_error)
4965: THEN
4966: RAISE fnd_api.g_exc_error;
4967: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
4968: THEN
4969: RAISE fnd_api.g_exc_unexpected_error;
4970: END IF;

Line 4967: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)

4963:
4964: IF (x_return_status = fnd_api.g_ret_sts_error)
4965: THEN
4966: RAISE fnd_api.g_exc_error;
4967: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
4968: THEN
4969: RAISE fnd_api.g_exc_unexpected_error;
4970: END IF;
4971: END IF;

Line 4969: RAISE fnd_api.g_exc_unexpected_error;

4965: THEN
4966: RAISE fnd_api.g_exc_error;
4967: ELSIF (x_return_status = fnd_api.g_ret_sts_unexp_error)
4968: THEN
4969: RAISE fnd_api.g_exc_unexpected_error;
4970: END IF;
4971: END IF;
4972: END IF;
4973:

Line 4974: x_return_status := fnd_api.g_ret_sts_success;

4970: END IF;
4971: END IF;
4972: END IF;
4973:
4974: x_return_status := fnd_api.g_ret_sts_success;
4975:
4976: -- End of API body.
4977: -- Standard check of p_commit.
4978: IF fnd_api.to_boolean (p_commit)

Line 4978: IF fnd_api.to_boolean (p_commit)

4974: x_return_status := fnd_api.g_ret_sts_success;
4975:
4976: -- End of API body.
4977: -- Standard check of p_commit.
4978: IF fnd_api.to_boolean (p_commit)
4979: THEN
4980: COMMIT WORK;
4981: END IF;
4982:

Line 4984: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

4980: COMMIT WORK;
4981: END IF;
4982:
4983: -- Standard call to get message count and if count is 1, get message info.
4984: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4985: -- End of Duplicate Plan ELement
4986: EXCEPTION
4987: WHEN fnd_api.g_exc_error
4988: THEN

Line 4987: WHEN fnd_api.g_exc_error

4983: -- Standard call to get message count and if count is 1, get message info.
4984: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4985: -- End of Duplicate Plan ELement
4986: EXCEPTION
4987: WHEN fnd_api.g_exc_error
4988: THEN
4989: ROLLBACK TO duplicate_pe;
4990: x_return_status := fnd_api.g_ret_sts_error;
4991: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

Line 4990: x_return_status := fnd_api.g_ret_sts_error;

4986: EXCEPTION
4987: WHEN fnd_api.g_exc_error
4988: THEN
4989: ROLLBACK TO duplicate_pe;
4990: x_return_status := fnd_api.g_ret_sts_error;
4991: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4992: WHEN fnd_api.g_exc_unexpected_error
4993: THEN
4994: ROLLBACK TO duplicate_pe;

Line 4991: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

4987: WHEN fnd_api.g_exc_error
4988: THEN
4989: ROLLBACK TO duplicate_pe;
4990: x_return_status := fnd_api.g_ret_sts_error;
4991: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4992: WHEN fnd_api.g_exc_unexpected_error
4993: THEN
4994: ROLLBACK TO duplicate_pe;
4995: x_loading_status := 'UNEXPECTED_ERR';

Line 4992: WHEN fnd_api.g_exc_unexpected_error

4988: THEN
4989: ROLLBACK TO duplicate_pe;
4990: x_return_status := fnd_api.g_ret_sts_error;
4991: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4992: WHEN fnd_api.g_exc_unexpected_error
4993: THEN
4994: ROLLBACK TO duplicate_pe;
4995: x_loading_status := 'UNEXPECTED_ERR';
4996: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 4996: x_return_status := fnd_api.g_ret_sts_unexp_error;

4992: WHEN fnd_api.g_exc_unexpected_error
4993: THEN
4994: ROLLBACK TO duplicate_pe;
4995: x_loading_status := 'UNEXPECTED_ERR';
4996: x_return_status := fnd_api.g_ret_sts_unexp_error;
4997: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4998: WHEN OTHERS
4999: THEN
5000: ROLLBACK TO duplicate_pe;

Line 4997: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

4993: THEN
4994: ROLLBACK TO duplicate_pe;
4995: x_loading_status := 'UNEXPECTED_ERR';
4996: x_return_status := fnd_api.g_ret_sts_unexp_error;
4997: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
4998: WHEN OTHERS
4999: THEN
5000: ROLLBACK TO duplicate_pe;
5001: x_loading_status := 'UNEXPECTED_ERR';

Line 5002: x_return_status := fnd_api.g_ret_sts_unexp_error;

4998: WHEN OTHERS
4999: THEN
5000: ROLLBACK TO duplicate_pe;
5001: x_loading_status := 'UNEXPECTED_ERR';
5002: x_return_status := fnd_api.g_ret_sts_unexp_error;
5003:
5004: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
5005: THEN
5006: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

Line 5009: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

5005: THEN
5006: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
5007: END IF;
5008:
5009: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
5010: END duplicate_plan_element;
5011: END cn_plan_element_pub;