DBA Data[Home] [Help]

APPS.OKC_RENEW_PVT dependencies on OKC_API

Line 16: g_cached_chr_id NUMBER := OKC_API.G_MISS_NUM;

12: g_cached_cle_id NUMBER := -100;
13: -- this g_cached_chr_id will help this program to remember which chr_id it had processed last time when
14: -- it was called. Thus if the same chr_id is called again as in renew consolidation, this
15: --will save the extra overhead of remaking the tables that are made of same values again and again
16: g_cached_chr_id NUMBER := OKC_API.G_MISS_NUM;
17:
18:
19: TYPE IdTab is table of okc_k_lines_b.id%type;
20: g_parent_id_tbl idTab;--used to cache in values of parents of a given line from renconsol

Line 22: ID NUMBER:=OKC_API.G_MISS_NUM,

18:
19: TYPE IdTab is table of okc_k_lines_b.id%type;
20: g_parent_id_tbl idTab;--used to cache in values of parents of a given line from renconsol
21: TYPE CLE_DATES_REC_TYPE IS RECORD(
22: ID NUMBER:=OKC_API.G_MISS_NUM,
23: orig_start_date DATE:=OKC_API.G_MISS_DATE,
24: orig_end_date DATE:=OKC_API.G_MISS_DATE,
25: start_date DATE:=OKC_API.G_MISS_DATE,
26: end_date DATE:=OKC_API.G_MISS_DATE

Line 23: orig_start_date DATE:=OKC_API.G_MISS_DATE,

19: TYPE IdTab is table of okc_k_lines_b.id%type;
20: g_parent_id_tbl idTab;--used to cache in values of parents of a given line from renconsol
21: TYPE CLE_DATES_REC_TYPE IS RECORD(
22: ID NUMBER:=OKC_API.G_MISS_NUM,
23: orig_start_date DATE:=OKC_API.G_MISS_DATE,
24: orig_end_date DATE:=OKC_API.G_MISS_DATE,
25: start_date DATE:=OKC_API.G_MISS_DATE,
26: end_date DATE:=OKC_API.G_MISS_DATE
27: );

Line 24: orig_end_date DATE:=OKC_API.G_MISS_DATE,

20: g_parent_id_tbl idTab;--used to cache in values of parents of a given line from renconsol
21: TYPE CLE_DATES_REC_TYPE IS RECORD(
22: ID NUMBER:=OKC_API.G_MISS_NUM,
23: orig_start_date DATE:=OKC_API.G_MISS_DATE,
24: orig_end_date DATE:=OKC_API.G_MISS_DATE,
25: start_date DATE:=OKC_API.G_MISS_DATE,
26: end_date DATE:=OKC_API.G_MISS_DATE
27: );
28:

Line 25: start_date DATE:=OKC_API.G_MISS_DATE,

21: TYPE CLE_DATES_REC_TYPE IS RECORD(
22: ID NUMBER:=OKC_API.G_MISS_NUM,
23: orig_start_date DATE:=OKC_API.G_MISS_DATE,
24: orig_end_date DATE:=OKC_API.G_MISS_DATE,
25: start_date DATE:=OKC_API.G_MISS_DATE,
26: end_date DATE:=OKC_API.G_MISS_DATE
27: );
28:
29: --TYPE CLE_DATES_TBL_TYPE IS TABLE OF CLE_DATES_REC_TYPE

Line 26: end_date DATE:=OKC_API.G_MISS_DATE

22: ID NUMBER:=OKC_API.G_MISS_NUM,
23: orig_start_date DATE:=OKC_API.G_MISS_DATE,
24: orig_end_date DATE:=OKC_API.G_MISS_DATE,
25: start_date DATE:=OKC_API.G_MISS_DATE,
26: end_date DATE:=OKC_API.G_MISS_DATE
27: );
28:
29: --TYPE CLE_DATES_TBL_TYPE IS TABLE OF CLE_DATES_REC_TYPE
30: -- INDEX BY BINARY_INTEGER;

Line 106: l_return_status varchar2(1) := okc_api.g_ret_sts_success;

102: --san rencol take out later p_auto_renew_rec renew_in_parameters_rec;
103: p_auto_renew_rec okc_renew_pvt.renew_in_parameters_rec;
104:
105: l_api_name constant VARCHAR2(30) := 'Auto_Renew';
106: l_return_status varchar2(1) := okc_api.g_ret_sts_success;
107: l_chr_id number;
108: l_timeunit okx_units_of_measure_v.uom_code%type;
109: l_duration number;
110: l_contract_number okc_k_headers_b.contract_number%TYPE;

Line 114: x_return_status varchar2(1) := okc_api.g_ret_sts_success;

110: l_contract_number okc_k_headers_b.contract_number%TYPE;
111: l_msg_count Number;
112: l_msg Varchar2(2000);
113:
114: x_return_status varchar2(1) := okc_api.g_ret_sts_success;
115: x_msg_count number := okc_api.g_miss_num;
116: x_msg_data varchar2(2000) := okc_api.g_miss_char;
117: l_date Date := Sysdate;
118:

Line 115: x_msg_count number := okc_api.g_miss_num;

111: l_msg_count Number;
112: l_msg Varchar2(2000);
113:
114: x_return_status varchar2(1) := okc_api.g_ret_sts_success;
115: x_msg_count number := okc_api.g_miss_num;
116: x_msg_data varchar2(2000) := okc_api.g_miss_char;
117: l_date Date := Sysdate;
118:
119: BEGIN

Line 116: x_msg_data varchar2(2000) := okc_api.g_miss_char;

112: l_msg Varchar2(2000);
113:
114: x_return_status varchar2(1) := okc_api.g_ret_sts_success;
115: x_msg_count number := okc_api.g_miss_num;
116: x_msg_data varchar2(2000) := okc_api.g_miss_char;
117: l_date Date := Sysdate;
118:
119: BEGIN
120:

Line 142: l_return_status := OKC_API.G_RET_STS_SUCCESS;

138: END IF;
139: If p_chr_id Is Not Null Then
140: l_duration := p_duration;
141: l_timeunit := p_uom_code;
142: l_return_status := OKC_API.G_RET_STS_SUCCESS;
143: Else
144:
145: OKC_TIME_UTIL_PUB.get_duration(Auto_renew_rec.start_date,
146: auto_renew_rec.END_date,

Line 153: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN

149: l_return_status);
150:
151: End If;
152:
153: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
154: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
155: x_return_status := l_return_status;
156: raise G_EXCEPTION_HALT_VALIDATION;
157: ELSE

Line 154: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN

150:
151: End If;
152:
153: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
154: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
155: x_return_status := l_return_status;
156: raise G_EXCEPTION_HALT_VALIDATION;
157: ELSE
158: x_return_status := l_return_status;

Line 180: p_auto_renew_rec.p_perpetual_flag := OKC_API.G_FALSE;

176: p_auto_renew_rec.p_new_contract_modifier := Nvl(p_contract_number_modifier, fnd_profile.value('OKC_CONTRACT_IDENTIFIER')|| l_date || To_char(l_date,' HH24:MI:SS'));
177: p_auto_renew_rec.p_object_version_number := auto_renew_rec.object_version_number;
178: p_auto_renew_rec.p_contract_number := auto_renew_rec.contract_number;
179: p_auto_renew_rec.p_contract_modifier := auto_renew_rec.contract_number_modifier;
180: p_auto_renew_rec.p_perpetual_flag := OKC_API.G_FALSE;
181:
182: -- FND_FILE.PUT_LINE( FND_FILE.LOG, 'Before Pre_Renew');
183: IF (l_debug = 'Y') THEN
184: okc_debug.log('300: Before Pre_Renew');

Line 187: p_init_msg_list => OKC_API.G_TRUE,

183: IF (l_debug = 'Y') THEN
184: okc_debug.log('300: Before Pre_Renew');
185: END IF;
186: OKC_RENEW_PUB.PRE_Renew(p_api_version => 1,
187: p_init_msg_list => OKC_API.G_TRUE,
188: x_return_status => l_return_status,
189: x_msg_count => x_msg_count,
190: x_msg_data => x_msg_data,
191: x_contract_id => l_chr_id,

Line 193: p_do_commit => OKC_API.G_TRUE ,

189: x_msg_count => x_msg_count,
190: x_msg_data => x_msg_data,
191: x_contract_id => l_chr_id,
192: p_renew_in_parameters_rec => p_auto_renew_rec,
193: p_do_commit => OKC_API.G_TRUE ,
194: p_renewal_called_from_ui => p_renewal_called_from_ui);
195: IF (l_debug = 'Y') THEN
196: okc_debug.log('400: After Pre_Renew');
197: END IF;

Line 201: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN

197: END IF;
198:
199: -- FND_FILE.PUT_LINE( FND_FILE.LOG, 'After Pre_Renew');
200: -- FND_FILE.PUT_LINE( FND_FILE.LOG, 'l_return_status ' || l_return_status)
201: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
202: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
203: x_return_status := l_return_status;
204: raise G_EXCEPTION_HALT_VALIDATION;
205: ELSE

Line 202: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN

198:
199: -- FND_FILE.PUT_LINE( FND_FILE.LOG, 'After Pre_Renew');
200: -- FND_FILE.PUT_LINE( FND_FILE.LOG, 'l_return_status ' || l_return_status)
201: IF (l_return_status <> OKC_API.G_RET_STS_SUCCESS) THEN
202: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
203: x_return_status := l_return_status;
204: raise G_EXCEPTION_HALT_VALIDATION;
205: ELSE
206: x_return_status := l_return_status;

Line 262: OKC_API.set_message(p_app_name => g_app_name,

258: okc_debug.Reset_Indentation;
259: END IF;
260:
261: retcode := '2';
262: OKC_API.set_message(p_app_name => g_app_name,
263: p_msg_name => g_unexpected_error,
264: p_token1 => g_sqlcode_token,
265: p_token1_value => sqlcode,
266: p_token2 => g_sqlerrm_token,

Line 328: IF (l_mod is not null) and (l_mod <> OKC_API.G_MISS_CHAR) then

324: FETCH c_chr INTO l_code,l_template_yn,l_app_id,l_scs_code,l_k,l_mod,
325: l_end_date,l_date_terminated, l_start_date;
326: CLOSE c_chr;
327:
328: IF (l_mod is not null) and (l_mod <> OKC_API.G_MISS_CHAR) then
329: l_k := l_k ||'-'||l_mod;
330: END IF;
331:
332: IF l_template_yn = 'Y' then

Line 336: OKC_API.set_message(p_app_name => g_app_name,

332: IF l_template_yn = 'Y' then
333: IF (l_debug = 'Y') THEN
334: okc_debug.log('1000: Templates non-renewable !!');
335: END IF;
336: OKC_API.set_message(p_app_name => g_app_name,
337: p_msg_name => 'OKC_K_TEMPLATE',
338: p_token1 => 'NUMBER',
339: p_token1_value => l_k);
340:

Line 353: OKC_API.set_message(p_app_name => g_app_name,

349: IF l_end_date Is Null then
350: IF (l_debug = 'Y') THEN
351: okc_debug.log('1011: Perpetual Contracts non-renewable !!');
352: END IF;
353: OKC_API.set_message(p_app_name => g_app_name,
354: p_msg_name => 'OKC_NO_PERPETUAL',
355: p_token1 => 'component',
356: p_token1_value => l_k);
357: IF (l_debug = 'Y') THEN

Line 373: OKC_API.set_message(p_app_name => g_app_name,

369: IF (l_status in ('ACTIVE','EXPIRED','SIGNED') and l_date_terminated is not null)then
370: IF (l_debug = 'Y') THEN
371: okc_debug.log('1013: Future Terminated Contracts non-renewable !!');
372: END IF;
373: OKC_API.set_message(p_app_name => g_app_name,
374: p_msg_name => 'OKC_FUTURE_TERMINATED_K',
375: p_token1 => 'NUMBER',
376: p_token1_value => l_k );
377: IF (l_debug = 'Y') THEN

Line 390: OKC_API.set_message(p_app_name => g_app_name,

386: p_scs_code => l_scs_code) <> 'U' Then
387: IF (l_debug = 'Y') THEN
388: okc_debug.log('1015: Secured Contracts non-renewable !!');
389: END IF;
390: OKC_API.set_message(p_app_name => g_app_name,
391: p_msg_name => 'OKC_NO_UPDATE',
392: p_token1 => 'CHR',
393: p_token1_value => l_k);
394: IF (l_debug = 'Y') THEN

Line 416: p_init_msg_list => OKC_API.G_FALSE,

412: -- invoke OKS procedure to check renew eligibility for service class
413: If l_scs_code in ('SERVICE','WARRANTY','SUBSCRIPTION') THEN
414: OKS_RENEW_UTIL_PUB.GET_RENEW_RULES (
415: p_api_version => 1.0,
416: p_init_msg_list => OKC_API.G_FALSE,
417: x_return_status => l_return_status,
418: x_msg_count => x_msg_count,
419: x_msg_data => x_msg_data,
420: P_Chr_Id => p_chr_id,

Line 428: OKC_API.set_message(

424: P_RNRL_Rec => l_rnrl_rec,
425: X_RNRL_Rec => x_rnrl_rec
426: );
427: IF x_rnrl_rec.renewal_type = 'DNR' THEN
428: OKC_API.set_message(
429: G_APP_NAME,
430: G_DNR_MSG);
431: okc_debug.log('1000: Leaving is_renew_allowed ', 2);
432: okc_debug.Reset_Indentation;

Line 444: /*OKC_API.set_message(p_app_name => g_app_name,

440: END IF;
441: return(TRUE);
442: ELSE
443: -- Bug 3280617
444: /*OKC_API.set_message(p_app_name => g_app_name,
445: p_msg_name => 'OKC_INVALID_STS',
446: p_token1 => 'component',
447: p_token1_value => l_k);*/
448:

Line 523: okc_api.init_msg_list(p_init_msg_list);

519: okc_debug.Set_Indentation('OKC_RENEW_PVT');
520: okc_debug.log('1400: Entered VALIDATE', 2);
521: END IF;
522:
523: okc_api.init_msg_list(p_init_msg_list);
524:
525: x_return_status := okc_api.g_ret_sts_success;
526:
527: If p_renew_in_parameters_rec.p_perpetual_flag = OKC_API.G_FALSE OR

Line 525: x_return_status := okc_api.g_ret_sts_success;

521: END IF;
522:
523: okc_api.init_msg_list(p_init_msg_list);
524:
525: x_return_status := okc_api.g_ret_sts_success;
526:
527: If p_renew_in_parameters_rec.p_perpetual_flag = OKC_API.G_FALSE OR
528: p_renew_in_parameters_rec.p_perpetual_flag IS NULL
529: Then

Line 527: If p_renew_in_parameters_rec.p_perpetual_flag = OKC_API.G_FALSE OR

523: okc_api.init_msg_list(p_init_msg_list);
524:
525: x_return_status := okc_api.g_ret_sts_success;
526:
527: If p_renew_in_parameters_rec.p_perpetual_flag = OKC_API.G_FALSE OR
528: p_renew_in_parameters_rec.p_perpetual_flag IS NULL
529: Then
530: if ( p_renew_in_parameters_rec.p_END_date is null
531: and

Line 540: OKC_API.set_message(p_app_name => g_app_name,

536: )
537: )
538: then
539:
540: OKC_API.set_message(p_app_name => g_app_name,
541: p_msg_name => 'OKC_INVALID_PARAMETERS');
542:
543: x_return_status := OKC_API.G_RET_STS_ERROR;
544: RAISE g_exception_halt_validation;

Line 543: x_return_status := OKC_API.G_RET_STS_ERROR;

539:
540: OKC_API.set_message(p_app_name => g_app_name,
541: p_msg_name => 'OKC_INVALID_PARAMETERS');
542:
543: x_return_status := OKC_API.G_RET_STS_ERROR;
544: RAISE g_exception_halt_validation;
545: END if;
546: END IF; -- End perpetual_flag = OKC_API.G_FALSE
547:

Line 546: END IF; -- End perpetual_flag = OKC_API.G_FALSE

542:
543: x_return_status := OKC_API.G_RET_STS_ERROR;
544: RAISE g_exception_halt_validation;
545: END if;
546: END IF; -- End perpetual_flag = OKC_API.G_FALSE
547:
548: if ( p_renew_in_parameters_rec.p_start_date is not null and
549: p_renew_in_parameters_rec.p_orig_end_date is not null ) then
550: if ( p_renew_in_parameters_rec.p_start_date <= p_renew_in_parameters_rec.p_orig_end_date) then

Line 552: OKC_API.set_message(p_app_name => g_app_name,

548: if ( p_renew_in_parameters_rec.p_start_date is not null and
549: p_renew_in_parameters_rec.p_orig_end_date is not null ) then
550: if ( p_renew_in_parameters_rec.p_start_date <= p_renew_in_parameters_rec.p_orig_end_date) then
551:
552: OKC_API.set_message(p_app_name => g_app_name,
553: p_msg_name => 'OKC_NEW_START_MORE_END');
554:
555: x_return_status := OKC_API.G_RET_STS_ERROR;
556: RAISE g_exception_halt_validation;

Line 555: x_return_status := OKC_API.G_RET_STS_ERROR;

551:
552: OKC_API.set_message(p_app_name => g_app_name,
553: p_msg_name => 'OKC_NEW_START_MORE_END');
554:
555: x_return_status := OKC_API.G_RET_STS_ERROR;
556: RAISE g_exception_halt_validation;
557: END IF;
558: END if;
559:

Line 567: OKC_API.set_message(p_app_name => g_app_name,

563: fetch cur_uom into l_dummy;
564:
565: if cur_uom%notfound then
566:
567: OKC_API.set_message(p_app_name => g_app_name,
568: p_msg_name => 'OKC_INVALID_UOM',
569: p_token1 => 'UOM_CODE',
570: p_token1_value => p_renew_in_parameters_rec.p_uom_code);
571:

Line 572: x_return_status := OKC_API.G_RET_STS_ERROR;

568: p_msg_name => 'OKC_INVALID_UOM',
569: p_token1 => 'UOM_CODE',
570: p_token1_value => p_renew_in_parameters_rec.p_uom_code);
571:
572: x_return_status := OKC_API.G_RET_STS_ERROR;
573: close cur_uom;
574: RAISE g_exception_halt_validation;
575: END if;
576:

Line 586: OKC_API.set_message(p_app_name => g_app_name,

582: fetch cur_k_header into k_header_rec;
583:
584: if cur_k_header%notfound then -- contract header_id is wrong
585:
586: OKC_API.set_message(p_app_name => g_app_name,
587: p_msg_name => 'OKC_K_HEADER_NOT_FOUND',
588: p_token1 => 'NUMBER',
589: p_token1_value => p_renew_in_parameters_rec.p_contract_number);
590:

Line 591: x_return_status := OKC_API.G_RET_STS_ERROR;

587: p_msg_name => 'OKC_K_HEADER_NOT_FOUND',
588: p_token1 => 'NUMBER',
589: p_token1_value => p_renew_in_parameters_rec.p_contract_number);
590:
591: x_return_status := OKC_API.G_RET_STS_ERROR;
592: close cur_k_header;
593: RAISE g_exception_halt_validation;
594:
595: END if;

Line 601: OKC_API.set_message(p_app_name => g_app_name,

597: close cur_k_header;
598:
599: -- A perpetual cannot be renewed further !!
600: IF k_header_rec.end_date Is Null then
601: OKC_API.set_message(p_app_name => g_app_name,
602: p_msg_name => 'OKC_NO_PERPETUAL',
603: p_token1 => 'component',
604: p_token1_value => p_renew_in_parameters_rec.p_contract_number);
605: x_return_status := okc_api.g_ret_sts_error;

Line 605: x_return_status := okc_api.g_ret_sts_error;

601: OKC_API.set_message(p_app_name => g_app_name,
602: p_msg_name => 'OKC_NO_PERPETUAL',
603: p_token1 => 'component',
604: p_token1_value => p_renew_in_parameters_rec.p_contract_number);
605: x_return_status := okc_api.g_ret_sts_error;
606: RAISE g_exception_halt_validation;
607: END IF;
608:
609: If k_header_rec.template_Yn = 'Y' then

Line 611: OKC_API.set_message(p_app_name => g_app_name,

607: END IF;
608:
609: If k_header_rec.template_Yn = 'Y' then
610:
611: OKC_API.set_message(p_app_name => g_app_name,
612: p_msg_name => 'OKC_K_TEMPLATE',
613: p_token1 => 'NUMBER',
614: p_token1_value => p_renew_in_parameters_rec.p_contract_number);
615:

Line 616: x_return_status := okc_api.g_ret_sts_error;

612: p_msg_name => 'OKC_K_TEMPLATE',
613: p_token1 => 'NUMBER',
614: p_token1_value => p_renew_in_parameters_rec.p_contract_number);
615:
616: x_return_status := okc_api.g_ret_sts_error;
617: RAISE g_exception_halt_validation;
618:
619: END if;
620:

Line 626: OKC_API.set_message(p_app_name => g_app_name,

622: fetch cur_status into l_status,l_meaning;
623: close cur_status;
624:
625: IF l_status='1' then
626: OKC_API.set_message(p_app_name => g_app_name,
627: p_msg_name => 'OKC_INVALID_K_STATUS',
628: p_token1 => 'NUMBER',
629: p_token1_value => k_header_rec.contract_number,
630: p_token2 => 'MODIFIER',

Line 638: x_return_status := OKC_API.G_RET_STS_ERROR;

634: RAISE g_exception_halt_validation;
635: END IF;
636:
637: IF l_status NOT IN ('ACTIVE','EXPIRED','SIGNED') then
638: x_return_status := OKC_API.G_RET_STS_ERROR;
639:
640: OKC_API.set_message(p_app_name => g_app_name,
641: p_msg_name => 'OKC_INVALID_K_STATUS',
642: p_token1 => 'NUMBER',

Line 640: OKC_API.set_message(p_app_name => g_app_name,

636:
637: IF l_status NOT IN ('ACTIVE','EXPIRED','SIGNED') then
638: x_return_status := OKC_API.G_RET_STS_ERROR;
639:
640: OKC_API.set_message(p_app_name => g_app_name,
641: p_msg_name => 'OKC_INVALID_K_STATUS',
642: p_token1 => 'NUMBER',
643: p_token1_value => k_header_rec.contract_number,
644: p_token2 => 'MODIFIER',

Line 651: x_return_status := OKC_API.G_RET_STS_ERROR;

647: p_token3_value => l_meaning);
648:
649: RAISE g_exception_halt_validation;
650: ELSIF k_header_rec.date_terminated is not null then
651: x_return_status := OKC_API.G_RET_STS_ERROR;
652:
653: OKC_API.set_message(p_app_name => g_app_name,
654: p_msg_name => 'OKC_FUTURE_TERMINATED_K',
655: p_token1 => 'NUMBER',

Line 653: OKC_API.set_message(p_app_name => g_app_name,

649: RAISE g_exception_halt_validation;
650: ELSIF k_header_rec.date_terminated is not null then
651: x_return_status := OKC_API.G_RET_STS_ERROR;
652:
653: OKC_API.set_message(p_app_name => g_app_name,
654: p_msg_name => 'OKC_FUTURE_TERMINATED_K',
655: p_token1 => 'NUMBER',
656: p_token1_value => k_header_rec.contract_number );
657:

Line 664: IF (is_already_not_renewed(k_header_rec.id,k_header_rec.contract_number, l_msg_name, p_renewal_called_from_ui) = OKC_API.G_FALSE) THEN

660: /* Modified the following logic for bugfix 2093117 */
661:
662: ELSIF (( k_header_rec.date_renewed is not null) OR (p_renewal_called_from_ui = 'N' )) THEN
663: --Bug 3560988 Passing p_renewal_called_from_ui to the is_already_not_renewed function
664: IF (is_already_not_renewed(k_header_rec.id,k_header_rec.contract_number, l_msg_name, p_renewal_called_from_ui) = OKC_API.G_FALSE) THEN
665: x_return_status := OKC_API.G_RET_STS_ERROR;
666: END IF;
667: END IF;
668: /* added for bug 3005039 */

Line 665: x_return_status := OKC_API.G_RET_STS_ERROR;

661:
662: ELSIF (( k_header_rec.date_renewed is not null) OR (p_renewal_called_from_ui = 'N' )) THEN
663: --Bug 3560988 Passing p_renewal_called_from_ui to the is_already_not_renewed function
664: IF (is_already_not_renewed(k_header_rec.id,k_header_rec.contract_number, l_msg_name, p_renewal_called_from_ui) = OKC_API.G_FALSE) THEN
665: x_return_status := OKC_API.G_RET_STS_ERROR;
666: END IF;
667: END IF;
668: /* added for bug 3005039 */
669: if p_renewal_called_from_UI = 'N' then

Line 670: IF (validate_line(p_renew_in_parameters_rec.p_contract_id) = OKC_API.G_FALSE) THEN

666: END IF;
667: END IF;
668: /* added for bug 3005039 */
669: if p_renewal_called_from_UI = 'N' then
670: IF (validate_line(p_renew_in_parameters_rec.p_contract_id) = OKC_API.G_FALSE) THEN
671: x_return_status := OKC_API.G_RET_STS_ERROR;
672: end if;
673: end if;
674: /* added for bug 3005039 */

Line 671: x_return_status := OKC_API.G_RET_STS_ERROR;

667: END IF;
668: /* added for bug 3005039 */
669: if p_renewal_called_from_UI = 'N' then
670: IF (validate_line(p_renew_in_parameters_rec.p_contract_id) = OKC_API.G_FALSE) THEN
671: x_return_status := OKC_API.G_RET_STS_ERROR;
672: end if;
673: end if;
674: /* added for bug 3005039 */
675: /*

Line 683: IF ( p_renew_in_parameters_rec.p_context = OKC_API.G_MISS_CHAR

679: -- used to renew the contract.
680: -- Also make sure to prevent creation of another Quote( for renewal) if
681: -- one already exists.
682: --
683: IF ( p_renew_in_parameters_rec.p_context = OKC_API.G_MISS_CHAR
684: OR
685: p_renew_in_parameters_rec.p_context IS NULL
686: OR
687: p_renew_in_parameters_rec.p_context = okc_oc_int_qtk_pvt.g_k2q_ren ) THEN

Line 699: OKC_API.set_message( p_app_name => g_app_name,

695: --
696: -- i.e Found a quote that should be used for renewal of
697: -- contract. So do not allow on-line renewal
698:
699: OKC_API.set_message( p_app_name => g_app_name,
700: p_msg_name =>'OKC_RENEWAL_QUOTE',
701: p_token1 => 'QUOTE',
702: p_token1_value => qte_rec.quote_number,
703: p_token2 =>'NUMBER',

Line 706: x_return_status := OKC_API.G_RET_STS_ERROR;

702: p_token1_value => qte_rec.quote_number,
703: p_token2 =>'NUMBER',
704: p_token2_value => k_header_rec.contract_number );
705:
706: x_return_status := OKC_API.G_RET_STS_ERROR;
707: CLOSE cur_qte;
708: RAISE g_exception_halt_validation;
709:
710: END IF; -- End cur_qte%FOUND

Line 741: OKC_API.set_message(p_app_name => g_app_name,

737: okc_debug.log('1700: Exiting VALIDATE:OTHERS Exception', 2);
738: okc_debug.Reset_Indentation;
739: END IF;
740:
741: OKC_API.set_message(p_app_name => g_app_name,
742: p_msg_name => g_unexpected_error,
743: p_token1 => g_sqlcode_token,
744: p_token1_value => sqlcode,
745: p_token2 => g_sqlerrm_token,

Line 748: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

744: p_token1_value => sqlcode,
745: p_token2 => g_sqlerrm_token,
746: p_token2_value => sqlerrm);
747:
748: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
749:
750: END VALIDATE;
751:
752: FUNCTION VALIDATE_LINE(p_contract_id IN NUMBER) RETURN VARCHAR2

Line 764: l_return_flag varchar2(1) := OKC_API.G_TRUE;

760: and l.date_renewed is null
761: and l.date_terminated is null;
762:
763: k_lines_rec cur_k_lines%rowtype;
764: l_return_flag varchar2(1) := OKC_API.G_TRUE;
765: BEGIN
766: open cur_k_lines;
767: fetch cur_k_lines into k_lines_rec;
768: if cur_k_lines%notfound then

Line 769: OKC_API.set_message(p_app_name => g_app_name,

765: BEGIN
766: open cur_k_lines;
767: fetch cur_k_lines into k_lines_rec;
768: if cur_k_lines%notfound then
769: OKC_API.set_message(p_app_name => g_app_name,
770: p_msg_name => 'OKC_LINES_SUBLINES_TERMINATED');
771: close cur_k_lines;
772: RETURN(OKC_API.G_FALSE);
773: END IF;

Line 772: RETURN(OKC_API.G_FALSE);

768: if cur_k_lines%notfound then
769: OKC_API.set_message(p_app_name => g_app_name,
770: p_msg_name => 'OKC_LINES_SUBLINES_TERMINATED');
771: close cur_k_lines;
772: RETURN(OKC_API.G_FALSE);
773: END IF;
774:
775: -- Bug 3584224 Invoking validate_oks_lines to check if all the sublines have been terminated.
776: l_return_flag := OKC_OKS_PUB.VALIDATE_OKS_LINES(p_contract_id);

Line 827: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;

823:
824: E_Resource_Busy EXCEPTION;
825: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
826:
827: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;
828:
829: l_api_name constant varchar2(30) := 'update_rules';
830: l_string varchar2(2000);
831: l_uom_code okx_units_of_measure_v.uom_code%type;

Line 859: l_rec.id:=OKC_API.G_MISS_NUM;

855:
856: -- okc_debug.Set_Indentation('get_date_rec');
857: -- okc_debug.log('1800: Entered get_date_rec', 2);
858:
859: l_rec.id:=OKC_API.G_MISS_NUM;
860:
861: OPEN c_get_date_rec(p_id);
862: FETCH c_get_date_rec INTO l_rec;
863: CLOSE c_get_date_rec;

Line 879: l_rec.id:=OKC_API.G_MISS_NUM;

875:
876: -- okc_debug.Set_Indentation('get_tve_rec');
877: -- okc_debug.log('2000: Entered get_tve_rec', 2);
878:
879: l_rec.id:=OKC_API.G_MISS_NUM;
880: If g_time_tbl.count >0 then
881: i:=g_time_tbl.first;
882: LOOP
883: If g_time_tbl(i).id=p_tve_id then

Line 901: l_return_status varchar2(1):=OKC_API.G_RET_STS_SUCCESS;

897: END;
898:
899: FUNCTION check_ia(p_tve_id number,p_obj_no number , p_rule_rec cur_rules%rowtype , p_date_rec cle_dates_rec_type)
900: Return varchar2 is
901: l_return_status varchar2(1):=OKC_API.G_RET_STS_SUCCESS;
902: l_tve_start date :=OKC_API.G_MISS_DATE;
903: l_tve_end date :=OKC_API.G_MISS_DATE;
904: l_isev_ext_rec_type OKC_TIME_PUB.isev_ext_rec_type;
905: i_isev_ext_rec_type OKC_TIME_PUB.isev_ext_rec_type;

Line 902: l_tve_start date :=OKC_API.G_MISS_DATE;

898:
899: FUNCTION check_ia(p_tve_id number,p_obj_no number , p_rule_rec cur_rules%rowtype , p_date_rec cle_dates_rec_type)
900: Return varchar2 is
901: l_return_status varchar2(1):=OKC_API.G_RET_STS_SUCCESS;
902: l_tve_start date :=OKC_API.G_MISS_DATE;
903: l_tve_end date :=OKC_API.G_MISS_DATE;
904: l_isev_ext_rec_type OKC_TIME_PUB.isev_ext_rec_type;
905: i_isev_ext_rec_type OKC_TIME_PUB.isev_ext_rec_type;
906: i_rulv_rec OKC_RULE_PUB.rulv_rec_type;

Line 903: l_tve_end date :=OKC_API.G_MISS_DATE;

899: FUNCTION check_ia(p_tve_id number,p_obj_no number , p_rule_rec cur_rules%rowtype , p_date_rec cle_dates_rec_type)
900: Return varchar2 is
901: l_return_status varchar2(1):=OKC_API.G_RET_STS_SUCCESS;
902: l_tve_start date :=OKC_API.G_MISS_DATE;
903: l_tve_end date :=OKC_API.G_MISS_DATE;
904: l_isev_ext_rec_type OKC_TIME_PUB.isev_ext_rec_type;
905: i_isev_ext_rec_type OKC_TIME_PUB.isev_ext_rec_type;
906: i_rulv_rec OKC_RULE_PUB.rulv_rec_type;
907: l_rulv_rec OKC_RULE_PUB.rulv_rec_type;

Line 909: l_orig_start_date date :=OKC_API.G_MISS_DATE;

905: i_isev_ext_rec_type OKC_TIME_PUB.isev_ext_rec_type;
906: i_rulv_rec OKC_RULE_PUB.rulv_rec_type;
907: l_rulv_rec OKC_RULE_PUB.rulv_rec_type;
908: l_exception_stop exception;
909: l_orig_start_date date :=OKC_API.G_MISS_DATE;
910: l_orig_end_date date :=OKC_API.G_MISS_DATE;
911: l_new_start_date date :=OKC_API.G_MISS_DATE;
912: l_new_end_date date :=OKC_API.G_MISS_DATE;
913: l_api_name Varchar2(30) := 'check_ia';

Line 910: l_orig_end_date date :=OKC_API.G_MISS_DATE;

906: i_rulv_rec OKC_RULE_PUB.rulv_rec_type;
907: l_rulv_rec OKC_RULE_PUB.rulv_rec_type;
908: l_exception_stop exception;
909: l_orig_start_date date :=OKC_API.G_MISS_DATE;
910: l_orig_end_date date :=OKC_API.G_MISS_DATE;
911: l_new_start_date date :=OKC_API.G_MISS_DATE;
912: l_new_end_date date :=OKC_API.G_MISS_DATE;
913: l_api_name Varchar2(30) := 'check_ia';
914: BEGIN

Line 911: l_new_start_date date :=OKC_API.G_MISS_DATE;

907: l_rulv_rec OKC_RULE_PUB.rulv_rec_type;
908: l_exception_stop exception;
909: l_orig_start_date date :=OKC_API.G_MISS_DATE;
910: l_orig_end_date date :=OKC_API.G_MISS_DATE;
911: l_new_start_date date :=OKC_API.G_MISS_DATE;
912: l_new_end_date date :=OKC_API.G_MISS_DATE;
913: l_api_name Varchar2(30) := 'check_ia';
914: BEGIN
915:

Line 912: l_new_end_date date :=OKC_API.G_MISS_DATE;

908: l_exception_stop exception;
909: l_orig_start_date date :=OKC_API.G_MISS_DATE;
910: l_orig_end_date date :=OKC_API.G_MISS_DATE;
911: l_new_start_date date :=OKC_API.G_MISS_DATE;
912: l_new_end_date date :=OKC_API.G_MISS_DATE;
913: l_api_name Varchar2(30) := 'check_ia';
914: BEGIN
915:
916: -- okc_debug.Set_Indentation('check_ia');

Line 928: If l_tve_start <>OKC_API.G_MISS_DATE and l_tve_end <>OKC_API.G_MISS_DATE then

924:
925: open cur_ia(p_tve_id);
926: Fetch cur_ia into l_tve_start,l_tve_end;
927: close cur_ia;
928: If l_tve_start <>OKC_API.G_MISS_DATE and l_tve_end <>OKC_API.G_MISS_DATE then
929: if l_tve_start = l_orig_start_date and l_tve_end = l_orig_end_date then
930: l_isev_ext_rec_type.id:=p_tve_id;
931: l_isev_ext_rec_type.object_version_number:=p_obj_no;
932: l_isev_ext_rec_type.start_date:=l_new_start_date;

Line 938: p_init_msg_list=> okc_api.g_false,

934: --san comment update the ia
935: -- okc_debug.log('2300: Before update_ia_startend');
936: OKC_TIME_PUB.UPDATE_IA_STARTEND(
937: p_api_version=> p_api_version,
938: p_init_msg_list=> okc_api.g_false,
939: x_return_status=> l_return_status,
940: x_msg_count=> x_msg_count,
941: x_msg_data=> x_msg_data,
942: p_isev_ext_rec=> l_isev_ext_rec_type,

Line 945: IF l_return_status <> OKC_API.G_RET_STS_SUCCESS THEN

941: x_msg_data=> x_msg_data,
942: p_isev_ext_rec=> l_isev_ext_rec_type,
943: x_isev_ext_rec=> i_isev_ext_rec_type) ;
944: -- okc_debug.log('2400: After update_ia_startend');
945: IF l_return_status <> OKC_API.G_RET_STS_SUCCESS THEN
946: RAISE l_exception_stop;
947: END IF;
948:
949: l_rulv_rec.id := p_rule_rec.id;

Line 959: p_init_msg_list => OKC_API.G_FALSE,

955: to_char(l_orig_end_date,'DD-MM-YYYY HH24:MI:SS'),
956: to_char(l_new_end_date,'DD-MM-YYYY HH24:MI:SS'));
957: -- okc_debug.log('2500: Before update_rule');
958: OKC_RULE_PUB.UPDATE_RULE( p_api_version => 1,
959: p_init_msg_list => OKC_API.G_FALSE,
960: x_return_status => l_return_status,
961: x_msg_count => x_msg_count,
962: x_msg_data => x_msg_data,
963: p_rulv_rec => l_rulv_rec,

Line 967: IF l_return_status <> OKC_API.G_RET_STS_SUCCESS THEN

963: p_rulv_rec => l_rulv_rec,
964: x_rulv_rec => i_rulv_rec
965: );
966: -- okc_debug.log('2600: After update_rule');
967: IF l_return_status <> OKC_API.G_RET_STS_SUCCESS THEN
968: RAISE l_exception_stop;
969: END IF;
970: else
971: --san comment disable the rule;

Line 993: OKC_API.set_message(p_app_name => g_app_name,

989:
990: -- okc_debug.log('2900: Exiting check_ia:others Exception', 2);
991: -- okc_debug.Reset_Indentation;
992:
993: OKC_API.set_message(p_app_name => g_app_name,
994: p_msg_name => g_unexpected_error,
995: p_token1 => g_sqlcode_token,
996: p_token1_value => sqlcode,
997: p_token2 => g_sqlerrm_token,

Line 999: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

995: p_token1 => g_sqlcode_token,
996: p_token1_value => sqlcode,
997: p_token2 => g_sqlerrm_token,
998: p_token2_value => sqlerrm);
999: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
1000:
1001: return (l_return_status);
1002:
1003: END check_ia;

Line 1011: x_return_status := OKC_API.G_RET_STS_SUCCESS;

1007: okc_debug.Set_Indentation('Update_Rules');
1008: okc_debug.log('3000: Entered Update_Rules', 2);
1009: END IF;
1010:
1011: x_return_status := OKC_API.G_RET_STS_SUCCESS;
1012:
1013: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1014: p_init_msg_list,
1015: '_PROCESS',

Line 1013: l_return_status := OKC_API.START_ACTIVITY(l_api_name,

1009: END IF;
1010:
1011: x_return_status := OKC_API.G_RET_STS_SUCCESS;
1012:
1013: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1014: p_init_msg_list,
1015: '_PROCESS',
1016: x_return_status);
1017:

Line 1018: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN

1014: p_init_msg_list,
1015: '_PROCESS',
1016: x_return_status);
1017:
1018: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1019: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1020: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1021: raise OKC_API.G_EXCEPTION_ERROR;
1022: END IF;

Line 1019: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

1015: '_PROCESS',
1016: x_return_status);
1017:
1018: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1019: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1020: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1021: raise OKC_API.G_EXCEPTION_ERROR;
1022: END IF;
1023: j := 1;

Line 1020: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN

1016: x_return_status);
1017:
1018: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1019: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1020: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1021: raise OKC_API.G_EXCEPTION_ERROR;
1022: END IF;
1023: j := 1;
1024:

Line 1021: raise OKC_API.G_EXCEPTION_ERROR;

1017:
1018: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1019: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1020: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1021: raise OKC_API.G_EXCEPTION_ERROR;
1022: END IF;
1023: j := 1;
1024:
1025: --store the current time values in g_time_tbl again if current chr id is different from the

Line 1045: IF l_cle_dates_rec.id <> OKC_API.G_MISS_NUM then

1041: okc_debug.log('3200: Before get_date_rec');
1042: END IF;
1043: l_cle_dates_rec:=get_date_rec(rule_rec.parent_id);
1044: -- okc_debug.log('3300: After get_date_rec');
1045: IF l_cle_dates_rec.id <> OKC_API.G_MISS_NUM then
1046:
1047: okc_renew_pvt.g_rulv_rec.id := rule_rec.id;
1048: okc_renew_pvt.g_rulv_rec.object_version_number := rule_rec.object_version_number;
1049:

Line 1101: IF tve_rec.id <> OKC_API.G_MISS_NUM then

1097: for i in l_col_vals.first..l_col_vals.last
1098: loop
1099: if l_col_vals.exists(i) then
1100: tve_rec:=get_tve_rec(l_col_vals(i).col_value);
1101: IF tve_rec.id <> OKC_API.G_MISS_NUM then
1102: -- in the below type checks we are not checking for effectivity limits on cover times
1103: --and react_intervals as they are always bound by the effectivity of lines
1104: -- to which they are attached in OKS. But in case this changes, then check and
1105: -- adjust the rules and tve_id's effectivities in these tables as well

Line 1112: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

1108: null;
1109: ELSIF tve_rec.tve_type = 'ISE' then --ise
1110: --fetch the dates
1111: x_return_status:=check_ia(tve_rec.id,tve_rec.object_version_number,rule_rec,l_cle_dates_rec);
1112: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1113: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1114: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
1115: RAISE OKC_API.G_EXCEPTION_ERROR;
1116: END IF;

Line 1113: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

1109: ELSIF tve_rec.tve_type = 'ISE' then --ise
1110: --fetch the dates
1111: x_return_status:=check_ia(tve_rec.id,tve_rec.object_version_number,rule_rec,l_cle_dates_rec);
1112: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1113: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1114: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
1115: RAISE OKC_API.G_EXCEPTION_ERROR;
1116: END IF;
1117: ELSIF tve_rec.tve_id_limited is not null then

Line 1114: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN

1110: --fetch the dates
1111: x_return_status:=check_ia(tve_rec.id,tve_rec.object_version_number,rule_rec,l_cle_dates_rec);
1112: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1113: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1114: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
1115: RAISE OKC_API.G_EXCEPTION_ERROR;
1116: END IF;
1117: ELSIF tve_rec.tve_id_limited is not null then
1118: --this means that there is some effectivity specified on this time value

Line 1115: RAISE OKC_API.G_EXCEPTION_ERROR;

1111: x_return_status:=check_ia(tve_rec.id,tve_rec.object_version_number,rule_rec,l_cle_dates_rec);
1112: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1113: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1114: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
1115: RAISE OKC_API.G_EXCEPTION_ERROR;
1116: END IF;
1117: ELSIF tve_rec.tve_id_limited is not null then
1118: --this means that there is some effectivity specified on this time value
1119: tve_rec:=get_tve_rec(tve_rec.tve_id_limited);

Line 1122: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

1118: --this means that there is some effectivity specified on this time value
1119: tve_rec:=get_tve_rec(tve_rec.tve_id_limited);
1120: --fetch the dates
1121: x_return_status:=check_ia(tve_rec.id,tve_rec.object_version_number,rule_rec,l_cle_dates_rec);
1122: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1123: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1124: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
1125: RAISE OKC_API.G_EXCEPTION_ERROR;
1126: END IF;

Line 1123: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

1119: tve_rec:=get_tve_rec(tve_rec.tve_id_limited);
1120: --fetch the dates
1121: x_return_status:=check_ia(tve_rec.id,tve_rec.object_version_number,rule_rec,l_cle_dates_rec);
1122: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1123: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1124: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
1125: RAISE OKC_API.G_EXCEPTION_ERROR;
1126: END IF;
1127: END IF; --tve_type

Line 1124: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN

1120: --fetch the dates
1121: x_return_status:=check_ia(tve_rec.id,tve_rec.object_version_number,rule_rec,l_cle_dates_rec);
1122: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1123: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1124: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
1125: RAISE OKC_API.G_EXCEPTION_ERROR;
1126: END IF;
1127: END IF; --tve_type
1128: END IF; -- tve_rec is OKC_API.G_MISS_NUM

Line 1125: RAISE OKC_API.G_EXCEPTION_ERROR;

1121: x_return_status:=check_ia(tve_rec.id,tve_rec.object_version_number,rule_rec,l_cle_dates_rec);
1122: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1123: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1124: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
1125: RAISE OKC_API.G_EXCEPTION_ERROR;
1126: END IF;
1127: END IF; --tve_type
1128: END IF; -- tve_rec is OKC_API.G_MISS_NUM
1129: END IF; -- if col_vals exists

Line 1128: END IF; -- tve_rec is OKC_API.G_MISS_NUM

1124: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
1125: RAISE OKC_API.G_EXCEPTION_ERROR;
1126: END IF;
1127: END IF; --tve_type
1128: END IF; -- tve_rec is OKC_API.G_MISS_NUM
1129: END IF; -- if col_vals exists
1130: END loop;
1131: -- okc_debug.log('3900: After For Loop');
1132: END IF; -- if col_vals>=1

Line 1144: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);

1140: END IF;
1141: --reset the dates table
1142: -- g_cle_dates_tbl.delete;
1143:
1144: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1145:
1146: IF (l_debug = 'Y') THEN
1147: okc_debug.log('4300: Leaving Update_Rules', 2);
1148: okc_debug.Reset_Indentation;

Line 1163: x_return_status := okc_api.g_ret_sts_error;

1159:
1160: IF (cur_time_values%ISOPEN) THEN
1161: CLOSE cur_time_values;
1162: END IF;
1163: x_return_status := okc_api.g_ret_sts_error;
1164: OKC_API.set_message(G_FND_APP,G_FORM_UNABLE_TO_RESERVE_REC);
1165:
1166: RAISE APP_EXCEPTIONS.RECORD_LOCK_EXCEPTION;
1167:

Line 1164: OKC_API.set_message(G_FND_APP,G_FORM_UNABLE_TO_RESERVE_REC);

1160: IF (cur_time_values%ISOPEN) THEN
1161: CLOSE cur_time_values;
1162: END IF;
1163: x_return_status := okc_api.g_ret_sts_error;
1164: OKC_API.set_message(G_FND_APP,G_FORM_UNABLE_TO_RESERVE_REC);
1165:
1166: RAISE APP_EXCEPTIONS.RECORD_LOCK_EXCEPTION;
1167:
1168: WHEN OKC_API.G_EXCEPTION_ERROR THEN

Line 1168: WHEN OKC_API.G_EXCEPTION_ERROR THEN

1164: OKC_API.set_message(G_FND_APP,G_FORM_UNABLE_TO_RESERVE_REC);
1165:
1166: RAISE APP_EXCEPTIONS.RECORD_LOCK_EXCEPTION;
1167:
1168: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1169: IF (l_debug = 'Y') THEN
1170: okc_debug.set_trace_on;
1171: okc_debug.log('4500: Exiting Update_Rules:OKC_API.G_EXCEPTION_ERROR Exception', 2);
1172: okc_debug.Reset_Indentation;

Line 1171: okc_debug.log('4500: Exiting Update_Rules:OKC_API.G_EXCEPTION_ERROR Exception', 2);

1167:
1168: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1169: IF (l_debug = 'Y') THEN
1170: okc_debug.set_trace_on;
1171: okc_debug.log('4500: Exiting Update_Rules:OKC_API.G_EXCEPTION_ERROR Exception', 2);
1172: okc_debug.Reset_Indentation;
1173: END IF;
1174:
1175: x_return_status := OKC_API.HANDLE_EXCEPTIONS

Line 1175: x_return_status := OKC_API.HANDLE_EXCEPTIONS

1171: okc_debug.log('4500: Exiting Update_Rules:OKC_API.G_EXCEPTION_ERROR Exception', 2);
1172: okc_debug.Reset_Indentation;
1173: END IF;
1174:
1175: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1176: (l_api_name,
1177: G_PKG_NAME,
1178: 'OKC_API.G_RET_STS_ERROR',
1179: x_msg_count,

Line 1178: 'OKC_API.G_RET_STS_ERROR',

1174:
1175: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1176: (l_api_name,
1177: G_PKG_NAME,
1178: 'OKC_API.G_RET_STS_ERROR',
1179: x_msg_count,
1180: x_msg_data,
1181: '_PROCESS');
1182:

Line 1183: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN

1179: x_msg_count,
1180: x_msg_data,
1181: '_PROCESS');
1182:
1183: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1184: IF (l_debug = 'Y') THEN
1185: okc_debug.set_trace_on;
1186: okc_debug.log('4600: Exiting Update_Rules:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
1187: okc_debug.Reset_Indentation;

Line 1186: okc_debug.log('4600: Exiting Update_Rules:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);

1182:
1183: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1184: IF (l_debug = 'Y') THEN
1185: okc_debug.set_trace_on;
1186: okc_debug.log('4600: Exiting Update_Rules:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
1187: okc_debug.Reset_Indentation;
1188: END IF;
1189:
1190: x_return_status := OKC_API.HANDLE_EXCEPTIONS

Line 1190: x_return_status := OKC_API.HANDLE_EXCEPTIONS

1186: okc_debug.log('4600: Exiting Update_Rules:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
1187: okc_debug.Reset_Indentation;
1188: END IF;
1189:
1190: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1191: (l_api_name,
1192: G_PKG_NAME,
1193: 'OKC_API.G_RET_STS_UNEXP_ERROR',
1194: x_msg_count,

Line 1193: 'OKC_API.G_RET_STS_UNEXP_ERROR',

1189:
1190: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1191: (l_api_name,
1192: G_PKG_NAME,
1193: 'OKC_API.G_RET_STS_UNEXP_ERROR',
1194: x_msg_count,
1195: x_msg_data,
1196: '_PROCESS');
1197:

Line 1205: x_return_status := OKC_API.HANDLE_EXCEPTIONS

1201: okc_debug.log('4700: Exiting Update_Rules:OTHERS Exception', 2);
1202: okc_debug.Reset_Indentation;
1203: END IF;
1204:
1205: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1206: (l_api_name,
1207: G_PKG_NAME,
1208: 'OTHERS',
1209: x_msg_count,

Line 1241: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;

1237:
1238: E_Resource_Busy EXCEPTION;
1239: PRAGMA EXCEPTION_INIT(E_Resource_Busy, -00054);
1240:
1241: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;
1242: l_api_name constant varchar2(30) := 'update_headers';
1243: l_duration number;
1244: l_uom_code okx_units_of_measure_v.uom_code%type;
1245: BEGIN

Line 1252: x_return_status := OKC_API.G_RET_STS_SUCCESS;

1248: okc_debug.Set_Indentation('OKC_RENEW_PVT');
1249: okc_debug.log('4800: Entered update_condition_headers', 2);
1250: END IF;
1251:
1252: x_return_status := OKC_API.G_RET_STS_SUCCESS;
1253:
1254: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1255: p_init_msg_list,
1256: '_PROCESS',

Line 1254: l_return_status := OKC_API.START_ACTIVITY(l_api_name,

1250: END IF;
1251:
1252: x_return_status := OKC_API.G_RET_STS_SUCCESS;
1253:
1254: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1255: p_init_msg_list,
1256: '_PROCESS',
1257: x_return_status);
1258:

Line 1259: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN

1255: p_init_msg_list,
1256: '_PROCESS',
1257: x_return_status);
1258:
1259: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1260: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1261: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1262: raise OKC_API.G_EXCEPTION_ERROR;
1263: END IF;

Line 1260: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

1256: '_PROCESS',
1257: x_return_status);
1258:
1259: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1260: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1261: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1262: raise OKC_API.G_EXCEPTION_ERROR;
1263: END IF;
1264:

Line 1261: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN

1257: x_return_status);
1258:
1259: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1260: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1261: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1262: raise OKC_API.G_EXCEPTION_ERROR;
1263: END IF;
1264:
1265: IF (l_debug = 'Y') THEN

Line 1262: raise OKC_API.G_EXCEPTION_ERROR;

1258:
1259: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1260: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1261: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1262: raise OKC_API.G_EXCEPTION_ERROR;
1263: END IF;
1264:
1265: IF (l_debug = 'Y') THEN
1266: okc_debug.log('4900: Before cur_condition_headers Cursor');

Line 1300: p_init_msg_list => OKC_API.G_FALSE,

1296: okc_debug.log('5000: Before update_cond_hdrs');
1297: END IF;
1298: okc_conditions_pub.update_cond_hdrs(
1299: p_api_version => 1,
1300: p_init_msg_list => OKC_API.G_FALSE,
1301: x_return_status => l_return_status,
1302: x_msg_count => x_msg_count,
1303: x_msg_data => x_msg_data,
1304: p_cnhv_rec => l_cnh_rec,

Line 1310: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

1306: IF (l_debug = 'Y') THEN
1307: okc_debug.log('5100: After update_cond_hdrs');
1308: END IF;
1309:
1310: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1311: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1312: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1313: RAISE OKC_API.G_EXCEPTION_ERROR;
1314: END IF;

Line 1311: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

1307: okc_debug.log('5100: After update_cond_hdrs');
1308: END IF;
1309:
1310: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1311: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1312: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1313: RAISE OKC_API.G_EXCEPTION_ERROR;
1314: END IF;
1315:

Line 1312: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

1308: END IF;
1309:
1310: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1311: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1312: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1313: RAISE OKC_API.G_EXCEPTION_ERROR;
1314: END IF;
1315:
1316: END loop;

Line 1313: RAISE OKC_API.G_EXCEPTION_ERROR;

1309:
1310: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1311: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1312: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1313: RAISE OKC_API.G_EXCEPTION_ERROR;
1314: END IF;
1315:
1316: END loop;
1317:

Line 1318: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);

1314: END IF;
1315:
1316: END loop;
1317:
1318: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1319:
1320: IF (l_debug = 'Y') THEN
1321: okc_debug.log(' 5200: Leaving update_condition_headers', 2);
1322: okc_debug.Reset_Indentation;

Line 1334: x_return_status := okc_api.g_ret_sts_error;

1330: okc_debug.Reset_Indentation;
1331: END IF;
1332:
1333:
1334: x_return_status := okc_api.g_ret_sts_error;
1335: OKC_API.set_message(G_FND_APP,G_FORM_UNABLE_TO_RESERVE_REC);
1336:
1337: RAISE APP_EXCEPTIONS.RECORD_LOCK_EXCEPTION;
1338:

Line 1335: OKC_API.set_message(G_FND_APP,G_FORM_UNABLE_TO_RESERVE_REC);

1331: END IF;
1332:
1333:
1334: x_return_status := okc_api.g_ret_sts_error;
1335: OKC_API.set_message(G_FND_APP,G_FORM_UNABLE_TO_RESERVE_REC);
1336:
1337: RAISE APP_EXCEPTIONS.RECORD_LOCK_EXCEPTION;
1338:
1339: WHEN OKC_API.G_EXCEPTION_ERROR THEN

Line 1339: WHEN OKC_API.G_EXCEPTION_ERROR THEN

1335: OKC_API.set_message(G_FND_APP,G_FORM_UNABLE_TO_RESERVE_REC);
1336:
1337: RAISE APP_EXCEPTIONS.RECORD_LOCK_EXCEPTION;
1338:
1339: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1340:
1341: IF (l_debug = 'Y') THEN
1342: okc_debug.log('5400: Exiting update_condition_headers:OKC_API.G_EXCEPTION_ERROR Exception', 2);
1343: okc_debug.Reset_Indentation;

Line 1342: okc_debug.log('5400: Exiting update_condition_headers:OKC_API.G_EXCEPTION_ERROR Exception', 2);

1338:
1339: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1340:
1341: IF (l_debug = 'Y') THEN
1342: okc_debug.log('5400: Exiting update_condition_headers:OKC_API.G_EXCEPTION_ERROR Exception', 2);
1343: okc_debug.Reset_Indentation;
1344: END IF;
1345:
1346: x_return_status := OKC_API.HANDLE_EXCEPTIONS

Line 1346: x_return_status := OKC_API.HANDLE_EXCEPTIONS

1342: okc_debug.log('5400: Exiting update_condition_headers:OKC_API.G_EXCEPTION_ERROR Exception', 2);
1343: okc_debug.Reset_Indentation;
1344: END IF;
1345:
1346: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1347: (l_api_name,
1348: G_PKG_NAME,
1349: 'OKC_API.G_RET_STS_ERROR',
1350: x_msg_count,

Line 1349: 'OKC_API.G_RET_STS_ERROR',

1345:
1346: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1347: (l_api_name,
1348: G_PKG_NAME,
1349: 'OKC_API.G_RET_STS_ERROR',
1350: x_msg_count,
1351: x_msg_data,
1352: '_PROCESS');
1353:

Line 1354: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN

1350: x_msg_count,
1351: x_msg_data,
1352: '_PROCESS');
1353:
1354: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1355:
1356: IF (l_debug = 'Y') THEN
1357: okc_debug.log('5500: Exiting update_condition_headers:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
1358: okc_debug.Reset_Indentation;

Line 1357: okc_debug.log('5500: Exiting update_condition_headers:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);

1353:
1354: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1355:
1356: IF (l_debug = 'Y') THEN
1357: okc_debug.log('5500: Exiting update_condition_headers:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
1358: okc_debug.Reset_Indentation;
1359: END IF;
1360:
1361: x_return_status := OKC_API.HANDLE_EXCEPTIONS

Line 1361: x_return_status := OKC_API.HANDLE_EXCEPTIONS

1357: okc_debug.log('5500: Exiting update_condition_headers:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
1358: okc_debug.Reset_Indentation;
1359: END IF;
1360:
1361: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1362: (l_api_name,
1363: G_PKG_NAME,
1364: 'OKC_API.G_RET_STS_UNEXP_ERROR',
1365: x_msg_count,

Line 1364: 'OKC_API.G_RET_STS_UNEXP_ERROR',

1360:
1361: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1362: (l_api_name,
1363: G_PKG_NAME,
1364: 'OKC_API.G_RET_STS_UNEXP_ERROR',
1365: x_msg_count,
1366: x_msg_data,
1367: '_PROCESS');
1368:

Line 1376: x_return_status := OKC_API.HANDLE_EXCEPTIONS

1372: okc_debug.log('5600: Exiting update_condition_headers:OTHERS Exception', 2);
1373: okc_debug.Reset_Indentation;
1374: END IF;
1375:
1376: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1377: (l_api_name,
1378: G_PKG_NAME,
1379: 'OTHERS',
1380: x_msg_count,

Line 1421: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;

1417: l_cle_tbl okc_contract_pub.clev_tbl_type;
1418: x_cle_tbl okc_contract_pub.clev_tbl_type;
1419: i number;
1420:
1421: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;
1422: l_api_name constant VARCHAR2(30) := 'update_old_contract';
1423: l_date DATE := trunc(sysdate);
1424: BEGIN
1425: IF (l_debug = 'Y') THEN

Line 1430: x_return_status := OKC_API.G_RET_STS_SUCCESS;

1426: okc_debug.Set_Indentation('OKC_RENEW_PVT');
1427: okc_debug.log('5700: Entered update_old_contract', 2);
1428: END IF;
1429:
1430: x_return_status := OKC_API.G_RET_STS_SUCCESS;
1431:
1432: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1433: p_init_msg_list,
1434: '_PROCESS',

Line 1432: l_return_status := OKC_API.START_ACTIVITY(l_api_name,

1428: END IF;
1429:
1430: x_return_status := OKC_API.G_RET_STS_SUCCESS;
1431:
1432: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1433: p_init_msg_list,
1434: '_PROCESS',
1435: x_return_status);
1436:

Line 1437: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN

1433: p_init_msg_list,
1434: '_PROCESS',
1435: x_return_status);
1436:
1437: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1438: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1439: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1440: raise OKC_API.G_EXCEPTION_ERROR;
1441: END IF;

Line 1438: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

1434: '_PROCESS',
1435: x_return_status);
1436:
1437: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1438: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1439: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1440: raise OKC_API.G_EXCEPTION_ERROR;
1441: END IF;
1442:

Line 1439: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN

1435: x_return_status);
1436:
1437: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1438: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1439: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1440: raise OKC_API.G_EXCEPTION_ERROR;
1441: END IF;
1442:
1443: open cur_header(p_chr_id);

Line 1440: raise OKC_API.G_EXCEPTION_ERROR;

1436:
1437: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1438: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1439: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1440: raise OKC_API.G_EXCEPTION_ERROR;
1441: END IF;
1442:
1443: open cur_header(p_chr_id);
1444: fetch cur_header into header_rec;

Line 1457: p_init_msg_list => OKC_API.G_FALSE,

1453: okc_debug.log('5800: Before lock_contract_header');
1454: END IF;
1455: okc_contract_pub.lock_contract_header(
1456: p_api_version => 1,
1457: p_init_msg_list => OKC_API.G_FALSE,
1458: x_return_status => l_return_status,
1459: x_msg_count => x_msg_count,
1460: x_msg_data => x_msg_data,
1461: p_chrv_rec => l_chr_rec );

Line 1466: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

1462: IF (l_debug = 'Y') THEN
1463: okc_debug.log('5900: After lock_contract_header');
1464: END IF;
1465:
1466: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1467: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1468: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1469: RAISE OKC_API.G_EXCEPTION_ERROR;
1470: END IF;

Line 1467: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

1463: okc_debug.log('5900: After lock_contract_header');
1464: END IF;
1465:
1466: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1467: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1468: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1469: RAISE OKC_API.G_EXCEPTION_ERROR;
1470: END IF;
1471:

Line 1468: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

1464: END IF;
1465:
1466: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1467: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1468: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1469: RAISE OKC_API.G_EXCEPTION_ERROR;
1470: END IF;
1471:
1472: IF (l_debug = 'Y') THEN

Line 1469: RAISE OKC_API.G_EXCEPTION_ERROR;

1465:
1466: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1467: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1468: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1469: RAISE OKC_API.G_EXCEPTION_ERROR;
1470: END IF;
1471:
1472: IF (l_debug = 'Y') THEN
1473: okc_debug.log('6000: Before update_contract_header');

Line 1477: p_init_msg_list => OKC_API.G_FALSE,

1473: okc_debug.log('6000: Before update_contract_header');
1474: END IF;
1475: okc_contract_pub.update_contract_header (
1476: p_api_version => 1,
1477: p_init_msg_list => OKC_API.G_FALSE,
1478: x_return_status => l_return_status,
1479: x_msg_count => x_msg_count,
1480: x_msg_data => x_msg_data,
1481: p_restricted_update => okc_api.g_true,

Line 1481: p_restricted_update => okc_api.g_true,

1477: p_init_msg_list => OKC_API.G_FALSE,
1478: x_return_status => l_return_status,
1479: x_msg_count => x_msg_count,
1480: x_msg_data => x_msg_data,
1481: p_restricted_update => okc_api.g_true,
1482: p_chrv_rec => l_chr_rec,
1483: x_chrv_rec => i_chr_rec );
1484: IF (l_debug = 'Y') THEN
1485: okc_debug.log('6100: After update_contract_header');

Line 1488: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

1484: IF (l_debug = 'Y') THEN
1485: okc_debug.log('6100: After update_contract_header');
1486: END IF;
1487:
1488: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1489: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1490: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1491: RAISE OKC_API.G_EXCEPTION_ERROR;
1492: END IF;

Line 1489: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

1485: okc_debug.log('6100: After update_contract_header');
1486: END IF;
1487:
1488: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1489: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1490: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1491: RAISE OKC_API.G_EXCEPTION_ERROR;
1492: END IF;
1493:

Line 1490: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

1486: END IF;
1487:
1488: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1489: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1490: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1491: RAISE OKC_API.G_EXCEPTION_ERROR;
1492: END IF;
1493:
1494: --san rencol

Line 1491: RAISE OKC_API.G_EXCEPTION_ERROR;

1487:
1488: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1489: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1490: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1491: RAISE OKC_API.G_EXCEPTION_ERROR;
1492: END IF;
1493:
1494: --san rencol
1495: SELECT l.id,l.object_version_number

Line 1516: p_init_msg_list => OKC_API.G_FALSE,

1512: i:=l_id_tbl.next(i);
1513: END LOOP;
1514: okc_contract_pub.lock_contract_line(
1515: p_api_version => 1,
1516: p_init_msg_list => OKC_API.G_FALSE,
1517: x_return_status => l_return_status,
1518: x_msg_count => x_msg_count,
1519: x_msg_data => x_msg_data,
1520: p_clev_tbl => l_cle_tbl );

Line 1522: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

1518: x_msg_count => x_msg_count,
1519: x_msg_data => x_msg_data,
1520: p_clev_tbl => l_cle_tbl );
1521:
1522: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1523: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1524: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1525: RAISE OKC_API.G_EXCEPTION_ERROR;
1526: END IF;

Line 1523: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

1519: x_msg_data => x_msg_data,
1520: p_clev_tbl => l_cle_tbl );
1521:
1522: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1523: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1524: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1525: RAISE OKC_API.G_EXCEPTION_ERROR;
1526: END IF;
1527:

Line 1524: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

1520: p_clev_tbl => l_cle_tbl );
1521:
1522: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1523: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1524: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1525: RAISE OKC_API.G_EXCEPTION_ERROR;
1526: END IF;
1527:
1528: okc_contract_pub.update_contract_line (

Line 1525: RAISE OKC_API.G_EXCEPTION_ERROR;

1521:
1522: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1523: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1524: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1525: RAISE OKC_API.G_EXCEPTION_ERROR;
1526: END IF;
1527:
1528: okc_contract_pub.update_contract_line (
1529: p_api_version => 1,

Line 1530: p_init_msg_list => OKC_API.G_FALSE,

1526: END IF;
1527:
1528: okc_contract_pub.update_contract_line (
1529: p_api_version => 1,
1530: p_init_msg_list => OKC_API.G_FALSE,
1531: x_return_status => l_return_status,
1532: x_msg_count => x_msg_count,
1533: x_msg_data => x_msg_data,
1534: p_restricted_update => okc_api.g_true,

Line 1534: p_restricted_update => okc_api.g_true,

1530: p_init_msg_list => OKC_API.G_FALSE,
1531: x_return_status => l_return_status,
1532: x_msg_count => x_msg_count,
1533: x_msg_data => x_msg_data,
1534: p_restricted_update => okc_api.g_true,
1535: p_clev_tbl => l_cle_tbl,
1536: x_clev_tbl => x_cle_tbl );
1537:
1538: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

Line 1538: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

1534: p_restricted_update => okc_api.g_true,
1535: p_clev_tbl => l_cle_tbl,
1536: x_clev_tbl => x_cle_tbl );
1537:
1538: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1539: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1540: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1541: RAISE OKC_API.G_EXCEPTION_ERROR;
1542: END IF;

Line 1539: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

1535: p_clev_tbl => l_cle_tbl,
1536: x_clev_tbl => x_cle_tbl );
1537:
1538: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1539: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1540: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1541: RAISE OKC_API.G_EXCEPTION_ERROR;
1542: END IF;
1543: END IF; -- if some lines are there that renewed

Line 1540: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

1536: x_clev_tbl => x_cle_tbl );
1537:
1538: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1539: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1540: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1541: RAISE OKC_API.G_EXCEPTION_ERROR;
1542: END IF;
1543: END IF; -- if some lines are there that renewed
1544:

Line 1541: RAISE OKC_API.G_EXCEPTION_ERROR;

1537:
1538: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1539: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1540: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1541: RAISE OKC_API.G_EXCEPTION_ERROR;
1542: END IF;
1543: END IF; -- if some lines are there that renewed
1544:
1545:

Line 1546: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);

1542: END IF;
1543: END IF; -- if some lines are there that renewed
1544:
1545:
1546: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1547: --dbms_output.put_line('old (-)');
1548:
1549: IF (l_debug = 'Y') THEN
1550: okc_debug.log('6200: Leaving update_old_contract', 2);

Line 1555: WHEN OKC_API.G_EXCEPTION_ERROR THEN

1551: okc_debug.Reset_Indentation;
1552: END IF;
1553:
1554: EXCEPTION
1555: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1556:
1557: IF (l_debug = 'Y') THEN
1558: okc_debug.log('6300: Exiting update_old_contract:OKC_API.G_EXCEPTION_ERROR Exception', 2);
1559: okc_debug.Reset_Indentation;

Line 1558: okc_debug.log('6300: Exiting update_old_contract:OKC_API.G_EXCEPTION_ERROR Exception', 2);

1554: EXCEPTION
1555: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1556:
1557: IF (l_debug = 'Y') THEN
1558: okc_debug.log('6300: Exiting update_old_contract:OKC_API.G_EXCEPTION_ERROR Exception', 2);
1559: okc_debug.Reset_Indentation;
1560: END IF;
1561:
1562: x_return_status := OKC_API.HANDLE_EXCEPTIONS

Line 1562: x_return_status := OKC_API.HANDLE_EXCEPTIONS

1558: okc_debug.log('6300: Exiting update_old_contract:OKC_API.G_EXCEPTION_ERROR Exception', 2);
1559: okc_debug.Reset_Indentation;
1560: END IF;
1561:
1562: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1563: (l_api_name,
1564: G_PKG_NAME,
1565: 'OKC_API.G_RET_STS_ERROR',
1566: x_msg_count,

Line 1565: 'OKC_API.G_RET_STS_ERROR',

1561:
1562: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1563: (l_api_name,
1564: G_PKG_NAME,
1565: 'OKC_API.G_RET_STS_ERROR',
1566: x_msg_count,
1567: x_msg_data,
1568: '_PROCESS');
1569:

Line 1570: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN

1566: x_msg_count,
1567: x_msg_data,
1568: '_PROCESS');
1569:
1570: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1571:
1572: IF (l_debug = 'Y') THEN
1573: okc_debug.log('6400: Exiting update_old_contract:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
1574: okc_debug.Reset_Indentation;

Line 1573: okc_debug.log('6400: Exiting update_old_contract:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);

1569:
1570: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1571:
1572: IF (l_debug = 'Y') THEN
1573: okc_debug.log('6400: Exiting update_old_contract:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
1574: okc_debug.Reset_Indentation;
1575: END IF;
1576:
1577: x_return_status := OKC_API.HANDLE_EXCEPTIONS

Line 1577: x_return_status := OKC_API.HANDLE_EXCEPTIONS

1573: okc_debug.log('6400: Exiting update_old_contract:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
1574: okc_debug.Reset_Indentation;
1575: END IF;
1576:
1577: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1578: (l_api_name,
1579: G_PKG_NAME,
1580: 'OKC_API.G_RET_STS_UNEXP_ERROR',
1581: x_msg_count,

Line 1580: 'OKC_API.G_RET_STS_UNEXP_ERROR',

1576:
1577: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1578: (l_api_name,
1579: G_PKG_NAME,
1580: 'OKC_API.G_RET_STS_UNEXP_ERROR',
1581: x_msg_count,
1582: x_msg_data,
1583: '_PROCESS');
1584:

Line 1592: x_return_status := OKC_API.HANDLE_EXCEPTIONS

1588: okc_debug.log('6500: Exiting update_old_contract:OTHERS Exception', 2);
1589: okc_debug.Reset_Indentation;
1590: END IF;
1591:
1592: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1593: (l_api_name,
1594: G_PKG_NAME,
1595: 'OTHERS',
1596: x_msg_count,

Line 1673: ID NUMBER:=OKC_API.G_MISS_NUM,

1669:
1670: -- Modified for bug 2084147
1671: -- Added new field price_negotiated in the record definition
1672: TYPE CLE_REC_TYPE IS RECORD(
1673: ID NUMBER:=OKC_API.G_MISS_NUM,
1674: object_version_number NUMBER:=OKC_API.G_MISS_NUM,
1675: start_date DATE:=OKC_API.G_MISS_DATE,
1676: end_date DATE:=OKC_API.G_MISS_DATE,
1677: level NUMBER:=OKC_API.G_MISS_NUM,

Line 1674: object_version_number NUMBER:=OKC_API.G_MISS_NUM,

1670: -- Modified for bug 2084147
1671: -- Added new field price_negotiated in the record definition
1672: TYPE CLE_REC_TYPE IS RECORD(
1673: ID NUMBER:=OKC_API.G_MISS_NUM,
1674: object_version_number NUMBER:=OKC_API.G_MISS_NUM,
1675: start_date DATE:=OKC_API.G_MISS_DATE,
1676: end_date DATE:=OKC_API.G_MISS_DATE,
1677: level NUMBER:=OKC_API.G_MISS_NUM,
1678: CLE_ID NUMBER:=OKC_API.G_MISS_NUM,

Line 1675: start_date DATE:=OKC_API.G_MISS_DATE,

1671: -- Added new field price_negotiated in the record definition
1672: TYPE CLE_REC_TYPE IS RECORD(
1673: ID NUMBER:=OKC_API.G_MISS_NUM,
1674: object_version_number NUMBER:=OKC_API.G_MISS_NUM,
1675: start_date DATE:=OKC_API.G_MISS_DATE,
1676: end_date DATE:=OKC_API.G_MISS_DATE,
1677: level NUMBER:=OKC_API.G_MISS_NUM,
1678: CLE_ID NUMBER:=OKC_API.G_MISS_NUM,
1679: price_negotiated NUMBER:=OKC_API.G_MISS_NUM

Line 1676: end_date DATE:=OKC_API.G_MISS_DATE,

1672: TYPE CLE_REC_TYPE IS RECORD(
1673: ID NUMBER:=OKC_API.G_MISS_NUM,
1674: object_version_number NUMBER:=OKC_API.G_MISS_NUM,
1675: start_date DATE:=OKC_API.G_MISS_DATE,
1676: end_date DATE:=OKC_API.G_MISS_DATE,
1677: level NUMBER:=OKC_API.G_MISS_NUM,
1678: CLE_ID NUMBER:=OKC_API.G_MISS_NUM,
1679: price_negotiated NUMBER:=OKC_API.G_MISS_NUM
1680: );

Line 1677: level NUMBER:=OKC_API.G_MISS_NUM,

1673: ID NUMBER:=OKC_API.G_MISS_NUM,
1674: object_version_number NUMBER:=OKC_API.G_MISS_NUM,
1675: start_date DATE:=OKC_API.G_MISS_DATE,
1676: end_date DATE:=OKC_API.G_MISS_DATE,
1677: level NUMBER:=OKC_API.G_MISS_NUM,
1678: CLE_ID NUMBER:=OKC_API.G_MISS_NUM,
1679: price_negotiated NUMBER:=OKC_API.G_MISS_NUM
1680: );
1681: lines_rec CLE_REC_TYPE;

Line 1678: CLE_ID NUMBER:=OKC_API.G_MISS_NUM,

1674: object_version_number NUMBER:=OKC_API.G_MISS_NUM,
1675: start_date DATE:=OKC_API.G_MISS_DATE,
1676: end_date DATE:=OKC_API.G_MISS_DATE,
1677: level NUMBER:=OKC_API.G_MISS_NUM,
1678: CLE_ID NUMBER:=OKC_API.G_MISS_NUM,
1679: price_negotiated NUMBER:=OKC_API.G_MISS_NUM
1680: );
1681: lines_rec CLE_REC_TYPE;
1682:

Line 1679: price_negotiated NUMBER:=OKC_API.G_MISS_NUM

1675: start_date DATE:=OKC_API.G_MISS_DATE,
1676: end_date DATE:=OKC_API.G_MISS_DATE,
1677: level NUMBER:=OKC_API.G_MISS_NUM,
1678: CLE_ID NUMBER:=OKC_API.G_MISS_NUM,
1679: price_negotiated NUMBER:=OKC_API.G_MISS_NUM
1680: );
1681: lines_rec CLE_REC_TYPE;
1682:
1683: l_num number;

Line 1694: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;

1690:
1691: l_cle_rec okc_contract_pub.clev_rec_type;
1692: i_cle_rec okc_contract_pub.clev_rec_type;
1693:
1694: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;
1695: l_api_name constant VARCHAR2(30) := 'update_renewal_dates';
1696: l_uom_code okx_units_of_measure_v.uom_code%type;
1697: l_duration number;
1698:

Line 1711: ID NUMBER:=OKC_API.G_MISS_NUM,

1707: j BINARY_INTEGER;
1708:
1709: k_dates number :=0;
1710: TYPE CLE_PARENT_REC_TYPE IS RECORD(
1711: ID NUMBER:=OKC_API.G_MISS_NUM,
1712: orig_start_date DATE:=OKC_API.G_MISS_DATE,
1713: start_date DATE:=OKC_API.G_MISS_DATE,
1714: end_date DATE:=OKC_API.G_MISS_DATE,
1715: lrt_type okc_rules_v.rule_information_category%TYPE:=OKC_API.G_MISS_CHAR

Line 1712: orig_start_date DATE:=OKC_API.G_MISS_DATE,

1708:
1709: k_dates number :=0;
1710: TYPE CLE_PARENT_REC_TYPE IS RECORD(
1711: ID NUMBER:=OKC_API.G_MISS_NUM,
1712: orig_start_date DATE:=OKC_API.G_MISS_DATE,
1713: start_date DATE:=OKC_API.G_MISS_DATE,
1714: end_date DATE:=OKC_API.G_MISS_DATE,
1715: lrt_type okc_rules_v.rule_information_category%TYPE:=OKC_API.G_MISS_CHAR
1716: );

Line 1713: start_date DATE:=OKC_API.G_MISS_DATE,

1709: k_dates number :=0;
1710: TYPE CLE_PARENT_REC_TYPE IS RECORD(
1711: ID NUMBER:=OKC_API.G_MISS_NUM,
1712: orig_start_date DATE:=OKC_API.G_MISS_DATE,
1713: start_date DATE:=OKC_API.G_MISS_DATE,
1714: end_date DATE:=OKC_API.G_MISS_DATE,
1715: lrt_type okc_rules_v.rule_information_category%TYPE:=OKC_API.G_MISS_CHAR
1716: );
1717:

Line 1714: end_date DATE:=OKC_API.G_MISS_DATE,

1710: TYPE CLE_PARENT_REC_TYPE IS RECORD(
1711: ID NUMBER:=OKC_API.G_MISS_NUM,
1712: orig_start_date DATE:=OKC_API.G_MISS_DATE,
1713: start_date DATE:=OKC_API.G_MISS_DATE,
1714: end_date DATE:=OKC_API.G_MISS_DATE,
1715: lrt_type okc_rules_v.rule_information_category%TYPE:=OKC_API.G_MISS_CHAR
1716: );
1717:
1718: TYPE CLE_PARENT_TBL_TYPE IS TABLE OF CLE_PARENT_REC_TYPE

Line 1715: lrt_type okc_rules_v.rule_information_category%TYPE:=OKC_API.G_MISS_CHAR

1711: ID NUMBER:=OKC_API.G_MISS_NUM,
1712: orig_start_date DATE:=OKC_API.G_MISS_DATE,
1713: start_date DATE:=OKC_API.G_MISS_DATE,
1714: end_date DATE:=OKC_API.G_MISS_DATE,
1715: lrt_type okc_rules_v.rule_information_category%TYPE:=OKC_API.G_MISS_CHAR
1716: );
1717:
1718: TYPE CLE_PARENT_TBL_TYPE IS TABLE OF CLE_PARENT_REC_TYPE
1719: INDEX BY BINARY_INTEGER;

Line 1772: l_rule:=OKC_API.G_MISS_CHAR;

1768: okc_debug.log('6600: Entered get_cle_renew_type', 2);
1769: END IF;
1770:
1771:
1772: l_rule:=OKC_API.G_MISS_CHAR;
1773: If g_rules_tbl.count>0 then
1774: i:=g_rules_tbl.first;
1775: loop
1776: If g_rules_tbl(i).comp_id = p_comp_id then

Line 1804: x_return_status := OKC_API.G_RET_STS_SUCCESS;

1800: okc_debug.Set_Indentation('OKC_RENEW_PVT');
1801: okc_debug.log('6700: Entered Update_Renewal_Dates', 2);
1802: END IF;
1803:
1804: x_return_status := OKC_API.G_RET_STS_SUCCESS;
1805:
1806: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1807: p_init_msg_list,
1808: '_PROCESS',

Line 1806: l_return_status := OKC_API.START_ACTIVITY(l_api_name,

1802: END IF;
1803:
1804: x_return_status := OKC_API.G_RET_STS_SUCCESS;
1805:
1806: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
1807: p_init_msg_list,
1808: '_PROCESS',
1809: x_return_status);
1810:

Line 1811: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN

1807: p_init_msg_list,
1808: '_PROCESS',
1809: x_return_status);
1810:
1811: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1812: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1813: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1814: raise OKC_API.G_EXCEPTION_ERROR;
1815: END IF;

Line 1812: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

1808: '_PROCESS',
1809: x_return_status);
1810:
1811: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1812: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1813: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1814: raise OKC_API.G_EXCEPTION_ERROR;
1815: END IF;
1816:

Line 1813: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN

1809: x_return_status);
1810:
1811: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1812: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1813: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1814: raise OKC_API.G_EXCEPTION_ERROR;
1815: END IF;
1816:
1817: --reset global table for dates

Line 1814: raise OKC_API.G_EXCEPTION_ERROR;

1810:
1811: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1812: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1813: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1814: raise OKC_API.G_EXCEPTION_ERROR;
1815: END IF;
1816:
1817: --reset global table for dates
1818: -- g_cle_dates_tbl.delete;

Line 1851: p_init_msg_list => OKC_API.G_FALSE,

1847: end if;
1848:
1849: okc_contract_pub.update_contract_header (
1850: p_api_version => 1,
1851: p_init_msg_list => OKC_API.G_FALSE,
1852: x_return_status => l_return_status,
1853: x_msg_count => x_msg_count,
1854: x_msg_data => x_msg_data,
1855: p_chrv_rec => l_chr_rec,

Line 1863: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

1859: IF (l_debug = 'Y') THEN
1860: okc_debug.log('6900: After update_contract_header');
1861: END IF;
1862:
1863: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1864: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1865: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1866: RAISE OKC_API.G_EXCEPTION_ERROR;
1867: END IF;

Line 1864: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

1860: okc_debug.log('6900: After update_contract_header');
1861: END IF;
1862:
1863: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1864: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1865: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1866: RAISE OKC_API.G_EXCEPTION_ERROR;
1867: END IF;
1868:

Line 1865: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

1861: END IF;
1862:
1863: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1864: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1865: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1866: RAISE OKC_API.G_EXCEPTION_ERROR;
1867: END IF;
1868:
1869: -- added 19-MAR-2002 by rgalipo -- performance bug

Line 1866: RAISE OKC_API.G_EXCEPTION_ERROR;

1862:
1863: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1864: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1865: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1866: RAISE OKC_API.G_EXCEPTION_ERROR;
1867: END IF;
1868:
1869: -- added 19-MAR-2002 by rgalipo -- performance bug
1870: -- added call to cursor on temporary table

Line 1952: If l_cle_renew_type = OKC_API.G_MISS_CHAR then

1948: l_cle_renew_type:=get_cle_renew_type(lines_rec.id);
1949:
1950: -- the below code added in place of the commented code to fix bug 1398533
1951: If lines_rec.cle_id is null then
1952: If l_cle_renew_type = OKC_API.G_MISS_CHAR then
1953: l_cle_renew_type:=get_cle_renew_type(p_chr_id);
1954: IF l_cle_renew_type = OKC_API.G_MISS_CHAR then
1955: l_cle_renew_type:=g_def_cle_ren;
1956: END IF;

Line 1954: IF l_cle_renew_type = OKC_API.G_MISS_CHAR then

1950: -- the below code added in place of the commented code to fix bug 1398533
1951: If lines_rec.cle_id is null then
1952: If l_cle_renew_type = OKC_API.G_MISS_CHAR then
1953: l_cle_renew_type:=get_cle_renew_type(p_chr_id);
1954: IF l_cle_renew_type = OKC_API.G_MISS_CHAR then
1955: l_cle_renew_type:=g_def_cle_ren;
1956: END IF;
1957: END IF;
1958: --san rencon

Line 1961: If l_cle_renew_type = OKC_API.G_MISS_CHAR then

1957: END IF;
1958: --san rencon
1959: ELSIF (p_rencon_yn='Y' and lines_rec.id=p_cle_id) then
1960: -- that means that this line is a renew consol line sent in and not a top line
1961: If l_cle_renew_type = OKC_API.G_MISS_CHAR then
1962: If g_cached_cle_id <> p_parent_cle_id then
1963: -- renew_rule not defined for this line, we will have to get it from its parent
1964: -- so collect a tree of its parents
1965: SELECT id

Line 1972: IF p_parent_cle_id<> OKC_API.G_MISS_NUM then

1968: where dnz_chr_id=p_chr_id
1969: start with (id=p_parent_cle_id)
1970: connect by prior cle_id=id;
1971:
1972: IF p_parent_cle_id<> OKC_API.G_MISS_NUM then
1973: g_cached_cle_id:=p_parent_cle_id;
1974: END IF;
1975: END IF;
1976:

Line 1979: EXIT when (l_cle_renew_type <> OKC_API.G_MISS_CHAR) OR l_num=g_parent_id_tbl.last;

1975: END IF;
1976:
1977: l_num:=g_parent_id_tbl.FIRST;
1978: LOOP
1979: EXIT when (l_cle_renew_type <> OKC_API.G_MISS_CHAR) OR l_num=g_parent_id_tbl.last;
1980: --exit when either renew rule is found or none of its parents have any renew rule
1981: --defined. In the second case we will check the header for rule
1982: l_cle_renew_type:= get_cle_renew_type(g_parent_id_tbl(l_num));
1983: l_num:=g_parent_id_tbl.next(l_num);

Line 1985: If l_cle_renew_type = OKC_API.G_MISS_CHAR then

1981: --defined. In the second case we will check the header for rule
1982: l_cle_renew_type:= get_cle_renew_type(g_parent_id_tbl(l_num));
1983: l_num:=g_parent_id_tbl.next(l_num);
1984: END LOOP;
1985: If l_cle_renew_type = OKC_API.G_MISS_CHAR then
1986: -- if the renew rule could not be found on any of the parents, get from header
1987: l_cle_renew_type:=get_cle_renew_type(p_chr_id);
1988: IF l_cle_renew_type = OKC_API.G_MISS_CHAR then
1989: -- if even the header doesnot have the rule, take the default.

Line 1988: IF l_cle_renew_type = OKC_API.G_MISS_CHAR then

1984: END LOOP;
1985: If l_cle_renew_type = OKC_API.G_MISS_CHAR then
1986: -- if the renew rule could not be found on any of the parents, get from header
1987: l_cle_renew_type:=get_cle_renew_type(p_chr_id);
1988: IF l_cle_renew_type = OKC_API.G_MISS_CHAR then
1989: -- if even the header doesnot have the rule, take the default.
1990: l_cle_renew_type:=g_def_cle_ren;
1991: END IF;
1992: END IF;

Line 1998: If l_cle_renew_type = OKC_API.G_MISS_CHAR then

1994: END IF;
1995: ELSE
1996: --get the values for parent rec
1997: l_cle_parent_rec:=get_parent(lines_rec.cle_id);
1998: If l_cle_renew_type = OKC_API.G_MISS_CHAR then
1999: l_cle_renew_type:=l_cle_parent_rec.lrt_type;
2000: END IF;
2001:
2002: END IF;

Line 2059: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

2055: --
2056: -- okc_time_util_pub.get_duration(l_parent_orig_start_date,lines_rec.start_date, l_duration,l_uom_code,l_return_status);
2057: okc_time_util_pvt.get_oracle_months_and_days(l_parent_orig_start_date,lines_rec.start_date, l_duration,l_additional_days,l_return_status);
2058:
2059: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2060: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2061: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2062: OKC_API.set_message(p_app_name => g_app_name,
2063: p_msg_name => 'OKC_GET_DURATION_ERROR');

Line 2060: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

2056: -- okc_time_util_pub.get_duration(l_parent_orig_start_date,lines_rec.start_date, l_duration,l_uom_code,l_return_status);
2057: okc_time_util_pvt.get_oracle_months_and_days(l_parent_orig_start_date,lines_rec.start_date, l_duration,l_additional_days,l_return_status);
2058:
2059: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2060: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2061: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2062: OKC_API.set_message(p_app_name => g_app_name,
2063: p_msg_name => 'OKC_GET_DURATION_ERROR');
2064:

Line 2061: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

2057: okc_time_util_pvt.get_oracle_months_and_days(l_parent_orig_start_date,lines_rec.start_date, l_duration,l_additional_days,l_return_status);
2058:
2059: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2060: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2061: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2062: OKC_API.set_message(p_app_name => g_app_name,
2063: p_msg_name => 'OKC_GET_DURATION_ERROR');
2064:
2065: RAISE OKC_API.G_EXCEPTION_ERROR;

Line 2062: OKC_API.set_message(p_app_name => g_app_name,

2058:
2059: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2060: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2061: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2062: OKC_API.set_message(p_app_name => g_app_name,
2063: p_msg_name => 'OKC_GET_DURATION_ERROR');
2064:
2065: RAISE OKC_API.G_EXCEPTION_ERROR;
2066: END IF;

Line 2065: RAISE OKC_API.G_EXCEPTION_ERROR;

2061: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2062: OKC_API.set_message(p_app_name => g_app_name,
2063: p_msg_name => 'OKC_GET_DURATION_ERROR');
2064:
2065: RAISE OKC_API.G_EXCEPTION_ERROR;
2066: END IF;
2067:
2068: -- Bug#2249285: Changed to add_months + days for offset calculations.
2069: --

Line 2083: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

2079: l_duration := 0;
2080: l_additional_days := 0;
2081: okc_time_util_pvt.get_oracle_months_and_days(l_parent_orig_start_date,lines_rec.end_date, l_duration,l_additional_days,l_return_status);
2082:
2083: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2084: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2085: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2086: OKC_API.set_message(p_app_name => g_app_name,
2087: p_msg_name => 'OKC_GET_DURATION_ERROR');

Line 2084: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

2080: l_additional_days := 0;
2081: okc_time_util_pvt.get_oracle_months_and_days(l_parent_orig_start_date,lines_rec.end_date, l_duration,l_additional_days,l_return_status);
2082:
2083: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2084: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2085: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2086: OKC_API.set_message(p_app_name => g_app_name,
2087: p_msg_name => 'OKC_GET_DURATION_ERROR');
2088: RAISE OKC_API.G_EXCEPTION_ERROR;

Line 2085: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

2081: okc_time_util_pvt.get_oracle_months_and_days(l_parent_orig_start_date,lines_rec.end_date, l_duration,l_additional_days,l_return_status);
2082:
2083: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2084: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2085: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2086: OKC_API.set_message(p_app_name => g_app_name,
2087: p_msg_name => 'OKC_GET_DURATION_ERROR');
2088: RAISE OKC_API.G_EXCEPTION_ERROR;
2089: END IF;

Line 2086: OKC_API.set_message(p_app_name => g_app_name,

2082:
2083: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2084: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2085: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2086: OKC_API.set_message(p_app_name => g_app_name,
2087: p_msg_name => 'OKC_GET_DURATION_ERROR');
2088: RAISE OKC_API.G_EXCEPTION_ERROR;
2089: END IF;
2090: -- Bug#2249285: Changed to add_months + days for offset calculations.

Line 2088: RAISE OKC_API.G_EXCEPTION_ERROR;

2084: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2085: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2086: OKC_API.set_message(p_app_name => g_app_name,
2087: p_msg_name => 'OKC_GET_DURATION_ERROR');
2088: RAISE OKC_API.G_EXCEPTION_ERROR;
2089: END IF;
2090: -- Bug#2249285: Changed to add_months + days for offset calculations.
2091:
2092: --

Line 2120: p_init_msg_list => OKC_API.G_FALSE,

2116: WHERE id = (SELECT object_cle_id FROM okc_operation_lines WHERE subject_cle_id = l_cle_rec.id);
2117:
2118: okc_contract_pub.update_contract_line (
2119: p_api_version => 1,
2120: p_init_msg_list => OKC_API.G_FALSE,
2121: x_return_status => l_return_status,
2122: x_msg_count => x_msg_count,
2123: x_msg_data => x_msg_data,
2124: p_clev_rec => l_cle_rec,

Line 2130: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

2126: IF (l_debug = 'Y') THEN
2127: okc_debug.log('7200: After update_contract_line');
2128: END IF;
2129:
2130: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2131: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2132: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2133: RAISE OKC_API.G_EXCEPTION_ERROR;
2134: END IF;

Line 2131: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

2127: okc_debug.log('7200: After update_contract_line');
2128: END IF;
2129:
2130: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2131: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2132: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2133: RAISE OKC_API.G_EXCEPTION_ERROR;
2134: END IF;
2135:

Line 2132: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

2128: END IF;
2129:
2130: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2131: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2132: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2133: RAISE OKC_API.G_EXCEPTION_ERROR;
2134: END IF;
2135:
2136: --add the line in parent table

Line 2133: RAISE OKC_API.G_EXCEPTION_ERROR;

2129:
2130: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2131: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2132: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2133: RAISE OKC_API.G_EXCEPTION_ERROR;
2134: END IF;
2135:
2136: --add the line in parent table
2137: j:=j+1;

Line 2183: p_init_msg_list => OKC_API.G_FALSE,

2179: j:=l_cle_tbl.first;
2180: loop
2181: OKC_CONTRACT_PUB.Delete_Contract_Line(
2182: p_api_version => 1,
2183: p_init_msg_list => OKC_API.G_FALSE,
2184: x_return_status => l_return_status,
2185: x_msg_count => x_msg_count,
2186: x_msg_data => x_msg_data,
2187: p_line_id => l_cle_tbl(j).id);

Line 2188: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

2184: x_return_status => l_return_status,
2185: x_msg_count => x_msg_count,
2186: x_msg_data => x_msg_data,
2187: p_line_id => l_cle_tbl(j).id);
2188: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2189: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2190: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2191: RAISE OKC_API.G_EXCEPTION_ERROR;
2192: END IF;

Line 2189: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

2185: x_msg_count => x_msg_count,
2186: x_msg_data => x_msg_data,
2187: p_line_id => l_cle_tbl(j).id);
2188: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2189: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2190: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2191: RAISE OKC_API.G_EXCEPTION_ERROR;
2192: END IF;
2193: -- Adding for bug 2084147 - Start

Line 2190: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

2186: x_msg_data => x_msg_data,
2187: p_line_id => l_cle_tbl(j).id);
2188: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2189: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2190: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2191: RAISE OKC_API.G_EXCEPTION_ERROR;
2192: END IF;
2193: -- Adding for bug 2084147 - Start
2194: -- IF Line Rule is DONOT RENEW then price_negotiated should be substracted from header

Line 2191: RAISE OKC_API.G_EXCEPTION_ERROR;

2187: p_line_id => l_cle_tbl(j).id);
2188: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2189: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2190: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2191: RAISE OKC_API.G_EXCEPTION_ERROR;
2192: END IF;
2193: -- Adding for bug 2084147 - Start
2194: -- IF Line Rule is DONOT RENEW then price_negotiated should be substracted from header
2195: -- level estimated amount

Line 2218: p_init_msg_list => OKC_API.G_FALSE,

2214: IF (l_debug = 'Y') THEN
2215: okc_debug.log('7300: Before update_rules');
2216: END IF;
2217: update_rules(p_api_version => 1,
2218: p_init_msg_list => OKC_API.G_FALSE,
2219: x_return_status => l_return_status,
2220: x_msg_count => x_msg_count,
2221: x_msg_data => x_msg_data,
2222: p_chr_id => p_chr_id

Line 2228: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

2224: IF (l_debug = 'Y') THEN
2225: okc_debug.log('7400: After update_rules');
2226: END IF;
2227:
2228: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2229: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2230: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2231: RAISE OKC_API.G_EXCEPTION_ERROR;
2232: END IF;

Line 2229: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

2225: okc_debug.log('7400: After update_rules');
2226: END IF;
2227:
2228: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2229: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2230: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2231: RAISE OKC_API.G_EXCEPTION_ERROR;
2232: END IF;
2233:

Line 2230: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

2226: END IF;
2227:
2228: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2229: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2230: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2231: RAISE OKC_API.G_EXCEPTION_ERROR;
2232: END IF;
2233:
2234: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);

Line 2231: RAISE OKC_API.G_EXCEPTION_ERROR;

2227:
2228: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2229: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2230: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2231: RAISE OKC_API.G_EXCEPTION_ERROR;
2232: END IF;
2233:
2234: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2235:

Line 2234: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);

2230: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2231: RAISE OKC_API.G_EXCEPTION_ERROR;
2232: END IF;
2233:
2234: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2235:
2236:
2237: IF (l_debug = 'Y') THEN
2238: okc_debug.log('7500: Leaving Update_Renewal_Dates', 2);

Line 2243: WHEN OKC_API.G_EXCEPTION_ERROR THEN

2239: okc_debug.Reset_Indentation;
2240: END IF;
2241:
2242: EXCEPTION
2243: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2244:
2245: IF (l_debug = 'Y') THEN
2246: okc_debug.log('7600: Exiting Update_Renewal_Dates:OKC_API.G_EXCEPTION_ERROR Exception', 2);
2247: okc_debug.Reset_Indentation;

Line 2246: okc_debug.log('7600: Exiting Update_Renewal_Dates:OKC_API.G_EXCEPTION_ERROR Exception', 2);

2242: EXCEPTION
2243: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2244:
2245: IF (l_debug = 'Y') THEN
2246: okc_debug.log('7600: Exiting Update_Renewal_Dates:OKC_API.G_EXCEPTION_ERROR Exception', 2);
2247: okc_debug.Reset_Indentation;
2248: END IF;
2249:
2250: IF l_rencon_n_cur%ISOPEN then

Line 2256: x_return_status := OKC_API.HANDLE_EXCEPTIONS

2252: END IF;
2253: IF l_rencon_y_cur%ISOPEN then
2254: close l_rencon_y_cur;
2255: END IF;
2256: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2257: (l_api_name,
2258: G_PKG_NAME,
2259: 'OKC_API.G_RET_STS_ERROR',
2260: x_msg_count,

Line 2259: 'OKC_API.G_RET_STS_ERROR',

2255: END IF;
2256: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2257: (l_api_name,
2258: G_PKG_NAME,
2259: 'OKC_API.G_RET_STS_ERROR',
2260: x_msg_count,
2261: x_msg_data,
2262: '_PROCESS');
2263:

Line 2264: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN

2260: x_msg_count,
2261: x_msg_data,
2262: '_PROCESS');
2263:
2264: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2265:
2266: IF (l_debug = 'Y') THEN
2267: okc_debug.log('7700: Exiting Update_Renewal_Dates:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
2268: okc_debug.Reset_Indentation;

Line 2267: okc_debug.log('7700: Exiting Update_Renewal_Dates:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);

2263:
2264: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2265:
2266: IF (l_debug = 'Y') THEN
2267: okc_debug.log('7700: Exiting Update_Renewal_Dates:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
2268: okc_debug.Reset_Indentation;
2269: END IF;
2270:
2271: IF l_rencon_n_cur%ISOPEN then

Line 2277: x_return_status := OKC_API.HANDLE_EXCEPTIONS

2273: END IF;
2274: IF l_rencon_y_cur%ISOPEN then
2275: close l_rencon_y_cur;
2276: END IF;
2277: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2278: (l_api_name,
2279: G_PKG_NAME,
2280: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2281: x_msg_count,

Line 2280: 'OKC_API.G_RET_STS_UNEXP_ERROR',

2276: END IF;
2277: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2278: (l_api_name,
2279: G_PKG_NAME,
2280: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2281: x_msg_count,
2282: x_msg_data,
2283: '_PROCESS');
2284:

Line 2298: x_return_status := OKC_API.HANDLE_EXCEPTIONS

2294: END IF;
2295: IF l_rencon_y_cur%ISOPEN then
2296: close l_rencon_y_cur;
2297: END IF;
2298: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2299: (l_api_name,
2300: G_PKG_NAME,
2301: 'OTHERS',
2302: x_msg_count,

Line 2330: x_return_status :=OKC_API.G_RET_STS_SUCCESS;

2326: okc_debug.Set_Indentation('OKC_RENEW_PVT');
2327: okc_debug.log('7900: Entered set_notify', 2);
2328: END IF;
2329:
2330: x_return_status :=OKC_API.G_RET_STS_SUCCESS;
2331:
2332: If (p_old_mod Is Null) Or (p_old_mod = OKC_API.G_MISS_CHAR) Then
2333: l_oldk := p_old_k;
2334: Else

Line 2332: If (p_old_mod Is Null) Or (p_old_mod = OKC_API.G_MISS_CHAR) Then

2328: END IF;
2329:
2330: x_return_status :=OKC_API.G_RET_STS_SUCCESS;
2331:
2332: If (p_old_mod Is Null) Or (p_old_mod = OKC_API.G_MISS_CHAR) Then
2333: l_oldk := p_old_k;
2334: Else
2335: l_oldk := p_old_k || '-' || p_old_mod;
2336: End If;

Line 2337: If (p_new_mod Is Null) Or (p_new_mod = OKC_API.G_MISS_CHAR) Then

2333: l_oldk := p_old_k;
2334: Else
2335: l_oldk := p_old_k || '-' || p_old_mod;
2336: End If;
2337: If (p_new_mod Is Null) Or (p_new_mod = OKC_API.G_MISS_CHAR) Then
2338: l_newk := p_new_k;
2339: Else
2340: l_newk := p_new_k || '-' || p_new_mod;
2341: End If;

Line 2343: If p_subj_msg <> OKC_API.G_MISS_CHAR then

2339: Else
2340: l_newk := p_new_k || '-' || p_new_mod;
2341: End If;
2342:
2343: If p_subj_msg <> OKC_API.G_MISS_CHAR then
2344: OKC_API.set_message(p_app_name => g_app_name,
2345: p_msg_name => p_subj_msg);
2346: ELSE
2347: OKC_API.set_message(p_app_name => g_app_name,

Line 2344: OKC_API.set_message(p_app_name => g_app_name,

2340: l_newk := p_new_k || '-' || p_new_mod;
2341: End If;
2342:
2343: If p_subj_msg <> OKC_API.G_MISS_CHAR then
2344: OKC_API.set_message(p_app_name => g_app_name,
2345: p_msg_name => p_subj_msg);
2346: ELSE
2347: OKC_API.set_message(p_app_name => g_app_name,
2348: p_msg_name => 'OKC_REN_SUBJECT',

Line 2347: OKC_API.set_message(p_app_name => g_app_name,

2343: If p_subj_msg <> OKC_API.G_MISS_CHAR then
2344: OKC_API.set_message(p_app_name => g_app_name,
2345: p_msg_name => p_subj_msg);
2346: ELSE
2347: OKC_API.set_message(p_app_name => g_app_name,
2348: p_msg_name => 'OKC_REN_SUBJECT',
2349: p_token1 => 'NUMBER',
2350: p_token1_value => l_oldk);
2351: END IF;

Line 2353: OKC_API.set_message(p_app_name => g_app_name,

2349: p_token1 => 'NUMBER',
2350: p_token1_value => l_oldk);
2351: END IF;
2352: If p_ren_type = 'NSR' then
2353: OKC_API.set_message(p_app_name => g_app_name,
2354: p_msg_name => 'OKC_REN_NSR',
2355: p_token1 => 'OLDK',
2356: p_token1_value => l_oldk,
2357: p_token2 => 'NEWK',

Line 2361: OKC_API.set_message(p_app_name => g_app_name,

2357: p_token2 => 'NEWK',
2358: p_token2_value => l_newk);
2359: ELSE
2360: IF p_qa_stat = 'S' then
2361: OKC_API.set_message(p_app_name => g_app_name,
2362: p_msg_name => 'OKC_QA_FAILED');
2363: IF p_ren_type='SFA' then
2364: OKC_API.set_message(p_app_name => g_app_name,
2365: p_msg_name => 'OKC_REN_NO_SFA',

Line 2364: OKC_API.set_message(p_app_name => g_app_name,

2360: IF p_qa_stat = 'S' then
2361: OKC_API.set_message(p_app_name => g_app_name,
2362: p_msg_name => 'OKC_QA_FAILED');
2363: IF p_ren_type='SFA' then
2364: OKC_API.set_message(p_app_name => g_app_name,
2365: p_msg_name => 'OKC_REN_NO_SFA',
2366: p_token1 => 'OLDK',
2367: p_token1_value => l_oldk,
2368: p_token2 => 'NEWK',

Line 2371: OKC_API.set_message(p_app_name => g_app_name,

2367: p_token1_value => l_oldk,
2368: p_token2 => 'NEWK',
2369: p_token2_value => l_newk);
2370: ELSIF p_ren_type='EVN' then
2371: OKC_API.set_message(p_app_name => g_app_name,
2372: p_msg_name => 'OKC_REN_NO_EVN',
2373: p_token1 => 'OLDK',
2374: p_token1_value => l_oldk,
2375: p_token2 => 'NEWK',

Line 2380: OKC_API.set_message(p_app_name => g_app_name,

2376: p_token2_value => l_newk);
2377: END IF;
2378: ELSE
2379: IF p_qa_stat = 'W' then
2380: OKC_API.set_message(p_app_name => g_app_name,
2381: p_msg_name => 'OKC_QA_WARNINGS');
2382: END IF;
2383: IF p_ren_type='SFA' then
2384: If p_wf_found='F' then

Line 2385: OKC_API.set_message(p_app_name => g_app_name,

2381: p_msg_name => 'OKC_QA_WARNINGS');
2382: END IF;
2383: IF p_ren_type='SFA' then
2384: If p_wf_found='F' then
2385: OKC_API.set_message(p_app_name => g_app_name,
2386: p_msg_name => 'OKC_REN_NO_WF',
2387: p_token1 => 'OLDK',
2388: p_token1_value => l_oldk,
2389: p_token2 => 'NEWK',

Line 2393: OKC_API.set_message(p_app_name => g_app_name,

2389: p_token2 => 'NEWK',
2390: p_token2_value => l_newk);
2391:
2392: ELSE
2393: OKC_API.set_message(p_app_name => g_app_name,
2394: p_msg_name => 'OKC_REN_SFA',
2395: p_token1 => 'OLDK',
2396: p_token1_value => l_oldk,
2397: p_token2 => 'NEWK',

Line 2401: OKC_API.set_message(p_app_name => g_app_name,

2397: p_token2 => 'NEWK',
2398: p_token2_value => l_newk);
2399: END IF;
2400: ELSIF p_ren_type='EVN' then
2401: OKC_API.set_message(p_app_name => g_app_name,
2402: p_msg_name => 'OKC_REN_EVN',
2403: p_token1 => 'OLDK',
2404: p_token1_value => l_oldk,
2405: p_token2 => 'NEWK',

Line 2437: SELECT nvl(rul.rule_information1,OKC_API.G_MISS_CHAR) renew_type,

2433: p_ren_type IN VARCHAR2 ,
2434: p_contact IN VARCHAR2 ) is
2435:
2436: CURSOR cur_rules(p_chr_id number) is
2437: SELECT nvl(rul.rule_information1,OKC_API.G_MISS_CHAR) renew_type,
2438: nvl(rul.rule_information2,OKC_API.G_MISS_CHAR) contact
2439: FROM okc_rules_b rul,okc_rule_groups_b rgp
2440: WHERE rgp.dnz_chr_id = p_chr_id
2441: and rgp.id=rul.rgp_id

Line 2438: nvl(rul.rule_information2,OKC_API.G_MISS_CHAR) contact

2434: p_contact IN VARCHAR2 ) is
2435:
2436: CURSOR cur_rules(p_chr_id number) is
2437: SELECT nvl(rul.rule_information1,OKC_API.G_MISS_CHAR) renew_type,
2438: nvl(rul.rule_information2,OKC_API.G_MISS_CHAR) contact
2439: FROM okc_rules_b rul,okc_rule_groups_b rgp
2440: WHERE rgp.dnz_chr_id = p_chr_id
2441: and rgp.id=rul.rgp_id
2442: --and rgp.rgd_code='RENEW'

Line 2447: CURSOR cur_qa(p_chr_id number) is select nvl(qcl_id,OKC_API.G_MISS_NUM)

2443: and rul.rule_information_category='REN' ;
2444:
2445: --/Rules migration/ replaced by cursor below
2446: /*
2447: CURSOR cur_qa(p_chr_id number) is select nvl(qcl_id,OKC_API.G_MISS_NUM)
2448: from OKC_K_HEADERS_b
2449: where id=p_chr_id;
2450: */
2451:

Line 2454: select nvl(qcl_id,OKC_API.G_MISS_NUM) qcl_id,

2450: */
2451:
2452:
2453: CURSOR cur_header(p_chr_id number) is
2454: select nvl(qcl_id,OKC_API.G_MISS_NUM) qcl_id,
2455: nvl(renewal_type_code,OKC_API.G_MISS_CHAR) renewal_type_code,renewal_notify_to,
2456: application_id
2457: from OKC_K_HEADERS_b
2458: where id=p_chr_id;

Line 2455: nvl(renewal_type_code,OKC_API.G_MISS_CHAR) renewal_type_code,renewal_notify_to,

2451:
2452:
2453: CURSOR cur_header(p_chr_id number) is
2454: select nvl(qcl_id,OKC_API.G_MISS_NUM) qcl_id,
2455: nvl(renewal_type_code,OKC_API.G_MISS_CHAR) renewal_type_code,renewal_notify_to,
2456: application_id
2457: from OKC_K_HEADERS_b
2458: where id=p_chr_id;
2459:

Line 2486: l_pdf_id number :=OKC_API.G_MISS_NUM;

2482: l_end_date date;
2483: l_start_date date;
2484: l_estimated_amount number;
2485: --l_wf_msg_tbl okc_async_pvt.par_tbl_typ;
2486: l_pdf_id number :=OKC_API.G_MISS_NUM;
2487: rule_rec cur_rules%rowtype;
2488: l_ren_type okc_rules_v.rule_information1%type:=OKC_API.G_MISS_CHAR;
2489: l_contact okc_rules_v.rule_information2%type:=OKC_API.G_MISS_CHAR;
2490: l_qcl_id number;

Line 2488: l_ren_type okc_rules_v.rule_information1%type:=OKC_API.G_MISS_CHAR;

2484: l_estimated_amount number;
2485: --l_wf_msg_tbl okc_async_pvt.par_tbl_typ;
2486: l_pdf_id number :=OKC_API.G_MISS_NUM;
2487: rule_rec cur_rules%rowtype;
2488: l_ren_type okc_rules_v.rule_information1%type:=OKC_API.G_MISS_CHAR;
2489: l_contact okc_rules_v.rule_information2%type:=OKC_API.G_MISS_CHAR;
2490: l_qcl_id number;
2491: l_msg_tbl OKC_QA_CHECK_PUB.MSG_TBL_TYPE;
2492: i BINARY_INTEGER;

Line 2489: l_contact okc_rules_v.rule_information2%type:=OKC_API.G_MISS_CHAR;

2485: --l_wf_msg_tbl okc_async_pvt.par_tbl_typ;
2486: l_pdf_id number :=OKC_API.G_MISS_NUM;
2487: rule_rec cur_rules%rowtype;
2488: l_ren_type okc_rules_v.rule_information1%type:=OKC_API.G_MISS_CHAR;
2489: l_contact okc_rules_v.rule_information2%type:=OKC_API.G_MISS_CHAR;
2490: l_qcl_id number;
2491: l_msg_tbl OKC_QA_CHECK_PUB.MSG_TBL_TYPE;
2492: i BINARY_INTEGER;
2493: l_max_severity varchar2(1):='I';

Line 2495: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;

2491: l_msg_tbl OKC_QA_CHECK_PUB.MSG_TBL_TYPE;
2492: i BINARY_INTEGER;
2493: l_max_severity varchar2(1):='I';
2494: l_wf_found varchar2(1):='T';
2495: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;
2496: l_api_name constant VARCHAR2(30) := 'post_renewed_contract';
2497: l_lead_id Number;
2498: cur_header_rec cur_header%rowtype;
2499:

Line 2502: l_user_name fnd_user.user_name%type :=OKC_API.G_MISS_CHAR;

2498: cur_header_rec cur_header%rowtype;
2499:
2500: --FUNCTION notify(p_msg_tbl okc_async_pvt.par_tbl_typ,p_user varchar2) RETURN varchar2 IS
2501: FUNCTION notify(p_user varchar2) RETURN varchar2 IS
2502: l_user_name fnd_user.user_name%type :=OKC_API.G_MISS_CHAR;
2503: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;
2504: l_exception_stop exception;
2505: l_proc varchar2(4000);
2506: l_api_name Varchar2(30) := 'notify';

Line 2503: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;

2499:
2500: --FUNCTION notify(p_msg_tbl okc_async_pvt.par_tbl_typ,p_user varchar2) RETURN varchar2 IS
2501: FUNCTION notify(p_user varchar2) RETURN varchar2 IS
2502: l_user_name fnd_user.user_name%type :=OKC_API.G_MISS_CHAR;
2503: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;
2504: l_exception_stop exception;
2505: l_proc varchar2(4000);
2506: l_api_name Varchar2(30) := 'notify';
2507: BEGIN

Line 2514: IF p_ren_type = OKC_API.G_MISS_CHAR then

2510: okc_debug.Set_Indentation('OKC_RENEW_PVT');
2511: okc_debug.log('8100: Entered notify', 2);
2512: END IF;
2513:
2514: IF p_ren_type = OKC_API.G_MISS_CHAR then
2515: open cur_user(to_number(p_user));
2516: FETCH cur_user into l_user_name;
2517: close cur_user;
2518: ELSE

Line 2522: IF l_user_name <> OKC_API.G_MISS_CHAR AND l_user_name is not null then

2518: ELSE
2519: l_user_name := p_user;
2520: END IF;
2521:
2522: IF l_user_name <> OKC_API.G_MISS_CHAR AND l_user_name is not null then
2523:
2524: l_proc:='begin OKC_RENEW_PVT.SET_NOTIFY(x_return_status=>:1,p_old_k=>'''||
2525: p_renew_in_parameters_rec.p_contract_number ||'''';
2526: IF p_renew_in_parameters_rec.p_contract_modifier <> OKC_API.G_MISS_CHAR then

Line 2526: IF p_renew_in_parameters_rec.p_contract_modifier <> OKC_API.G_MISS_CHAR then

2522: IF l_user_name <> OKC_API.G_MISS_CHAR AND l_user_name is not null then
2523:
2524: l_proc:='begin OKC_RENEW_PVT.SET_NOTIFY(x_return_status=>:1,p_old_k=>'''||
2525: p_renew_in_parameters_rec.p_contract_number ||'''';
2526: IF p_renew_in_parameters_rec.p_contract_modifier <> OKC_API.G_MISS_CHAR then
2527: l_proc:= l_proc||',p_old_mod=>'''||p_renew_in_parameters_rec.p_contract_modifier ||'''';
2528: END IF;
2529:
2530: l_proc:= l_proc||',p_new_k=>'''||p_renew_in_parameters_rec.p_new_contract_number ||'''';

Line 2532: IF p_renew_in_parameters_rec.p_new_contract_modifier <> OKC_API.G_MISS_CHAR then

2528: END IF;
2529:
2530: l_proc:= l_proc||',p_new_k=>'''||p_renew_in_parameters_rec.p_new_contract_number ||'''';
2531:
2532: IF p_renew_in_parameters_rec.p_new_contract_modifier <> OKC_API.G_MISS_CHAR then
2533: l_proc:= l_proc||',p_new_mod=>'''||p_renew_in_parameters_rec.p_new_contract_modifier ||'''';
2534: END IF;
2535:
2536: l_proc:= l_proc||',p_qa_stat=>'''||l_max_severity||

Line 2559: IF l_return_status <> OKC_API.G_RET_STS_SUCCESS THEN

2555: okc_debug.log('8300: After proc_msg_call');
2556: END IF;
2557:
2558:
2559: IF l_return_status <> OKC_API.G_RET_STS_SUCCESS THEN
2560: RAISE l_exception_stop;
2561: END IF;
2562:
2563: END IF;

Line 2588: OKC_API.set_message(p_app_name => g_app_name,

2584: okc_debug.log('8600: Exiting notify:others Exception', 2);
2585: okc_debug.Reset_Indentation;
2586: END IF;
2587:
2588: OKC_API.set_message(p_app_name => g_app_name,
2589: p_msg_name => g_unexpected_error,
2590: p_token1 => g_sqlcode_token,
2591: p_token1_value => sqlcode,
2592: p_token2 => g_sqlerrm_token,

Line 2594: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

2590: p_token1 => g_sqlcode_token,
2591: p_token1_value => sqlcode,
2592: p_token2 => g_sqlerrm_token,
2593: p_token2_value => sqlerrm);
2594: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
2595:
2596: return (l_return_status);
2597: END notify;
2598:

Line 2606: x_return_status := OKC_API.G_RET_STS_SUCCESS;

2602: okc_debug.Set_Indentation('OKC_RENEW_PVT');
2603: okc_debug.log('8700: Entered post_renewed_contract', 2);
2604: END IF;
2605:
2606: x_return_status := OKC_API.G_RET_STS_SUCCESS;
2607:
2608: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2609: p_init_msg_list,
2610: '_PROCESS',

Line 2608: l_return_status := OKC_API.START_ACTIVITY(l_api_name,

2604: END IF;
2605:
2606: x_return_status := OKC_API.G_RET_STS_SUCCESS;
2607:
2608: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2609: p_init_msg_list,
2610: '_PROCESS',
2611: x_return_status);
2612:

Line 2613: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN

2609: p_init_msg_list,
2610: '_PROCESS',
2611: x_return_status);
2612:
2613: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2614: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2615: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2616: raise OKC_API.G_EXCEPTION_ERROR;
2617: END IF;

Line 2614: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

2610: '_PROCESS',
2611: x_return_status);
2612:
2613: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2614: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2615: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2616: raise OKC_API.G_EXCEPTION_ERROR;
2617: END IF;
2618:

Line 2615: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN

2611: x_return_status);
2612:
2613: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2614: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2615: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2616: raise OKC_API.G_EXCEPTION_ERROR;
2617: END IF;
2618:
2619: --/Rules migration/ added

Line 2616: raise OKC_API.G_EXCEPTION_ERROR;

2612:
2613: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2614: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2615: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2616: raise OKC_API.G_EXCEPTION_ERROR;
2617: END IF;
2618:
2619: --/Rules migration/ added
2620: open cur_header(p_renew_chr_id);

Line 2624: IF p_ren_type = OKC_API.G_MISS_CHAR then

2620: open cur_header(p_renew_chr_id);
2621: fetch cur_header into cur_header_rec;
2622: close cur_header;
2623:
2624: IF p_ren_type = OKC_API.G_MISS_CHAR then
2625: If cur_header_rec.application_id in (510,871) Then
2626: open cur_rules(p_renew_chr_id);
2627: fetch cur_rules into rule_rec;
2628: close cur_rules;

Line 2634: l_contact := OKC_API.G_MISS_CHAR;

2630: l_contact:=rule_rec.contact;
2631: Else
2632: l_ren_type := cur_header_rec.renewal_type_code;
2633: If cur_header_rec.renewal_notify_to is null Then
2634: l_contact := OKC_API.G_MISS_CHAR;
2635: Else
2636: l_contact :=cur_header_rec.renewal_notify_to;
2637: End If;
2638: End If;

Line 2650: If l_contact = OKC_API.G_MISS_CHAR then

2646: okc_debug.log('8800: l_ren_type ' || l_ren_type);
2647: END IF;
2648:
2649: IF l_ren_type in ('SFA','EVN','NSR') then
2650: If l_contact = OKC_API.G_MISS_CHAR then
2651: OKC_API.set_message(p_app_name => g_app_name,
2652: p_msg_name => 'OKC_NO_RENEW_CONTACT');
2653: RAISE OKC_API.G_EXCEPTION_ERROR;
2654: END IF;

Line 2651: OKC_API.set_message(p_app_name => g_app_name,

2647: END IF;
2648:
2649: IF l_ren_type in ('SFA','EVN','NSR') then
2650: If l_contact = OKC_API.G_MISS_CHAR then
2651: OKC_API.set_message(p_app_name => g_app_name,
2652: p_msg_name => 'OKC_NO_RENEW_CONTACT');
2653: RAISE OKC_API.G_EXCEPTION_ERROR;
2654: END IF;
2655: IF l_ren_type in ('SFA','EVN') then

Line 2653: RAISE OKC_API.G_EXCEPTION_ERROR;

2649: IF l_ren_type in ('SFA','EVN','NSR') then
2650: If l_contact = OKC_API.G_MISS_CHAR then
2651: OKC_API.set_message(p_app_name => g_app_name,
2652: p_msg_name => 'OKC_NO_RENEW_CONTACT');
2653: RAISE OKC_API.G_EXCEPTION_ERROR;
2654: END IF;
2655: IF l_ren_type in ('SFA','EVN') then
2656: --do qa check
2657: --/Rules migration/ Use cur_header_rec

Line 2665: If l_qcl_id <> OKC_API.G_MISS_NUM then

2661: Close cur_qa;
2662: */
2663: l_qcl_id := cur_header_rec.qcl_id;
2664: --
2665: If l_qcl_id <> OKC_API.G_MISS_NUM then
2666: IF (l_debug = 'Y') THEN
2667: okc_debug.log('8900: Before QA Check');
2668: END IF;
2669: OKC_QA_CHECK_PUB.execute_qa_check_list(

Line 2671: ,p_init_msg_list=>okc_api.g_false

2667: okc_debug.log('8900: Before QA Check');
2668: END IF;
2669: OKC_QA_CHECK_PUB.execute_qa_check_list(
2670: p_api_version =>p_api_version
2671: ,p_init_msg_list=>okc_api.g_false
2672: ,x_return_status=>x_return_status
2673: ,x_msg_count=>x_msg_count
2674: ,x_msg_data=>x_msg_data
2675: ,p_qcl_id=>l_qcl_id

Line 2682: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

2678: );
2679: IF (l_debug = 'Y') THEN
2680: okc_debug.log('9000: After QA Check');
2681: END IF;
2682: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2683: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2684: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
2685: RAISE OKC_API.G_EXCEPTION_ERROR;
2686: END IF;

Line 2683: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

2679: IF (l_debug = 'Y') THEN
2680: okc_debug.log('9000: After QA Check');
2681: END IF;
2682: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2683: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2684: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
2685: RAISE OKC_API.G_EXCEPTION_ERROR;
2686: END IF;
2687: l_max_severity:='I';

Line 2684: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN

2680: okc_debug.log('9000: After QA Check');
2681: END IF;
2682: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2683: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2684: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
2685: RAISE OKC_API.G_EXCEPTION_ERROR;
2686: END IF;
2687: l_max_severity:='I';
2688: If l_msg_tbl.count >0 then

Line 2685: RAISE OKC_API.G_EXCEPTION_ERROR;

2681: END IF;
2682: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2683: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2684: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
2685: RAISE OKC_API.G_EXCEPTION_ERROR;
2686: END IF;
2687: l_max_severity:='I';
2688: If l_msg_tbl.count >0 then
2689: i:=l_msg_tbl.first;

Line 2726: IF l_pdf_id <> OKC_API.G_MISS_NUM then

2722: --san comment start contract approval workflow
2723: open cur_wf(p_renew_chr_id);
2724: Fetch cur_wf into l_pdf_id;
2725: close cur_wf;
2726: IF l_pdf_id <> OKC_API.G_MISS_NUM then
2727: IF (l_debug = 'Y') THEN
2728: okc_debug.log('9100: Before k_approval_start');
2729: END IF;
2730: OKC_CONTRACT_APPROVAL_PUB.k_approval_start(

Line 2732: p_init_msg_list=>okc_api.g_false,

2728: okc_debug.log('9100: Before k_approval_start');
2729: END IF;
2730: OKC_CONTRACT_APPROVAL_PUB.k_approval_start(
2731: p_api_version=>p_api_version,
2732: p_init_msg_list=>okc_api.g_false,
2733: x_return_status=>x_return_status,
2734: x_msg_count=>x_msg_count,
2735: x_msg_data=>x_msg_data,
2736: p_contract_id=>p_renew_chr_id,

Line 2738: p_do_commit=>okc_api.g_false,

2734: x_msg_count=>x_msg_count,
2735: x_msg_data=>x_msg_data,
2736: p_contract_id=>p_renew_chr_id,
2737: p_process_id=>l_pdf_id,
2738: p_do_commit=>okc_api.g_false,
2739: p_access_level=>'Y'
2740: );
2741: IF (l_debug = 'Y') THEN
2742: okc_debug.log('9200: After k_approval_start');

Line 2744: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

2740: );
2741: IF (l_debug = 'Y') THEN
2742: okc_debug.log('9200: After k_approval_start');
2743: END IF;
2744: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2745: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2746: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
2747: RAISE OKC_API.G_EXCEPTION_ERROR;
2748: END IF;

Line 2745: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

2741: IF (l_debug = 'Y') THEN
2742: okc_debug.log('9200: After k_approval_start');
2743: END IF;
2744: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2745: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2746: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
2747: RAISE OKC_API.G_EXCEPTION_ERROR;
2748: END IF;
2749:

Line 2746: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN

2742: okc_debug.log('9200: After k_approval_start');
2743: END IF;
2744: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2745: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2746: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
2747: RAISE OKC_API.G_EXCEPTION_ERROR;
2748: END IF;
2749:
2750: -- l_wf_msg_tbl(2).par_type := 'C';

Line 2747: RAISE OKC_API.G_EXCEPTION_ERROR;

2743: END IF;
2744: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2745: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2746: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
2747: RAISE OKC_API.G_EXCEPTION_ERROR;
2748: END IF;
2749:
2750: -- l_wf_msg_tbl(2).par_type := 'C';
2751: -- l_wf_msg_tbl(2).par_name := 'MESSAGE1';

Line 2773: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

2769: );
2770: IF (l_debug = 'Y') THEN
2771: okc_debug.log('9400: After k_approved');
2772: END IF;
2773: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2774: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2775: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
2776: RAISE OKC_API.G_EXCEPTION_ERROR;
2777: END IF;

Line 2774: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

2770: IF (l_debug = 'Y') THEN
2771: okc_debug.log('9400: After k_approved');
2772: END IF;
2773: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2774: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2775: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
2776: RAISE OKC_API.G_EXCEPTION_ERROR;
2777: END IF;
2778: -- sign the contract

Line 2775: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN

2771: okc_debug.log('9400: After k_approved');
2772: END IF;
2773: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2774: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2775: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
2776: RAISE OKC_API.G_EXCEPTION_ERROR;
2777: END IF;
2778: -- sign the contract
2779: IF (l_debug = 'Y') THEN

Line 2776: RAISE OKC_API.G_EXCEPTION_ERROR;

2772: END IF;
2773: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2774: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2775: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
2776: RAISE OKC_API.G_EXCEPTION_ERROR;
2777: END IF;
2778: -- sign the contract
2779: IF (l_debug = 'Y') THEN
2780: okc_debug.log('9500: Before k_signed');

Line 2789: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

2785: );
2786: IF (l_debug = 'Y') THEN
2787: okc_debug.log('9600: After k_signed');
2788: END IF;
2789: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2790: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2791: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
2792: RAISE OKC_API.G_EXCEPTION_ERROR;
2793: END IF;

Line 2790: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

2786: IF (l_debug = 'Y') THEN
2787: okc_debug.log('9600: After k_signed');
2788: END IF;
2789: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2790: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2791: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
2792: RAISE OKC_API.G_EXCEPTION_ERROR;
2793: END IF;
2794:

Line 2791: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN

2787: okc_debug.log('9600: After k_signed');
2788: END IF;
2789: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2790: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2791: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
2792: RAISE OKC_API.G_EXCEPTION_ERROR;
2793: END IF;
2794:
2795: END IF;

Line 2792: RAISE OKC_API.G_EXCEPTION_ERROR;

2788: END IF;
2789: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2790: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2791: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
2792: RAISE OKC_API.G_EXCEPTION_ERROR;
2793: END IF;
2794:
2795: END IF;
2796:

Line 2815: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

2811: x_return_status := notify(l_contact);
2812: IF (l_debug = 'Y') THEN
2813: okc_debug.log('9800: After notify');
2814: END IF;
2815: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2816: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2817: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
2818: RAISE OKC_API.G_EXCEPTION_ERROR;
2819: END IF;

Line 2816: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

2812: IF (l_debug = 'Y') THEN
2813: okc_debug.log('9800: After notify');
2814: END IF;
2815: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2816: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2817: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
2818: RAISE OKC_API.G_EXCEPTION_ERROR;
2819: END IF;
2820: END IF;-- if ren type sfa,evn or nsr

Line 2817: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN

2813: okc_debug.log('9800: After notify');
2814: END IF;
2815: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2816: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2817: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
2818: RAISE OKC_API.G_EXCEPTION_ERROR;
2819: END IF;
2820: END IF;-- if ren type sfa,evn or nsr
2821: --call action assembler here.

Line 2818: RAISE OKC_API.G_EXCEPTION_ERROR;

2814: END IF;
2815: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2816: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2817: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
2818: RAISE OKC_API.G_EXCEPTION_ERROR;
2819: END IF;
2820: END IF;-- if ren type sfa,evn or nsr
2821: --call action assembler here.
2822:

Line 2842: p_init_msg_list => OKC_API.G_FALSE,

2838: okc_debug.log('9900: Before acn_assemble');
2839: END IF;
2840: OKC_K_RENEW_ASMBLR_PVT.acn_assemble(
2841: p_api_version => 1,
2842: p_init_msg_list => OKC_API.G_FALSE,
2843: x_return_status => l_return_status,
2844: x_msg_count => x_msg_count,
2845: x_msg_data => x_msg_data,
2846: p_k_nbr_mod => p_renew_in_parameters_rec.p_contract_modifier,

Line 2862: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

2858: IF (l_debug = 'Y') THEN
2859: okc_debug.log('10000: After acn_assemble');
2860: END IF;
2861:
2862: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2863: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2864: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2865: RAISE OKC_API.G_EXCEPTION_ERROR;
2866: END IF;

Line 2863: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

2859: okc_debug.log('10000: After acn_assemble');
2860: END IF;
2861:
2862: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2863: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2864: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2865: RAISE OKC_API.G_EXCEPTION_ERROR;
2866: END IF;
2867:

Line 2864: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

2860: END IF;
2861:
2862: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2863: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2864: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2865: RAISE OKC_API.G_EXCEPTION_ERROR;
2866: END IF;
2867:
2868: -- Opportunity Integration starts from here. See bug 1865416 for more details.

Line 2865: RAISE OKC_API.G_EXCEPTION_ERROR;

2861:
2862: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2863: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2864: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2865: RAISE OKC_API.G_EXCEPTION_ERROR;
2866: END IF;
2867:
2868: -- Opportunity Integration starts from here. See bug 1865416 for more details.
2869: -- Create opportunity for this renewed contract only if it is allowed.

Line 2884: If l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR Then

2880: END IF;
2881: -- In case of unexpected error, raise the exception, however if it is
2882: -- a normal error, it means opportunity cannot be created and success
2883: -- should be returned from this procedure.
2884: If l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR Then
2885: Raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2886: /* Elsif l_return_status = OKC_API.G_RET_STS_ERROR Then
2887: Raise OKC_API.G_EXCEPTION_ERROR; */
2888: End If;

Line 2885: Raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

2881: -- In case of unexpected error, raise the exception, however if it is
2882: -- a normal error, it means opportunity cannot be created and success
2883: -- should be returned from this procedure.
2884: If l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR Then
2885: Raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2886: /* Elsif l_return_status = OKC_API.G_RET_STS_ERROR Then
2887: Raise OKC_API.G_EXCEPTION_ERROR; */
2888: End If;
2889:

Line 2886: /* Elsif l_return_status = OKC_API.G_RET_STS_ERROR Then

2882: -- a normal error, it means opportunity cannot be created and success
2883: -- should be returned from this procedure.
2884: If l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR Then
2885: Raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2886: /* Elsif l_return_status = OKC_API.G_RET_STS_ERROR Then
2887: Raise OKC_API.G_EXCEPTION_ERROR; */
2888: End If;
2889:
2890: If l_return_status = OKC_API.G_RET_STS_SUCCESS Then

Line 2887: Raise OKC_API.G_EXCEPTION_ERROR; */

2883: -- should be returned from this procedure.
2884: If l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR Then
2885: Raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2886: /* Elsif l_return_status = OKC_API.G_RET_STS_ERROR Then
2887: Raise OKC_API.G_EXCEPTION_ERROR; */
2888: End If;
2889:
2890: If l_return_status = OKC_API.G_RET_STS_SUCCESS Then
2891: IF (l_debug = 'Y') THEN

Line 2890: If l_return_status = OKC_API.G_RET_STS_SUCCESS Then

2886: /* Elsif l_return_status = OKC_API.G_RET_STS_ERROR Then
2887: Raise OKC_API.G_EXCEPTION_ERROR; */
2888: End If;
2889:
2890: If l_return_status = OKC_API.G_RET_STS_SUCCESS Then
2891: IF (l_debug = 'Y') THEN
2892: okc_debug.log('10300: Before Create_Opportunity');
2893: END IF;
2894:

Line 2902: p_init_msg_list => OKC_API.G_FALSE,

2898: p_contract_id => p_renew_chr_id,
2899: p_win_probability => Null,
2900: p_expected_close_days => Null,
2901: x_lead_id => l_lead_id,
2902: p_init_msg_list => OKC_API.G_FALSE,
2903: x_msg_data => x_msg_data,
2904: x_msg_count => x_msg_count,
2905: x_return_status => l_return_status);
2906:

Line 2913: If l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR Then

2909: okc_debug.log('10500: Return Status of Create_Opportunity - ' || l_return_status);
2910: okc_debug.log('10600: Lead ID - ' || To_Char(l_lead_id));
2911: END IF;
2912:
2913: If l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR Then
2914: Raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2915: /* Elsif l_return_status = OKC_API.G_RET_STS_ERROR Then
2916: Raise OKC_API.G_EXCEPTION_ERROR; */
2917: End If;

Line 2914: Raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

2910: okc_debug.log('10600: Lead ID - ' || To_Char(l_lead_id));
2911: END IF;
2912:
2913: If l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR Then
2914: Raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2915: /* Elsif l_return_status = OKC_API.G_RET_STS_ERROR Then
2916: Raise OKC_API.G_EXCEPTION_ERROR; */
2917: End If;
2918: End If;

Line 2915: /* Elsif l_return_status = OKC_API.G_RET_STS_ERROR Then

2911: END IF;
2912:
2913: If l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR Then
2914: Raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2915: /* Elsif l_return_status = OKC_API.G_RET_STS_ERROR Then
2916: Raise OKC_API.G_EXCEPTION_ERROR; */
2917: End If;
2918: End If;
2919:

Line 2916: Raise OKC_API.G_EXCEPTION_ERROR; */

2912:
2913: If l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR Then
2914: Raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2915: /* Elsif l_return_status = OKC_API.G_RET_STS_ERROR Then
2916: Raise OKC_API.G_EXCEPTION_ERROR; */
2917: End If;
2918: End If;
2919:
2920: END IF; -- ren_type not 'DNR'

Line 2921: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);

2917: End If;
2918: End If;
2919:
2920: END IF; -- ren_type not 'DNR'
2921: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
2922:
2923: IF (l_debug = 'Y') THEN
2924: okc_debug.log('10700: Leaving post_renewed_contract', 2);
2925: okc_debug.Reset_Indentation;

Line 2929: WHEN OKC_API.G_EXCEPTION_ERROR THEN

2925: okc_debug.Reset_Indentation;
2926: END IF;
2927:
2928: EXCEPTION
2929: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2930:
2931: IF (l_debug = 'Y') THEN
2932: okc_debug.log('10800: Exiting post_renewed_contract:OKC_API.G_EXCEPTION_ERROR Exception', 2);
2933: okc_debug.Reset_Indentation;

Line 2932: okc_debug.log('10800: Exiting post_renewed_contract:OKC_API.G_EXCEPTION_ERROR Exception', 2);

2928: EXCEPTION
2929: WHEN OKC_API.G_EXCEPTION_ERROR THEN
2930:
2931: IF (l_debug = 'Y') THEN
2932: okc_debug.log('10800: Exiting post_renewed_contract:OKC_API.G_EXCEPTION_ERROR Exception', 2);
2933: okc_debug.Reset_Indentation;
2934: END IF;
2935:
2936: x_return_status := OKC_API.HANDLE_EXCEPTIONS

Line 2936: x_return_status := OKC_API.HANDLE_EXCEPTIONS

2932: okc_debug.log('10800: Exiting post_renewed_contract:OKC_API.G_EXCEPTION_ERROR Exception', 2);
2933: okc_debug.Reset_Indentation;
2934: END IF;
2935:
2936: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2937: (l_api_name,
2938: G_PKG_NAME,
2939: 'OKC_API.G_RET_STS_ERROR',
2940: x_msg_count,

Line 2939: 'OKC_API.G_RET_STS_ERROR',

2935:
2936: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2937: (l_api_name,
2938: G_PKG_NAME,
2939: 'OKC_API.G_RET_STS_ERROR',
2940: x_msg_count,
2941: x_msg_data,
2942: '_PROCESS');
2943:

Line 2944: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN

2940: x_msg_count,
2941: x_msg_data,
2942: '_PROCESS');
2943:
2944: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2945:
2946: IF (l_debug = 'Y') THEN
2947: okc_debug.log('10900: Exiting post_renewed_contract:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
2948: okc_debug.Reset_Indentation;

Line 2947: okc_debug.log('10900: Exiting post_renewed_contract:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);

2943:
2944: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
2945:
2946: IF (l_debug = 'Y') THEN
2947: okc_debug.log('10900: Exiting post_renewed_contract:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
2948: okc_debug.Reset_Indentation;
2949: END IF;
2950:
2951: x_return_status := OKC_API.HANDLE_EXCEPTIONS

Line 2951: x_return_status := OKC_API.HANDLE_EXCEPTIONS

2947: okc_debug.log('10900: Exiting post_renewed_contract:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
2948: okc_debug.Reset_Indentation;
2949: END IF;
2950:
2951: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2952: (l_api_name,
2953: G_PKG_NAME,
2954: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2955: x_msg_count,

Line 2954: 'OKC_API.G_RET_STS_UNEXP_ERROR',

2950:
2951: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2952: (l_api_name,
2953: G_PKG_NAME,
2954: 'OKC_API.G_RET_STS_UNEXP_ERROR',
2955: x_msg_count,
2956: x_msg_data,
2957: '_PROCESS');
2958:

Line 2966: x_return_status := OKC_API.HANDLE_EXCEPTIONS

2962: okc_debug.log('11000: Exiting post_renewed_contract:OTHERS Exception', 2);
2963: okc_debug.Reset_Indentation;
2964: END IF;
2965:
2966: x_return_status := OKC_API.HANDLE_EXCEPTIONS
2967: (l_api_name,
2968: G_PKG_NAME,
2969: 'OTHERS',
2970: x_msg_count,

Line 2996: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;

2992: p_ren_type IN varchar2 ,
2993: p_renewal_called_from_ui IN VARCHAR2
2994: ) is
2995:
2996: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;
2997: l_renew_in_parameters_rec renew_in_parameters_rec := p_renew_in_parameters_rec;
2998: l_ren_type okc_rules_v.rule_information1%type;
2999: l_ultimate_end_date Date;
3000:

Line 3006: SELECT nvl(rul.rule_information1, OKC_API.G_MISS_CHAR) renew_type,

3002:
3003:
3004: -- Cursor modified for Bug 2292300
3005: CURSOR cur_rules(p_chr_id number) is
3006: SELECT nvl(rul.rule_information1, OKC_API.G_MISS_CHAR) renew_type,
3007: fnd_date.Canonical_To_Date(rul.rule_information3) ultimate_end_date
3008: --To_Date(rul.rule_information3, 'YYYY/MM/DD') ultimate_end_date
3009: FROM okc_rules_b rul,
3010: okc_rule_groups_b rgp

Line 3025: nvl(renewal_type_code,OKC_API.G_MISS_CHAR) renewal_type_code,

3021:
3022: -- /rules migration/
3023: Cursor cur_header is
3024: select authoring_org_id,inv_organization_id,application_id,
3025: nvl(renewal_type_code,OKC_API.G_MISS_CHAR) renewal_type_code,
3026: renewal_end_date
3027: from okc_k_headers_b
3028: where id = p_renew_in_parameters_rec.p_contract_id;
3029:

Line 3037: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;

3033: r_inv_org OKC_K_HEADERS_B.inv_organization_id%type;
3034:
3035: FUNCTION set_attributes(p_renew_in_rec IN OUT NOCOPY renew_in_parameters_rec) RETURN varchar2 is
3036:
3037: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;
3038: l_api_name Varchar2(30) := 'set_attributes';
3039: --
3040: Procedure Set_Evergreen_Date_Uom(p_return_status OUT NOCOPY Varchar2) Is
3041: l_return_status Varchar2(1) := OKC_API.G_RET_STS_SUCCESS;

Line 3041: l_return_status Varchar2(1) := OKC_API.G_RET_STS_SUCCESS;

3037: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;
3038: l_api_name Varchar2(30) := 'set_attributes';
3039: --
3040: Procedure Set_Evergreen_Date_Uom(p_return_status OUT NOCOPY Varchar2) Is
3041: l_return_status Varchar2(1) := OKC_API.G_RET_STS_SUCCESS;
3042: Begin
3043:
3044: IF (l_debug = 'Y') THEN
3045: okc_debug.Set_Indentation('OKC_RENEW_PVT');

Line 3060: OKC_API.set_message(p_app_name => g_app_name,

3056: --
3057: -- Make sure that contract has not already reached its ultimate
3058: -- end date
3059: If l_ultimate_end_date <= p_renew_in_rec.p_start_date Then
3060: OKC_API.set_message(p_app_name => g_app_name,
3061: p_msg_name => 'OKC_ULTIMATE_END_REACHED');
3062: p_return_status := okc_api.g_ret_sts_error;
3063: Else
3064: If l_ultimate_end_date < p_renew_in_rec.p_end_date Then

Line 3062: p_return_status := okc_api.g_ret_sts_error;

3058: -- end date
3059: If l_ultimate_end_date <= p_renew_in_rec.p_start_date Then
3060: OKC_API.set_message(p_app_name => g_app_name,
3061: p_msg_name => 'OKC_ULTIMATE_END_REACHED');
3062: p_return_status := okc_api.g_ret_sts_error;
3063: Else
3064: If l_ultimate_end_date < p_renew_in_rec.p_end_date Then
3065: p_renew_in_rec.p_end_date := l_ultimate_end_date;
3066: --

Line 3074: if l_return_status <> okc_api.g_ret_sts_success then

3070: p_renew_in_rec.p_end_date,
3071: p_renew_in_rec.p_duration,
3072: p_renew_in_rec.p_uom_code,
3073: l_return_status);
3074: if l_return_status <> okc_api.g_ret_sts_success then
3075: OKC_API.set_message(p_app_name => g_app_name,
3076: p_msg_name => 'OKC_GET_DURATION_ERROR');
3077: p_return_status := l_return_status;
3078: End If;

Line 3075: OKC_API.set_message(p_app_name => g_app_name,

3071: p_renew_in_rec.p_duration,
3072: p_renew_in_rec.p_uom_code,
3073: l_return_status);
3074: if l_return_status <> okc_api.g_ret_sts_success then
3075: OKC_API.set_message(p_app_name => g_app_name,
3076: p_msg_name => 'OKC_GET_DURATION_ERROR');
3077: p_return_status := l_return_status;
3078: End If;
3079: End If;

Line 3103: If p_renew_in_rec.p_perpetual_flag = OKC_API.G_FALSE OR

3099: p_renew_in_rec.p_start_date := p_renew_in_rec.p_orig_end_date + 1;
3100: End if;
3101:
3102: -- calculate new end date if not provided else calculate duration and uom code
3103: If p_renew_in_rec.p_perpetual_flag = OKC_API.G_FALSE OR
3104: p_renew_in_parameters_rec.p_perpetual_flag IS NULL Then
3105: If p_renew_in_rec.p_end_date is null then
3106: p_renew_in_rec.p_end_date := okc_time_util_pub.get_enddate
3107: (p_renew_in_rec.p_start_date,

Line 3116: If l_return_status <> okc_api.g_ret_sts_success then

3112: -- been supplied, make sure this is less than the contract end date
3113: -- otherwise use the ultimate end date as the contract end date
3114: --
3115: Set_Evergreen_Date_Uom(l_return_status);
3116: If l_return_status <> okc_api.g_ret_sts_success then
3117: return (l_return_status);
3118: End If;
3119: Else
3120: Set_Evergreen_Date_Uom(l_return_status);

Line 3121: If l_return_status <> okc_api.g_ret_sts_success then

3117: return (l_return_status);
3118: End If;
3119: Else
3120: Set_Evergreen_Date_Uom(l_return_status);
3121: If l_return_status <> okc_api.g_ret_sts_success then
3122: return (l_return_status);
3123: End If;
3124: If p_renew_in_rec.p_uom_code is null OR p_renew_in_rec.p_duration is null then
3125: okc_time_util_pub.get_duration(p_renew_in_rec.p_start_date,

Line 3131: if l_return_status <> okc_api.g_ret_sts_success then

3127: p_renew_in_rec.p_duration,
3128: p_renew_in_rec.p_uom_code,
3129: l_return_status);
3130:
3131: if l_return_status <> okc_api.g_ret_sts_success then
3132: OKC_API.set_message(p_app_name => g_app_name,
3133: p_msg_name => 'OKC_GET_DURATION_ERROR');
3134: return (l_return_status);
3135: End If;

Line 3132: OKC_API.set_message(p_app_name => g_app_name,

3128: p_renew_in_rec.p_uom_code,
3129: l_return_status);
3130:
3131: if l_return_status <> okc_api.g_ret_sts_success then
3132: OKC_API.set_message(p_app_name => g_app_name,
3133: p_msg_name => 'OKC_GET_DURATION_ERROR');
3134: return (l_return_status);
3135: End If;
3136: End If;

Line 3142: End If; -- end perpetual flag = OKC_API.G_FALSE

3138: Else -- if perpetual contract
3139: p_renew_in_rec.p_end_date := Null;
3140: p_renew_in_rec.p_duration := Null;
3141: p_renew_in_Rec.p_uom_code := Null;
3142: End If; -- end perpetual flag = OKC_API.G_FALSE
3143:
3144: IF (l_debug = 'Y') THEN
3145: okc_debug.log('11300: Leaving set_attributes', 2);
3146: okc_debug.Reset_Indentation;

Line 3160: OKC_API.set_message(p_app_name => g_app_name,

3156: okc_debug.log('11400: Exiting set_attributes:others Exception', 2);
3157: okc_debug.Reset_Indentation;
3158: END IF;
3159:
3160: OKC_API.set_message(p_app_name => g_app_name,
3161: p_msg_name => g_unexpected_error,
3162: p_token1 => g_sqlcode_token,
3163: p_token1_value => sqlcode,
3164: p_token2 => g_sqlerrm_token,

Line 3166: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

3162: p_token1 => g_sqlcode_token,
3163: p_token1_value => sqlcode,
3164: p_token2 => g_sqlerrm_token,
3165: p_token2_value => sqlerrm);
3166: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
3167:
3168: return (l_return_status);
3169: END Set_Attributes;
3170: BEGIN

Line 3177: x_return_status := OKC_API.G_RET_STS_SUCCESS;

3173: okc_debug.Set_Indentation('OKC_RENEW_PVT');
3174: okc_debug.log('11500: Entered Create_Renewed_Contract', 2);
3175: END IF;
3176:
3177: x_return_status := OKC_API.G_RET_STS_SUCCESS;
3178:
3179: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3180: p_init_msg_list,
3181: '_PROCESS',

Line 3179: l_return_status := OKC_API.START_ACTIVITY(l_api_name,

3175: END IF;
3176:
3177: x_return_status := OKC_API.G_RET_STS_SUCCESS;
3178:
3179: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3180: p_init_msg_list,
3181: '_PROCESS',
3182: x_return_status);
3183:

Line 3184: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN

3180: p_init_msg_list,
3181: '_PROCESS',
3182: x_return_status);
3183:
3184: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3185: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3186: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3187: raise OKC_API.G_EXCEPTION_ERROR;
3188: END IF;

Line 3185: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

3181: '_PROCESS',
3182: x_return_status);
3183:
3184: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3185: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3186: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3187: raise OKC_API.G_EXCEPTION_ERROR;
3188: END IF;
3189:

Line 3186: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN

3182: x_return_status);
3183:
3184: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3185: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3186: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3187: raise OKC_API.G_EXCEPTION_ERROR;
3188: END IF;
3189:
3190: -- get the renew type defined for the rule. If not passed in as parameter already

Line 3187: raise OKC_API.G_EXCEPTION_ERROR;

3183:
3184: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3185: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3186: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3187: raise OKC_API.G_EXCEPTION_ERROR;
3188: END IF;
3189:
3190: -- get the renew type defined for the rule. If not passed in as parameter already
3191: -- get it from the rules table

Line 3211: p_ren_type <> OKC_API.G_MISS_CHAR then

3207: End If;
3208: --
3209:
3210: IF p_ren_type Is Not Null And
3211: p_ren_type <> OKC_API.G_MISS_CHAR then
3212: l_ren_type := p_ren_type;
3213: END IF;
3214: IF (l_debug = 'Y') THEN
3215: okc_debug.log('11600: l_ren_type - ' || l_ren_type);

Line 3220: OKC_API.set_message(p_app_name => g_app_name,

3216: END IF;
3217:
3218: --Renew is not allowed when renew_type is DNR
3219: If l_ren_type = 'DNR' then
3220: OKC_API.set_message(p_app_name => g_app_name,
3221: p_msg_name => 'OKC_RENEW_NOT_ALLOWED');
3222: RAISE OKC_API.G_EXCEPTION_ERROR;
3223: END IF;
3224:

Line 3222: RAISE OKC_API.G_EXCEPTION_ERROR;

3218: --Renew is not allowed when renew_type is DNR
3219: If l_ren_type = 'DNR' then
3220: OKC_API.set_message(p_app_name => g_app_name,
3221: p_msg_name => 'OKC_RENEW_NOT_ALLOWED');
3222: RAISE OKC_API.G_EXCEPTION_ERROR;
3223: END IF;
3224:
3225: -- validate the contract to be renewed
3226: IF (l_debug = 'Y') THEN

Line 3241: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN

3237: okc_debug.log('11800: After validate');
3238: END IF;
3239:
3240:
3241: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3242: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3243: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3244: raise OKC_API.G_EXCEPTION_ERROR;
3245: END IF;

Line 3242: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

3238: END IF;
3239:
3240:
3241: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3242: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3243: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3244: raise OKC_API.G_EXCEPTION_ERROR;
3245: END IF;
3246:

Line 3243: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN

3239:
3240:
3241: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3242: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3243: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3244: raise OKC_API.G_EXCEPTION_ERROR;
3245: END IF;
3246:
3247: l_return_status := set_attributes(l_renew_in_parameters_rec);

Line 3244: raise OKC_API.G_EXCEPTION_ERROR;

3240:
3241: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3242: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3243: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3244: raise OKC_API.G_EXCEPTION_ERROR;
3245: END IF;
3246:
3247: l_return_status := set_attributes(l_renew_in_parameters_rec);
3248:

Line 3249: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

3245: END IF;
3246:
3247: l_return_status := set_attributes(l_renew_in_parameters_rec);
3248:
3249: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3250: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3251: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3252: RAISE OKC_API.G_EXCEPTION_ERROR;
3253: END IF;

Line 3250: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

3246:
3247: l_return_status := set_attributes(l_renew_in_parameters_rec);
3248:
3249: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3250: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3251: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3252: RAISE OKC_API.G_EXCEPTION_ERROR;
3253: END IF;
3254:

Line 3251: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

3247: l_return_status := set_attributes(l_renew_in_parameters_rec);
3248:
3249: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3250: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3251: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3252: RAISE OKC_API.G_EXCEPTION_ERROR;
3253: END IF;
3254:
3255: --/Rules migration/ use cur_header_rec

Line 3252: RAISE OKC_API.G_EXCEPTION_ERROR;

3248:
3249: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3250: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3251: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3252: RAISE OKC_API.G_EXCEPTION_ERROR;
3253: END IF;
3254:
3255: --/Rules migration/ use cur_header_rec
3256: /*open cur_org;

Line 3292: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

3288:
3289: IF l_return_status = 'W' then
3290: x_return_status := 'W';
3291: END IF;
3292: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3293: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3294: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3295: RAISE OKC_API.G_EXCEPTION_ERROR;
3296: END IF;

Line 3293: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

3289: IF l_return_status = 'W' then
3290: x_return_status := 'W';
3291: END IF;
3292: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3293: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3294: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3295: RAISE OKC_API.G_EXCEPTION_ERROR;
3296: END IF;
3297:

Line 3294: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

3290: x_return_status := 'W';
3291: END IF;
3292: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3293: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3294: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3295: RAISE OKC_API.G_EXCEPTION_ERROR;
3296: END IF;
3297:
3298: --update the start and end dates for the header and lines in the renew copy

Line 3295: RAISE OKC_API.G_EXCEPTION_ERROR;

3291: END IF;
3292: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3293: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3294: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3295: RAISE OKC_API.G_EXCEPTION_ERROR;
3296: END IF;
3297:
3298: --update the start and end dates for the header and lines in the renew copy
3299: IF (l_debug = 'Y') THEN

Line 3303: p_init_msg_list => OKC_API.G_FALSE,

3299: IF (l_debug = 'Y') THEN
3300: okc_debug.log('12100: Before update_renewal_dates');
3301: END IF;
3302: update_renewal_dates(p_api_version => 1,
3303: p_init_msg_list => OKC_API.G_FALSE,
3304: x_return_status => l_return_status,
3305: x_msg_count => x_msg_count,
3306: x_msg_data => x_msg_data,
3307: p_chr_id => x_contract_id,

Line 3317: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

3313: okc_debug.log('12200: After update_renewal_dates');
3314: END IF;
3315:
3316:
3317: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3318: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3319: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3320: RAISE OKC_API.G_EXCEPTION_ERROR;
3321: END IF;

Line 3318: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

3314: END IF;
3315:
3316:
3317: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3318: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3319: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3320: RAISE OKC_API.G_EXCEPTION_ERROR;
3321: END IF;
3322:

Line 3319: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

3315:
3316:
3317: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3318: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3319: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3320: RAISE OKC_API.G_EXCEPTION_ERROR;
3321: END IF;
3322:
3323:

Line 3320: RAISE OKC_API.G_EXCEPTION_ERROR;

3316:
3317: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3318: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3319: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3320: RAISE OKC_API.G_EXCEPTION_ERROR;
3321: END IF;
3322:
3323:
3324: --update date_active and date_inactive in the condition headers for the renew copy

Line 3330: p_init_msg_list => OKC_API.G_FALSE,

3326: IF (l_debug = 'Y') THEN
3327: okc_debug.log('123300: Before update_condition_headers');
3328: END IF;
3329: update_condition_headers (p_api_version => 1,
3330: p_init_msg_list => OKC_API.G_FALSE,
3331: x_return_status => l_return_status,
3332: x_msg_count => x_msg_count,
3333: x_msg_data => x_msg_data,
3334: p_chr_id => x_contract_id,

Line 3344: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

3340: IF (l_debug = 'Y') THEN
3341: okc_debug.log('12400: After update_condition_headers');
3342: END IF;
3343:
3344: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3345: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3346: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3347: RAISE OKC_API.G_EXCEPTION_ERROR;
3348: END IF;

Line 3345: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

3341: okc_debug.log('12400: After update_condition_headers');
3342: END IF;
3343:
3344: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3345: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3346: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3347: RAISE OKC_API.G_EXCEPTION_ERROR;
3348: END IF;
3349:

Line 3346: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

3342: END IF;
3343:
3344: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3345: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3346: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3347: RAISE OKC_API.G_EXCEPTION_ERROR;
3348: END IF;
3349:
3350: --update the old contract - update date_renewed and links to renew copy

Line 3347: RAISE OKC_API.G_EXCEPTION_ERROR;

3343:
3344: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3345: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3346: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3347: RAISE OKC_API.G_EXCEPTION_ERROR;
3348: END IF;
3349:
3350: --update the old contract - update date_renewed and links to renew copy
3351:

Line 3356: p_init_msg_list => OKC_API.G_FALSE,

3352: IF (l_debug = 'Y') THEN
3353: okc_debug.log('12500: Before update_old_contract');
3354: END IF;
3355: update_old_contract(p_api_version => 1,
3356: p_init_msg_list => OKC_API.G_FALSE,
3357: x_return_status => l_return_status,
3358: x_msg_count => x_msg_count,
3359: x_msg_data => x_msg_data,
3360: p_new_header => x_contract_id ,

Line 3367: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

3363: IF (l_debug = 'Y') THEN
3364: okc_debug.log('12600: After update_old_contract');
3365: END IF;
3366:
3367: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3368: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3369: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3370: RAISE OKC_API.G_EXCEPTION_ERROR;
3371: END IF;

Line 3368: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

3364: okc_debug.log('12600: After update_old_contract');
3365: END IF;
3366:
3367: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3368: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3369: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3370: RAISE OKC_API.G_EXCEPTION_ERROR;
3371: END IF;
3372:

Line 3369: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

3365: END IF;
3366:
3367: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3368: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3369: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3370: RAISE OKC_API.G_EXCEPTION_ERROR;
3371: END IF;
3372:
3373:

Line 3370: RAISE OKC_API.G_EXCEPTION_ERROR;

3366:
3367: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3368: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3369: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3370: RAISE OKC_API.G_EXCEPTION_ERROR;
3371: END IF;
3372:
3373:
3374: -- If this contract is being renewed from Quote, then update

Line 3382: p_renew_in_parameters_rec.p_context <> OKC_API.G_MISS_CHAR ) THEN

3378: -- quote information.
3379:
3380: IF ( p_renew_in_parameters_rec.p_context IS NOT NULL
3381: AND
3382: p_renew_in_parameters_rec.p_context <> OKC_API.G_MISS_CHAR ) THEN
3383: IF (l_debug = 'Y') THEN
3384: okc_debug.log('12700: Before create_k_from_q');
3385: END IF;
3386: okc_oc_int_qtk_pvt.create_k_from_q(x_return_status => l_return_status

Line 3394: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

3390:
3391: IF (l_debug = 'Y') THEN
3392: okc_debug.log('12800: After create_k_from_q');
3393: END IF;
3394: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3395: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3396: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3397: RAISE OKC_API.G_EXCEPTION_ERROR;
3398: END IF;

Line 3395: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

3391: IF (l_debug = 'Y') THEN
3392: okc_debug.log('12800: After create_k_from_q');
3393: END IF;
3394: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3395: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3396: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3397: RAISE OKC_API.G_EXCEPTION_ERROR;
3398: END IF;
3399:

Line 3396: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

3392: okc_debug.log('12800: After create_k_from_q');
3393: END IF;
3394: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3395: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3396: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3397: RAISE OKC_API.G_EXCEPTION_ERROR;
3398: END IF;
3399:
3400: END IF;

Line 3397: RAISE OKC_API.G_EXCEPTION_ERROR;

3393: END IF;
3394: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3395: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3396: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3397: RAISE OKC_API.G_EXCEPTION_ERROR;
3398: END IF;
3399:
3400: END IF;
3401: x_renew_in_parameters_rec:=l_renew_in_parameters_rec;

Line 3405: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);

3401: x_renew_in_parameters_rec:=l_renew_in_parameters_rec;
3402: g_cached_chr_id := x_contract_id;
3403: --san comment remove later from here
3404:
3405: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3406: --dbms_output.put_line('renew(-)');
3407:
3408: IF (l_debug = 'Y') THEN
3409: okc_debug.log('12900: Leaving Create_Renewed_Contract', 2);

Line 3415: WHEN OKC_API.G_EXCEPTION_ERROR THEN

3411: END IF;
3412:
3413: EXCEPTION
3414:
3415: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3416:
3417: IF (l_debug = 'Y') THEN
3418: okc_debug.log('13000: Exiting Create_Renewed_Contract:OKC_API.G_EXCEPTION_ERROR Exception', 2);
3419: okc_debug.Reset_Indentation;

Line 3418: okc_debug.log('13000: Exiting Create_Renewed_Contract:OKC_API.G_EXCEPTION_ERROR Exception', 2);

3414:
3415: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3416:
3417: IF (l_debug = 'Y') THEN
3418: okc_debug.log('13000: Exiting Create_Renewed_Contract:OKC_API.G_EXCEPTION_ERROR Exception', 2);
3419: okc_debug.Reset_Indentation;
3420: END IF;
3421:
3422: x_return_status := OKC_API.HANDLE_EXCEPTIONS

Line 3422: x_return_status := OKC_API.HANDLE_EXCEPTIONS

3418: okc_debug.log('13000: Exiting Create_Renewed_Contract:OKC_API.G_EXCEPTION_ERROR Exception', 2);
3419: okc_debug.Reset_Indentation;
3420: END IF;
3421:
3422: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3423: (l_api_name,
3424: G_PKG_NAME,
3425: 'OKC_API.G_RET_STS_ERROR',
3426: x_msg_count,

Line 3425: 'OKC_API.G_RET_STS_ERROR',

3421:
3422: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3423: (l_api_name,
3424: G_PKG_NAME,
3425: 'OKC_API.G_RET_STS_ERROR',
3426: x_msg_count,
3427: x_msg_data,
3428: '_PROCESS');
3429:

Line 3430: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN

3426: x_msg_count,
3427: x_msg_data,
3428: '_PROCESS');
3429:
3430: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3431:
3432: IF (l_debug = 'Y') THEN
3433: okc_debug.log('13100: Exiting Create_Renewed_Contract:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
3434: okc_debug.Reset_Indentation;

Line 3433: okc_debug.log('13100: Exiting Create_Renewed_Contract:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);

3429:
3430: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3431:
3432: IF (l_debug = 'Y') THEN
3433: okc_debug.log('13100: Exiting Create_Renewed_Contract:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
3434: okc_debug.Reset_Indentation;
3435: END IF;
3436:
3437: x_return_status := OKC_API.HANDLE_EXCEPTIONS

Line 3437: x_return_status := OKC_API.HANDLE_EXCEPTIONS

3433: okc_debug.log('13100: Exiting Create_Renewed_Contract:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
3434: okc_debug.Reset_Indentation;
3435: END IF;
3436:
3437: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3438: (l_api_name,
3439: G_PKG_NAME,
3440: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3441: x_msg_count,

Line 3440: 'OKC_API.G_RET_STS_UNEXP_ERROR',

3436:
3437: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3438: (l_api_name,
3439: G_PKG_NAME,
3440: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3441: x_msg_count,
3442: x_msg_data,
3443: '_PROCESS');
3444:

Line 3452: OKC_API.set_message(p_app_name => g_app_name,

3448: okc_debug.log('13200: Exiting Create_Renewed_Contract:OTHERS Exception', 2);
3449: okc_debug.Reset_Indentation;
3450: END IF;
3451:
3452: OKC_API.set_message(p_app_name => g_app_name,
3453: p_msg_name => g_unexpected_error,
3454: p_token1 => g_sqlcode_token,
3455: p_token1_value => sqlcode,
3456: p_token2 => g_sqlerrm_token,

Line 3458: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

3454: p_token1 => g_sqlcode_token,
3455: p_token1_value => sqlcode,
3456: p_token2 => g_sqlerrm_token,
3457: p_token2_value => sqlerrm);
3458: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
3459:
3460: END Create_Renewed_Contract;
3461:
3462: ------------------------------------------------------------------------------

Line 3487: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;

3483: l_date_count NUMBER;
3484: l_top_date_count NUMBER;
3485: l_no_lines_count NUMBER;
3486: Contract_Not_Found EXCEPTION;
3487: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;
3488: l_api_name constant VARCHAR2(30) := 'Update_Parents_Date_Renewed';
3489:
3490: -- To get the distinct cle_id_ascendant for that particular level
3491: CURSOR ancestry_cle_id( l_level NUMBER) IS

Line 3502: x_return_status := OKC_API.G_RET_STS_SUCCESS;

3498: okc_debug.Set_Indentation('OKC_RENEW_PVT');
3499: okc_debug.log('13300: Entered Update_Parents_Date_Renewed', 2);
3500: END IF;
3501:
3502: x_return_status := OKC_API.G_RET_STS_SUCCESS;
3503:
3504: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3505: p_init_msg_list,
3506: '_PROCESS',

Line 3504: l_return_status := OKC_API.START_ACTIVITY(l_api_name,

3500: END IF;
3501:
3502: x_return_status := OKC_API.G_RET_STS_SUCCESS;
3503:
3504: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3505: p_init_msg_list,
3506: '_PROCESS',
3507: x_return_status);
3508:

Line 3509: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN

3505: p_init_msg_list,
3506: '_PROCESS',
3507: x_return_status);
3508:
3509: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3510: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3511: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3512: raise OKC_API.G_EXCEPTION_ERROR;
3513: END IF;

Line 3510: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

3506: '_PROCESS',
3507: x_return_status);
3508:
3509: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3510: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3511: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3512: raise OKC_API.G_EXCEPTION_ERROR;
3513: END IF;
3514: -- Raising an exception when the contract header id is invalid

Line 3511: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN

3507: x_return_status);
3508:
3509: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3510: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3511: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3512: raise OKC_API.G_EXCEPTION_ERROR;
3513: END IF;
3514: -- Raising an exception when the contract header id is invalid
3515: select count(*) into l_invalid_chr_id

Line 3512: raise OKC_API.G_EXCEPTION_ERROR;

3508:
3509: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3510: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3511: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3512: raise OKC_API.G_EXCEPTION_ERROR;
3513: END IF;
3514: -- Raising an exception when the contract header id is invalid
3515: select count(*) into l_invalid_chr_id
3516: from okc_k_headers_b

Line 3612: WHEN OKC_API.G_EXCEPTION_ERROR THEN

3608: okc_debug.log('13500: Leaving Update_Parents_Date_Renewed', 2);
3609: okc_debug.Reset_Indentation;
3610: END IF;
3611: EXCEPTION
3612: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3613:
3614: IF (l_debug = 'Y') THEN
3615: okc_debug.log('13600: Exiting Update_Parents_Date_Renewed:OKC_API.G_EXCEPTION_ERROR Exception', 2);
3616: okc_debug.Reset_Indentation;

Line 3615: okc_debug.log('13600: Exiting Update_Parents_Date_Renewed:OKC_API.G_EXCEPTION_ERROR Exception', 2);

3611: EXCEPTION
3612: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3613:
3614: IF (l_debug = 'Y') THEN
3615: okc_debug.log('13600: Exiting Update_Parents_Date_Renewed:OKC_API.G_EXCEPTION_ERROR Exception', 2);
3616: okc_debug.Reset_Indentation;
3617: END IF;
3618:
3619: x_return_status := OKC_API.HANDLE_EXCEPTIONS

Line 3619: x_return_status := OKC_API.HANDLE_EXCEPTIONS

3615: okc_debug.log('13600: Exiting Update_Parents_Date_Renewed:OKC_API.G_EXCEPTION_ERROR Exception', 2);
3616: okc_debug.Reset_Indentation;
3617: END IF;
3618:
3619: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3620: (l_api_name,
3621: G_PKG_NAME,
3622: 'OKC_API.G_RET_STS_ERROR',
3623: x_msg_count,

Line 3622: 'OKC_API.G_RET_STS_ERROR',

3618:
3619: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3620: (l_api_name,
3621: G_PKG_NAME,
3622: 'OKC_API.G_RET_STS_ERROR',
3623: x_msg_count,
3624: x_msg_data,
3625: '_PROCESS');
3626:

Line 3627: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN

3623: x_msg_count,
3624: x_msg_data,
3625: '_PROCESS');
3626:
3627: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3628:
3629: IF (l_debug = 'Y') THEN
3630: okc_debug.log('13700: Exiting Update_Parents_Date_Renewed:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
3631: okc_debug.Reset_Indentation;

Line 3630: okc_debug.log('13700: Exiting Update_Parents_Date_Renewed:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);

3626:
3627: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3628:
3629: IF (l_debug = 'Y') THEN
3630: okc_debug.log('13700: Exiting Update_Parents_Date_Renewed:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
3631: okc_debug.Reset_Indentation;
3632: END IF;
3633:
3634: x_return_status := OKC_API.HANDLE_EXCEPTIONS

Line 3634: x_return_status := OKC_API.HANDLE_EXCEPTIONS

3630: okc_debug.log('13700: Exiting Update_Parents_Date_Renewed:OKC_API.G_EXCEPTION_UNEXPECTED_ERROR Exception', 2);
3631: okc_debug.Reset_Indentation;
3632: END IF;
3633:
3634: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3635: (l_api_name,
3636: G_PKG_NAME,
3637: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3638: x_msg_count,

Line 3637: 'OKC_API.G_RET_STS_UNEXP_ERROR',

3633:
3634: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3635: (l_api_name,
3636: G_PKG_NAME,
3637: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3638: x_msg_count,
3639: x_msg_data,
3640: '_PROCESS');
3641:

Line 3649: x_return_status := OKC_API.G_RET_STS_ERROR;

3645: okc_debug.log('13800: Exiting Update_Parents_Date_Renewed:Contract_Not_Found Exception', 2);
3646: okc_debug.Reset_Indentation;
3647: END IF;
3648:
3649: x_return_status := OKC_API.G_RET_STS_ERROR;
3650: OKC_API.set_message(G_APP_NAME, 'OKC_CONTRACT_NOT_FOUND');
3651:
3652: WHEN OTHERS THEN
3653:

Line 3650: OKC_API.set_message(G_APP_NAME, 'OKC_CONTRACT_NOT_FOUND');

3646: okc_debug.Reset_Indentation;
3647: END IF;
3648:
3649: x_return_status := OKC_API.G_RET_STS_ERROR;
3650: OKC_API.set_message(G_APP_NAME, 'OKC_CONTRACT_NOT_FOUND');
3651:
3652: WHEN OTHERS THEN
3653:
3654: IF (l_debug = 'Y') THEN

Line 3659: x_return_status := OKC_API.HANDLE_EXCEPTIONS

3655: okc_debug.log('13900: Exiting Update_Parents_Date_Renewed:OTHERS Exception', 2);
3656: okc_debug.Reset_Indentation;
3657: END IF;
3658:
3659: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3660: (l_api_name,
3661: G_PKG_NAME,
3662: 'OTHERS',
3663: x_msg_count,

Line 3696: l_id number:=OKC_API.G_MISS_NUM;

3692: FROM okc_k_headers_b k,okc_statuses_b s
3693: where k.id=p_chr_id and k.sts_code=s.code;
3694:
3695: k_ren_rec cur_ren%rowtype;
3696: l_id number:=OKC_API.G_MISS_NUM;
3697: l_process_flag varchar2(1):=OKC_API.G_MISS_CHAR;
3698: l_k varchar2(250):=' ';
3699: l_already_renewed varchar2(1) := OKC_API.G_FALSE;
3700:

Line 3697: l_process_flag varchar2(1):=OKC_API.G_MISS_CHAR;

3693: where k.id=p_chr_id and k.sts_code=s.code;
3694:
3695: k_ren_rec cur_ren%rowtype;
3696: l_id number:=OKC_API.G_MISS_NUM;
3697: l_process_flag varchar2(1):=OKC_API.G_MISS_CHAR;
3698: l_k varchar2(250):=' ';
3699: l_already_renewed varchar2(1) := OKC_API.G_FALSE;
3700:
3701: BEGIN

Line 3699: l_already_renewed varchar2(1) := OKC_API.G_FALSE;

3695: k_ren_rec cur_ren%rowtype;
3696: l_id number:=OKC_API.G_MISS_NUM;
3697: l_process_flag varchar2(1):=OKC_API.G_MISS_CHAR;
3698: l_k varchar2(250):=' ';
3699: l_already_renewed varchar2(1) := OKC_API.G_FALSE;
3700:
3701: BEGIN
3702: x_msg_name := 'O'; -- Bug 3386577 Assigning some intial value
3703: open cur_opn(p_chr_id);

Line 3707: RETURN OKC_API.G_TRUE;

3703: open cur_opn(p_chr_id);
3704: fetch cur_opn into l_id,l_process_flag;
3705: IF cur_opn%NOTFOUND THEN
3706: close cur_opn;
3707: RETURN OKC_API.G_TRUE;
3708: END IF;
3709: close cur_opn;
3710:
3711: -- Bug 3560988 If the renewal is called from event

Line 3717: l_already_renewed := OKC_API.G_TRUE;

3713: If p_renewal_called_from_ui = 'N' then
3714: For k_cur_opn_rec in cur_opn(p_chr_id)
3715: Loop
3716: if k_cur_opn_rec.process_flag = 'P' then
3717: l_already_renewed := OKC_API.G_TRUE;
3718: l_id := k_cur_opn_rec.subject_chr_id;
3719: exit;
3720: End if;
3721: End Loop;

Line 3727: if l_process_flag = 'A' and l_already_renewed <> OKC_API.G_TRUE then

3723:
3724:
3725: /* Bugfix 2952330, if Process_Flag is 'A'(OKS requirement), the renewal continues */
3726: -- Bug 3560988 Added l_already_renewed to the If clause condition
3727: if l_process_flag = 'A' and l_already_renewed <> OKC_API.G_TRUE then
3728: RETURN OKC_API.G_TRUE;
3729: end if;
3730: /* End bugfix 2952330 */
3731:

Line 3728: RETURN OKC_API.G_TRUE;

3724:
3725: /* Bugfix 2952330, if Process_Flag is 'A'(OKS requirement), the renewal continues */
3726: -- Bug 3560988 Added l_already_renewed to the If clause condition
3727: if l_process_flag = 'A' and l_already_renewed <> OKC_API.G_TRUE then
3728: RETURN OKC_API.G_TRUE;
3729: end if;
3730: /* End bugfix 2952330 */
3731:
3732: If l_id <> OKC_API.G_MISS_NUM then

Line 3732: If l_id <> OKC_API.G_MISS_NUM then

3728: RETURN OKC_API.G_TRUE;
3729: end if;
3730: /* End bugfix 2952330 */
3731:
3732: If l_id <> OKC_API.G_MISS_NUM then
3733: open cur_ren(l_id);
3734: --san rencol
3735: --open cur_ren(k_header_rec.chr_id_renewed_to);
3736: fetch cur_ren into k_ren_rec;

Line 3738: OKC_API.set_message( p_app_name => g_app_name,

3734: --san rencol
3735: --open cur_ren(k_header_rec.chr_id_renewed_to);
3736: fetch cur_ren into k_ren_rec;
3737: If cur_ren%NOTFOUND then
3738: OKC_API.set_message( p_app_name => g_app_name,
3739: p_msg_name =>'OKC_RENEWED_CONTRACT',
3740: p_token1 => 'NUMBER',
3741: p_token1_value => p_contract_number );
3742:

Line 3752: OKC_API.set_message( p_app_name => g_app_name,

3748: IF k_ren_rec.contract_number_modifier is not null then
3749: l_k := l_k ||' '|| k_ren_rec.contract_number_modifier;
3750: END IF;
3751: If k_ren_rec.ste_code = 'ENTERED' then
3752: OKC_API.set_message( p_app_name => g_app_name,
3753: p_msg_name =>'OKC_RENCOPY_ENTERED',
3754: p_token1 => 'NUMBER',
3755: p_token1_value => p_contract_number,
3756: p_token2 =>'RENCOPY',

Line 3764: OKC_API.set_message( p_app_name => g_app_name,

3760: message in the log file when the Renew is run from SRS and the
3761: contract has already been renewed more than once. Before this code,
3762: OKC_SHOULD_NOT_COME was being displayed which was not correct */
3763: ELSIF k_ren_rec.ste_code = 'CANCELLED' then
3764: OKC_API.set_message( p_app_name => g_app_name,
3765: p_msg_name =>'OKC_ALREADY_NOT_RENEWED');
3766: x_msg_name := 'C'; -- Cancelled --Bug 3386577
3767: ELSIF k_ren_rec.ste_code not in ('ENTERED','CANCELLED') then
3768: OKC_API.set_message( p_app_name => g_app_name,

Line 3768: OKC_API.set_message( p_app_name => g_app_name,

3764: OKC_API.set_message( p_app_name => g_app_name,
3765: p_msg_name =>'OKC_ALREADY_NOT_RENEWED');
3766: x_msg_name := 'C'; -- Cancelled --Bug 3386577
3767: ELSIF k_ren_rec.ste_code not in ('ENTERED','CANCELLED') then
3768: OKC_API.set_message( p_app_name => g_app_name,
3769: p_msg_name =>'OKC_RENCOPY_APPROVE',
3770: p_token1 => 'NUMBER',
3771: p_token1_value => p_contract_number,
3772: p_token2 =>'RENCOPY',

Line 3775: OKC_API.set_message( p_app_name => g_app_name,

3771: p_token1_value => p_contract_number,
3772: p_token2 =>'RENCOPY',
3773: p_token2_value => l_k );
3774: ELSE
3775: OKC_API.set_message( p_app_name => g_app_name,
3776: p_msg_name =>'OKC_SHOULD_NOT_COME');
3777: END IF; --ste_code
3778: ELSE
3779: OKC_API.set_message( p_app_name => g_app_name,

Line 3779: OKC_API.set_message( p_app_name => g_app_name,

3775: OKC_API.set_message( p_app_name => g_app_name,
3776: p_msg_name =>'OKC_SHOULD_NOT_COME');
3777: END IF; --ste_code
3778: ELSE
3779: OKC_API.set_message( p_app_name => g_app_name,
3780: p_msg_name =>'OKC_RENEWED_CONTRACT',
3781: p_token1 => 'XXXXXX',
3782: p_token1_value => p_contract_number );
3783:

Line 3786: RETURN OKC_API.G_FALSE;

3782: p_token1_value => p_contract_number );
3783:
3784: RAISE g_exception_halt_validation;
3785: END IF; --l_id
3786: RETURN OKC_API.G_FALSE;
3787:
3788: END is_already_not_renewed;
3789:
3790: END OKC_RENEW_PVT;