DBA Data[Home] [Help]

APPS.CN_QUOTA_RULE_UPLIFTS_GRP dependencies on FND_API

Line 23: IF p_return_status = fnd_api.g_ret_sts_error

19: p_return_status IN VARCHAR2
20: )
21: IS
22: BEGIN
23: IF p_return_status = fnd_api.g_ret_sts_error
24: THEN
25: RAISE fnd_api.g_exc_error;
26: ELSIF p_return_status = fnd_api.g_ret_sts_unexp_error
27: THEN

Line 25: RAISE fnd_api.g_exc_error;

21: IS
22: BEGIN
23: IF p_return_status = fnd_api.g_ret_sts_error
24: THEN
25: RAISE fnd_api.g_exc_error;
26: ELSIF p_return_status = fnd_api.g_ret_sts_unexp_error
27: THEN
28: RAISE fnd_api.g_exc_unexpected_error;
29: END IF;

Line 26: ELSIF p_return_status = fnd_api.g_ret_sts_unexp_error

22: BEGIN
23: IF p_return_status = fnd_api.g_ret_sts_error
24: THEN
25: RAISE fnd_api.g_exc_error;
26: ELSIF p_return_status = fnd_api.g_ret_sts_unexp_error
27: THEN
28: RAISE fnd_api.g_exc_unexpected_error;
29: END IF;
30: END;

Line 28: RAISE fnd_api.g_exc_unexpected_error;

24: THEN
25: RAISE fnd_api.g_exc_error;
26: ELSIF p_return_status = fnd_api.g_ret_sts_unexp_error
27: THEN
28: RAISE fnd_api.g_exc_unexpected_error;
29: END IF;
30: END;
31:
32: -- ----------------------------------------------------------------------------+

Line 58: x_return_status := fnd_api.g_ret_sts_success;

54: -- First make sure you have an org_id to drive all searches
55: cn_chk_plan_element_pkg.validate_org_id (p_rev_uplift_rec.org_id);
56: l_pe_rec.org_id := p_rev_uplift_rec.org_id;
57: -- Convert the User Input.
58: x_return_status := fnd_api.g_ret_sts_success;
59: x_loading_status := p_loading_status;
60: -- Removing leading and trailing blanks
61: l_pe_rec.NAME := LTRIM (RTRIM (p_quota_name));
62: l_pe_rec.rev_class_name := LTRIM (RTRIM (p_rev_uplift_rec.rev_class_name));

Line 75: SELECT DECODE (p_rev_uplift_rec.payment_factor, fnd_api.g_miss_num, 100, NULL, 100, p_rev_uplift_rec.payment_factor),

71:
72: -- Set the Payment Uplift Factor if the Input value is Null or G_MISS_NUM
73: -- Set the Quota Uplift Factor if the Input value is Null or G_MISS_NUM
74: -- Combined the two queries
75: SELECT DECODE (p_rev_uplift_rec.payment_factor, fnd_api.g_miss_num, 100, NULL, 100, p_rev_uplift_rec.payment_factor),
76: DECODE (p_rev_uplift_rec.quota_factor, fnd_api.g_miss_num, 100, NULL, 100, p_rev_uplift_rec.quota_factor)
77: INTO l_pe_rec.rev_class_payment_uplift,
78: l_pe_rec.rev_class_quota_uplift
79: FROM SYS.DUAL;

Line 76: DECODE (p_rev_uplift_rec.quota_factor, fnd_api.g_miss_num, 100, NULL, 100, p_rev_uplift_rec.quota_factor)

72: -- Set the Payment Uplift Factor if the Input value is Null or G_MISS_NUM
73: -- Set the Quota Uplift Factor if the Input value is Null or G_MISS_NUM
74: -- Combined the two queries
75: SELECT DECODE (p_rev_uplift_rec.payment_factor, fnd_api.g_miss_num, 100, NULL, 100, p_rev_uplift_rec.payment_factor),
76: DECODE (p_rev_uplift_rec.quota_factor, fnd_api.g_miss_num, 100, NULL, 100, p_rev_uplift_rec.quota_factor)
77: INTO l_pe_rec.rev_class_payment_uplift,
78: l_pe_rec.rev_class_quota_uplift
79: FROM SYS.DUAL;
80:

Line 120: x_return_status := fnd_api.g_ret_sts_success;

116: l_date_msg VARCHAR2 (100);
117: l_loading_status VARCHAR2 (80);
118: BEGIN
119: -- Initialize API return status to success
120: x_return_status := fnd_api.g_ret_sts_success;
121: x_loading_status := p_loading_status;
122:
123: -- API body
124: -- check for required data in Plan Element Name

Line 131: ) = fnd_api.g_true

127: p_para_name => cn_chk_plan_element_pkg.g_pe_name,
128: p_loading_status => x_loading_status,
129: x_loading_status => l_loading_status
130: )
131: ) = fnd_api.g_true
132: )
133: THEN
134: RAISE fnd_api.g_exc_error;
135: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_pe_rec.NAME,

Line 134: RAISE fnd_api.g_exc_error;

130: )
131: ) = fnd_api.g_true
132: )
133: THEN
134: RAISE fnd_api.g_exc_error;
135: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_pe_rec.NAME,
136: p_obj_name => cn_chk_plan_element_pkg.g_pe_name,
137: p_loading_status => x_loading_status,
138: x_loading_status => l_loading_status

Line 140: ) = fnd_api.g_true

136: p_obj_name => cn_chk_plan_element_pkg.g_pe_name,
137: p_loading_status => x_loading_status,
138: x_loading_status => l_loading_status
139: )
140: ) = fnd_api.g_true
141: )
142: THEN
143: RAISE fnd_api.g_exc_error;
144: END IF;

Line 143: RAISE fnd_api.g_exc_error;

139: )
140: ) = fnd_api.g_true
141: )
142: THEN
143: RAISE fnd_api.g_exc_error;
144: END IF;
145:
146: --+
147: -- Check Valid Plan Element Name

Line 161: RAISE fnd_api.g_exc_error;

157: fnd_msg_pub.ADD;
158: END IF;
159:
160: x_loading_status := 'PLN_NOT_EXIST';
161: RAISE fnd_api.g_exc_error;
162: END IF;
163:
164: --+
165: -- Check Revenue Class name is null or miss char

Line 172: ) = fnd_api.g_true

168: p_para_name => cn_chk_plan_element_pkg.g_rev_cls_name,
169: p_loading_status => x_loading_status,
170: x_loading_status => l_loading_status
171: )
172: ) = fnd_api.g_true
173: )
174: THEN
175: RAISE fnd_api.g_exc_error;
176: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_pe_rec.rev_class_name,

Line 175: RAISE fnd_api.g_exc_error;

171: )
172: ) = fnd_api.g_true
173: )
174: THEN
175: RAISE fnd_api.g_exc_error;
176: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_pe_rec.rev_class_name,
177: p_obj_name => cn_chk_plan_element_pkg.g_rev_cls_name,
178: p_loading_status => x_loading_status,
179: x_loading_status => l_loading_status

Line 181: ) = fnd_api.g_true

177: p_obj_name => cn_chk_plan_element_pkg.g_rev_cls_name,
178: p_loading_status => x_loading_status,
179: x_loading_status => l_loading_status
180: )
181: ) = fnd_api.g_true
182: )
183: THEN
184: RAISE fnd_api.g_exc_error;
185: END IF;

Line 184: RAISE fnd_api.g_exc_error;

180: )
181: ) = fnd_api.g_true
182: )
183: THEN
184: RAISE fnd_api.g_exc_error;
185: END IF;
186:
187: --+
188: -- Check Valid Revenue Class Name

Line 201: RAISE fnd_api.g_exc_error;

197: fnd_msg_pub.ADD;
198: END IF;
199:
200: x_loading_status := 'REV_CLASS_NOT_EXIST';
201: RAISE fnd_api.g_exc_error;
202: END IF;
203:
204: --+
205: -- Check Start Date can not be missing or NULL

Line 212: ) = fnd_api.g_true

208: p_para_name => cn_chk_plan_element_pkg.g_uplift_start_date,
209: p_loading_status => x_loading_status,
210: x_loading_status => l_loading_status
211: )
212: ) = fnd_api.g_true
213: )
214: THEN
215: RAISE fnd_api.g_exc_error;
216: ELSIF ((cn_chk_plan_element_pkg.chk_null_date_para (p_date_para => p_pe_rec.rev_uplift_start_date,

Line 215: RAISE fnd_api.g_exc_error;

211: )
212: ) = fnd_api.g_true
213: )
214: THEN
215: RAISE fnd_api.g_exc_error;
216: ELSIF ((cn_chk_plan_element_pkg.chk_null_date_para (p_date_para => p_pe_rec.rev_uplift_start_date,
217: p_obj_name => cn_chk_plan_element_pkg.g_uplift_start_date,
218: p_loading_status => x_loading_status,
219: x_loading_status => l_loading_status

Line 221: ) = fnd_api.g_true

217: p_obj_name => cn_chk_plan_element_pkg.g_uplift_start_date,
218: p_loading_status => x_loading_status,
219: x_loading_status => l_loading_status
220: )
221: ) = fnd_api.g_true
222: )
223: THEN
224: RAISE fnd_api.g_exc_error;
225: END IF;

Line 224: RAISE fnd_api.g_exc_error;

220: )
221: ) = fnd_api.g_true
222: )
223: THEN
224: RAISE fnd_api.g_exc_error;
225: END IF;
226:
227: --+
228: -- Check End Date must be Grater than Start Date

Line 243: RAISE fnd_api.g_exc_error;

239: fnd_msg_pub.ADD;
240: END IF;
241:
242: x_loading_status := 'INVALID_DATE_RANGE';
243: RAISE fnd_api.g_exc_error;
244: END IF;
245: END IF;
246:
247: --+

Line 254: ) = fnd_api.g_true

250: IF (cn_api.chk_miss_num_para (p_num_para => p_pe_rec.rev_class_payment_uplift,
251: p_para_name => cn_chk_plan_element_pkg.g_uplift_payment_factor,
252: p_loading_status => x_loading_status,
253: x_loading_status => l_loading_status
254: ) = fnd_api.g_true
255: )
256: THEN
257: RAISE fnd_api.g_exc_error;
258: ELSIF ((cn_api.chk_null_num_para (p_num_para => p_pe_rec.rev_class_payment_uplift,

Line 257: RAISE fnd_api.g_exc_error;

253: x_loading_status => l_loading_status
254: ) = fnd_api.g_true
255: )
256: THEN
257: RAISE fnd_api.g_exc_error;
258: ELSIF ((cn_api.chk_null_num_para (p_num_para => p_pe_rec.rev_class_payment_uplift,
259: p_obj_name => cn_chk_plan_element_pkg.g_uplift_payment_factor,
260: p_loading_status => x_loading_status,
261: x_loading_status => l_loading_status

Line 263: ) = fnd_api.g_true

259: p_obj_name => cn_chk_plan_element_pkg.g_uplift_payment_factor,
260: p_loading_status => x_loading_status,
261: x_loading_status => l_loading_status
262: )
263: ) = fnd_api.g_true
264: )
265: THEN
266: RAISE fnd_api.g_exc_error;
267: END IF;

Line 266: RAISE fnd_api.g_exc_error;

262: )
263: ) = fnd_api.g_true
264: )
265: THEN
266: RAISE fnd_api.g_exc_error;
267: END IF;
268:
269: --+
270: -- Check Quota Uplift

Line 276: ) = fnd_api.g_true

272: IF (cn_api.chk_miss_num_para (p_num_para => p_pe_rec.rev_class_quota_uplift,
273: p_para_name => cn_chk_plan_element_pkg.g_uplift_quota_factor,
274: p_loading_status => x_loading_status,
275: x_loading_status => l_loading_status
276: ) = fnd_api.g_true
277: )
278: THEN
279: RAISE fnd_api.g_exc_error;
280: ELSIF ((cn_api.chk_null_num_para (p_num_para => p_pe_rec.rev_class_quota_uplift,

Line 279: RAISE fnd_api.g_exc_error;

275: x_loading_status => l_loading_status
276: ) = fnd_api.g_true
277: )
278: THEN
279: RAISE fnd_api.g_exc_error;
280: ELSIF ((cn_api.chk_null_num_para (p_num_para => p_pe_rec.rev_class_quota_uplift,
281: p_obj_name => cn_chk_plan_element_pkg.g_uplift_quota_factor,
282: p_loading_status => x_loading_status,
283: x_loading_status => l_loading_status

Line 285: ) = fnd_api.g_true

281: p_obj_name => cn_chk_plan_element_pkg.g_uplift_quota_factor,
282: p_loading_status => x_loading_status,
283: x_loading_status => l_loading_status
284: )
285: ) = fnd_api.g_true
286: )
287: THEN
288: RAISE fnd_api.g_exc_error;
289: END IF;

Line 288: RAISE fnd_api.g_exc_error;

284: )
285: ) = fnd_api.g_true
286: )
287: THEN
288: RAISE fnd_api.g_exc_error;
289: END IF;
290:
291: --+
292: -- Check for Duplicate Record for the Same Quota Rule with the same start date and end Date.

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

337: x_loading_status => l_loading_status
338: );
339: x_loading_status := l_loading_status;
340:
341: IF (x_return_status <> fnd_api.g_ret_sts_success)
342: THEN
343: RAISE fnd_api.g_exc_error;
344: END IF;
345: EXCEPTION

Line 343: RAISE fnd_api.g_exc_error;

339: x_loading_status := l_loading_status;
340:
341: IF (x_return_status <> fnd_api.g_ret_sts_success)
342: THEN
343: RAISE fnd_api.g_exc_error;
344: END IF;
345: EXCEPTION
346: WHEN fnd_api.g_exc_error
347: THEN

Line 346: WHEN fnd_api.g_exc_error

342: THEN
343: RAISE fnd_api.g_exc_error;
344: END IF;
345: EXCEPTION
346: WHEN fnd_api.g_exc_error
347: THEN
348: x_return_status := fnd_api.g_ret_sts_error;
349: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
350: WHEN fnd_api.g_exc_unexpected_error

Line 348: x_return_status := fnd_api.g_ret_sts_error;

344: END IF;
345: EXCEPTION
346: WHEN fnd_api.g_exc_error
347: THEN
348: x_return_status := fnd_api.g_ret_sts_error;
349: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
350: WHEN fnd_api.g_exc_unexpected_error
351: THEN
352: x_return_status := fnd_api.g_ret_sts_unexp_error;

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

345: EXCEPTION
346: WHEN fnd_api.g_exc_error
347: THEN
348: x_return_status := fnd_api.g_ret_sts_error;
349: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
350: WHEN fnd_api.g_exc_unexpected_error
351: THEN
352: x_return_status := fnd_api.g_ret_sts_unexp_error;
353: x_loading_status := 'UNEXPECTED_ERR';

Line 350: WHEN fnd_api.g_exc_unexpected_error

346: WHEN fnd_api.g_exc_error
347: THEN
348: x_return_status := fnd_api.g_ret_sts_error;
349: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
350: WHEN fnd_api.g_exc_unexpected_error
351: THEN
352: x_return_status := fnd_api.g_ret_sts_unexp_error;
353: x_loading_status := 'UNEXPECTED_ERR';
354: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

Line 352: x_return_status := fnd_api.g_ret_sts_unexp_error;

348: x_return_status := fnd_api.g_ret_sts_error;
349: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
350: WHEN fnd_api.g_exc_unexpected_error
351: THEN
352: x_return_status := fnd_api.g_ret_sts_unexp_error;
353: x_loading_status := 'UNEXPECTED_ERR';
354: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
355: WHEN OTHERS
356: THEN

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

350: WHEN fnd_api.g_exc_unexpected_error
351: THEN
352: x_return_status := fnd_api.g_ret_sts_unexp_error;
353: x_loading_status := 'UNEXPECTED_ERR';
354: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
355: WHEN OTHERS
356: THEN
357: x_return_status := fnd_api.g_ret_sts_unexp_error;
358: x_loading_status := 'UNEXPECTED_ERR';

Line 357: x_return_status := fnd_api.g_ret_sts_unexp_error;

353: x_loading_status := 'UNEXPECTED_ERR';
354: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
355: WHEN OTHERS
356: THEN
357: x_return_status := fnd_api.g_ret_sts_unexp_error;
358: x_loading_status := 'UNEXPECTED_ERR';
359:
360: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
361: THEN

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: THEN
362: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
363: END IF;
364:
365: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
366: END valid_quota_rule_uplift;
367:
368: -- ----------------------------------------------------------------------------+
369: -- Procedure: Check Valid Update

Line 400: x_return_status := fnd_api.g_ret_sts_success;

396: BEGIN
397: --+
398: -- Initialize API return status to success
399: --+
400: x_return_status := fnd_api.g_ret_sts_success;
401: x_loading_status := p_loading_status;
402: --+
403: -- Get revenue Class ID
404: --+

Line 419: ) = fnd_api.g_true

415: p_para_name => cn_chk_plan_element_pkg.g_rev_cls_name,
416: p_loading_status => x_loading_status,
417: x_loading_status => l_loading_status
418: )
419: ) = fnd_api.g_true
420: )
421: THEN
422: RAISE fnd_api.g_exc_error;
423: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_rev_class_name_old,

Line 422: RAISE fnd_api.g_exc_error;

418: )
419: ) = fnd_api.g_true
420: )
421: THEN
422: RAISE fnd_api.g_exc_error;
423: ELSIF ((cn_api.chk_null_char_para (p_char_para => p_rev_class_name_old,
424: p_obj_name => cn_chk_plan_element_pkg.g_rev_cls_name,
425: p_loading_status => x_loading_status,
426: x_loading_status => l_loading_status

Line 428: ) = fnd_api.g_true

424: p_obj_name => cn_chk_plan_element_pkg.g_rev_cls_name,
425: p_loading_status => x_loading_status,
426: x_loading_status => l_loading_status
427: )
428: ) = fnd_api.g_true
429: )
430: THEN
431: RAISE fnd_api.g_exc_error;
432: END IF;

Line 431: RAISE fnd_api.g_exc_error;

427: )
428: ) = fnd_api.g_true
429: )
430: THEN
431: RAISE fnd_api.g_exc_error;
432: END IF;
433:
434: --+
435: -- Check Old Start Date cannot be missing or NULL

Line 442: ) = fnd_api.g_true

438: p_para_name => cn_chk_plan_element_pkg.g_uplift_start_date,
439: p_loading_status => x_loading_status,
440: x_loading_status => l_loading_status
441: )
442: ) = fnd_api.g_true
443: )
444: THEN
445: RAISE fnd_api.g_exc_error;
446: ELSIF ((cn_chk_plan_element_pkg.chk_null_date_para (p_date_para => p_start_date_old,

Line 445: RAISE fnd_api.g_exc_error;

441: )
442: ) = fnd_api.g_true
443: )
444: THEN
445: RAISE fnd_api.g_exc_error;
446: ELSIF ((cn_chk_plan_element_pkg.chk_null_date_para (p_date_para => p_start_date_old,
447: p_obj_name => cn_chk_plan_element_pkg.g_uplift_start_date,
448: p_loading_status => x_loading_status,
449: x_loading_status => l_loading_status

Line 451: ) = fnd_api.g_true

447: p_obj_name => cn_chk_plan_element_pkg.g_uplift_start_date,
448: p_loading_status => x_loading_status,
449: x_loading_status => l_loading_status
450: )
451: ) = fnd_api.g_true
452: )
453: THEN
454: RAISE fnd_api.g_exc_error;
455: END IF;

Line 454: RAISE fnd_api.g_exc_error;

450: )
451: ) = fnd_api.g_true
452: )
453: THEN
454: RAISE fnd_api.g_exc_error;
455: END IF;
456:
457: --+
458: -- Check the passed revenue class name is exists in the database

Line 471: RAISE fnd_api.g_exc_error;

467: fnd_msg_pub.ADD;
468: END IF;
469:
470: x_loading_status := 'REV_CLASS_NOT_EXIST';
471: RAISE fnd_api.g_exc_error;
472: END IF;
473:
474: --+
475: -- Check the quota rule uplift id if the New Quota rule is exists.

Line 507: RAISE fnd_api.g_exc_error;

503: fnd_msg_pub.ADD;
504: END IF;
505:
506: x_loading_status := 'QUOTA_RULE_UPLIFT_NOT_EXIST';
507: RAISE fnd_api.g_exc_error;
508: END IF;
509:
510: -- Chances for duplicate record in the database is
511: -- case 1 if the old quota rule id

Line 521: RAISE fnd_api.g_exc_error;

517: fnd_msg_pub.ADD;
518: END IF;
519:
520: x_loading_status := 'QUOTA_UPLIFT_EXISTS';
521: RAISE fnd_api.g_exc_error;
522: ELSE
523: x_quota_rule_uplift_id := l_quota_rule_uplift_id_old;
524: END IF;
525:

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

538: x_loading_status => l_loading_status
539: );
540: x_loading_status := l_loading_status;
541:
542: IF (x_return_status <> fnd_api.g_ret_sts_success)
543: THEN
544: RAISE fnd_api.g_exc_error;
545: END IF;
546:

Line 544: RAISE fnd_api.g_exc_error;

540: x_loading_status := l_loading_status;
541:
542: IF (x_return_status <> fnd_api.g_ret_sts_success)
543: THEN
544: RAISE fnd_api.g_exc_error;
545: END IF;
546:
547: -- End of API body.
548: -- Standard call to get message count and if count is 1, get message info.

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

546:
547: -- End of API body.
548: -- Standard call to get message count and if count is 1, get message info.
549: --+
550: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
551: EXCEPTION
552: WHEN fnd_api.g_exc_error
553: THEN
554: x_return_status := fnd_api.g_ret_sts_error;

Line 552: WHEN fnd_api.g_exc_error

548: -- Standard call to get message count and if count is 1, get message info.
549: --+
550: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
551: EXCEPTION
552: WHEN fnd_api.g_exc_error
553: THEN
554: x_return_status := fnd_api.g_ret_sts_error;
555: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
556: WHEN fnd_api.g_exc_unexpected_error

Line 554: x_return_status := fnd_api.g_ret_sts_error;

550: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
551: EXCEPTION
552: WHEN fnd_api.g_exc_error
553: THEN
554: x_return_status := fnd_api.g_ret_sts_error;
555: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
556: WHEN fnd_api.g_exc_unexpected_error
557: THEN
558: x_return_status := fnd_api.g_ret_sts_unexp_error;

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

551: EXCEPTION
552: WHEN fnd_api.g_exc_error
553: THEN
554: x_return_status := fnd_api.g_ret_sts_error;
555: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
556: WHEN fnd_api.g_exc_unexpected_error
557: THEN
558: x_return_status := fnd_api.g_ret_sts_unexp_error;
559: x_loading_status := 'UNEXPECTED_ERR';

Line 556: WHEN fnd_api.g_exc_unexpected_error

552: WHEN fnd_api.g_exc_error
553: THEN
554: x_return_status := fnd_api.g_ret_sts_error;
555: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
556: WHEN fnd_api.g_exc_unexpected_error
557: THEN
558: x_return_status := fnd_api.g_ret_sts_unexp_error;
559: x_loading_status := 'UNEXPECTED_ERR';
560: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

Line 558: x_return_status := fnd_api.g_ret_sts_unexp_error;

554: x_return_status := fnd_api.g_ret_sts_error;
555: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
556: WHEN fnd_api.g_exc_unexpected_error
557: THEN
558: x_return_status := fnd_api.g_ret_sts_unexp_error;
559: x_loading_status := 'UNEXPECTED_ERR';
560: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
561: WHEN OTHERS
562: THEN

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

556: WHEN fnd_api.g_exc_unexpected_error
557: THEN
558: x_return_status := fnd_api.g_ret_sts_unexp_error;
559: x_loading_status := 'UNEXPECTED_ERR';
560: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
561: WHEN OTHERS
562: THEN
563: x_return_status := fnd_api.g_ret_sts_unexp_error;
564: x_loading_status := 'UNEXPECTED_ERR';

Line 563: x_return_status := fnd_api.g_ret_sts_unexp_error;

559: x_loading_status := 'UNEXPECTED_ERR';
560: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
561: WHEN OTHERS
562: THEN
563: x_return_status := fnd_api.g_ret_sts_unexp_error;
564: x_loading_status := 'UNEXPECTED_ERR';
565:
566: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
567: THEN

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

567: THEN
568: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
569: END IF;
570:
571: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
572: END check_valid_update;
573:
574: -- ----------------------------------------------------------------------------+
575: --

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

577: --
578: -- ----------------------------------------------------------------------------+
579: PROCEDURE create_quota_rule_uplift (
580: p_api_version IN NUMBER,
581: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
582: p_commit IN VARCHAR2 := fnd_api.g_false,
583: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
584: x_return_status OUT NOCOPY VARCHAR2,
585: x_msg_count OUT NOCOPY NUMBER,

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

578: -- ----------------------------------------------------------------------------+
579: PROCEDURE create_quota_rule_uplift (
580: p_api_version IN NUMBER,
581: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
582: p_commit IN VARCHAR2 := fnd_api.g_false,
583: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
584: x_return_status OUT NOCOPY VARCHAR2,
585: x_msg_count OUT NOCOPY NUMBER,
586: x_msg_data OUT NOCOPY VARCHAR2,

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

579: PROCEDURE create_quota_rule_uplift (
580: p_api_version IN NUMBER,
581: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
582: p_commit IN VARCHAR2 := fnd_api.g_false,
583: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
584: x_return_status OUT NOCOPY VARCHAR2,
585: x_msg_count OUT NOCOPY NUMBER,
586: x_msg_data OUT NOCOPY VARCHAR2,
587: p_quota_name IN VARCHAR2,

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

603:
604: --+
605: -- Standard call to check for call compatibility.
606: --+
607: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
608: THEN
609: RAISE fnd_api.g_exc_unexpected_error;
610: END IF;
611:

Line 609: RAISE fnd_api.g_exc_unexpected_error;

605: -- Standard call to check for call compatibility.
606: --+
607: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
608: THEN
609: RAISE fnd_api.g_exc_unexpected_error;
610: END IF;
611:
612: --+
613: -- Initialize message list if p_init_msg_list is set to TRUE.

Line 615: IF fnd_api.to_boolean (p_init_msg_list)

611:
612: --+
613: -- Initialize message list if p_init_msg_list is set to TRUE.
614: -- +
615: IF fnd_api.to_boolean (p_init_msg_list)
616: THEN
617: fnd_msg_pub.initialize;
618: END IF;
619:

Line 623: x_return_status := fnd_api.g_ret_sts_success;

619:
620: -- +
621: -- Initialize API return status to success
622: --+
623: x_return_status := fnd_api.g_ret_sts_success;
624: x_loading_status := 'CN_INSERTED';
625:
626: -- +
627: -- API body

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

638: x_loading_status => l_loading_status
639: );
640: x_loading_status := l_loading_status;
641:
642: IF (x_return_status <> fnd_api.g_ret_sts_success)
643: THEN
644: RAISE fnd_api.g_exc_error;
645: END IF;
646:

Line 644: RAISE fnd_api.g_exc_error;

640: x_loading_status := l_loading_status;
641:
642: IF (x_return_status <> fnd_api.g_ret_sts_success)
643: THEN
644: RAISE fnd_api.g_exc_error;
645: END IF;
646:
647: --+
648: -- Validate the quota rule uplifts.

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

660: );
661: x_loading_status := l_loading_status;
662:
663: -- raise error is status <> success
664: IF (x_return_status <> fnd_api.g_ret_sts_success)
665: THEN
666: RAISE fnd_api.g_exc_error;
667: ELSIF x_loading_status <> 'QUOTA_UPLIFT_EXISTS'
668: THEN

Line 666: RAISE fnd_api.g_exc_error;

662:
663: -- raise error is status <> success
664: IF (x_return_status <> fnd_api.g_ret_sts_success)
665: THEN
666: RAISE fnd_api.g_exc_error;
667: ELSIF x_loading_status <> 'QUOTA_UPLIFT_EXISTS'
668: THEN
669: cn_quota_rule_uplifts_pkg.begin_record (x_operation => 'INSERT',
670: x_org_id => l_pe_rec.org_id,

Line 698: RAISE fnd_api.g_exc_error;

694: l_uplift_date_seq_rec_tbl (i).end_date_old := p_rev_uplift_rec_tbl (i).end_date_old;
695: l_uplift_date_seq_rec_tbl (i).quota_rule_id := l_pe_rec.quota_rule_id;
696: l_uplift_date_seq_rec_tbl (i).quota_rule_uplift_id := p_rev_uplift_rec_tbl (i).quota_rule_uplift_id;
697: ELSE
698: RAISE fnd_api.g_exc_error;
699: END IF;
700: END LOOP;
701:
702: -- We need to check one level After than

Line 711: OR NVL (TRUNC (l_uplift_date_seq_rec_tbl (i).end_date_old), fnd_api.g_miss_date) <>

707: -- FOR i IN 1 .. l_uplift_date_seq_rec_tbl.COUNT
708: -- LOOP
709: FOR i IN l_uplift_date_seq_rec_tbl.FIRST..l_uplift_date_seq_rec_tbl.LAST LOOP
710: IF (( TRUNC (l_uplift_date_seq_rec_tbl (i).start_date_old) <> TRUNC (l_uplift_date_seq_rec_tbl (i).start_date)
711: OR NVL (TRUNC (l_uplift_date_seq_rec_tbl (i).end_date_old), fnd_api.g_miss_date) <>
712: NVL (TRUNC (l_uplift_date_seq_rec_tbl (i).end_date), fnd_api.g_miss_date)
713: )
714: )
715: THEN

Line 712: NVL (TRUNC (l_uplift_date_seq_rec_tbl (i).end_date), fnd_api.g_miss_date)

708: -- LOOP
709: FOR i IN l_uplift_date_seq_rec_tbl.FIRST..l_uplift_date_seq_rec_tbl.LAST LOOP
710: IF (( TRUNC (l_uplift_date_seq_rec_tbl (i).start_date_old) <> TRUNC (l_uplift_date_seq_rec_tbl (i).start_date)
711: OR NVL (TRUNC (l_uplift_date_seq_rec_tbl (i).end_date_old), fnd_api.g_miss_date) <>
712: NVL (TRUNC (l_uplift_date_seq_rec_tbl (i).end_date), fnd_api.g_miss_date)
713: )
714: )
715: THEN
716: --commented by Naren to fix bug 13606519

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

741: --Addition ends here
742:
743: x_loading_status := l_loading_status;
744:
745: IF (x_return_status <> fnd_api.g_ret_sts_success)
746: THEN
747: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error)
748: THEN
749: fnd_message.set_name ('CN', 'CN_INVALID_DATE_SEQUENCE');

Line 754: RAISE fnd_api.g_exc_error;

750: fnd_msg_pub.ADD;
751: END IF;
752:
753: x_loading_status := 'CN_UPLIFT_UPDATE_NOT_ALLOWED';
754: RAISE fnd_api.g_exc_error;
755: END IF;
756: END IF;
757: END LOOP;
758: END IF; -- Table Count is Not Zero

Line 762: IF fnd_api.to_boolean (p_commit)

758: END IF; -- Table Count is Not Zero
759:
760: -- End of API body.
761: -- Standard check of p_commit.
762: IF fnd_api.to_boolean (p_commit)
763: THEN
764: COMMIT WORK;
765: END IF;
766:

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

768: NULL;
769: --+
770: -- Standard call to get message count and if count is 1, get message info.
771: --+
772: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
773: EXCEPTION
774: WHEN fnd_api.g_exc_error
775: THEN
776: ROLLBACK TO create_quota_rule_uplift;

Line 774: WHEN fnd_api.g_exc_error

770: -- Standard call to get message count and if count is 1, get message info.
771: --+
772: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
773: EXCEPTION
774: WHEN fnd_api.g_exc_error
775: THEN
776: ROLLBACK TO create_quota_rule_uplift;
777: x_return_status := fnd_api.g_ret_sts_error;
778: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

Line 777: x_return_status := fnd_api.g_ret_sts_error;

773: EXCEPTION
774: WHEN fnd_api.g_exc_error
775: THEN
776: ROLLBACK TO create_quota_rule_uplift;
777: x_return_status := fnd_api.g_ret_sts_error;
778: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
779: WHEN fnd_api.g_exc_unexpected_error
780: THEN
781: ROLLBACK TO create_quota_rule_uplift;

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

774: WHEN fnd_api.g_exc_error
775: THEN
776: ROLLBACK TO create_quota_rule_uplift;
777: x_return_status := fnd_api.g_ret_sts_error;
778: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
779: WHEN fnd_api.g_exc_unexpected_error
780: THEN
781: ROLLBACK TO create_quota_rule_uplift;
782: x_loading_status := 'UNEXPECTED_ERR';

Line 779: WHEN fnd_api.g_exc_unexpected_error

775: THEN
776: ROLLBACK TO create_quota_rule_uplift;
777: x_return_status := fnd_api.g_ret_sts_error;
778: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
779: WHEN fnd_api.g_exc_unexpected_error
780: THEN
781: ROLLBACK TO create_quota_rule_uplift;
782: x_loading_status := 'UNEXPECTED_ERR';
783: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 783: x_return_status := fnd_api.g_ret_sts_unexp_error;

779: WHEN fnd_api.g_exc_unexpected_error
780: THEN
781: ROLLBACK TO create_quota_rule_uplift;
782: x_loading_status := 'UNEXPECTED_ERR';
783: x_return_status := fnd_api.g_ret_sts_unexp_error;
784: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
785: WHEN OTHERS
786: THEN
787: ROLLBACK TO create_quota_rule_uplift;

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

780: THEN
781: ROLLBACK TO create_quota_rule_uplift;
782: x_loading_status := 'UNEXPECTED_ERR';
783: x_return_status := fnd_api.g_ret_sts_unexp_error;
784: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
785: WHEN OTHERS
786: THEN
787: ROLLBACK TO create_quota_rule_uplift;
788: x_loading_status := 'UNEXPECTED_ERR';

Line 789: x_return_status := fnd_api.g_ret_sts_unexp_error;

785: WHEN OTHERS
786: THEN
787: ROLLBACK TO create_quota_rule_uplift;
788: x_loading_status := 'UNEXPECTED_ERR';
789: x_return_status := fnd_api.g_ret_sts_unexp_error;
790:
791: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
792: THEN
793: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

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

792: THEN
793: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
794: END IF;
795:
796: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
797: END create_quota_rule_uplift;
798:
799: -- ----------------------------------------------------------------------------+
800: --

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

802: --
803: -- ----------------------------------------------------------------------------+
804: PROCEDURE update_quota_rule_uplift (
805: p_api_version IN NUMBER,
806: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
807: p_commit IN VARCHAR2 := fnd_api.g_false,
808: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
809: x_return_status OUT NOCOPY VARCHAR2,
810: x_msg_count OUT NOCOPY NUMBER,

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

803: -- ----------------------------------------------------------------------------+
804: PROCEDURE update_quota_rule_uplift (
805: p_api_version IN NUMBER,
806: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
807: p_commit IN VARCHAR2 := fnd_api.g_false,
808: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
809: x_return_status OUT NOCOPY VARCHAR2,
810: x_msg_count OUT NOCOPY NUMBER,
811: x_msg_data OUT NOCOPY VARCHAR2,

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

804: PROCEDURE update_quota_rule_uplift (
805: p_api_version IN NUMBER,
806: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
807: p_commit IN VARCHAR2 := fnd_api.g_false,
808: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
809: x_return_status OUT NOCOPY VARCHAR2,
810: x_msg_count OUT NOCOPY NUMBER,
811: x_msg_data OUT NOCOPY VARCHAR2,
812: p_quota_name IN VARCHAR2,

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

828:
829: --+
830: -- Standard call to check for call compatibility.
831: --+
832: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
833: THEN
834: RAISE fnd_api.g_exc_unexpected_error;
835: END IF;
836:

Line 834: RAISE fnd_api.g_exc_unexpected_error;

830: -- Standard call to check for call compatibility.
831: --+
832: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
833: THEN
834: RAISE fnd_api.g_exc_unexpected_error;
835: END IF;
836:
837: --+
838: -- Initialize message list if p_init_msg_list is set to TRUE.

Line 840: IF fnd_api.to_boolean (p_init_msg_list)

836:
837: --+
838: -- Initialize message list if p_init_msg_list is set to TRUE.
839: -- +
840: IF fnd_api.to_boolean (p_init_msg_list)
841: THEN
842: fnd_msg_pub.initialize;
843: END IF;
844:

Line 848: x_return_status := fnd_api.g_ret_sts_success;

844:
845: -- +
846: -- Initialize API return status to success
847: --+
848: x_return_status := fnd_api.g_ret_sts_success;
849: x_loading_status := 'CN_UPDATED';
850:
851: -- +
852: -- API body

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

865: x_loading_status => l_loading_status
866: );
867: x_loading_status := l_loading_status;
868:
869: IF (x_return_status <> fnd_api.g_ret_sts_success)
870: THEN
871: RAISE fnd_api.g_exc_error;
872: END IF;
873:

Line 871: RAISE fnd_api.g_exc_error;

867: x_loading_status := l_loading_status;
868:
869: IF (x_return_status <> fnd_api.g_ret_sts_success)
870: THEN
871: RAISE fnd_api.g_exc_error;
872: END IF;
873:
874: --validate
875: check_valid_update (x_return_status => x_return_status,

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

887: x_loading_status := l_loading_status;
888:
889: -- If not success the Raise error
890: -- if PLN_QUOTA_UPLIFT_EXISTS
891: IF (x_return_status <> fnd_api.g_ret_sts_success)
892: THEN
893: RAISE fnd_api.g_exc_error;
894: ELSIF x_loading_status = 'CN_UPDATED'
895: THEN

Line 893: RAISE fnd_api.g_exc_error;

889: -- If not success the Raise error
890: -- if PLN_QUOTA_UPLIFT_EXISTS
891: IF (x_return_status <> fnd_api.g_ret_sts_success)
892: THEN
893: RAISE fnd_api.g_exc_error;
894: ELSIF x_loading_status = 'CN_UPDATED'
895: THEN
896: cn_quota_rule_uplifts_pkg.begin_record (x_operation => 'UPDATE',
897: x_org_id => l_pe_rec.org_id,

Line 925: RAISE fnd_api.g_exc_error;

921: l_uplift_date_seq_rec_tbl (i).end_date_old := p_rev_uplift_rec_tbl (i).end_date_old;
922: l_uplift_date_seq_rec_tbl (i).quota_rule_id := l_pe_rec.quota_rule_id;
923: l_uplift_date_seq_rec_tbl (i).quota_rule_uplift_id := p_rev_uplift_rec_tbl (i).quota_rule_uplift_id;
924: ELSE
925: RAISE fnd_api.g_exc_error;
926: END IF;
927: END LOOP;
928:
929: FOR i IN 1 .. l_uplift_date_seq_rec_tbl.COUNT

Line 932: OR NVL (TRUNC (l_uplift_date_seq_rec_tbl (i).end_date_old), fnd_api.g_miss_date) <>

928:
929: FOR i IN 1 .. l_uplift_date_seq_rec_tbl.COUNT
930: LOOP
931: IF (( TRUNC (l_uplift_date_seq_rec_tbl (i).start_date_old) <> TRUNC (l_uplift_date_seq_rec_tbl (i).start_date)
932: OR NVL (TRUNC (l_uplift_date_seq_rec_tbl (i).end_date_old), fnd_api.g_miss_date) <>
933: NVL (TRUNC (l_uplift_date_seq_rec_tbl (i).end_date), fnd_api.g_miss_date)
934: )
935: )
936: THEN

Line 933: NVL (TRUNC (l_uplift_date_seq_rec_tbl (i).end_date), fnd_api.g_miss_date)

929: FOR i IN 1 .. l_uplift_date_seq_rec_tbl.COUNT
930: LOOP
931: IF (( TRUNC (l_uplift_date_seq_rec_tbl (i).start_date_old) <> TRUNC (l_uplift_date_seq_rec_tbl (i).start_date)
932: OR NVL (TRUNC (l_uplift_date_seq_rec_tbl (i).end_date_old), fnd_api.g_miss_date) <>
933: NVL (TRUNC (l_uplift_date_seq_rec_tbl (i).end_date), fnd_api.g_miss_date)
934: )
935: )
936: THEN
937: /*

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

945: x_loading_status => l_loading_status
946: );
947: x_loading_status := l_loading_status;
948: */
949: IF (x_return_status <> fnd_api.g_ret_sts_success)
950: THEN
951: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error)
952: THEN
953: fnd_message.set_name ('CN', 'CN_INVALID_DATE_SEQUENCE');

Line 958: RAISE fnd_api.g_exc_error;

954: fnd_msg_pub.ADD;
955: END IF;
956:
957: x_loading_status := 'INVALID_DATE_SEQUENCE';
958: RAISE fnd_api.g_exc_error;
959: END IF;
960: END IF;
961: END LOOP;
962: END IF; -- Table Count is Not Zero

Line 967: IF fnd_api.to_boolean (p_commit)

963:
964: -- End of API body.
965: -- Standard check of p_commit.
966: --+
967: IF fnd_api.to_boolean (p_commit)
968: THEN
969: COMMIT WORK;
970: END IF;
971:

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

971:
972: --+
973: -- Standard call to get message count and if count is 1, get message info.
974: --+
975: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
976: EXCEPTION
977: WHEN fnd_api.g_exc_error
978: THEN
979: ROLLBACK TO update_quota_rule_uplift;

Line 977: WHEN fnd_api.g_exc_error

973: -- Standard call to get message count and if count is 1, get message info.
974: --+
975: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
976: EXCEPTION
977: WHEN fnd_api.g_exc_error
978: THEN
979: ROLLBACK TO update_quota_rule_uplift;
980: x_return_status := fnd_api.g_ret_sts_error;
981: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

Line 980: x_return_status := fnd_api.g_ret_sts_error;

976: EXCEPTION
977: WHEN fnd_api.g_exc_error
978: THEN
979: ROLLBACK TO update_quota_rule_uplift;
980: x_return_status := fnd_api.g_ret_sts_error;
981: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
982: WHEN fnd_api.g_exc_unexpected_error
983: THEN
984: ROLLBACK TO update_quota_rule_uplift;

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

977: WHEN fnd_api.g_exc_error
978: THEN
979: ROLLBACK TO update_quota_rule_uplift;
980: x_return_status := fnd_api.g_ret_sts_error;
981: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
982: WHEN fnd_api.g_exc_unexpected_error
983: THEN
984: ROLLBACK TO update_quota_rule_uplift;
985: x_loading_status := 'UNEXPECTED_ERR';

Line 982: WHEN fnd_api.g_exc_unexpected_error

978: THEN
979: ROLLBACK TO update_quota_rule_uplift;
980: x_return_status := fnd_api.g_ret_sts_error;
981: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
982: WHEN fnd_api.g_exc_unexpected_error
983: THEN
984: ROLLBACK TO update_quota_rule_uplift;
985: x_loading_status := 'UNEXPECTED_ERR';
986: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 986: x_return_status := fnd_api.g_ret_sts_unexp_error;

982: WHEN fnd_api.g_exc_unexpected_error
983: THEN
984: ROLLBACK TO update_quota_rule_uplift;
985: x_loading_status := 'UNEXPECTED_ERR';
986: x_return_status := fnd_api.g_ret_sts_unexp_error;
987: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
988: WHEN OTHERS
989: THEN
990: ROLLBACK TO update_quota_rule_uplift;

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

983: THEN
984: ROLLBACK TO update_quota_rule_uplift;
985: x_loading_status := 'UNEXPECTED_ERR';
986: x_return_status := fnd_api.g_ret_sts_unexp_error;
987: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
988: WHEN OTHERS
989: THEN
990: ROLLBACK TO update_quota_rule_uplift;
991: x_loading_status := 'UNEXPECTED_ERR';

Line 992: x_return_status := fnd_api.g_ret_sts_unexp_error;

988: WHEN OTHERS
989: THEN
990: ROLLBACK TO update_quota_rule_uplift;
991: x_loading_status := 'UNEXPECTED_ERR';
992: x_return_status := fnd_api.g_ret_sts_unexp_error;
993:
994: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
995: THEN
996: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

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

995: THEN
996: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
997: END IF;
998:
999: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1000: END update_quota_rule_uplift;
1001:
1002: -- ----------------------------------------------------------------------------+
1003: --

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

1005: --
1006: -- ----------------------------------------------------------------------------+
1007: PROCEDURE delete_quota_rule_uplift (
1008: p_api_version IN NUMBER,
1009: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1010: p_commit IN VARCHAR2 := fnd_api.g_false,
1011: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
1012: x_return_status OUT NOCOPY VARCHAR2,
1013: x_msg_count OUT NOCOPY NUMBER,

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

1006: -- ----------------------------------------------------------------------------+
1007: PROCEDURE delete_quota_rule_uplift (
1008: p_api_version IN NUMBER,
1009: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1010: p_commit IN VARCHAR2 := fnd_api.g_false,
1011: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
1012: x_return_status OUT NOCOPY VARCHAR2,
1013: x_msg_count OUT NOCOPY NUMBER,
1014: x_msg_data OUT NOCOPY VARCHAR2,

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

1007: PROCEDURE delete_quota_rule_uplift (
1008: p_api_version IN NUMBER,
1009: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
1010: p_commit IN VARCHAR2 := fnd_api.g_false,
1011: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
1012: x_return_status OUT NOCOPY VARCHAR2,
1013: x_msg_count OUT NOCOPY NUMBER,
1014: x_msg_data OUT NOCOPY VARCHAR2,
1015: p_quota_name IN VARCHAR2,

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

1027: -- Standard Start of API savepoint
1028: SAVEPOINT delete_quota_rule_uplift;
1029:
1030: -- Standard call to check for call compatibility.
1031: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
1032: THEN
1033: RAISE fnd_api.g_exc_unexpected_error;
1034: END IF;
1035:

Line 1033: RAISE fnd_api.g_exc_unexpected_error;

1029:
1030: -- Standard call to check for call compatibility.
1031: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
1032: THEN
1033: RAISE fnd_api.g_exc_unexpected_error;
1034: END IF;
1035:
1036: -- Initialize message list if p_init_msg_list is set to TRUE.
1037: IF fnd_api.to_boolean (p_init_msg_list)

Line 1037: IF fnd_api.to_boolean (p_init_msg_list)

1033: RAISE fnd_api.g_exc_unexpected_error;
1034: END IF;
1035:
1036: -- Initialize message list if p_init_msg_list is set to TRUE.
1037: IF fnd_api.to_boolean (p_init_msg_list)
1038: THEN
1039: fnd_msg_pub.initialize;
1040: END IF;
1041:

Line 1043: x_return_status := fnd_api.g_ret_sts_success;

1039: fnd_msg_pub.initialize;
1040: END IF;
1041:
1042: -- Initialize API return status to success
1043: x_return_status := fnd_api.g_ret_sts_success;
1044: x_loading_status := 'CN_DELETED';
1045:
1046: -- API body
1047: -- Store the User Input Value into The Local Variable.

Line 1095: RAISE fnd_api.g_exc_error;

1091: fnd_msg_pub.ADD;
1092: END IF;
1093:
1094: x_loading_status := 'QUOTA_UPLIFT_NOT_EXIST';
1095: RAISE fnd_api.g_exc_error;
1096: END IF;
1097:
1098: -- Check whether delete is Allowed, this only first and last record can
1099: -- be deleted

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

1107: x_loading_status => l_loading_status
1108: );
1109: x_loading_status := l_loading_status;
1110:
1111: IF (x_return_status <> fnd_api.g_ret_sts_success)
1112: THEN
1113: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error)
1114: THEN
1115: fnd_message.set_name ('CN', 'CN_UPLIFT_DELETE_NOT_ALLOWED');

Line 1120: RAISE fnd_api.g_exc_error;

1116: fnd_msg_pub.ADD;
1117: END IF;
1118:
1119: x_loading_status := 'CN_UPLIFT_DELETE_NOT_ALLOWED';
1120: RAISE fnd_api.g_exc_error;
1121: END IF;
1122:
1123: -- Check the Return status and the status is same as CN_DELETED.
1124: IF (x_return_status <> fnd_api.g_ret_sts_success)

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

1120: RAISE fnd_api.g_exc_error;
1121: END IF;
1122:
1123: -- Check the Return status and the status is same as CN_DELETED.
1124: IF (x_return_status <> fnd_api.g_ret_sts_success)
1125: THEN
1126: RAISE fnd_api.g_exc_error;
1127: ELSIF x_loading_status = 'CN_DELETED'
1128: THEN

Line 1126: RAISE fnd_api.g_exc_error;

1122:
1123: -- Check the Return status and the status is same as CN_DELETED.
1124: IF (x_return_status <> fnd_api.g_ret_sts_success)
1125: THEN
1126: RAISE fnd_api.g_exc_error;
1127: ELSIF x_loading_status = 'CN_DELETED'
1128: THEN
1129: cn_quota_rule_uplifts_pkg.begin_record (x_operation => 'DELETE',
1130: x_org_id => l_pe_rec.org_id,

Line 1152: RAISE fnd_api.g_exc_error;

1148: x_status_code => NULL,
1149: x_object_version_number => p_rev_uplift_rec_tbl (i).object_version_number
1150: );
1151: ELSE
1152: RAISE fnd_api.g_exc_error;
1153: END IF;
1154: END LOOP;
1155: END IF; -- Table Count is Not Zero
1156:

Line 1160: IF fnd_api.to_boolean (p_commit)

1156:
1157: -- End of API body.
1158: -- Standard check of p_commit.
1159: --+
1160: IF fnd_api.to_boolean (p_commit)
1161: THEN
1162: COMMIT WORK;
1163: END IF;
1164:

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

1164:
1165: --+
1166: -- Standard call to get message count and if count is 1, get message info.
1167: --+
1168: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1169: EXCEPTION
1170: WHEN fnd_api.g_exc_error
1171: THEN
1172: ROLLBACK TO delete_quota_rule_uplift;

Line 1170: WHEN fnd_api.g_exc_error

1166: -- Standard call to get message count and if count is 1, get message info.
1167: --+
1168: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1169: EXCEPTION
1170: WHEN fnd_api.g_exc_error
1171: THEN
1172: ROLLBACK TO delete_quota_rule_uplift;
1173: x_return_status := fnd_api.g_ret_sts_error;
1174: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

Line 1173: x_return_status := fnd_api.g_ret_sts_error;

1169: EXCEPTION
1170: WHEN fnd_api.g_exc_error
1171: THEN
1172: ROLLBACK TO delete_quota_rule_uplift;
1173: x_return_status := fnd_api.g_ret_sts_error;
1174: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1175: WHEN fnd_api.g_exc_unexpected_error
1176: THEN
1177: ROLLBACK TO delete_quota_rule_uplift;

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

1170: WHEN fnd_api.g_exc_error
1171: THEN
1172: ROLLBACK TO delete_quota_rule_uplift;
1173: x_return_status := fnd_api.g_ret_sts_error;
1174: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1175: WHEN fnd_api.g_exc_unexpected_error
1176: THEN
1177: ROLLBACK TO delete_quota_rule_uplift;
1178: x_loading_status := 'UNEXPECTED_ERR';

Line 1175: WHEN fnd_api.g_exc_unexpected_error

1171: THEN
1172: ROLLBACK TO delete_quota_rule_uplift;
1173: x_return_status := fnd_api.g_ret_sts_error;
1174: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1175: WHEN fnd_api.g_exc_unexpected_error
1176: THEN
1177: ROLLBACK TO delete_quota_rule_uplift;
1178: x_loading_status := 'UNEXPECTED_ERR';
1179: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1179: x_return_status := fnd_api.g_ret_sts_unexp_error;

1175: WHEN fnd_api.g_exc_unexpected_error
1176: THEN
1177: ROLLBACK TO delete_quota_rule_uplift;
1178: x_loading_status := 'UNEXPECTED_ERR';
1179: x_return_status := fnd_api.g_ret_sts_unexp_error;
1180: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1181: WHEN OTHERS
1182: THEN
1183: ROLLBACK TO delete_quota_rule_uplift;

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

1176: THEN
1177: ROLLBACK TO delete_quota_rule_uplift;
1178: x_loading_status := 'UNEXPECTED_ERR';
1179: x_return_status := fnd_api.g_ret_sts_unexp_error;
1180: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1181: WHEN OTHERS
1182: THEN
1183: ROLLBACK TO delete_quota_rule_uplift;
1184: x_loading_status := 'UNEXPECTED_ERR';

Line 1185: x_return_status := fnd_api.g_ret_sts_unexp_error;

1181: WHEN OTHERS
1182: THEN
1183: ROLLBACK TO delete_quota_rule_uplift;
1184: x_loading_status := 'UNEXPECTED_ERR';
1185: x_return_status := fnd_api.g_ret_sts_unexp_error;
1186:
1187: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
1188: THEN
1189: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

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

1188: THEN
1189: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1190: END IF;
1191:
1192: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1193: END delete_quota_rule_uplift;
1194: END cn_quota_rule_uplifts_grp;