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: cn_chk_plan_element_pkg.chk_uplift_iud (x_return_status => x_return_status,

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

723: x_loading_status => l_loading_status
724: );
725: x_loading_status := l_loading_status;
726:
727: IF (x_return_status <> fnd_api.g_ret_sts_success)
728: THEN
729: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error)
730: THEN
731: fnd_message.set_name ('CN', 'CN_INVALID_DATE_SEQUENCE');

Line 736: RAISE fnd_api.g_exc_error;

732: fnd_msg_pub.ADD;
733: END IF;
734:
735: x_loading_status := 'CN_UPLIFT_UPDATE_NOT_ALLOWED';
736: RAISE fnd_api.g_exc_error;
737: END IF;
738: END IF;
739: END LOOP;
740: END IF; -- Table Count is Not Zero

Line 744: IF fnd_api.to_boolean (p_commit)

740: END IF; -- Table Count is Not Zero
741:
742: -- End of API body.
743: -- Standard check of p_commit.
744: IF fnd_api.to_boolean (p_commit)
745: THEN
746: COMMIT WORK;
747: END IF;
748:

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

750: NULL;
751: --+
752: -- Standard call to get message count and if count is 1, get message info.
753: --+
754: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
755: EXCEPTION
756: WHEN fnd_api.g_exc_error
757: THEN
758: ROLLBACK TO create_quota_rule_uplift;

Line 756: WHEN fnd_api.g_exc_error

752: -- Standard call to get message count and if count is 1, get message info.
753: --+
754: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
755: EXCEPTION
756: WHEN fnd_api.g_exc_error
757: THEN
758: ROLLBACK TO create_quota_rule_uplift;
759: x_return_status := fnd_api.g_ret_sts_error;
760: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

Line 759: x_return_status := fnd_api.g_ret_sts_error;

755: EXCEPTION
756: WHEN fnd_api.g_exc_error
757: THEN
758: ROLLBACK TO create_quota_rule_uplift;
759: x_return_status := fnd_api.g_ret_sts_error;
760: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
761: WHEN fnd_api.g_exc_unexpected_error
762: THEN
763: ROLLBACK TO create_quota_rule_uplift;

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

756: WHEN fnd_api.g_exc_error
757: THEN
758: ROLLBACK TO create_quota_rule_uplift;
759: x_return_status := fnd_api.g_ret_sts_error;
760: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
761: WHEN fnd_api.g_exc_unexpected_error
762: THEN
763: ROLLBACK TO create_quota_rule_uplift;
764: x_loading_status := 'UNEXPECTED_ERR';

Line 761: WHEN fnd_api.g_exc_unexpected_error

757: THEN
758: ROLLBACK TO create_quota_rule_uplift;
759: x_return_status := fnd_api.g_ret_sts_error;
760: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
761: WHEN fnd_api.g_exc_unexpected_error
762: THEN
763: ROLLBACK TO create_quota_rule_uplift;
764: x_loading_status := 'UNEXPECTED_ERR';
765: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 765: x_return_status := fnd_api.g_ret_sts_unexp_error;

761: WHEN fnd_api.g_exc_unexpected_error
762: THEN
763: ROLLBACK TO create_quota_rule_uplift;
764: x_loading_status := 'UNEXPECTED_ERR';
765: x_return_status := fnd_api.g_ret_sts_unexp_error;
766: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
767: WHEN OTHERS
768: THEN
769: ROLLBACK TO create_quota_rule_uplift;

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

762: THEN
763: ROLLBACK TO create_quota_rule_uplift;
764: x_loading_status := 'UNEXPECTED_ERR';
765: x_return_status := fnd_api.g_ret_sts_unexp_error;
766: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
767: WHEN OTHERS
768: THEN
769: ROLLBACK TO create_quota_rule_uplift;
770: x_loading_status := 'UNEXPECTED_ERR';

Line 771: x_return_status := fnd_api.g_ret_sts_unexp_error;

767: WHEN OTHERS
768: THEN
769: ROLLBACK TO create_quota_rule_uplift;
770: x_loading_status := 'UNEXPECTED_ERR';
771: x_return_status := fnd_api.g_ret_sts_unexp_error;
772:
773: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
774: THEN
775: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

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: THEN
775: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
776: END IF;
777:
778: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
779: END create_quota_rule_uplift;
780:
781: -- ----------------------------------------------------------------------------+
782: --

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

784: --
785: -- ----------------------------------------------------------------------------+
786: PROCEDURE update_quota_rule_uplift (
787: p_api_version IN NUMBER,
788: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
789: p_commit IN VARCHAR2 := fnd_api.g_false,
790: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
791: x_return_status OUT NOCOPY VARCHAR2,
792: x_msg_count OUT NOCOPY NUMBER,

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

785: -- ----------------------------------------------------------------------------+
786: PROCEDURE update_quota_rule_uplift (
787: p_api_version IN NUMBER,
788: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
789: p_commit IN VARCHAR2 := fnd_api.g_false,
790: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
791: x_return_status OUT NOCOPY VARCHAR2,
792: x_msg_count OUT NOCOPY NUMBER,
793: x_msg_data OUT NOCOPY VARCHAR2,

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

786: PROCEDURE update_quota_rule_uplift (
787: p_api_version IN NUMBER,
788: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
789: p_commit IN VARCHAR2 := fnd_api.g_false,
790: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
791: x_return_status OUT NOCOPY VARCHAR2,
792: x_msg_count OUT NOCOPY NUMBER,
793: x_msg_data OUT NOCOPY VARCHAR2,
794: p_quota_name IN VARCHAR2,

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

810:
811: --+
812: -- Standard call to check for call compatibility.
813: --+
814: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
815: THEN
816: RAISE fnd_api.g_exc_unexpected_error;
817: END IF;
818:

Line 816: RAISE fnd_api.g_exc_unexpected_error;

812: -- Standard call to check for call compatibility.
813: --+
814: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
815: THEN
816: RAISE fnd_api.g_exc_unexpected_error;
817: END IF;
818:
819: --+
820: -- Initialize message list if p_init_msg_list is set to TRUE.

Line 822: IF fnd_api.to_boolean (p_init_msg_list)

818:
819: --+
820: -- Initialize message list if p_init_msg_list is set to TRUE.
821: -- +
822: IF fnd_api.to_boolean (p_init_msg_list)
823: THEN
824: fnd_msg_pub.initialize;
825: END IF;
826:

Line 830: x_return_status := fnd_api.g_ret_sts_success;

826:
827: -- +
828: -- Initialize API return status to success
829: --+
830: x_return_status := fnd_api.g_ret_sts_success;
831: x_loading_status := 'CN_UPDATED';
832:
833: -- +
834: -- API body

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

847: x_loading_status => l_loading_status
848: );
849: x_loading_status := l_loading_status;
850:
851: IF (x_return_status <> fnd_api.g_ret_sts_success)
852: THEN
853: RAISE fnd_api.g_exc_error;
854: END IF;
855:

Line 853: RAISE fnd_api.g_exc_error;

849: x_loading_status := l_loading_status;
850:
851: IF (x_return_status <> fnd_api.g_ret_sts_success)
852: THEN
853: RAISE fnd_api.g_exc_error;
854: END IF;
855:
856: --validate
857: check_valid_update (x_return_status => x_return_status,

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

869: x_loading_status := l_loading_status;
870:
871: -- If not success the Raise error
872: -- if PLN_QUOTA_UPLIFT_EXISTS
873: IF (x_return_status <> fnd_api.g_ret_sts_success)
874: THEN
875: RAISE fnd_api.g_exc_error;
876: ELSIF x_loading_status = 'CN_UPDATED'
877: THEN

Line 875: RAISE fnd_api.g_exc_error;

871: -- If not success the Raise error
872: -- if PLN_QUOTA_UPLIFT_EXISTS
873: IF (x_return_status <> fnd_api.g_ret_sts_success)
874: THEN
875: RAISE fnd_api.g_exc_error;
876: ELSIF x_loading_status = 'CN_UPDATED'
877: THEN
878: cn_quota_rule_uplifts_pkg.begin_record (x_operation => 'UPDATE',
879: x_org_id => l_pe_rec.org_id,

Line 907: RAISE fnd_api.g_exc_error;

903: l_uplift_date_seq_rec_tbl (i).end_date_old := p_rev_uplift_rec_tbl (i).end_date_old;
904: l_uplift_date_seq_rec_tbl (i).quota_rule_id := l_pe_rec.quota_rule_id;
905: l_uplift_date_seq_rec_tbl (i).quota_rule_uplift_id := p_rev_uplift_rec_tbl (i).quota_rule_uplift_id;
906: ELSE
907: RAISE fnd_api.g_exc_error;
908: END IF;
909: END LOOP;
910:
911: FOR i IN 1 .. l_uplift_date_seq_rec_tbl.COUNT

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

910:
911: FOR i IN 1 .. l_uplift_date_seq_rec_tbl.COUNT
912: LOOP
913: IF (( TRUNC (l_uplift_date_seq_rec_tbl (i).start_date_old) <> TRUNC (l_uplift_date_seq_rec_tbl (i).start_date)
914: OR NVL (TRUNC (l_uplift_date_seq_rec_tbl (i).end_date_old), fnd_api.g_miss_date) <>
915: NVL (TRUNC (l_uplift_date_seq_rec_tbl (i).end_date), fnd_api.g_miss_date)
916: )
917: )
918: THEN

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

911: FOR i IN 1 .. l_uplift_date_seq_rec_tbl.COUNT
912: LOOP
913: IF (( TRUNC (l_uplift_date_seq_rec_tbl (i).start_date_old) <> TRUNC (l_uplift_date_seq_rec_tbl (i).start_date)
914: OR NVL (TRUNC (l_uplift_date_seq_rec_tbl (i).end_date_old), fnd_api.g_miss_date) <>
915: NVL (TRUNC (l_uplift_date_seq_rec_tbl (i).end_date), fnd_api.g_miss_date)
916: )
917: )
918: THEN
919: /*

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

927: x_loading_status => l_loading_status
928: );
929: x_loading_status := l_loading_status;
930: */
931: IF (x_return_status <> fnd_api.g_ret_sts_success)
932: THEN
933: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error)
934: THEN
935: fnd_message.set_name ('CN', 'CN_INVALID_DATE_SEQUENCE');

Line 940: RAISE fnd_api.g_exc_error;

936: fnd_msg_pub.ADD;
937: END IF;
938:
939: x_loading_status := 'INVALID_DATE_SEQUENCE';
940: RAISE fnd_api.g_exc_error;
941: END IF;
942: END IF;
943: END LOOP;
944: END IF; -- Table Count is Not Zero

Line 949: IF fnd_api.to_boolean (p_commit)

945:
946: -- End of API body.
947: -- Standard check of p_commit.
948: --+
949: IF fnd_api.to_boolean (p_commit)
950: THEN
951: COMMIT WORK;
952: END IF;
953:

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

953:
954: --+
955: -- Standard call to get message count and if count is 1, get message info.
956: --+
957: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
958: EXCEPTION
959: WHEN fnd_api.g_exc_error
960: THEN
961: ROLLBACK TO update_quota_rule_uplift;

Line 959: WHEN fnd_api.g_exc_error

955: -- Standard call to get message count and if count is 1, get message info.
956: --+
957: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
958: EXCEPTION
959: WHEN fnd_api.g_exc_error
960: THEN
961: ROLLBACK TO update_quota_rule_uplift;
962: x_return_status := fnd_api.g_ret_sts_error;
963: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

Line 962: x_return_status := fnd_api.g_ret_sts_error;

958: EXCEPTION
959: WHEN fnd_api.g_exc_error
960: THEN
961: ROLLBACK TO update_quota_rule_uplift;
962: x_return_status := fnd_api.g_ret_sts_error;
963: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
964: WHEN fnd_api.g_exc_unexpected_error
965: THEN
966: ROLLBACK TO update_quota_rule_uplift;

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

959: WHEN fnd_api.g_exc_error
960: THEN
961: ROLLBACK TO update_quota_rule_uplift;
962: x_return_status := fnd_api.g_ret_sts_error;
963: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
964: WHEN fnd_api.g_exc_unexpected_error
965: THEN
966: ROLLBACK TO update_quota_rule_uplift;
967: x_loading_status := 'UNEXPECTED_ERR';

Line 964: WHEN fnd_api.g_exc_unexpected_error

960: THEN
961: ROLLBACK TO update_quota_rule_uplift;
962: x_return_status := fnd_api.g_ret_sts_error;
963: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
964: WHEN fnd_api.g_exc_unexpected_error
965: THEN
966: ROLLBACK TO update_quota_rule_uplift;
967: x_loading_status := 'UNEXPECTED_ERR';
968: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 968: x_return_status := fnd_api.g_ret_sts_unexp_error;

964: WHEN fnd_api.g_exc_unexpected_error
965: THEN
966: ROLLBACK TO update_quota_rule_uplift;
967: x_loading_status := 'UNEXPECTED_ERR';
968: x_return_status := fnd_api.g_ret_sts_unexp_error;
969: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
970: WHEN OTHERS
971: THEN
972: ROLLBACK TO update_quota_rule_uplift;

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

965: THEN
966: ROLLBACK TO update_quota_rule_uplift;
967: x_loading_status := 'UNEXPECTED_ERR';
968: x_return_status := fnd_api.g_ret_sts_unexp_error;
969: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
970: WHEN OTHERS
971: THEN
972: ROLLBACK TO update_quota_rule_uplift;
973: x_loading_status := 'UNEXPECTED_ERR';

Line 974: x_return_status := fnd_api.g_ret_sts_unexp_error;

970: WHEN OTHERS
971: THEN
972: ROLLBACK TO update_quota_rule_uplift;
973: x_loading_status := 'UNEXPECTED_ERR';
974: x_return_status := fnd_api.g_ret_sts_unexp_error;
975:
976: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
977: THEN
978: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

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: THEN
978: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
979: END IF;
980:
981: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
982: END update_quota_rule_uplift;
983:
984: -- ----------------------------------------------------------------------------+
985: --

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

987: --
988: -- ----------------------------------------------------------------------------+
989: PROCEDURE delete_quota_rule_uplift (
990: p_api_version IN NUMBER,
991: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
992: p_commit IN VARCHAR2 := fnd_api.g_false,
993: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
994: x_return_status OUT NOCOPY VARCHAR2,
995: x_msg_count OUT NOCOPY NUMBER,

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

988: -- ----------------------------------------------------------------------------+
989: PROCEDURE delete_quota_rule_uplift (
990: p_api_version IN NUMBER,
991: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
992: p_commit IN VARCHAR2 := fnd_api.g_false,
993: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
994: x_return_status OUT NOCOPY VARCHAR2,
995: x_msg_count OUT NOCOPY NUMBER,
996: x_msg_data OUT NOCOPY VARCHAR2,

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

989: PROCEDURE delete_quota_rule_uplift (
990: p_api_version IN NUMBER,
991: p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
992: p_commit IN VARCHAR2 := fnd_api.g_false,
993: p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
994: x_return_status OUT NOCOPY VARCHAR2,
995: x_msg_count OUT NOCOPY NUMBER,
996: x_msg_data OUT NOCOPY VARCHAR2,
997: p_quota_name IN VARCHAR2,

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

1009: -- Standard Start of API savepoint
1010: SAVEPOINT delete_quota_rule_uplift;
1011:
1012: -- Standard call to check for call compatibility.
1013: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
1014: THEN
1015: RAISE fnd_api.g_exc_unexpected_error;
1016: END IF;
1017:

Line 1015: RAISE fnd_api.g_exc_unexpected_error;

1011:
1012: -- Standard call to check for call compatibility.
1013: IF NOT fnd_api.compatible_api_call (l_api_version, p_api_version, l_api_name, g_pkg_name)
1014: THEN
1015: RAISE fnd_api.g_exc_unexpected_error;
1016: END IF;
1017:
1018: -- Initialize message list if p_init_msg_list is set to TRUE.
1019: IF fnd_api.to_boolean (p_init_msg_list)

Line 1019: IF fnd_api.to_boolean (p_init_msg_list)

1015: RAISE fnd_api.g_exc_unexpected_error;
1016: END IF;
1017:
1018: -- Initialize message list if p_init_msg_list is set to TRUE.
1019: IF fnd_api.to_boolean (p_init_msg_list)
1020: THEN
1021: fnd_msg_pub.initialize;
1022: END IF;
1023:

Line 1025: x_return_status := fnd_api.g_ret_sts_success;

1021: fnd_msg_pub.initialize;
1022: END IF;
1023:
1024: -- Initialize API return status to success
1025: x_return_status := fnd_api.g_ret_sts_success;
1026: x_loading_status := 'CN_DELETED';
1027:
1028: -- API body
1029: -- Store the User Input Value into The Local Variable.

Line 1077: RAISE fnd_api.g_exc_error;

1073: fnd_msg_pub.ADD;
1074: END IF;
1075:
1076: x_loading_status := 'QUOTA_UPLIFT_NOT_EXIST';
1077: RAISE fnd_api.g_exc_error;
1078: END IF;
1079:
1080: -- Check whether delete is Allowed, this only first and last record can
1081: -- be deleted

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

1089: x_loading_status => l_loading_status
1090: );
1091: x_loading_status := l_loading_status;
1092:
1093: IF (x_return_status <> fnd_api.g_ret_sts_success)
1094: THEN
1095: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error)
1096: THEN
1097: fnd_message.set_name ('CN', 'CN_UPLIFT_DELETE_NOT_ALLOWED');

Line 1102: RAISE fnd_api.g_exc_error;

1098: fnd_msg_pub.ADD;
1099: END IF;
1100:
1101: x_loading_status := 'CN_UPLIFT_DELETE_NOT_ALLOWED';
1102: RAISE fnd_api.g_exc_error;
1103: END IF;
1104:
1105: -- Check the Return status and the status is same as CN_DELETED.
1106: IF (x_return_status <> fnd_api.g_ret_sts_success)

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

1102: RAISE fnd_api.g_exc_error;
1103: END IF;
1104:
1105: -- Check the Return status and the status is same as CN_DELETED.
1106: IF (x_return_status <> fnd_api.g_ret_sts_success)
1107: THEN
1108: RAISE fnd_api.g_exc_error;
1109: ELSIF x_loading_status = 'CN_DELETED'
1110: THEN

Line 1108: RAISE fnd_api.g_exc_error;

1104:
1105: -- Check the Return status and the status is same as CN_DELETED.
1106: IF (x_return_status <> fnd_api.g_ret_sts_success)
1107: THEN
1108: RAISE fnd_api.g_exc_error;
1109: ELSIF x_loading_status = 'CN_DELETED'
1110: THEN
1111: cn_quota_rule_uplifts_pkg.begin_record (x_operation => 'DELETE',
1112: x_org_id => l_pe_rec.org_id,

Line 1134: RAISE fnd_api.g_exc_error;

1130: x_status_code => NULL,
1131: x_object_version_number => p_rev_uplift_rec_tbl (i).object_version_number
1132: );
1133: ELSE
1134: RAISE fnd_api.g_exc_error;
1135: END IF;
1136: END LOOP;
1137: END IF; -- Table Count is Not Zero
1138:

Line 1142: IF fnd_api.to_boolean (p_commit)

1138:
1139: -- End of API body.
1140: -- Standard check of p_commit.
1141: --+
1142: IF fnd_api.to_boolean (p_commit)
1143: THEN
1144: COMMIT WORK;
1145: END IF;
1146:

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

1146:
1147: --+
1148: -- Standard call to get message count and if count is 1, get message info.
1149: --+
1150: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1151: EXCEPTION
1152: WHEN fnd_api.g_exc_error
1153: THEN
1154: ROLLBACK TO delete_quota_rule_uplift;

Line 1152: WHEN fnd_api.g_exc_error

1148: -- Standard call to get message count and if count is 1, get message info.
1149: --+
1150: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1151: EXCEPTION
1152: WHEN fnd_api.g_exc_error
1153: THEN
1154: ROLLBACK TO delete_quota_rule_uplift;
1155: x_return_status := fnd_api.g_ret_sts_error;
1156: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);

Line 1155: x_return_status := fnd_api.g_ret_sts_error;

1151: EXCEPTION
1152: WHEN fnd_api.g_exc_error
1153: THEN
1154: ROLLBACK TO delete_quota_rule_uplift;
1155: x_return_status := fnd_api.g_ret_sts_error;
1156: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1157: WHEN fnd_api.g_exc_unexpected_error
1158: THEN
1159: ROLLBACK TO delete_quota_rule_uplift;

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

1152: WHEN fnd_api.g_exc_error
1153: THEN
1154: ROLLBACK TO delete_quota_rule_uplift;
1155: x_return_status := fnd_api.g_ret_sts_error;
1156: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1157: WHEN fnd_api.g_exc_unexpected_error
1158: THEN
1159: ROLLBACK TO delete_quota_rule_uplift;
1160: x_loading_status := 'UNEXPECTED_ERR';

Line 1157: WHEN fnd_api.g_exc_unexpected_error

1153: THEN
1154: ROLLBACK TO delete_quota_rule_uplift;
1155: x_return_status := fnd_api.g_ret_sts_error;
1156: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1157: WHEN fnd_api.g_exc_unexpected_error
1158: THEN
1159: ROLLBACK TO delete_quota_rule_uplift;
1160: x_loading_status := 'UNEXPECTED_ERR';
1161: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 1161: x_return_status := fnd_api.g_ret_sts_unexp_error;

1157: WHEN fnd_api.g_exc_unexpected_error
1158: THEN
1159: ROLLBACK TO delete_quota_rule_uplift;
1160: x_loading_status := 'UNEXPECTED_ERR';
1161: x_return_status := fnd_api.g_ret_sts_unexp_error;
1162: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1163: WHEN OTHERS
1164: THEN
1165: ROLLBACK TO delete_quota_rule_uplift;

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

1158: THEN
1159: ROLLBACK TO delete_quota_rule_uplift;
1160: x_loading_status := 'UNEXPECTED_ERR';
1161: x_return_status := fnd_api.g_ret_sts_unexp_error;
1162: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1163: WHEN OTHERS
1164: THEN
1165: ROLLBACK TO delete_quota_rule_uplift;
1166: x_loading_status := 'UNEXPECTED_ERR';

Line 1167: x_return_status := fnd_api.g_ret_sts_unexp_error;

1163: WHEN OTHERS
1164: THEN
1165: ROLLBACK TO delete_quota_rule_uplift;
1166: x_loading_status := 'UNEXPECTED_ERR';
1167: x_return_status := fnd_api.g_ret_sts_unexp_error;
1168:
1169: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
1170: THEN
1171: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);

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: THEN
1171: fnd_msg_pub.add_exc_msg (g_pkg_name, l_api_name);
1172: END IF;
1173:
1174: fnd_msg_pub.count_and_get (p_count => x_msg_count, p_data => x_msg_data, p_encoded => fnd_api.g_false);
1175: END delete_quota_rule_uplift;
1176: END cn_quota_rule_uplifts_grp;