DBA Data[Home] [Help]

APPS.CN_QUOTA_RULES_GRP dependencies on FND_API

Line 29: x_return_status := fnd_api.g_ret_sts_success;

25: RETURN cn_chk_plan_element_pkg.pe_rec_type
26: IS
27: l_pe_rec cn_chk_plan_element_pkg.pe_rec_type := cn_chk_plan_element_pkg.g_miss_pe_rec;
28: BEGIN
29: x_return_status := fnd_api.g_ret_sts_success;
30: x_loading_status := p_loading_status;
31: l_pe_rec.NAME := LTRIM (RTRIM (p_quota_name));
32: l_pe_rec.org_id := p_revenue_class_rec.org_id;
33: l_pe_rec.rev_class_name := LTRIM (RTRIM (p_revenue_class_rec.rev_class_name));

Line 53: RAISE fnd_api.g_exc_error;

49: fnd_msg_pub.ADD;
50: END IF;
51:
52: x_loading_status := 'CN_PLN_NOT_EXIST';
53: RAISE fnd_api.g_exc_error;
54: END;
55:
56: -- Set the Default Rev Class Target
57: SELECT DECODE (p_revenue_class_rec.rev_class_target, fnd_api.g_miss_num, 0, NULL, 0, p_revenue_class_rec.rev_class_target)

Line 57: SELECT DECODE (p_revenue_class_rec.rev_class_target, fnd_api.g_miss_num, 0, NULL, 0, p_revenue_class_rec.rev_class_target)

53: RAISE fnd_api.g_exc_error;
54: END;
55:
56: -- Set the Default Rev Class Target
57: SELECT DECODE (p_revenue_class_rec.rev_class_target, fnd_api.g_miss_num, 0, NULL, 0, p_revenue_class_rec.rev_class_target)
58: INTO l_pe_rec.rev_class_target
59: FROM SYS.DUAL;
60:
61: -- Set the Default value for Payment Amount

Line 62: SELECT DECODE (p_revenue_class_rec.rev_class_payment_amount, fnd_api.g_miss_num, 0, NULL, 0, p_revenue_class_rec.rev_class_payment_amount)

58: INTO l_pe_rec.rev_class_target
59: FROM SYS.DUAL;
60:
61: -- Set the Default value for Payment Amount
62: SELECT DECODE (p_revenue_class_rec.rev_class_payment_amount, fnd_api.g_miss_num, 0, NULL, 0, p_revenue_class_rec.rev_class_payment_amount)
63: INTO l_pe_rec.rev_class_payment_amount
64: FROM SYS.DUAL;
65:
66: -- Set the Default Value for Performance Goal

Line 67: SELECT DECODE (p_revenue_class_rec.rev_class_performance_goal, fnd_api.g_miss_num, 0, NULL, 0, p_revenue_class_rec.rev_class_performance_goal)

63: INTO l_pe_rec.rev_class_payment_amount
64: FROM SYS.DUAL;
65:
66: -- Set the Default Value for Performance Goal
67: SELECT DECODE (p_revenue_class_rec.rev_class_performance_goal, fnd_api.g_miss_num, 0, NULL, 0, p_revenue_class_rec.rev_class_performance_goal)
68: INTO l_pe_rec.rev_class_performance_goal
69: FROM SYS.DUAL;
70:
71: RETURN l_pe_rec;

Line 94: x_return_status := fnd_api.g_ret_sts_success;

90: l_same_pe NUMBER;
91: l_loading_status VARCHAR2 (80);
92: BEGIN
93: -- Initialize API return status to success
94: x_return_status := fnd_api.g_ret_sts_success;
95: x_loading_status := p_loading_status;
96:
97: -- API body
98: -- check for required data in Quotas.

Line 105: ) = fnd_api.g_true

101: p_para_name => cn_chk_plan_element_pkg.g_pe_name,
102: p_loading_status => x_loading_status,
103: x_loading_status => l_loading_status
104: )
105: ) = fnd_api.g_true
106: )
107: THEN
108: RAISE fnd_api.g_exc_error;
109: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_pe_rec.NAME,

Line 108: RAISE fnd_api.g_exc_error;

104: )
105: ) = fnd_api.g_true
106: )
107: THEN
108: RAISE fnd_api.g_exc_error;
109: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_pe_rec.NAME,
110: p_obj_name => cn_chk_plan_element_pkg.g_pe_name,
111: p_loading_status => x_loading_status,
112: x_loading_status => l_loading_status

Line 114: ) = fnd_api.g_true

110: p_obj_name => cn_chk_plan_element_pkg.g_pe_name,
111: p_loading_status => x_loading_status,
112: x_loading_status => l_loading_status
113: )
114: ) = fnd_api.g_true
115: )
116: THEN
117: RAISE fnd_api.g_exc_error;
118: END IF;

Line 117: RAISE fnd_api.g_exc_error;

113: )
114: ) = fnd_api.g_true
115: )
116: THEN
117: RAISE fnd_api.g_exc_error;
118: END IF;
119:
120: -- Check rev class name is not miss, not null
121: IF ((cn_api.chk_miss_char_para (p_char_para => p_pe_rec.rev_class_name,

Line 126: ) = fnd_api.g_true

122: p_para_name => cn_chk_plan_element_pkg.g_rev_cls_name,
123: p_loading_status => x_loading_status,
124: x_loading_status => l_loading_status
125: )
126: ) = fnd_api.g_true
127: )
128: THEN
129: RAISE fnd_api.g_exc_error;
130: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_pe_rec.rev_class_name,

Line 129: RAISE fnd_api.g_exc_error;

125: )
126: ) = fnd_api.g_true
127: )
128: THEN
129: RAISE fnd_api.g_exc_error;
130: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_pe_rec.rev_class_name,
131: p_obj_name => cn_chk_plan_element_pkg.g_rev_cls_name,
132: p_loading_status => x_loading_status,
133: x_loading_status => l_loading_status

Line 135: ) = fnd_api.g_true

131: p_obj_name => cn_chk_plan_element_pkg.g_rev_cls_name,
132: p_loading_status => x_loading_status,
133: x_loading_status => l_loading_status
134: )
135: ) = fnd_api.g_true
136: )
137: THEN
138: RAISE fnd_api.g_exc_error;
139: END IF;

Line 138: RAISE fnd_api.g_exc_error;

134: )
135: ) = fnd_api.g_true
136: )
137: THEN
138: RAISE fnd_api.g_exc_error;
139: END IF;
140:
141: --+
142: -- Check wheather revenue class allowed for this Quota Type.

Line 158: RAISE fnd_api.g_exc_error;

154: fnd_msg_pub.ADD;
155: END IF;
156:
157: x_loading_status := 'CN_CANNOT_HAVE_REV_CLASS';
158: RAISE fnd_api.g_exc_error;
159: END IF;
160:
161: --+
162: -- Check the revenue class name is exists in the Database.

Line 173: RAISE fnd_api.g_exc_error;

169: fnd_msg_pub.ADD;
170: END IF;
171:
172: x_loading_status := 'CN_REV_CLASS_NOT_EXIST';
173: RAISE fnd_api.g_exc_error;
174: END IF;
175:
176: --+
177: -- Check for Duplicate Record for the Same Quota.

Line 207: WHEN fnd_api.g_exc_error

203: END IF;
204: END IF;
205: -- end of valid quota rules
206: EXCEPTION
207: WHEN fnd_api.g_exc_error
208: THEN
209: x_return_status := fnd_api.g_ret_sts_error;
210: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
211: WHEN fnd_api.g_exc_unexpected_error

Line 209: x_return_status := fnd_api.g_ret_sts_error;

205: -- end of valid quota rules
206: EXCEPTION
207: WHEN fnd_api.g_exc_error
208: THEN
209: x_return_status := fnd_api.g_ret_sts_error;
210: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
211: WHEN fnd_api.g_exc_unexpected_error
212: THEN
213: x_return_status := fnd_api.g_ret_sts_unexp_error;

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

206: EXCEPTION
207: WHEN fnd_api.g_exc_error
208: THEN
209: x_return_status := fnd_api.g_ret_sts_error;
210: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
211: WHEN fnd_api.g_exc_unexpected_error
212: THEN
213: x_return_status := fnd_api.g_ret_sts_unexp_error;
214: x_loading_status := 'UNEXPECTED_ERR';

Line 211: WHEN fnd_api.g_exc_unexpected_error

207: WHEN fnd_api.g_exc_error
208: THEN
209: x_return_status := fnd_api.g_ret_sts_error;
210: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
211: WHEN fnd_api.g_exc_unexpected_error
212: THEN
213: x_return_status := fnd_api.g_ret_sts_unexp_error;
214: x_loading_status := 'UNEXPECTED_ERR';
215: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

Line 213: x_return_status := fnd_api.g_ret_sts_unexp_error;

209: x_return_status := fnd_api.g_ret_sts_error;
210: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
211: WHEN fnd_api.g_exc_unexpected_error
212: THEN
213: x_return_status := fnd_api.g_ret_sts_unexp_error;
214: x_loading_status := 'UNEXPECTED_ERR';
215: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
216: WHEN OTHERS
217: THEN

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

211: WHEN fnd_api.g_exc_unexpected_error
212: THEN
213: x_return_status := fnd_api.g_ret_sts_unexp_error;
214: x_loading_status := 'UNEXPECTED_ERR';
215: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
216: WHEN OTHERS
217: THEN
218: x_return_status := fnd_api.g_ret_sts_unexp_error;
219: x_loading_status := 'UNEXPECTED_ERR';

Line 218: x_return_status := fnd_api.g_ret_sts_unexp_error;

214: x_loading_status := 'UNEXPECTED_ERR';
215: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
216: WHEN OTHERS
217: THEN
218: x_return_status := fnd_api.g_ret_sts_unexp_error;
219: x_loading_status := 'UNEXPECTED_ERR';
220:
221: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
222: THEN

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

222: THEN
223: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
224: END IF;
225:
226: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
227: END valid_quota_rules;
228:
229: -- ----------------------------------------------------------------------------+
230: -- Procedure: Check Valid Update

Line 250: x_return_status := fnd_api.g_ret_sts_success;

246: l_same_pe NUMBER;
247: l_loading_status VARCHAR2 (80);
248: BEGIN
249: -- Initialize API return status to success
250: x_return_status := fnd_api.g_ret_sts_success;
251: x_loading_status := p_loading_status;
252: -- get old revenue class id using old revenue class name
253: x_rev_class_id_old := cn_api.get_rev_class_id (p_rev_class_name_old,p_new_pe_rec.org_id);
254:

Line 265: RAISE fnd_api.g_exc_error;

261: fnd_msg_pub.ADD;
262: END IF;
263:
264: x_loading_status := 'REV_CLASS_NOT_ASSIGNED';
265: RAISE fnd_api.g_exc_error;
266: END IF;
267:
268: IF x_rev_class_id_old IS NULL AND p_rev_class_name_old IS NOT NULL
269: THEN

Line 277: RAISE fnd_api.g_exc_error;

273: fnd_msg_pub.ADD;
274: END IF;
275:
276: x_loading_status := 'CN_REV_CLASS_NOT_EXIST';
277: RAISE fnd_api.g_exc_error;
278: END IF;
279:
280: SELECT COUNT (*)
281: INTO l_same_pe

Line 296: RAISE fnd_api.g_exc_error;

292: fnd_msg_pub.ADD;
293: END IF;
294:
295: x_loading_status := 'REV_CLASS_NOT_ASSIGNED';
296: RAISE fnd_api.g_exc_error;
297: END IF;
298:
299: IF p_new_pe_rec.rev_class_id <> NVL (x_rev_class_id_old, 0)
300: THEN

Line 319: RAISE fnd_api.g_exc_error;

315: fnd_msg_pub.ADD;
316: END IF;
317:
318: x_loading_status := 'PLN_QUOTA_REV_EXISTS';
319: RAISE fnd_api.g_exc_error;
320: END IF;
321: END IF;
322:
323: --+

Line 339: RAISE fnd_api.g_exc_error;

335: fnd_msg_pub.ADD;
336: END IF;
337:
338: x_loading_status := 'QUOTA_RULE_NOT_EXIST';
339: RAISE fnd_api.g_exc_error;
340: END IF;
341:
342: -- Default Validations
343: valid_quota_rules (x_return_status => x_return_status,

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

349: x_loading_status => l_loading_status
350: );
351: x_loading_status := l_loading_status;
352:
353: IF (x_return_status <> fnd_api.g_ret_sts_success)
354: THEN
355: RAISE fnd_api.g_exc_error;
356: END IF;
357:

Line 355: RAISE fnd_api.g_exc_error;

351: x_loading_status := l_loading_status;
352:
353: IF (x_return_status <> fnd_api.g_ret_sts_success)
354: THEN
355: RAISE fnd_api.g_exc_error;
356: END IF;
357:
358: -- End of API body.
359: -- Standard call to get message count and if count is 1, get message info.

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

356: END IF;
357:
358: -- End of API body.
359: -- Standard call to get message count and if count is 1, get message info.
360: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
361: EXCEPTION
362: WHEN fnd_api.g_exc_error
363: THEN
364: x_return_status := fnd_api.g_ret_sts_error;

Line 362: WHEN fnd_api.g_exc_error

358: -- End of API body.
359: -- Standard call to get message count and if count is 1, get message info.
360: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
361: EXCEPTION
362: WHEN fnd_api.g_exc_error
363: THEN
364: x_return_status := fnd_api.g_ret_sts_error;
365: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
366: WHEN fnd_api.g_exc_unexpected_error

Line 364: x_return_status := fnd_api.g_ret_sts_error;

360: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
361: EXCEPTION
362: WHEN fnd_api.g_exc_error
363: THEN
364: x_return_status := fnd_api.g_ret_sts_error;
365: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
366: WHEN fnd_api.g_exc_unexpected_error
367: THEN
368: x_return_status := fnd_api.g_ret_sts_unexp_error;

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

361: EXCEPTION
362: WHEN fnd_api.g_exc_error
363: THEN
364: x_return_status := fnd_api.g_ret_sts_error;
365: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
366: WHEN fnd_api.g_exc_unexpected_error
367: THEN
368: x_return_status := fnd_api.g_ret_sts_unexp_error;
369: l_loading_status := 'UNEXPECTED_ERR';

Line 366: WHEN fnd_api.g_exc_unexpected_error

362: WHEN fnd_api.g_exc_error
363: THEN
364: x_return_status := fnd_api.g_ret_sts_error;
365: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
366: WHEN fnd_api.g_exc_unexpected_error
367: THEN
368: x_return_status := fnd_api.g_ret_sts_unexp_error;
369: l_loading_status := 'UNEXPECTED_ERR';
370: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

Line 368: x_return_status := fnd_api.g_ret_sts_unexp_error;

364: x_return_status := fnd_api.g_ret_sts_error;
365: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
366: WHEN fnd_api.g_exc_unexpected_error
367: THEN
368: x_return_status := fnd_api.g_ret_sts_unexp_error;
369: l_loading_status := 'UNEXPECTED_ERR';
370: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
371: WHEN OTHERS
372: THEN

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

366: WHEN fnd_api.g_exc_unexpected_error
367: THEN
368: x_return_status := fnd_api.g_ret_sts_unexp_error;
369: l_loading_status := 'UNEXPECTED_ERR';
370: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
371: WHEN OTHERS
372: THEN
373: x_return_status := fnd_api.g_ret_sts_unexp_error;
374: x_loading_status := 'UNEXPECTED_ERR';

Line 373: x_return_status := fnd_api.g_ret_sts_unexp_error;

369: l_loading_status := 'UNEXPECTED_ERR';
370: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
371: WHEN OTHERS
372: THEN
373: x_return_status := fnd_api.g_ret_sts_unexp_error;
374: x_loading_status := 'UNEXPECTED_ERR';
375:
376: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
377: THEN

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

377: THEN
378: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
379: END IF;
380:
381: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
382: END check_valid_update;
383:
384: --|/*-----------------------------------------------------------------------+
385: --| Procedure Name: Create_Quota_Rules

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

386: --| Descr: Create a Quota Rules
387: --|----------------------------------------------------------------------- */
388: PROCEDURE create_quota_rules (
389: p_api_version IN NUMBER,
390: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
391: p_commit IN VARCHAR2 := fnd_api.g_false,
392: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
393: x_return_status OUT NOCOPY VARCHAR2,
394: x_msg_count OUT NOCOPY NUMBER,

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

387: --|----------------------------------------------------------------------- */
388: PROCEDURE create_quota_rules (
389: p_api_version IN NUMBER,
390: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
391: p_commit IN VARCHAR2 := fnd_api.g_false,
392: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
393: x_return_status OUT NOCOPY VARCHAR2,
394: x_msg_count OUT NOCOPY NUMBER,
395: x_msg_data OUT NOCOPY VARCHAR2,

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

388: PROCEDURE create_quota_rules (
389: p_api_version IN NUMBER,
390: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
391: p_commit IN VARCHAR2 := fnd_api.g_false,
392: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
393: x_return_status OUT NOCOPY VARCHAR2,
394: x_msg_count OUT NOCOPY NUMBER,
395: x_msg_data OUT NOCOPY VARCHAR2,
396: p_quota_name IN VARCHAR2,

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

416:
417: --+
418: -- Standard call to check for call compatibility.
419: --+
420: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
421: THEN
422: RAISE fnd_api.g_exc_unexpected_error;
423: END IF;
424:

Line 422: RAISE fnd_api.g_exc_unexpected_error;

418: -- Standard call to check for call compatibility.
419: --+
420: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
421: THEN
422: RAISE fnd_api.g_exc_unexpected_error;
423: END IF;
424:
425: --+
426: -- Initialize message list if p_init_msg_list is set to TRUE.

Line 428: IF fnd_api.to_boolean (p_init_msg_list)

424:
425: --+
426: -- Initialize message list if p_init_msg_list is set to TRUE.
427: -- +
428: IF fnd_api.to_boolean (p_init_msg_list)
429: THEN
430: fnd_msg_pub.initialize;
431: END IF;
432:

Line 436: x_return_status := fnd_api.g_ret_sts_success;

432:
433: -- +
434: -- Initialize API return status to success
435: --+
436: x_return_status := fnd_api.g_ret_sts_success;
437: x_loading_status := 'CN_INSERTED';
438:
439: -- +
440: -- API body

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

454: x_loading_status => l_loading_status
455: );
456: x_loading_status := l_loading_status;
457:
458: IF (x_return_status <> fnd_api.g_ret_sts_success)
459: THEN
460: RAISE fnd_api.g_exc_error;
461: END IF;
462:

Line 460: RAISE fnd_api.g_exc_error;

456: x_loading_status := l_loading_status;
457:
458: IF (x_return_status <> fnd_api.g_ret_sts_success)
459: THEN
460: RAISE fnd_api.g_exc_error;
461: END IF;
462:
463: -- Validate Quota Rules
464: valid_quota_rules (x_return_status => x_return_status,

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

469: x_loading_status => l_loading_status
470: );
471: x_loading_status := l_loading_status;
472:
473: IF (x_return_status <> fnd_api.g_ret_sts_success)
474: THEN
475: RAISE fnd_api.g_exc_error;
476: END IF;
477:

Line 475: RAISE fnd_api.g_exc_error;

471: x_loading_status := l_loading_status;
472:
473: IF (x_return_status <> fnd_api.g_ret_sts_success)
474: THEN
475: RAISE fnd_api.g_exc_error;
476: END IF;
477:
478: -- Check not required if already exists in the database
479: -- Already passed the validation while insert the record

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

494: -- then inser the Quota Rules, Insert the trx
495: --ELSE Record Already exists, but Trx count > 0
496: -- Update trx factors
497: -- EXLSE Record Already Exists
498: IF (x_return_status <> fnd_api.g_ret_sts_success)
499: THEN
500: RAISE fnd_api.g_exc_error;
501: ELSIF (x_return_status = fnd_api.g_ret_sts_success) AND (x_loading_status = 'CN_INSERTED')
502: THEN

Line 500: RAISE fnd_api.g_exc_error;

496: -- Update trx factors
497: -- EXLSE Record Already Exists
498: IF (x_return_status <> fnd_api.g_ret_sts_success)
499: THEN
500: RAISE fnd_api.g_exc_error;
501: ELSIF (x_return_status = fnd_api.g_ret_sts_success) AND (x_loading_status = 'CN_INSERTED')
502: THEN
503: IF l_pe_rec.incentive_type_code IN ('COMMISSION', 'BONUS')
504: THEN

Line 501: ELSIF (x_return_status = fnd_api.g_ret_sts_success) AND (x_loading_status = 'CN_INSERTED')

497: -- EXLSE Record Already Exists
498: IF (x_return_status <> fnd_api.g_ret_sts_success)
499: THEN
500: RAISE fnd_api.g_exc_error;
501: ELSIF (x_return_status = fnd_api.g_ret_sts_success) AND (x_loading_status = 'CN_INSERTED')
502: THEN
503: IF l_pe_rec.incentive_type_code IN ('COMMISSION', 'BONUS')
504: THEN
505: cn_quota_rules_pkg.begin_record (x_operation => 'INSERT',

Line 550: RAISE fnd_api.g_exc_error;

546: fnd_msg_pub.ADD;
547: END IF;
548:
549: x_loading_status := 'CN_TRX_TYPE_NOT_EXISTS';
550: RAISE fnd_api.g_exc_error;
551: END IF;
552:
553: UPDATE cn_trx_factors
554: SET event_factor = p_trx_factor_rec_tbl (i).event_factor

Line 575: IF (x_return_status <> fnd_api.g_ret_sts_success) OR x_loading_status <> 'CN_INSERTED'

571: x_loading_status => l_loading_status
572: );
573: x_loading_status := l_loading_status;
574:
575: IF (x_return_status <> fnd_api.g_ret_sts_success) OR x_loading_status <> 'CN_INSERTED'
576: THEN
577: RAISE fnd_api.g_exc_error;
578: END IF;
579: END IF; -- end (p_trx_factor_rec_tbl.COUNT <> 0)

Line 577: RAISE fnd_api.g_exc_error;

573: x_loading_status := l_loading_status;
574:
575: IF (x_return_status <> fnd_api.g_ret_sts_success) OR x_loading_status <> 'CN_INSERTED'
576: THEN
577: RAISE fnd_api.g_exc_error;
578: END IF;
579: END IF; -- end (p_trx_factor_rec_tbl.COUNT <> 0)
580: END IF; -- Element_type COMMISSION, BONUES
581: ELSIF (x_loading_status = 'PLN_QUOTA_REV_EXISTS')

Line 585: RAISE fnd_api.g_exc_error;

581: ELSIF (x_loading_status = 'PLN_QUOTA_REV_EXISTS')
582: THEN
583: IF (p_trx_factor_rec_tbl.COUNT = 0 AND p_rev_uplift_rec_tbl.COUNT = 0)
584: THEN
585: RAISE fnd_api.g_exc_error;
586: ELSIF p_trx_factor_rec_tbl.COUNT <> 0
587: THEN
588: -- Custom trx factors it means we need to update
589: -- exisiting trx factors.

Line 602: IF fnd_api.to_boolean (p_commit)

598: END IF; -- Table Count is Not Zero
599:
600: -- End of API body.
601: -- Standard check of p_commit.
602: IF fnd_api.to_boolean (p_commit)
603: THEN
604: COMMIT WORK;
605: END IF;
606:

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

606:
607: --+
608: -- Standard call to get message count and if count is 1, get message info.
609: --+
610: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
611: EXCEPTION
612: WHEN fnd_api.g_exc_error
613: THEN
614: ROLLBACK TO create_plan_element;

Line 612: WHEN fnd_api.g_exc_error

608: -- Standard call to get message count and if count is 1, get message info.
609: --+
610: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
611: EXCEPTION
612: WHEN fnd_api.g_exc_error
613: THEN
614: ROLLBACK TO create_plan_element;
615: x_return_status := fnd_api.g_ret_sts_error;
616: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

Line 615: x_return_status := fnd_api.g_ret_sts_error;

611: EXCEPTION
612: WHEN fnd_api.g_exc_error
613: THEN
614: ROLLBACK TO create_plan_element;
615: x_return_status := fnd_api.g_ret_sts_error;
616: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
617: WHEN fnd_api.g_exc_unexpected_error
618: THEN
619: ROLLBACK TO create_plan_element;

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

612: WHEN fnd_api.g_exc_error
613: THEN
614: ROLLBACK TO create_plan_element;
615: x_return_status := fnd_api.g_ret_sts_error;
616: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
617: WHEN fnd_api.g_exc_unexpected_error
618: THEN
619: ROLLBACK TO create_plan_element;
620: x_loading_status := 'UNEXPECTED_ERR';

Line 617: WHEN fnd_api.g_exc_unexpected_error

613: THEN
614: ROLLBACK TO create_plan_element;
615: x_return_status := fnd_api.g_ret_sts_error;
616: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
617: WHEN fnd_api.g_exc_unexpected_error
618: THEN
619: ROLLBACK TO create_plan_element;
620: x_loading_status := 'UNEXPECTED_ERR';
621: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 621: x_return_status := fnd_api.g_ret_sts_unexp_error;

617: WHEN fnd_api.g_exc_unexpected_error
618: THEN
619: ROLLBACK TO create_plan_element;
620: x_loading_status := 'UNEXPECTED_ERR';
621: x_return_status := fnd_api.g_ret_sts_unexp_error;
622: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
623: WHEN OTHERS
624: THEN
625: ROLLBACK TO create_plan_element;

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

618: THEN
619: ROLLBACK TO create_plan_element;
620: x_loading_status := 'UNEXPECTED_ERR';
621: x_return_status := fnd_api.g_ret_sts_unexp_error;
622: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
623: WHEN OTHERS
624: THEN
625: ROLLBACK TO create_plan_element;
626: x_loading_status := 'UNEXPECTED_ERR';

Line 627: x_return_status := fnd_api.g_ret_sts_unexp_error;

623: WHEN OTHERS
624: THEN
625: ROLLBACK TO create_plan_element;
626: x_loading_status := 'UNEXPECTED_ERR';
627: x_return_status := fnd_api.g_ret_sts_unexp_error;
628:
629: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
630: THEN
631: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

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

630: THEN
631: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
632: END IF;
633:
634: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
635: END create_quota_rules;
636:
637: --|-------------------------------------------------------------------------+
638: --| Procedure Name: Update_Quota_Rules

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

639: --| Descr: Update a Quota Rules
640: --|-------------------------------------------------------------------------+
641: PROCEDURE update_quota_rules (
642: p_api_version IN NUMBER,
643: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
644: p_commit IN VARCHAR2 := fnd_api.g_false,
645: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
646: x_return_status OUT NOCOPY VARCHAR2,
647: x_msg_count OUT NOCOPY NUMBER,

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

640: --|-------------------------------------------------------------------------+
641: PROCEDURE update_quota_rules (
642: p_api_version IN NUMBER,
643: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
644: p_commit IN VARCHAR2 := fnd_api.g_false,
645: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
646: x_return_status OUT NOCOPY VARCHAR2,
647: x_msg_count OUT NOCOPY NUMBER,
648: x_msg_data OUT NOCOPY VARCHAR2,

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

641: PROCEDURE update_quota_rules (
642: p_api_version IN NUMBER,
643: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
644: p_commit IN VARCHAR2 := fnd_api.g_false,
645: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
646: x_return_status OUT NOCOPY VARCHAR2,
647: x_msg_count OUT NOCOPY NUMBER,
648: x_msg_data OUT NOCOPY VARCHAR2,
649: p_quota_name IN VARCHAR2,

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

668:
669: --+
670: -- Standard call to check for call compatibility.
671: --+
672: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
673: THEN
674: RAISE fnd_api.g_exc_unexpected_error;
675: END IF;
676:

Line 674: RAISE fnd_api.g_exc_unexpected_error;

670: -- Standard call to check for call compatibility.
671: --+
672: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
673: THEN
674: RAISE fnd_api.g_exc_unexpected_error;
675: END IF;
676:
677: --+
678: -- Initialize message list if p_init_msg_list is set to TRUE.

Line 680: IF fnd_api.to_boolean (p_init_msg_list)

676:
677: --+
678: -- Initialize message list if p_init_msg_list is set to TRUE.
679: -- +
680: IF fnd_api.to_boolean (p_init_msg_list)
681: THEN
682: fnd_msg_pub.initialize;
683: END IF;
684:

Line 688: x_return_status := fnd_api.g_ret_sts_success;

684:
685: -- +
686: -- Initialize API return status to success
687: --+
688: x_return_status := fnd_api.g_ret_sts_success;
689: x_loading_status := 'CN_UPDATED';
690:
691: -- +
692: -- API body

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

705: );
706: x_loading_status := l_loading_status;
707:
708: -- if Any Error Raise an Error
709: IF (x_return_status <> fnd_api.g_ret_sts_success)
710: THEN
711: RAISE fnd_api.g_exc_error;
712: END IF;
713:

Line 711: RAISE fnd_api.g_exc_error;

707:
708: -- if Any Error Raise an Error
709: IF (x_return_status <> fnd_api.g_ret_sts_success)
710: THEN
711: RAISE fnd_api.g_exc_error;
712: END IF;
713:
714: -- Check for valid Update
715: check_valid_update (x_return_status => x_return_status,

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

724: );
725: x_loading_status := l_loading_status;
726:
727: -- If not success then Raise an Error
728: IF (x_return_status <> fnd_api.g_ret_sts_success)
729: THEN
730: RAISE fnd_api.g_exc_error;
731: END IF;
732:

Line 730: RAISE fnd_api.g_exc_error;

726:
727: -- If not success then Raise an Error
728: IF (x_return_status <> fnd_api.g_ret_sts_success)
729: THEN
730: RAISE fnd_api.g_exc_error;
731: END IF;
732:
733: --+
734: -- IF you change the Revenue Class check for nested child

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

744: x_loading_status := l_loading_status;
745: END IF;
746:
747: -- if faliure raise an error
748: IF (x_return_status <> fnd_api.g_ret_sts_success)
749: THEN
750: RAISE fnd_api.g_exc_error;
751: END IF;
752:

Line 750: RAISE fnd_api.g_exc_error;

746:
747: -- if faliure raise an error
748: IF (x_return_status <> fnd_api.g_ret_sts_success)
749: THEN
750: RAISE fnd_api.g_exc_error;
751: END IF;
752:
753: IF (x_return_status <> fnd_api.g_ret_sts_success)
754: THEN

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

749: THEN
750: RAISE fnd_api.g_exc_error;
751: END IF;
752:
753: IF (x_return_status <> fnd_api.g_ret_sts_success)
754: THEN
755: RAISE fnd_api.g_exc_error;
756: ELSIF (x_return_status = fnd_api.g_ret_sts_success) AND (x_loading_status = 'CN_UPDATED')
757: THEN

Line 755: RAISE fnd_api.g_exc_error;

751: END IF;
752:
753: IF (x_return_status <> fnd_api.g_ret_sts_success)
754: THEN
755: RAISE fnd_api.g_exc_error;
756: ELSIF (x_return_status = fnd_api.g_ret_sts_success) AND (x_loading_status = 'CN_UPDATED')
757: THEN
758: IF l_pe_rec.incentive_type_code IN ('COMMISSION', 'BONUS')
759: THEN

Line 756: ELSIF (x_return_status = fnd_api.g_ret_sts_success) AND (x_loading_status = 'CN_UPDATED')

752:
753: IF (x_return_status <> fnd_api.g_ret_sts_success)
754: THEN
755: RAISE fnd_api.g_exc_error;
756: ELSIF (x_return_status = fnd_api.g_ret_sts_success) AND (x_loading_status = 'CN_UPDATED')
757: THEN
758: IF l_pe_rec.incentive_type_code IN ('COMMISSION', 'BONUS')
759: THEN
760: cn_quota_rules_pkg.begin_record (x_operation => 'UPDATE',

Line 813: IF (x_return_status <> fnd_api.g_ret_sts_success) OR x_loading_status <> 'CN_UPDATED'

809: x_loading_status := l_loading_status;
810:
811: -- If the status is <> S or if the loading status is changed THEN
812: -- Raise an Error
813: IF (x_return_status <> fnd_api.g_ret_sts_success) OR x_loading_status <> 'CN_UPDATED'
814: THEN
815: RAISE fnd_api.g_exc_error;
816: END IF;
817: END IF; -- End if (p_trx_factor_rec_tbl.COUNT <> 0)

Line 815: RAISE fnd_api.g_exc_error;

811: -- If the status is <> S or if the loading status is changed THEN
812: -- Raise an Error
813: IF (x_return_status <> fnd_api.g_ret_sts_success) OR x_loading_status <> 'CN_UPDATED'
814: THEN
815: RAISE fnd_api.g_exc_error;
816: END IF;
817: END IF; -- End if (p_trx_factor_rec_tbl.COUNT <> 0)
818: END IF; -- end if for Element_type = COMMISSION, BONUES
819: ELSIF (x_loading_status = 'PLN_QUOTA_REV_EXISTS')

Line 823: RAISE fnd_api.g_exc_error;

819: ELSIF (x_loading_status = 'PLN_QUOTA_REV_EXISTS')
820: THEN
821: IF (p_trx_factor_rec_tbl.COUNT = 0 AND p_revenue_class_rec_tbl.COUNT = 0)
822: THEN
823: RAISE fnd_api.g_exc_error;
824: ELSIF p_trx_factor_rec_tbl.COUNT <> 0
825: THEN
826: -- insert into the trx_factors
827: NULL;

Line 835: IF fnd_api.to_boolean (p_commit)

831: END IF; -- Table Count is Not Zero
832:
833: -- End of API body.
834: -- Standard check of p_commit.
835: IF fnd_api.to_boolean (p_commit)
836: THEN
837: COMMIT WORK;
838: END IF;
839:

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

839:
840: --+
841: -- Standard call to get message count and if count is 1, get message info.
842: --+
843: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
844: EXCEPTION
845: WHEN fnd_api.g_exc_error
846: THEN
847: ROLLBACK TO update_plan_element;

Line 845: WHEN fnd_api.g_exc_error

841: -- Standard call to get message count and if count is 1, get message info.
842: --+
843: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
844: EXCEPTION
845: WHEN fnd_api.g_exc_error
846: THEN
847: ROLLBACK TO update_plan_element;
848: x_return_status := fnd_api.g_ret_sts_error;
849: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

Line 848: x_return_status := fnd_api.g_ret_sts_error;

844: EXCEPTION
845: WHEN fnd_api.g_exc_error
846: THEN
847: ROLLBACK TO update_plan_element;
848: x_return_status := fnd_api.g_ret_sts_error;
849: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
850: WHEN fnd_api.g_exc_unexpected_error
851: THEN
852: ROLLBACK TO update_plan_element;

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

845: WHEN fnd_api.g_exc_error
846: THEN
847: ROLLBACK TO update_plan_element;
848: x_return_status := fnd_api.g_ret_sts_error;
849: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
850: WHEN fnd_api.g_exc_unexpected_error
851: THEN
852: ROLLBACK TO update_plan_element;
853: x_loading_status := 'UNEXPECTED_ERR';

Line 850: WHEN fnd_api.g_exc_unexpected_error

846: THEN
847: ROLLBACK TO update_plan_element;
848: x_return_status := fnd_api.g_ret_sts_error;
849: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
850: WHEN fnd_api.g_exc_unexpected_error
851: THEN
852: ROLLBACK TO update_plan_element;
853: x_loading_status := 'UNEXPECTED_ERR';
854: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 854: x_return_status := fnd_api.g_ret_sts_unexp_error;

850: WHEN fnd_api.g_exc_unexpected_error
851: THEN
852: ROLLBACK TO update_plan_element;
853: x_loading_status := 'UNEXPECTED_ERR';
854: x_return_status := fnd_api.g_ret_sts_unexp_error;
855: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
856: WHEN OTHERS
857: THEN
858: ROLLBACK TO update_plan_element;

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

851: THEN
852: ROLLBACK TO update_plan_element;
853: x_loading_status := 'UNEXPECTED_ERR';
854: x_return_status := fnd_api.g_ret_sts_unexp_error;
855: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
856: WHEN OTHERS
857: THEN
858: ROLLBACK TO update_plan_element;
859: x_loading_status := 'UNEXPECTED_ERR';

Line 860: x_return_status := fnd_api.g_ret_sts_unexp_error;

856: WHEN OTHERS
857: THEN
858: ROLLBACK TO update_plan_element;
859: x_loading_status := 'UNEXPECTED_ERR';
860: x_return_status := fnd_api.g_ret_sts_unexp_error;
861:
862: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
863: THEN
864: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

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

863: THEN
864: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
865: END IF;
866:
867: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
868: END update_quota_rules;
869:
870: --|-------------------------------------------------------------------------+
871: --| Procedure Name: Delete_Quota_Rules

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

872: --| Descr: Delete a Quota Rules
873: --|-------------------------------------------------------------------------+
874: PROCEDURE delete_quota_rules (
875: p_api_version IN NUMBER,
876: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
877: p_commit IN VARCHAR2 := fnd_api.g_false,
878: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
879: x_return_status OUT NOCOPY VARCHAR2,
880: x_msg_count OUT NOCOPY NUMBER,

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

873: --|-------------------------------------------------------------------------+
874: PROCEDURE delete_quota_rules (
875: p_api_version IN NUMBER,
876: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
877: p_commit IN VARCHAR2 := fnd_api.g_false,
878: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
879: x_return_status OUT NOCOPY VARCHAR2,
880: x_msg_count OUT NOCOPY NUMBER,
881: x_msg_data OUT NOCOPY VARCHAR2,

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

874: PROCEDURE delete_quota_rules (
875: p_api_version IN NUMBER,
876: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
877: p_commit IN VARCHAR2 := fnd_api.g_false,
878: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
879: x_return_status OUT NOCOPY VARCHAR2,
880: x_msg_count OUT NOCOPY NUMBER,
881: x_msg_data OUT NOCOPY VARCHAR2,
882: p_quota_name IN VARCHAR2,

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

893: -- Standard Start of API savepoint
894: SAVEPOINT delete_plan_element;
895:
896: -- Standard call to check for call compatibility.
897: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
898: THEN
899: RAISE fnd_api.g_exc_unexpected_error;
900: END IF;
901:

Line 899: RAISE fnd_api.g_exc_unexpected_error;

895:
896: -- Standard call to check for call compatibility.
897: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
898: THEN
899: RAISE fnd_api.g_exc_unexpected_error;
900: END IF;
901:
902: -- Initialize message list if p_init_msg_list is set to TRUE.
903: IF fnd_api.to_boolean (p_init_msg_list)

Line 903: IF fnd_api.to_boolean (p_init_msg_list)

899: RAISE fnd_api.g_exc_unexpected_error;
900: END IF;
901:
902: -- Initialize message list if p_init_msg_list is set to TRUE.
903: IF fnd_api.to_boolean (p_init_msg_list)
904: THEN
905: fnd_msg_pub.initialize;
906: END IF;
907:

Line 909: x_return_status := fnd_api.g_ret_sts_success;

905: fnd_msg_pub.initialize;
906: END IF;
907:
908: -- Initialize API return status to success
909: x_return_status := fnd_api.g_ret_sts_success;
910: x_loading_status := 'CN_DELETED';
911:
912: -- API body
913: -- Store the User Input Value into The Local Variable.

Line 922: ) = fnd_api.g_true

918: p_para_name => cn_chk_plan_element_pkg.g_pe_name,
919: p_loading_status => x_loading_status,
920: x_loading_status => l_loading_status
921: )
922: ) = fnd_api.g_true
923: )
924: THEN
925: RAISE fnd_api.g_exc_error;
926: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_quota_name,

Line 925: RAISE fnd_api.g_exc_error;

921: )
922: ) = fnd_api.g_true
923: )
924: THEN
925: RAISE fnd_api.g_exc_error;
926: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_quota_name,
927: p_obj_name => cn_chk_plan_element_pkg.g_pe_name,
928: p_loading_status => x_loading_status,
929: x_loading_status => l_loading_status

Line 931: ) = fnd_api.g_true

927: p_obj_name => cn_chk_plan_element_pkg.g_pe_name,
928: p_loading_status => x_loading_status,
929: x_loading_status => l_loading_status
930: )
931: ) = fnd_api.g_true
932: )
933: THEN
934: RAISE fnd_api.g_exc_error;
935: END IF;

Line 934: RAISE fnd_api.g_exc_error;

930: )
931: ) = fnd_api.g_true
932: )
933: THEN
934: RAISE fnd_api.g_exc_error;
935: END IF;
936:
937: -- Get the Quota ID
938: l_rev_rec.quota_id := cn_chk_plan_element_pkg.get_quota_id (LTRIM (RTRIM (p_quota_name)),p_revenue_class_rec_tbl(1).org_id);

Line 951: RAISE fnd_api.g_exc_error;

947: fnd_msg_pub.ADD;
948: END IF;
949:
950: x_loading_status := 'CN_PLN_NOT_EXIST';
951: RAISE fnd_api.g_exc_error;
952: END IF;
953:
954: -- Loop Through Each Record and Delete IT
955: IF p_revenue_class_rec_tbl.COUNT > 0

Line 972: RAISE fnd_api.g_exc_error;

968: fnd_msg_pub.ADD;
969: END IF;
970:
971: x_loading_status := 'CN_REV_CLASS_NOT_EXIST';
972: RAISE fnd_api.g_exc_error;
973: END IF;
974:
975: -- Get the Quota Rule ID
976: l_rev_rec.quota_rule_id := cn_chk_plan_element_pkg.get_quota_rule_id (l_rev_rec.quota_id, l_rev_rec.revenue_class_id);

Line 989: RAISE fnd_api.g_exc_error;

985: fnd_msg_pub.ADD;
986: END IF;
987:
988: x_loading_status := 'QUOTA_RULE_NOT_EXIST';
989: RAISE fnd_api.g_exc_error;
990: END IF;
991:
992: IF (x_return_status <> fnd_api.g_ret_sts_success)
993: THEN

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

988: x_loading_status := 'QUOTA_RULE_NOT_EXIST';
989: RAISE fnd_api.g_exc_error;
990: END IF;
991:
992: IF (x_return_status <> fnd_api.g_ret_sts_success)
993: THEN
994: RAISE fnd_api.g_exc_error;
995: ELSIF (x_return_status = fnd_api.g_ret_sts_success AND x_loading_status = 'CN_DELETED')
996: THEN

Line 994: RAISE fnd_api.g_exc_error;

990: END IF;
991:
992: IF (x_return_status <> fnd_api.g_ret_sts_success)
993: THEN
994: RAISE fnd_api.g_exc_error;
995: ELSIF (x_return_status = fnd_api.g_ret_sts_success AND x_loading_status = 'CN_DELETED')
996: THEN
997: -- Delete Record;
998: cn_quota_rules_pkg.DELETE_RECORD (x_quota_id => l_rev_rec.quota_id,

Line 995: ELSIF (x_return_status = fnd_api.g_ret_sts_success AND x_loading_status = 'CN_DELETED')

991:
992: IF (x_return_status <> fnd_api.g_ret_sts_success)
993: THEN
994: RAISE fnd_api.g_exc_error;
995: ELSIF (x_return_status = fnd_api.g_ret_sts_success AND x_loading_status = 'CN_DELETED')
996: THEN
997: -- Delete Record;
998: cn_quota_rules_pkg.DELETE_RECORD (x_quota_id => l_rev_rec.quota_id,
999: x_quota_rule_id => l_rev_rec.quota_rule_id,

Line 1007: IF fnd_api.to_boolean (p_commit)

1003: END LOOP;
1004: END IF;
1005:
1006: -- standard Commit
1007: IF fnd_api.to_boolean (p_commit)
1008: THEN
1009: COMMIT WORK;
1010: END IF;
1011:

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

1011:
1012: --+
1013: -- Standard call to get message count and if count is 1, get message info.
1014: --+
1015: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1016: EXCEPTION
1017: WHEN fnd_api.g_exc_error
1018: THEN
1019: ROLLBACK TO delete_plan_element;

Line 1017: WHEN fnd_api.g_exc_error

1013: -- Standard call to get message count and if count is 1, get message info.
1014: --+
1015: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1016: EXCEPTION
1017: WHEN fnd_api.g_exc_error
1018: THEN
1019: ROLLBACK TO delete_plan_element;
1020: x_return_status := fnd_api.g_ret_sts_error;
1021: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

Line 1020: x_return_status := fnd_api.g_ret_sts_error;

1016: EXCEPTION
1017: WHEN fnd_api.g_exc_error
1018: THEN
1019: ROLLBACK TO delete_plan_element;
1020: x_return_status := fnd_api.g_ret_sts_error;
1021: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1022: WHEN fnd_api.g_exc_unexpected_error
1023: THEN
1024: ROLLBACK TO delete_plan_element;

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

1017: WHEN fnd_api.g_exc_error
1018: THEN
1019: ROLLBACK TO delete_plan_element;
1020: x_return_status := fnd_api.g_ret_sts_error;
1021: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1022: WHEN fnd_api.g_exc_unexpected_error
1023: THEN
1024: ROLLBACK TO delete_plan_element;
1025: x_loading_status := 'UNEXPECTED_ERR';

Line 1022: WHEN fnd_api.g_exc_unexpected_error

1018: THEN
1019: ROLLBACK TO delete_plan_element;
1020: x_return_status := fnd_api.g_ret_sts_error;
1021: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1022: WHEN fnd_api.g_exc_unexpected_error
1023: THEN
1024: ROLLBACK TO delete_plan_element;
1025: x_loading_status := 'UNEXPECTED_ERR';
1026: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1026: x_return_status := fnd_api.g_ret_sts_unexp_error;

1022: WHEN fnd_api.g_exc_unexpected_error
1023: THEN
1024: ROLLBACK TO delete_plan_element;
1025: x_loading_status := 'UNEXPECTED_ERR';
1026: x_return_status := fnd_api.g_ret_sts_unexp_error;
1027: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1028: WHEN OTHERS
1029: THEN
1030: ROLLBACK TO delete_plan_element;

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

1023: THEN
1024: ROLLBACK TO delete_plan_element;
1025: x_loading_status := 'UNEXPECTED_ERR';
1026: x_return_status := fnd_api.g_ret_sts_unexp_error;
1027: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1028: WHEN OTHERS
1029: THEN
1030: ROLLBACK TO delete_plan_element;
1031: x_loading_status := 'UNEXPECTED_ERR';

Line 1032: x_return_status := fnd_api.g_ret_sts_unexp_error;

1028: WHEN OTHERS
1029: THEN
1030: ROLLBACK TO delete_plan_element;
1031: x_loading_status := 'UNEXPECTED_ERR';
1032: x_return_status := fnd_api.g_ret_sts_unexp_error;
1033:
1034: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
1035: THEN
1036: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

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

1035: THEN
1036: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1037: END IF;
1038:
1039: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1040: END delete_quota_rules;
1041: END cn_quota_rules_grp;