340: ASO_QUOTE_UTIL_PVT.Debug('aso_service_contracts_int_w.getServices BEGIN....');
341: -- Standard Start of API savepoint
342: SAVEPOINT GET_SERVICES_PUB;
343:
344: aso_debug_pub.g_debug_flag := Aso_Quote_Util_Pvt.is_debug_enabled;
345: -- Standard call to check for call compatibility.
346: IF NOT FND_API.Compatible_API_Call ( l_api_version,
347: p_api_version_number,
348: l_api_name,
390: x_warranty_flag_tbl := JTF_VARCHAR2_TABLE_100();
391:
392: IF (p_source ='INSTALL_BASE') THEN
393:
394: IF aso_debug_pub.g_debug_flag = 'Y' THEN
395: aso_debug_pub.add('Aso_Service_Contracts_int_w:Get_Services p_source = INSTALL_BASE ', 1, 'N');
396: END IF;
397:
398: l_inp_rec.validate_flag :='Y'; -- show all contracts
391:
392: IF (p_source ='INSTALL_BASE') THEN
393:
394: IF aso_debug_pub.g_debug_flag = 'Y' THEN
395: aso_debug_pub.add('Aso_Service_Contracts_int_w:Get_Services p_source = INSTALL_BASE ', 1, 'N');
396: END IF;
397:
398: l_inp_rec.validate_flag :='Y'; -- show all contracts
399: l_inp_rec.product_id :=p_source_Id;
411: x_msg_count => x_msg_count,
412: x_msg_data => x_msg_data);
413: ASO_QUOTE_UTIL_PVT.Debug('Ending oks_entitlements_pub.get_contracts InstallBase');
414:
415: IF aso_debug_pub.g_debug_flag = 'Y' THEN
416: aso_debug_pub.add('ASO_Service_contracts_int_w: After Call to OKS entitlements get contracts: x_return_status '|| x_return_status, 1, 'N');
417: END IF;
418:
419: -- Check return status from the above procedure call
412: x_msg_data => x_msg_data);
413: ASO_QUOTE_UTIL_PVT.Debug('Ending oks_entitlements_pub.get_contracts InstallBase');
414:
415: IF aso_debug_pub.g_debug_flag = 'Y' THEN
416: aso_debug_pub.add('ASO_Service_contracts_int_w: After Call to OKS entitlements get contracts: x_return_status '|| x_return_status, 1, 'N');
417: END IF;
418:
419: -- Check return status from the above procedure call
420: IF x_return_status = FND_API.G_RET_STS_ERROR then
455: END IF;
456: END IF;
457: ELSIF (p_source='QUOTE') THEN
458:
459: IF aso_debug_pub.g_debug_flag = 'Y' THEN
460: aso_debug_pub.add('Aso_Service_Contracts_int_w:Get_Services p_source:= QUOTE', 1, 'N');
461: END IF;
462:
463: FOR c_InvOrg_or IN c_getInvOrgId_qe LOOP
456: END IF;
457: ELSIF (p_source='QUOTE') THEN
458:
459: IF aso_debug_pub.g_debug_flag = 'Y' THEN
460: aso_debug_pub.add('Aso_Service_Contracts_int_w:Get_Services p_source:= QUOTE', 1, 'N');
461: END IF;
462:
463: FOR c_InvOrg_or IN c_getInvOrgId_qe LOOP
464: l_item_id := c_invOrg_or.inventory_item_id;
464: l_item_id := c_invOrg_or.inventory_item_id;
465: l_inv_org_id :=c_invOrg_or.organization_id;
466: END LOOP;
467:
468: IF aso_debug_pub.g_debug_flag = 'Y' THEN
469: aso_debug_pub.add('Aso_Service_Contracts_int_w:Get_Services l_item_id= '|| l_item_id ||'l_inv_org_id=' || l_inv_org_id , 1, 'N');
470: END IF;
471:
472: l_index :=0;
465: l_inv_org_id :=c_invOrg_or.organization_id;
466: END LOOP;
467:
468: IF aso_debug_pub.g_debug_flag = 'Y' THEN
469: aso_debug_pub.add('Aso_Service_Contracts_int_w:Get_Services l_item_id= '|| l_item_id ||'l_inv_org_id=' || l_inv_org_id , 1, 'N');
470: END IF;
471:
472: l_index :=0;
473: FOR c_quote IN c_getExistService_qe(l_inv_org_id) LOOP
487: x_warranty_flag_tbl(l_index) := 'N';
488: END LOOP;
489:
490: ELSIF (p_source='ORDER') THEN
491: IF aso_debug_pub.g_debug_flag = 'Y' THEN
492: aso_debug_pub.add('Aso_Service_Contracts_int_w:Get_Services p_source = ORDER ', 1, 'N');
493: END IF;
494:
495: FOR c_getItemId IN c_getInventoryId LOOP
488: END LOOP;
489:
490: ELSIF (p_source='ORDER') THEN
491: IF aso_debug_pub.g_debug_flag = 'Y' THEN
492: aso_debug_pub.add('Aso_Service_Contracts_int_w:Get_Services p_source = ORDER ', 1, 'N');
493: END IF;
494:
495: FOR c_getItemId IN c_getInventoryId LOOP
496: l_item_id :=c_getItemId.inventory_item_id;
499: FOR c_getMasterOrg IN c_getOrgId LOOP
500: l_inv_org_id :=c_getMasterOrg.master_organization_id;
501: END LOOP;
502:
503: IF aso_debug_pub.g_debug_flag = 'Y' THEN
504: aso_debug_pub.add('Aso_Service_Contracts_int_w:Get_Services l_item_id= '|| l_item_id ||'l_inv_org_id=' || l_inv_org_id , 1, 'N');
505: END IF;
506:
507: l_index :=0;
500: l_inv_org_id :=c_getMasterOrg.master_organization_id;
501: END LOOP;
502:
503: IF aso_debug_pub.g_debug_flag = 'Y' THEN
504: aso_debug_pub.add('Aso_Service_Contracts_int_w:Get_Services l_item_id= '|| l_item_id ||'l_inv_org_id=' || l_inv_org_id , 1, 'N');
505: END IF;
506:
507: l_index :=0;
508: FOR c_order IN c_getExistService_or(l_inv_org_id) LOOP
540: p_product_item_id => l_item_id,
541: x_warranty_tbl => l_warranty_tbl);
542: ASO_QUOTE_UTIL_PVT.Debug('Ending aso_service_contracts_int.get_warranty <> InstallBase');
543:
544: IF aso_debug_pub.g_debug_flag = 'Y' THEN
545: aso_debug_pub.add('ASO_Service_contracts_int_w: After Call to get_warranty: x_return_status '|| x_return_status, 1, 'N');
546: END IF;
547:
548: -- Check return status from the above procedure call
541: x_warranty_tbl => l_warranty_tbl);
542: ASO_QUOTE_UTIL_PVT.Debug('Ending aso_service_contracts_int.get_warranty <> InstallBase');
543:
544: IF aso_debug_pub.g_debug_flag = 'Y' THEN
545: aso_debug_pub.add('ASO_Service_contracts_int_w: After Call to get_warranty: x_return_status '|| x_return_status, 1, 'N');
546: END IF;
547:
548: -- Check return status from the above procedure call
549: IF x_return_status = FND_API.G_RET_STS_ERROR then
642: Aso_Quote_Util_Pvt.Enable_Debug_Pvt;
643:
644: ASO_QUOTE_UTIL_PVT.Debug('aso_service_contracts_int_w.is_service_available BEGIN....');
645:
646: aso_debug_pub.g_debug_flag := Aso_Quote_Util_Pvt.is_debug_enabled;
647: -- Standard call to check for call compatibility.
648: IF NOT FND_API.Compatible_API_Call ( l_api_version,
649: p_api_version_number,
650: l_api_name,
766: -- Enable debug message
767: Aso_Quote_Util_Pvt.Enable_Debug_Pvt;
768:
769:
770: IF aso_debug_pub.g_debug_flag = 'Y' THEN
771: aso_debug_pub.ADD ( 'Overloaded aso_service_contracts_int_w.is_service_available BEGIN.... ' , 1 , 'Y' );
772: END IF;
773:
774:
767: Aso_Quote_Util_Pvt.Enable_Debug_Pvt;
768:
769:
770: IF aso_debug_pub.g_debug_flag = 'Y' THEN
771: aso_debug_pub.ADD ( 'Overloaded aso_service_contracts_int_w.is_service_available BEGIN.... ' , 1 , 'Y' );
772: END IF;
773:
774:
775: aso_debug_pub.g_debug_flag := Aso_Quote_Util_Pvt.is_debug_enabled;
771: aso_debug_pub.ADD ( 'Overloaded aso_service_contracts_int_w.is_service_available BEGIN.... ' , 1 , 'Y' );
772: END IF;
773:
774:
775: aso_debug_pub.g_debug_flag := Aso_Quote_Util_Pvt.is_debug_enabled;
776: -- Standard call to check for call compatibility.
777: IF NOT FND_API.Compatible_API_Call ( l_api_version,
778: p_api_version_number,
779: l_api_name,
804: l_avail_service_rec.customer_id := p_customer_id;
805: l_avail_service_rec.product_revision := p_product_revision;
806: l_avail_service_rec.request_date := p_request_date;
807:
808: IF aso_debug_pub.g_debug_flag = 'Y' THEN
809: aso_debug_pub.ADD ( 'p_product_item_id'||p_product_item_id , 1 , 'Y' );
810: aso_debug_pub.ADD ( 'p_customer_id ' ||p_customer_id , 1 , 'Y' );
811: aso_debug_pub.ADD ( 'p_product_revision ' ||p_product_revision , 1 , 'Y' );
812: aso_debug_pub.ADD ( 'p_request_date ' ||p_request_date, 1 , 'Y' );
805: l_avail_service_rec.product_revision := p_product_revision;
806: l_avail_service_rec.request_date := p_request_date;
807:
808: IF aso_debug_pub.g_debug_flag = 'Y' THEN
809: aso_debug_pub.ADD ( 'p_product_item_id'||p_product_item_id , 1 , 'Y' );
810: aso_debug_pub.ADD ( 'p_customer_id ' ||p_customer_id , 1 , 'Y' );
811: aso_debug_pub.ADD ( 'p_product_revision ' ||p_product_revision , 1 , 'Y' );
812: aso_debug_pub.ADD ( 'p_request_date ' ||p_request_date, 1 , 'Y' );
813: aso_debug_pub.ADD ( 'P_search_input ' ||P_search_input , 1 , 'Y' );
806: l_avail_service_rec.request_date := p_request_date;
807:
808: IF aso_debug_pub.g_debug_flag = 'Y' THEN
809: aso_debug_pub.ADD ( 'p_product_item_id'||p_product_item_id , 1 , 'Y' );
810: aso_debug_pub.ADD ( 'p_customer_id ' ||p_customer_id , 1 , 'Y' );
811: aso_debug_pub.ADD ( 'p_product_revision ' ||p_product_revision , 1 , 'Y' );
812: aso_debug_pub.ADD ( 'p_request_date ' ||p_request_date, 1 , 'Y' );
813: aso_debug_pub.ADD ( 'P_search_input ' ||P_search_input , 1 , 'Y' );
814: aso_debug_pub.ADD ( 'Before calling the OKC API' , 1 , 'Y' );
807:
808: IF aso_debug_pub.g_debug_flag = 'Y' THEN
809: aso_debug_pub.ADD ( 'p_product_item_id'||p_product_item_id , 1 , 'Y' );
810: aso_debug_pub.ADD ( 'p_customer_id ' ||p_customer_id , 1 , 'Y' );
811: aso_debug_pub.ADD ( 'p_product_revision ' ||p_product_revision , 1 , 'Y' );
812: aso_debug_pub.ADD ( 'p_request_date ' ||p_request_date, 1 , 'Y' );
813: aso_debug_pub.ADD ( 'P_search_input ' ||P_search_input , 1 , 'Y' );
814: aso_debug_pub.ADD ( 'Before calling the OKC API' , 1 , 'Y' );
815: aso_utility_pvt.print_login_info();
808: IF aso_debug_pub.g_debug_flag = 'Y' THEN
809: aso_debug_pub.ADD ( 'p_product_item_id'||p_product_item_id , 1 , 'Y' );
810: aso_debug_pub.ADD ( 'p_customer_id ' ||p_customer_id , 1 , 'Y' );
811: aso_debug_pub.ADD ( 'p_product_revision ' ||p_product_revision , 1 , 'Y' );
812: aso_debug_pub.ADD ( 'p_request_date ' ||p_request_date, 1 , 'Y' );
813: aso_debug_pub.ADD ( 'P_search_input ' ||P_search_input , 1 , 'Y' );
814: aso_debug_pub.ADD ( 'Before calling the OKC API' , 1 , 'Y' );
815: aso_utility_pvt.print_login_info();
816: END IF;
809: aso_debug_pub.ADD ( 'p_product_item_id'||p_product_item_id , 1 , 'Y' );
810: aso_debug_pub.ADD ( 'p_customer_id ' ||p_customer_id , 1 , 'Y' );
811: aso_debug_pub.ADD ( 'p_product_revision ' ||p_product_revision , 1 , 'Y' );
812: aso_debug_pub.ADD ( 'p_request_date ' ||p_request_date, 1 , 'Y' );
813: aso_debug_pub.ADD ( 'P_search_input ' ||P_search_input , 1 , 'Y' );
814: aso_debug_pub.ADD ( 'Before calling the OKC API' , 1 , 'Y' );
815: aso_utility_pvt.print_login_info();
816: END IF;
817:
810: aso_debug_pub.ADD ( 'p_customer_id ' ||p_customer_id , 1 , 'Y' );
811: aso_debug_pub.ADD ( 'p_product_revision ' ||p_product_revision , 1 , 'Y' );
812: aso_debug_pub.ADD ( 'p_request_date ' ||p_request_date, 1 , 'Y' );
813: aso_debug_pub.ADD ( 'P_search_input ' ||P_search_input , 1 , 'Y' );
814: aso_debug_pub.ADD ( 'Before calling the OKC API' , 1 , 'Y' );
815: aso_utility_pvt.print_login_info();
816: END IF;
817:
818:
827: p_avail_service_rec => l_avail_service_rec,
828: x_orderable_service_tbl => l_orderable_service_tbl
829: );
830:
831: IF aso_debug_pub.g_debug_flag = 'Y' THEN
832: aso_debug_pub.ADD ( 'After calling the OKC API' , 1 , 'Y' );
833: aso_debug_pub.ADD ( 'Return status from OKC API : '|| X_Return_Status , 1 , 'Y' );
834: aso_utility_pvt.print_login_info();
835: END IF;
828: x_orderable_service_tbl => l_orderable_service_tbl
829: );
830:
831: IF aso_debug_pub.g_debug_flag = 'Y' THEN
832: aso_debug_pub.ADD ( 'After calling the OKC API' , 1 , 'Y' );
833: aso_debug_pub.ADD ( 'Return status from OKC API : '|| X_Return_Status , 1 , 'Y' );
834: aso_utility_pvt.print_login_info();
835: END IF;
836:
829: );
830:
831: IF aso_debug_pub.g_debug_flag = 'Y' THEN
832: aso_debug_pub.ADD ( 'After calling the OKC API' , 1 , 'Y' );
833: aso_debug_pub.ADD ( 'Return status from OKC API : '|| X_Return_Status , 1 , 'Y' );
834: aso_utility_pvt.print_login_info();
835: END IF;
836:
837:
856: x_Service_duration_period_code := JTF_VARCHAR2_TABLE_1000();
857: x_Shippable_item_flag := JTF_VARCHAR2_TABLE_100();
858: x_Returnable_flag := JTF_VARCHAR2_TABLE_100();
859:
860: IF aso_debug_pub.g_debug_flag = 'Y' THEN
861: aso_debug_pub.ADD ( 'Number of Records Returned from OKC API : '|| to_char(l_orderable_service_tbl.count) , 1 , 'Y' );
862: END IF;
863:
864:
857: x_Shippable_item_flag := JTF_VARCHAR2_TABLE_100();
858: x_Returnable_flag := JTF_VARCHAR2_TABLE_100();
859:
860: IF aso_debug_pub.g_debug_flag = 'Y' THEN
861: aso_debug_pub.ADD ( 'Number of Records Returned from OKC API : '|| to_char(l_orderable_service_tbl.count) , 1 , 'Y' );
862: END IF;
863:
864:
865: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
913: p_data => x_msg_data
914: );
915:
916: --disable the debug message
917: IF aso_debug_pub.g_debug_flag = 'Y' THEN
918: aso_debug_pub.ADD ( 'Overloaded aso_service_contracts_int_w.is_service_available END.... ' , 1 , 'Y' );
919: END IF;
920:
921: ASO_Quote_Util_Pvt.disable_debug_pvt;
914: );
915:
916: --disable the debug message
917: IF aso_debug_pub.g_debug_flag = 'Y' THEN
918: aso_debug_pub.ADD ( 'Overloaded aso_service_contracts_int_w.is_service_available END.... ' , 1 , 'Y' );
919: END IF;
920:
921: ASO_Quote_Util_Pvt.disable_debug_pvt;
922: