DBA Data[Home] [Help]

APPS.OKC_PRICE_PVT dependencies on OKC_API

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

137: --???? x_cle_list_price OUT NOCOPY NUMBER,
138: x_return_status OUT NOCOPY VARCHAR2,
139: x_msg_count OUT NOCOPY NUMBER,
140: x_msg_data OUT NOCOPY VARCHAR2) IS
141: l_return_status varchar2(1) :=OKC_API.G_RET_STS_SUCCESS;
142:
143: l_api_name constant VARCHAR2(30) := 'Update_line_PRICE';
144: l_cle_id_tbl num_tbl_type;
145: i pls_integer :=0;

Line 201: x_return_status := OKC_API.G_RET_STS_SUCCESS;

197: IF (l_debug = 'Y') THEN
198: my_debug('1000 : Entering Update_line_PRICE', 2);
199: END IF;
200:
201: x_return_status := OKC_API.G_RET_STS_SUCCESS;
202:
203: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
204: p_init_msg_list,
205: '_PROCESS',

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

199: END IF;
200:
201: x_return_status := OKC_API.G_RET_STS_SUCCESS;
202:
203: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
204: p_init_msg_list,
205: '_PROCESS',
206: x_return_status);
207: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN

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

203: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
204: p_init_msg_list,
205: '_PROCESS',
206: x_return_status);
207: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
208: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
209: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
210: raise OKC_API.G_EXCEPTION_ERROR;
211: END IF;

Line 208: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

204: p_init_msg_list,
205: '_PROCESS',
206: x_return_status);
207: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
208: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
209: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
210: raise OKC_API.G_EXCEPTION_ERROR;
211: END IF;
212:

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

205: '_PROCESS',
206: x_return_status);
207: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
208: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
209: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
210: raise OKC_API.G_EXCEPTION_ERROR;
211: END IF;
212:
213: Set_control_rec(px_control_rec);

Line 210: raise OKC_API.G_EXCEPTION_ERROR;

206: x_return_status);
207: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
208: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
209: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
210: raise OKC_API.G_EXCEPTION_ERROR;
211: END IF;
212:
213: Set_control_rec(px_control_rec);
214: if px_control_rec.p_calc_flag = 'S' then

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

211: END IF;
212:
213: Set_control_rec(px_control_rec);
214: if px_control_rec.p_calc_flag = 'S' then
215: OKC_API.set_message(p_app_name => g_app_name,
216: p_msg_name => 'OKC_INVALID_CALC_FLAG',
217: p_token1 => 'calc_flag',
218: p_token1_value => 'S');
219:

Line 220: RAISE OKC_API.G_EXCEPTION_ERROR;

216: p_msg_name => 'OKC_INVALID_CALC_FLAG',
217: p_token1 => 'calc_flag',
218: p_token1_value => 'S');
219:
220: RAISE OKC_API.G_EXCEPTION_ERROR;
221: End if;
222: px_control_rec.p_level:= 'L';
223: --get all the lines below the sent in p_cle_id
224: select level,cle_id,id,object_version_number,price_level_ind,price_basis_yn

Line 302: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

298: IF (l_debug = 'Y') THEN
299: my_debug('1080 : After call to Calculate price return status'||x_return_status, 1);
300: END IF;
301:
302: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
303: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
304: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
305: RAISE OKC_API.G_EXCEPTION_ERROR;
306: -- here not raising an exception but just returning error status as

Line 303: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

299: my_debug('1080 : After call to Calculate price return status'||x_return_status, 1);
300: END IF;
301:
302: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
303: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
304: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
305: RAISE OKC_API.G_EXCEPTION_ERROR;
306: -- here not raising an exception but just returning error status as
307: -- we donot want to rollback If one line failed to price

Line 304: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN

300: END IF;
301:
302: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
303: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
304: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
305: RAISE OKC_API.G_EXCEPTION_ERROR;
306: -- here not raising an exception but just returning error status as
307: -- we donot want to rollback If one line failed to price
308: ELSIF x_return_status = G_SOME_LINE_ERRORED THEN

Line 305: RAISE OKC_API.G_EXCEPTION_ERROR;

301:
302: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
303: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
304: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
305: RAISE OKC_API.G_EXCEPTION_ERROR;
306: -- here not raising an exception but just returning error status as
307: -- we donot want to rollback If one line failed to price
308: ELSIF x_return_status = G_SOME_LINE_ERRORED THEN
309: x_return_status := OKC_API.G_RET_STS_ERROR;

Line 309: x_return_status := OKC_API.G_RET_STS_ERROR;

305: RAISE OKC_API.G_EXCEPTION_ERROR;
306: -- here not raising an exception but just returning error status as
307: -- we donot want to rollback If one line failed to price
308: ELSIF x_return_status = G_SOME_LINE_ERRORED THEN
309: x_return_status := OKC_API.G_RET_STS_ERROR;
310: END IF;
311: -- go on even if error
312: -- do rollups
313: IF (l_debug = 'Y') THEN

Line 353: If l_cle_tbl(l_ind).line_list_price = OKC_API.G_MISS_NUM then

349: my_debug('1162 : loop for line id:'||l_cle_tbl(l_ind).id, 1);
350: END IF;
351:
352: l_cle_tbl(l_ind).object_version_number :=l_obj_tbl(l_ind);
353: If l_cle_tbl(l_ind).line_list_price = OKC_API.G_MISS_NUM then
354: l_cle_tbl(l_ind).line_list_price := null;
355: End if;
356: If l_cle_tbl(l_ind).price_negotiated = OKC_API.G_MISS_NUM then
357: l_cle_tbl(l_ind).price_negotiated := null;

Line 356: If l_cle_tbl(l_ind).price_negotiated = OKC_API.G_MISS_NUM then

352: l_cle_tbl(l_ind).object_version_number :=l_obj_tbl(l_ind);
353: If l_cle_tbl(l_ind).line_list_price = OKC_API.G_MISS_NUM then
354: l_cle_tbl(l_ind).line_list_price := null;
355: End if;
356: If l_cle_tbl(l_ind).price_negotiated = OKC_API.G_MISS_NUM then
357: l_cle_tbl(l_ind).price_negotiated := null;
358: End if;
359:
360: -- If the priced line had some negotiated amount over it

Line 379: and x_cle_price_tbl(i).PRICELIST_ID<> OKC_API.G_MISS_NUM then

375: END IF;
376:
377: If l_id_tbl(l_ind) = x_cle_price_tbl(i).id then -- that means priced line #3
378: If x_cle_price_tbl(i).PRICELIST_ID is not null
379: and x_cle_price_tbl(i).PRICELIST_ID<> OKC_API.G_MISS_NUM then
380: l_cle_tbl(l_ind).price_list_id :=x_cle_price_tbl(i).PRICELIST_ID;
381: l_cle_tbl(l_ind).pricing_date :=x_cle_price_tbl(i).pricing_date;
382: l_cle_tbl(l_ind).price_list_line_id :=x_cle_price_tbl(i).list_line_id;
383: IF (l_debug = 'Y') THEN

Line 528: p_init_msg_list => OKC_API.G_FALSE,

524: my_debug('1350 : Before calling update contract header', 1);
525: END IF;
526: okc_contract_pub.update_contract_header (
527: p_api_version => 1,
528: p_init_msg_list => OKC_API.G_FALSE,
529: x_return_status => l_return_status,
530: x_msg_count => x_msg_count,
531: x_msg_data => x_msg_data,
532: -- p_restricted_update => okc_api.g_true,

Line 532: -- p_restricted_update => okc_api.g_true,

528: p_init_msg_list => OKC_API.G_FALSE,
529: x_return_status => l_return_status,
530: x_msg_count => x_msg_count,
531: x_msg_data => x_msg_data,
532: -- p_restricted_update => okc_api.g_true,
533: p_chrv_rec => l_chr_rec,
534: x_chrv_rec => x_chr_rec);
535: IF (l_debug = 'Y') THEN
536: my_debug('1355 : after calling update contract header status :'||l_return_status, 1);

Line 539: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

535: IF (l_debug = 'Y') THEN
536: my_debug('1355 : after calling update contract header status :'||l_return_status, 1);
537: END IF;
538:
539: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
540: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
541: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
542: RAISE OKC_API.G_EXCEPTION_ERROR;
543: END IF;

Line 540: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

536: my_debug('1355 : after calling update contract header status :'||l_return_status, 1);
537: END IF;
538:
539: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
540: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
541: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
542: RAISE OKC_API.G_EXCEPTION_ERROR;
543: END IF;
544:

Line 541: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

537: END IF;
538:
539: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
540: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
541: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
542: RAISE OKC_API.G_EXCEPTION_ERROR;
543: END IF;
544:
545: Exception

Line 542: RAISE OKC_API.G_EXCEPTION_ERROR;

538:
539: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
540: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
541: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
542: RAISE OKC_API.G_EXCEPTION_ERROR;
543: END IF;
544:
545: Exception
546: When no_data_found then

Line 560: p_init_msg_list => OKC_API.G_FALSE,

556: END IF;
557:
558: okc_contract_pub.update_contract_line (
559: p_api_version => 1,
560: p_init_msg_list => OKC_API.G_FALSE,
561: x_return_status => l_return_status,
562: x_msg_count => x_msg_count,
563: x_msg_data => x_msg_data,
564: -- p_restricted_update => okc_api.g_true,

Line 564: -- p_restricted_update => okc_api.g_true,

560: p_init_msg_list => OKC_API.G_FALSE,
561: x_return_status => l_return_status,
562: x_msg_count => x_msg_count,
563: x_msg_data => x_msg_data,
564: -- p_restricted_update => okc_api.g_true,
565: p_clev_tbl => l_cle_tbl,
566: x_clev_tbl => x_cle_tbl);
567: IF (l_debug = 'Y') THEN
568: my_debug('1366 : after calling update contract line status :'||l_return_status, 1);

Line 571: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

567: IF (l_debug = 'Y') THEN
568: my_debug('1366 : after calling update contract line status :'||l_return_status, 1);
569: END IF;
570:
571: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
572: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
573: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
574: RAISE OKC_API.G_EXCEPTION_ERROR;
575: END IF;

Line 572: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

568: my_debug('1366 : after calling update contract line status :'||l_return_status, 1);
569: END IF;
570:
571: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
572: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
573: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
574: RAISE OKC_API.G_EXCEPTION_ERROR;
575: END IF;
576:

Line 573: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

569: END IF;
570:
571: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
572: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
573: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
574: RAISE OKC_API.G_EXCEPTION_ERROR;
575: END IF;
576:
577: -- update header level adjustments with the new adjusted value. Right now we

Line 574: RAISE OKC_API.G_EXCEPTION_ERROR;

570:
571: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
572: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
573: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
574: RAISE OKC_API.G_EXCEPTION_ERROR;
575: END IF;
576:
577: -- update header level adjustments with the new adjusted value. Right now we
578: -- just have % adjustments on header and that also in bucket 1 only

Line 628: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

624: my_debug('1379 : after calling update price adjustment '||l_return_status, 1);
625: END IF;
626: --since adjsuted value column is just fyi, we would not want to rollback just because it returned some
627: --error. only if it is unexpected error we rollback
628: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
629: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
630: END IF;
631: End If;-- l_pat_id_tbl.count>0
632: px_cle_amt := x_cle_amt;

Line 629: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

625: END IF;
626: --since adjsuted value column is just fyi, we would not want to rollback just because it returned some
627: --error. only if it is unexpected error we rollback
628: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
629: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
630: END IF;
631: End If;-- l_pat_id_tbl.count>0
632: px_cle_amt := x_cle_amt;
633: IF (l_debug = 'Y') THEN

Line 641: If p_commit = OKC_API.G_TRUE then

637: IF (l_debug = 'Y') THEN
638: my_debug('1380 : p_commit :'||p_commit, 1);
639: END IF;
640:
641: If p_commit = OKC_API.G_TRUE then
642: Commit work;
643: End If;
644: IF (l_debug = 'Y') THEN
645: my_debug('1390:--------------Priced line tbl returned from update line price---------------');

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

669: IF (l_debug = 'Y') THEN
670: my_debug(' 1510: Header Net price :'||px_chr_net_price ,1);
671: my_debug(' 1515: Header List price :'||px_chr_list_price ,1);
672: END IF;
673: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
674:
675: IF (l_debug = 'Y') THEN
676: my_debug('1600 : Exiting Update_line_PRICE', 2);
677: END IF;

Line 682: WHEN OKC_API.G_EXCEPTION_ERROR THEN

678: IF (l_debug = 'Y') THEN
679: okc_debug.Reset_Indentation;
680: END IF;
681: EXCEPTION
682: WHEN OKC_API.G_EXCEPTION_ERROR THEN
683: x_return_status := OKC_API.HANDLE_EXCEPTIONS
684: (l_api_name,
685: G_PKG_NAME,
686: 'OKC_API.G_RET_STS_ERROR',

Line 683: x_return_status := OKC_API.HANDLE_EXCEPTIONS

679: okc_debug.Reset_Indentation;
680: END IF;
681: EXCEPTION
682: WHEN OKC_API.G_EXCEPTION_ERROR THEN
683: x_return_status := OKC_API.HANDLE_EXCEPTIONS
684: (l_api_name,
685: G_PKG_NAME,
686: 'OKC_API.G_RET_STS_ERROR',
687: x_msg_count,

Line 686: 'OKC_API.G_RET_STS_ERROR',

682: WHEN OKC_API.G_EXCEPTION_ERROR THEN
683: x_return_status := OKC_API.HANDLE_EXCEPTIONS
684: (l_api_name,
685: G_PKG_NAME,
686: 'OKC_API.G_RET_STS_ERROR',
687: x_msg_count,
688: x_msg_data,
689: '_PROCESS');
690: IF (l_debug = 'Y') THEN

Line 697: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN

693: IF (l_debug = 'Y') THEN
694: okc_debug.Reset_Indentation;
695: END IF;
696:
697: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
698: x_return_status := OKC_API.HANDLE_EXCEPTIONS
699: (l_api_name,
700: G_PKG_NAME,
701: 'OKC_API.G_RET_STS_UNEXP_ERROR',

Line 698: x_return_status := OKC_API.HANDLE_EXCEPTIONS

694: okc_debug.Reset_Indentation;
695: END IF;
696:
697: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
698: x_return_status := OKC_API.HANDLE_EXCEPTIONS
699: (l_api_name,
700: G_PKG_NAME,
701: 'OKC_API.G_RET_STS_UNEXP_ERROR',
702: x_msg_count,

Line 701: 'OKC_API.G_RET_STS_UNEXP_ERROR',

697: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
698: x_return_status := OKC_API.HANDLE_EXCEPTIONS
699: (l_api_name,
700: G_PKG_NAME,
701: 'OKC_API.G_RET_STS_UNEXP_ERROR',
702: x_msg_count,
703: x_msg_data,
704: '_PROCESS');
705: IF (l_debug = 'Y') THEN

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

709: okc_debug.Reset_Indentation;
710: END IF;
711:
712: WHEN OTHERS THEN
713: OKC_API.set_message(p_app_name => g_app_name,
714: p_msg_name => g_unexpected_error,
715: p_token1 => g_sqlcode_token,
716: p_token1_value => sqlcode,
717: p_token2 => g_sqlerrm_token,

Line 719: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

715: p_token1 => g_sqlcode_token,
716: p_token1_value => sqlcode,
717: p_token2 => g_sqlerrm_token,
718: p_token2_value => sqlerrm);
719: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
720: IF (l_debug = 'Y') THEN
721: my_debug('1900 : Exiting Update_line_PRICE', 4);
722: END IF;
723: IF (l_debug = 'Y') THEN

Line 780: l_qty1 NUMBER := OKC_API.G_MISS_NUM;

776:
777:
778: l_return_status VARCHAR2(1);
779:
780: l_qty1 NUMBER := OKC_API.G_MISS_NUM;
781: l_qty2 NUMBER := OKC_API.G_MISS_NUM;
782: l_parent_cle_id OKC_K_LINES_B.ID%TYPE;
783: l_line_number OKC_K_LINES_B.LINE_NUMBER%TYPE := '0';
784: l_parent_line_number OKC_K_LINES_B.LINE_NUMBER%TYPE := '0';

Line 781: l_qty2 NUMBER := OKC_API.G_MISS_NUM;

777:
778: l_return_status VARCHAR2(1);
779:
780: l_qty1 NUMBER := OKC_API.G_MISS_NUM;
781: l_qty2 NUMBER := OKC_API.G_MISS_NUM;
782: l_parent_cle_id OKC_K_LINES_B.ID%TYPE;
783: l_line_number OKC_K_LINES_B.LINE_NUMBER%TYPE := '0';
784: l_parent_line_number OKC_K_LINES_B.LINE_NUMBER%TYPE := '0';
785: i PLS_INTEGER := 0;

Line 786: l_top_line_id NUMBER := OKC_API.G_MISS_NUM;

782: l_parent_cle_id OKC_K_LINES_B.ID%TYPE;
783: l_line_number OKC_K_LINES_B.LINE_NUMBER%TYPE := '0';
784: l_parent_line_number OKC_K_LINES_B.LINE_NUMBER%TYPE := '0';
785: i PLS_INTEGER := 0;
786: l_top_line_id NUMBER := OKC_API.G_MISS_NUM;
787:
788: BEGIN
789: x_return_status := okc_api.g_ret_sts_success;
790: IF (l_debug = 'Y') THEN

Line 789: x_return_status := okc_api.g_ret_sts_success;

785: i PLS_INTEGER := 0;
786: l_top_line_id NUMBER := OKC_API.G_MISS_NUM;
787:
788: BEGIN
789: x_return_status := okc_api.g_ret_sts_success;
790: IF (l_debug = 'Y') THEN
791: my_debug('Start : okc_price_pvt.validate_covered_line_qty ',3);
792: END IF;
793: /* Note: we already perform validation to ensure that the contract is for intent of sale and for OKC, OKO

Line 829: IF l_qty1 <> OKC_API.G_MISS_NUM AND l_qty2 <> OKC_API.G_MISS_NUM AND l_qty1 <> l_qty2 THEN

825: END IF;
826:
827:
828:
829: IF l_qty1 <> OKC_API.G_MISS_NUM AND l_qty2 <> OKC_API.G_MISS_NUM AND l_qty1 <> l_qty2 THEN
830: IF (l_debug = 'Y') THEN
831: my_debug('l_qty1 and l_qty2 are not the same so setting error message on stack...',5);
832: END IF;
833:

Line 875: OKC_API.set_message(p_app_name => G_APP_NAME,

871: i := p_l_id_tbl.next(i);
872: END LOOP;
873:
874:
875: OKC_API.set_message(p_app_name => G_APP_NAME,
876: p_msg_name => 'OKC_QA_MISMATCH_QTY',
877: p_token1 => 'LNUMB1',
878: p_token1_value => l_line_number,
879: p_token2 => 'LNUMB2',

Line 886: x_return_status := OKC_API.G_RET_STS_ERROR;

882: my_debug('Covered line number ' || l_line_number || 'and id: ' || p_cle_id || 'serviceable product have a quantity mismatch.',5);
883: my_debug('l_qty1: ' || l_qty1,5);
884: my_debug('l_qty2: ' || l_qty2,5);
885: END IF;
886: x_return_status := OKC_API.G_RET_STS_ERROR;
887:
888: END IF;
889:
890:

Line 891: If x_return_status <> OKC_API.G_RET_STS_ERROR then

887:
888: END IF;
889:
890:
891: If x_return_status <> OKC_API.G_RET_STS_ERROR then
892: IF (l_debug = 'Y') THEN
893: my_debug('passed okc_price_pvt.validate_covered_line_qty');
894: END IF;
895: End if;

Line 914: OKC_API.set_message(G_APP_NAME,

910: END IF;
911: IF c_get_quantity2%ISOPEN THEN
912: CLOSE c_get_quantity2;
913: END IF;
914: OKC_API.set_message(G_APP_NAME,
915: G_UNEXPECTED_ERROR,
916: G_SQLCODE_TOKEN,
917: SQLCODE,
918: G_SQLERRM_TOKEN,

Line 920: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

916: G_SQLCODE_TOKEN,
917: SQLCODE,
918: G_SQLERRM_TOKEN,
919: SQLERRM);
920: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
921: END;
922:
923: *****************************************************************************
924: *****************************************************************************/

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

945: x_chr_net_price OUT NOCOPY NUMBER,
946: x_return_status OUT NOCOPY VARCHAR2,
947: x_msg_count OUT NOCOPY NUMBER,
948: x_msg_data OUT NOCOPY VARCHAR2) IS
949: l_return_status varchar2(1) :=OKC_API.G_RET_STS_SUCCESS;
950:
951: l_api_name constant VARCHAR2(30) := 'Update_Contract_PRICE';
952: l_cle_id_tbl num_tbl_type;
953: i pls_integer :=0;

Line 996: x_return_status := OKC_API.G_RET_STS_SUCCESS;

992: IF (l_debug = 'Y') THEN
993: my_debug('2000 : Entering Update_CONTRACT_price', 2);
994: END IF;
995:
996: x_return_status := OKC_API.G_RET_STS_SUCCESS;
997:
998: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
999: p_init_msg_list,
1000: '_PROCESS',

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

994: END IF;
995:
996: x_return_status := OKC_API.G_RET_STS_SUCCESS;
997:
998: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
999: p_init_msg_list,
1000: '_PROCESS',
1001: x_return_status);
1002: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN

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

998: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
999: p_init_msg_list,
1000: '_PROCESS',
1001: x_return_status);
1002: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1003: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1004: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1005: raise OKC_API.G_EXCEPTION_ERROR;
1006: END IF;

Line 1003: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

999: p_init_msg_list,
1000: '_PROCESS',
1001: x_return_status);
1002: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1003: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1004: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1005: raise OKC_API.G_EXCEPTION_ERROR;
1006: END IF;
1007:

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

1000: '_PROCESS',
1001: x_return_status);
1002: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1003: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1004: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1005: raise OKC_API.G_EXCEPTION_ERROR;
1006: END IF;
1007:
1008: Set_control_rec(px_control_rec);

Line 1005: raise OKC_API.G_EXCEPTION_ERROR;

1001: x_return_status);
1002: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
1003: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1004: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
1005: raise OKC_API.G_EXCEPTION_ERROR;
1006: END IF;
1007:
1008: Set_control_rec(px_control_rec);
1009: if px_control_rec.p_calc_flag = 'S' then

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

1006: END IF;
1007:
1008: Set_control_rec(px_control_rec);
1009: if px_control_rec.p_calc_flag = 'S' then
1010: OKC_API.set_message(p_app_name => g_app_name,
1011: p_msg_name => 'OKC_INVALID_CALC_FLAG',
1012: p_token1 => 'calc_flag',
1013: p_token1_value => 'S');
1014:

Line 1015: RAISE OKC_API.G_EXCEPTION_ERROR;

1011: p_msg_name => 'OKC_INVALID_CALC_FLAG',
1012: p_token1 => 'calc_flag',
1013: p_token1_value => 'S');
1014:
1015: RAISE OKC_API.G_EXCEPTION_ERROR;
1016: End if;
1017:
1018:
1019: IF px_control_rec.p_level = 'QA' THEN

Line 1066: IF l_return_status = OKC_API.G_RET_STS_ERROR THEN

1062: p_l_line_number_tbl => l_line_number_tbl,
1063: x_return_status => l_return_status
1064: );
1065:
1066: IF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1067: --we want QA to eventually pick up the error messages on the stack
1068: l_qa_covered_line_qty_mismatch := TRUE;
1069: End If;
1070:

Line 1071: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

1067: --we want QA to eventually pick up the error messages on the stack
1068: l_qa_covered_line_qty_mismatch := TRUE;
1069: End If;
1070:
1071: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1072: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1073: End If;
1074: End If;
1075: ******************************************************************/

Line 1072: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

1068: l_qa_covered_line_qty_mismatch := TRUE;
1069: End If;
1070:
1071: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1072: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1073: End If;
1074: End If;
1075: ******************************************************************/
1076:

Line 1140: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

1136: IF (l_debug = 'Y') THEN
1137: my_debug('2130 : After call to Calculate price return status'||x_return_status, 1);
1138: END IF;
1139:
1140: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1141: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1142: --In case of header any error means total rollback
1143: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
1144: RAISE OKC_API.G_EXCEPTION_ERROR;

Line 1141: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

1137: my_debug('2130 : After call to Calculate price return status'||x_return_status, 1);
1138: END IF;
1139:
1140: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1141: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1142: --In case of header any error means total rollback
1143: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
1144: RAISE OKC_API.G_EXCEPTION_ERROR;
1145: END IF;

Line 1143: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN

1139:
1140: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1141: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1142: --In case of header any error means total rollback
1143: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
1144: RAISE OKC_API.G_EXCEPTION_ERROR;
1145: END IF;
1146: IF (l_debug = 'Y') THEN
1147: my_debug('2140 : After call to Calculate price Priced Count'||x_cle_price_tbl.count, 1);

Line 1144: RAISE OKC_API.G_EXCEPTION_ERROR;

1140: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1141: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1142: --In case of header any error means total rollback
1143: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
1144: RAISE OKC_API.G_EXCEPTION_ERROR;
1145: END IF;
1146: IF (l_debug = 'Y') THEN
1147: my_debug('2140 : After call to Calculate price Priced Count'||x_cle_price_tbl.count, 1);
1148: END IF;

Line 1211: If l_cle_tbl(l_ind).price_negotiated = OKC_API.G_MISS_NUM then

1207: my_debug('2290 : loop for line id:'||l_cle_tbl(l_ind).id, 1);
1208: END IF;
1209:
1210: l_cle_tbl(l_ind).object_version_number :=l_obj_tbl(l_ind);
1211: If l_cle_tbl(l_ind).price_negotiated = OKC_API.G_MISS_NUM then
1212: l_cle_tbl(l_ind).price_negotiated := null;
1213: End if;
1214: If l_cle_tbl(l_ind).line_list_price = OKC_API.G_MISS_NUM then
1215: l_cle_tbl(l_ind).line_list_price := null;

Line 1214: If l_cle_tbl(l_ind).line_list_price = OKC_API.G_MISS_NUM then

1210: l_cle_tbl(l_ind).object_version_number :=l_obj_tbl(l_ind);
1211: If l_cle_tbl(l_ind).price_negotiated = OKC_API.G_MISS_NUM then
1212: l_cle_tbl(l_ind).price_negotiated := null;
1213: End if;
1214: If l_cle_tbl(l_ind).line_list_price = OKC_API.G_MISS_NUM then
1215: l_cle_tbl(l_ind).line_list_price := null;
1216: End if;
1217: -- If the priced line had some negotiated amount over it
1218: IF x_cle_price_tbl(i).negotiated_amt is not null then

Line 1237: and x_cle_price_tbl(i).PRICELIST_ID<> OKC_API.G_MISS_NUM then

1233:
1234:
1235: If l_id_tbl(l_ind) = x_cle_price_tbl(i).id then -- that means priced line #3
1236: If x_cle_price_tbl(i).PRICELIST_ID is not null
1237: and x_cle_price_tbl(i).PRICELIST_ID<> OKC_API.G_MISS_NUM then
1238: l_cle_tbl(l_ind).price_list_id :=x_cle_price_tbl(i).PRICELIST_ID;
1239: l_cle_tbl(l_ind).pricing_date :=x_cle_price_tbl(i).pricing_date;
1240: l_cle_tbl(l_ind).price_list_line_id :=x_cle_price_tbl(i).list_line_id;
1241: IF (l_debug = 'Y') THEN

Line 1311: p_init_msg_list => OKC_API.G_FALSE,

1307: my_debug('2400 : Before calling update contract line', 1);
1308: END IF;
1309: okc_contract_pub.update_contract_line (
1310: p_api_version => 1,
1311: p_init_msg_list => OKC_API.G_FALSE,
1312: x_return_status => l_return_status,
1313: x_msg_count => x_msg_count,
1314: x_msg_data => x_msg_data,
1315: -- p_restricted_update => okc_api.g_true,

Line 1315: -- p_restricted_update => okc_api.g_true,

1311: p_init_msg_list => OKC_API.G_FALSE,
1312: x_return_status => l_return_status,
1313: x_msg_count => x_msg_count,
1314: x_msg_data => x_msg_data,
1315: -- p_restricted_update => okc_api.g_true,
1316: p_clev_tbl => l_cle_tbl,
1317: x_clev_tbl => x_cle_tbl);
1318: IF (l_debug = 'Y') THEN
1319: my_debug('2410 : after calling update contract line status :'||l_return_status, 1);

Line 1322: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

1318: IF (l_debug = 'Y') THEN
1319: my_debug('2410 : after calling update contract line status :'||l_return_status, 1);
1320: END IF;
1321:
1322: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1323: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1324: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1325: RAISE OKC_API.G_EXCEPTION_ERROR;
1326: END IF;

Line 1323: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

1319: my_debug('2410 : after calling update contract line status :'||l_return_status, 1);
1320: END IF;
1321:
1322: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1323: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1324: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1325: RAISE OKC_API.G_EXCEPTION_ERROR;
1326: END IF;
1327: IF (l_debug = 'Y') THEN

Line 1324: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

1320: END IF;
1321:
1322: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1323: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1324: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1325: RAISE OKC_API.G_EXCEPTION_ERROR;
1326: END IF;
1327: IF (l_debug = 'Y') THEN
1328: my_debug('2420 : Before calling update contract header', 1);

Line 1325: RAISE OKC_API.G_EXCEPTION_ERROR;

1321:
1322: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1323: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1324: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1325: RAISE OKC_API.G_EXCEPTION_ERROR;
1326: END IF;
1327: IF (l_debug = 'Y') THEN
1328: my_debug('2420 : Before calling update contract header', 1);
1329: END IF;

Line 1332: p_init_msg_list => OKC_API.G_FALSE,

1328: my_debug('2420 : Before calling update contract header', 1);
1329: END IF;
1330: okc_contract_pub.update_contract_header (
1331: p_api_version => 1,
1332: p_init_msg_list => OKC_API.G_FALSE,
1333: x_return_status => l_return_status,
1334: x_msg_count => x_msg_count,
1335: x_msg_data => x_msg_data,
1336: -- p_restricted_update => okc_api.g_true,

Line 1336: -- p_restricted_update => okc_api.g_true,

1332: p_init_msg_list => OKC_API.G_FALSE,
1333: x_return_status => l_return_status,
1334: x_msg_count => x_msg_count,
1335: x_msg_data => x_msg_data,
1336: -- p_restricted_update => okc_api.g_true,
1337: p_chrv_rec => l_chr_rec,
1338: x_chrv_rec => x_chr_rec);
1339: IF (l_debug = 'Y') THEN
1340: my_debug('2430 : after calling update contract header status :'||l_return_status, 1);

Line 1343: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

1339: IF (l_debug = 'Y') THEN
1340: my_debug('2430 : after calling update contract header status :'||l_return_status, 1);
1341: END IF;
1342:
1343: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1344: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1345: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1346: RAISE OKC_API.G_EXCEPTION_ERROR;
1347: END IF;

Line 1344: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

1340: my_debug('2430 : after calling update contract header status :'||l_return_status, 1);
1341: END IF;
1342:
1343: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1344: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1345: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1346: RAISE OKC_API.G_EXCEPTION_ERROR;
1347: END IF;
1348: End If; --p_level='H'

Line 1345: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

1341: END IF;
1342:
1343: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1344: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1345: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1346: RAISE OKC_API.G_EXCEPTION_ERROR;
1347: END IF;
1348: End If; --p_level='H'
1349: IF (l_debug = 'Y') THEN

Line 1346: RAISE OKC_API.G_EXCEPTION_ERROR;

1342:
1343: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
1344: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
1345: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
1346: RAISE OKC_API.G_EXCEPTION_ERROR;
1347: END IF;
1348: End If; --p_level='H'
1349: IF (l_debug = 'Y') THEN
1350: my_debug('2440 : p_commit :'||p_commit, 1);

Line 1352: If p_commit = OKC_API.G_TRUE then

1348: End If; --p_level='H'
1349: IF (l_debug = 'Y') THEN
1350: my_debug('2440 : p_commit :'||p_commit, 1);
1351: END IF;
1352: If p_commit = OKC_API.G_TRUE then
1353: Commit work;
1354: End If;
1355: IF (l_debug = 'Y') THEN
1356: my_debug('2450:--------------Priced line tbl returned from update contract price---------------');

Line 1387: x_return_status := OKC_API.G_RET_STS_ERROR;

1383:
1384: If px_control_rec.p_level = 'QA' AND l_qa_covered_line_qty_mismatch = TRUE Then
1385: /** this means that validate_covered_line_qty() has put some error messages on the
1386: error stack which we now want QA to display in the QA results
1387: x_return_status := OKC_API.G_RET_STS_ERROR;
1388: End If;
1389: ****************************************************************************/
1390:
1391:

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

1389: ****************************************************************************/
1390:
1391:
1392:
1393: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
1394:
1395: IF (l_debug = 'Y') THEN
1396: my_debug('2600 : Exiting Update_Contract_price', 2);
1397: END IF;

Line 1405: x_return_status := OKC_API.G_RET_STS_SUCCESS;

1401:
1402:
1403: EXCEPTION
1404: WHEN l_exception_stop then
1405: x_return_status := OKC_API.G_RET_STS_SUCCESS;
1406: IF (l_debug = 'Y') THEN
1407: my_debug('2690 : Exiting Update_Contract_price', 4);
1408: END IF;
1409: IF (l_debug = 'Y') THEN

Line 1413: WHEN OKC_API.G_EXCEPTION_ERROR THEN

1409: IF (l_debug = 'Y') THEN
1410: okc_debug.Reset_Indentation;
1411: END IF;
1412:
1413: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1414: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1415: (l_api_name,
1416: G_PKG_NAME,
1417: 'OKC_API.G_RET_STS_ERROR',

Line 1414: x_return_status := OKC_API.HANDLE_EXCEPTIONS

1410: okc_debug.Reset_Indentation;
1411: END IF;
1412:
1413: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1414: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1415: (l_api_name,
1416: G_PKG_NAME,
1417: 'OKC_API.G_RET_STS_ERROR',
1418: x_msg_count,

Line 1417: 'OKC_API.G_RET_STS_ERROR',

1413: WHEN OKC_API.G_EXCEPTION_ERROR THEN
1414: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1415: (l_api_name,
1416: G_PKG_NAME,
1417: 'OKC_API.G_RET_STS_ERROR',
1418: x_msg_count,
1419: x_msg_data,
1420: '_PROCESS');
1421: IF (l_debug = 'Y') THEN

Line 1428: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN

1424: IF (l_debug = 'Y') THEN
1425: okc_debug.Reset_Indentation;
1426: END IF;
1427:
1428: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1429: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1430: (l_api_name,
1431: G_PKG_NAME,
1432: 'OKC_API.G_RET_STS_UNEXP_ERROR',

Line 1429: x_return_status := OKC_API.HANDLE_EXCEPTIONS

1425: okc_debug.Reset_Indentation;
1426: END IF;
1427:
1428: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1429: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1430: (l_api_name,
1431: G_PKG_NAME,
1432: 'OKC_API.G_RET_STS_UNEXP_ERROR',
1433: x_msg_count,

Line 1432: 'OKC_API.G_RET_STS_UNEXP_ERROR',

1428: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
1429: x_return_status := OKC_API.HANDLE_EXCEPTIONS
1430: (l_api_name,
1431: G_PKG_NAME,
1432: 'OKC_API.G_RET_STS_UNEXP_ERROR',
1433: x_msg_count,
1434: x_msg_data,
1435: '_PROCESS');
1436: IF (l_debug = 'Y') THEN

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

1440: okc_debug.Reset_Indentation;
1441: END IF;
1442:
1443: WHEN OTHERS THEN
1444: OKC_API.set_message(p_app_name => g_app_name,
1445: p_msg_name => g_unexpected_error,
1446: p_token1 => g_sqlcode_token,
1447: p_token1_value => sqlcode,
1448: p_token2 => g_sqlerrm_token,

Line 1450: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

1446: p_token1 => g_sqlcode_token,
1447: p_token1_value => sqlcode,
1448: p_token2 => g_sqlerrm_token,
1449: p_token2_value => sqlerrm);
1450: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
1451: IF (l_debug = 'Y') THEN
1452: my_debug('2900 : Exiting Update_Contract_price', 4);
1453: END IF;
1454: IF (l_debug = 'Y') THEN

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

1678: ----------------------------------------------------------------------------
1679: FUNCTION Add_TO_GLOBAL_LSE_TBL (
1680: p_global_rec IN global_lse_rec_type)
1681: Return varchar2 IS
1682: l_return_status varchar2(1):=OKC_API.G_RET_STS_SUCCESS;
1683: i number :=0;
1684: l_already_there Exception;
1685: Begin
1686: IF (l_debug = 'Y') THEN

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

1729: END IF;
1730:
1731: return l_return_status;
1732: when others then
1733: OKC_API.set_message(p_app_name => g_app_name,
1734: p_msg_name => g_unexpected_error,
1735: p_token1 => g_sqlcode_token,
1736: p_token1_value => sqlcode,
1737: p_token2 => g_sqlerrm_token,

Line 1739: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

1735: p_token1 => g_sqlcode_token,
1736: p_token1_value => sqlcode,
1737: p_token2 => g_sqlerrm_token,
1738: p_token2_value => sqlerrm);
1739: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
1740: IF (l_debug = 'Y') THEN
1741: my_debug('4620 :Unexpected Error:'|| p_global_rec.current_source,1);
1742: my_debug('4630 :sql code:'||sqlcode,1);
1743: my_debug('4640 :msg:'||sqlerrm,1);

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

1764: FUNCTION Add_TO_GLOBAL_TBL (
1765: p_global_tbl IN OUT NOCOPY global_rprle_tbl_type,
1766: p_global_rec IN global_rprle_rec_type)
1767: Return varchar2 IS
1768: l_return_status varchar2(1):=OKC_API.G_RET_STS_SUCCESS;
1769: i number :=0;
1770: l_already_there Exception;
1771: Begin
1772: IF (l_debug = 'Y') THEN

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

1818: END IF;
1819:
1820: return l_return_status;
1821: when others then
1822: OKC_API.set_message(p_app_name => g_app_name,
1823: p_msg_name => g_unexpected_error,
1824: p_token1 => g_sqlcode_token,
1825: p_token1_value => sqlcode,
1826: p_token2 => g_sqlerrm_token,

Line 1828: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

1824: p_token1 => g_sqlcode_token,
1825: p_token1_value => sqlcode,
1826: p_token2 => g_sqlerrm_token,
1827: p_token2_value => sqlerrm);
1828: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
1829: IF (l_debug = 'Y') THEN
1830: my_debug('5050 :Unexpected Error:'|| p_global_rec.current_source,1);
1831: my_debug('5060 :sql code:'||sqlcode,1);
1832: my_debug('5070 :msg:'||sqlerrm,1);

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

1914: --rul.rule_information15
1915: from okc_rules_b rul, okc_rule_groups_b rgp
1916: where rul.rgp_id = rgp.id and rgp.dnz_chr_id = p_chr_id and rgp.cle_id=p_cle_id;*/
1917:
1918: l_return_status varchar2(1):=OKC_API.G_RET_STS_SUCCESS;
1919: l_rul_rec global_rprle_rec_type;
1920: l_rul_data l_rul_csr%rowtype;
1921: BEGIN
1922: IF (l_debug = 'Y') THEN

Line 1958: IF l_return_status <> OKC_API.G_RET_STS_SUCCESS THEN

1954: l_rul_rec.current_source:=l_rul_data.jtot_object1_code;
1955: l_rul_rec.code :=l_rul_data.rule_information_category;
1956: l_rul_rec.source_value := l_rul_data.object1_id1;
1957: l_return_status:= add_to_global_tbl(okc_price_pub.g_rul_tbl,l_rul_rec);
1958: IF l_return_status <> OKC_API.G_RET_STS_SUCCESS THEN
1959: RAISE l_exception_stop;
1960: END IF;
1961:
1962: End If;

Line 1968: IF l_return_status <> OKC_API.G_RET_STS_SUCCESS THEN

1964: l_rul_rec.current_source:=l_rul_data.jtot_object2_code;
1965: l_rul_rec.code :=l_rul_data.rule_information_category;
1966: l_rul_rec.source_value := l_rul_data.object2_id1;
1967: l_return_status:= add_to_global_tbl(okc_price_pub.g_rul_tbl,l_rul_rec);
1968: IF l_return_status <> OKC_API.G_RET_STS_SUCCESS THEN
1969: RAISE l_exception_stop;
1970: END IF;
1971: End If;
1972: If l_rul_data.object3_id1 is not null and l_rul_data.object3_id2 = '#' then

Line 1977: IF l_return_status <> OKC_API.G_RET_STS_SUCCESS THEN

1973: l_rul_rec.current_source:=l_rul_data.jtot_object3_code;
1974: l_rul_rec.code :=l_rul_data.rule_information_category;
1975: l_rul_rec.source_value := l_rul_data.object3_id1;
1976: l_return_status:= add_to_global_tbl(okc_price_pub.g_rul_tbl,l_rul_rec);
1977: IF l_return_status <> OKC_API.G_RET_STS_SUCCESS THEN
1978: RAISE l_exception_stop;
1979: END IF;
1980:
1981: End If;

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

2009: END IF;
2010:
2011: return l_return_status;
2012: when others then
2013: OKC_API.set_message(p_app_name => g_app_name,
2014: p_msg_name => g_unexpected_error,
2015: p_token1 => g_sqlcode_token,
2016: p_token1_value => sqlcode,
2017: p_token2 => g_sqlerrm_token,

Line 2024: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

2020: close l_rul_csr;
2021: ELSIf l_cle_rul_csr%ISOPEN then
2022: close l_cle_rul_csr;
2023: END IF;
2024: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
2025: IF (l_debug = 'Y') THEN
2026: my_debug('5900 : Exiting Attach_Rules', 4);
2027: END IF;
2028: IF (l_debug = 'Y') THEN

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

2050: select jtot_object1_code,object1_id1,object1_id2,rle_code
2051: from okc_k_party_roles_b
2052: where dnz_chr_id = p_chr_id and cle_id=p_cle_id;
2053: l_prle_data l_chr_csr%rowtype;
2054: l_return_status varchar2(1):=OKC_API.G_RET_STS_SUCCESS;
2055: l_prle_rec global_rprle_rec_type;
2056: BEGIN
2057: IF (l_debug = 'Y') THEN
2058: okc_debug.Set_Indentation('Attach_party_roles');

Line 2090: IF l_return_status <> OKC_API.G_RET_STS_SUCCESS THEN

2086: --??? doing above might become a problem when duplication checked in extra pricing attributes.
2087: -- ?????Use party precedence column to check which party role should be sent
2088: ---???? when same role multiple times on a contract.
2089: l_return_status:= add_to_global_tbl(okc_price_pub.g_prle_tbl,l_prle_rec);
2090: IF l_return_status <> OKC_API.G_RET_STS_SUCCESS THEN
2091: RAISE l_exception_stop;
2092: END IF;
2093: End If;
2094:

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

2122: END IF;
2123:
2124: return l_return_status;
2125: when others then
2126: OKC_API.set_message(p_app_name => g_app_name,
2127: p_msg_name => g_unexpected_error,
2128: p_token1 => g_sqlcode_token,
2129: p_token1_value => sqlcode,
2130: p_token2 => g_sqlerrm_token,

Line 2132: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

2128: p_token1 => g_sqlcode_token,
2129: p_token1_value => sqlcode,
2130: p_token2 => g_sqlerrm_token,
2131: p_token2_value => sqlerrm);
2132: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
2133: If l_chr_csr%isopen then
2134: close l_chr_csr;
2135: ELSIF l_cle_csr%isopen then
2136: close l_cle_csr;

Line 2687: x_return_status := OKC_API.G_RET_STS_SUCCESS;

2683: IF (l_debug = 'Y') THEN
2684: my_debug('8300 : Entering Load_User_Defined_Pattrs', 2);
2685: END IF;
2686:
2687: x_return_status := OKC_API.G_RET_STS_SUCCESS;
2688:
2689: If p_cle_id is null then
2690: open okc_pattr_cur(p_chr_id);
2691: Else

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

2916:
2917:
2918: EXCEPTION
2919: when others then
2920: OKC_API.set_message(p_app_name => g_app_name,
2921: p_msg_name => g_unexpected_error,
2922: p_token1 => g_sqlcode_token,
2923: p_token1_value => sqlcode,
2924: p_token2 => g_sqlerrm_token,

Line 2926: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

2922: p_token1 => g_sqlcode_token,
2923: p_token1_value => sqlcode,
2924: p_token2 => g_sqlerrm_token,
2925: p_token2_value => sqlerrm);
2926: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
2927: If okc_pattr_cur%isopen then
2928: close okc_pattr_cur;
2929: ELSIF okc_pattr_cle_cur%isopen then
2930: close okc_pattr_cle_cur;

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

2955: x_return_status OUT NOCOPY VARCHAR2,
2956: x_msg_count OUT NOCOPY NUMBER,
2957: x_msg_data OUT NOCOPY VARCHAR2) IS
2958:
2959: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;
2960: l_api_name constant VARCHAR2(30) := 'BUILD_CHR_CONTEXT';
2961: l_pricing_contexts_Tbl QP_Attr_Mapping_PUB.Contexts_Result_Tbl_Type;
2962: l_qualifier_contexts_Tbl QP_Attr_Mapping_PUB.Contexts_Result_Tbl_Type;
2963: k pls_integer;

Line 2977: x_return_status := OKC_API.G_RET_STS_SUCCESS;

2973: END IF;
2974:
2975: --dbms_output.put_line('start build_chr_context');
2976:
2977: x_return_status := OKC_API.G_RET_STS_SUCCESS;
2978:
2979: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2980: p_init_msg_list,
2981: '_PROCESS',

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

2975: --dbms_output.put_line('start build_chr_context');
2976:
2977: x_return_status := OKC_API.G_RET_STS_SUCCESS;
2978:
2979: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2980: p_init_msg_list,
2981: '_PROCESS',
2982: x_return_status);
2983: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN

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

2979: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
2980: p_init_msg_list,
2981: '_PROCESS',
2982: x_return_status);
2983: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2984: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2985: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2986: raise OKC_API.G_EXCEPTION_ERROR;
2987: END IF;

Line 2984: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

2980: p_init_msg_list,
2981: '_PROCESS',
2982: x_return_status);
2983: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2984: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2985: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2986: raise OKC_API.G_EXCEPTION_ERROR;
2987: END IF;
2988:

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

2981: '_PROCESS',
2982: x_return_status);
2983: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2984: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2985: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2986: raise OKC_API.G_EXCEPTION_ERROR;
2987: END IF;
2988:
2989: -- put values from attached rules in global table

Line 2986: raise OKC_API.G_EXCEPTION_ERROR;

2982: x_return_status);
2983: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
2984: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2985: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
2986: raise OKC_API.G_EXCEPTION_ERROR;
2987: END IF;
2988:
2989: -- put values from attached rules in global table
2990: l_return_status:=attach_rules(p_chr_id);

Line 2993: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

2989: -- put values from attached rules in global table
2990: l_return_status:=attach_rules(p_chr_id);
2991: --dbms_output.put_line('2return status'||l_return_status);
2992:
2993: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2994: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2995: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2996: RAISE OKC_API.G_EXCEPTION_ERROR;
2997: END IF;

Line 2994: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

2990: l_return_status:=attach_rules(p_chr_id);
2991: --dbms_output.put_line('2return status'||l_return_status);
2992:
2993: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2994: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2995: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2996: RAISE OKC_API.G_EXCEPTION_ERROR;
2997: END IF;
2998: -- put values from attached party roles in global table

Line 2995: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

2991: --dbms_output.put_line('2return status'||l_return_status);
2992:
2993: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2994: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2995: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2996: RAISE OKC_API.G_EXCEPTION_ERROR;
2997: END IF;
2998: -- put values from attached party roles in global table
2999: l_return_status:=attach_party_roles(p_chr_id);

Line 2996: RAISE OKC_API.G_EXCEPTION_ERROR;

2992:
2993: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
2994: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
2995: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
2996: RAISE OKC_API.G_EXCEPTION_ERROR;
2997: END IF;
2998: -- put values from attached party roles in global table
2999: l_return_status:=attach_party_roles(p_chr_id);
3000: --dbms_output.put_line('3return status'||l_return_status);

Line 3002: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

2998: -- put values from attached party roles in global table
2999: l_return_status:=attach_party_roles(p_chr_id);
3000: --dbms_output.put_line('3return status'||l_return_status);
3001:
3002: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3003: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3004: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3005: RAISE OKC_API.G_EXCEPTION_ERROR;
3006: END IF;

Line 3003: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

2999: l_return_status:=attach_party_roles(p_chr_id);
3000: --dbms_output.put_line('3return status'||l_return_status);
3001:
3002: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3003: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3004: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3005: RAISE OKC_API.G_EXCEPTION_ERROR;
3006: END IF;
3007: Load_User_Defined_Pattrs(p_chr_id ,

Line 3004: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

3000: --dbms_output.put_line('3return status'||l_return_status);
3001:
3002: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3003: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3004: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3005: RAISE OKC_API.G_EXCEPTION_ERROR;
3006: END IF;
3007: Load_User_Defined_Pattrs(p_chr_id ,
3008: p_line_index ,

Line 3005: RAISE OKC_API.G_EXCEPTION_ERROR;

3001:
3002: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3003: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3004: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3005: RAISE OKC_API.G_EXCEPTION_ERROR;
3006: END IF;
3007: Load_User_Defined_Pattrs(p_chr_id ,
3008: p_line_index ,
3009: x_pricing_contexts_Tbl,

Line 3014: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

3010: x_qualifier_contexts_Tbl,
3011: x_return_status);
3012: --dbms_output.put_line('4return status'||x_return_status);
3013:
3014: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3015: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3016: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
3017: RAISE OKC_API.G_EXCEPTION_ERROR;
3018: END IF;

Line 3015: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

3011: x_return_status);
3012: --dbms_output.put_line('4return status'||x_return_status);
3013:
3014: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3015: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3016: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
3017: RAISE OKC_API.G_EXCEPTION_ERROR;
3018: END IF;
3019: --call pricing build context

Line 3016: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN

3012: --dbms_output.put_line('4return status'||x_return_status);
3013:
3014: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3015: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3016: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
3017: RAISE OKC_API.G_EXCEPTION_ERROR;
3018: END IF;
3019: --call pricing build context
3020: --dbms_output.put_line('5return status'||x_return_status);

Line 3017: RAISE OKC_API.G_EXCEPTION_ERROR;

3013:
3014: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3015: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3016: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
3017: RAISE OKC_API.G_EXCEPTION_ERROR;
3018: END IF;
3019: --call pricing build context
3020: --dbms_output.put_line('5return status'||x_return_status);
3021:

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

3131:
3132: Exception
3133: When Others then
3134: --dbms_output.put_line('error'||substr(sqlerrm,1,240));
3135: OKC_API.set_message(p_app_name => g_app_name,
3136: p_msg_name => 'OKC_QP_INT_ERROR',
3137: p_token1 => 'Proc',
3138: p_token1_value => 'Build_Context for Header',
3139: p_token2 => 'SQLCODE',

Line 3143: Raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

3139: p_token2 => 'SQLCODE',
3140: p_token2_value => SQLCODE,
3141: p_token3 => 'Err_TEXT',
3142: p_token3_value => SQLERRM);
3143: Raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3144: End; --call pricing build context
3145: -- copy build context attribs to request table
3146:
3147: copy_attribs_to_Req(

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

3150: ,l_qualifier_contexts_Tbl
3151: ,x_pricing_contexts_Tbl
3152: ,x_qualifier_contexts_Tbl);
3153:
3154: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3155:
3156: IF (l_debug = 'Y') THEN
3157: my_debug('9600 : Exiting BUILD_CHR_CONTEXT', 2);
3158: END IF;

Line 3165: WHEN OKC_API.G_EXCEPTION_ERROR THEN

3161: END IF;
3162:
3163: EXCEPTION
3164:
3165: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3166: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3167: (l_api_name,
3168: G_PKG_NAME,
3169: 'OKC_API.G_RET_STS_ERROR',

Line 3166: x_return_status := OKC_API.HANDLE_EXCEPTIONS

3162:
3163: EXCEPTION
3164:
3165: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3166: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3167: (l_api_name,
3168: G_PKG_NAME,
3169: 'OKC_API.G_RET_STS_ERROR',
3170: x_msg_count,

Line 3169: 'OKC_API.G_RET_STS_ERROR',

3165: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3166: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3167: (l_api_name,
3168: G_PKG_NAME,
3169: 'OKC_API.G_RET_STS_ERROR',
3170: x_msg_count,
3171: x_msg_data,
3172: '_PROCESS');
3173: IF (l_debug = 'Y') THEN

Line 3180: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN

3176: IF (l_debug = 'Y') THEN
3177: okc_debug.Reset_Indentation;
3178: END IF;
3179:
3180: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3181: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3182: (l_api_name,
3183: G_PKG_NAME,
3184: 'OKC_API.G_RET_STS_UNEXP_ERROR',

Line 3181: x_return_status := OKC_API.HANDLE_EXCEPTIONS

3177: okc_debug.Reset_Indentation;
3178: END IF;
3179:
3180: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3181: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3182: (l_api_name,
3183: G_PKG_NAME,
3184: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3185: x_msg_count,

Line 3184: 'OKC_API.G_RET_STS_UNEXP_ERROR',

3180: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3181: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3182: (l_api_name,
3183: G_PKG_NAME,
3184: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3185: x_msg_count,
3186: x_msg_data,
3187: '_PROCESS');
3188: IF (l_debug = 'Y') THEN

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

3192: okc_debug.Reset_Indentation;
3193: END IF;
3194:
3195: WHEN OTHERS THEN
3196: OKC_API.set_message(p_app_name => g_app_name,
3197: p_msg_name => g_unexpected_error,
3198: p_token1 => g_sqlcode_token,
3199: p_token1_value => sqlcode,
3200: p_token2 => g_sqlerrm_token,

Line 3202: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

3198: p_token1 => g_sqlcode_token,
3199: p_token1_value => sqlcode,
3200: p_token2 => g_sqlerrm_token,
3201: p_token2_value => sqlerrm);
3202: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
3203: IF (l_debug = 'Y') THEN
3204: my_debug('9900 : Exiting BUILD_CHR_CONTEXT', 4);
3205: END IF;
3206: IF (l_debug = 'Y') THEN

Line 3274: x_return_status := OKC_API.G_RET_STS_SUCCESS;

3270: END IF;
3271: IF (l_debug = 'Y') THEN
3272: my_debug('10000 : Entering get_line_ids', 2);
3273: END IF;
3274: x_return_status := OKC_API.G_RET_STS_SUCCESS;
3275: x_bpi_ind :=0;
3276: x_pi_ind :=0;
3277: OKC_PRICE_PUB.G_CONTRACT_INFO.top_model_line_id:=null;
3278: select id,currency_code,price_level_ind

Line 3324: AND ( l_pricelist_id(i) is null OR l_pricelist_id(i) = OKC_API.G_MISS_NUM ) THEN

3320: x_line_tbl(i).pricing_date := l_prc_date_tbl(i);
3321: End If;
3322: --Bug Tope
3323: If l_item_row.jtot_object1_code in ('OKX_COVLINE','OKX_CUSTITEM','OKX_CUSTPROD')
3324: AND ( l_pricelist_id(i) is null OR l_pricelist_id(i) = OKC_API.G_MISS_NUM ) THEN
3325: For cle_pl_rec in l_cle_pl(l_cle_id_tbl(i)) Loop
3326: l_pricelist_id(i):= cle_pl_rec.price_list_id;
3327: -- my_debug('price for the serv is '|| cle_pl_rec.price_list_id);
3328: End Loop;

Line 3428: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

3424:
3425: EXCEPTION
3426: WHEN l_exception_stop then
3427: --dbms_output.put_line('some thing wrong in code. This should not be reached');
3428: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
3429: If l_item_csr%isopen then
3430: close l_item_csr;
3431: END IF;
3432: IF (l_debug = 'Y') THEN

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

3436: okc_debug.Reset_Indentation;
3437: END IF;
3438:
3439: when others then
3440: OKC_API.set_message(p_app_name => g_app_name,
3441: p_msg_name => g_unexpected_error,
3442: p_token1 => g_sqlcode_token,
3443: p_token1_value => sqlcode,
3444: p_token2 => g_sqlerrm_token,

Line 3446: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

3442: p_token1 => g_sqlcode_token,
3443: p_token1_value => sqlcode,
3444: p_token2 => g_sqlerrm_token,
3445: p_token2_value => sqlerrm);
3446: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
3447: If l_item_csr%isopen then
3448: close l_item_csr;
3449: END IF;
3450: IF (l_debug = 'Y') THEN

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

3480: x_msg_count OUT NOCOPY NUMBER,
3481: x_msg_data OUT NOCOPY VARCHAR2) IS
3482:
3483: i pls_integer :=0;
3484: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;
3485: l_api_name constant VARCHAR2(30) := 'BUILD_CLE_CONTEXT';
3486: l_pricing_contexts_Tbl QP_Attr_Mapping_PUB.Contexts_Result_Tbl_Type;
3487: l_qualifier_contexts_Tbl QP_Attr_Mapping_PUB.Contexts_Result_Tbl_Type;
3488: k pls_integer;

Line 3513: x_return_status := OKC_API.G_RET_STS_SUCCESS;

3509: IF (l_debug = 'Y') THEN
3510: my_debug('11000 : Entering BUILD_CLE_CONTEXT', 2);
3511: END IF;
3512:
3513: x_return_status := OKC_API.G_RET_STS_SUCCESS;
3514:
3515: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3516: p_init_msg_list,
3517: '_PROCESS',

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

3511: END IF;
3512:
3513: x_return_status := OKC_API.G_RET_STS_SUCCESS;
3514:
3515: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3516: p_init_msg_list,
3517: '_PROCESS',
3518: x_return_status);
3519: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN

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

3515: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
3516: p_init_msg_list,
3517: '_PROCESS',
3518: x_return_status);
3519: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3520: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3521: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3522: raise OKC_API.G_EXCEPTION_ERROR;
3523: END IF;

Line 3520: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

3516: p_init_msg_list,
3517: '_PROCESS',
3518: x_return_status);
3519: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3520: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3521: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3522: raise OKC_API.G_EXCEPTION_ERROR;
3523: END IF;
3524:

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

3517: '_PROCESS',
3518: x_return_status);
3519: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3520: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3521: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3522: raise OKC_API.G_EXCEPTION_ERROR;
3523: END IF;
3524:
3525: IF (l_debug = 'Y') THEN

Line 3522: raise OKC_API.G_EXCEPTION_ERROR;

3518: x_return_status);
3519: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
3520: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3521: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
3522: raise OKC_API.G_EXCEPTION_ERROR;
3523: END IF;
3524:
3525: IF (l_debug = 'Y') THEN
3526: my_debug('11010 : number of lines in heirarchy '||p_line_tbl.count,1);

Line 3548: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

3544: l_lse_rec.current_source := p_line_tbl(i).object_code;
3545: l_lse_rec.source_value := p_line_tbl(i).id1;
3546: l_return_status :=ADD_TO_GLOBAL_LSE_TBL(l_lse_rec);
3547:
3548: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3549: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3550: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3551: RAISE OKC_API.G_EXCEPTION_ERROR;
3552: END IF;

Line 3549: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

3545: l_lse_rec.source_value := p_line_tbl(i).id1;
3546: l_return_status :=ADD_TO_GLOBAL_LSE_TBL(l_lse_rec);
3547:
3548: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3549: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3550: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3551: RAISE OKC_API.G_EXCEPTION_ERROR;
3552: END IF;
3553: ELSIF p_line_tbl(i).object_code is null then --object_code not null

Line 3550: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

3546: l_return_status :=ADD_TO_GLOBAL_LSE_TBL(l_lse_rec);
3547:
3548: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3549: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3550: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3551: RAISE OKC_API.G_EXCEPTION_ERROR;
3552: END IF;
3553: ELSIF p_line_tbl(i).object_code is null then --object_code not null
3554: -- the following pricing context ALL is being sent as for some cases

Line 3551: RAISE OKC_API.G_EXCEPTION_ERROR;

3547:
3548: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3549: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3550: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3551: RAISE OKC_API.G_EXCEPTION_ERROR;
3552: END IF;
3553: ELSIF p_line_tbl(i).object_code is null then --object_code not null
3554: -- the following pricing context ALL is being sent as for some cases
3555: -- like top line priced free format line styles the item is not comimg

Line 3581: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

3577:
3578: l_lse_rec.current_source := 'OKX_FREE';
3579: l_return_status :=ADD_TO_GLOBAL_LSE_TBL(l_lse_rec);
3580:
3581: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3582: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3583: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3584: RAISE OKC_API.G_EXCEPTION_ERROR;
3585: END IF;

Line 3582: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

3578: l_lse_rec.current_source := 'OKX_FREE';
3579: l_return_status :=ADD_TO_GLOBAL_LSE_TBL(l_lse_rec);
3580:
3581: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3582: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3583: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3584: RAISE OKC_API.G_EXCEPTION_ERROR;
3585: END IF;
3586:

Line 3583: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

3579: l_return_status :=ADD_TO_GLOBAL_LSE_TBL(l_lse_rec);
3580:
3581: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3582: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3583: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3584: RAISE OKC_API.G_EXCEPTION_ERROR;
3585: END IF;
3586:
3587: EXCEPTION

Line 3584: RAISE OKC_API.G_EXCEPTION_ERROR;

3580:
3581: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3582: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3583: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3584: RAISE OKC_API.G_EXCEPTION_ERROR;
3585: END IF;
3586:
3587: EXCEPTION
3588: WHEN NO_DATA_FOUND then

Line 3694: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

3690: END;
3691: l_lse_rec.source_value := p_line_tbl(i).id1;
3692: l_return_status :=ADD_TO_GLOBAL_LSE_TBL(l_lse_rec);
3693:
3694: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3695: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3696: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3697: RAISE OKC_API.G_EXCEPTION_ERROR;
3698: END IF;

Line 3695: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

3691: l_lse_rec.source_value := p_line_tbl(i).id1;
3692: l_return_status :=ADD_TO_GLOBAL_LSE_TBL(l_lse_rec);
3693:
3694: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3695: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3696: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3697: RAISE OKC_API.G_EXCEPTION_ERROR;
3698: END IF;
3699: End if; -- if p_line_tbl(i).object_code is not null

Line 3696: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

3692: l_return_status :=ADD_TO_GLOBAL_LSE_TBL(l_lse_rec);
3693:
3694: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3695: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3696: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3697: RAISE OKC_API.G_EXCEPTION_ERROR;
3698: END IF;
3699: End if; -- if p_line_tbl(i).object_code is not null
3700: END IF; -- pi_yn<> 'Y'

Line 3697: RAISE OKC_API.G_EXCEPTION_ERROR;

3693:
3694: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3695: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3696: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3697: RAISE OKC_API.G_EXCEPTION_ERROR;
3698: END IF;
3699: End if; -- if p_line_tbl(i).object_code is not null
3700: END IF; -- pi_yn<> 'Y'
3701: --attach pricelist if availavble

Line 3706: and (p_line_tbl(i).pricelist_id is not null )and (p_line_tbl(i).pricelist_id <> OKC_API.G_MISS_NUM) then

3702: --attach for pi as well when pricing for service
3703: IF (p_line_tbl(i).p_yn ='Y' or (p_service_price = 'Y' and (p_line_tbl(i).pi_yn ='Y')))
3704: Then
3705: /**********
3706: and (p_line_tbl(i).pricelist_id is not null )and (p_line_tbl(i).pricelist_id <> OKC_API.G_MISS_NUM) then
3707: qual_rec.LINE_INDEX := p_line_index;
3708: qual_rec.QUALIFIER_CONTEXT :='MODLIST';
3709: qual_rec.QUALIFIER_ATTRIBUTE :='QUALIFIER_ATTRIBUTE4';
3710: --qual_rec.QUALIFIER_ATTR_VALUE_FROM := to_char(p_line_tbl(i).pricelist_id); -- Price List Id

Line 3747: ( qual_rec.QUALIFIER_ATTR_VALUE_FROM <> OKC_API.G_MISS_CHAR) then

3743: /** Bug 2774859: the service line may not have a price list attached to it
3744: in which case, we have already got the price list from the covered line
3745: which we need to attach to the service line **/
3746: If ( qual_rec.QUALIFIER_ATTR_VALUE_FROM is not null ) and
3747: ( qual_rec.QUALIFIER_ATTR_VALUE_FROM <> OKC_API.G_MISS_CHAR) then
3748:
3749: qual_rec.LINE_INDEX := p_line_index;
3750: qual_rec.QUALIFIER_CONTEXT :='MODLIST';
3751: qual_rec.QUALIFIER_ATTRIBUTE :='QUALIFIER_ATTRIBUTE4';

Line 3783: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

3779: -- put values from attached rules in global table
3780: l_return_status:=attach_rules(p_chr_id,p_line_tbl(i).id);
3781: -- --dbms_output.put_line('2 cle return status'||l_return_status);
3782:
3783: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3784: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3785: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3786: RAISE OKC_API.G_EXCEPTION_ERROR;
3787: END IF;

Line 3784: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

3780: l_return_status:=attach_rules(p_chr_id,p_line_tbl(i).id);
3781: -- --dbms_output.put_line('2 cle return status'||l_return_status);
3782:
3783: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3784: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3785: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3786: RAISE OKC_API.G_EXCEPTION_ERROR;
3787: END IF;
3788: -- put values from attached party roles in global table

Line 3785: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

3781: -- --dbms_output.put_line('2 cle return status'||l_return_status);
3782:
3783: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3784: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3785: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3786: RAISE OKC_API.G_EXCEPTION_ERROR;
3787: END IF;
3788: -- put values from attached party roles in global table
3789: l_return_status:=attach_party_roles(p_chr_id,p_line_tbl(i).id);

Line 3786: RAISE OKC_API.G_EXCEPTION_ERROR;

3782:
3783: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3784: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3785: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3786: RAISE OKC_API.G_EXCEPTION_ERROR;
3787: END IF;
3788: -- put values from attached party roles in global table
3789: l_return_status:=attach_party_roles(p_chr_id,p_line_tbl(i).id);
3790: -- --dbms_output.put_line('3 cle return status'||l_return_status);

Line 3792: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

3788: -- put values from attached party roles in global table
3789: l_return_status:=attach_party_roles(p_chr_id,p_line_tbl(i).id);
3790: -- --dbms_output.put_line('3 cle return status'||l_return_status);
3791:
3792: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3793: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3794: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3795: RAISE OKC_API.G_EXCEPTION_ERROR;
3796: END IF;

Line 3793: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

3789: l_return_status:=attach_party_roles(p_chr_id,p_line_tbl(i).id);
3790: -- --dbms_output.put_line('3 cle return status'||l_return_status);
3791:
3792: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3793: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3794: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3795: RAISE OKC_API.G_EXCEPTION_ERROR;
3796: END IF;
3797:

Line 3794: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

3790: -- --dbms_output.put_line('3 cle return status'||l_return_status);
3791:
3792: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3793: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3794: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3795: RAISE OKC_API.G_EXCEPTION_ERROR;
3796: END IF;
3797:
3798: Load_User_Defined_Pattrs(p_chr_id ,

Line 3795: RAISE OKC_API.G_EXCEPTION_ERROR;

3791:
3792: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3793: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3794: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3795: RAISE OKC_API.G_EXCEPTION_ERROR;
3796: END IF;
3797:
3798: Load_User_Defined_Pattrs(p_chr_id ,
3799: p_line_index ,

Line 3805: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

3801: x_qualifier_contexts_Tbl,
3802: x_return_status,
3803: p_line_tbl(i).id);
3804: -- --dbms_output.put_line('4 cle return status'||x_return_status);
3805: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3806: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3807: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3808: RAISE OKC_API.G_EXCEPTION_ERROR;
3809: END IF;

Line 3806: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

3802: x_return_status,
3803: p_line_tbl(i).id);
3804: -- --dbms_output.put_line('4 cle return status'||x_return_status);
3805: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3806: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3807: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3808: RAISE OKC_API.G_EXCEPTION_ERROR;
3809: END IF;
3810: --call pricing build context

Line 3807: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

3803: p_line_tbl(i).id);
3804: -- --dbms_output.put_line('4 cle return status'||x_return_status);
3805: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3806: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3807: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3808: RAISE OKC_API.G_EXCEPTION_ERROR;
3809: END IF;
3810: --call pricing build context
3811: -- --dbms_output.put_line('5 cle return status'||x_return_status);

Line 3808: RAISE OKC_API.G_EXCEPTION_ERROR;

3804: -- --dbms_output.put_line('4 cle return status'||x_return_status);
3805: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3806: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3807: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3808: RAISE OKC_API.G_EXCEPTION_ERROR;
3809: END IF;
3810: --call pricing build context
3811: -- --dbms_output.put_line('5 cle return status'||x_return_status);
3812: i:=p_line_tbl.next(i);

Line 3824: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

3820: i:=g_hdr_rul_tbl.next(i);
3821: while i is not null loop
3822: l_prle_rec:=g_hdr_rul_tbl(i);
3823: l_return_status:= add_to_global_tbl(okc_price_pub.g_rul_tbl,l_prle_rec);
3824: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3825: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3826: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3827: RAISE OKC_API.G_EXCEPTION_ERROR;
3828: END IF;

Line 3825: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

3821: while i is not null loop
3822: l_prle_rec:=g_hdr_rul_tbl(i);
3823: l_return_status:= add_to_global_tbl(okc_price_pub.g_rul_tbl,l_prle_rec);
3824: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3825: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3826: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3827: RAISE OKC_API.G_EXCEPTION_ERROR;
3828: END IF;
3829: i:=g_hdr_rul_tbl.next(i);

Line 3826: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

3822: l_prle_rec:=g_hdr_rul_tbl(i);
3823: l_return_status:= add_to_global_tbl(okc_price_pub.g_rul_tbl,l_prle_rec);
3824: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3825: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3826: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3827: RAISE OKC_API.G_EXCEPTION_ERROR;
3828: END IF;
3829: i:=g_hdr_rul_tbl.next(i);
3830: End loop;

Line 3827: RAISE OKC_API.G_EXCEPTION_ERROR;

3823: l_return_status:= add_to_global_tbl(okc_price_pub.g_rul_tbl,l_prle_rec);
3824: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3825: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3826: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3827: RAISE OKC_API.G_EXCEPTION_ERROR;
3828: END IF;
3829: i:=g_hdr_rul_tbl.next(i);
3830: End loop;
3831: end if;

Line 3842: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

3838: i:=g_hdr_prle_tbl.next(i);
3839: while i is not null loop
3840: l_prle_rec:=g_hdr_prle_tbl(i);
3841: l_return_status:= add_to_global_tbl(okc_price_pub.g_prle_tbl,l_prle_rec);
3842: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3843: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3844: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3845: RAISE OKC_API.G_EXCEPTION_ERROR;
3846: END IF;

Line 3843: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

3839: while i is not null loop
3840: l_prle_rec:=g_hdr_prle_tbl(i);
3841: l_return_status:= add_to_global_tbl(okc_price_pub.g_prle_tbl,l_prle_rec);
3842: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3843: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3844: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3845: RAISE OKC_API.G_EXCEPTION_ERROR;
3846: END IF;
3847: i:=g_hdr_prle_tbl.next(i);

Line 3844: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

3840: l_prle_rec:=g_hdr_prle_tbl(i);
3841: l_return_status:= add_to_global_tbl(okc_price_pub.g_prle_tbl,l_prle_rec);
3842: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3843: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3844: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3845: RAISE OKC_API.G_EXCEPTION_ERROR;
3846: END IF;
3847: i:=g_hdr_prle_tbl.next(i);
3848: End loop;

Line 3845: RAISE OKC_API.G_EXCEPTION_ERROR;

3841: l_return_status:= add_to_global_tbl(okc_price_pub.g_prle_tbl,l_prle_rec);
3842: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
3843: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3844: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
3845: RAISE OKC_API.G_EXCEPTION_ERROR;
3846: END IF;
3847: i:=g_hdr_prle_tbl.next(i);
3848: End loop;
3849: end if;

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

3935:
3936: Exception
3937: When Others then
3938: --dbms_output.put_line('error'||substr(sqlerrm,1,240));
3939: OKC_API.set_message(p_app_name => g_app_name,
3940: p_msg_name => 'OKC_QP_INT_ERROR',
3941: p_token1 => 'Proc',
3942: p_token1_value => 'Build_Context for LINE',
3943: p_token2 => 'SQLCODE',

Line 3950: Raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

3946: p_token3_value => SQLERRM);
3947: IF (l_debug = 'Y') THEN
3948: my_debug('11450 : QP Build Context Error Exiting BUILD_CLE_CONTEXT', 2);
3949: END IF;
3950: Raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
3951:
3952: End; --call pricing build context
3953: -- copy build context attribs to request table
3954: -- --dbms_output.put_line('6 cle return status'||x_return_status);

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

3966: END IF;--p_line_tbl.count
3967: IF (l_debug = 'Y') THEN
3968: my_debug('11598 : after copy attrib count '||x_qualifier_contexts_Tbl.count, 1);
3969: END IF;
3970: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
3971:
3972: IF (l_debug = 'Y') THEN
3973: my_debug('11600 : Exiting BUILD_CLE_CONTEXT', 2);
3974: END IF;

Line 3979: WHEN OKC_API.G_EXCEPTION_ERROR THEN

3975: IF (l_debug = 'Y') THEN
3976: okc_debug.Reset_Indentation;
3977: END IF;
3978: EXCEPTION
3979: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3980: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3981: (l_api_name,
3982: G_PKG_NAME,
3983: 'OKC_API.G_RET_STS_ERROR',

Line 3980: x_return_status := OKC_API.HANDLE_EXCEPTIONS

3976: okc_debug.Reset_Indentation;
3977: END IF;
3978: EXCEPTION
3979: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3980: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3981: (l_api_name,
3982: G_PKG_NAME,
3983: 'OKC_API.G_RET_STS_ERROR',
3984: x_msg_count,

Line 3983: 'OKC_API.G_RET_STS_ERROR',

3979: WHEN OKC_API.G_EXCEPTION_ERROR THEN
3980: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3981: (l_api_name,
3982: G_PKG_NAME,
3983: 'OKC_API.G_RET_STS_ERROR',
3984: x_msg_count,
3985: x_msg_data,
3986: '_PROCESS');
3987: IF (l_debug = 'Y') THEN

Line 3994: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN

3990: IF (l_debug = 'Y') THEN
3991: okc_debug.Reset_Indentation;
3992: END IF;
3993:
3994: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3995: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3996: (l_api_name,
3997: G_PKG_NAME,
3998: 'OKC_API.G_RET_STS_UNEXP_ERROR',

Line 3995: x_return_status := OKC_API.HANDLE_EXCEPTIONS

3991: okc_debug.Reset_Indentation;
3992: END IF;
3993:
3994: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3995: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3996: (l_api_name,
3997: G_PKG_NAME,
3998: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3999: x_msg_count,

Line 3998: 'OKC_API.G_RET_STS_UNEXP_ERROR',

3994: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
3995: x_return_status := OKC_API.HANDLE_EXCEPTIONS
3996: (l_api_name,
3997: G_PKG_NAME,
3998: 'OKC_API.G_RET_STS_UNEXP_ERROR',
3999: x_msg_count,
4000: x_msg_data,
4001: '_PROCESS');
4002: IF (l_debug = 'Y') THEN

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

4006: okc_debug.Reset_Indentation;
4007: END IF;
4008:
4009: WHEN OTHERS THEN
4010: OKC_API.set_message(p_app_name => g_app_name,
4011: p_msg_name => g_unexpected_error,
4012: p_token1 => g_sqlcode_token,
4013: p_token1_value => sqlcode,
4014: p_token2 => g_sqlerrm_token,

Line 4016: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

4012: p_token1 => g_sqlcode_token,
4013: p_token1_value => sqlcode,
4014: p_token2 => g_sqlerrm_token,
4015: p_token2_value => sqlerrm);
4016: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
4017: IF (l_debug = 'Y') THEN
4018: my_debug('11900 : Exiting BUILD_CLE_CONTEXT', 4);
4019: END IF;
4020: IF (l_debug = 'Y') THEN

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

4044: x_return_status OUT NOCOPY varchar2,
4045: x_msg_count OUT NOCOPY NUMBER,
4046: x_msg_data OUT NOCOPY VARCHAR2) IS
4047:
4048: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;
4049: l_related_lines_Index pls_integer :=0;
4050: l_bpi_ind number := p_bpi_ind;
4051: l_line_index pls_integer := nvl(px_req_line_tbl.count,0);
4052: l_line_tbl line_tbl_type := p_line_tbl;

Line 4062: x_return_status := OKC_API.G_RET_STS_SUCCESS;

4058: IF (l_debug = 'Y') THEN
4059: my_debug('12000 : Entering Create_request_line', 2);
4060: END IF;
4061:
4062: x_return_status := OKC_API.G_RET_STS_SUCCESS;
4063: -- create request line for a given line. The p_line_tbl here has the list of lines
4064: -- in the same heirarchy. One of these lines should hold Priced flag and one should have
4065: -- item_to_price_flag. If there is a relationship between two lines the index of that
4066: -- line would be stored in bpi_ind. The relationship right now defaults to SERVICE

Line 4174: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

4170: IF (l_debug = 'Y') THEN
4171: my_debug('12062 :After calling Build _cle_context return status '||l_return_status, 1);
4172: END IF;
4173:
4174: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
4175: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4176: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
4177: RAISE OKC_API.G_EXCEPTION_ERROR;
4178: END IF;

Line 4175: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

4171: my_debug('12062 :After calling Build _cle_context return status '||l_return_status, 1);
4172: END IF;
4173:
4174: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
4175: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4176: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
4177: RAISE OKC_API.G_EXCEPTION_ERROR;
4178: END IF;
4179: --attach header attribs

Line 4176: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

4172: END IF;
4173:
4174: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
4175: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4176: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
4177: RAISE OKC_API.G_EXCEPTION_ERROR;
4178: END IF;
4179: --attach header attribs
4180:

Line 4177: RAISE OKC_API.G_EXCEPTION_ERROR;

4173:
4174: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
4175: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4176: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
4177: RAISE OKC_API.G_EXCEPTION_ERROR;
4178: END IF;
4179: --attach header attribs
4180:
4181: If (p_hdr_prc_contexts_Tbl.count >0 or p_hdr_qual_contexts_Tbl.count>0) then

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

4233: END IF;
4234:
4235: EXCEPTION
4236: when others then
4237: OKC_API.set_message(p_app_name => g_app_name,
4238: p_msg_name => g_unexpected_error,
4239: p_token1 => g_sqlcode_token,
4240: p_token1_value => sqlcode,
4241: p_token2 => g_sqlerrm_token,

Line 4243: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

4239: p_token1 => g_sqlcode_token,
4240: p_token1_value => sqlcode,
4241: p_token2 => g_sqlerrm_token,
4242: p_token2_value => sqlerrm);
4243: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
4244: IF (l_debug = 'Y') THEN
4245: my_debug('12900 : Exiting Create_request_line', 4);
4246: END IF;
4247: IF (l_debug = 'Y') THEN

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

4274: x_return_status OUT NOCOPY varchar2,
4275: x_msg_count OUT NOCOPY NUMBER,
4276: x_msg_data OUT NOCOPY VARCHAR2) IS
4277:
4278: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;
4279: l_related_lines_Index pls_integer :=0;
4280: l_bpi_ind number := p_bpi_ind;
4281: l_line_index pls_integer := nvl(px_req_line_tbl.count,0);
4282: l_line_tbl line_tbl_type := p_line_tbl;

Line 4294: x_return_status := OKC_API.G_RET_STS_SUCCESS;

4290: IF (l_debug = 'Y') THEN
4291: my_debug('12000 : Entering Create_request_line_service', 2);
4292: END IF;
4293:
4294: x_return_status := OKC_API.G_RET_STS_SUCCESS;
4295: -- create request line for a given line. The p_line_tbl here has the list of lines
4296: -- in the same heirarchy. One of these lines should hold Priced flag and one should have
4297: -- item_to_price_flag. The price of item_to_price depends of price of priced
4298: -- The relationship right now defaults to SERVICE

Line 4400: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

4396:
4397: --Repopulate line table
4398: l_line_tbl:= p_line_tbl;
4399:
4400: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
4401: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4402: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
4403: RAISE OKC_API.G_EXCEPTION_ERROR;
4404: END IF;

Line 4401: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

4397: --Repopulate line table
4398: l_line_tbl:= p_line_tbl;
4399:
4400: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
4401: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4402: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
4403: RAISE OKC_API.G_EXCEPTION_ERROR;
4404: END IF;
4405: --attach header attribs

Line 4402: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

4398: l_line_tbl:= p_line_tbl;
4399:
4400: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
4401: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4402: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
4403: RAISE OKC_API.G_EXCEPTION_ERROR;
4404: END IF;
4405: --attach header attribs
4406:

Line 4403: RAISE OKC_API.G_EXCEPTION_ERROR;

4399:
4400: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
4401: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
4402: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
4403: RAISE OKC_API.G_EXCEPTION_ERROR;
4404: END IF;
4405: --attach header attribs
4406:
4407: If (p_hdr_prc_contexts_Tbl.count >0 or p_hdr_qual_contexts_Tbl.count>0) then

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

4440: END IF;
4441:
4442: EXCEPTION
4443: when others then
4444: OKC_API.set_message(p_app_name => g_app_name,
4445: p_msg_name => g_unexpected_error,
4446: p_token1 => g_sqlcode_token,
4447: p_token1_value => sqlcode,
4448: p_token2 => g_sqlerrm_token,

Line 4450: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

4446: p_token1 => g_sqlcode_token,
4447: p_token1_value => sqlcode,
4448: p_token2 => g_sqlerrm_token,
4449: p_token2_value => sqlerrm);
4450: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
4451: IF (l_debug = 'Y') THEN
4452: my_debug('12900 : Exiting Create_request_line', 4);
4453: END IF;
4454: IF (l_debug = 'Y') THEN

Line 4470: p_init_msg_list IN VARCHAR2 DEFAULT OKC_API.G_FALSE ,

4466: --Modified for pricing of service lines
4467: ----------------------------------------------------------------------------
4468: PROCEDURE PROCESS_ADJUSTMENT_DETAILS(
4469: p_api_version IN NUMBER,
4470: p_init_msg_list IN VARCHAR2 DEFAULT OKC_API.G_FALSE ,
4471: p_CHR_ID IN NUMBER,
4472: p_Control_Rec IN OKC_CONTROL_REC_TYPE,
4473: p_req_line_tbl IN QP_PREQ_GRP.LINE_TBL_TYPE,
4474: p_Req_LINE_DETAIL_tbl IN QP_PREQ_GRP.LINE_DETAIL_TBL_TYPE,

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

4531: lx_process_child_yn VARCHAR2(1);
4532:
4533:
4534: FUNCTION clean_adj_assocs(p_id_tbl num_tbl_type) RETURN varchar2 IS
4535: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;
4536: k pls_integer :=0;
4537: l pls_integer :=0;
4538: j pls_integer :=0;
4539:

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

4580:
4581: return (l_return_status);
4582: EXCEPTION
4583: when others then
4584: OKC_API.set_message(p_app_name => g_app_name,
4585: p_msg_name => g_unexpected_error,
4586: p_token1 => g_sqlcode_token,
4587: p_token1_value => sqlcode,
4588: p_token2 => g_sqlerrm_token,

Line 4590: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

4586: p_token1 => g_sqlcode_token,
4587: p_token1_value => sqlcode,
4588: p_token2 => g_sqlerrm_token,
4589: p_token2_value => sqlerrm);
4590: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
4591: IF (l_debug = 'Y') THEN
4592: my_debug('13500 : Exiting clean_adj_assocs', 4);
4593: END IF;
4594: IF (l_debug = 'Y') THEN

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

4598: return (l_return_status);
4599:
4600: END clean_adj_assocs;
4601: FUNCTION clean_adj_attrib(p_id_tbl num_tbl_type) RETURN varchar2 IS
4602: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;
4603: k pls_integer :=0;
4604: l pls_integer :=0;
4605: j pls_integer :=0;
4606:

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

4647:
4648: return (l_return_status);
4649: EXCEPTION
4650: when others then
4651: OKC_API.set_message(p_app_name => g_app_name,
4652: p_msg_name => g_unexpected_error,
4653: p_token1 => g_sqlcode_token,
4654: p_token1_value => sqlcode,
4655: p_token2 => g_sqlerrm_token,

Line 4657: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

4653: p_token1 => g_sqlcode_token,
4654: p_token1_value => sqlcode,
4655: p_token2 => g_sqlerrm_token,
4656: p_token2_value => sqlerrm);
4657: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
4658: IF (l_debug = 'Y') THEN
4659: my_debug('13800 : Exiting clean_adj_attrib', 4);
4660: END IF;
4661: IF (l_debug = 'Y') THEN

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

4666:
4667: END clean_adj_attrib;
4668:
4669: FUNCTION create_adj_attrib RETURN varchar2 IS
4670: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;
4671: k pls_integer :=0;
4672: l pls_integer :=0;
4673: j pls_integer :=0;
4674: l_is_there boolean :=false;

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

4811:
4812: return l_return_status;
4813: EXCEPTION
4814: when others then
4815: OKC_API.set_message(p_app_name => g_app_name,
4816: p_msg_name => g_unexpected_error,
4817: p_token1 => g_sqlcode_token,
4818: p_token1_value => sqlcode,
4819: p_token2 => g_sqlerrm_token,

Line 4821: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

4817: p_token1 => g_sqlcode_token,
4818: p_token1_value => sqlcode,
4819: p_token2 => g_sqlerrm_token,
4820: p_token2_value => sqlerrm);
4821: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
4822: IF (l_debug = 'Y') THEN
4823: my_debug('14600 : Exiting create_adj_attrib', 4);
4824: END IF;
4825: IF (l_debug = 'Y') THEN

Line 4978: x_return_status := OKC_API.G_RET_STS_SUCCESS;

4974: -- So check more on that and if feasible, change below for better performance
4975: IF (l_debug = 'Y') THEN
4976: my_debug('14702 : Number of lines to be processed'||p_cle_price_tbl.count, 2);
4977: END IF;
4978: x_return_status := OKC_API.G_RET_STS_SUCCESS;
4979: IF p_cle_price_tbl.count > 0 then
4980: i:=p_cle_price_tbl.first;
4981: IF (l_debug = 'Y') THEN
4982: my_debug('14704 :line Id whose adjustments are being fetched'||p_cle_price_tbl(i).id, 2);

Line 5067: IF x_return_status <> OKC_API.G_RET_STS_SUCCESS THEN

5063: i:=p_cle_price_tbl.next(i);
5064: End if;
5065:
5066: x_return_status := clean_adj_assocs(l_pat_id_tbl);
5067: IF x_return_status <> OKC_API.G_RET_STS_SUCCESS THEN
5068: RAISE l_exception_stop;
5069: END IF;
5070:
5071: x_return_status := clean_adj_attrib(l_pat_id_tbl);

Line 5072: IF x_return_status <> OKC_API.G_RET_STS_SUCCESS THEN

5068: RAISE l_exception_stop;
5069: END IF;
5070:
5071: x_return_status := clean_adj_attrib(l_pat_id_tbl);
5072: IF x_return_status <> OKC_API.G_RET_STS_SUCCESS THEN
5073: RAISE l_exception_stop;
5074: END IF;
5075:
5076: IF (l_debug = 'Y') THEN

Line 5201: IF x_return_status <> OKC_API.G_RET_STS_SUCCESS THEN

5197: IF (l_debug = 'Y') THEN
5198: my_debug('14778 : after calling update price adjustment '||x_return_status, 1);
5199: END IF;
5200:
5201: IF x_return_status <> OKC_API.G_RET_STS_SUCCESS THEN
5202: RAISE l_exception_stop;
5203: END IF;
5204:
5205:

Line 5254: IF x_return_status <> OKC_API.G_RET_STS_SUCCESS THEN

5250: IF (l_debug = 'Y') THEN
5251: my_debug('14781 : after calling create price adjustment '||x_return_status, 1);
5252: END IF;
5253:
5254: IF x_return_status <> OKC_API.G_RET_STS_SUCCESS THEN
5255: RAISE l_exception_stop;
5256: Else
5257: --tope pbh
5258: -- store the pat_id of pbh and child_detail_lines as we are going to use get associations

Line 5405: IF x_return_status <> OKC_API.G_RET_STS_SUCCESS THEN

5401: IF (l_debug = 'Y') THEN
5402: my_debug('14787 :after calling delete price adjustments'||x_return_status, 1);
5403: END IF;
5404:
5405: IF x_return_status <> OKC_API.G_RET_STS_SUCCESS THEN
5406: RAISE l_exception_stop;
5407: END IF;
5408: END IF;
5409: --???create records in adj_assocs;

Line 5419: IF x_return_status <> OKC_API.G_RET_STS_SUCCESS THEN

5415: IF (l_debug = 'Y') THEN
5416: my_debug('14792 :after calling Create adjustment attribs'||x_return_status, 1);
5417: END IF;
5418:
5419: IF x_return_status <> OKC_API.G_RET_STS_SUCCESS THEN
5420: RAISE l_exception_stop;
5421: END IF;
5422: --?????process relationship recs
5423: IF (l_debug = 'Y') THEN

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

5440: END IF;
5441:
5442: When others then
5443: --dbms_output.put_line('came here'||sqlcode||substr(sqlerrm,1,235));
5444: OKC_API.set_message(p_app_name => g_app_name,
5445: p_msg_name => G_UNEXPECTED_ERROR,
5446: p_token1 => G_SQLCODE_TOKEN,
5447: p_token1_value => SQLCODE,
5448: p_token2 => G_SQLERRM_TOKEN,

Line 5450: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

5446: p_token1 => G_SQLCODE_TOKEN,
5447: p_token1_value => SQLCODE,
5448: p_token2 => G_SQLERRM_TOKEN,
5449: p_token2_value => SQLERRM);
5450: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
5451: IF (l_debug = 'Y') THEN
5452: my_debug('14900 : Exiting PROCESS_ADJUSTMENT_DETAILS', 4);
5453: END IF;
5454: IF (l_debug = 'Y') THEN

Line 5468: p_init_msg_list IN VARCHAR2 DEFAULT OKC_API.G_FALSE,

5464: -- Modified to price service lines
5465: ----------------------------------------------------------------------------
5466: PROCEDURE PROCESS_ADJUSTMENTS(
5467: p_api_version IN NUMBER,
5468: p_init_msg_list IN VARCHAR2 DEFAULT OKC_API.G_FALSE,
5469: p_CHR_ID IN NUMBER,
5470: p_Control_Rec IN OKC_CONTROL_REC_TYPE,
5471: p_req_line_tbl IN QP_PREQ_GRP.LINE_TBL_TYPE,
5472: p_Req_LINE_DETAIL_tbl IN QP_PREQ_GRP.LINE_DETAIL_TBL_TYPE,

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

5485: l_prc1 varchar(240);
5486: l_prc2 varchar(240);
5487: l_line_rec cle_price_REC_TYPE;
5488: l_dummy_rec cle_price_REC_TYPE;
5489: l_return_status varchar2(1):= OKC_API.G_RET_STS_SUCCESS;
5490: l_sts varchar2(1):='S';
5491: p_line_ind number := 0;
5492: p_found boolean := false;
5493: t pls_integer :=0;

Line 5550: l_return_status:= OKC_API.G_RET_STS_SUCCESS;

5546: --dbms_output.put_line('a1-starting process adjustments'||p_req_line_tbl.count);
5547: If px_cle_price_tbl.count =0 then
5548: IF p_control_rec.p_level = 'QA' then
5549: -- this case might never be reached by QA but still putting the check
5550: l_return_status:= OKC_API.G_RET_STS_SUCCESS;
5551: Else
5552: OKC_API.set_message(p_app_name => g_app_name,
5553: p_msg_name => 'OKC_NO_QP_ROW');
5554: l_return_status:= OKC_API.G_RET_STS_ERROR;

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

5548: IF p_control_rec.p_level = 'QA' then
5549: -- this case might never be reached by QA but still putting the check
5550: l_return_status:= OKC_API.G_RET_STS_SUCCESS;
5551: Else
5552: OKC_API.set_message(p_app_name => g_app_name,
5553: p_msg_name => 'OKC_NO_QP_ROW');
5554: l_return_status:= OKC_API.G_RET_STS_ERROR;
5555:
5556: End IF;

Line 5554: l_return_status:= OKC_API.G_RET_STS_ERROR;

5550: l_return_status:= OKC_API.G_RET_STS_SUCCESS;
5551: Else
5552: OKC_API.set_message(p_app_name => g_app_name,
5553: p_msg_name => 'OKC_NO_QP_ROW');
5554: l_return_status:= OKC_API.G_RET_STS_ERROR;
5555:
5556: End IF;
5557: Raise l_exception_stop;
5558: End If;

Line 5596: OKC_API.G_RET_STS_UNEXP_ERROR,

5592: p_req_line_tbl(i).status_code in ( QP_PREQ_GRP.G_STATUS_INVALID_PRICE_LIST,
5593: QP_PREQ_GRP.G_STS_LHS_NOT_FOUND,
5594: QP_PREQ_GRP.G_STATUS_FORMULA_ERROR,
5595: QP_PREQ_GRP.G_STATUS_OTHER_ERRORS,
5596: OKC_API.G_RET_STS_UNEXP_ERROR,
5597: OKC_API.G_RET_STS_ERROR,
5598: QP_PREQ_GRP.G_STATUS_CALC_ERROR,
5599: QP_PREQ_GRP.G_STATUS_UOM_FAILURE,
5600: QP_PREQ_GRP.G_STATUS_INVALID_UOM,

Line 5597: OKC_API.G_RET_STS_ERROR,

5593: QP_PREQ_GRP.G_STS_LHS_NOT_FOUND,
5594: QP_PREQ_GRP.G_STATUS_FORMULA_ERROR,
5595: QP_PREQ_GRP.G_STATUS_OTHER_ERRORS,
5596: OKC_API.G_RET_STS_UNEXP_ERROR,
5597: OKC_API.G_RET_STS_ERROR,
5598: QP_PREQ_GRP.G_STATUS_CALC_ERROR,
5599: QP_PREQ_GRP.G_STATUS_UOM_FAILURE,
5600: QP_PREQ_GRP.G_STATUS_INVALID_UOM,
5601: QP_PREQ_GRP.G_STATUS_DUP_PRICE_LIST,

Line 5637: If l_return_status <> okc_api.g_ret_sts_success Then

5633: l_line_rec.line_num := OKC_CONTRACT_PUB.Get_concat_line_no(
5634: p_cle_id => l_line_rec.id ,
5635: x_return_status => l_return_status
5636: );
5637: If l_return_status <> okc_api.g_ret_sts_success Then
5638: l_line_rec.line_num := 'Unknown';
5639: End If;
5640:
5641: End if;

Line 5648: --san x_return_status := OKC_API.G_RET_STS_ERROR;

5644: my_debug('15062 : Error Line String'||l_line_rec.line_num, 1);
5645: END IF;
5646:
5647:
5648: --san x_return_status := OKC_API.G_RET_STS_ERROR;
5649: x_return_status :=G_SOME_LINE_ERRORED;
5650: --?????change all pricing error names to OKC_QP_... later
5651: If p_req_line_tbl(i).status_code = QP_PREQ_GRP.G_STATUS_INVALID_PRICE_LIST
5652: and l_prc1 is not null then --#3

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

5649: x_return_status :=G_SOME_LINE_ERRORED;
5650: --?????change all pricing error names to OKC_QP_... later
5651: If p_req_line_tbl(i).status_code = QP_PREQ_GRP.G_STATUS_INVALID_PRICE_LIST
5652: and l_prc1 is not null then --#3
5653: OKC_API.set_message(p_app_name => g_app_name,
5654: p_msg_name => 'OKC_QP_INVALID_PRICE_LIST', --invalid pricelist/item combi
5655: p_token1 => 'line_num',
5656: p_token1_value => l_line_rec.line_num,
5657: p_token2 => 'Price_list',

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

5658: p_token2_value => l_prc1);
5659: Elsif p_req_line_tbl(i).status_code = QP_PREQ_GRP.G_STS_LHS_NOT_FOUND
5660: OR (p_req_line_tbl(i).status_code = QP_PREQ_GRP.G_STATUS_INVALID_PRICE_LIST
5661: AND l_prc1 is null ) Then
5662: OKC_API.set_message(p_app_name => g_app_name,
5663: p_msg_name => 'OKC_QP_NO_PRICE_LIST', --pricelist not found
5664: p_token1 => 'LINE_NUM',
5665: p_token1_value => l_line_rec.line_num);
5666: Elsif p_req_line_tbl(i).status_code = QP_PREQ_GRP.G_STATUS_FORMULA_ERROR then

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

5663: p_msg_name => 'OKC_QP_NO_PRICE_LIST', --pricelist not found
5664: p_token1 => 'LINE_NUM',
5665: p_token1_value => l_line_rec.line_num);
5666: Elsif p_req_line_tbl(i).status_code = QP_PREQ_GRP.G_STATUS_FORMULA_ERROR then
5667: OKC_API.set_message(p_app_name => g_app_name,
5668: p_msg_name => 'OKC_QP_FORMULA_ERROR', --Error in formula processing
5669: p_token1 => 'line_num',
5670: p_token1_value => l_line_rec.line_num);
5671: Elsif p_req_line_tbl(i).status_code in

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

5671: Elsif p_req_line_tbl(i).status_code in
5672: (QP_PREQ_GRP.G_STATUS_OTHER_ERRORS , FND_API.G_RET_STS_UNEXP_ERROR,
5673: FND_API.G_RET_STS_ERROR)
5674: then
5675: OKC_API.set_message(p_app_name => g_app_name,
5676: p_msg_name => 'OKC_QP_PRICING_ERROR', --other errors in processing
5677: p_token1 => 'line_num',
5678: p_token1_value => l_line_rec.line_num,
5679: p_token2 => 'Err_Text',

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

5679: p_token2 => 'Err_Text',
5680: p_token2_value => p_req_line_tbl(i).status_text);
5681:
5682: Elsif p_req_line_tbl(i).status_code = QP_PREQ_GRP.G_STATUS_INVALID_UOM then
5683: OKC_API.set_message(p_app_name => g_app_name,
5684: p_msg_name => 'OKC_QP_INVALID_UOM', --invalid uom
5685: p_token1 => 'UOM',
5686: p_token1_value => p_req_line_tbl(i).line_uom_code,
5687: p_token2 => 'line_num',

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

5714: l_prc1 := p_req_line_tbl(i).status_text;
5715:
5716: End;
5717:
5718: OKC_API.set_message(p_app_name => g_app_name,
5719: p_msg_name => 'OKC_QP_DUP_PRICELIST', --duplicate pricelist
5720: p_token1 => 'line_num',
5721: p_token1_value => l_line_rec.line_num,
5722: p_token2 => 'Price1',

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

5729: --dbms_output.put_line('a3');
5730:
5731:
5732: Elsif p_req_line_tbl(i).status_code = QP_PREQ_GRP.G_STATUS_INVALID_UOM_CONV then
5733: OKC_API.set_message(p_app_name => g_app_name,
5734: p_msg_name => 'OKC_QP_INVAL_UOM_CONV', --invalid uom conversion
5735: p_token1 => 'line_num',
5736: p_token1_value => l_line_rec.line_num,
5737: p_token2 => 'err_text',

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

5737: p_token2 => 'err_text',
5738: p_token2_value => p_req_line_tbl(i).status_text);
5739:
5740: Elsif p_req_line_tbl(i).status_code = QP_PREQ_GRP.G_STATUS_INVALID_INCOMP then
5741: OKC_API.set_message(p_app_name => g_app_name,
5742: p_msg_name => 'OKC_QP_INVALID_INCOMP', --Unable to resolve incompatibility
5743: p_token1 => 'line_num',
5744: p_token1_value => l_line_rec.line_num,
5745: p_token2 => 'err_text',

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

5744: p_token1_value => l_line_rec.line_num,
5745: p_token2 => 'err_text',
5746: p_token2_value => p_req_line_tbl(i).status_text);
5747: Elsif p_req_line_tbl(i).status_code = QP_PREQ_GRP.G_STATUS_BEST_PRICE_EVAL_ERROR then
5748: OKC_API.set_message(p_app_name => g_app_name,
5749: p_msg_name => 'OKC_QP_BEST_PRICE', --error while evaluating best price
5750: p_token1 => 'line_num',
5751: p_token1_value => l_line_rec.line_num,
5752: p_token2 => 'err_text',

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

5752: p_token2 => 'err_text',
5753: p_token2_value => p_req_line_tbl(i).status_text);
5754:
5755: Else
5756: OKC_API.set_message(p_app_name => g_app_name,
5757: p_msg_name => 'OKC_PRICING_ERROR', --error while pricing
5758: p_token1 => 'line_num',
5759: p_token1_value => l_line_rec.line_num,
5760: p_token2 => 'err_text',

Line 5773: If l_return_status <> okc_api.g_ret_sts_success Then

5769: l_line_rec.line_num := OKC_CONTRACT_PUB.Get_concat_line_no(
5770: p_cle_id => l_line_rec.id ,
5771: x_return_status => l_return_status
5772: );
5773: If l_return_status <> okc_api.g_ret_sts_success Then
5774: l_line_rec.line_num := 'Unknown';
5775: End If;
5776: END IF;
5777: IF (l_debug = 'Y') THEN

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

5778: my_debug('15450 : error line Id'||l_line_rec.id, 1);
5779: my_debug('15460 : Error Line String'||l_line_rec.line_num, 1);
5780: END IF;
5781:
5782: OKC_API.set_message(p_app_name => g_app_name,
5783: p_msg_name => 'OKC_QP_NEG_PRICE', --???Is it an error for us?
5784: p_token1 => 'line_num',
5785: p_token1_value => l_line_rec.line_num,
5786: p_token2 => 'LIST_PRICE',

Line 5790: --san x_return_status := OKC_API.G_RET_STS_ERROR;

5786: p_token2 => 'LIST_PRICE',
5787: p_token2_value => p_req_line_tbl(i).unit_price,
5788: p_token3 => 'SELLING_PRICE',
5789: p_token3_value => p_req_line_tbl(i).adjusted_unit_price);
5790: --san x_return_status := OKC_API.G_RET_STS_ERROR;
5791: x_return_status := G_SOME_LINE_ERRORED;
5792: */
5793: elsif p_req_line_tbl(i).line_Type_code ='LINE' and
5794: p_req_line_tbl(i).status_code in

Line 5813: If l_return_status <> okc_api.g_ret_sts_success Then

5809: l_line_rec.line_num := OKC_CONTRACT_PUB.Get_concat_line_no(
5810: p_cle_id => l_line_rec.id ,
5811: x_return_status => l_return_status
5812: );
5813: If l_return_status <> okc_api.g_ret_sts_success Then
5814: l_line_rec.line_num := 'Unknown';
5815: End If;
5816: END IF;
5817: IF (l_debug = 'Y') THEN

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

5818: my_debug('15500 : error line Id'||l_line_rec.id, 1);
5819: my_debug('15510 : Error Line String'||l_line_rec.line_num, 1);
5820: END IF;
5821:
5822: OKC_API.set_message(p_app_name => g_app_name,
5823: p_msg_name => 'OKC_BACK_CALC_ERROR',
5824: p_token1 => 'line_num',
5825: p_token1_value => l_line_rec.line_num);
5826: --san x_return_status := OKC_API.G_RET_STS_ERROR;

Line 5826: --san x_return_status := OKC_API.G_RET_STS_ERROR;

5822: OKC_API.set_message(p_app_name => g_app_name,
5823: p_msg_name => 'OKC_BACK_CALC_ERROR',
5824: p_token1 => 'line_num',
5825: p_token1_value => l_line_rec.line_num);
5826: --san x_return_status := OKC_API.G_RET_STS_ERROR;
5827: x_return_status := G_SOME_LINE_ERRORED;
5828:
5829:
5830: elsif p_req_line_tbl(i).line_Type_code ='LINE' and

Line 5988: If x_return_status <> OKC_API.G_RET_STS_SUCCESS and

5984:
5985: -- If we are trying to reprice the whole contract and even one request line came back with
5986: -- an error, we would rollback for all the lines as header level pricing should succeed
5987: -- either for all lines or none.
5988: If x_return_status <> OKC_API.G_RET_STS_SUCCESS and
5989: (p_control_rec.p_level in ( 'H','QA') OR p_control_rec.p_config_yn <> 'N') then
5990: l_return_status:= x_return_status;
5991: -- Though for header pricing we want to rollback even if one line failed
5992: If l_return_status = G_SOME_LINE_ERRORED then

Line 5993: l_return_status:= OKC_API.G_RET_STS_ERROR;

5989: (p_control_rec.p_level in ( 'H','QA') OR p_control_rec.p_config_yn <> 'N') then
5990: l_return_status:= x_return_status;
5991: -- Though for header pricing we want to rollback even if one line failed
5992: If l_return_status = G_SOME_LINE_ERRORED then
5993: l_return_status:= OKC_API.G_RET_STS_ERROR;
5994: END IF;
5995: IF p_control_rec.p_level in ( 'H','QA') then
5996: OKC_API.set_message(p_app_name => g_app_name,
5997: p_msg_name => 'OKC_STOP_HDR_ADJS');

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

5992: If l_return_status = G_SOME_LINE_ERRORED then
5993: l_return_status:= OKC_API.G_RET_STS_ERROR;
5994: END IF;
5995: IF p_control_rec.p_level in ( 'H','QA') then
5996: OKC_API.set_message(p_app_name => g_app_name,
5997: p_msg_name => 'OKC_STOP_HDR_ADJS');
5998: END IF;
5999: Raise l_exception_stop;
6000: End If;

Line 6029: If l_return_status <> OKC_API.G_RET_STS_SUCCESS then

6025: x_msg_data => x_msg_data);
6026: IF (l_debug = 'Y') THEN
6027: my_debug('15690 :After process adjustment details return status:- '||l_return_status);
6028: END IF;
6029: If l_return_status <> OKC_API.G_RET_STS_SUCCESS then
6030: raise l_exception_stop;
6031: End if;
6032: END IF;
6033: IF (l_debug = 'Y') THEN

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

6048: END IF;
6049:
6050: When others then
6051: --dbms_output.put_line('came here'||sqlcode||substr(sqlerrm,1,235));
6052: OKC_API.set_message(p_app_name => g_app_name,
6053: p_msg_name => G_UNEXPECTED_ERROR,
6054: p_token1 => G_SQLCODE_TOKEN,
6055: p_token1_value => SQLCODE,
6056: p_token2 => G_SQLERRM_TOKEN,

Line 6058: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

6054: p_token1 => G_SQLCODE_TOKEN,
6055: p_token1_value => SQLCODE,
6056: p_token2 => G_SQLERRM_TOKEN,
6057: p_token2_value => SQLERRM);
6058: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
6059: IF (l_debug = 'Y') THEN
6060: my_debug('15900 : Exiting PROCESS_ADJUSTMENTS', 4);
6061: END IF;
6062: IF (l_debug = 'Y') THEN

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

6089: x_return_status OUT NOCOPY VARCHAR2,
6090: x_msg_count OUT NOCOPY NUMBER,
6091: x_msg_data OUT NOCOPY VARCHAR2) IS
6092:
6093: l_return_status varchar2(1) := OKC_API.G_RET_STS_SUCCESS;
6094: l_api_name constant VARCHAR2(30) := 'CALCULATE PRICE';
6095: l_hdr_prc_contexts_Tbl QP_PREQ_GRP.LINE_ATTR_TBL_TYPE;
6096: l_hdr_qual_contexts_Tbl QP_PREQ_GRP.QUAL_TBL_TYPE;
6097:

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

6139: l_check VARCHAR(2) := 'N';
6140:
6141: FUNCTION load_applied_adjs(i pls_integer)
6142: Return varchar2 is
6143: l_return_status varchar2(1):= OKC_API.G_RET_STS_SUCCESS;
6144: cursor l_cle(p_id number,pchr_id number) is
6145: select *
6146: from okc_price_adjustments a
6147: where

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

6342:
6343: return l_return_status;
6344: exception
6345: When Others then
6346: OKC_API.set_message(p_app_name => g_app_name,
6347: p_msg_name => g_unexpected_error,
6348: p_token1 => g_sqlcode_token,
6349: p_token1_value => sqlcode,
6350: p_token2 => g_sqlerrm_token,

Line 6352: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

6348: p_token1 => g_sqlcode_token,
6349: p_token1_value => sqlcode,
6350: p_token2 => g_sqlerrm_token,
6351: p_token2_value => sqlerrm);
6352: l_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
6353: If l_chr%isopen then
6354: close l_chr;
6355: Elsif l_cle%isopen then
6356: close l_cle;

Line 6379: x_return_status := OKC_API.G_RET_STS_SUCCESS;

6375: IF (l_debug = 'Y') THEN
6376: my_debug('16500 : Entering CALCULATE_PRICE', 2);
6377: END IF;
6378:
6379: x_return_status := OKC_API.G_RET_STS_SUCCESS;
6380:
6381: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
6382: p_init_msg_list,
6383: '_PROCESS',

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

6377: END IF;
6378:
6379: x_return_status := OKC_API.G_RET_STS_SUCCESS;
6380:
6381: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
6382: p_init_msg_list,
6383: '_PROCESS',
6384: x_return_status);
6385: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN

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

6381: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
6382: p_init_msg_list,
6383: '_PROCESS',
6384: x_return_status);
6385: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
6386: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6387: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
6388: raise OKC_API.G_EXCEPTION_ERROR;
6389: END IF;

Line 6386: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

6382: p_init_msg_list,
6383: '_PROCESS',
6384: x_return_status);
6385: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
6386: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6387: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
6388: raise OKC_API.G_EXCEPTION_ERROR;
6389: END IF;
6390:

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

6383: '_PROCESS',
6384: x_return_status);
6385: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
6386: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6387: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
6388: raise OKC_API.G_EXCEPTION_ERROR;
6389: END IF;
6390:
6391: IF p_control_rec.p_level = 'QA' THEN

Line 6388: raise OKC_API.G_EXCEPTION_ERROR;

6384: x_return_status);
6385: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
6386: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6387: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
6388: raise OKC_API.G_EXCEPTION_ERROR;
6389: END IF;
6390:
6391: IF p_control_rec.p_level = 'QA' THEN
6392: g_qa_mode := 'Y';

Line 6412: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

6408: x_msg_count => x_msg_count,
6409: x_msg_data => x_msg_data);
6410: --dbms_output.put_line('4return status'||x_return_status);
6411:
6412: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
6413: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6414: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
6415: RAISE OKC_API.G_EXCEPTION_ERROR;
6416: END IF;

Line 6413: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

6409: x_msg_data => x_msg_data);
6410: --dbms_output.put_line('4return status'||x_return_status);
6411:
6412: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
6413: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6414: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
6415: RAISE OKC_API.G_EXCEPTION_ERROR;
6416: END IF;
6417: End If; -- p_calc_flag

Line 6414: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN

6410: --dbms_output.put_line('4return status'||x_return_status);
6411:
6412: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
6413: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6414: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
6415: RAISE OKC_API.G_EXCEPTION_ERROR;
6416: END IF;
6417: End If; -- p_calc_flag
6418: -- if not a configurated line

Line 6415: RAISE OKC_API.G_EXCEPTION_ERROR;

6411:
6412: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
6413: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6414: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR THEN
6415: RAISE OKC_API.G_EXCEPTION_ERROR;
6416: END IF;
6417: End If; -- p_calc_flag
6418: -- if not a configurated line
6419: If l_okc_control_rec.p_config_yn = 'N' then

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

6440: If l_priced_tbl.count<1 then
6441: IF l_okc_control_rec.p_level = 'QA' then
6442: RAISE l_exception_STOP;
6443: Else
6444: OKC_API.set_message(p_app_name => g_app_name,
6445: p_msg_name => 'OKC_NO_QP_ROW');
6446:
6447: l_return_status:= OKC_API.G_RET_STS_ERROR;
6448: RAISE OKC_API.G_EXCEPTION_ERROR;

Line 6447: l_return_status:= OKC_API.G_RET_STS_ERROR;

6443: Else
6444: OKC_API.set_message(p_app_name => g_app_name,
6445: p_msg_name => 'OKC_NO_QP_ROW');
6446:
6447: l_return_status:= OKC_API.G_RET_STS_ERROR;
6448: RAISE OKC_API.G_EXCEPTION_ERROR;
6449:
6450: End IF;
6451:

Line 6448: RAISE OKC_API.G_EXCEPTION_ERROR;

6444: OKC_API.set_message(p_app_name => g_app_name,
6445: p_msg_name => 'OKC_NO_QP_ROW');
6446:
6447: l_return_status:= OKC_API.G_RET_STS_ERROR;
6448: RAISE OKC_API.G_EXCEPTION_ERROR;
6449:
6450: End IF;
6451:
6452: End if;

Line 6473: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

6469: x_return_status => l_return_status,
6470: x_line_tbl => l_line_tbl,
6471: x_bpi_ind => l_bpi_ind ,
6472: x_pi_ind => l_pi_ind);
6473: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
6474: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6475: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
6476: RAISE OKC_API.G_EXCEPTION_ERROR;
6477: END IF;

Line 6474: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

6470: x_line_tbl => l_line_tbl,
6471: x_bpi_ind => l_bpi_ind ,
6472: x_pi_ind => l_pi_ind);
6473: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
6474: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6475: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
6476: RAISE OKC_API.G_EXCEPTION_ERROR;
6477: END IF;
6478: If l_line_tbl.count = 0 then

Line 6475: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

6471: x_bpi_ind => l_bpi_ind ,
6472: x_pi_ind => l_pi_ind);
6473: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
6474: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6475: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
6476: RAISE OKC_API.G_EXCEPTION_ERROR;
6477: END IF;
6478: If l_line_tbl.count = 0 then
6479: IF (l_debug = 'Y') THEN

Line 6476: RAISE OKC_API.G_EXCEPTION_ERROR;

6472: x_pi_ind => l_pi_ind);
6473: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
6474: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6475: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
6476: RAISE OKC_API.G_EXCEPTION_ERROR;
6477: END IF;
6478: If l_line_tbl.count = 0 then
6479: IF (l_debug = 'Y') THEN
6480: my_debug('16555 :Code error should not happen '||l_priced_tbl(i),2);

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

6478: If l_line_tbl.count = 0 then
6479: IF (l_debug = 'Y') THEN
6480: my_debug('16555 :Code error should not happen '||l_priced_tbl(i),2);
6481: END IF;
6482: OKC_API.set_message(p_app_name => g_app_name,
6483: p_msg_name => 'OKC_NO_ROW');
6484: RAISE OKC_API.G_EXCEPTION_ERROR;
6485: End If;
6486: IF (l_debug = 'Y') THEN

Line 6484: RAISE OKC_API.G_EXCEPTION_ERROR;

6480: my_debug('16555 :Code error should not happen '||l_priced_tbl(i),2);
6481: END IF;
6482: OKC_API.set_message(p_app_name => g_app_name,
6483: p_msg_name => 'OKC_NO_ROW');
6484: RAISE OKC_API.G_EXCEPTION_ERROR;
6485: End If;
6486: IF (l_debug = 'Y') THEN
6487: my_debug('16556 :got line ids -count '||l_line_tbl.count,1);
6488: my_debug('16557 :Id of the Priced line should be '||l_line_tbl(1).id,1);

Line 6570: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

6566: IF (l_debug = 'Y') THEN
6567: my_debug('16563 : after calling create_request_line'||l_return_status);
6568: END IF;
6569: End If;
6570: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
6571: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6572: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
6573: RAISE OKC_API.G_EXCEPTION_ERROR;
6574: END IF;

Line 6571: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

6567: my_debug('16563 : after calling create_request_line'||l_return_status);
6568: END IF;
6569: End If;
6570: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
6571: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6572: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
6573: RAISE OKC_API.G_EXCEPTION_ERROR;
6574: END IF;
6575: l_req_line_index := nvl(l_req_line_tbl.last,0);

Line 6572: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

6568: END IF;
6569: End If;
6570: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
6571: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6572: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
6573: RAISE OKC_API.G_EXCEPTION_ERROR;
6574: END IF;
6575: l_req_line_index := nvl(l_req_line_tbl.last,0);
6576: If l_bpi_ind > 0 then

Line 6573: RAISE OKC_API.G_EXCEPTION_ERROR;

6569: End If;
6570: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
6571: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6572: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
6573: RAISE OKC_API.G_EXCEPTION_ERROR;
6574: END IF;
6575: l_req_line_index := nvl(l_req_line_tbl.last,0);
6576: If l_bpi_ind > 0 then
6577: --loop and take out all the pricing attributes belonging to bpi

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

6628: END LOOP; -- l_priced_tbl loop
6629: Elsif l_okc_control_rec.p_config_yn in ('Y','S') then --p_config_flag
6630: OKC_PRICE_PUB.G_CONTRACT_INFO:= null;
6631: If l_okc_control_rec.p_top_model_id is null then
6632: OKC_API.set_message(p_app_name => g_app_name,
6633: p_msg_name => 'OKC_INVALID_TOP_MODEL');
6634: RAISE OKC_API.G_EXCEPTION_ERROR;
6635: End if;
6636: If px_cle_price_tbl.count<1 then

Line 6634: RAISE OKC_API.G_EXCEPTION_ERROR;

6630: OKC_PRICE_PUB.G_CONTRACT_INFO:= null;
6631: If l_okc_control_rec.p_top_model_id is null then
6632: OKC_API.set_message(p_app_name => g_app_name,
6633: p_msg_name => 'OKC_INVALID_TOP_MODEL');
6634: RAISE OKC_API.G_EXCEPTION_ERROR;
6635: End if;
6636: If px_cle_price_tbl.count<1 then
6637: OKC_API.set_message(p_app_name => g_app_name,
6638: p_msg_name => 'OKC_NO_QP_ROW');

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

6633: p_msg_name => 'OKC_INVALID_TOP_MODEL');
6634: RAISE OKC_API.G_EXCEPTION_ERROR;
6635: End if;
6636: If px_cle_price_tbl.count<1 then
6637: OKC_API.set_message(p_app_name => g_app_name,
6638: p_msg_name => 'OKC_NO_QP_ROW');
6639: RAISE OKC_API.G_EXCEPTION_ERROR;
6640: End if;
6641: Set_control_rec(l_okc_control_rec);

Line 6639: RAISE OKC_API.G_EXCEPTION_ERROR;

6635: End if;
6636: If px_cle_price_tbl.count<1 then
6637: OKC_API.set_message(p_app_name => g_app_name,
6638: p_msg_name => 'OKC_NO_QP_ROW');
6639: RAISE OKC_API.G_EXCEPTION_ERROR;
6640: End if;
6641: Set_control_rec(l_okc_control_rec);
6642: l_control_rec := l_okc_control_rec.qp_control_rec;
6643: l_line_tbl.delete;

Line 6713: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

6709: x_qualifier_contexts_Tbl => l_qual_Tbl,
6710: x_return_status => l_return_status,
6711: x_msg_count => x_msg_count,
6712: x_msg_data => x_msg_data);
6713: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
6714: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6715: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
6716: RAISE OKC_API.G_EXCEPTION_ERROR;
6717: END IF;

Line 6714: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

6710: x_return_status => l_return_status,
6711: x_msg_count => x_msg_count,
6712: x_msg_data => x_msg_data);
6713: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
6714: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6715: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
6716: RAISE OKC_API.G_EXCEPTION_ERROR;
6717: END IF;
6718: --dbms_output.put_line('config 1');

Line 6715: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

6711: x_msg_count => x_msg_count,
6712: x_msg_data => x_msg_data);
6713: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
6714: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6715: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
6716: RAISE OKC_API.G_EXCEPTION_ERROR;
6717: END IF;
6718: --dbms_output.put_line('config 1');
6719:

Line 6716: RAISE OKC_API.G_EXCEPTION_ERROR;

6712: x_msg_data => x_msg_data);
6713: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
6714: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6715: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
6716: RAISE OKC_API.G_EXCEPTION_ERROR;
6717: END IF;
6718: --dbms_output.put_line('config 1');
6719:
6720: --attach header attribs

Line 6739: and px_cle_price_tbl(i).pricelist_id <> OKC_API.G_MISS_NUM then

6735: l_pricing_contexts_Tbl(i).PRICING_ATTR_VALUE_FROM := px_cle_price_tbl(i).id1; -- Inventory Item Id
6736: l_pricing_contexts_Tbl(i).VALIDATED_FLAG :='N';
6737:
6738: IF px_cle_price_tbl(i).pricelist_id is not null
6739: and px_cle_price_tbl(i).pricelist_id <> OKC_API.G_MISS_NUM then
6740: l_qualifiers_contexts_Tbl(i).LINE_INDEX := i;
6741: l_qualifiers_contexts_Tbl(i).QUALIFIER_CONTEXT :='MODLIST';
6742: l_qualifiers_contexts_Tbl(i).QUALIFIER_ATTRIBUTE :='QUALIFIER_ATTRIBUTE4';
6743: l_qualifiers_contexts_Tbl(i).QUALIFIER_ATTR_VALUE_FROM := to_char(px_cle_price_tbl(i).pricelist_id); -- Price List Id

Line 6829: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

6825: -- load the applied adjustments for the all the request lines
6826: i:= l_req_line_tbl.first;
6827: while i is not null loop
6828: l_return_status :=load_applied_adjs(i);
6829: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
6830: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6831: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
6832: RAISE OKC_API.G_EXCEPTION_ERROR;
6833: END IF;

Line 6830: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

6826: i:= l_req_line_tbl.first;
6827: while i is not null loop
6828: l_return_status :=load_applied_adjs(i);
6829: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
6830: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6831: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
6832: RAISE OKC_API.G_EXCEPTION_ERROR;
6833: END IF;
6834:

Line 6831: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

6827: while i is not null loop
6828: l_return_status :=load_applied_adjs(i);
6829: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
6830: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6831: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
6832: RAISE OKC_API.G_EXCEPTION_ERROR;
6833: END IF;
6834:
6835: i:=l_req_line_tbl.next(i);

Line 6832: RAISE OKC_API.G_EXCEPTION_ERROR;

6828: l_return_status :=load_applied_adjs(i);
6829: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
6830: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
6831: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
6832: RAISE OKC_API.G_EXCEPTION_ERROR;
6833: END IF;
6834:
6835: i:=l_req_line_tbl.next(i);
6836: End loop;

Line 7009: IF l_return_status <> OKC_API.G_RET_STS_SUCCESS THEN

7005: IF (l_debug = 'Y') THEN
7006: my_debug('16925:After Calling Price Request. Return status'||l_return_status);
7007: END IF;
7008:
7009: IF l_return_status <> OKC_API.G_RET_STS_SUCCESS THEN
7010: RAISE l_exception_stop;
7011: END IF;
7012:
7013: Exception

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

7011: END IF;
7012:
7013: Exception
7014: WHEN l_exception_stop THEN
7015: OKC_API.set_message(p_app_name => g_app_name,
7016: p_msg_name => 'OKC_QP_PRICE_ERROR',
7017: p_token1 => 'Proc',
7018: p_token1_value => 'Price Request',
7019: p_token2 => 'err_text',

Line 7021: If l_return_status = OKC_API.G_RET_STS_ERROR then

7017: p_token1 => 'Proc',
7018: p_token1_value => 'Price Request',
7019: p_token2 => 'err_text',
7020: p_token2_value => l_return_status_text);
7021: If l_return_status = OKC_API.G_RET_STS_ERROR then
7022: Raise OKC_API.G_EXCEPTION_ERROR;
7023: ELSE
7024: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
7025: END IF;

Line 7022: Raise OKC_API.G_EXCEPTION_ERROR;

7018: p_token1_value => 'Price Request',
7019: p_token2 => 'err_text',
7020: p_token2_value => l_return_status_text);
7021: If l_return_status = OKC_API.G_RET_STS_ERROR then
7022: Raise OKC_API.G_EXCEPTION_ERROR;
7023: ELSE
7024: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
7025: END IF;
7026:

Line 7024: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

7020: p_token2_value => l_return_status_text);
7021: If l_return_status = OKC_API.G_RET_STS_ERROR then
7022: Raise OKC_API.G_EXCEPTION_ERROR;
7023: ELSE
7024: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
7025: END IF;
7026:
7027: when others then
7028: IF (l_debug = 'Y') THEN

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

7027: when others then
7028: IF (l_debug = 'Y') THEN
7029: my_debug('16926:error'||substr(sqlerrm,1,240));
7030: END IF;
7031: OKC_API.set_message(p_app_name => g_app_name,
7032: p_msg_name => 'OKC_QP_INT_ERROR',
7033: p_token1 => 'Proc',
7034: p_token1_value => 'Price Request',
7035: p_token2 => 'SQLCODE',

Line 7039: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

7035: p_token2 => 'SQLCODE',
7036: p_token2_value => SQLCODE,
7037: p_token3 => 'SQLERRM',
7038: p_token3_value => SQLERRM);
7039: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
7040:
7041: END;
7042: --dbmsoutput area
7043: IF (l_debug = 'Y') THEN

Line 7258: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

7254: IF (l_debug = 'Y') THEN
7255: my_debug('17090:After calling process_adjustments'||l_return_status);
7256: END IF;
7257:
7258: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
7259: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
7260: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
7261: RAISE OKC_API.G_EXCEPTION_ERROR;
7262: ELSIF l_return_status = G_SOME_LINE_ERRORED THEN

Line 7259: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

7255: my_debug('17090:After calling process_adjustments'||l_return_status);
7256: END IF;
7257:
7258: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
7259: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
7260: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
7261: RAISE OKC_API.G_EXCEPTION_ERROR;
7262: ELSIF l_return_status = G_SOME_LINE_ERRORED THEN
7263: x_return_status := l_return_status;

Line 7260: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN

7256: END IF;
7257:
7258: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
7259: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
7260: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
7261: RAISE OKC_API.G_EXCEPTION_ERROR;
7262: ELSIF l_return_status = G_SOME_LINE_ERRORED THEN
7263: x_return_status := l_return_status;
7264:

Line 7261: RAISE OKC_API.G_EXCEPTION_ERROR;

7257:
7258: IF l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
7259: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
7260: ELSIF l_return_status = OKC_API.G_RET_STS_ERROR THEN
7261: RAISE OKC_API.G_EXCEPTION_ERROR;
7262: ELSIF l_return_status = G_SOME_LINE_ERRORED THEN
7263: x_return_status := l_return_status;
7264:
7265: END IF;

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

7264:
7265: END IF;
7266:
7267:
7268: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
7269:
7270: IF (l_debug = 'Y') THEN
7271: my_debug('17096 : Exiting CALCULATE_PRICE', 2);
7272: END IF;

Line 7280: x_return_status:= OKC_API.G_RET_STS_SUCCESS;

7276:
7277:
7278: EXCEPTION
7279: when l_exception_stop then
7280: x_return_status:= OKC_API.G_RET_STS_SUCCESS;
7281: RAISE l_exception_stop;
7282: IF (l_debug = 'Y') THEN
7283: my_debug('17690 : Exiting CALCULATE_PRICE', 4);
7284: END IF;

Line 7289: WHEN OKC_API.G_EXCEPTION_ERROR THEN

7285: IF (l_debug = 'Y') THEN
7286: okc_debug.Reset_Indentation;
7287: END IF;
7288:
7289: WHEN OKC_API.G_EXCEPTION_ERROR THEN
7290: x_return_status := OKC_API.HANDLE_EXCEPTIONS
7291: (l_api_name,
7292: G_PKG_NAME,
7293: 'OKC_API.G_RET_STS_ERROR',

Line 7290: x_return_status := OKC_API.HANDLE_EXCEPTIONS

7286: okc_debug.Reset_Indentation;
7287: END IF;
7288:
7289: WHEN OKC_API.G_EXCEPTION_ERROR THEN
7290: x_return_status := OKC_API.HANDLE_EXCEPTIONS
7291: (l_api_name,
7292: G_PKG_NAME,
7293: 'OKC_API.G_RET_STS_ERROR',
7294: x_msg_count,

Line 7293: 'OKC_API.G_RET_STS_ERROR',

7289: WHEN OKC_API.G_EXCEPTION_ERROR THEN
7290: x_return_status := OKC_API.HANDLE_EXCEPTIONS
7291: (l_api_name,
7292: G_PKG_NAME,
7293: 'OKC_API.G_RET_STS_ERROR',
7294: x_msg_count,
7295: x_msg_data,
7296: '_PROCESS');
7297: IF (l_debug = 'Y') THEN

Line 7304: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN

7300: IF (l_debug = 'Y') THEN
7301: okc_debug.Reset_Indentation;
7302: END IF;
7303:
7304: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
7305: x_return_status := OKC_API.HANDLE_EXCEPTIONS
7306: (l_api_name,
7307: G_PKG_NAME,
7308: 'OKC_API.G_RET_STS_UNEXP_ERROR',

Line 7305: x_return_status := OKC_API.HANDLE_EXCEPTIONS

7301: okc_debug.Reset_Indentation;
7302: END IF;
7303:
7304: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
7305: x_return_status := OKC_API.HANDLE_EXCEPTIONS
7306: (l_api_name,
7307: G_PKG_NAME,
7308: 'OKC_API.G_RET_STS_UNEXP_ERROR',
7309: x_msg_count,

Line 7308: 'OKC_API.G_RET_STS_UNEXP_ERROR',

7304: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
7305: x_return_status := OKC_API.HANDLE_EXCEPTIONS
7306: (l_api_name,
7307: G_PKG_NAME,
7308: 'OKC_API.G_RET_STS_UNEXP_ERROR',
7309: x_msg_count,
7310: x_msg_data,
7311: '_PROCESS');
7312: IF (l_debug = 'Y') THEN

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

7316: okc_debug.Reset_Indentation;
7317: END IF;
7318:
7319: WHEN OTHERS THEN
7320: OKC_API.set_message(p_app_name => g_app_name,
7321: p_msg_name => g_unexpected_error,
7322: p_token1 => g_sqlcode_token,
7323: p_token1_value => sqlcode,
7324: p_token2 => g_sqlerrm_token,

Line 7326: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

7322: p_token1 => g_sqlcode_token,
7323: p_token1_value => sqlcode,
7324: p_token2 => g_sqlerrm_token,
7325: p_token2_value => sqlerrm);
7326: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
7327: IF (l_debug = 'Y') THEN
7328: my_debug('17898 : error ocurred'||sqlcode||sqlerrm, 4);
7329: END IF;
7330:

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

7354: x_ADJ_tbl OUT NOCOPY MANUAL_Adj_Tbl_Type,
7355: x_return_status OUT NOCOPY VARCHAR2,
7356: x_msg_count OUT NOCOPY NUMBER,
7357: x_msg_data OUT NOCOPY VARCHAR2) IS
7358: l_return_status varchar2(1) :=OKC_API.G_RET_STS_SUCCESS;
7359:
7360: l_api_name constant VARCHAR2(30) := 'Get_manual_adjustments';
7361: l_cle_id_tbl num_tbl_type;
7362: i pls_integer :=0;

Line 7385: x_return_status := OKC_API.G_RET_STS_SUCCESS;

7381: IF (l_debug = 'Y') THEN
7382: my_debug('18000 : Entering GET_MANUAL_ADJUSTMENTS', 2);
7383: END IF;
7384:
7385: x_return_status := OKC_API.G_RET_STS_SUCCESS;
7386:
7387: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
7388: p_init_msg_list,
7389: '_PROCESS',

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

7383: END IF;
7384:
7385: x_return_status := OKC_API.G_RET_STS_SUCCESS;
7386:
7387: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
7388: p_init_msg_list,
7389: '_PROCESS',
7390: x_return_status);
7391: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN

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

7387: l_return_status := OKC_API.START_ACTIVITY(l_api_name,
7388: p_init_msg_list,
7389: '_PROCESS',
7390: x_return_status);
7391: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
7392: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
7393: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
7394: raise OKC_API.G_EXCEPTION_ERROR;
7395: END IF;

Line 7392: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

7388: p_init_msg_list,
7389: '_PROCESS',
7390: x_return_status);
7391: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
7392: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
7393: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
7394: raise OKC_API.G_EXCEPTION_ERROR;
7395: END IF;
7396: l_control_rec.p_calc_flag:='S';

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

7389: '_PROCESS',
7390: x_return_status);
7391: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
7392: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
7393: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
7394: raise OKC_API.G_EXCEPTION_ERROR;
7395: END IF;
7396: l_control_rec.p_calc_flag:='S';
7397: Set_control_rec(l_control_rec);

Line 7394: raise OKC_API.G_EXCEPTION_ERROR;

7390: x_return_status);
7391: IF (l_return_status = OKC_API.G_RET_STS_UNEXP_ERROR) THEN
7392: raise OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
7393: ELSIF (l_return_status = OKC_API.G_RET_STS_ERROR) THEN
7394: raise OKC_API.G_EXCEPTION_ERROR;
7395: END IF;
7396: l_control_rec.p_calc_flag:='S';
7397: Set_control_rec(l_control_rec);
7398:

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

7414: ELSIF l_control_rec.p_level = 'L' and p_cle_id is not null then
7415: l_cle_price_tbl(1).id:=p_cle_id;
7416: l_id := p_cle_id;
7417: ELSIF l_control_rec.p_level = 'QA' then
7418: OKC_API.set_message(p_app_name => g_app_name,
7419: p_msg_name => 'OKC_INVALID_LEVEL',
7420: p_token1 => 'level',
7421: p_token1_value => 'QA');
7422:

Line 7423: RAISE OKC_API.G_EXCEPTION_ERROR;

7419: p_msg_name => 'OKC_INVALID_LEVEL',
7420: p_token1 => 'level',
7421: p_token1_value => 'QA');
7422:
7423: RAISE OKC_API.G_EXCEPTION_ERROR;
7424: End if;
7425:
7426: CALCULATE_price(p_api_version => p_api_version,
7427: p_CHR_ID => p_chr_id,

Line 7440: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN

7436: px_CLE_PRICE_TBL => l_CLE_PRICE_TBL,
7437: x_return_status => x_return_status,
7438: x_msg_count => x_msg_count,
7439: x_msg_data => x_msg_data);
7440: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
7441: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
7442: --Since there is only one line here in case of error return the error found
7443: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR OR x_return_status = OKC_API.G_RET_STS_ERROR THEN
7444: RAISE OKC_API.G_EXCEPTION_ERROR;

Line 7441: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;

7437: x_return_status => x_return_status,
7438: x_msg_count => x_msg_count,
7439: x_msg_data => x_msg_data);
7440: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
7441: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
7442: --Since there is only one line here in case of error return the error found
7443: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR OR x_return_status = OKC_API.G_RET_STS_ERROR THEN
7444: RAISE OKC_API.G_EXCEPTION_ERROR;
7445: END IF;

Line 7443: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR OR x_return_status = OKC_API.G_RET_STS_ERROR THEN

7439: x_msg_data => x_msg_data);
7440: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
7441: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
7442: --Since there is only one line here in case of error return the error found
7443: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR OR x_return_status = OKC_API.G_RET_STS_ERROR THEN
7444: RAISE OKC_API.G_EXCEPTION_ERROR;
7445: END IF;
7446: i:=l_req_line_detail_tbl.first;
7447: While i Is not Null Loop

Line 7444: RAISE OKC_API.G_EXCEPTION_ERROR;

7440: IF x_return_status = OKC_API.G_RET_STS_UNEXP_ERROR THEN
7441: RAISE OKC_API.G_EXCEPTION_UNEXPECTED_ERROR;
7442: --Since there is only one line here in case of error return the error found
7443: ELSIF x_return_status = OKC_API.G_RET_STS_ERROR OR x_return_status = OKC_API.G_RET_STS_ERROR THEN
7444: RAISE OKC_API.G_EXCEPTION_ERROR;
7445: END IF;
7446: i:=l_req_line_detail_tbl.first;
7447: While i Is not Null Loop
7448: If l_req_line_detail_tbl(i).automatic_flag = 'N' Then --#2

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

7517: I := x_adj_tbl.NEXT(I);
7518:
7519:
7520: END LOOP;
7521: OKC_API.END_ACTIVITY(x_msg_count, x_msg_data);
7522:
7523: IF (l_debug = 'Y') THEN
7524: my_debug('18600 : Exiting GET_MANUAL_ADJUSTMENTS', 2);
7525: END IF;

Line 7532: WHEN OKC_API.G_EXCEPTION_ERROR THEN

7528: END IF;
7529:
7530: END IF; ----end dbmsoutput area
7531: EXCEPTION
7532: WHEN OKC_API.G_EXCEPTION_ERROR THEN
7533: x_return_status := OKC_API.HANDLE_EXCEPTIONS
7534: (l_api_name,
7535: G_PKG_NAME,
7536: 'OKC_API.G_RET_STS_ERROR',

Line 7533: x_return_status := OKC_API.HANDLE_EXCEPTIONS

7529:
7530: END IF; ----end dbmsoutput area
7531: EXCEPTION
7532: WHEN OKC_API.G_EXCEPTION_ERROR THEN
7533: x_return_status := OKC_API.HANDLE_EXCEPTIONS
7534: (l_api_name,
7535: G_PKG_NAME,
7536: 'OKC_API.G_RET_STS_ERROR',
7537: x_msg_count,

Line 7536: 'OKC_API.G_RET_STS_ERROR',

7532: WHEN OKC_API.G_EXCEPTION_ERROR THEN
7533: x_return_status := OKC_API.HANDLE_EXCEPTIONS
7534: (l_api_name,
7535: G_PKG_NAME,
7536: 'OKC_API.G_RET_STS_ERROR',
7537: x_msg_count,
7538: x_msg_data,
7539: '_PROCESS');
7540: IF (l_debug = 'Y') THEN

Line 7547: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN

7543: IF (l_debug = 'Y') THEN
7544: okc_debug.Reset_Indentation;
7545: END IF;
7546:
7547: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
7548: x_return_status := OKC_API.HANDLE_EXCEPTIONS
7549: (l_api_name,
7550: G_PKG_NAME,
7551: 'OKC_API.G_RET_STS_UNEXP_ERROR',

Line 7548: x_return_status := OKC_API.HANDLE_EXCEPTIONS

7544: okc_debug.Reset_Indentation;
7545: END IF;
7546:
7547: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
7548: x_return_status := OKC_API.HANDLE_EXCEPTIONS
7549: (l_api_name,
7550: G_PKG_NAME,
7551: 'OKC_API.G_RET_STS_UNEXP_ERROR',
7552: x_msg_count,

Line 7551: 'OKC_API.G_RET_STS_UNEXP_ERROR',

7547: WHEN OKC_API.G_EXCEPTION_UNEXPECTED_ERROR THEN
7548: x_return_status := OKC_API.HANDLE_EXCEPTIONS
7549: (l_api_name,
7550: G_PKG_NAME,
7551: 'OKC_API.G_RET_STS_UNEXP_ERROR',
7552: x_msg_count,
7553: x_msg_data,
7554: '_PROCESS');
7555: IF (l_debug = 'Y') THEN

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

7559: okc_debug.Reset_Indentation;
7560: END IF;
7561:
7562: WHEN OTHERS THEN
7563: OKC_API.set_message(p_app_name => g_app_name,
7564: p_msg_name => g_unexpected_error,
7565: p_token1 => g_sqlcode_token,
7566: p_token1_value => sqlcode,
7567: p_token2 => g_sqlerrm_token,

Line 7569: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;

7565: p_token1 => g_sqlcode_token,
7566: p_token1_value => sqlcode,
7567: p_token2 => g_sqlerrm_token,
7568: p_token2_value => sqlerrm);
7569: x_return_status := OKC_API.G_RET_STS_UNEXP_ERROR;
7570: IF (l_debug = 'Y') THEN
7571: my_debug('18900 : Exiting GET_MANUAL_ADJUSTMENTS', 4);
7572: END IF;
7573: IF (l_debug = 'Y') THEN