DBA Data[Home] [Help]

APPS.CN_QUOTA_RULE_UPLIFTS_GRP dependencies on CN_CHK_PLAN_ELEMENT_PKG

Line 44: RETURN cn_chk_plan_element_pkg.pe_rec_type

40: x_return_status OUT NOCOPY VARCHAR2,
41: p_loading_status IN VARCHAR2,
42: x_loading_status OUT NOCOPY VARCHAR2
43: )
44: RETURN cn_chk_plan_element_pkg.pe_rec_type
45: IS
46: l_pe_rec cn_chk_plan_element_pkg.pe_rec_type := cn_chk_plan_element_pkg.g_miss_pe_rec;
47: l_name VARCHAR2 (2000);
48: l_ret_val boolean := false;

Line 46: l_pe_rec cn_chk_plan_element_pkg.pe_rec_type := cn_chk_plan_element_pkg.g_miss_pe_rec;

42: x_loading_status OUT NOCOPY VARCHAR2
43: )
44: RETURN cn_chk_plan_element_pkg.pe_rec_type
45: IS
46: l_pe_rec cn_chk_plan_element_pkg.pe_rec_type := cn_chk_plan_element_pkg.g_miss_pe_rec;
47: l_name VARCHAR2 (2000);
48: l_ret_val boolean := false;
49: BEGIN
50:

Line 55: cn_chk_plan_element_pkg.validate_org_id (p_rev_uplift_rec.org_id);

51: -- Check if Org Id given correctly or not
52: l_ret_val := CN_OU_UTIL_PVT.is_valid_org(p_org_id => p_rev_uplift_rec.org_id);
53:
54: -- First make sure you have an org_id to drive all searches
55: cn_chk_plan_element_pkg.validate_org_id (p_rev_uplift_rec.org_id);
56: l_pe_rec.org_id := p_rev_uplift_rec.org_id;
57: -- Convert the User Input.
58: x_return_status := fnd_api.g_ret_sts_success;
59: x_loading_status := p_loading_status;

Line 68: l_pe_rec.quota_id := cn_chk_plan_element_pkg.get_quota_id (l_pe_rec.NAME, l_pe_rec.org_id);

64: l_pe_rec.rev_uplift_end_date := p_rev_uplift_rec.end_date;
65: -- Get the Revenue Class Id
66: l_pe_rec.rev_class_id := cn_api.get_rev_class_id (l_pe_rec.rev_class_name, p_rev_uplift_rec.org_id);
67: -- Get the Quota Id
68: l_pe_rec.quota_id := cn_chk_plan_element_pkg.get_quota_id (l_pe_rec.NAME, l_pe_rec.org_id);
69: -- Get the Quota Rule Id
70: l_pe_rec.quota_rule_id := cn_chk_plan_element_pkg.get_quota_rule_id (p_quota_id => l_pe_rec.quota_id, p_rev_class_id => l_pe_rec.rev_class_id);
71:
72: -- Set the Payment Uplift Factor if the Input value is Null or G_MISS_NUM

Line 70: l_pe_rec.quota_rule_id := cn_chk_plan_element_pkg.get_quota_rule_id (p_quota_id => l_pe_rec.quota_id, p_rev_class_id => l_pe_rec.rev_class_id);

66: l_pe_rec.rev_class_id := cn_api.get_rev_class_id (l_pe_rec.rev_class_name, p_rev_uplift_rec.org_id);
67: -- Get the Quota Id
68: l_pe_rec.quota_id := cn_chk_plan_element_pkg.get_quota_id (l_pe_rec.NAME, l_pe_rec.org_id);
69: -- Get the Quota Rule Id
70: l_pe_rec.quota_rule_id := cn_chk_plan_element_pkg.get_quota_rule_id (p_quota_id => l_pe_rec.quota_id, p_rev_class_id => l_pe_rec.rev_class_id);
71:
72: -- Set the Payment Uplift Factor if the Input value is Null or G_MISS_NUM
73: -- Set the Quota Uplift Factor if the Input value is Null or G_MISS_NUM
74: -- Combined the two queries

Line 94: p_pe_rec IN cn_chk_plan_element_pkg.pe_rec_type,

90: PROCEDURE valid_quota_rule_uplift (
91: x_return_status OUT NOCOPY VARCHAR2,
92: x_msg_count OUT NOCOPY NUMBER,
93: x_msg_data OUT NOCOPY VARCHAR2,
94: p_pe_rec IN cn_chk_plan_element_pkg.pe_rec_type,
95: p_quota_rule_uplift_id IN NUMBER,
96: p_rev_class_name_old IN VARCHAR2,
97: p_start_date_old IN DATE,
98: p_end_date_old IN DATE,

Line 127: p_para_name => cn_chk_plan_element_pkg.g_pe_name,

123: -- API body
124: -- check for required data in Plan Element Name
125: -- Check MISS and NULL ( Revenue class Name, Quota Name )
126: IF ((cn_api.chk_miss_char_para (p_char_para => p_pe_rec.NAME,
127: p_para_name => cn_chk_plan_element_pkg.g_pe_name,
128: p_loading_status => x_loading_status,
129: x_loading_status => l_loading_status
130: )
131: ) = fnd_api.g_true

Line 136: p_obj_name => cn_chk_plan_element_pkg.g_pe_name,

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

Line 168: p_para_name => cn_chk_plan_element_pkg.g_rev_cls_name,

164: --+
165: -- Check Revenue Class name is null or miss char
166: --+
167: IF ((cn_api.chk_miss_char_para (p_char_para => p_pe_rec.rev_class_name,
168: p_para_name => cn_chk_plan_element_pkg.g_rev_cls_name,
169: p_loading_status => x_loading_status,
170: x_loading_status => l_loading_status
171: )
172: ) = fnd_api.g_true

Line 177: p_obj_name => cn_chk_plan_element_pkg.g_rev_cls_name,

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

Line 207: IF ((cn_chk_plan_element_pkg.chk_miss_date_para (p_date_para => p_pe_rec.rev_uplift_start_date,

203:
204: --+
205: -- Check Start Date can not be missing or NULL
206: --+
207: IF ((cn_chk_plan_element_pkg.chk_miss_date_para (p_date_para => p_pe_rec.rev_uplift_start_date,
208: p_para_name => cn_chk_plan_element_pkg.g_uplift_start_date,
209: p_loading_status => x_loading_status,
210: x_loading_status => l_loading_status
211: )

Line 208: p_para_name => cn_chk_plan_element_pkg.g_uplift_start_date,

204: --+
205: -- Check Start Date can not be missing or NULL
206: --+
207: IF ((cn_chk_plan_element_pkg.chk_miss_date_para (p_date_para => p_pe_rec.rev_uplift_start_date,
208: p_para_name => cn_chk_plan_element_pkg.g_uplift_start_date,
209: p_loading_status => x_loading_status,
210: x_loading_status => l_loading_status
211: )
212: ) = fnd_api.g_true

Line 216: ELSIF ((cn_chk_plan_element_pkg.chk_null_date_para (p_date_para => p_pe_rec.rev_uplift_start_date,

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

Line 217: p_obj_name => cn_chk_plan_element_pkg.g_uplift_start_date,

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

Line 251: p_para_name => cn_chk_plan_element_pkg.g_uplift_payment_factor,

247: --+
248: -- Check payment Uplift
249: --+
250: IF (cn_api.chk_miss_num_para (p_num_para => p_pe_rec.rev_class_payment_uplift,
251: p_para_name => cn_chk_plan_element_pkg.g_uplift_payment_factor,
252: p_loading_status => x_loading_status,
253: x_loading_status => l_loading_status
254: ) = fnd_api.g_true
255: )

Line 259: p_obj_name => cn_chk_plan_element_pkg.g_uplift_payment_factor,

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

Line 273: p_para_name => cn_chk_plan_element_pkg.g_uplift_quota_factor,

269: --+
270: -- Check Quota Uplift
271: --+
272: IF (cn_api.chk_miss_num_para (p_num_para => p_pe_rec.rev_class_quota_uplift,
273: p_para_name => cn_chk_plan_element_pkg.g_uplift_quota_factor,
274: p_loading_status => x_loading_status,
275: x_loading_status => l_loading_status
276: ) = fnd_api.g_true
277: )

Line 281: p_obj_name => cn_chk_plan_element_pkg.g_uplift_quota_factor,

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

Line 331: cn_chk_plan_element_pkg.chk_date_effective (x_return_status => x_return_status,

327:
328: --+
329: -- Check date Effectivity
330: --+
331: cn_chk_plan_element_pkg.chk_date_effective (x_return_status => x_return_status,
332: p_start_date => p_pe_rec.rev_uplift_start_date,
333: p_end_date => p_pe_rec.rev_uplift_end_date,
334: p_quota_id => p_pe_rec.quota_id,
335: p_object_type => 'UPLIFT',

Line 382: p_new_pe_rec IN cn_chk_plan_element_pkg.pe_rec_type := cn_chk_plan_element_pkg.g_miss_pe_rec,

378: p_quota_name IN VARCHAR2,
379: p_rev_class_name_old IN VARCHAR2,
380: p_start_date_old IN DATE,
381: p_end_date_old IN DATE,
382: p_new_pe_rec IN cn_chk_plan_element_pkg.pe_rec_type := cn_chk_plan_element_pkg.g_miss_pe_rec,
383: x_quota_rule_uplift_id OUT NOCOPY NUMBER,
384: p_loading_status IN VARCHAR2,
385: x_loading_status OUT NOCOPY VARCHAR2
386: )

Line 409: l_quota_rule_id_old := cn_chk_plan_element_pkg.get_quota_rule_id (p_quota_id => p_new_pe_rec.quota_id, p_rev_class_id => l_rev_class_id_old);

405: l_rev_class_id_old := cn_api.get_rev_class_id (p_rev_class_name_old, p_new_pe_rec.org_id);
406: --+
407: -- Get quota rule ID
408: -- +
409: l_quota_rule_id_old := cn_chk_plan_element_pkg.get_quota_rule_id (p_quota_id => p_new_pe_rec.quota_id, p_rev_class_id => l_rev_class_id_old);
410:
411: -- +
412: -- Check the old revenue class name is not null or miss char
413: --+

Line 415: p_para_name => cn_chk_plan_element_pkg.g_rev_cls_name,

411: -- +
412: -- Check the old revenue class name is not null or miss char
413: --+
414: IF ((cn_api.chk_miss_char_para (p_char_para => p_rev_class_name_old,
415: p_para_name => cn_chk_plan_element_pkg.g_rev_cls_name,
416: p_loading_status => x_loading_status,
417: x_loading_status => l_loading_status
418: )
419: ) = fnd_api.g_true

Line 424: p_obj_name => cn_chk_plan_element_pkg.g_rev_cls_name,

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

Line 437: IF ((cn_chk_plan_element_pkg.chk_miss_date_para (p_date_para => p_start_date_old,

433:
434: --+
435: -- Check Old Start Date cannot be missing or NULL
436: --+
437: IF ((cn_chk_plan_element_pkg.chk_miss_date_para (p_date_para => p_start_date_old,
438: p_para_name => cn_chk_plan_element_pkg.g_uplift_start_date,
439: p_loading_status => x_loading_status,
440: x_loading_status => l_loading_status
441: )

Line 438: p_para_name => cn_chk_plan_element_pkg.g_uplift_start_date,

434: --+
435: -- Check Old Start Date cannot be missing or NULL
436: --+
437: IF ((cn_chk_plan_element_pkg.chk_miss_date_para (p_date_para => p_start_date_old,
438: p_para_name => cn_chk_plan_element_pkg.g_uplift_start_date,
439: p_loading_status => x_loading_status,
440: x_loading_status => l_loading_status
441: )
442: ) = fnd_api.g_true

Line 446: ELSIF ((cn_chk_plan_element_pkg.chk_null_date_para (p_date_para => p_start_date_old,

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

Line 447: p_obj_name => cn_chk_plan_element_pkg.g_uplift_start_date,

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

Line 478: cn_chk_plan_element_pkg.get_quota_rule_uplift_id (p_new_pe_rec.quota_rule_id,

474: --+
475: -- Check the quota rule uplift id if the New Quota rule is exists.
476: --+
477: x_quota_rule_uplift_id :=
478: cn_chk_plan_element_pkg.get_quota_rule_uplift_id (p_new_pe_rec.quota_rule_id,
479: p_new_pe_rec.rev_uplift_start_date,
480: p_new_pe_rec.rev_uplift_end_date
481: );
482: --+

Line 485: l_quota_rule_uplift_id_old := cn_chk_plan_element_pkg.get_quota_rule_uplift_id (l_quota_rule_id_old, p_start_date_old, p_end_date_old);

481: );
482: --+
483: -- get the Quota Rule Uplift id using the Old values
484: --+
485: l_quota_rule_uplift_id_old := cn_chk_plan_element_pkg.get_quota_rule_uplift_id (l_quota_rule_id_old, p_start_date_old, p_end_date_old);
486:
487: -- Error message if the Quota Rule Uplift Does Not exists in the Database
488: IF l_quota_rule_uplift_id_old IS NULL
489: THEN

Line 594: l_pe_rec cn_chk_plan_element_pkg.pe_rec_type;

590: )
591: IS
592: l_api_name CONSTANT VARCHAR2 (30) := 'Create_Quota_Rule_uplift';
593: l_api_version CONSTANT NUMBER := 1.0;
594: l_pe_rec cn_chk_plan_element_pkg.pe_rec_type;
595: --l_quota_rule_uplift_id NUMBER;
596: l_uplift_date_seq_rec_tbl uplift_date_seq_rec_tbl_type;
597: l_loading_status VARCHAR2 (80);
598: BEGIN

Line 716: cn_chk_plan_element_pkg.chk_uplift_iud (x_return_status => x_return_status,

712: NVL (TRUNC (l_uplift_date_seq_rec_tbl (i).end_date), fnd_api.g_miss_date)
713: )
714: )
715: THEN
716: cn_chk_plan_element_pkg.chk_uplift_iud (x_return_status => x_return_status,
717: p_start_date => l_uplift_date_seq_rec_tbl (i).start_date,
718: p_end_date => l_uplift_date_seq_rec_tbl (i).end_date,
719: p_iud_flag => 'I',
720: p_quota_rule_id => l_pe_rec.quota_rule_id,

Line 801: l_pe_rec cn_chk_plan_element_pkg.pe_rec_type;

797: )
798: IS
799: l_api_name CONSTANT VARCHAR2 (30) := 'Update_Quota_Rule_uplift';
800: l_api_version CONSTANT NUMBER := 1.0;
801: l_pe_rec cn_chk_plan_element_pkg.pe_rec_type;
802: --l_quota_rule_uplift_id NUMBER;
803: l_uplift_date_seq_rec_tbl uplift_date_seq_rec_tbl_type;
804: l_loading_status VARCHAR2 (80);
805: BEGIN

Line 920: cn_chk_plan_element_pkg.chk_uplift_iud (x_return_status => x_return_status,

916: )
917: )
918: THEN
919: /*
920: cn_chk_plan_element_pkg.chk_uplift_iud (x_return_status => x_return_status,
921: p_start_date => l_uplift_date_seq_rec_tbl (i).start_date,
922: p_end_date => l_uplift_date_seq_rec_tbl (i).end_date,
923: p_iud_flag => 'U',
924: p_quota_rule_id => l_pe_rec.quota_rule_id,

Line 1005: l_pe_rec cn_chk_plan_element_pkg.pe_rec_type;

1001: IS
1002: l_api_name CONSTANT VARCHAR2 (30) := 'Delete_Quota_rule_uplift';
1003: l_api_version CONSTANT NUMBER := 1.0;
1004: l_quota_rule_uplift_id NUMBER;
1005: l_pe_rec cn_chk_plan_element_pkg.pe_rec_type;
1006: l_date_msg VARCHAR2 (100);
1007: l_loading_status VARCHAR2 (80);
1008: BEGIN
1009: -- Standard Start of API savepoint

Line 1048: cn_chk_plan_element_pkg.get_quota_rule_uplift_id (l_pe_rec.quota_rule_id, l_pe_rec.rev_uplift_start_date, l_pe_rec.rev_uplift_end_date);

1044: );
1045: x_loading_status := l_loading_status;
1046: -- get Quota Rule Uplift ID
1047: l_quota_rule_uplift_id :=
1048: cn_chk_plan_element_pkg.get_quota_rule_uplift_id (l_pe_rec.quota_rule_id, l_pe_rec.rev_uplift_start_date, l_pe_rec.rev_uplift_end_date);
1049:
1050: -- if the Quota Rule uplift iD is null then Error message
1051: IF l_quota_rule_uplift_id IS NULL
1052: THEN

Line 1082: cn_chk_plan_element_pkg.chk_uplift_iud (x_return_status => x_return_status,

1078: END IF;
1079:
1080: -- Check whether delete is Allowed, this only first and last record can
1081: -- be deleted
1082: cn_chk_plan_element_pkg.chk_uplift_iud (x_return_status => x_return_status,
1083: p_start_date => l_pe_rec.rev_uplift_start_date,
1084: p_end_date => l_pe_rec.rev_uplift_end_date,
1085: p_iud_flag => 'D', --D Stands for delete
1086: p_quota_rule_id => l_pe_rec.quota_rule_id,