DBA Data[Home] [Help]

APPS.CN_CHK_PLAN_ELEMENT_PKG dependencies on FND_API

Line 20: -- := FND_API.G_MISS_CHAR;

16: IS
17: l_api_name CONSTANT VARCHAR2 (30) := 'valid_rate_table';
18: l_tmp NUMBER := 0;
19: -- l_tier_unit_code cn_rate_schedules.tier_unit_code%TYPE
20: -- := FND_API.G_MISS_CHAR;
21: l_comm_unit_code cn_rate_schedules.commission_unit_code%TYPE := fnd_api.g_miss_char;
22: BEGIN
23: /*
24: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 21: l_comm_unit_code cn_rate_schedules.commission_unit_code%TYPE := fnd_api.g_miss_char;

17: l_api_name CONSTANT VARCHAR2 (30) := 'valid_rate_table';
18: l_tmp NUMBER := 0;
19: -- l_tier_unit_code cn_rate_schedules.tier_unit_code%TYPE
20: -- := FND_API.G_MISS_CHAR;
21: l_comm_unit_code cn_rate_schedules.commission_unit_code%TYPE := fnd_api.g_miss_char;
22: BEGIN
23: /*
24: x_return_status := FND_API.G_RET_STS_SUCCESS;
25: x_loading_status := p_loading_status;

Line 24: x_return_status := FND_API.G_RET_STS_SUCCESS;

20: -- := FND_API.G_MISS_CHAR;
21: l_comm_unit_code cn_rate_schedules.commission_unit_code%TYPE := fnd_api.g_miss_char;
22: BEGIN
23: /*
24: x_return_status := FND_API.G_RET_STS_SUCCESS;
25: x_loading_status := p_loading_status;
26:
27: -- Rate Table CAN NOT NULL if plan element type is not 'DRAW or MANUAL'
28: IF (p_pe_rec.quota_type_code IN

Line 41: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN

37: p_token1 => NULL ,
38: p_token2 => NULL ,
39: p_token3 => NULL ,
40: p_loading_status => x_loading_status,
41: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN
42: RAISE FND_API.G_EXC_ERROR ;
43: END IF;
44: -- Rasie error when user missing Pass in Rate table Name
45: IF ( (cn_api.chk_miss_char_para

Line 42: RAISE FND_API.G_EXC_ERROR ;

38: p_token2 => NULL ,
39: p_token3 => NULL ,
40: p_loading_status => x_loading_status,
41: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN
42: RAISE FND_API.G_EXC_ERROR ;
43: END IF;
44: -- Rasie error when user missing Pass in Rate table Name
45: IF ( (cn_api.chk_miss_char_para
46: ( p_char_para => p_pe_rec.rate_table_name,

Line 49: x_loading_status => x_loading_status)) = FND_API.G_TRUE) THEN

45: IF ( (cn_api.chk_miss_char_para
46: ( p_char_para => p_pe_rec.rate_table_name,
47: p_para_name => G_RATE_TB,
48: p_loading_status => x_loading_status,
49: x_loading_status => x_loading_status)) = FND_API.G_TRUE) THEN
50: RAISE FND_API.G_EXC_ERROR ;
51: END IF;
52: -- Rasie error when user pass in rate table name not exist in
53: -- cn_rate_schedules

Line 50: RAISE FND_API.G_EXC_ERROR ;

46: ( p_char_para => p_pe_rec.rate_table_name,
47: p_para_name => G_RATE_TB,
48: p_loading_status => x_loading_status,
49: x_loading_status => x_loading_status)) = FND_API.G_TRUE) THEN
50: RAISE FND_API.G_EXC_ERROR ;
51: END IF;
52: -- Rasie error when user pass in rate table name not exist in
53: -- cn_rate_schedules
54: IF (CN_API.get_rate_table_id(p_pe_rec.rate_table_name)) IS NULL THEN

Line 61: RAISE FND_API.G_EXC_ERROR ;

57: FND_MESSAGE.SET_NAME ('CN' , 'CN_RATE_SCH_NOT_EXIST');
58: FND_MSG_PUB.Add;
59: END IF;
60: x_loading_status := 'CN_RATE_SCH_NOT_EXIST';
61: RAISE FND_API.G_EXC_ERROR ;
62: END IF ;
63: ELSIF p_pe_rec.rate_table_name IS NULL THEN
64: -- Rate_table_id not null and rate_table_name null, check if
65: -- Rate_table_id is exist in DB

Line 73: RAISE FND_API.G_EXC_ERROR ;

69: FND_MESSAGE.SET_NAME ('CN' , 'CN_RATE_SCH_NOT_EXIST');
70: FND_MSG_PUB.Add;
71: END IF;
72: x_loading_status := 'CN_RATE_SCH_NOT_EXIST';
73: RAISE FND_API.G_EXC_ERROR ;
74: END IF ;
75: ELSE
76: -- If rate_table_id and rate_table_name both are not missing or null,
77: -- make sure they're compatible, access to same record in

Line 93: RAISE FND_API.G_EXC_ERROR ;

89: p_pe_rec.rate_table_id);
90: FND_MSG_PUB.Add;
91: END IF;
92: x_loading_status := 'CN_VALUE_ID_ERROR';
93: RAISE FND_API.G_EXC_ERROR ;
94: END IF;
95: END IF;
96: END IF ; -- end quota_type_code
97: --+

Line 115: RAISE FND_API.G_EXC_ERROR ;

111: FND_MESSAGE.SET_TOKEN ('QUOTA_NAME',p_pe_rec.name);
112: FND_MSG_PUB.Add;
113: END IF;
114: x_loading_status := 'PLN_QUOTA_SCHED_INCOMPAT_TP';
115: RAISE FND_API.G_EXC_ERROR ;
116: END IF;
117: ELSIF p_pe_rec.quota_type_code IN ('REVENUE','UNIT_BASED_NON_QUOTA') THEN
118: IF l_tier_unit_code <> 'AMOUNT' THEN
119: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 127: RAISE FND_API.G_EXC_ERROR ;

123: FND_MESSAGE.SET_TOKEN ('QUOTA_NAME',p_pe_rec.name);
124: FND_MSG_PUB.Add;
125: END IF;
126: x_loading_status := 'PLN_QUOTA_SCHED_INCOMPAT_RA';
127: RAISE FND_API.G_EXC_ERROR ;
128: END IF;
129: ELSIF p_pe_rec.quota_type_code IN ('DISCOUNT','MARGIN') THEN
130: IF l_tier_unit_code <> 'PERCENT' THEN
131: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 139: RAISE FND_API.G_EXC_ERROR ;

135: FND_MESSAGE.SET_TOKEN ('QUOTA_NAME',p_pe_rec.name);
136: FND_MSG_PUB.Add;
137: END IF;
138: x_loading_status := 'PLN_QUOTA_SCHED_INCOMPAT_DP';
139: RAISE FND_API.G_EXC_ERROR ;
140: END IF;
141: END IF;
142: -- check commission unit code
143: IF p_pe_rec.payment_type_code IN ('PAYMENT','TRANSACTION') THEN

Line 153: RAISE FND_API.G_EXC_ERROR ;

149: FND_MESSAGE.SET_TOKEN ('QUOTA_NAME',p_pe_rec.name);
150: FND_MSG_PUB.Add;
151: END IF;
152: x_loading_status := 'PLN_QUOTA_SCHED_INCOMPAT_PP';
153: RAISE FND_API.G_EXC_ERROR ;
154: END IF;
155: ELSIF p_pe_rec.payment_type_code = 'FIXED' THEN
156: IF l_comm_unit_code <> 'AMOUNT' THEN
157: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 165: RAISE FND_API.G_EXC_ERROR ;

161: FND_MESSAGE.SET_TOKEN('QUOTA_NAME',p_pe_rec.name);
162: FND_MSG_PUB.Add;
163: END IF;
164: x_loading_status := 'PLN_QUOTA_SCHED_INCOMPAT_FA';
165: RAISE FND_API.G_EXC_ERROR ;
166: END IF;
167: END IF ;
168: -- Check if rate table doesn't have any rate tiers
169: SELECT COUNT(*)

Line 184: RAISE FND_API.G_EXC_ERROR ;

180: FND_MESSAGE.SET_TOKEN('SCHEDULE_NAME',p_pe_rec.rate_table_name);
181: FND_MSG_PUB.Add;
182: END IF;
183: x_loading_status := 'PLN_SCHEDULE_NO_TIERS';
184: RAISE FND_API.G_EXC_ERROR ;
185: END IF;
186:
187: EXCEPTION
188: WHEN FND_API.G_EXC_ERROR THEN

Line 188: WHEN FND_API.G_EXC_ERROR THEN

184: RAISE FND_API.G_EXC_ERROR ;
185: END IF;
186:
187: EXCEPTION
188: WHEN FND_API.G_EXC_ERROR THEN
189: x_return_status := FND_API.G_RET_STS_ERROR ;
190:
191: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
192: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

Line 189: x_return_status := FND_API.G_RET_STS_ERROR ;

185: END IF;
186:
187: EXCEPTION
188: WHEN FND_API.G_EXC_ERROR THEN
189: x_return_status := FND_API.G_RET_STS_ERROR ;
190:
191: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
192: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
193: x_loading_status := 'UNEXPECTED_ERR';

Line 191: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

187: EXCEPTION
188: WHEN FND_API.G_EXC_ERROR THEN
189: x_return_status := FND_API.G_RET_STS_ERROR ;
190:
191: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
192: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
193: x_loading_status := 'UNEXPECTED_ERR';
194:
195: WHEN OTHERS THEN

Line 192: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

188: WHEN FND_API.G_EXC_ERROR THEN
189: x_return_status := FND_API.G_RET_STS_ERROR ;
190:
191: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
192: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
193: x_loading_status := 'UNEXPECTED_ERR';
194:
195: WHEN OTHERS THEN
196: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

Line 196: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

192: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
193: x_loading_status := 'UNEXPECTED_ERR';
194:
195: WHEN OTHERS THEN
196: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
197: x_loading_status := 'UNEXPECTED_ERR';
198: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
199: THEN
200: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME ,l_api_name );

Line 205: x_return_status := fnd_api.g_ret_sts_unexp_error;

201: END IF;
202: */
203: fnd_message.set_name ('CN', 'CN_PACKAGE_OBSELETE');
204: fnd_msg_pub.ADD;
205: x_return_status := fnd_api.g_ret_sts_unexp_error;
206: x_loading_status := 'CN_PACKAGE_OBSELETE';
207: RAISE fnd_api.g_exc_error;
208: END valid_rate_table;
209:

Line 207: RAISE fnd_api.g_exc_error;

203: fnd_message.set_name ('CN', 'CN_PACKAGE_OBSELETE');
204: fnd_msg_pub.ADD;
205: x_return_status := fnd_api.g_ret_sts_unexp_error;
206: x_loading_status := 'CN_PACKAGE_OBSELETE';
207: RAISE fnd_api.g_exc_error;
208: END valid_rate_table;
209:
210: -- ----------------------------------------------------------------------------+
211: -- Procedure: valid_disc_rate_table

Line 224: -- := FND_API.G_MISS_CHAR;

220: IS
221: l_api_name CONSTANT VARCHAR2 (30) := 'valid_disc_rate_table';
222: l_tmp NUMBER := 0;
223: -- l_tier_unit_code cn_rate_schedules.tier_unit_code%TYPE
224: -- := FND_API.G_MISS_CHAR;
225: l_comm_unit_code cn_rate_schedules.commission_unit_code%TYPE := fnd_api.g_miss_char;
226: BEGIN
227: /* x_return_status := FND_API.G_RET_STS_SUCCESS;
228: x_loading_status := p_loading_status;

Line 225: l_comm_unit_code cn_rate_schedules.commission_unit_code%TYPE := fnd_api.g_miss_char;

221: l_api_name CONSTANT VARCHAR2 (30) := 'valid_disc_rate_table';
222: l_tmp NUMBER := 0;
223: -- l_tier_unit_code cn_rate_schedules.tier_unit_code%TYPE
224: -- := FND_API.G_MISS_CHAR;
225: l_comm_unit_code cn_rate_schedules.commission_unit_code%TYPE := fnd_api.g_miss_char;
226: BEGIN
227: /* x_return_status := FND_API.G_RET_STS_SUCCESS;
228: x_loading_status := p_loading_status;
229:

Line 227: /* x_return_status := FND_API.G_RET_STS_SUCCESS;

223: -- l_tier_unit_code cn_rate_schedules.tier_unit_code%TYPE
224: -- := FND_API.G_MISS_CHAR;
225: l_comm_unit_code cn_rate_schedules.commission_unit_code%TYPE := fnd_api.g_miss_char;
226: BEGIN
227: /* x_return_status := FND_API.G_RET_STS_SUCCESS;
228: x_loading_status := p_loading_status;
229:
230: -- Disc Rate Table CAN NOT NULL if plan element type is Rev quota, Rev non
231: -- quota and discount option code = payment or quota

Line 246: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN

242: (p_pe_rec.disc_option_code,'DISCOUNT_OPTION'),
243: p_token2 => NULL ,
244: p_token3 => NULL ,
245: p_loading_status => x_loading_status,
246: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN
247: RAISE FND_API.G_EXC_ERROR ;
248: END IF;
249: -- Rasie error when user missing Pass in Discount Rate table Name
250: IF ( (cn_api.chk_miss_char_para

Line 247: RAISE FND_API.G_EXC_ERROR ;

243: p_token2 => NULL ,
244: p_token3 => NULL ,
245: p_loading_status => x_loading_status,
246: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN
247: RAISE FND_API.G_EXC_ERROR ;
248: END IF;
249: -- Rasie error when user missing Pass in Discount Rate table Name
250: IF ( (cn_api.chk_miss_char_para
251: ( p_char_para => p_pe_rec.disc_rate_table_name,

Line 254: x_loading_status => x_loading_status)) = FND_API.G_TRUE) THEN

250: IF ( (cn_api.chk_miss_char_para
251: ( p_char_para => p_pe_rec.disc_rate_table_name,
252: p_para_name => G_DISC_RATE_TB,
253: p_loading_status => x_loading_status,
254: x_loading_status => x_loading_status)) = FND_API.G_TRUE) THEN
255: RAISE FND_API.G_EXC_ERROR ;
256: END IF;
257: -- Rasie error when user pass in dicsount rate table name not exist in
258: -- cn_rate_schedules

Line 255: RAISE FND_API.G_EXC_ERROR ;

251: ( p_char_para => p_pe_rec.disc_rate_table_name,
252: p_para_name => G_DISC_RATE_TB,
253: p_loading_status => x_loading_status,
254: x_loading_status => x_loading_status)) = FND_API.G_TRUE) THEN
255: RAISE FND_API.G_EXC_ERROR ;
256: END IF;
257: -- Rasie error when user pass in dicsount rate table name not exist in
258: -- cn_rate_schedules
259: IF (CN_API.get_rate_table_id(p_pe_rec.disc_rate_table_name)) IS NULL

Line 267: RAISE FND_API.G_EXC_ERROR ;

263: FND_MESSAGE.SET_NAME ('CN' , 'PLN_QUOTA_DISC_SCHED_REQUIRED');
264: FND_MSG_PUB.Add;
265: END IF;
266: x_loading_status := 'PLN_QUOTA_DISC_SCHED_REQUIRED';
267: RAISE FND_API.G_EXC_ERROR ;
268: END IF ;
269: ELSIF p_pe_rec.disc_rate_table_name IS NULL THEN
270: -- Disc_Rate_table_id not null and disc_rate_table_name null, check if
271: -- Disc_rate_table_id is exist in DB

Line 280: RAISE FND_API.G_EXC_ERROR ;

276: FND_MESSAGE.SET_NAME ('CN' ,'PLN_QUOTA_DISC_SCHED_REQUIRED');
277: FND_MSG_PUB.Add;
278: END IF;
279: x_loading_status := 'PLN_QUOTA_DISC_SCHED_REQUIRED';
280: RAISE FND_API.G_EXC_ERROR ;
281: END IF ;
282: ELSE
283: -- If disc_rate_table_id and disc_rate_table_name both are not
284: -- missing or null,

Line 301: RAISE FND_API.G_EXC_ERROR ;

297: p_pe_rec.disc_rate_table_id);
298: FND_MSG_PUB.Add;
299: END IF;
300: x_loading_status := 'CN_VALUE_ID_ERROR';
301: RAISE FND_API.G_EXC_ERROR ;
302: END IF;
303: END IF;
304:
305: -- Check discount rate table <> rate table

Line 313: RAISE FND_API.G_EXC_ERROR ;

309: FND_MESSAGE.SET_NAME ('CN' , 'DISC_RATE_TABLE_SAME');
310: FND_MSG_PUB.Add;
311: END IF;
312: x_loading_status := 'DISC_RATE_TABLE_SAME';
313: RAISE FND_API.G_EXC_ERROR ;
314: END IF;
315:
316: --+
317: -- check tier/commission unit code

Line 333: RAISE FND_API.G_EXC_ERROR ;

329: FND_MESSAGE.SET_TOKEN('QUOTA_NAME',p_pe_rec.name);
330: FND_MSG_PUB.Add;
331: END IF;
332: x_loading_status := 'PLN_QUOTA_DISC_SCHED_NOT_PP';
333: RAISE FND_API.G_EXC_ERROR ;
334: END IF;
335:
336: -- Check if rate table doesn't have any rate tiers
337: SELECT COUNT(*)

Line 353: RAISE FND_API.G_EXC_ERROR ;

349: ('SCHEDULE_NAME',p_pe_rec.disc_rate_table_name);
350: FND_MSG_PUB.Add;
351: END IF;
352: x_loading_status := 'PLN_SCHEDULE_NO_TIERS';
353: RAISE FND_API.G_EXC_ERROR ;
354: END IF;
355:
356: END IF ; -- end quota_type_code
357:

Line 359: WHEN FND_API.G_EXC_ERROR THEN

355:
356: END IF ; -- end quota_type_code
357:
358: EXCEPTION
359: WHEN FND_API.G_EXC_ERROR THEN
360: x_return_status := FND_API.G_RET_STS_ERROR ;
361:
362: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
363: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

Line 360: x_return_status := FND_API.G_RET_STS_ERROR ;

356: END IF ; -- end quota_type_code
357:
358: EXCEPTION
359: WHEN FND_API.G_EXC_ERROR THEN
360: x_return_status := FND_API.G_RET_STS_ERROR ;
361:
362: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
363: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
364: x_loading_status := 'UNEXPECTED_ERR';

Line 362: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

358: EXCEPTION
359: WHEN FND_API.G_EXC_ERROR THEN
360: x_return_status := FND_API.G_RET_STS_ERROR ;
361:
362: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
363: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
364: x_loading_status := 'UNEXPECTED_ERR';
365:
366: WHEN OTHERS THEN

Line 363: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

359: WHEN FND_API.G_EXC_ERROR THEN
360: x_return_status := FND_API.G_RET_STS_ERROR ;
361:
362: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
363: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
364: x_loading_status := 'UNEXPECTED_ERR';
365:
366: WHEN OTHERS THEN
367: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

Line 367: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

363: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
364: x_loading_status := 'UNEXPECTED_ERR';
365:
366: WHEN OTHERS THEN
367: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
368: x_loading_status := 'UNEXPECTED_ERR';
369: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
370: THEN
371: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME ,l_api_name );

Line 376: x_return_status := fnd_api.g_ret_sts_unexp_error;

372: END IF;
373: */
374: fnd_message.set_name ('CN', 'CN_PACKAGE_OBSELETE');
375: fnd_msg_pub.ADD;
376: x_return_status := fnd_api.g_ret_sts_unexp_error;
377: x_loading_status := 'CN_PACKAGE_OBSELETE';
378: RAISE fnd_api.g_exc_error;
379: END valid_disc_rate_table;
380:

Line 378: RAISE fnd_api.g_exc_error;

374: fnd_message.set_name ('CN', 'CN_PACKAGE_OBSELETE');
375: fnd_msg_pub.ADD;
376: x_return_status := fnd_api.g_ret_sts_unexp_error;
377: x_loading_status := 'CN_PACKAGE_OBSELETE';
378: RAISE fnd_api.g_exc_error;
379: END valid_disc_rate_table;
380:
381: -- ----------------------------------------------------------------------------+
382: -- Procedure: validate_org_id

Line 400: RAISE fnd_api.g_exc_error;

396: fnd_message.set_token ('INPUT_NAME', cn_api.get_lkup_meaning ('ORGANIZATION', 'PE_OBJECT_TYPE'));
397: fnd_msg_pub.ADD;
398: END IF;
399:
400: RAISE fnd_api.g_exc_error;
401: END IF;
402: END validate_org_id;
403:
404: -- ----------------------------------------------------------------------------+

Line 420: x_return_status := fnd_api.g_ret_sts_success;

416: l_api_name CONSTANT VARCHAR2 (30) := 'valid_revenue_class';
417: l_loading_status VARCHAR2 (80);
418: BEGIN
419: -- Added the one more parameter to check the old revenue class
420: x_return_status := fnd_api.g_ret_sts_success;
421: x_loading_status := p_loading_status;
422:
423: -- Revenue Class CAN NOT NULL if plan element type is COMMISSION
424: IF (p_pe_rec.incentive_type_code IN ('COMMISSION'))

Line 437: ) = fnd_api.g_false

433: p_token2 => NULL,
434: p_token3 => NULL,
435: p_loading_status => x_loading_status,
436: x_loading_status => l_loading_status
437: ) = fnd_api.g_false
438: )
439: THEN
440: RAISE fnd_api.g_exc_error;
441: END IF;

Line 440: RAISE fnd_api.g_exc_error;

436: x_loading_status => l_loading_status
437: ) = fnd_api.g_false
438: )
439: THEN
440: RAISE fnd_api.g_exc_error;
441: END IF;
442:
443: -- Rasie error when user missing Pass in revenue class Name
444: IF ((cn_api.chk_miss_char_para (p_char_para => p_pe_rec.rev_class_name,

Line 449: ) = fnd_api.g_true

445: p_para_name => g_rev_cls_name,
446: p_loading_status => x_loading_status,
447: x_loading_status => l_loading_status
448: )
449: ) = fnd_api.g_true
450: )
451: THEN
452: RAISE fnd_api.g_exc_error;
453: END IF;

Line 452: RAISE fnd_api.g_exc_error;

448: )
449: ) = fnd_api.g_true
450: )
451: THEN
452: RAISE fnd_api.g_exc_error;
453: END IF;
454:
455: -- Rasie error when user pass in revenue class name not exist in
456: -- cn_revenue_classes

Line 466: RAISE fnd_api.g_exc_error;

462: fnd_msg_pub.ADD;
463: END IF;
464:
465: x_loading_status := 'CN_REV_CLASS_NOT_EXIST';
466: RAISE fnd_api.g_exc_error;
467: END IF;
468: ELSIF p_pe_rec.rev_class_name IS NULL
469: THEN
470: -- Rev_class_id not null and rev_class_name null, check if

Line 481: RAISE fnd_api.g_exc_error;

477: fnd_msg_pub.ADD;
478: END IF;
479:
480: x_loading_status := 'CN_REV_CLASS_NOT_EXIST';
481: RAISE fnd_api.g_exc_error;
482: END IF;
483: ELSE
484: -- If rev_class_id and rev_class_name both are not
485: -- missing or null,

Line 501: RAISE fnd_api.g_exc_error;

497: fnd_msg_pub.ADD;
498: END IF;
499:
500: x_loading_status := 'CN_VALUE_ID_ERROR';
501: RAISE fnd_api.g_exc_error;
502: END IF;
503: END IF;
504:
505: --+

Line 518: RAISE fnd_api.g_exc_error;

514: fnd_msg_pub.ADD;
515: END IF;
516:
517: x_loading_status := 'CN_REV_TARGET_GT_ZERO';
518: RAISE fnd_api.g_exc_error;
519: END IF;
520:
521: --+
522: -- Validate Rule :

Line 541: RAISE fnd_api.g_exc_error;

537: fnd_msg_pub.ADD;
538: END IF;
539:
540: x_loading_status := 'REV_CLASS_HIER_CHECK';
541: RAISE fnd_api.g_exc_error;
542: END IF;
543: END IF; -- end quota_type_code
544: EXCEPTION
545: WHEN fnd_api.g_exc_error

Line 545: WHEN fnd_api.g_exc_error

541: RAISE fnd_api.g_exc_error;
542: END IF;
543: END IF; -- end quota_type_code
544: EXCEPTION
545: WHEN fnd_api.g_exc_error
546: THEN
547: x_return_status := fnd_api.g_ret_sts_error;
548: WHEN fnd_api.g_exc_unexpected_error
549: THEN

Line 547: x_return_status := fnd_api.g_ret_sts_error;

543: END IF; -- end quota_type_code
544: EXCEPTION
545: WHEN fnd_api.g_exc_error
546: THEN
547: x_return_status := fnd_api.g_ret_sts_error;
548: WHEN fnd_api.g_exc_unexpected_error
549: THEN
550: x_return_status := fnd_api.g_ret_sts_unexp_error;
551: x_loading_status := 'UNEXPECTED_ERR';

Line 548: WHEN fnd_api.g_exc_unexpected_error

544: EXCEPTION
545: WHEN fnd_api.g_exc_error
546: THEN
547: x_return_status := fnd_api.g_ret_sts_error;
548: WHEN fnd_api.g_exc_unexpected_error
549: THEN
550: x_return_status := fnd_api.g_ret_sts_unexp_error;
551: x_loading_status := 'UNEXPECTED_ERR';
552: WHEN OTHERS

Line 550: x_return_status := fnd_api.g_ret_sts_unexp_error;

546: THEN
547: x_return_status := fnd_api.g_ret_sts_error;
548: WHEN fnd_api.g_exc_unexpected_error
549: THEN
550: x_return_status := fnd_api.g_ret_sts_unexp_error;
551: x_loading_status := 'UNEXPECTED_ERR';
552: WHEN OTHERS
553: THEN
554: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 554: x_return_status := fnd_api.g_ret_sts_unexp_error;

550: x_return_status := fnd_api.g_ret_sts_unexp_error;
551: x_loading_status := 'UNEXPECTED_ERR';
552: WHEN OTHERS
553: THEN
554: x_return_status := fnd_api.g_ret_sts_unexp_error;
555: x_loading_status := 'UNEXPECTED_ERR';
556:
557: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
558: THEN

Line 578: /* x_return_status := FND_API.G_RET_STS_SUCCESS;

574: l_api_name CONSTANT VARCHAR2 (30) := 'chk_dr_man_pe';
575: l_yes fnd_lookups.meaning%TYPE;
576: l_no fnd_lookups.meaning%TYPE;
577: BEGIN
578: /* x_return_status := FND_API.G_RET_STS_SUCCESS;
579: x_loading_status := p_loading_status;
580:
581: SELECT meaning INTO l_yes FROM fnd_lookups
582: WHERE lookup_code = 'Y' AND lookup_type = 'YES_NO';

Line 603: x_loading_status => x_loading_status)) = FND_API.G_FALSE) THEN

599: p_token1 => NULL ,
600: p_token2 => NULL ,
601: p_token3 => NULL ,
602: p_loading_status => x_loading_status,
603: x_loading_status => x_loading_status)) = FND_API.G_FALSE) THEN
604: RAISE FND_API.G_EXC_ERROR ;
605: END IF;
606: -- Check payment_type_code for DRAW and MANUAUL PE type
607: IF ( (cn_api.pe_char_field_must_null

Line 604: RAISE FND_API.G_EXC_ERROR ;

600: p_token2 => NULL ,
601: p_token3 => NULL ,
602: p_loading_status => x_loading_status,
603: x_loading_status => x_loading_status)) = FND_API.G_FALSE) THEN
604: RAISE FND_API.G_EXC_ERROR ;
605: END IF;
606: -- Check payment_type_code for DRAW and MANUAUL PE type
607: IF ( (cn_api.pe_char_field_must_null
608: ( p_char_field => p_pe_rec.payment_type_code,

Line 615: x_loading_status => x_loading_status)) = FND_API.G_FALSE) THEN

611: p_token1 => NULL ,
612: p_token2 => NULL ,
613: p_token3 => NULL ,
614: p_loading_status => x_loading_status,
615: x_loading_status => x_loading_status)) = FND_API.G_FALSE) THEN
616: RAISE FND_API.G_EXC_ERROR ;
617: END IF;
618: -- Check disc_option_code for DRAW and MANUAUL PE type
619: IF (p_pe_rec.disc_option_code <> 'NONE') THEN

Line 616: RAISE FND_API.G_EXC_ERROR ;

612: p_token2 => NULL ,
613: p_token3 => NULL ,
614: p_loading_status => x_loading_status,
615: x_loading_status => x_loading_status)) = FND_API.G_FALSE) THEN
616: RAISE FND_API.G_EXC_ERROR ;
617: END IF;
618: -- Check disc_option_code for DRAW and MANUAUL PE type
619: IF (p_pe_rec.disc_option_code <> 'NONE') THEN
620: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 629: RAISE FND_API.G_EXC_ERROR ;

625: (p_pe_rec.quota_type_code,'QUOTA_TYPE'));
626: FND_MSG_PUB.Add;
627: END IF;
628: x_loading_status := 'CN_DISC_OPTION_MUST_NONE';
629: RAISE FND_API.G_EXC_ERROR ;
630: END IF;
631: -- Check cumulative_flag = N for DRAW and MANUAUL PE type
632: IF (p_pe_rec.cumulative_flag <> 'N') THEN
633: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 644: RAISE FND_API.G_EXC_ERROR ;

640: FND_MESSAGE.SET_TOKEN ('TOKEN1',NULL);
641: FND_MSG_PUB.Add;
642: END IF;
643: x_loading_status := 'CN_CUM_FLAG_MUST_BE';
644: RAISE FND_API.G_EXC_ERROR ;
645: END IF;
646: -- Check split_flag = N for DRAW and MANUAUL PE type
647: IF (p_pe_rec.split_flag <> 'N') THEN
648: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 661: RAISE FND_API.G_EXC_ERROR ;

657: FND_MESSAGE.SET_TOKEN ('TOKEN3',NULL);
658: FND_MSG_PUB.Add;
659: END IF;
660: x_loading_status := 'CN_SPLIT_FLAG_MUST_BE';
661: RAISE FND_API.G_EXC_ERROR ;
662: END IF;
663: -- Check itd_flag = N for DRAW and MANUAUL PE type
664: IF (p_pe_rec.itd_flag <> 'N') THEN
665: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 676: RAISE FND_API.G_EXC_ERROR ;

672: FND_MESSAGE.SET_TOKEN ('TOKEN1',NULL);
673: FND_MSG_PUB.Add;
674: END IF;
675: x_loading_status := 'CN_ITD_FLAG_MUST_BE';
676: RAISE FND_API.G_EXC_ERROR ;
677: END IF;
678: -- Payment Amount =
679: -- NULL : if it's MANUAL type pe
680: -- NOT NULL : if it's DRAW type pe

Line 690: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN

686: p_token1 => NULL ,
687: p_token2 => NULL ,
688: p_token3 => NULL ,
689: p_loading_status => x_loading_status,
690: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN
691: RAISE FND_API.G_EXC_ERROR ;
692: END IF;
693: ELSIF (p_pe_rec.quota_type_code = 'MANUAL') THEN
694: IF (cn_api.pe_num_field_must_null

Line 691: RAISE FND_API.G_EXC_ERROR ;

687: p_token2 => NULL ,
688: p_token3 => NULL ,
689: p_loading_status => x_loading_status,
690: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN
691: RAISE FND_API.G_EXC_ERROR ;
692: END IF;
693: ELSIF (p_pe_rec.quota_type_code = 'MANUAL') THEN
694: IF (cn_api.pe_num_field_must_null
695: ( p_num_field => p_pe_rec.payment_amount,

Line 702: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN

698: p_token1 => NULL ,
699: p_token2 => NULL ,
700: p_token3 => NULL ,
701: p_loading_status => x_loading_status,
702: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN
703: RAISE FND_API.G_EXC_ERROR ;
704: END IF;
705: END IF;
706: -- Check for Rate Table = NULL in DRAW and MANUAUL PE type

Line 703: RAISE FND_API.G_EXC_ERROR ;

699: p_token2 => NULL ,
700: p_token3 => NULL ,
701: p_loading_status => x_loading_status,
702: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN
703: RAISE FND_API.G_EXC_ERROR ;
704: END IF;
705: END IF;
706: -- Check for Rate Table = NULL in DRAW and MANUAUL PE type
707: IF (cn_api.pe_num_field_must_null

Line 715: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN

711: p_token1 => NULL ,
712: p_token2 => NULL ,
713: p_token3 => NULL ,
714: p_loading_status => x_loading_status,
715: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN
716: RAISE FND_API.G_EXC_ERROR ;
717: END IF;
718: -- Check for Discount Rate Table = NULL in DRAW and MANUAUL PE type
719: IF (cn_api.pe_num_field_must_null

Line 716: RAISE FND_API.G_EXC_ERROR ;

712: p_token2 => NULL ,
713: p_token3 => NULL ,
714: p_loading_status => x_loading_status,
715: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN
716: RAISE FND_API.G_EXC_ERROR ;
717: END IF;
718: -- Check for Discount Rate Table = NULL in DRAW and MANUAUL PE type
719: IF (cn_api.pe_num_field_must_null
720: ( p_num_field => p_pe_rec.disc_rate_table_id,

Line 727: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN

723: p_token1 => NULL ,
724: p_token2 => NULL ,
725: p_token3 => NULL ,
726: p_loading_status => x_loading_status,
727: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN
728: RAISE FND_API.G_EXC_ERROR ;
729: END IF;
730: -- Check for Revenue Class = NULL in DRAW and MANUAUL PE type
731: IF (cn_api.pe_num_field_must_null

Line 728: RAISE FND_API.G_EXC_ERROR ;

724: p_token2 => NULL ,
725: p_token3 => NULL ,
726: p_loading_status => x_loading_status,
727: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN
728: RAISE FND_API.G_EXC_ERROR ;
729: END IF;
730: -- Check for Revenue Class = NULL in DRAW and MANUAUL PE type
731: IF (cn_api.pe_num_field_must_null
732: ( p_num_field => p_pe_rec.rev_class_id,

Line 739: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN

735: p_token1 => NULL ,
736: p_token2 => NULL ,
737: p_token3 => NULL ,
738: p_loading_status => x_loading_status,
739: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN
740: RAISE FND_API.G_EXC_ERROR ;
741: END IF;
742: -- Check for target =0 in DRAW and MANUAUL PE type: target = 0
743: IF (p_pe_rec.target <> 0) THEN

Line 740: RAISE FND_API.G_EXC_ERROR ;

736: p_token2 => NULL ,
737: p_token3 => NULL ,
738: p_loading_status => x_loading_status,
739: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN
740: RAISE FND_API.G_EXC_ERROR ;
741: END IF;
742: -- Check for target =0 in DRAW and MANUAUL PE type: target = 0
743: IF (p_pe_rec.target <> 0) THEN
744: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 755: RAISE FND_API.G_EXC_ERROR ;

751: FND_MESSAGE.SET_TOKEN ('TOKEN1',NULL);
752: FND_MSG_PUB.Add;
753: END IF;
754: x_loading_status := 'CN_PE_TARGET_MUST_BE';
755: RAISE FND_API.G_EXC_ERROR ;
756: END IF;
757:
758: EXCEPTION
759: WHEN FND_API.G_EXC_ERROR THEN

Line 759: WHEN FND_API.G_EXC_ERROR THEN

755: RAISE FND_API.G_EXC_ERROR ;
756: END IF;
757:
758: EXCEPTION
759: WHEN FND_API.G_EXC_ERROR THEN
760: x_return_status := FND_API.G_RET_STS_ERROR ;
761:
762: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
763: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

Line 760: x_return_status := FND_API.G_RET_STS_ERROR ;

756: END IF;
757:
758: EXCEPTION
759: WHEN FND_API.G_EXC_ERROR THEN
760: x_return_status := FND_API.G_RET_STS_ERROR ;
761:
762: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
763: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
764: x_loading_status := 'UNEXPECTED_ERR';

Line 762: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

758: EXCEPTION
759: WHEN FND_API.G_EXC_ERROR THEN
760: x_return_status := FND_API.G_RET_STS_ERROR ;
761:
762: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
763: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
764: x_loading_status := 'UNEXPECTED_ERR';
765:
766: WHEN OTHERS THEN

Line 763: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

759: WHEN FND_API.G_EXC_ERROR THEN
760: x_return_status := FND_API.G_RET_STS_ERROR ;
761:
762: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
763: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
764: x_loading_status := 'UNEXPECTED_ERR';
765:
766: WHEN OTHERS THEN
767: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

Line 767: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

763: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
764: x_loading_status := 'UNEXPECTED_ERR';
765:
766: WHEN OTHERS THEN
767: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
768: x_loading_status := 'UNEXPECTED_ERR';
769: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
770: THEN
771: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME ,l_api_name );

Line 776: x_return_status := fnd_api.g_ret_sts_unexp_error;

772: END IF;
773: */
774: fnd_message.set_name ('CN', 'CN_PACKAGE_OBSELETE');
775: fnd_msg_pub.ADD;
776: x_return_status := fnd_api.g_ret_sts_unexp_error;
777: x_loading_status := 'CN_PACKAGE_OBSELETE';
778: RAISE fnd_api.g_exc_error;
779: END chk_dr_man_pe;
780:

Line 778: RAISE fnd_api.g_exc_error;

774: fnd_message.set_name ('CN', 'CN_PACKAGE_OBSELETE');
775: fnd_msg_pub.ADD;
776: x_return_status := fnd_api.g_ret_sts_unexp_error;
777: x_loading_status := 'CN_PACKAGE_OBSELETE';
778: RAISE fnd_api.g_exc_error;
779: END chk_dr_man_pe;
780:
781: -- ----------------------------------------------------------------------------+
782: -- Procedure: chk_revenue_quota_pe

Line 796: /* x_return_status := FND_API.G_RET_STS_SUCCESS;

792: l_api_name CONSTANT VARCHAR2 (30) := 'chk_revenue_quota_pe';
793: l_yes fnd_lookups.meaning%TYPE;
794: l_no fnd_lookups.meaning%TYPE;
795: BEGIN
796: /* x_return_status := FND_API.G_RET_STS_SUCCESS;
797: x_loading_status := p_loading_status;
798:
799: SELECT meaning INTO l_yes FROM fnd_lookups
800: WHERE lookup_code = 'Y' AND lookup_type = 'YES_NO';

Line 819: RAISE FND_API.G_EXC_ERROR ;

815: FND_MESSAGE.SET_TOKEN ('TOKEN1',NULL);
816: FND_MSG_PUB.Add;
817: END IF;
818: x_loading_status := 'CN_CUM_FLAG_MUST_BE';
819: RAISE FND_API.G_EXC_ERROR ;
820: END IF;
821: --+
822: -- Check input for 'Group By' case (trx_group_code = 'GROUP')
823: --+

Line 848: RAISE FND_API.G_EXC_ERROR ;

844: ;
845: FND_MSG_PUB.Add;
846: END IF;
847: x_loading_status := 'CN_ITD_FLAG_MUST_BE';
848: RAISE FND_API.G_EXC_ERROR ;
849: END IF;
850: -- Check split_flag = N
851: IF (p_pe_rec.split_flag <> 'N') THEN
852: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 868: RAISE FND_API.G_EXC_ERROR ;

864: FND_MESSAGE.SET_TOKEN ('TOKEN3',NULL);
865: FND_MSG_PUB.Add;
866: END IF;
867: x_loading_status := 'CN_SPLIT_FLAG_MUST_BE';
868: RAISE FND_API.G_EXC_ERROR ;
869: END IF;
870: -- Check target > 0
871: IF (p_pe_rec.target <= 0) THEN
872: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 878: RAISE FND_API.G_EXC_ERROR ;

874: FND_MESSAGE.SET_NAME ('CN' , 'CN_TARGET_CANNOT_ZERO');
875: FND_MSG_PUB.Add;
876: END IF;
877: x_loading_status := 'CN_TARGET_CANNOT_ZERO';
878: RAISE FND_API.G_EXC_ERROR ;
879: END IF;
880: -- Check Payment Amount
881: -- NOT NULL : if payment type code = Payment amount %
882: -- NULL : if payment type code = Fixed amount or applied Trx %

Line 896: x_loading_status => x_loading_status) = FND_API.g_false)

892: cn_api.get_lkup_meaning
893: (p_pe_rec.payment_type_code,'QUOTA_PAYMENT_TYPE'),
894: p_token3 => NULL ,
895: p_loading_status => x_loading_status,
896: x_loading_status => x_loading_status) = FND_API.g_false)
897: THEN
898: RAISE FND_API.G_EXC_ERROR ;
899: END IF;
900: ELSIF p_pe_rec.payment_type_code IN ('TRANSACTION','FIXED') AND

Line 898: RAISE FND_API.G_EXC_ERROR ;

894: p_token3 => NULL ,
895: p_loading_status => x_loading_status,
896: x_loading_status => x_loading_status) = FND_API.g_false)
897: THEN
898: RAISE FND_API.G_EXC_ERROR ;
899: END IF;
900: ELSIF p_pe_rec.payment_type_code IN ('TRANSACTION','FIXED') AND
901: (cn_api.pe_num_field_must_null
902: ( p_num_field => p_pe_rec.payment_amount,

Line 913: x_loading_status => x_loading_status) = FND_API.g_false)

909: cn_api.get_lkup_meaning
910: (p_pe_rec.payment_type_code,'QUOTA_PAYMENT_TYPE'),
911: p_token3 => NULL ,
912: p_loading_status => x_loading_status,
913: x_loading_status => x_loading_status) = FND_API.g_false)
914: THEN
915: RAISE FND_API.G_EXC_ERROR ;
916: END IF;
917: END IF ;

Line 915: RAISE FND_API.G_EXC_ERROR ;

911: p_token3 => NULL ,
912: p_loading_status => x_loading_status,
913: x_loading_status => x_loading_status) = FND_API.g_false)
914: THEN
915: RAISE FND_API.G_EXC_ERROR ;
916: END IF;
917: END IF ;
918: --+
919: -- Check input for 'Individual' case (trx_group_code = 'INDIVIDUAL')

Line 940: RAISE FND_API.G_EXC_ERROR ;

936: FND_MESSAGE.SET_NAME ('CN' , 'CN_TARGET_CANNOT_ZERO');
937: FND_MSG_PUB.Add;
938: END IF;
939: x_loading_status := 'CN_TARGET_CANNOT_ZERO';
940: RAISE FND_API.G_EXC_ERROR ;
941: END IF;
942: -- Check split_flag = N if Payment Type = Payment amount %
943: -- or Fixed Amount
944: IF (p_pe_rec.payment_type_code IN ('PAYMENT','FIXED')) AND

Line 966: RAISE FND_API.G_EXC_ERROR ;

962: p_pe_rec.itd_flag);
963: FND_MSG_PUB.Add;
964: END IF;
965: x_loading_status := 'CN_SPLIT_FLAG_MUST_BE';
966: RAISE FND_API.G_EXC_ERROR ;
967: END IF;
968: -- Check Payment Amount
969: -- NOT NULL : if payment type code = Payment amount %
970: -- NULL : if payment type code = Fixed amount or applied Trx %

Line 984: x_loading_status => x_loading_status) = FND_API.g_false)

980: cn_api.get_lkup_meaning
981: (p_pe_rec.payment_type_code,'QUOTA_PAYMENT_TYPE'),
982: p_token3 => G_ITD||' = '||p_pe_rec.itd_flag,
983: p_loading_status => x_loading_status,
984: x_loading_status => x_loading_status) = FND_API.g_false)
985: THEN
986: RAISE FND_API.G_EXC_ERROR ;
987: END IF;
988: ELSIF p_pe_rec.payment_type_code IN ('TRANSACTION','FIXED') AND

Line 986: RAISE FND_API.G_EXC_ERROR ;

982: p_token3 => G_ITD||' = '||p_pe_rec.itd_flag,
983: p_loading_status => x_loading_status,
984: x_loading_status => x_loading_status) = FND_API.g_false)
985: THEN
986: RAISE FND_API.G_EXC_ERROR ;
987: END IF;
988: ELSIF p_pe_rec.payment_type_code IN ('TRANSACTION','FIXED') AND
989: (cn_api.pe_num_field_must_null
990: ( p_num_field => p_pe_rec.payment_amount,

Line 1001: x_loading_status => x_loading_status) = FND_API.G_FALSE)

997: cn_api.get_lkup_meaning
998: (p_pe_rec.payment_type_code,'QUOTA_PAYMENT_TYPE'),
999: p_token3 => G_ITD||' = '||p_pe_rec.itd_flag,
1000: p_loading_status => x_loading_status,
1001: x_loading_status => x_loading_status) = FND_API.G_FALSE)
1002: THEN
1003: RAISE FND_API.G_EXC_ERROR ;
1004: END IF;
1005: ELSIF p_pe_rec.itd_flag = 'Y' THEN

Line 1003: RAISE FND_API.G_EXC_ERROR ;

999: p_token3 => G_ITD||' = '||p_pe_rec.itd_flag,
1000: p_loading_status => x_loading_status,
1001: x_loading_status => x_loading_status) = FND_API.G_FALSE)
1002: THEN
1003: RAISE FND_API.G_EXC_ERROR ;
1004: END IF;
1005: ELSIF p_pe_rec.itd_flag = 'Y' THEN
1006: -- Check for Interval-To-Date case : itd_flag = 'Y'
1007: --+

Line 1028: RAISE FND_API.G_EXC_ERROR ;

1024: G_ITD||' = '||p_pe_rec.itd_flag);
1025: FND_MSG_PUB.Add;
1026: END IF;
1027: x_loading_status := 'CN_PE_TARGET_MUST_BE';
1028: RAISE FND_API.G_EXC_ERROR ;
1029: END IF;
1030: -- Check no 'Fixed Amount' payment type allowed
1031: IF p_pe_rec.payment_type_code = 'FIXED' THEN
1032: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 1038: RAISE FND_API.G_EXC_ERROR ;

1034: FND_MESSAGE.SET_NAME ('CN' ,'CN_ITD_NO_FIXED_AMOUNT');
1035: FND_MSG_PUB.Add;
1036: END IF;
1037: x_loading_status := 'CN_ITD_NO_FIXED_AMOUNT';
1038: RAISE FND_API.G_EXC_ERROR ;
1039: END IF;
1040: -- Check split_flag = N if Payment Type = Payment amount %
1041: -- or Applied Trx %
1042: IF (p_pe_rec.payment_type_code IN ('PAYMENT','TRANSACTION')) AND

Line 1064: RAISE FND_API.G_EXC_ERROR ;

1060: G_ITD||' = '||p_pe_rec.itd_flag);
1061: FND_MSG_PUB.Add;
1062: END IF;
1063: x_loading_status := 'CN_SPLIT_FLAG_MUST_BE';
1064: RAISE FND_API.G_EXC_ERROR ;
1065: END IF;
1066: -- Check Payment Amount : Must be 0
1067: IF (p_pe_rec.payment_amount <> 0) THEN
1068: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 1088: RAISE FND_API.G_EXC_ERROR ;

1084: G_ITD||' = '||p_pe_rec.itd_flag);
1085: FND_MSG_PUB.Add;
1086: END IF;
1087: x_loading_status := 'CN_PE_PAYMENT_AMT_MUST_BE';
1088: RAISE FND_API.G_EXC_ERROR ;
1089: END IF;
1090: END IF ; -- end ITD_FLAG
1091: END IF ; -- end INDIVIDUAL
1092: -- Check rate table

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

1094: ( x_return_status => x_return_status,
1095: p_pe_rec => p_pe_rec,
1096: p_loading_status => x_loading_status,
1097: x_loading_status => x_loading_status);
1098: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1099: RAISE FND_API.G_EXC_ERROR ;
1100: END IF;
1101: -- Check discount rate table
1102: IF (p_pe_rec.disc_option_code IN ('PAYMENT','QUOTA')) THEN

Line 1099: RAISE FND_API.G_EXC_ERROR ;

1095: p_pe_rec => p_pe_rec,
1096: p_loading_status => x_loading_status,
1097: x_loading_status => x_loading_status);
1098: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1099: RAISE FND_API.G_EXC_ERROR ;
1100: END IF;
1101: -- Check discount rate table
1102: IF (p_pe_rec.disc_option_code IN ('PAYMENT','QUOTA')) THEN
1103: valid_disc_rate_table

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

1104: ( x_return_status => x_return_status,
1105: p_pe_rec => p_pe_rec,
1106: p_loading_status => x_loading_status,
1107: x_loading_status => x_loading_status);
1108: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1109: RAISE FND_API.G_EXC_ERROR ;
1110: END IF;
1111: ELSE
1112: -- Check for Discount Rate Table must be NULL

Line 1109: RAISE FND_API.G_EXC_ERROR ;

1105: p_pe_rec => p_pe_rec,
1106: p_loading_status => x_loading_status,
1107: x_loading_status => x_loading_status);
1108: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1109: RAISE FND_API.G_EXC_ERROR ;
1110: END IF;
1111: ELSE
1112: -- Check for Discount Rate Table must be NULL
1113: IF (cn_api.pe_num_field_must_null

Line 1124: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN

1120: (p_pe_rec.disc_option_code,'DISCOUNT_OPTION'),
1121: p_token2 => NULL ,
1122: p_token3 => NULL ,
1123: p_loading_status => x_loading_status,
1124: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN
1125: RAISE FND_API.G_EXC_ERROR ;
1126: END IF;
1127: END IF;
1128:

Line 1125: RAISE FND_API.G_EXC_ERROR ;

1121: p_token2 => NULL ,
1122: p_token3 => NULL ,
1123: p_loading_status => x_loading_status,
1124: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN
1125: RAISE FND_API.G_EXC_ERROR ;
1126: END IF;
1127: END IF;
1128:
1129: -- Check rc

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

1131: ( x_return_status => x_return_status,
1132: p_pe_rec => p_pe_rec,
1133: p_loading_status => x_loading_status,
1134: x_loading_status => x_loading_status);
1135: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1136: RAISE FND_API.G_EXC_ERROR ;
1137: END IF;
1138:
1139:

Line 1136: RAISE FND_API.G_EXC_ERROR ;

1132: p_pe_rec => p_pe_rec,
1133: p_loading_status => x_loading_status,
1134: x_loading_status => x_loading_status);
1135: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1136: RAISE FND_API.G_EXC_ERROR ;
1137: END IF;
1138:
1139:
1140: EXCEPTION

Line 1141: WHEN FND_API.G_EXC_ERROR THEN

1137: END IF;
1138:
1139:
1140: EXCEPTION
1141: WHEN FND_API.G_EXC_ERROR THEN
1142: x_return_status := FND_API.G_RET_STS_ERROR ;
1143:
1144: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1145: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

Line 1142: x_return_status := FND_API.G_RET_STS_ERROR ;

1138:
1139:
1140: EXCEPTION
1141: WHEN FND_API.G_EXC_ERROR THEN
1142: x_return_status := FND_API.G_RET_STS_ERROR ;
1143:
1144: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1145: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1146: x_loading_status := 'UNEXPECTED_ERR';

Line 1144: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

1140: EXCEPTION
1141: WHEN FND_API.G_EXC_ERROR THEN
1142: x_return_status := FND_API.G_RET_STS_ERROR ;
1143:
1144: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1145: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1146: x_loading_status := 'UNEXPECTED_ERR';
1147:
1148: WHEN OTHERS THEN

Line 1145: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

1141: WHEN FND_API.G_EXC_ERROR THEN
1142: x_return_status := FND_API.G_RET_STS_ERROR ;
1143:
1144: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1145: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1146: x_loading_status := 'UNEXPECTED_ERR';
1147:
1148: WHEN OTHERS THEN
1149: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

Line 1149: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

1145: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1146: x_loading_status := 'UNEXPECTED_ERR';
1147:
1148: WHEN OTHERS THEN
1149: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1150: x_loading_status := 'UNEXPECTED_ERR';
1151: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1152: THEN
1153: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME ,l_api_name );

Line 1158: x_return_status := fnd_api.g_ret_sts_unexp_error;

1154: END IF;
1155: */
1156: fnd_message.set_name ('CN', 'CN_PACKAGE_OBSELETE');
1157: fnd_msg_pub.ADD;
1158: x_return_status := fnd_api.g_ret_sts_unexp_error;
1159: x_loading_status := 'CN_PACKAGE_OBSELETE';
1160: RAISE fnd_api.g_exc_error;
1161: END chk_revenue_quota_pe;
1162:

Line 1160: RAISE fnd_api.g_exc_error;

1156: fnd_message.set_name ('CN', 'CN_PACKAGE_OBSELETE');
1157: fnd_msg_pub.ADD;
1158: x_return_status := fnd_api.g_ret_sts_unexp_error;
1159: x_loading_status := 'CN_PACKAGE_OBSELETE';
1160: RAISE fnd_api.g_exc_error;
1161: END chk_revenue_quota_pe;
1162:
1163: -- ----------------------------------------------------------------------------+
1164: -- Procedure: chk_unit_quota_pe

Line 1178: /* x_return_status := FND_API.G_RET_STS_SUCCESS;

1174: l_api_name CONSTANT VARCHAR2 (30) := 'chk_unit_quota_pe';
1175: l_yes fnd_lookups.meaning%TYPE;
1176: l_no fnd_lookups.meaning%TYPE;
1177: BEGIN
1178: /* x_return_status := FND_API.G_RET_STS_SUCCESS;
1179: x_loading_status := p_loading_status;
1180:
1181: SELECT meaning INTO l_yes FROM fnd_lookups
1182: WHERE lookup_code = 'Y' AND lookup_type = 'YES_NO';

Line 1200: RAISE FND_API.G_EXC_ERROR ;

1196: FND_MESSAGE.SET_TOKEN ('TOKEN1',NULL);
1197: FND_MSG_PUB.Add;
1198: END IF;
1199: x_loading_status := 'CN_CUM_FLAG_MUST_BE';
1200: RAISE FND_API.G_EXC_ERROR ;
1201: END IF;
1202: --+
1203: -- Check input for 'Group By' case (trx_group_code = 'GROUP')
1204: --+

Line 1228: RAISE FND_API.G_EXC_ERROR ;

1224: (p_pe_rec.trx_group_code,'QUOTA_TRX_GROUP'));
1225: FND_MSG_PUB.Add;
1226: END IF;
1227: x_loading_status := 'CN_ITD_FLAG_MUST_BE';
1228: RAISE FND_API.G_EXC_ERROR ;
1229: END IF;
1230: -- Check split_flag = N
1231: IF (p_pe_rec.split_flag <> 'N') THEN
1232: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 1248: RAISE FND_API.G_EXC_ERROR ;

1244: FND_MESSAGE.SET_TOKEN ('TOKEN3',NULL);
1245: FND_MSG_PUB.Add;
1246: END IF;
1247: x_loading_status := 'CN_SPLIT_FLAG_MUST_BE';
1248: RAISE FND_API.G_EXC_ERROR ;
1249: END IF;
1250: -- Check target > 0
1251: IF (p_pe_rec.target <= 0) THEN
1252: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 1258: RAISE FND_API.G_EXC_ERROR ;

1254: FND_MESSAGE.SET_NAME ('CN' , 'CN_TARGET_CANNOT_ZERO');
1255: FND_MSG_PUB.Add;
1256: END IF;
1257: x_loading_status := 'CN_TARGET_CANNOT_ZERO';
1258: RAISE FND_API.G_EXC_ERROR ;
1259: END IF;
1260: -- Check Payment Amount
1261: -- NOT NULL : if payment type code = Payment amount %
1262: -- NULL : if payment type code = Fixed amount or applied Trx %

Line 1277: x_loading_status => x_loading_status) = FND_API.g_false)

1273: (p_pe_rec.payment_type_code,
1274: 'QUOTA_PAYMENT_TYPE'),
1275: p_token3 => NULL ,
1276: p_loading_status => x_loading_status,
1277: x_loading_status => x_loading_status) = FND_API.g_false)
1278: THEN
1279: RAISE FND_API.G_EXC_ERROR ;
1280: END IF;
1281: ELSIF p_pe_rec.payment_type_code IN ('TRANSACTION','FIXED') AND

Line 1279: RAISE FND_API.G_EXC_ERROR ;

1275: p_token3 => NULL ,
1276: p_loading_status => x_loading_status,
1277: x_loading_status => x_loading_status) = FND_API.g_false)
1278: THEN
1279: RAISE FND_API.G_EXC_ERROR ;
1280: END IF;
1281: ELSIF p_pe_rec.payment_type_code IN ('TRANSACTION','FIXED') AND
1282: (cn_api.pe_num_field_must_null
1283: ( p_num_field => p_pe_rec.payment_amount,

Line 1294: x_loading_status => x_loading_status) = FND_API.g_false)

1290: cn_api.get_lkup_meaning
1291: (p_pe_rec.payment_type_code,'QUOTA_PAYMENT_TYPE'),
1292: p_token3 => NULL ,
1293: p_loading_status => x_loading_status,
1294: x_loading_status => x_loading_status) = FND_API.g_false)
1295: THEN
1296: RAISE FND_API.G_EXC_ERROR ;
1297: END IF;
1298: END IF ;

Line 1296: RAISE FND_API.G_EXC_ERROR ;

1292: p_token3 => NULL ,
1293: p_loading_status => x_loading_status,
1294: x_loading_status => x_loading_status) = FND_API.g_false)
1295: THEN
1296: RAISE FND_API.G_EXC_ERROR ;
1297: END IF;
1298: END IF ;
1299: --+
1300: -- Check input for 'Individual' case (trx_group_code = 'INDIVIDUAL')

Line 1321: RAISE FND_API.G_EXC_ERROR ;

1317: FND_MESSAGE.SET_NAME ('CN' , 'CN_TARGET_CANNOT_ZERO');
1318: FND_MSG_PUB.Add;
1319: END IF;
1320: x_loading_status := 'CN_TARGET_CANNOT_ZERO';
1321: RAISE FND_API.G_EXC_ERROR ;
1322: END IF;
1323: -- Check split_flag = N if Payment Type = Payment amount %
1324: -- or Fixed Amount
1325: IF (p_pe_rec.payment_type_code IN ('PAYMENT','FIXED')) AND

Line 1347: RAISE FND_API.G_EXC_ERROR ;

1343: G_ITD||' = '||p_pe_rec.itd_flag);
1344: FND_MSG_PUB.Add;
1345: END IF;
1346: x_loading_status := 'CN_SPLIT_FLAG_MUST_BE';
1347: RAISE FND_API.G_EXC_ERROR ;
1348: END IF;
1349: -- Check Payment Amount
1350: -- NOT NULL : if payment type code = Payment amount %
1351: -- NULL : if payment type code = Fixed amount or applied Trx %

Line 1366: x_loading_status => x_loading_status) = FND_API.g_false)

1362: (p_pe_rec.payment_type_code,
1363: 'QUOTA_PAYMENT_TYPE'),
1364: p_token3 => G_ITD||' = '||p_pe_rec.itd_flag,
1365: p_loading_status => x_loading_status,
1366: x_loading_status => x_loading_status) = FND_API.g_false)
1367: THEN
1368: RAISE FND_API.G_EXC_ERROR ;
1369: END IF;
1370: ELSIF p_pe_rec.payment_type_code IN ('TRANSACTION','FIXED') AND

Line 1368: RAISE FND_API.G_EXC_ERROR ;

1364: p_token3 => G_ITD||' = '||p_pe_rec.itd_flag,
1365: p_loading_status => x_loading_status,
1366: x_loading_status => x_loading_status) = FND_API.g_false)
1367: THEN
1368: RAISE FND_API.G_EXC_ERROR ;
1369: END IF;
1370: ELSIF p_pe_rec.payment_type_code IN ('TRANSACTION','FIXED') AND
1371: (cn_api.pe_num_field_must_null
1372: ( p_num_field => p_pe_rec.payment_amount,

Line 1384: x_loading_status => x_loading_status) = FND_API.G_FALSE)

1380: (p_pe_rec.payment_type_code,
1381: 'QUOTA_PAYMENT_TYPE'),
1382: p_token3 => G_ITD||' = '||p_pe_rec.itd_flag,
1383: p_loading_status => x_loading_status,
1384: x_loading_status => x_loading_status) = FND_API.G_FALSE)
1385: THEN
1386: RAISE FND_API.G_EXC_ERROR ;
1387: END IF;
1388: ELSIF p_pe_rec.itd_flag = 'Y' THEN

Line 1386: RAISE FND_API.G_EXC_ERROR ;

1382: p_token3 => G_ITD||' = '||p_pe_rec.itd_flag,
1383: p_loading_status => x_loading_status,
1384: x_loading_status => x_loading_status) = FND_API.G_FALSE)
1385: THEN
1386: RAISE FND_API.G_EXC_ERROR ;
1387: END IF;
1388: ELSIF p_pe_rec.itd_flag = 'Y' THEN
1389: -- Check for Interval-To-Date case : itd_flag = 'Y'
1390: --+

Line 1411: RAISE FND_API.G_EXC_ERROR ;

1407: G_ITD||' = '||p_pe_rec.itd_flag);
1408: FND_MSG_PUB.Add;
1409: END IF;
1410: x_loading_status := 'CN_PE_TARGET_MUST_BE';
1411: RAISE FND_API.G_EXC_ERROR ;
1412: END IF;
1413: -- Check no 'Fixed Amount' payment type allowed
1414: IF p_pe_rec.payment_type_code = 'FIXED' THEN
1415: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 1421: RAISE FND_API.G_EXC_ERROR ;

1417: FND_MESSAGE.SET_NAME ('CN' ,'CN_ITD_NO_FIXED_AMOUNT');
1418: FND_MSG_PUB.Add;
1419: END IF;
1420: x_loading_status := 'CN_ITD_NO_FIXED_AMOUNT';
1421: RAISE FND_API.G_EXC_ERROR ;
1422: END IF;
1423: -- Check split_flag = N if Payment Type = Payment amount %
1424: -- or Applied Trx %
1425: IF (p_pe_rec.payment_type_code IN ('PAYMENT','TRANSACTION')) AND

Line 1447: RAISE FND_API.G_EXC_ERROR ;

1443: G_ITD||' = '||p_pe_rec.itd_flag);
1444: FND_MSG_PUB.Add;
1445: END IF;
1446: x_loading_status := 'CN_SPLIT_FLAG_MUST_BE';
1447: RAISE FND_API.G_EXC_ERROR ;
1448: END IF;
1449: -- Check Payment Amount : Must be 0
1450: IF (p_pe_rec.payment_amount <> 0) THEN
1451: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 1471: RAISE FND_API.G_EXC_ERROR ;

1467: G_ITD||' = '||p_pe_rec.itd_flag);
1468: FND_MSG_PUB.Add;
1469: END IF;
1470: x_loading_status := 'CN_PE_PAYMENT_AMT_MUST_BE';
1471: RAISE FND_API.G_EXC_ERROR ;
1472: END IF;
1473: END IF ; -- end ITD_FLAG
1474: END IF ; -- end INDIVIDUAL
1475: -- Check rate table

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

1477: ( x_return_status => x_return_status,
1478: p_pe_rec => p_pe_rec,
1479: p_loading_status => x_loading_status,
1480: x_loading_status => x_loading_status);
1481: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1482: RAISE FND_API.G_EXC_ERROR ;
1483: END IF;
1484: -- Check discount rate table = Not Allowed
1485: -- Discount Option Code must = NONE is validate when calling

Line 1482: RAISE FND_API.G_EXC_ERROR ;

1478: p_pe_rec => p_pe_rec,
1479: p_loading_status => x_loading_status,
1480: x_loading_status => x_loading_status);
1481: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1482: RAISE FND_API.G_EXC_ERROR ;
1483: END IF;
1484: -- Check discount rate table = Not Allowed
1485: -- Discount Option Code must = NONE is validate when calling
1486: -- valid_lookup_code() from valid_plan_element

Line 1495: x_loading_status => x_loading_status) = FND_API.g_false)

1491: p_token1 => NULL ,
1492: p_token2 => NULL ,
1493: p_token3 => NULL ,
1494: p_loading_status => x_loading_status,
1495: x_loading_status => x_loading_status) = FND_API.g_false)
1496: THEN
1497: RAISE FND_API.G_EXC_ERROR ;
1498: END IF;
1499: -- Check rc

Line 1497: RAISE FND_API.G_EXC_ERROR ;

1493: p_token3 => NULL ,
1494: p_loading_status => x_loading_status,
1495: x_loading_status => x_loading_status) = FND_API.g_false)
1496: THEN
1497: RAISE FND_API.G_EXC_ERROR ;
1498: END IF;
1499: -- Check rc
1500: valid_revenue_class
1501: ( x_return_status => x_return_status,

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

1501: ( x_return_status => x_return_status,
1502: p_pe_rec => p_pe_rec,
1503: p_loading_status => x_loading_status,
1504: x_loading_status => x_loading_status);
1505: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1506: RAISE FND_API.G_EXC_ERROR ;
1507: END IF;
1508:
1509: EXCEPTION

Line 1506: RAISE FND_API.G_EXC_ERROR ;

1502: p_pe_rec => p_pe_rec,
1503: p_loading_status => x_loading_status,
1504: x_loading_status => x_loading_status);
1505: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1506: RAISE FND_API.G_EXC_ERROR ;
1507: END IF;
1508:
1509: EXCEPTION
1510: WHEN FND_API.G_EXC_ERROR THEN

Line 1510: WHEN FND_API.G_EXC_ERROR THEN

1506: RAISE FND_API.G_EXC_ERROR ;
1507: END IF;
1508:
1509: EXCEPTION
1510: WHEN FND_API.G_EXC_ERROR THEN
1511: x_return_status := FND_API.G_RET_STS_ERROR ;
1512:
1513: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1514: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

Line 1511: x_return_status := FND_API.G_RET_STS_ERROR ;

1507: END IF;
1508:
1509: EXCEPTION
1510: WHEN FND_API.G_EXC_ERROR THEN
1511: x_return_status := FND_API.G_RET_STS_ERROR ;
1512:
1513: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1514: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1515: x_loading_status := 'UNEXPECTED_ERR';

Line 1513: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

1509: EXCEPTION
1510: WHEN FND_API.G_EXC_ERROR THEN
1511: x_return_status := FND_API.G_RET_STS_ERROR ;
1512:
1513: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1514: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1515: x_loading_status := 'UNEXPECTED_ERR';
1516:
1517: WHEN OTHERS THEN

Line 1514: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

1510: WHEN FND_API.G_EXC_ERROR THEN
1511: x_return_status := FND_API.G_RET_STS_ERROR ;
1512:
1513: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1514: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1515: x_loading_status := 'UNEXPECTED_ERR';
1516:
1517: WHEN OTHERS THEN
1518: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

Line 1518: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

1514: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1515: x_loading_status := 'UNEXPECTED_ERR';
1516:
1517: WHEN OTHERS THEN
1518: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1519: x_loading_status := 'UNEXPECTED_ERR';
1520: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1521: THEN
1522: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME ,l_api_name );

Line 1527: x_return_status := fnd_api.g_ret_sts_unexp_error;

1523: END IF;
1524: */
1525: fnd_message.set_name ('CN', 'CN_PACKAGE_OBSELETE');
1526: fnd_msg_pub.ADD;
1527: x_return_status := fnd_api.g_ret_sts_unexp_error;
1528: x_loading_status := 'CN_PACKAGE_OBSELETE';
1529: RAISE fnd_api.g_exc_error;
1530: END chk_unit_quota_pe;
1531:

Line 1529: RAISE fnd_api.g_exc_error;

1525: fnd_message.set_name ('CN', 'CN_PACKAGE_OBSELETE');
1526: fnd_msg_pub.ADD;
1527: x_return_status := fnd_api.g_ret_sts_unexp_error;
1528: x_loading_status := 'CN_PACKAGE_OBSELETE';
1529: RAISE fnd_api.g_exc_error;
1530: END chk_unit_quota_pe;
1531:
1532: -- ----------------------------------------------------------------------------+
1533: -- Procedure: chk_revenue_non_quota_pe

Line 1547: /* x_return_status := FND_API.G_RET_STS_SUCCESS;

1543: l_api_name CONSTANT VARCHAR2 (30) := 'chk_revenue_non_quota_pe';
1544: l_yes fnd_lookups.meaning%TYPE;
1545: l_no fnd_lookups.meaning%TYPE;
1546: BEGIN
1547: /* x_return_status := FND_API.G_RET_STS_SUCCESS;
1548: x_loading_status := p_loading_status;
1549:
1550: SELECT meaning INTO l_yes FROM fnd_lookups
1551: WHERE lookup_code = 'Y' AND lookup_type = 'YES_NO';

Line 1571: RAISE FND_API.G_EXC_ERROR ;

1567: FND_MESSAGE.SET_TOKEN ('TOKEN1',NULL);
1568: FND_MSG_PUB.Add;
1569: END IF;
1570: x_loading_status := 'CN_PE_TARGET_MUST_BE';
1571: RAISE FND_API.G_EXC_ERROR ;
1572: END IF;
1573: -- Check itd_flag = N
1574: IF (p_pe_rec.itd_flag <> 'N') THEN
1575: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 1586: RAISE FND_API.G_EXC_ERROR ;

1582: FND_MESSAGE.SET_TOKEN ('TOKEN1',NULL);
1583: FND_MSG_PUB.Add;
1584: END IF;
1585: x_loading_status := 'CN_ITD_FLAG_MUST_BE';
1586: RAISE FND_API.G_EXC_ERROR ;
1587: END IF;
1588: -- Check input for 'Group By' case (trx_group_code = 'GROUP')
1589: --+
1590: IF p_pe_rec.trx_group_code = 'GROUP' THEN

Line 1613: RAISE FND_API.G_EXC_ERROR ;

1609: (p_pe_rec.trx_group_code,'QUOTA_TRX_GROUP'));
1610: FND_MSG_PUB.Add;
1611: END IF;
1612: x_loading_status := 'CN_CUM_FLAG_MUST_BE';
1613: RAISE FND_API.G_EXC_ERROR ;
1614: END IF;
1615: -- Check split_flag = N
1616: IF (p_pe_rec.split_flag <> 'N') THEN
1617: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 1632: RAISE FND_API.G_EXC_ERROR ;

1628: FND_MESSAGE.SET_TOKEN ('TOKEN3',NULL);
1629: FND_MSG_PUB.Add;
1630: END IF;
1631: x_loading_status := 'CN_SPLIT_FLAG_MUST_BE';
1632: RAISE FND_API.G_EXC_ERROR ;
1633: END IF;
1634: -- Check Payment Amount
1635: -- NOT NULL : if payment type code = Payment amount %
1636: -- NULL : if payment type code = Fixed amount or applied Trx %

Line 1651: x_loading_status => x_loading_status) = FND_API.g_false)

1647: (p_pe_rec.payment_type_code,
1648: 'QUOTA_PAYMENT_TYPE'),
1649: p_token3 => NULL ,
1650: p_loading_status => x_loading_status,
1651: x_loading_status => x_loading_status) = FND_API.g_false)
1652: THEN
1653: RAISE FND_API.G_EXC_ERROR ;
1654: END IF;
1655: ELSIF p_pe_rec.payment_type_code IN ('TRANSACTION','FIXED') AND

Line 1653: RAISE FND_API.G_EXC_ERROR ;

1649: p_token3 => NULL ,
1650: p_loading_status => x_loading_status,
1651: x_loading_status => x_loading_status) = FND_API.g_false)
1652: THEN
1653: RAISE FND_API.G_EXC_ERROR ;
1654: END IF;
1655: ELSIF p_pe_rec.payment_type_code IN ('TRANSACTION','FIXED') AND
1656: (cn_api.pe_num_field_must_null
1657: ( p_num_field => p_pe_rec.payment_amount,

Line 1669: x_loading_status => x_loading_status) = FND_API.g_false)

1665: (p_pe_rec.payment_type_code,
1666: 'QUOTA_PAYMENT_TYPE'),
1667: p_token3 => NULL ,
1668: p_loading_status => x_loading_status,
1669: x_loading_status => x_loading_status) = FND_API.g_false)
1670: THEN
1671: RAISE FND_API.G_EXC_ERROR ;
1672: END IF;
1673: END IF ; -- end GROUP BY

Line 1671: RAISE FND_API.G_EXC_ERROR ;

1667: p_token3 => NULL ,
1668: p_loading_status => x_loading_status,
1669: x_loading_status => x_loading_status) = FND_API.g_false)
1670: THEN
1671: RAISE FND_API.G_EXC_ERROR ;
1672: END IF;
1673: END IF ; -- end GROUP BY
1674:
1675: --+

Line 1700: x_loading_status => x_loading_status) = FND_API.g_false)

1696: (p_pe_rec.payment_type_code,
1697: 'QUOTA_PAYMENT_TYPE'),
1698: p_token3 => NULL ,
1699: p_loading_status => x_loading_status,
1700: x_loading_status => x_loading_status) = FND_API.g_false)
1701: THEN
1702: RAISE FND_API.G_EXC_ERROR ;
1703: END IF;
1704: -- Check split flag = N if cumulative flag = N

Line 1702: RAISE FND_API.G_EXC_ERROR ;

1698: p_token3 => NULL ,
1699: p_loading_status => x_loading_status,
1700: x_loading_status => x_loading_status) = FND_API.g_false)
1701: THEN
1702: RAISE FND_API.G_EXC_ERROR ;
1703: END IF;
1704: -- Check split flag = N if cumulative flag = N
1705: IF (p_pe_rec.cumulative_flag = 'N') AND
1706: (p_pe_rec.split_flag <> 'N') THEN

Line 1727: RAISE FND_API.G_EXC_ERROR ;

1723: p_pe_rec.cumulative_flag);
1724: FND_MSG_PUB.Add;
1725: END IF;
1726: x_loading_status := 'CN_SPLIT_FLAG_MUST_BE';
1727: RAISE FND_API.G_EXC_ERROR ;
1728: END IF;
1729: ELSIF p_pe_rec.payment_type_code IN ('PAYMENT','FIXED') THEN
1730: -- Check for Payment Type = Payment Amount % or Fixed Amount case
1731: --+

Line 1759: RAISE FND_API.G_EXC_ERROR ;

1755: FND_MESSAGE.SET_TOKEN ('TOKEN3',NULL);
1756: FND_MSG_PUB.Add;
1757: END IF;
1758: x_loading_status := 'CN_SPLIT_FLAG_MUST_BE';
1759: RAISE FND_API.G_EXC_ERROR ;
1760: END IF;
1761: -- Check Payment Amount
1762: -- NOT NULL : if payment type code = Payment amount %
1763: -- NULL : if payment type code = Fixed amount

Line 1778: x_loading_status => x_loading_status) = FND_API.g_false)

1774: (p_pe_rec.payment_type_code,
1775: 'QUOTA_PAYMENT_TYPE'),
1776: p_token3 => NULL ,
1777: p_loading_status => x_loading_status,
1778: x_loading_status => x_loading_status) = FND_API.g_false)
1779: THEN
1780: RAISE FND_API.G_EXC_ERROR ;
1781: END IF;
1782: ELSIF p_pe_rec.payment_type_code = 'FIXED' AND

Line 1780: RAISE FND_API.G_EXC_ERROR ;

1776: p_token3 => NULL ,
1777: p_loading_status => x_loading_status,
1778: x_loading_status => x_loading_status) = FND_API.g_false)
1779: THEN
1780: RAISE FND_API.G_EXC_ERROR ;
1781: END IF;
1782: ELSIF p_pe_rec.payment_type_code = 'FIXED' AND
1783: (cn_api.pe_num_field_must_null
1784: ( p_num_field => p_pe_rec.payment_amount,

Line 1796: x_loading_status => x_loading_status) = FND_API.g_false)

1792: (p_pe_rec.payment_type_code,
1793: 'QUOTA_PAYMENT_TYPE'),
1794: p_token3 => NULL ,
1795: p_loading_status => x_loading_status,
1796: x_loading_status => x_loading_status) = FND_API.g_false)
1797: THEN
1798: RAISE FND_API.G_EXC_ERROR ;
1799: END IF;
1800: END IF ; -- end IF payment_type_code = TRANSACTION

Line 1798: RAISE FND_API.G_EXC_ERROR ;

1794: p_token3 => NULL ,
1795: p_loading_status => x_loading_status,
1796: x_loading_status => x_loading_status) = FND_API.g_false)
1797: THEN
1798: RAISE FND_API.G_EXC_ERROR ;
1799: END IF;
1800: END IF ; -- end IF payment_type_code = TRANSACTION
1801: END IF ; -- end INDIVIDUAL
1802:

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

1805: ( x_return_status => x_return_status,
1806: p_pe_rec => p_pe_rec,
1807: p_loading_status => x_loading_status,
1808: x_loading_status => x_loading_status);
1809: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1810: RAISE FND_API.G_EXC_ERROR ;
1811: END IF;
1812: -- Check discount rate table
1813: IF (p_pe_rec.disc_option_code IN ('PAYMENT','QUOTA')) THEN

Line 1810: RAISE FND_API.G_EXC_ERROR ;

1806: p_pe_rec => p_pe_rec,
1807: p_loading_status => x_loading_status,
1808: x_loading_status => x_loading_status);
1809: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1810: RAISE FND_API.G_EXC_ERROR ;
1811: END IF;
1812: -- Check discount rate table
1813: IF (p_pe_rec.disc_option_code IN ('PAYMENT','QUOTA')) THEN
1814: valid_disc_rate_table

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

1815: ( x_return_status => x_return_status,
1816: p_pe_rec => p_pe_rec,
1817: p_loading_status => x_loading_status,
1818: x_loading_status => x_loading_status);
1819: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1820: RAISE FND_API.G_EXC_ERROR ;
1821: END IF;
1822: ELSE
1823: -- Check for Discount Rate Table must be NULL

Line 1820: RAISE FND_API.G_EXC_ERROR ;

1816: p_pe_rec => p_pe_rec,
1817: p_loading_status => x_loading_status,
1818: x_loading_status => x_loading_status);
1819: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1820: RAISE FND_API.G_EXC_ERROR ;
1821: END IF;
1822: ELSE
1823: -- Check for Discount Rate Table must be NULL
1824: IF (cn_api.pe_num_field_must_null

Line 1835: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN

1831: (p_pe_rec.disc_option_code,'DISCOUNT_OPTION'),
1832: p_token2 => NULL ,
1833: p_token3 => NULL ,
1834: p_loading_status => x_loading_status,
1835: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN
1836: RAISE FND_API.G_EXC_ERROR ;
1837: END IF;
1838: END IF;
1839: -- Check rc

Line 1836: RAISE FND_API.G_EXC_ERROR ;

1832: p_token2 => NULL ,
1833: p_token3 => NULL ,
1834: p_loading_status => x_loading_status,
1835: x_loading_status => x_loading_status) = FND_API.G_FALSE) THEN
1836: RAISE FND_API.G_EXC_ERROR ;
1837: END IF;
1838: END IF;
1839: -- Check rc
1840: valid_revenue_class

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

1841: ( x_return_status => x_return_status,
1842: p_pe_rec => p_pe_rec,
1843: p_loading_status => x_loading_status,
1844: x_loading_status => x_loading_status);
1845: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1846: RAISE FND_API.G_EXC_ERROR ;
1847: END IF;
1848:
1849: EXCEPTION

Line 1846: RAISE FND_API.G_EXC_ERROR ;

1842: p_pe_rec => p_pe_rec,
1843: p_loading_status => x_loading_status,
1844: x_loading_status => x_loading_status);
1845: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
1846: RAISE FND_API.G_EXC_ERROR ;
1847: END IF;
1848:
1849: EXCEPTION
1850: WHEN FND_API.G_EXC_ERROR THEN

Line 1850: WHEN FND_API.G_EXC_ERROR THEN

1846: RAISE FND_API.G_EXC_ERROR ;
1847: END IF;
1848:
1849: EXCEPTION
1850: WHEN FND_API.G_EXC_ERROR THEN
1851: x_return_status := FND_API.G_RET_STS_ERROR ;
1852:
1853: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1854: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

Line 1851: x_return_status := FND_API.G_RET_STS_ERROR ;

1847: END IF;
1848:
1849: EXCEPTION
1850: WHEN FND_API.G_EXC_ERROR THEN
1851: x_return_status := FND_API.G_RET_STS_ERROR ;
1852:
1853: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1854: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1855: x_loading_status := 'UNEXPECTED_ERR';

Line 1853: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

1849: EXCEPTION
1850: WHEN FND_API.G_EXC_ERROR THEN
1851: x_return_status := FND_API.G_RET_STS_ERROR ;
1852:
1853: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1854: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1855: x_loading_status := 'UNEXPECTED_ERR';
1856:
1857: WHEN OTHERS THEN

Line 1854: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

1850: WHEN FND_API.G_EXC_ERROR THEN
1851: x_return_status := FND_API.G_RET_STS_ERROR ;
1852:
1853: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1854: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1855: x_loading_status := 'UNEXPECTED_ERR';
1856:
1857: WHEN OTHERS THEN
1858: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

Line 1858: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

1854: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1855: x_loading_status := 'UNEXPECTED_ERR';
1856:
1857: WHEN OTHERS THEN
1858: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1859: x_loading_status := 'UNEXPECTED_ERR';
1860: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
1861: THEN
1862: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME ,l_api_name );

Line 1867: x_return_status := fnd_api.g_ret_sts_unexp_error;

1863: END IF;
1864: */
1865: fnd_message.set_name ('CN', 'CN_PACKAGE_OBSELETE');
1866: fnd_msg_pub.ADD;
1867: x_return_status := fnd_api.g_ret_sts_unexp_error;
1868: x_loading_status := 'CN_PACKAGE_OBSELETE';
1869: RAISE fnd_api.g_exc_error;
1870: END chk_revenue_non_quota_pe;
1871:

Line 1869: RAISE fnd_api.g_exc_error;

1865: fnd_message.set_name ('CN', 'CN_PACKAGE_OBSELETE');
1866: fnd_msg_pub.ADD;
1867: x_return_status := fnd_api.g_ret_sts_unexp_error;
1868: x_loading_status := 'CN_PACKAGE_OBSELETE';
1869: RAISE fnd_api.g_exc_error;
1870: END chk_revenue_non_quota_pe;
1871:
1872: -- ----------------------------------------------------------------------------+
1873: -- Procedure: chk_unit_non_quota_pe

Line 1887: /* x_return_status := FND_API.G_RET_STS_SUCCESS;

1883: l_api_name CONSTANT VARCHAR2 (30) := 'chk_unit_non_quota_pe';
1884: l_yes fnd_lookups.meaning%TYPE;
1885: l_no fnd_lookups.meaning%TYPE;
1886: BEGIN
1887: /* x_return_status := FND_API.G_RET_STS_SUCCESS;
1888: x_loading_status := p_loading_status;
1889:
1890: SELECT meaning INTO l_yes FROM fnd_lookups
1891: WHERE lookup_code = 'Y' AND lookup_type = 'YES_NO';

Line 1911: RAISE FND_API.G_EXC_ERROR ;

1907: FND_MESSAGE.SET_TOKEN ('TOKEN1',NULL);
1908: FND_MSG_PUB.Add;
1909: END IF;
1910: x_loading_status := 'CN_PE_TARGET_MUST_BE';
1911: RAISE FND_API.G_EXC_ERROR ;
1912: END IF;
1913: -- Check itd_flag = N
1914: IF (p_pe_rec.itd_flag <> 'N') THEN
1915: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 1926: RAISE FND_API.G_EXC_ERROR ;

1922: FND_MESSAGE.SET_TOKEN ('TOKEN1',NULL);
1923: FND_MSG_PUB.Add;
1924: END IF;
1925: x_loading_status := 'CN_ITD_FLAG_MUST_BE';
1926: RAISE FND_API.G_EXC_ERROR ;
1927: END IF;
1928: -- Check input for 'Group By' case (trx_group_code = 'GROUP')
1929: --+
1930: IF p_pe_rec.trx_group_code = 'GROUP' THEN

Line 1954: RAISE FND_API.G_EXC_ERROR ;

1950: ;
1951: FND_MSG_PUB.Add;
1952: END IF;
1953: x_loading_status := 'CN_CUM_FLAG_MUST_BE';
1954: RAISE FND_API.G_EXC_ERROR ;
1955: END IF;
1956: -- Check split_flag = N
1957: IF (p_pe_rec.split_flag <> 'N') THEN
1958: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 1974: RAISE FND_API.G_EXC_ERROR ;

1970: FND_MESSAGE.SET_TOKEN ('TOKEN3',NULL);
1971: FND_MSG_PUB.Add;
1972: END IF;
1973: x_loading_status := 'CN_SPLIT_FLAG_MUST_BE';
1974: RAISE FND_API.G_EXC_ERROR ;
1975: END IF;
1976: -- Check Payment Amount
1977: -- NOT NULL : if payment type code = Payment amount %
1978: -- NULL : if payment type code = Fixed amount or applied Trx %

Line 1993: x_loading_status => x_loading_status) = FND_API.g_false)

1989: (p_pe_rec.payment_type_code,
1990: 'QUOTA_PAYMENT_TYPE'),
1991: p_token3 => NULL ,
1992: p_loading_status => x_loading_status,
1993: x_loading_status => x_loading_status) = FND_API.g_false)
1994: THEN
1995: RAISE FND_API.G_EXC_ERROR ;
1996: END IF;
1997: ELSIF p_pe_rec.payment_type_code IN ('TRANSACTION','FIXED') AND

Line 1995: RAISE FND_API.G_EXC_ERROR ;

1991: p_token3 => NULL ,
1992: p_loading_status => x_loading_status,
1993: x_loading_status => x_loading_status) = FND_API.g_false)
1994: THEN
1995: RAISE FND_API.G_EXC_ERROR ;
1996: END IF;
1997: ELSIF p_pe_rec.payment_type_code IN ('TRANSACTION','FIXED') AND
1998: (cn_api.pe_num_field_must_null
1999: ( p_num_field => p_pe_rec.payment_amount,

Line 2011: x_loading_status => x_loading_status) = FND_API.g_false)

2007: (p_pe_rec.payment_type_code,
2008: 'QUOTA_PAYMENT_TYPE'),
2009: p_token3 => NULL ,
2010: p_loading_status => x_loading_status,
2011: x_loading_status => x_loading_status) = FND_API.g_false)
2012: THEN
2013: RAISE FND_API.G_EXC_ERROR ;
2014: END IF;
2015: END IF ; -- end GROUP BY

Line 2013: RAISE FND_API.G_EXC_ERROR ;

2009: p_token3 => NULL ,
2010: p_loading_status => x_loading_status,
2011: x_loading_status => x_loading_status) = FND_API.g_false)
2012: THEN
2013: RAISE FND_API.G_EXC_ERROR ;
2014: END IF;
2015: END IF ; -- end GROUP BY
2016:
2017: --+

Line 2042: x_loading_status => x_loading_status) = FND_API.g_false)

2038: (p_pe_rec.payment_type_code,
2039: 'QUOTA_PAYMENT_TYPE'),
2040: p_token3 => NULL ,
2041: p_loading_status => x_loading_status,
2042: x_loading_status => x_loading_status) = FND_API.g_false)
2043: THEN
2044: RAISE FND_API.G_EXC_ERROR ;
2045: END IF;
2046: -- Check split flag = N if cumulative flag = N

Line 2044: RAISE FND_API.G_EXC_ERROR ;

2040: p_token3 => NULL ,
2041: p_loading_status => x_loading_status,
2042: x_loading_status => x_loading_status) = FND_API.g_false)
2043: THEN
2044: RAISE FND_API.G_EXC_ERROR ;
2045: END IF;
2046: -- Check split flag = N if cumulative flag = N
2047: IF (p_pe_rec.cumulative_flag = 'N') AND
2048: (p_pe_rec.split_flag <> 'N') THEN

Line 2069: RAISE FND_API.G_EXC_ERROR ;

2065: p_pe_rec.cumulative_flag);
2066: FND_MSG_PUB.Add;
2067: END IF;
2068: x_loading_status := 'CN_SPLIT_FLAG_MUST_BE';
2069: RAISE FND_API.G_EXC_ERROR ;
2070: END IF;
2071: ELSIF p_pe_rec.payment_type_code IN ('PAYMENT','FIXED') THEN
2072: -- Check for Payment Type = Payment Amount % or Fixed Amount case
2073: --+

Line 2101: RAISE FND_API.G_EXC_ERROR ;

2097: FND_MESSAGE.SET_TOKEN ('TOKEN3',NULL);
2098: FND_MSG_PUB.Add;
2099: END IF;
2100: x_loading_status := 'CN_SPLIT_FLAG_MUST_BE';
2101: RAISE FND_API.G_EXC_ERROR ;
2102: END IF;
2103: -- Check Payment Amount
2104: -- NOT NULL : if payment type code = Payment amount %
2105: -- NULL : if payment type code = Fixed amount

Line 2120: x_loading_status => x_loading_status) = FND_API.g_false)

2116: (p_pe_rec.payment_type_code,
2117: 'QUOTA_PAYMENT_TYPE'),
2118: p_token3 => NULL ,
2119: p_loading_status => x_loading_status,
2120: x_loading_status => x_loading_status) = FND_API.g_false)
2121: THEN
2122: RAISE FND_API.G_EXC_ERROR ;
2123: END IF;
2124: ELSIF p_pe_rec.payment_type_code = 'FIXED' AND

Line 2122: RAISE FND_API.G_EXC_ERROR ;

2118: p_token3 => NULL ,
2119: p_loading_status => x_loading_status,
2120: x_loading_status => x_loading_status) = FND_API.g_false)
2121: THEN
2122: RAISE FND_API.G_EXC_ERROR ;
2123: END IF;
2124: ELSIF p_pe_rec.payment_type_code = 'FIXED' AND
2125: (cn_api.pe_num_field_must_null
2126: ( p_num_field => p_pe_rec.payment_amount,

Line 2138: x_loading_status => x_loading_status) = FND_API.g_false)

2134: (p_pe_rec.payment_type_code,
2135: 'QUOTA_PAYMENT_TYPE'),
2136: p_token3 => NULL ,
2137: p_loading_status => x_loading_status,
2138: x_loading_status => x_loading_status) = FND_API.g_false)
2139: THEN
2140: RAISE FND_API.G_EXC_ERROR ;
2141: END IF;
2142: END IF ; -- end IF payment_type_code = TRANSACTION

Line 2140: RAISE FND_API.G_EXC_ERROR ;

2136: p_token3 => NULL ,
2137: p_loading_status => x_loading_status,
2138: x_loading_status => x_loading_status) = FND_API.g_false)
2139: THEN
2140: RAISE FND_API.G_EXC_ERROR ;
2141: END IF;
2142: END IF ; -- end IF payment_type_code = TRANSACTION
2143: END IF ; -- end INDIVIDUAL
2144:

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

2147: ( x_return_status => x_return_status,
2148: p_pe_rec => p_pe_rec,
2149: p_loading_status => x_loading_status,
2150: x_loading_status => x_loading_status);
2151: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2152: RAISE FND_API.G_EXC_ERROR ;
2153: END IF;
2154: -- Check discount rate table = Not Allowed
2155: -- Discount Option Code must = NONE is validate when calling

Line 2152: RAISE FND_API.G_EXC_ERROR ;

2148: p_pe_rec => p_pe_rec,
2149: p_loading_status => x_loading_status,
2150: x_loading_status => x_loading_status);
2151: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2152: RAISE FND_API.G_EXC_ERROR ;
2153: END IF;
2154: -- Check discount rate table = Not Allowed
2155: -- Discount Option Code must = NONE is validate when calling
2156: -- valid_lookup_code() from valid_plan_element

Line 2165: x_loading_status => x_loading_status) = FND_API.g_false)

2161: p_token1 => NULL ,
2162: p_token2 => NULL ,
2163: p_token3 => NULL ,
2164: p_loading_status => x_loading_status,
2165: x_loading_status => x_loading_status) = FND_API.g_false)
2166: THEN
2167: RAISE FND_API.G_EXC_ERROR ;
2168: END IF;
2169: -- Check rc

Line 2167: RAISE FND_API.G_EXC_ERROR ;

2163: p_token3 => NULL ,
2164: p_loading_status => x_loading_status,
2165: x_loading_status => x_loading_status) = FND_API.g_false)
2166: THEN
2167: RAISE FND_API.G_EXC_ERROR ;
2168: END IF;
2169: -- Check rc
2170: valid_revenue_class
2171: ( x_return_status => x_return_status,

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

2171: ( x_return_status => x_return_status,
2172: p_pe_rec => p_pe_rec,
2173: p_loading_status => x_loading_status,
2174: x_loading_status => x_loading_status);
2175: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2176: RAISE FND_API.G_EXC_ERROR ;
2177: END IF;
2178:
2179: EXCEPTION

Line 2176: RAISE FND_API.G_EXC_ERROR ;

2172: p_pe_rec => p_pe_rec,
2173: p_loading_status => x_loading_status,
2174: x_loading_status => x_loading_status);
2175: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2176: RAISE FND_API.G_EXC_ERROR ;
2177: END IF;
2178:
2179: EXCEPTION
2180: WHEN FND_API.G_EXC_ERROR THEN

Line 2180: WHEN FND_API.G_EXC_ERROR THEN

2176: RAISE FND_API.G_EXC_ERROR ;
2177: END IF;
2178:
2179: EXCEPTION
2180: WHEN FND_API.G_EXC_ERROR THEN
2181: x_return_status := FND_API.G_RET_STS_ERROR ;
2182:
2183: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2184: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

Line 2181: x_return_status := FND_API.G_RET_STS_ERROR ;

2177: END IF;
2178:
2179: EXCEPTION
2180: WHEN FND_API.G_EXC_ERROR THEN
2181: x_return_status := FND_API.G_RET_STS_ERROR ;
2182:
2183: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2184: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2185: x_loading_status := 'UNEXPECTED_ERR';

Line 2183: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2179: EXCEPTION
2180: WHEN FND_API.G_EXC_ERROR THEN
2181: x_return_status := FND_API.G_RET_STS_ERROR ;
2182:
2183: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2184: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2185: x_loading_status := 'UNEXPECTED_ERR';
2186:
2187: WHEN OTHERS THEN

Line 2184: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

2180: WHEN FND_API.G_EXC_ERROR THEN
2181: x_return_status := FND_API.G_RET_STS_ERROR ;
2182:
2183: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2184: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2185: x_loading_status := 'UNEXPECTED_ERR';
2186:
2187: WHEN OTHERS THEN
2188: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

Line 2188: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

2184: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2185: x_loading_status := 'UNEXPECTED_ERR';
2186:
2187: WHEN OTHERS THEN
2188: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2189: x_loading_status := 'UNEXPECTED_ERR';
2190: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
2191: THEN
2192: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME ,l_api_name );

Line 2197: x_return_status := fnd_api.g_ret_sts_unexp_error;

2193: END IF;
2194: */
2195: fnd_message.set_name ('CN', 'CN_PACKAGE_OBSELETE');
2196: fnd_msg_pub.ADD;
2197: x_return_status := fnd_api.g_ret_sts_unexp_error;
2198: x_loading_status := 'CN_PACKAGE_OBSELETE';
2199: RAISE fnd_api.g_exc_error;
2200: END chk_unit_non_quota_pe;
2201:

Line 2199: RAISE fnd_api.g_exc_error;

2195: fnd_message.set_name ('CN', 'CN_PACKAGE_OBSELETE');
2196: fnd_msg_pub.ADD;
2197: x_return_status := fnd_api.g_ret_sts_unexp_error;
2198: x_loading_status := 'CN_PACKAGE_OBSELETE';
2199: RAISE fnd_api.g_exc_error;
2200: END chk_unit_non_quota_pe;
2201:
2202: -- ----------------------------------------------------------------------------+
2203: -- Procedure: chk_discount_margin_pe

Line 2217: /* x_return_status := FND_API.G_RET_STS_SUCCESS;

2213: l_api_name CONSTANT VARCHAR2 (30) := 'chk_disc_margin_pe';
2214: l_yes fnd_lookups.meaning%TYPE;
2215: l_no fnd_lookups.meaning%TYPE;
2216: BEGIN
2217: /* x_return_status := FND_API.G_RET_STS_SUCCESS;
2218: x_loading_status := p_loading_status;
2219:
2220: SELECT meaning INTO l_yes FROM fnd_lookups
2221: WHERE lookup_code = 'Y' AND lookup_type = 'YES_NO';

Line 2246: RAISE FND_API.G_EXC_ERROR ;

2242: FND_MESSAGE.SET_TOKEN ('TOKEN1',NULL);
2243: FND_MSG_PUB.Add;
2244: END IF;
2245: x_loading_status := 'CN_PE_TARGET_MUST_BE';
2246: RAISE FND_API.G_EXC_ERROR ;
2247: END IF;
2248: -- Check split_flag = N
2249: IF (p_pe_rec.split_flag <> 'N') THEN
2250: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 2263: RAISE FND_API.G_EXC_ERROR ;

2259: FND_MESSAGE.SET_TOKEN ('TOKEN3',NULL);
2260: FND_MSG_PUB.Add;
2261: END IF;
2262: x_loading_status := 'CN_SPLIT_FLAG_MUST_BE';
2263: RAISE FND_API.G_EXC_ERROR ;
2264: END IF;
2265: -- Check cumulative_flag = N for Discount and Margin PE type
2266: IF (p_pe_rec.cumulative_flag <> 'N') THEN
2267: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 2278: RAISE FND_API.G_EXC_ERROR ;

2274: FND_MESSAGE.SET_TOKEN ('TOKEN1',NULL);
2275: FND_MSG_PUB.Add;
2276: END IF;
2277: x_loading_status := 'CN_CUM_FLAG_MUST_BE';
2278: RAISE FND_API.G_EXC_ERROR ;
2279: END IF;
2280: -- Check itd_flag = N for Discount and Margin PE type
2281: IF (p_pe_rec.itd_flag <> 'N') THEN
2282: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 2293: RAISE FND_API.G_EXC_ERROR ;

2289: FND_MESSAGE.SET_TOKEN ('TOKEN1',NULL);
2290: FND_MSG_PUB.Add;
2291: END IF;
2292: x_loading_status := 'CN_ITD_FLAG_MUST_BE';
2293: RAISE FND_API.G_EXC_ERROR ;
2294: END IF;
2295: -- Check Apply Txn Type = 'GroupBy' NOT ALLOWED
2296: IF p_pe_rec.trx_group_code = 'GROUP' THEN
2297: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)

Line 2303: RAISE FND_API.G_EXC_ERROR ;

2299: FND_MESSAGE.SET_NAME ('CN' , 'DISC_MARGIN_INDIVIDUAL_ONLY');
2300: FND_MSG_PUB.Add;
2301: END IF;
2302: x_loading_status := 'DISC_MARGIN_INDIVIDUAL_ONLY';
2303: RAISE FND_API.G_EXC_ERROR ;
2304: END IF;
2305: -- Check Payment Amount
2306: -- NOT NULL : if payment type code = Payment amount %
2307: -- NULL : if payment type code = Fixed amount or applied Trx %

Line 2322: x_loading_status => x_loading_status) = FND_API.g_false)

2318: (p_pe_rec.payment_type_code,
2319: 'QUOTA_PAYMENT_TYPE'),
2320: p_token3 => NULL ,
2321: p_loading_status => x_loading_status,
2322: x_loading_status => x_loading_status) = FND_API.g_false)
2323: THEN
2324: RAISE FND_API.G_EXC_ERROR ;
2325: END IF;
2326: ELSIF p_pe_rec.payment_type_code IN ('TRANSACTION','FIXED') AND

Line 2324: RAISE FND_API.G_EXC_ERROR ;

2320: p_token3 => NULL ,
2321: p_loading_status => x_loading_status,
2322: x_loading_status => x_loading_status) = FND_API.g_false)
2323: THEN
2324: RAISE FND_API.G_EXC_ERROR ;
2325: END IF;
2326: ELSIF p_pe_rec.payment_type_code IN ('TRANSACTION','FIXED') AND
2327: (cn_api.pe_num_field_must_null
2328: ( p_num_field => p_pe_rec.payment_amount,

Line 2340: x_loading_status => x_loading_status) = FND_API.g_false)

2336: (p_pe_rec.payment_type_code,
2337: 'QUOTA_PAYMENT_TYPE'),
2338: p_token3 => NULL ,
2339: p_loading_status => x_loading_status,
2340: x_loading_status => x_loading_status) = FND_API.g_false)
2341: THEN
2342: RAISE FND_API.G_EXC_ERROR ;
2343: END IF;
2344: -- Check rate table

Line 2342: RAISE FND_API.G_EXC_ERROR ;

2338: p_token3 => NULL ,
2339: p_loading_status => x_loading_status,
2340: x_loading_status => x_loading_status) = FND_API.g_false)
2341: THEN
2342: RAISE FND_API.G_EXC_ERROR ;
2343: END IF;
2344: -- Check rate table
2345: valid_rate_table
2346: ( x_return_status => x_return_status,

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

2346: ( x_return_status => x_return_status,
2347: p_pe_rec => p_pe_rec,
2348: p_loading_status => x_loading_status,
2349: x_loading_status => x_loading_status);
2350: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2351: RAISE FND_API.G_EXC_ERROR ;
2352: END IF;
2353: -- Check discount rate table = Not Allowed
2354: IF (cn_api.pe_num_field_must_null

Line 2351: RAISE FND_API.G_EXC_ERROR ;

2347: p_pe_rec => p_pe_rec,
2348: p_loading_status => x_loading_status,
2349: x_loading_status => x_loading_status);
2350: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2351: RAISE FND_API.G_EXC_ERROR ;
2352: END IF;
2353: -- Check discount rate table = Not Allowed
2354: IF (cn_api.pe_num_field_must_null
2355: ( p_num_field => p_pe_rec.disc_rate_table_id,

Line 2362: x_loading_status => x_loading_status) = FND_API.g_false)

2358: p_token1 => NULL ,
2359: p_token2 => NULL ,
2360: p_token3 => NULL ,
2361: p_loading_status => x_loading_status,
2362: x_loading_status => x_loading_status) = FND_API.g_false)
2363: THEN
2364: RAISE FND_API.G_EXC_ERROR ;
2365: END IF;
2366:

Line 2364: RAISE FND_API.G_EXC_ERROR ;

2360: p_token3 => NULL ,
2361: p_loading_status => x_loading_status,
2362: x_loading_status => x_loading_status) = FND_API.g_false)
2363: THEN
2364: RAISE FND_API.G_EXC_ERROR ;
2365: END IF;
2366:
2367: -- Check rc
2368: valid_revenue_class

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

2369: ( x_return_status => x_return_status,
2370: p_pe_rec => p_pe_rec,
2371: p_loading_status => x_loading_status,
2372: x_loading_status => x_loading_status);
2373: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2374: RAISE FND_API.G_EXC_ERROR ;
2375: END IF;
2376:
2377: EXCEPTION

Line 2374: RAISE FND_API.G_EXC_ERROR ;

2370: p_pe_rec => p_pe_rec,
2371: p_loading_status => x_loading_status,
2372: x_loading_status => x_loading_status);
2373: IF (x_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
2374: RAISE FND_API.G_EXC_ERROR ;
2375: END IF;
2376:
2377: EXCEPTION
2378: WHEN FND_API.G_EXC_ERROR THEN

Line 2378: WHEN FND_API.G_EXC_ERROR THEN

2374: RAISE FND_API.G_EXC_ERROR ;
2375: END IF;
2376:
2377: EXCEPTION
2378: WHEN FND_API.G_EXC_ERROR THEN
2379: x_return_status := FND_API.G_RET_STS_ERROR ;
2380:
2381: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2382: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

Line 2379: x_return_status := FND_API.G_RET_STS_ERROR ;

2375: END IF;
2376:
2377: EXCEPTION
2378: WHEN FND_API.G_EXC_ERROR THEN
2379: x_return_status := FND_API.G_RET_STS_ERROR ;
2380:
2381: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2382: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2383: x_loading_status := 'UNEXPECTED_ERR';

Line 2381: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2377: EXCEPTION
2378: WHEN FND_API.G_EXC_ERROR THEN
2379: x_return_status := FND_API.G_RET_STS_ERROR ;
2380:
2381: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2382: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2383: x_loading_status := 'UNEXPECTED_ERR';
2384:
2385: WHEN OTHERS THEN

Line 2382: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

2378: WHEN FND_API.G_EXC_ERROR THEN
2379: x_return_status := FND_API.G_RET_STS_ERROR ;
2380:
2381: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2382: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2383: x_loading_status := 'UNEXPECTED_ERR';
2384:
2385: WHEN OTHERS THEN
2386: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

Line 2386: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

2382: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2383: x_loading_status := 'UNEXPECTED_ERR';
2384:
2385: WHEN OTHERS THEN
2386: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
2387: x_loading_status := 'UNEXPECTED_ERR';
2388: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
2389: THEN
2390: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME ,l_api_name );

Line 2395: x_return_status := fnd_api.g_ret_sts_unexp_error;

2391: END IF;
2392: */
2393: fnd_message.set_name ('CN', 'CN_PACKAGE_OBSELETE');
2394: fnd_msg_pub.ADD;
2395: x_return_status := fnd_api.g_ret_sts_unexp_error;
2396: x_loading_status := 'CN_PACKAGE_OBSELETE';
2397: RAISE fnd_api.g_exc_error;
2398: END chk_discount_margin_pe;
2399:

Line 2397: RAISE fnd_api.g_exc_error;

2393: fnd_message.set_name ('CN', 'CN_PACKAGE_OBSELETE');
2394: fnd_msg_pub.ADD;
2395: x_return_status := fnd_api.g_ret_sts_unexp_error;
2396: x_loading_status := 'CN_PACKAGE_OBSELETE';
2397: RAISE fnd_api.g_exc_error;
2398: END chk_discount_margin_pe;
2399:
2400: -- ----------------------------------------------------------------------------+
2401: -- Procedure: chk_trx_factor

Line 2427: x_return_status := fnd_api.g_ret_sts_success;

2423: key_factor_total NUMBER;
2424: l_api_name CONSTANT VARCHAR2 (30) := 'chk_trx_factor';
2425: l_pe_name cn_quotas.NAME%TYPE;
2426: BEGIN
2427: x_return_status := fnd_api.g_ret_sts_success;
2428: x_loading_status := p_loading_status;
2429: key_factor_total := 0;
2430:
2431: OPEN c_factors;

Line 2447: RAISE fnd_api.g_exc_error;

2443: fnd_msg_pub.ADD;
2444: END IF;
2445:
2446: x_loading_status := 'PLN_QUOTA_RULE_NO_FACTORS';
2447: RAISE fnd_api.g_exc_error;
2448: ELSE
2449: IF c_factors%NOTFOUND
2450: THEN
2451: IF key_factor_total <> 100

Line 2467: RAISE fnd_api.g_exc_error;

2463: fnd_message.set_token ('PLAN_NAME', NULL);
2464: fnd_message.set_token ('QUOTA_NAME', l_pe_name);
2465: fnd_message.set_token ('REV_CLASS_NAME', p_rev_class_name);
2466: fnd_msg_pub.ADD;
2467: RAISE fnd_api.g_exc_error;
2468: END IF;
2469:
2470: x_loading_status := 'PLN_QUOTA_RULE_FACTORS_NOT_100';
2471: GOTO end_loop;

Line 2797: RAISE fnd_api.g_exc_error;

2793: );
2794:
2795: IF rs <> 'S'
2796: THEN
2797: RAISE fnd_api.g_exc_error;
2798: ELSE --if return status = 'S'
2799: IF (nt.COUNT > 0)
2800: THEN
2801: FOR i IN 0 .. (nt.COUNT - 1)

Line 2825: RAISE fnd_api.g_exc_error;

2821: fnd_message.set_name ('CN', 'CN_PPE_WITHIN_CPE');
2822: fnd_msg_pub.ADD;
2823: END IF;
2824:
2825: RAISE fnd_api.g_exc_error;
2826: END IF; -- l_child_start_date < l_parent_start_date
2827:
2828: IF ((l_parent_end_date IS NULL) AND (l_child_end_date IS NOT NULL))
2829: THEN

Line 2837: RAISE fnd_api.g_exc_error;

2833: fnd_message.set_name ('CN', 'CN_PPE_WITHIN_CPE');
2834: fnd_msg_pub.ADD;
2835: END IF;
2836:
2837: RAISE fnd_api.g_exc_error;
2838: END IF; -- ((l_child_end_date is NULL) AND (l_parent_child_date is not NULL))
2839:
2840: IF ((l_parent_end_date IS NOT NULL) AND (l_child_end_date IS NOT NULL)) AND (l_parent_end_date > l_child_end_date)
2841: THEN

Line 2849: RAISE fnd_api.g_exc_error;

2845: fnd_message.set_name ('CN', 'CN_PPE_WITHIN_CPE');
2846: fnd_msg_pub.ADD;
2847: END IF;
2848:
2849: RAISE fnd_api.g_exc_error;
2850: END IF; -- ( l_child_end_date > l_parent_end_date )
2851: END LOOP; -- for
2852: END IF; -- nt.count>0
2853: END IF;

Line 2890: RAISE fnd_api.g_exc_error;

2886: fnd_msg_pub.ADD;
2887: END IF;
2888:
2889: x_loading_status := 'FORMULA_NOT_EXIST';
2890: RAISE fnd_api.g_exc_error;
2891: END;
2892:
2893: -- if Quota type is Formula, then Formula is Mandatory and
2894: -- Package name must be null

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

2898: x_loading_status => l_loading_status
2899: );
2900: x_loading_status := l_loading_status;
2901:
2902: IF (x_return_status <> fnd_api.g_ret_sts_success)
2903: THEN
2904: RAISE fnd_api.g_exc_error;
2905: END IF;
2906: ELSIF (p_plan_element.quota_type_code = 'EXTERNAL')

Line 2904: RAISE fnd_api.g_exc_error;

2900: x_loading_status := l_loading_status;
2901:
2902: IF (x_return_status <> fnd_api.g_ret_sts_success)
2903: THEN
2904: RAISE fnd_api.g_exc_error;
2905: END IF;
2906: ELSIF (p_plan_element.quota_type_code = 'EXTERNAL')
2907: THEN
2908: -- if Quota type is External Package name is Mandatory and

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

2912: p_loading_status => x_loading_status,
2913: x_loading_status => l_loading_status
2914: );
2915:
2916: IF (x_return_status <> fnd_api.g_ret_sts_success)
2917: THEN
2918: RAISE fnd_api.g_exc_error;
2919: END IF;
2920: ELSIF (p_plan_element.quota_type_code = 'NONE')

Line 2918: RAISE fnd_api.g_exc_error;

2914: );
2915:
2916: IF (x_return_status <> fnd_api.g_ret_sts_success)
2917: THEN
2918: RAISE fnd_api.g_exc_error;
2919: END IF;
2920: ELSIF (p_plan_element.quota_type_code = 'NONE')
2921: THEN
2922: -- If quota type is NONE, both Formula and package must be null

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

2925: p_loading_status => x_loading_status,
2926: x_loading_status => l_loading_status
2927: );
2928:
2929: IF (x_return_status <> fnd_api.g_ret_sts_success)
2930: THEN
2931: RAISE fnd_api.g_exc_error;
2932: END IF;
2933: END IF;

Line 2931: RAISE fnd_api.g_exc_error;

2927: );
2928:
2929: IF (x_return_status <> fnd_api.g_ret_sts_success)
2930: THEN
2931: RAISE fnd_api.g_exc_error;
2932: END IF;
2933: END IF;
2934:
2935: -- 2.1 check For match of the INCENTIVE_TYPE_CODE against the type of the formula assigned.

Line 2953: RAISE fnd_api.g_exc_error;

2949: fnd_message.set_token ('OBJ_NAME', cn_chk_plan_element_pkg.g_formula_id);
2950: fnd_msg_pub.ADD;
2951: END IF;
2952:
2953: RAISE fnd_api.g_exc_error;
2954: END;
2955:
2956: IF (p_plan_element.incentive_type_code = 'BONUS') AND (l_formula_type = 'C')
2957: THEN

Line 2966: RAISE fnd_api.g_exc_error;

2962: fnd_message.set_token ('PE_INC_TYPE', cn_api.get_lkup_meaning ('BONUS', 'INCENTIVE_TYPE'));
2963: fnd_msg_pub.ADD;
2964: END IF;
2965:
2966: RAISE fnd_api.g_exc_error;
2967: END IF;
2968:
2969: IF (p_plan_element.incentive_type_code = 'COMMISSION') AND (l_formula_type = 'B')
2970: THEN

Line 2979: RAISE fnd_api.g_exc_error;

2975: fnd_message.set_token ('PE_INC_TYPE', cn_api.get_lkup_meaning ('COMMISSION', 'INCENTIVE_TYPE'));
2976: fnd_msg_pub.ADD;
2977: END IF;
2978:
2979: RAISE fnd_api.g_exc_error;
2980: END IF;
2981: END IF;
2982:
2983: -- check the date range or the referenced plan element in formula assigned if any.

Line 3007: x_return_status := fnd_api.g_ret_sts_success;

3003: IS
3004: l_api_name CONSTANT VARCHAR2 (30) := 'chk_formula_quota_pe';
3005: l_loading_status VARCHAR2 (80);
3006: BEGIN
3007: x_return_status := fnd_api.g_ret_sts_success;
3008: x_loading_status := p_loading_status;
3009:
3010: --+
3011: -- Validate Rule : if quota type is formula

Line 3023: ) = fnd_api.g_false

3019: p_token3 => NULL,
3020: p_loading_status => x_loading_status,
3021: x_loading_status => l_loading_status
3022: )
3023: ) = fnd_api.g_false
3024: )
3025: THEN
3026: RAISE fnd_api.g_exc_error;
3027: END IF;

Line 3026: RAISE fnd_api.g_exc_error;

3022: )
3023: ) = fnd_api.g_false
3024: )
3025: THEN
3026: RAISE fnd_api.g_exc_error;
3027: END IF;
3028:
3029: IF (cn_api.pe_num_field_cannot_null (p_num_field => p_pe_rec.calc_formula_id,
3030: p_pe_type => p_pe_rec.quota_type_code,

Line 3037: ) = fnd_api.g_false

3033: p_token2 => NULL,
3034: p_token3 => NULL,
3035: p_loading_status => x_loading_status,
3036: x_loading_status => l_loading_status
3037: ) = fnd_api.g_false
3038: )
3039: THEN
3040: RAISE fnd_api.g_exc_error;
3041: END IF;

Line 3040: RAISE fnd_api.g_exc_error;

3036: x_loading_status => l_loading_status
3037: ) = fnd_api.g_false
3038: )
3039: THEN
3040: RAISE fnd_api.g_exc_error;
3041: END IF;
3042:
3043: IF (p_pe_rec.incentive_type_code = 'MANUAL')
3044: THEN

Line 3054: RAISE fnd_api.g_exc_error;

3050: fnd_msg_pub.ADD;
3051: END IF;
3052:
3053: x_loading_status := 'CN_INCENTIVE_TYPE_MUST_BE';
3054: RAISE fnd_api.g_exc_error;
3055: END IF;
3056: EXCEPTION
3057: WHEN fnd_api.g_exc_error
3058: THEN

Line 3057: WHEN fnd_api.g_exc_error

3053: x_loading_status := 'CN_INCENTIVE_TYPE_MUST_BE';
3054: RAISE fnd_api.g_exc_error;
3055: END IF;
3056: EXCEPTION
3057: WHEN fnd_api.g_exc_error
3058: THEN
3059: x_return_status := fnd_api.g_ret_sts_error;
3060: WHEN fnd_api.g_exc_unexpected_error
3061: THEN

Line 3059: x_return_status := fnd_api.g_ret_sts_error;

3055: END IF;
3056: EXCEPTION
3057: WHEN fnd_api.g_exc_error
3058: THEN
3059: x_return_status := fnd_api.g_ret_sts_error;
3060: WHEN fnd_api.g_exc_unexpected_error
3061: THEN
3062: x_return_status := fnd_api.g_ret_sts_unexp_error;
3063: x_loading_status := 'UNEXPECTED_ERR';

Line 3060: WHEN fnd_api.g_exc_unexpected_error

3056: EXCEPTION
3057: WHEN fnd_api.g_exc_error
3058: THEN
3059: x_return_status := fnd_api.g_ret_sts_error;
3060: WHEN fnd_api.g_exc_unexpected_error
3061: THEN
3062: x_return_status := fnd_api.g_ret_sts_unexp_error;
3063: x_loading_status := 'UNEXPECTED_ERR';
3064: WHEN OTHERS

Line 3062: x_return_status := fnd_api.g_ret_sts_unexp_error;

3058: THEN
3059: x_return_status := fnd_api.g_ret_sts_error;
3060: WHEN fnd_api.g_exc_unexpected_error
3061: THEN
3062: x_return_status := fnd_api.g_ret_sts_unexp_error;
3063: x_loading_status := 'UNEXPECTED_ERR';
3064: WHEN OTHERS
3065: THEN
3066: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3066: x_return_status := fnd_api.g_ret_sts_unexp_error;

3062: x_return_status := fnd_api.g_ret_sts_unexp_error;
3063: x_loading_status := 'UNEXPECTED_ERR';
3064: WHEN OTHERS
3065: THEN
3066: x_return_status := fnd_api.g_ret_sts_unexp_error;
3067: x_loading_status := 'UNEXPECTED_ERR';
3068:
3069: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
3070: THEN

Line 3089: x_return_status := fnd_api.g_ret_sts_success;

3085: IS
3086: l_api_name CONSTANT VARCHAR2 (30) := 'chk_external_quota_pe';
3087: l_loading_status VARCHAR2 (80);
3088: BEGIN
3089: x_return_status := fnd_api.g_ret_sts_success;
3090: x_loading_status := p_loading_status;
3091:
3092: --+
3093: -- Validate Rule : if quota type is EXTERNAL

Line 3105: ) = fnd_api.g_false

3101: p_token3 => NULL,
3102: p_loading_status => x_loading_status,
3103: x_loading_status => l_loading_status
3104: )
3105: ) = fnd_api.g_false
3106: )
3107: THEN
3108: RAISE fnd_api.g_exc_error;
3109: END IF;

Line 3108: RAISE fnd_api.g_exc_error;

3104: )
3105: ) = fnd_api.g_false
3106: )
3107: THEN
3108: RAISE fnd_api.g_exc_error;
3109: END IF;
3110:
3111: IF (cn_api.pe_char_field_cannot_null (p_char_field => p_pe_rec.package_name,
3112: p_pe_type => p_pe_rec.quota_type_code,

Line 3119: ) = fnd_api.g_false

3115: p_token2 => NULL,
3116: p_token3 => NULL,
3117: p_loading_status => x_loading_status,
3118: x_loading_status => l_loading_status
3119: ) = fnd_api.g_false
3120: )
3121: THEN
3122: RAISE fnd_api.g_exc_error;
3123: END IF;

Line 3122: RAISE fnd_api.g_exc_error;

3118: x_loading_status => l_loading_status
3119: ) = fnd_api.g_false
3120: )
3121: THEN
3122: RAISE fnd_api.g_exc_error;
3123: END IF;
3124:
3125: IF (p_pe_rec.incentive_type_code = 'MANUAL')
3126: THEN

Line 3136: RAISE fnd_api.g_exc_error;

3132: fnd_msg_pub.ADD;
3133: END IF;
3134:
3135: x_loading_status := 'CN_INCENTIVE_TYPE_MUST_BE';
3136: RAISE fnd_api.g_exc_error;
3137: END IF;
3138: EXCEPTION
3139: WHEN fnd_api.g_exc_error
3140: THEN

Line 3139: WHEN fnd_api.g_exc_error

3135: x_loading_status := 'CN_INCENTIVE_TYPE_MUST_BE';
3136: RAISE fnd_api.g_exc_error;
3137: END IF;
3138: EXCEPTION
3139: WHEN fnd_api.g_exc_error
3140: THEN
3141: x_return_status := fnd_api.g_ret_sts_error;
3142: WHEN fnd_api.g_exc_unexpected_error
3143: THEN

Line 3141: x_return_status := fnd_api.g_ret_sts_error;

3137: END IF;
3138: EXCEPTION
3139: WHEN fnd_api.g_exc_error
3140: THEN
3141: x_return_status := fnd_api.g_ret_sts_error;
3142: WHEN fnd_api.g_exc_unexpected_error
3143: THEN
3144: x_return_status := fnd_api.g_ret_sts_unexp_error;
3145: x_loading_status := 'UNEXPECTED_ERR';

Line 3142: WHEN fnd_api.g_exc_unexpected_error

3138: EXCEPTION
3139: WHEN fnd_api.g_exc_error
3140: THEN
3141: x_return_status := fnd_api.g_ret_sts_error;
3142: WHEN fnd_api.g_exc_unexpected_error
3143: THEN
3144: x_return_status := fnd_api.g_ret_sts_unexp_error;
3145: x_loading_status := 'UNEXPECTED_ERR';
3146: WHEN OTHERS

Line 3144: x_return_status := fnd_api.g_ret_sts_unexp_error;

3140: THEN
3141: x_return_status := fnd_api.g_ret_sts_error;
3142: WHEN fnd_api.g_exc_unexpected_error
3143: THEN
3144: x_return_status := fnd_api.g_ret_sts_unexp_error;
3145: x_loading_status := 'UNEXPECTED_ERR';
3146: WHEN OTHERS
3147: THEN
3148: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3148: x_return_status := fnd_api.g_ret_sts_unexp_error;

3144: x_return_status := fnd_api.g_ret_sts_unexp_error;
3145: x_loading_status := 'UNEXPECTED_ERR';
3146: WHEN OTHERS
3147: THEN
3148: x_return_status := fnd_api.g_ret_sts_unexp_error;
3149: x_loading_status := 'UNEXPECTED_ERR';
3150:
3151: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
3152: THEN

Line 3171: x_return_status := fnd_api.g_ret_sts_success;

3167: IS
3168: l_api_name CONSTANT VARCHAR2 (30) := 'chk_other_quota_pe';
3169: l_loading_status VARCHAR2 (80);
3170: BEGIN
3171: x_return_status := fnd_api.g_ret_sts_success;
3172: x_loading_status := p_loading_status;
3173:
3174: --+
3175: -- Validate Rule : if quota type is OTHER

Line 3187: ) = fnd_api.g_false

3183: p_token3 => NULL,
3184: p_loading_status => x_loading_status,
3185: x_loading_status => l_loading_status
3186: )
3187: ) = fnd_api.g_false
3188: )
3189: THEN
3190: RAISE fnd_api.g_exc_error;
3191: END IF;

Line 3190: RAISE fnd_api.g_exc_error;

3186: )
3187: ) = fnd_api.g_false
3188: )
3189: THEN
3190: RAISE fnd_api.g_exc_error;
3191: END IF;
3192:
3193: IF ((cn_api.pe_char_field_must_null (p_char_field => p_pe_rec.package_name,
3194: p_pe_type => p_pe_rec.quota_type_code,

Line 3202: ) = fnd_api.g_false

3198: p_token3 => NULL,
3199: p_loading_status => x_loading_status,
3200: x_loading_status => l_loading_status
3201: )
3202: ) = fnd_api.g_false
3203: )
3204: THEN
3205: RAISE fnd_api.g_exc_error;
3206: END IF;

Line 3205: RAISE fnd_api.g_exc_error;

3201: )
3202: ) = fnd_api.g_false
3203: )
3204: THEN
3205: RAISE fnd_api.g_exc_error;
3206: END IF;
3207:
3208: IF (p_pe_rec.incentive_type_code NOT IN ('MANUAL'))
3209: THEN

Line 3219: RAISE fnd_api.g_exc_error;

3215: fnd_msg_pub.ADD;
3216: END IF;
3217:
3218: x_loading_status := 'CN_INCENTIVE_TYPE_MUST_BE';
3219: RAISE fnd_api.g_exc_error;
3220: END IF;
3221: EXCEPTION
3222: WHEN fnd_api.g_exc_error
3223: THEN

Line 3222: WHEN fnd_api.g_exc_error

3218: x_loading_status := 'CN_INCENTIVE_TYPE_MUST_BE';
3219: RAISE fnd_api.g_exc_error;
3220: END IF;
3221: EXCEPTION
3222: WHEN fnd_api.g_exc_error
3223: THEN
3224: x_return_status := fnd_api.g_ret_sts_error;
3225: WHEN fnd_api.g_exc_unexpected_error
3226: THEN

Line 3224: x_return_status := fnd_api.g_ret_sts_error;

3220: END IF;
3221: EXCEPTION
3222: WHEN fnd_api.g_exc_error
3223: THEN
3224: x_return_status := fnd_api.g_ret_sts_error;
3225: WHEN fnd_api.g_exc_unexpected_error
3226: THEN
3227: x_return_status := fnd_api.g_ret_sts_unexp_error;
3228: x_loading_status := 'UNEXPECTED_ERR';

Line 3225: WHEN fnd_api.g_exc_unexpected_error

3221: EXCEPTION
3222: WHEN fnd_api.g_exc_error
3223: THEN
3224: x_return_status := fnd_api.g_ret_sts_error;
3225: WHEN fnd_api.g_exc_unexpected_error
3226: THEN
3227: x_return_status := fnd_api.g_ret_sts_unexp_error;
3228: x_loading_status := 'UNEXPECTED_ERR';
3229: WHEN OTHERS

Line 3227: x_return_status := fnd_api.g_ret_sts_unexp_error;

3223: THEN
3224: x_return_status := fnd_api.g_ret_sts_error;
3225: WHEN fnd_api.g_exc_unexpected_error
3226: THEN
3227: x_return_status := fnd_api.g_ret_sts_unexp_error;
3228: x_loading_status := 'UNEXPECTED_ERR';
3229: WHEN OTHERS
3230: THEN
3231: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3231: x_return_status := fnd_api.g_ret_sts_unexp_error;

3227: x_return_status := fnd_api.g_ret_sts_unexp_error;
3228: x_loading_status := 'UNEXPECTED_ERR';
3229: WHEN OTHERS
3230: THEN
3231: x_return_status := fnd_api.g_ret_sts_unexp_error;
3232: x_loading_status := 'UNEXPECTED_ERR';
3233:
3234: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
3235: THEN

Line 3252: l_return_code VARCHAR2 (1) := fnd_api.g_false;

3248: x_loading_status OUT NOCOPY VARCHAR2
3249: )
3250: RETURN VARCHAR2
3251: IS
3252: l_return_code VARCHAR2 (1) := fnd_api.g_false;
3253: BEGIN
3254: x_loading_status := p_loading_status;
3255:
3256: IF (p_date_para = fnd_api.g_miss_date)

Line 3256: IF (p_date_para = fnd_api.g_miss_date)

3252: l_return_code VARCHAR2 (1) := fnd_api.g_false;
3253: BEGIN
3254: x_loading_status := p_loading_status;
3255:
3256: IF (p_date_para = fnd_api.g_miss_date)
3257: THEN
3258: -- Error, check the msg level and add an error message to the
3259: -- API message list
3260: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error)

Line 3268: l_return_code := fnd_api.g_true;

3264: fnd_msg_pub.ADD;
3265: END IF;
3266:
3267: x_loading_status := 'CN_MISS_PARAMETER';
3268: l_return_code := fnd_api.g_true;
3269: END IF;
3270:
3271: RETURN l_return_code;
3272: END chk_miss_date_para;

Line 3286: l_return_code VARCHAR2 (1) := fnd_api.g_false;

3282: x_loading_status OUT NOCOPY VARCHAR2
3283: )
3284: RETURN VARCHAR2
3285: IS
3286: l_return_code VARCHAR2 (1) := fnd_api.g_false;
3287: BEGIN
3288: x_loading_status := p_loading_status;
3289:
3290: IF (p_date_para IS NULL)

Line 3302: l_return_code := fnd_api.g_true;

3298: fnd_msg_pub.ADD;
3299: END IF;
3300:
3301: x_loading_status := 'CN_CANNOT_NULL';
3302: l_return_code := fnd_api.g_true;
3303: END IF;
3304:
3305: RETURN l_return_code;
3306: END chk_null_date_para;

Line 3335: x_return_status := fnd_api.g_ret_sts_success;

3331: l_record_info quota_curs%ROWTYPE;
3332: l_api_name CONSTANT VARCHAR2 (30) := 'chk_date_effective';
3333: BEGIN
3334: x_loading_status := p_loading_status;
3335: x_return_status := fnd_api.g_ret_sts_success;
3336:
3337: IF p_quota_id IS NOT NULL
3338: THEN
3339: OPEN quota_curs;

Line 3360: RAISE fnd_api.g_exc_error;

3356: fnd_msg_pub.ADD;
3357: END IF;
3358:
3359: x_loading_status := 'UPLIFT_DATE_EFFECTIVE';
3360: RAISE fnd_api.g_exc_error;
3361: ELSE
3362: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_error)
3363: THEN
3364: fnd_message.set_name ('CN', 'CN_RATE_DATE_EFFECTIVE');

Line 3369: RAISE fnd_api.g_exc_error;

3365: fnd_msg_pub.ADD;
3366: END IF;
3367:
3368: x_loading_status := 'RATE_DATE_EFFECTIVE';
3369: RAISE fnd_api.g_exc_error;
3370: END IF;
3371: END IF;
3372: END IF;
3373: EXCEPTION

Line 3374: WHEN fnd_api.g_exc_error

3370: END IF;
3371: END IF;
3372: END IF;
3373: EXCEPTION
3374: WHEN fnd_api.g_exc_error
3375: THEN
3376: x_return_status := fnd_api.g_ret_sts_error;
3377: WHEN fnd_api.g_exc_unexpected_error
3378: THEN

Line 3376: x_return_status := fnd_api.g_ret_sts_error;

3372: END IF;
3373: EXCEPTION
3374: WHEN fnd_api.g_exc_error
3375: THEN
3376: x_return_status := fnd_api.g_ret_sts_error;
3377: WHEN fnd_api.g_exc_unexpected_error
3378: THEN
3379: x_return_status := fnd_api.g_ret_sts_unexp_error;
3380: x_loading_status := 'UNEXPECTED_ERR';

Line 3377: WHEN fnd_api.g_exc_unexpected_error

3373: EXCEPTION
3374: WHEN fnd_api.g_exc_error
3375: THEN
3376: x_return_status := fnd_api.g_ret_sts_error;
3377: WHEN fnd_api.g_exc_unexpected_error
3378: THEN
3379: x_return_status := fnd_api.g_ret_sts_unexp_error;
3380: x_loading_status := 'UNEXPECTED_ERR';
3381: WHEN OTHERS

Line 3379: x_return_status := fnd_api.g_ret_sts_unexp_error;

3375: THEN
3376: x_return_status := fnd_api.g_ret_sts_error;
3377: WHEN fnd_api.g_exc_unexpected_error
3378: THEN
3379: x_return_status := fnd_api.g_ret_sts_unexp_error;
3380: x_loading_status := 'UNEXPECTED_ERR';
3381: WHEN OTHERS
3382: THEN
3383: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3383: x_return_status := fnd_api.g_ret_sts_unexp_error;

3379: x_return_status := fnd_api.g_ret_sts_unexp_error;
3380: x_loading_status := 'UNEXPECTED_ERR';
3381: WHEN OTHERS
3382: THEN
3383: x_return_status := fnd_api.g_ret_sts_unexp_error;
3384: x_loading_status := 'UNEXPECTED_ERR';
3385:
3386: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
3387: THEN

Line 3434: x_return_status := fnd_api.g_ret_sts_success;

3430: l_start_date DATE;
3431: l_end_date DATE;
3432: BEGIN
3433: -- Initialize API return status to success
3434: x_return_status := fnd_api.g_ret_sts_success;
3435: x_loading_status := p_loading_status;
3436:
3437: --+
3438: -- get are there any record previously

Line 3450: IF l_start_date IS NOT NULL AND TRUNC (NVL (l_end_date, fnd_api.g_miss_date)) + 1 <> TRUNC (p_start_date)

3446: l_end_date;
3447:
3448: CLOSE prev;
3449:
3450: IF l_start_date IS NOT NULL AND TRUNC (NVL (l_end_date, fnd_api.g_miss_date)) + 1 <> TRUNC (p_start_date)
3451: THEN
3452: x_loading_status := 'CN_RATE_OP_NOT_ALLOWED';
3453: x_return_status := fnd_api.g_ret_sts_error;
3454: END IF;

Line 3453: x_return_status := fnd_api.g_ret_sts_error;

3449:
3450: IF l_start_date IS NOT NULL AND TRUNC (NVL (l_end_date, fnd_api.g_miss_date)) + 1 <> TRUNC (p_start_date)
3451: THEN
3452: x_loading_status := 'CN_RATE_OP_NOT_ALLOWED';
3453: x_return_status := fnd_api.g_ret_sts_error;
3454: END IF;
3455:
3456: l_start_date := NULL;
3457: l_end_date := NULL;

Line 3459: IF x_return_status <> fnd_api.g_ret_sts_error

3455:
3456: l_start_date := NULL;
3457: l_end_date := NULL;
3458:
3459: IF x_return_status <> fnd_api.g_ret_sts_error
3460: THEN
3461: --+
3462: -- Get are there any records available after this
3463: --+

Line 3472: IF l_start_date IS NOT NULL AND TRUNC (l_start_date) - 1 <> TRUNC (NVL (p_end_date, fnd_api.g_miss_date))

3468: l_end_date;
3469:
3470: CLOSE NEXT;
3471:
3472: IF l_start_date IS NOT NULL AND TRUNC (l_start_date) - 1 <> TRUNC (NVL (p_end_date, fnd_api.g_miss_date))
3473: THEN
3474: x_loading_status := 'CN_RATE_OP_NOT_ALLOWED';
3475: x_return_status := fnd_api.g_ret_sts_error;
3476: END IF;

Line 3475: x_return_status := fnd_api.g_ret_sts_error;

3471:
3472: IF l_start_date IS NOT NULL AND TRUNC (l_start_date) - 1 <> TRUNC (NVL (p_end_date, fnd_api.g_miss_date))
3473: THEN
3474: x_loading_status := 'CN_RATE_OP_NOT_ALLOWED';
3475: x_return_status := fnd_api.g_ret_sts_error;
3476: END IF;
3477: END IF;
3478: ELSIF p_iud_flag = 'D'
3479: THEN

Line 3507: x_return_status := fnd_api.g_ret_sts_error;

3503:
3504: IF l_start_date IS NOT NULL
3505: THEN
3506: x_loading_status := 'CN_RATE_OP_NOT_ALLOWED';
3507: x_return_status := fnd_api.g_ret_sts_error;
3508: END IF;
3509: END IF;
3510: END IF;
3511: END chk_rate_quota_iud;

Line 3552: x_return_status := fnd_api.g_ret_sts_success;

3548: l_start_date DATE;
3549: l_end_date DATE;
3550: BEGIN
3551: -- Initialize API return status to success
3552: x_return_status := fnd_api.g_ret_sts_success;
3553: x_loading_status := p_loading_status;
3554:
3555: IF p_iud_flag IN ('I', 'U')
3556: THEN

Line 3568: IF l_start_date IS NOT NULL AND TRUNC (NVL (l_end_date, fnd_api.g_miss_date)) + 1 <> TRUNC (p_start_date)

3564: l_end_date;
3565:
3566: CLOSE prev;
3567:
3568: IF l_start_date IS NOT NULL AND TRUNC (NVL (l_end_date, fnd_api.g_miss_date)) + 1 <> TRUNC (p_start_date)
3569: THEN
3570: x_loading_status := 'CN_UPLIFT_OP_NOT_ALLOWED';
3571: x_return_status := fnd_api.g_ret_sts_error;
3572: END IF;

Line 3571: x_return_status := fnd_api.g_ret_sts_error;

3567:
3568: IF l_start_date IS NOT NULL AND TRUNC (NVL (l_end_date, fnd_api.g_miss_date)) + 1 <> TRUNC (p_start_date)
3569: THEN
3570: x_loading_status := 'CN_UPLIFT_OP_NOT_ALLOWED';
3571: x_return_status := fnd_api.g_ret_sts_error;
3572: END IF;
3573:
3574: l_start_date := NULL;
3575: l_end_date := NULL;

Line 3577: IF x_return_status <> fnd_api.g_ret_sts_error

3573:
3574: l_start_date := NULL;
3575: l_end_date := NULL;
3576:
3577: IF x_return_status <> fnd_api.g_ret_sts_error
3578: THEN
3579: --+
3580: -- Get are there any records available after this
3581: --+

Line 3590: IF l_start_date IS NOT NULL AND TRUNC (l_start_date) - 1 <> TRUNC (NVL (p_end_date, fnd_api.g_miss_date))

3586: l_end_date;
3587:
3588: CLOSE NEXT;
3589:
3590: IF l_start_date IS NOT NULL AND TRUNC (l_start_date) - 1 <> TRUNC (NVL (p_end_date, fnd_api.g_miss_date))
3591: THEN
3592: x_loading_status := 'CN_UPLIFT_OP_NOT_ALLOWED';
3593: x_return_status := fnd_api.g_ret_sts_error;
3594: END IF;

Line 3593: x_return_status := fnd_api.g_ret_sts_error;

3589:
3590: IF l_start_date IS NOT NULL AND TRUNC (l_start_date) - 1 <> TRUNC (NVL (p_end_date, fnd_api.g_miss_date))
3591: THEN
3592: x_loading_status := 'CN_UPLIFT_OP_NOT_ALLOWED';
3593: x_return_status := fnd_api.g_ret_sts_error;
3594: END IF;
3595: END IF;
3596: ELSIF p_iud_flag = 'D'
3597: THEN

Line 3625: x_return_status := fnd_api.g_ret_sts_error;

3621:
3622: IF l_start_date IS NOT NULL
3623: THEN
3624: x_loading_status := 'CN_UPLIFT_OP_NOT_ALLOWED';
3625: x_return_status := fnd_api.g_ret_sts_error;
3626: END IF;
3627: END IF;
3628: END IF;
3629: END chk_uplift_iud;

Line 3685: x_return_status := fnd_api.g_ret_sts_success;

3681: l_temp_end_date DATE := NULL;
3682: l_temp_count NUMBER;
3683: BEGIN
3684: x_loading_status := p_loading_status;
3685: x_return_status := fnd_api.g_ret_sts_success;
3686:
3687: IF p_calc_formula_id IS NOT NULL
3688: THEN
3689: -- OPEN rt_formula_curs;

Line 3710: RAISE fnd_api.g_exc_error;

3706: fnd_msg_pub.ADD;
3707: END IF;
3708:
3709: x_loading_status := 'RT_DATE_NOT_WITHIN_QUOTA';
3710: RAISE fnd_api.g_exc_error;
3711: END IF;
3712: END IF;
3713: EXCEPTION
3714: WHEN fnd_api.g_exc_error

Line 3714: WHEN fnd_api.g_exc_error

3710: RAISE fnd_api.g_exc_error;
3711: END IF;
3712: END IF;
3713: EXCEPTION
3714: WHEN fnd_api.g_exc_error
3715: THEN
3716: x_return_status := fnd_api.g_ret_sts_error;
3717: WHEN fnd_api.g_exc_unexpected_error
3718: THEN

Line 3716: x_return_status := fnd_api.g_ret_sts_error;

3712: END IF;
3713: EXCEPTION
3714: WHEN fnd_api.g_exc_error
3715: THEN
3716: x_return_status := fnd_api.g_ret_sts_error;
3717: WHEN fnd_api.g_exc_unexpected_error
3718: THEN
3719: x_return_status := fnd_api.g_ret_sts_unexp_error;
3720: x_loading_status := 'UNEXPECTED_ERR';

Line 3717: WHEN fnd_api.g_exc_unexpected_error

3713: EXCEPTION
3714: WHEN fnd_api.g_exc_error
3715: THEN
3716: x_return_status := fnd_api.g_ret_sts_error;
3717: WHEN fnd_api.g_exc_unexpected_error
3718: THEN
3719: x_return_status := fnd_api.g_ret_sts_unexp_error;
3720: x_loading_status := 'UNEXPECTED_ERR';
3721: WHEN OTHERS

Line 3719: x_return_status := fnd_api.g_ret_sts_unexp_error;

3715: THEN
3716: x_return_status := fnd_api.g_ret_sts_error;
3717: WHEN fnd_api.g_exc_unexpected_error
3718: THEN
3719: x_return_status := fnd_api.g_ret_sts_unexp_error;
3720: x_loading_status := 'UNEXPECTED_ERR';
3721: WHEN OTHERS
3722: THEN
3723: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3723: x_return_status := fnd_api.g_ret_sts_unexp_error;

3719: x_return_status := fnd_api.g_ret_sts_unexp_error;
3720: x_loading_status := 'UNEXPECTED_ERR';
3721: WHEN OTHERS
3722: THEN
3723: x_return_status := fnd_api.g_ret_sts_unexp_error;
3724: x_loading_status := 'UNEXPECTED_ERR';
3725:
3726: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
3727: THEN

Line 3777: x_return_status := fnd_api.g_ret_sts_success;

3773: l_record_found NUMBER;
3774: l_api_name CONSTANT VARCHAR2 (30) := 'chk_comp_plan_date';
3775: BEGIN
3776: x_loading_status := p_loading_status;
3777: x_return_status := fnd_api.g_ret_sts_success;
3778:
3779: IF p_quota_id IS NOT NULL
3780: THEN
3781: FOR l_rec IN comp_plan_curs

Line 3792: RAISE fnd_api.g_exc_error;

3788: fnd_msg_pub.ADD;
3789: END IF;
3790:
3791: x_loading_status := 'CP_DATE_NOT_WITHIN_QUOTA';
3792: RAISE fnd_api.g_exc_error;
3793: END IF;
3794: END LOOP;
3795: END IF;
3796: EXCEPTION

Line 3797: WHEN fnd_api.g_exc_error

3793: END IF;
3794: END LOOP;
3795: END IF;
3796: EXCEPTION
3797: WHEN fnd_api.g_exc_error
3798: THEN
3799: x_return_status := fnd_api.g_ret_sts_error;
3800: WHEN fnd_api.g_exc_unexpected_error
3801: THEN

Line 3799: x_return_status := fnd_api.g_ret_sts_error;

3795: END IF;
3796: EXCEPTION
3797: WHEN fnd_api.g_exc_error
3798: THEN
3799: x_return_status := fnd_api.g_ret_sts_error;
3800: WHEN fnd_api.g_exc_unexpected_error
3801: THEN
3802: x_return_status := fnd_api.g_ret_sts_unexp_error;
3803: x_loading_status := 'UNEXPECTED_ERR';

Line 3800: WHEN fnd_api.g_exc_unexpected_error

3796: EXCEPTION
3797: WHEN fnd_api.g_exc_error
3798: THEN
3799: x_return_status := fnd_api.g_ret_sts_error;
3800: WHEN fnd_api.g_exc_unexpected_error
3801: THEN
3802: x_return_status := fnd_api.g_ret_sts_unexp_error;
3803: x_loading_status := 'UNEXPECTED_ERR';
3804: WHEN OTHERS

Line 3802: x_return_status := fnd_api.g_ret_sts_unexp_error;

3798: THEN
3799: x_return_status := fnd_api.g_ret_sts_error;
3800: WHEN fnd_api.g_exc_unexpected_error
3801: THEN
3802: x_return_status := fnd_api.g_ret_sts_unexp_error;
3803: x_loading_status := 'UNEXPECTED_ERR';
3804: WHEN OTHERS
3805: THEN
3806: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3806: x_return_status := fnd_api.g_ret_sts_unexp_error;

3802: x_return_status := fnd_api.g_ret_sts_unexp_error;
3803: x_loading_status := 'UNEXPECTED_ERR';
3804: WHEN OTHERS
3805: THEN
3806: x_return_status := fnd_api.g_ret_sts_unexp_error;
3807: x_loading_status := 'UNEXPECTED_ERR';
3808:
3809: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
3810: THEN

Line 3844: x_return_status := fnd_api.g_ret_sts_success;

3840: l_record_found NUMBER;
3841: l_api_name CONSTANT VARCHAR2 (30) := 'chk_uplift_date';
3842: BEGIN
3843: x_loading_status := p_loading_status;
3844: x_return_status := fnd_api.g_ret_sts_success;
3845:
3846: IF p_quota_id IS NOT NULL
3847: THEN
3848: OPEN uplift_curs;

Line 3864: RAISE fnd_api.g_exc_error;

3860: fnd_msg_pub.ADD;
3861: END IF;
3862:
3863: x_loading_status := 'UPLIFT_DATE_NOT_WIN_QUOTA';
3864: RAISE fnd_api.g_exc_error;
3865: END IF;
3866: END IF;
3867: EXCEPTION
3868: WHEN fnd_api.g_exc_error

Line 3868: WHEN fnd_api.g_exc_error

3864: RAISE fnd_api.g_exc_error;
3865: END IF;
3866: END IF;
3867: EXCEPTION
3868: WHEN fnd_api.g_exc_error
3869: THEN
3870: x_return_status := fnd_api.g_ret_sts_error;
3871: WHEN fnd_api.g_exc_unexpected_error
3872: THEN

Line 3870: x_return_status := fnd_api.g_ret_sts_error;

3866: END IF;
3867: EXCEPTION
3868: WHEN fnd_api.g_exc_error
3869: THEN
3870: x_return_status := fnd_api.g_ret_sts_error;
3871: WHEN fnd_api.g_exc_unexpected_error
3872: THEN
3873: x_return_status := fnd_api.g_ret_sts_unexp_error;
3874: x_loading_status := 'UNEXPECTED_ERR';

Line 3871: WHEN fnd_api.g_exc_unexpected_error

3867: EXCEPTION
3868: WHEN fnd_api.g_exc_error
3869: THEN
3870: x_return_status := fnd_api.g_ret_sts_error;
3871: WHEN fnd_api.g_exc_unexpected_error
3872: THEN
3873: x_return_status := fnd_api.g_ret_sts_unexp_error;
3874: x_loading_status := 'UNEXPECTED_ERR';
3875: WHEN OTHERS

Line 3873: x_return_status := fnd_api.g_ret_sts_unexp_error;

3869: THEN
3870: x_return_status := fnd_api.g_ret_sts_error;
3871: WHEN fnd_api.g_exc_unexpected_error
3872: THEN
3873: x_return_status := fnd_api.g_ret_sts_unexp_error;
3874: x_loading_status := 'UNEXPECTED_ERR';
3875: WHEN OTHERS
3876: THEN
3877: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3877: x_return_status := fnd_api.g_ret_sts_unexp_error;

3873: x_return_status := fnd_api.g_ret_sts_unexp_error;
3874: x_loading_status := 'UNEXPECTED_ERR';
3875: WHEN OTHERS
3876: THEN
3877: x_return_status := fnd_api.g_ret_sts_unexp_error;
3878: x_loading_status := 'UNEXPECTED_ERR';
3879:
3880: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
3881: THEN

Line 3913: x_return_status := fnd_api.g_ret_sts_success;

3909: l_record_found NUMBER;
3910: l_api_name CONSTANT VARCHAR2 (30) := 'chk_rate_quota_date';
3911: BEGIN
3912: x_loading_status := p_loading_status;
3913: x_return_status := fnd_api.g_ret_sts_success;
3914:
3915: IF p_quota_id IS NOT NULL
3916: THEN
3917: OPEN rate_quota_curs;

Line 3933: RAISE fnd_api.g_exc_error;

3929: fnd_msg_pub.ADD;
3930: END IF;
3931:
3932: x_loading_status := 'RQ_DATE_NOT_WIN_QUOTA';
3933: RAISE fnd_api.g_exc_error;
3934: END IF;
3935: END IF;
3936: EXCEPTION
3937: WHEN fnd_api.g_exc_error

Line 3937: WHEN fnd_api.g_exc_error

3933: RAISE fnd_api.g_exc_error;
3934: END IF;
3935: END IF;
3936: EXCEPTION
3937: WHEN fnd_api.g_exc_error
3938: THEN
3939: x_return_status := fnd_api.g_ret_sts_error;
3940: WHEN fnd_api.g_exc_unexpected_error
3941: THEN

Line 3939: x_return_status := fnd_api.g_ret_sts_error;

3935: END IF;
3936: EXCEPTION
3937: WHEN fnd_api.g_exc_error
3938: THEN
3939: x_return_status := fnd_api.g_ret_sts_error;
3940: WHEN fnd_api.g_exc_unexpected_error
3941: THEN
3942: x_return_status := fnd_api.g_ret_sts_unexp_error;
3943: x_loading_status := 'UNEXPECTED_ERR';

Line 3940: WHEN fnd_api.g_exc_unexpected_error

3936: EXCEPTION
3937: WHEN fnd_api.g_exc_error
3938: THEN
3939: x_return_status := fnd_api.g_ret_sts_error;
3940: WHEN fnd_api.g_exc_unexpected_error
3941: THEN
3942: x_return_status := fnd_api.g_ret_sts_unexp_error;
3943: x_loading_status := 'UNEXPECTED_ERR';
3944: WHEN OTHERS

Line 3942: x_return_status := fnd_api.g_ret_sts_unexp_error;

3938: THEN
3939: x_return_status := fnd_api.g_ret_sts_error;
3940: WHEN fnd_api.g_exc_unexpected_error
3941: THEN
3942: x_return_status := fnd_api.g_ret_sts_unexp_error;
3943: x_loading_status := 'UNEXPECTED_ERR';
3944: WHEN OTHERS
3945: THEN
3946: x_return_status := fnd_api.g_ret_sts_unexp_error;

Line 3946: x_return_status := fnd_api.g_ret_sts_unexp_error;

3942: x_return_status := fnd_api.g_ret_sts_unexp_error;
3943: x_loading_status := 'UNEXPECTED_ERR';
3944: WHEN OTHERS
3945: THEN
3946: x_return_status := fnd_api.g_ret_sts_unexp_error;
3947: x_loading_status := 'UNEXPECTED_ERR';
3948:
3949: IF fnd_msg_pub.check_msg_level (fnd_msg_pub.g_msg_lvl_unexp_error)
3950: THEN