DBA Data[Home] [Help]

APPS.ASO_ATP_INT dependencies on FND_API

Line 71: x_return_status := FND_API.G_RET_STS_SUCCESS;

67: PROCEDURE Extend_ATP (p_atp_tbl IN OUT NOCOPY MRP_ATP_PUB.ATP_Rec_Typ,
68: x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2)
69: IS
70: BEGIN
71: x_return_status := FND_API.G_RET_STS_SUCCESS;
72:
73: p_atp_tbl.Row_Id.Extend;
74: p_atp_tbl.Inventory_Item_Id.Extend;
75: p_atp_tbl.Inventory_Item_Name.Extend;

Line 189: x_return_status := FND_API.G_RET_STS_SUCCESS;

185: where quote_header_id = p_qte_header_id
186: and quote_line_id = p_qte_line_id;
187:
188: BEGIN
189: x_return_status := FND_API.G_RET_STS_SUCCESS;
190:
191: If p_atp_rec.inventory_item_id IS NOT NULL Then
192:
193: if aso_debug_pub.g_debug_flag = 'Y' then

Line 385: P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,

381:
382:
383: PROCEDURE Do_Check_ATP(
384: P_Api_Version_Number IN NUMBER,
385: P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
386: p_qte_header_rec IN ASO_QUOTE_PUB.QTE_HEADER_REC_TYPE,
387: p_qte_line_tbl IN ASO_QUOTE_PUB.qte_line_tbl_type := ASO_QUOTE_PUB.G_MISS_QTE_LINE_TBL,
388: p_shipment_tbl IN ASO_QUOTE_PUB.shipment_tbl_type := ASO_QUOTE_PUB.G_MISS_SHIPMENT_TBL,
389: p_entire_quote_flag IN VARCHAR2 :='N',

Line 555: l_check_atp_for_whole_quote varchar2(1) := fnd_api.g_false;

551: l_ato_tbl Number_Search_Tbl_Type;
552: l_ato_line_id_tbl Number_Search_Tbl_Type;
553: l_db_shipment_rec aso_quote_pub.shipment_rec_type;
554: l_db_qte_line_rec aso_quote_pub.qte_line_rec_type;
555: l_check_atp_for_whole_quote varchar2(1) := fnd_api.g_false;
556: l_ship_to_party_site_id number;
557: l_ship_to_cust_account_id number;
558: lx_cust_acct_site_use_id number;
559: l_out_qte_line_number_tbl aso_line_num_int.Out_Line_Number_Tbl_Type;

Line 590: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,

586: aso_debug_pub.add('do_check_atp: Begin');
587: END IF;
588:
589: -- Standard call to check for call compatibility.
590: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
591: p_api_version_number,
592: l_api_name,
593: G_PKG_NAME) THEN
594: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 594: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

590: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
591: p_api_version_number,
592: l_api_name,
593: G_PKG_NAME) THEN
594: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
595: END IF;
596:
597: -- Initialize message list if p_init_msg_list is set to TRUE.
598: IF FND_API.to_Boolean( p_init_msg_list ) THEN

Line 598: IF FND_API.to_Boolean( p_init_msg_list ) THEN

594: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
595: END IF;
596:
597: -- Initialize message list if p_init_msg_list is set to TRUE.
598: IF FND_API.to_Boolean( p_init_msg_list ) THEN
599: FND_MSG_PUB.initialize;
600: END IF;
601:
602: x_return_status := fnd_api.g_ret_sts_success;

Line 602: x_return_status := fnd_api.g_ret_sts_success;

598: IF FND_API.to_Boolean( p_init_msg_list ) THEN
599: FND_MSG_PUB.initialize;
600: END IF;
601:
602: x_return_status := fnd_api.g_ret_sts_success;
603:
604: if aso_debug_pub.g_debug_flag = 'Y' then
605: aso_debug_pub.add('do_check_atp: ********Printing the Input to Check ATP API *************', 1, 'Y');
606: aso_debug_pub.add('do_check_atp: p_qte_header_rec.quote_header_id: '|| p_qte_header_rec.quote_header_id, 1, 'Y');

Line 629: if p_qte_header_rec.quote_header_id is null or p_qte_header_rec.quote_header_id = fnd_api.g_miss_num then

625:
626:
627: if p_qte_line_tbl.count = 0 and p_shipment_tbl.count = 0 then
628:
629: if p_qte_header_rec.quote_header_id is null or p_qte_header_rec.quote_header_id = fnd_api.g_miss_num then
630:
631: if aso_debug_pub.g_debug_flag = 'Y' THEN
632: aso_debug_pub.add('do_check_atp: p_qte_line_tbl and p_shipment_tbl is null. Also p_qte_header_rec.quote_header_id is null');
633: end if;

Line 641: x_return_status := fnd_api.g_ret_sts_error;

637: FND_MESSAGE.Set_Token('API_NAME', 'Check_ATP', FALSE);
638: FND_MESSAGE.Set_Token('PARAMETER', 'p_qte_header_rec', FALSE);
639: FND_MSG_PUB.ADD;
640: end if;
641: x_return_status := fnd_api.g_ret_sts_error;
642: raise fnd_api.g_exc_error;
643:
644: else
645: /*

Line 642: raise fnd_api.g_exc_error;

638: FND_MESSAGE.Set_Token('PARAMETER', 'p_qte_header_rec', FALSE);
639: FND_MSG_PUB.ADD;
640: end if;
641: x_return_status := fnd_api.g_ret_sts_error;
642: raise fnd_api.g_exc_error;
643:
644: else
645: /*
646: l_qte_line_tbl := aso_utility_pvt.query_qte_line_rows_atp(p_qte_header_rec.quote_header_id);

Line 653: l_check_atp_for_whole_quote := fnd_api.g_true;

649: l_qte_line_tbl(i).quote_line_id);
650: l_shipment_tbl(l_shipment_tbl.count + 1 ) := l_shipment_rec;
651: end loop; */
652: --l_shipment_tbl := aso_utility_pvt.query_line_shipment_rows_atp(p_qte_header_rec.quote_header_id);
653: l_check_atp_for_whole_quote := fnd_api.g_true;
654: end if;
655:
656: end if;
657:

Line 669: l_check_atp_for_whole_quote := fnd_api.g_true;

665:
666: if aso_debug_pub.g_debug_flag = 'Y' then
667: aso_debug_pub.add('do_check_atp: No of lines passed is equal to no lines in db, hence whole qte is true', 1, 'Y');
668: end if;
669: l_check_atp_for_whole_quote := fnd_api.g_true;
670: end if;
671:
672: end if;
673:

Line 674: if ((p_entire_quote_flag = 'Y') or (l_check_atp_for_whole_quote = fnd_api.g_true)) then

670: end if;
671:
672: end if;
673:
674: if ((p_entire_quote_flag = 'Y') or (l_check_atp_for_whole_quote = fnd_api.g_true)) then
675:
676: if aso_debug_pub.g_debug_flag = 'Y' then
677: aso_debug_pub.add('do_check_atp: Getting the quote lines and shipment from db', 1, 'Y');
678: end if;

Line 685: l_check_atp_for_whole_quote := fnd_api.g_true;

681: l_shipment_rec := aso_utility_pvt.query_line_shipment_row_atp(p_qte_header_rec.quote_header_id,
682: l_qte_line_tbl(i).quote_line_id);
683: l_shipment_tbl(i) := l_shipment_rec;
684: end loop;
685: l_check_atp_for_whole_quote := fnd_api.g_true;
686: end if;
687:
688: if aso_debug_pub.g_debug_flag = 'Y' then
689: aso_debug_pub.add('do_check_atp: Before creating the search tables', 1, 'Y');

Line 696: if p_qte_line_tbl(i).quote_line_id is not null and p_qte_line_tbl(i).quote_line_id <> fnd_api.g_miss_num then

692:
693: --create quote line search table
694: for i in 1..p_qte_line_tbl.count loop
695:
696: if p_qte_line_tbl(i).quote_line_id is not null and p_qte_line_tbl(i).quote_line_id <> fnd_api.g_miss_num then
697:
698: if aso_debug_pub.g_debug_flag = 'Y' then
699: aso_debug_pub.add('do_check_atp: p_qte_line_tbl(i).quote_line_id: ' || p_qte_line_tbl(i).quote_line_id,1,'Y');
700: end if;

Line 715: x_return_status := fnd_api.g_ret_sts_error;

711: FND_MESSAGE.Set_Name('ASO', 'ASO_API_MISSING_INFO');
712: FND_MESSAGE.Set_Token('COLUMN', 'Quote_Line_Id', FALSE);
713: FND_MSG_PUB.ADD;
714: end if;
715: x_return_status := fnd_api.g_ret_sts_error;
716: raise fnd_api.g_exc_error;
717:
718: end if;
719:

Line 716: raise fnd_api.g_exc_error;

712: FND_MESSAGE.Set_Token('COLUMN', 'Quote_Line_Id', FALSE);
713: FND_MSG_PUB.ADD;
714: end if;
715: x_return_status := fnd_api.g_ret_sts_error;
716: raise fnd_api.g_exc_error;
717:
718: end if;
719:
720: end loop;

Line 728: if p_shipment_tbl(i).shipment_id is not null and p_shipment_tbl(i).shipment_id <> fnd_api.g_miss_num then

724: --For each quote line in p_qte_line_tbl there exist a shipment record in p_shipment_tbl
725:
726: for i in 1..p_shipment_tbl.count loop
727:
728: if p_shipment_tbl(i).shipment_id is not null and p_shipment_tbl(i).shipment_id <> fnd_api.g_miss_num then
729:
730: if aso_debug_pub.g_debug_flag = 'Y' then
731: aso_debug_pub.add('do_check_atp: p_shipment_tbl(i).shipment_id: ' || p_shipment_tbl(i).shipment_id,1,'Y');
732: end if;

Line 754: x_return_status := fnd_api.g_ret_sts_error;

750: FND_MESSAGE.Set_Name('ASO', 'ASO_API_MISSING_INFO');
751: FND_MESSAGE.Set_Token('COLUMN', 'Shipment_Id', FALSE);
752: FND_MSG_PUB.ADD;
753: end if;
754: x_return_status := fnd_api.g_ret_sts_error;
755: raise fnd_api.g_exc_error;
756: */
757:
758: end if;

Line 755: raise fnd_api.g_exc_error;

751: FND_MESSAGE.Set_Token('COLUMN', 'Shipment_Id', FALSE);
752: FND_MSG_PUB.ADD;
753: end if;
754: x_return_status := fnd_api.g_ret_sts_error;
755: raise fnd_api.g_exc_error;
756: */
757:
758: end if;
759:

Line 784: if (p_shipment_tbl(i).shipment_id is null or p_shipment_tbl(i).shipment_id = fnd_api.g_miss_num) then

780: if p_shipment_tbl.count > 0 then
781:
782: for i in 1..p_shipment_tbl.count loop
783:
784: if (p_shipment_tbl(i).shipment_id is null or p_shipment_tbl(i).shipment_id = fnd_api.g_miss_num) then
785: open c_shipment_id(p_qte_line_tbl(i).quote_line_id);
786: fetch c_shipment_id into l_shipment_id;
787: close c_shipment_id;
788: else

Line 810: if p_shipment_tbl(i).ship_method_code <> fnd_api.g_miss_char then

806: aso_debug_pub.add('do_check_atp: l_shipment_tbl.count : '||l_shipment_tbl.count ,1,'Y');
807: aso_debug_pub.add('do_check_atp: index is : '|| l_index ,1,'Y');
808: end if;
809:
810: if p_shipment_tbl(i).ship_method_code <> fnd_api.g_miss_char then
811: l_shipment_tbl(l_index).ship_method_code := p_shipment_tbl(i).ship_method_code;
812: end if;
813:
814: if p_shipment_tbl(i).demand_class_code <> fnd_api.g_miss_char then

Line 814: if p_shipment_tbl(i).demand_class_code <> fnd_api.g_miss_char then

810: if p_shipment_tbl(i).ship_method_code <> fnd_api.g_miss_char then
811: l_shipment_tbl(l_index).ship_method_code := p_shipment_tbl(i).ship_method_code;
812: end if;
813:
814: if p_shipment_tbl(i).demand_class_code <> fnd_api.g_miss_char then
815: l_shipment_tbl(l_index).demand_class_code := p_shipment_tbl(i).demand_class_code;
816: end if;
817:
818: if p_shipment_tbl(i).ship_from_org_id <> fnd_api.g_miss_num then

Line 818: if p_shipment_tbl(i).ship_from_org_id <> fnd_api.g_miss_num then

814: if p_shipment_tbl(i).demand_class_code <> fnd_api.g_miss_char then
815: l_shipment_tbl(l_index).demand_class_code := p_shipment_tbl(i).demand_class_code;
816: end if;
817:
818: if p_shipment_tbl(i).ship_from_org_id <> fnd_api.g_miss_num then
819: l_shipment_tbl(l_index).ship_from_org_id := p_shipment_tbl(i).ship_from_org_id;
820: end if;
821:
822: if p_shipment_tbl(i).request_date <> fnd_api.g_miss_date then

Line 822: if p_shipment_tbl(i).request_date <> fnd_api.g_miss_date then

818: if p_shipment_tbl(i).ship_from_org_id <> fnd_api.g_miss_num then
819: l_shipment_tbl(l_index).ship_from_org_id := p_shipment_tbl(i).ship_from_org_id;
820: end if;
821:
822: if p_shipment_tbl(i).request_date <> fnd_api.g_miss_date then
823: l_shipment_tbl(l_index).request_date := p_shipment_tbl(i).request_date;
824: end if;
825:
826: end if; -- end if for shipment search tbl

Line 842: if l_check_atp_for_whole_quote = fnd_api.g_false then

838: aso_debug_pub.add('do_check_atp: l_qte_line_search_tbl.count: ' || l_qte_line_search_tbl.count,1,'Y');
839: aso_debug_pub.add('do_check_atp: l_check_atp_for_whole_quote: '|| l_check_atp_for_whole_quote, 1, 'Y');
840: end if;
841:
842: if l_check_atp_for_whole_quote = fnd_api.g_false then
843:
844: --Add configured lines to input table if it is not passed
845: for i in 1..p_qte_line_tbl.count loop
846:

Line 1032: end if; --l_check_atp_for_whole_quote = fnd_api.g_false

1028: end loop; --for row in c_config_dtl(p_qte_line_tbl(i).quote_line_id) loop
1029:
1030: end loop; --for i in 1..p_qte_line_tbl.count loop
1031:
1032: end if; --l_check_atp_for_whole_quote = fnd_api.g_false
1033:
1034:
1035: /* Get profile value for ASO: ATP Use Sourcing Rules. If the value is null or 'N'
1036: then get l_ship_from_org_id from the profile ASO_SHIP_FROM_ORG_ID and pass the

Line 1105: x_return_status := fnd_api.g_ret_sts_success;

1101: /* End Logic for Ordering Output */
1102:
1103: -- if qte line tbl count is 0 that means quote has all service items or all trade-ins, then return
1104: if l_qte_line_tbl.count = 0 then
1105: x_return_status := fnd_api.g_ret_sts_success;
1106: return;
1107: end if;
1108:
1109: if aso_debug_pub.g_debug_flag = 'Y' then

Line 1138: If x_return_status <> FND_API.G_RET_STS_SUCCESS Then

1134: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1135: aso_debug_pub.add('do_check_atp: After call to MSC_GLOBAL_ATP.EXTEND_ATP: x_return_status: '||x_return_status);
1136: END IF;
1137:
1138: If x_return_status <> FND_API.G_RET_STS_SUCCESS Then
1139:
1140: IF x_return_status = FND_API.G_RET_STS_ERROR then
1141: RAISE FND_API.G_EXC_ERROR;
1142: ELSE

Line 1140: IF x_return_status = FND_API.G_RET_STS_ERROR then

1136: END IF;
1137:
1138: If x_return_status <> FND_API.G_RET_STS_SUCCESS Then
1139:
1140: IF x_return_status = FND_API.G_RET_STS_ERROR then
1141: RAISE FND_API.G_EXC_ERROR;
1142: ELSE
1143: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1144: END IF;

Line 1141: RAISE FND_API.G_EXC_ERROR;

1137:
1138: If x_return_status <> FND_API.G_RET_STS_SUCCESS Then
1139:
1140: IF x_return_status = FND_API.G_RET_STS_ERROR then
1141: RAISE FND_API.G_EXC_ERROR;
1142: ELSE
1143: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1144: END IF;
1145:

Line 1143: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1139:
1140: IF x_return_status = FND_API.G_RET_STS_ERROR then
1141: RAISE FND_API.G_EXC_ERROR;
1142: ELSE
1143: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1144: END IF;
1145:
1146: End if;
1147:

Line 1153: if l_check_atp_for_whole_quote = fnd_api.g_false then

1149: aso_debug_pub.add('do_check_atp: l_db_qte_line_rec.quote_line_i: '|| ASO_ATP_INT.ATPQUERY);
1150: aso_debug_pub.add('l_qte_line_tbl('||i||').quote_line_id: '|| l_qte_line_tbl(i).quote_line_id);
1151: END IF;
1152:
1153: if l_check_atp_for_whole_quote = fnd_api.g_false then
1154: l_db_qte_line_rec := aso_utility_pvt.query_qte_line_row(l_qte_line_tbl(i).quote_line_id);
1155: else
1156: l_db_qte_line_rec := l_qte_line_tbl(i);
1157: end if;

Line 1208: if l_check_atp_for_whole_quote = fnd_api.g_false then

1204: END IF;
1205: end if;
1206:
1207:
1208: if l_check_atp_for_whole_quote = fnd_api.g_false then
1209: l_db_shipment_rec := aso_utility_pvt.query_shipment_row(l_shipment_tbl(i).shipment_id);
1210: else
1211: l_db_shipment_rec := l_shipment_tbl(i);
1212: end if;

Line 1233: if l_shipment_tbl(i).ship_from_org_id is not null and l_shipment_tbl(i).ship_from_org_id <> fnd_api.g_miss_num then

1229:
1230:
1231:
1232:
1233: if l_shipment_tbl(i).ship_from_org_id is not null and l_shipment_tbl(i).ship_from_org_id <> fnd_api.g_miss_num then
1234: l_atp_rec.source_organization_id(i) := l_shipment_tbl(i).ship_from_org_id;
1235:
1236: else
1237:

Line 1249: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_from_org_id <> fnd_api.g_miss_num))) then

1245: fetch c_shipment_id into l_shipment_id;
1246: close c_shipment_id;
1247: if (l_shipment_search_tbl.exists(l_shipment_id) and
1248: ((p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_from_org_id is not null) and
1249: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_from_org_id <> fnd_api.g_miss_num))) then
1250: l_atp_rec.source_organization_id(i) := p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_from_org_id;
1251: else
1252: -- try to cascade database info from ATO Model
1253: open c_get_warehouse(l_ato_line_id, l_qte_line_tbl(i).quote_header_id);

Line 1256: if l_cascade_ship_from_org_id is not null and l_cascade_ship_from_org_id <> fnd_api.g_miss_num then

1252: -- try to cascade database info from ATO Model
1253: open c_get_warehouse(l_ato_line_id, l_qte_line_tbl(i).quote_header_id);
1254: fetch c_get_warehouse into l_cascade_ship_from_org_id;
1255: close c_get_warehouse;
1256: if l_cascade_ship_from_org_id is not null and l_cascade_ship_from_org_id <> fnd_api.g_miss_num then
1257: l_atp_rec.source_organization_id(i) := l_cascade_ship_from_org_id;
1258: else
1259: -- try to cascade from top model
1260: if l_ato_line_id <> l_top_model_line_id then

Line 1267: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_from_org_id <> fnd_api.g_miss_num))) then

1263: fetch c_shipment_id into l_shipment_id;
1264: close c_shipment_id;
1265: if (l_shipment_search_tbl.exists(l_shipment_id) and
1266: ((p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_from_org_id is not null) and
1267: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_from_org_id <> fnd_api.g_miss_num))) then
1268: l_atp_rec.source_organization_id(i) := p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_from_org_id;
1269: else
1270: open c_get_warehouse(l_top_model_line_id, l_qte_line_tbl(i).quote_header_id);
1271: fetch c_get_warehouse into l_cascade_ship_from_org_id;

Line 1273: if l_cascade_ship_from_org_id is not null and l_cascade_ship_from_org_id <> fnd_api.g_miss_num then

1269: else
1270: open c_get_warehouse(l_top_model_line_id, l_qte_line_tbl(i).quote_header_id);
1271: fetch c_get_warehouse into l_cascade_ship_from_org_id;
1272: close c_get_warehouse;
1273: if l_cascade_ship_from_org_id is not null and l_cascade_ship_from_org_id <> fnd_api.g_miss_num then
1274: l_atp_rec.source_organization_id(i) := l_cascade_ship_from_org_id;
1275: end if;
1276: end if;
1277: end if; -- ato and model are not same end if

Line 1287: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_from_org_id <> fnd_api.g_miss_num))) then

1283: fetch c_shipment_id into l_shipment_id;
1284: close c_shipment_id;
1285: if (l_shipment_search_tbl.exists(l_shipment_id) and
1286: ((p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_from_org_id is not null) and
1287: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_from_org_id <> fnd_api.g_miss_num))) then
1288: l_atp_rec.source_organization_id(i) := p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_from_org_id;
1289: else
1290: open c_get_warehouse(l_top_model_line_id, l_qte_line_tbl(i).quote_header_id);
1291: fetch c_get_warehouse into l_cascade_ship_from_org_id;

Line 1293: if l_cascade_ship_from_org_id is not null and l_cascade_ship_from_org_id <> fnd_api.g_miss_num then

1289: else
1290: open c_get_warehouse(l_top_model_line_id, l_qte_line_tbl(i).quote_header_id);
1291: fetch c_get_warehouse into l_cascade_ship_from_org_id;
1292: close c_get_warehouse;
1293: if l_cascade_ship_from_org_id is not null and l_cascade_ship_from_org_id <> fnd_api.g_miss_num then
1294: l_atp_rec.source_organization_id(i) := l_cascade_ship_from_org_id;
1295: end if;
1296: end if;
1297: end if; -- ato line id and model line id not null end if

Line 1301: if l_atp_rec.source_organization_id(i) is null or l_atp_rec.source_organization_id(i) = fnd_api.g_miss_num then

1297: end if; -- ato line id and model line id not null end if
1298:
1299: end if; -- original end if
1300:
1301: if l_atp_rec.source_organization_id(i) is null or l_atp_rec.source_organization_id(i) = fnd_api.g_miss_num then
1302: if l_db_shipment_rec.ship_from_org_id is not null and l_db_shipment_rec.ship_from_org_id <> fnd_api.g_miss_num then
1303: l_atp_rec.source_organization_id(i) := l_db_shipment_rec.ship_from_org_id;
1304: else
1305: if nvl(l_use_sourcing_rule,'N') = 'Y' then

Line 1302: if l_db_shipment_rec.ship_from_org_id is not null and l_db_shipment_rec.ship_from_org_id <> fnd_api.g_miss_num then

1298:
1299: end if; -- original end if
1300:
1301: if l_atp_rec.source_organization_id(i) is null or l_atp_rec.source_organization_id(i) = fnd_api.g_miss_num then
1302: if l_db_shipment_rec.ship_from_org_id is not null and l_db_shipment_rec.ship_from_org_id <> fnd_api.g_miss_num then
1303: l_atp_rec.source_organization_id(i) := l_db_shipment_rec.ship_from_org_id;
1304: else
1305: if nvl(l_use_sourcing_rule,'N') = 'Y' then
1306: l_atp_rec.source_organization_id(i) := null;

Line 1322: or l_db_shipment_rec.request_date_type = fnd_api.g_miss_char) then

1318: aso_debug_pub.add('l_shipment_tbl('||i||').request_date: '|| l_shipment_tbl(i).request_date);
1319: end if;
1320:
1321: if (l_db_shipment_rec.request_date_type is null or l_db_shipment_rec.request_date_type = 'SHIP'
1322: or l_db_shipment_rec.request_date_type = fnd_api.g_miss_char) then
1323:
1324: if ((l_shipment_tbl(i).request_date <> fnd_api.g_miss_date) and (l_shipment_tbl(i).request_date is not null)) then
1325: l_atp_rec.requested_ship_date(i) := l_shipment_tbl(i).request_date;
1326: else

Line 1324: if ((l_shipment_tbl(i).request_date <> fnd_api.g_miss_date) and (l_shipment_tbl(i).request_date is not null)) then

1320:
1321: if (l_db_shipment_rec.request_date_type is null or l_db_shipment_rec.request_date_type = 'SHIP'
1322: or l_db_shipment_rec.request_date_type = fnd_api.g_miss_char) then
1323:
1324: if ((l_shipment_tbl(i).request_date <> fnd_api.g_miss_date) and (l_shipment_tbl(i).request_date is not null)) then
1325: l_atp_rec.requested_ship_date(i) := l_shipment_tbl(i).request_date;
1326: else
1327: open c_get_ids( l_qte_line_tbl(i).quote_line_id );
1328: fetch c_get_ids into l_ato_line_id,l_top_model_line_id;

Line 1342: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date<> fnd_api.g_miss_date))) then

1338: fetch c_shipment_id into l_shipment_id;
1339: close c_shipment_id;
1340: if (l_shipment_search_tbl.exists(l_shipment_id) and
1341: ((p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date is not null) and
1342: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date<> fnd_api.g_miss_date))) then
1343: if aso_debug_pub.g_debug_flag = 'Y' then
1344: aso_debug_pub.add('getting the request date from input ');
1345: end if;
1346: l_atp_rec.requested_ship_date(i) := p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date;

Line 1355: if l_cascade_request_date is not null and l_cascade_request_date <> fnd_api.g_miss_date then

1351: close c_get_request_date;
1352: if aso_debug_pub.g_debug_flag = 'Y' then
1353: aso_debug_pub.add('l_cascade_request_date: '|| l_cascade_request_date );
1354: end if;
1355: if l_cascade_request_date is not null and l_cascade_request_date <> fnd_api.g_miss_date then
1356: l_atp_rec.requested_ship_date(i) := l_cascade_request_date;
1357: else
1358: -- try to cascade from top model
1359: if l_ato_line_id <> l_top_model_line_id then

Line 1366: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date <> fnd_api.g_miss_date))) then

1362: fetch c_shipment_id into l_shipment_id;
1363: close c_shipment_id;
1364: if (l_shipment_search_tbl.exists(l_shipment_id) and
1365: ((p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date is not null) and
1366: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date <> fnd_api.g_miss_date))) then
1367: l_atp_rec.requested_ship_date(i) := p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date;
1368: else
1369: open c_get_request_date(l_top_model_line_id, l_qte_line_tbl(i).quote_header_id,'SHIP');
1370: fetch c_get_request_date into l_cascade_request_date;

Line 1372: if l_cascade_request_date is not null and l_cascade_request_date <> fnd_api.g_miss_date then

1368: else
1369: open c_get_request_date(l_top_model_line_id, l_qte_line_tbl(i).quote_header_id,'SHIP');
1370: fetch c_get_request_date into l_cascade_request_date;
1371: close c_get_request_date;
1372: if l_cascade_request_date is not null and l_cascade_request_date <> fnd_api.g_miss_date then
1373: l_atp_rec.requested_ship_date(i) := l_cascade_request_date;
1374: end if;
1375: end if;
1376: end if; -- ato and model are not same end if

Line 1386: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date <> fnd_api.g_miss_date))) then

1382: fetch c_shipment_id into l_shipment_id;
1383: close c_shipment_id;
1384: if (l_shipment_search_tbl.exists(l_shipment_id) and
1385: ((p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date is not null) and
1386: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date <> fnd_api.g_miss_date))) then
1387: l_atp_rec.requested_ship_date(i) := p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date ;
1388: else
1389: open c_get_request_date(l_top_model_line_id, l_qte_line_tbl(i).quote_header_id,'SHIP');
1390: fetch c_get_request_date into l_cascade_request_date;

Line 1392: if l_cascade_request_date is not null and l_cascade_request_date <> fnd_api.g_miss_date then

1388: else
1389: open c_get_request_date(l_top_model_line_id, l_qte_line_tbl(i).quote_header_id,'SHIP');
1390: fetch c_get_request_date into l_cascade_request_date;
1391: close c_get_request_date;
1392: if l_cascade_request_date is not null and l_cascade_request_date <> fnd_api.g_miss_date then
1393: l_atp_rec.requested_ship_date(i) := l_cascade_request_date;
1394: end if;
1395: end if;
1396: end if; -- ato line id and model line id not null end if

Line 1400: if ( l_atp_rec.requested_ship_date(i) is null or l_atp_rec.requested_ship_date(i) = fnd_api.g_miss_date) then

1396: end if; -- ato line id and model line id not null end if
1397:
1398: end if; -- original end if
1399: -- even after trying to cascade value is null then get from db
1400: if ( l_atp_rec.requested_ship_date(i) is null or l_atp_rec.requested_ship_date(i) = fnd_api.g_miss_date) then
1401: if ((l_db_shipment_rec.request_date is not null) and (l_db_shipment_rec.request_date <> fnd_api.g_miss_date)) then
1402: l_atp_rec.requested_ship_date(i) := l_db_shipment_rec.request_date;
1403: else
1404:

Line 1401: if ((l_db_shipment_rec.request_date is not null) and (l_db_shipment_rec.request_date <> fnd_api.g_miss_date)) then

1397:
1398: end if; -- original end if
1399: -- even after trying to cascade value is null then get from db
1400: if ( l_atp_rec.requested_ship_date(i) is null or l_atp_rec.requested_ship_date(i) = fnd_api.g_miss_date) then
1401: if ((l_db_shipment_rec.request_date is not null) and (l_db_shipment_rec.request_date <> fnd_api.g_miss_date)) then
1402: l_atp_rec.requested_ship_date(i) := l_db_shipment_rec.request_date;
1403: else
1404:
1405: -- fix for bug 4724374 if db value is null get the value from the hdr record

Line 1406: if ( l_hdr_shipment_rec.request_date is not null and l_hdr_shipment_rec.request_date <> fnd_api.g_miss_date ) then

1402: l_atp_rec.requested_ship_date(i) := l_db_shipment_rec.request_date;
1403: else
1404:
1405: -- fix for bug 4724374 if db value is null get the value from the hdr record
1406: if ( l_hdr_shipment_rec.request_date is not null and l_hdr_shipment_rec.request_date <> fnd_api.g_miss_date ) then
1407: l_atp_rec.requested_ship_date(i) := l_hdr_shipment_rec.request_date;
1408: else
1409: if aso_debug_pub.g_debug_flag = 'Y' then
1410: aso_debug_pub.add('Setting the request date to sysdate' );

Line 1418: if ((l_shipment_tbl(i).request_date <> fnd_api.g_miss_date) and (l_shipment_tbl(i).request_date is not null)) then

1414: end if;
1415: end if;
1416: elsif l_db_shipment_rec.request_date_type = 'ARRIVAL' then
1417:
1418: if ((l_shipment_tbl(i).request_date <> fnd_api.g_miss_date) and (l_shipment_tbl(i).request_date is not null)) then
1419: l_atp_rec.requested_arrival_date(i) := l_shipment_tbl(i).request_date;
1420: else
1421: open c_get_ids( l_qte_line_tbl(i).quote_line_id );
1422: fetch c_get_ids into l_ato_line_id,l_top_model_line_id;

Line 1432: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date<> fnd_api.g_miss_date))) then

1428: fetch c_shipment_id into l_shipment_id;
1429: close c_shipment_id;
1430: if (l_shipment_search_tbl.exists(l_shipment_id) and
1431: ((p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date is not null) and
1432: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date<> fnd_api.g_miss_date))) then
1433: l_atp_rec.requested_arrival_date(i) := p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date;
1434: else
1435: -- try to cascade database info from ATO Model
1436: open c_get_request_date(l_ato_line_id, l_qte_line_tbl(i).quote_header_id,'ARRIVAL');

Line 1439: if l_cascade_request_date is not null and l_cascade_request_date <> fnd_api.g_miss_date then

1435: -- try to cascade database info from ATO Model
1436: open c_get_request_date(l_ato_line_id, l_qte_line_tbl(i).quote_header_id,'ARRIVAL');
1437: fetch c_get_request_date into l_cascade_request_date;
1438: close c_get_request_date;
1439: if l_cascade_request_date is not null and l_cascade_request_date <> fnd_api.g_miss_date then
1440: l_atp_rec.requested_arrival_date(i) := l_cascade_request_date;
1441: else
1442: -- try to cascade from top model
1443: if l_ato_line_id <> l_top_model_line_id then

Line 1450: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date <> fnd_api.g_miss_date))) then

1446: fetch c_shipment_id into l_shipment_id;
1447: close c_shipment_id;
1448: if (l_shipment_search_tbl.exists(l_shipment_id) and
1449: ((p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date is not null) and
1450: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date <> fnd_api.g_miss_date))) then
1451: l_atp_rec.requested_arrival_date(i) := p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date;
1452: else
1453: open c_get_request_date(l_top_model_line_id, l_qte_line_tbl(i).quote_header_id,'ARRIVAL');
1454: fetch c_get_request_date into l_cascade_request_date;

Line 1456: if l_cascade_request_date is not null and l_cascade_request_date <> fnd_api.g_miss_date then

1452: else
1453: open c_get_request_date(l_top_model_line_id, l_qte_line_tbl(i).quote_header_id,'ARRIVAL');
1454: fetch c_get_request_date into l_cascade_request_date;
1455: close c_get_request_date;
1456: if l_cascade_request_date is not null and l_cascade_request_date <> fnd_api.g_miss_date then
1457: l_atp_rec.requested_arrival_date(i) := l_cascade_request_date;
1458: end if;
1459: end if;
1460: end if; -- ato and model are not same end if

Line 1470: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date <> fnd_api.g_miss_date))) then

1466: fetch c_shipment_id into l_shipment_id;
1467: close c_shipment_id;
1468: if (l_shipment_search_tbl.exists(l_shipment_id) and
1469: ((p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date is not null) and
1470: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date <> fnd_api.g_miss_date))) then
1471: l_atp_rec.requested_arrival_date(i) := p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).request_date ;
1472: else
1473: open c_get_request_date(l_top_model_line_id, l_qte_line_tbl(i).quote_header_id,'ARRIVAL');
1474: fetch c_get_request_date into l_cascade_request_date;

Line 1476: if l_cascade_request_date is not null and l_cascade_request_date <> fnd_api.g_miss_date then

1472: else
1473: open c_get_request_date(l_top_model_line_id, l_qte_line_tbl(i).quote_header_id,'ARRIVAL');
1474: fetch c_get_request_date into l_cascade_request_date;
1475: close c_get_request_date;
1476: if l_cascade_request_date is not null and l_cascade_request_date <> fnd_api.g_miss_date then
1477: l_atp_rec.requested_arrival_date(i) := l_cascade_request_date;
1478: end if;
1479: end if;
1480: end if; -- ato line id and model line id not null end if

Line 1484: if ( l_atp_rec.requested_arrival_date(i) is null or l_atp_rec.requested_arrival_date(i) = fnd_api.g_miss_date) then

1480: end if; -- ato line id and model line id not null end if
1481:
1482: end if; -- original end if
1483: -- even after trying to cascade value is null then get from db
1484: if ( l_atp_rec.requested_arrival_date(i) is null or l_atp_rec.requested_arrival_date(i) = fnd_api.g_miss_date) then
1485: if ((l_db_shipment_rec.request_date is not null) and (l_db_shipment_rec.request_date <> fnd_api.g_miss_date)) then
1486: l_atp_rec.requested_arrival_date(i) := l_db_shipment_rec.request_date;
1487: else
1488: -- fix for bug 4724374

Line 1485: if ((l_db_shipment_rec.request_date is not null) and (l_db_shipment_rec.request_date <> fnd_api.g_miss_date)) then

1481:
1482: end if; -- original end if
1483: -- even after trying to cascade value is null then get from db
1484: if ( l_atp_rec.requested_arrival_date(i) is null or l_atp_rec.requested_arrival_date(i) = fnd_api.g_miss_date) then
1485: if ((l_db_shipment_rec.request_date is not null) and (l_db_shipment_rec.request_date <> fnd_api.g_miss_date)) then
1486: l_atp_rec.requested_arrival_date(i) := l_db_shipment_rec.request_date;
1487: else
1488: -- fix for bug 4724374
1489: if ( l_hdr_shipment_rec.request_date is not null and l_hdr_shipment_rec.request_date <> fnd_api.g_miss_date) then

Line 1489: if ( l_hdr_shipment_rec.request_date is not null and l_hdr_shipment_rec.request_date <> fnd_api.g_miss_date) then

1485: if ((l_db_shipment_rec.request_date is not null) and (l_db_shipment_rec.request_date <> fnd_api.g_miss_date)) then
1486: l_atp_rec.requested_arrival_date(i) := l_db_shipment_rec.request_date;
1487: else
1488: -- fix for bug 4724374
1489: if ( l_hdr_shipment_rec.request_date is not null and l_hdr_shipment_rec.request_date <> fnd_api.g_miss_date) then
1490: l_atp_rec.requested_arrival_date(i) := l_hdr_shipment_rec.request_date;
1491: else
1492: l_atp_rec.requested_arrival_date(i) := sysdate;
1493: end if; -- end if for the hdr rec check

Line 1504: if (l_shipment_tbl(i).ship_method_code <> fnd_api.g_miss_char and l_shipment_tbl(i).ship_method_code is not null) then

1500: if aso_debug_pub.g_debug_flag = 'Y' then
1501: aso_debug_pub.add('l_shipment_tbl('||i||').ship_method_code: '|| l_shipment_tbl(i).ship_method_code);
1502: end if;
1503:
1504: if (l_shipment_tbl(i).ship_method_code <> fnd_api.g_miss_char and l_shipment_tbl(i).ship_method_code is not null) then
1505: l_atp_rec.ship_method(i) := l_shipment_tbl(i).ship_method_code;
1506:
1507: else
1508: open c_get_ids( l_qte_line_tbl(i).quote_line_id );

Line 1519: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_method_code<> fnd_api.g_miss_char))) then

1515: fetch c_shipment_id into l_shipment_id;
1516: close c_shipment_id;
1517: if (l_shipment_search_tbl.exists(l_shipment_id) and
1518: ((p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_method_code is not null) and
1519: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_method_code<> fnd_api.g_miss_char))) then
1520: l_atp_rec.ship_method(i) := p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_method_code;
1521: else
1522: -- try to cascade database info from ATO Model
1523: open c_get_ship_method(l_ato_line_id, l_qte_line_tbl(i).quote_header_id);

Line 1526: if l_cascade_ship_method_code is not null and l_cascade_ship_method_code<> fnd_api.g_miss_char then

1522: -- try to cascade database info from ATO Model
1523: open c_get_ship_method(l_ato_line_id, l_qte_line_tbl(i).quote_header_id);
1524: fetch c_get_ship_method into l_cascade_ship_method_code;
1525: close c_get_ship_method;
1526: if l_cascade_ship_method_code is not null and l_cascade_ship_method_code<> fnd_api.g_miss_char then
1527: l_atp_rec.ship_method(i) := l_cascade_ship_method_code;
1528: else
1529: -- try to cascade from top model
1530: if l_ato_line_id <> l_top_model_line_id then

Line 1537: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_method_code<> fnd_api.g_miss_char))) then

1533: fetch c_shipment_id into l_shipment_id;
1534: close c_shipment_id;
1535: if (l_shipment_search_tbl.exists(l_shipment_id) and
1536: ((p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_method_code is not null) and
1537: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_method_code<> fnd_api.g_miss_char))) then
1538: l_atp_rec.ship_method(i) := p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_method_code;
1539: else
1540: open c_get_ship_method(l_top_model_line_id, l_qte_line_tbl(i).quote_header_id);
1541: fetch c_get_ship_method into l_cascade_ship_method_code;

Line 1543: if l_cascade_ship_method_code is not null and l_cascade_ship_method_code<> fnd_api.g_miss_char then

1539: else
1540: open c_get_ship_method(l_top_model_line_id, l_qte_line_tbl(i).quote_header_id);
1541: fetch c_get_ship_method into l_cascade_ship_method_code;
1542: close c_get_ship_method;
1543: if l_cascade_ship_method_code is not null and l_cascade_ship_method_code<> fnd_api.g_miss_char then
1544: l_atp_rec.ship_method(i) := l_cascade_ship_method_code;
1545: end if;
1546: end if;
1547: end if; -- ato and model are not same end if

Line 1557: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_method_code<> fnd_api.g_miss_char))) then

1553: fetch c_shipment_id into l_shipment_id;
1554: close c_shipment_id;
1555: if (l_shipment_search_tbl.exists(l_shipment_id) and
1556: ((p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_method_code is not null) and
1557: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_method_code<> fnd_api.g_miss_char))) then
1558: l_atp_rec.ship_method(i) := p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).ship_method_code;
1559: else
1560: open c_get_ship_method(l_top_model_line_id, l_qte_line_tbl(i).quote_header_id);
1561: fetch c_get_ship_method into l_cascade_ship_method_code;

Line 1563: if l_cascade_ship_method_code is not null and l_cascade_ship_method_code<> fnd_api.g_miss_char then

1559: else
1560: open c_get_ship_method(l_top_model_line_id, l_qte_line_tbl(i).quote_header_id);
1561: fetch c_get_ship_method into l_cascade_ship_method_code;
1562: close c_get_ship_method;
1563: if l_cascade_ship_method_code is not null and l_cascade_ship_method_code<> fnd_api.g_miss_char then
1564: l_atp_rec.ship_method(i) := l_cascade_ship_method_code;
1565: end if;
1566: end if;
1567: end if; -- ato line id and model line id not null end if

Line 1571: if l_atp_rec.ship_method(i) is null or l_atp_rec.ship_method(i) = fnd_api.g_miss_char then

1567: end if; -- ato line id and model line id not null end if
1568:
1569: end if; -- original end if
1570:
1571: if l_atp_rec.ship_method(i) is null or l_atp_rec.ship_method(i) = fnd_api.g_miss_char then
1572: if (l_db_shipment_rec.ship_method_code is not null and l_db_shipment_rec.ship_method_code <> fnd_api.g_miss_char) then
1573: l_atp_rec.ship_method(i) := l_db_shipment_rec.ship_method_code;
1574: else
1575: l_atp_rec.ship_method(i) := aso_shipment_pvt.get_ship_method_code(p_qte_header_id => l_qte_line_tbl(i).quote_header_id,

Line 1572: if (l_db_shipment_rec.ship_method_code is not null and l_db_shipment_rec.ship_method_code <> fnd_api.g_miss_char) then

1568:
1569: end if; -- original end if
1570:
1571: if l_atp_rec.ship_method(i) is null or l_atp_rec.ship_method(i) = fnd_api.g_miss_char then
1572: if (l_db_shipment_rec.ship_method_code is not null and l_db_shipment_rec.ship_method_code <> fnd_api.g_miss_char) then
1573: l_atp_rec.ship_method(i) := l_db_shipment_rec.ship_method_code;
1574: else
1575: l_atp_rec.ship_method(i) := aso_shipment_pvt.get_ship_method_code(p_qte_header_id => l_qte_line_tbl(i).quote_header_id,
1576: p_qte_line_id => l_shipment_tbl(i).quote_line_id);

Line 1586: if (l_shipment_tbl(i).demand_class_code <> fnd_api.g_miss_char and l_shipment_tbl(i).demand_class_code is not null) then

1582: end if;
1583:
1584:
1585:
1586: if (l_shipment_tbl(i).demand_class_code <> fnd_api.g_miss_char and l_shipment_tbl(i).demand_class_code is not null) then
1587: l_atp_rec.demand_class(i) := l_shipment_tbl(i).demand_class_code;
1588:
1589: else
1590: open c_get_ids( l_qte_line_tbl(i).quote_line_id );

Line 1601: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).demand_class_code<> fnd_api.g_miss_char))) then

1597: fetch c_shipment_id into l_shipment_id;
1598: close c_shipment_id;
1599: if (l_shipment_search_tbl.exists(l_shipment_id) and
1600: ((p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).demand_class_code is not null) and
1601: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).demand_class_code<> fnd_api.g_miss_char))) then
1602: l_atp_rec.demand_class(i) := p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).demand_class_code;
1603: else
1604: -- try to cascade database info from ATO Model
1605: open c_get_demand_code(l_ato_line_id, l_qte_line_tbl(i).quote_header_id);

Line 1608: if l_cascade_demand_class_code is not null and l_cascade_demand_class_code<> fnd_api.g_miss_char then

1604: -- try to cascade database info from ATO Model
1605: open c_get_demand_code(l_ato_line_id, l_qte_line_tbl(i).quote_header_id);
1606: fetch c_get_demand_code into l_cascade_demand_class_code;
1607: close c_get_demand_code;
1608: if l_cascade_demand_class_code is not null and l_cascade_demand_class_code<> fnd_api.g_miss_char then
1609: l_atp_rec.demand_class(i) := l_cascade_demand_class_code;
1610: else
1611: -- try to cascade from top model
1612: if l_ato_line_id <> l_top_model_line_id then

Line 1619: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).demand_class_code<> fnd_api.g_miss_char))) then

1615: fetch c_shipment_id into l_shipment_id;
1616: close c_shipment_id;
1617: if (l_shipment_search_tbl.exists(l_shipment_id) and
1618: ((p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).demand_class_code is not null) and
1619: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).demand_class_code<> fnd_api.g_miss_char))) then
1620: l_atp_rec.demand_class(i) := p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).demand_class_code;
1621: else
1622: open c_get_demand_code(l_top_model_line_id, l_qte_line_tbl(i).quote_header_id);
1623: fetch c_get_demand_code into l_cascade_demand_class_code;

Line 1625: if l_cascade_demand_class_code is not null and l_cascade_demand_class_code<> fnd_api.g_miss_char then

1621: else
1622: open c_get_demand_code(l_top_model_line_id, l_qte_line_tbl(i).quote_header_id);
1623: fetch c_get_demand_code into l_cascade_demand_class_code;
1624: close c_get_demand_code;
1625: if l_cascade_demand_class_code is not null and l_cascade_demand_class_code<> fnd_api.g_miss_char then
1626: l_atp_rec.demand_class(i) := l_cascade_demand_class_code;
1627: end if;
1628: end if;
1629: end if; -- ato and model are not same end if

Line 1639: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).demand_class_code<> fnd_api.g_miss_char))) then

1635: fetch c_shipment_id into l_shipment_id;
1636: close c_shipment_id;
1637: if (l_shipment_search_tbl.exists(l_shipment_id) and
1638: ((p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).demand_class_code is not null) and
1639: (p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).demand_class_code<> fnd_api.g_miss_char))) then
1640: l_atp_rec.demand_class(i) := p_shipment_tbl( l_shipment_search_tbl(l_shipment_id)).demand_class_code;
1641: else
1642: open c_get_demand_code(l_top_model_line_id, l_qte_line_tbl(i).quote_header_id);
1643: fetch c_get_demand_code into l_cascade_demand_class_code;

Line 1645: if l_cascade_demand_class_code is not null and l_cascade_demand_class_code<> fnd_api.g_miss_char then

1641: else
1642: open c_get_demand_code(l_top_model_line_id, l_qte_line_tbl(i).quote_header_id);
1643: fetch c_get_demand_code into l_cascade_demand_class_code;
1644: close c_get_demand_code;
1645: if l_cascade_demand_class_code is not null and l_cascade_demand_class_code<> fnd_api.g_miss_char then
1646: l_atp_rec.demand_class(i) := l_cascade_demand_class_code;
1647: end if;
1648: end if;
1649: end if; -- ato line id and model line id not null end if

Line 1653: if l_atp_rec.demand_class(i) = fnd_api.g_miss_char or l_atp_rec.demand_class(i) is null then

1649: end if; -- ato line id and model line id not null end if
1650:
1651: end if; -- original end if
1652:
1653: if l_atp_rec.demand_class(i) = fnd_api.g_miss_char or l_atp_rec.demand_class(i) is null then
1654: if (l_db_shipment_rec.demand_class_code is not null and l_db_shipment_rec.demand_class_code <> fnd_api.g_miss_char) then
1655: l_atp_rec.demand_class(i) := l_db_shipment_rec.demand_class_code;
1656: else
1657: l_atp_rec.demand_class(i) := aso_shipment_pvt.get_demand_class_code(p_qte_header_id => l_qte_line_tbl(i).quote_header_id,

Line 1654: if (l_db_shipment_rec.demand_class_code is not null and l_db_shipment_rec.demand_class_code <> fnd_api.g_miss_char) then

1650:
1651: end if; -- original end if
1652:
1653: if l_atp_rec.demand_class(i) = fnd_api.g_miss_char or l_atp_rec.demand_class(i) is null then
1654: if (l_db_shipment_rec.demand_class_code is not null and l_db_shipment_rec.demand_class_code <> fnd_api.g_miss_char) then
1655: l_atp_rec.demand_class(i) := l_db_shipment_rec.demand_class_code;
1656: else
1657: l_atp_rec.demand_class(i) := aso_shipment_pvt.get_demand_class_code(p_qte_header_id => l_qte_line_tbl(i).quote_header_id,
1658: p_qte_line_id => l_shipment_tbl(i).quote_line_id);

Line 1816: if x_return_status <> fnd_api.g_ret_sts_success then

1812: END IF;
1813:
1814: MSC_ATP_GLOBAL.Get_ATP_Session_Id(l_session_id, x_return_status);
1815:
1816: if x_return_status <> fnd_api.g_ret_sts_success then
1817: raise fnd_api.g_exc_unexpected_error;
1818: end if;
1819:
1820: IF aso_debug_pub.g_debug_flag = 'Y' THEN

Line 1817: raise fnd_api.g_exc_unexpected_error;

1813:
1814: MSC_ATP_GLOBAL.Get_ATP_Session_Id(l_session_id, x_return_status);
1815:
1816: if x_return_status <> fnd_api.g_ret_sts_success then
1817: raise fnd_api.g_exc_unexpected_error;
1818: end if;
1819:
1820: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1821: aso_debug_pub.add('do_check_atp: After call to msc_atp_global.get_atp_session_id procedure',1,'Y');

Line 1841: if x_return_status <> fnd_api.g_ret_sts_success then

1837: aso_debug_pub.add('do_check_atp: x_return_status: '|| x_return_status ,1,'Y');
1838: aso_debug_pub.add('Error msg: '||x_new_msg_data,1,'Y');
1839: END IF;
1840:
1841: if x_return_status <> fnd_api.g_ret_sts_success then
1842: raise fnd_api.g_exc_unexpected_error;
1843: end if;
1844:
1845:

Line 1842: raise fnd_api.g_exc_unexpected_error;

1838: aso_debug_pub.add('Error msg: '||x_new_msg_data,1,'Y');
1839: END IF;
1840:
1841: if x_return_status <> fnd_api.g_ret_sts_success then
1842: raise fnd_api.g_exc_unexpected_error;
1843: end if;
1844:
1845:
1846:

Line 1907: if l_check_atp_for_whole_quote = fnd_api.g_false then

1903: x_atp_tbl := x_new_atp_tbl; */
1904: -- End Logic for Ordering Output
1905:
1906: /*
1907: if l_check_atp_for_whole_quote = fnd_api.g_false then
1908:
1909: for i in 1..p_qte_line_tbl.count loop
1910:
1911: l_aso_atp_tbl(i) := x_atp_tbl(i);

Line 1927: WHEN FND_API.G_EXC_ERROR THEN

1923: END IF;
1924:
1925: EXCEPTION
1926:
1927: WHEN FND_API.G_EXC_ERROR THEN
1928: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS(
1929: P_API_NAME => L_API_NAME
1930: ,P_PKG_NAME => G_PKG_NAME
1931: ,P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_ERROR

Line 1937: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

1933: ,X_MSG_COUNT => X_MSG_COUNT
1934: ,X_MSG_DATA => X_MSG_DATA
1935: ,X_RETURN_STATUS => X_RETURN_STATUS);
1936:
1937: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1938: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS(
1939: P_API_NAME => L_API_NAME
1940: ,P_PKG_NAME => G_PKG_NAME
1941: ,P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR

Line 1965: P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,

1961:
1962:
1963: PROCEDURE Check_ATP(
1964: P_Api_Version_Number IN NUMBER,
1965: P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
1966: p_qte_header_rec IN ASO_QUOTE_PUB.QTE_HEADER_REC_TYPE,
1967: p_qte_line_tbl IN ASO_QUOTE_PUB.qte_line_tbl_type := ASO_QUOTE_PUB.G_MISS_QTE_LINE_TBL,
1968: p_shipment_tbl IN ASO_QUOTE_PUB.shipment_tbl_type := ASO_QUOTE_PUB.G_MISS_SHIPMENT_TBL,
1969: p_entire_quote_flag IN VARCHAR2 := 'N',

Line 2018: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,

2014:
2015: aso_debug_pub.g_debug_flag := nvl(fnd_profile.value('ASO_ENABLE_DEBUG'),'N');
2016:
2017: -- Standard call to check for call compatibility.
2018: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
2019: p_api_version_number,
2020: l_api_name,
2021: G_PKG_NAME)
2022: THEN

Line 2023: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2019: p_api_version_number,
2020: l_api_name,
2021: G_PKG_NAME)
2022: THEN
2023: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2024: END IF;
2025:
2026:
2027: -- Initialize message list if p_init_msg_list is set to TRUE.

Line 2028: IF FND_API.to_Boolean( p_init_msg_list ) THEN

2024: END IF;
2025:
2026:
2027: -- Initialize message list if p_init_msg_list is set to TRUE.
2028: IF FND_API.to_Boolean( p_init_msg_list ) THEN
2029: FND_MSG_PUB.initialize;
2030: END IF;
2031:
2032: /*

Line 2049: P_Init_Msg_List => FND_API.G_FALSE,

2045: if l_aps_version = 10 then
2046:
2047: do_check_atp(
2048: P_Api_Version_Number => 1.0,
2049: P_Init_Msg_List => FND_API.G_FALSE,
2050: p_qte_header_rec => p_qte_header_rec,
2051: p_qte_line_tbl => p_qte_line_tbl,
2052: p_shipment_tbl => p_shipment_tbl,
2053: p_entire_quote_flag => p_entire_quote_flag,

Line 2065: if x_return_status = FND_API.G_RET_STS_ERROR then

2061: aso_debug_pub.add('Check_atp :x_return_status: '|| x_return_status ,1,'Y');
2062: END IF;
2063:
2064:
2065: if x_return_status = FND_API.G_RET_STS_ERROR then
2066: RAISE FND_API.G_EXC_ERROR;
2067: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
2068: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2069: end if;

Line 2066: RAISE FND_API.G_EXC_ERROR;

2062: END IF;
2063:
2064:
2065: if x_return_status = FND_API.G_RET_STS_ERROR then
2066: RAISE FND_API.G_EXC_ERROR;
2067: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
2068: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2069: end if;
2070:

Line 2067: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then

2063:
2064:
2065: if x_return_status = FND_API.G_RET_STS_ERROR then
2066: RAISE FND_API.G_EXC_ERROR;
2067: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
2068: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2069: end if;
2070:
2071: else

Line 2068: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2064:
2065: if x_return_status = FND_API.G_RET_STS_ERROR then
2066: RAISE FND_API.G_EXC_ERROR;
2067: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
2068: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2069: end if;
2070:
2071: else
2072:

Line 2105: raise FND_API.G_EXC_ERROR;

2101: FND_MESSAGE.Set_Name('ASO', 'ASO_API_NO_PROFILE_VALUE');
2102: fnd_message.set_token('PROFILE', l_profile_name);
2103: FND_MSG_PUB.ADD;
2104: END IF;
2105: raise FND_API.G_EXC_ERROR;
2106: End If;
2107:
2108: ELSE
2109: -- Sourcing rule is 'Y' so get the default customer and site id.

Line 2129: raise FND_API.G_EXC_ERROR;

2125: FND_MESSAGE.Set_Name('ASO', 'ASO_API_NO_PROFILE_VALUE');
2126: fnd_message.set_token('PROFILE', l_profile_name);
2127: FND_MSG_PUB.ADD;
2128: END IF;
2129: raise FND_API.G_EXC_ERROR;
2130: END IF;
2131:
2132:
2133: -- To get the Default Customer Ship to site Id from profile ASO: Atp Default SHip to Site id.

Line 2152: raise FND_API.G_EXC_ERROR;

2148: FND_MESSAGE.Set_Name('ASO', 'ASO_API_NO_PROFILE_VALUE');
2149: fnd_message.set_token('PROFILE', l_profile_name);
2150: FND_MSG_PUB.ADD;
2151: END IF;
2152: raise FND_API.G_EXC_ERROR;
2153: END IF;
2154:
2155: END IF;
2156:

Line 2195: or p_shipment_tbl( curr_index ).ship_from_org_id = FND_API.G_MISS_NUM then

2191: l_atp_rec.requested_ship_date(curr_index) :=
2192: p_shipment_tbl(curr_index).request_date;
2193:
2194: if p_shipment_tbl( curr_index ).ship_from_org_id is null
2195: or p_shipment_tbl( curr_index ).ship_from_org_id = FND_API.G_MISS_NUM then
2196: /* Changes for the Save Warehouse */
2197:
2198: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2199: aso_debug_pub.add('Check_atp: Source Organization ID is '||l_atp_rec.source_organization_id(curr_index));

Line 2316: If x_return_status <> FND_API.G_RET_STS_SUCCESS Then

2312: aso_debug_pub.add('Check_atp :After calling mrp api',1,'Y');
2313: aso_debug_pub.add('Check_atp :x_return_status === '|| x_return_status ,1,'Y');
2314: END IF;
2315:
2316: If x_return_status <> FND_API.G_RET_STS_SUCCESS Then
2317: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2318: End if;
2319:
2320: populate_output_table(l_atp_rec_out,x_atp_tbl,x_return_status);

Line 2317: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2313: aso_debug_pub.add('Check_atp :x_return_status === '|| x_return_status ,1,'Y');
2314: END IF;
2315:
2316: If x_return_status <> FND_API.G_RET_STS_SUCCESS Then
2317: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2318: End if;
2319:
2320: populate_output_table(l_atp_rec_out,x_atp_tbl,x_return_status);
2321:

Line 2325: WHEN FND_API.G_EXC_ERROR THEN

2321:
2322: end if;
2323:
2324: EXCEPTION
2325: WHEN FND_API.G_EXC_ERROR THEN
2326: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS(
2327: P_API_NAME => L_API_NAME
2328: ,P_PKG_NAME => G_PKG_NAME
2329: ,P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_ERROR

Line 2335: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2331: ,X_MSG_COUNT => X_MSG_COUNT
2332: ,X_MSG_DATA => X_MSG_DATA
2333: ,X_RETURN_STATUS => X_RETURN_STATUS);
2334:
2335: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2336: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS(
2337: P_API_NAME => L_API_NAME
2338: ,P_PKG_NAME => G_PKG_NAME
2339: ,P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR

Line 2361: P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,

2357: END Check_ATP;
2358:
2359: PROCEDURE Check_ATP(
2360: P_Api_Version_Number IN NUMBER,
2361: P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
2362: p_qte_line_tbl IN ASO_QUOTE_PUB.qte_line_tbl_type,
2363: p_shipment_tbl IN ASO_QUOTE_PUB.shipment_tbl_type,
2364: x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
2365: x_msg_count OUT NOCOPY /* file.sql.39 change */ NUMBER,

Line 2374: x_return_status := fnd_api.g_ret_sts_success;

2370:
2371: l_qte_header_rec aso_quote_pub.qte_header_rec_type;
2372:
2373: Begin
2374: x_return_status := fnd_api.g_ret_sts_success;
2375: aso_debug_pub.g_debug_flag := nvl(fnd_profile.value('ASO_ENABLE_DEBUG'),'N');
2376:
2377: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
2378: aso_debug_pub.add('ASO_ATP_INT: Check_Atp Begin', 1, 'Y');

Line 2382: IF FND_API.to_Boolean( p_init_msg_list ) THEN

2378: aso_debug_pub.add('ASO_ATP_INT: Check_Atp Begin', 1, 'Y');
2379: END IF;
2380:
2381: -- Initialize message list if p_init_msg_list is set to TRUE.
2382: IF FND_API.to_Boolean( p_init_msg_list ) THEN
2383: FND_MSG_PUB.initialize;
2384: END IF;
2385:
2386: if p_qte_line_tbl.count > 0 then

Line 2391: P_Init_Msg_List => FND_API.G_FALSE,

2387: l_qte_header_rec.quote_header_id := p_qte_line_tbl(1).quote_header_id;
2388: end if;
2389:
2390: Check_Atp( P_Api_Version_Number => P_Api_Version_Number,
2391: P_Init_Msg_List => FND_API.G_FALSE,
2392: p_qte_header_rec => l_qte_header_rec,
2393: p_qte_line_tbl => p_qte_line_tbl,
2394: p_shipment_tbl => p_shipment_tbl,
2395: x_return_status => x_return_status,

Line 2418: P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,

2414:
2415:
2416: PROCEDURE update_configuration(
2417: P_Api_Version_Number IN NUMBER,
2418: P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
2419: p_commit IN VARCHAR2 := FND_API.G_FALSE,
2420: p_qte_header_rec IN ASO_QUOTE_PUB.QTE_HEADER_REC_TYPE,
2421: p_qte_line_dtl_tbl IN ASO_QUOTE_PUB.qte_line_dtl_tbl_type := ASO_QUOTE_PUB.G_MISS_QTE_LINE_DTL_TBL,
2422: x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2,

Line 2419: p_commit IN VARCHAR2 := FND_API.G_FALSE,

2415:
2416: PROCEDURE update_configuration(
2417: P_Api_Version_Number IN NUMBER,
2418: P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
2419: p_commit IN VARCHAR2 := FND_API.G_FALSE,
2420: p_qte_header_rec IN ASO_QUOTE_PUB.QTE_HEADER_REC_TYPE,
2421: p_qte_line_dtl_tbl IN ASO_QUOTE_PUB.qte_line_dtl_tbl_type := ASO_QUOTE_PUB.G_MISS_QTE_LINE_DTL_TBL,
2422: x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
2423: x_msg_count OUT NOCOPY /* file.sql.39 change */ NUMBER,

Line 2494: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,

2490: aso_debug_pub.add('update_configuration: Begin');
2491: END IF;
2492:
2493: -- Standard call to check for call compatibility.
2494: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
2495: p_api_version_number,
2496: l_api_name,
2497: G_PKG_NAME) THEN
2498: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 2498: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2494: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
2495: p_api_version_number,
2496: l_api_name,
2497: G_PKG_NAME) THEN
2498: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2499: END IF;
2500:
2501: -- Initialize message list if p_init_msg_list is set to TRUE.
2502: IF FND_API.to_Boolean( p_init_msg_list ) THEN

Line 2502: IF FND_API.to_Boolean( p_init_msg_list ) THEN

2498: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2499: END IF;
2500:
2501: -- Initialize message list if p_init_msg_list is set to TRUE.
2502: IF FND_API.to_Boolean( p_init_msg_list ) THEN
2503: FND_MSG_PUB.initialize;
2504: END IF;
2505:
2506: x_return_status := fnd_api.g_ret_sts_success;

Line 2506: x_return_status := fnd_api.g_ret_sts_success;

2502: IF FND_API.to_Boolean( p_init_msg_list ) THEN
2503: FND_MSG_PUB.initialize;
2504: END IF;
2505:
2506: x_return_status := fnd_api.g_ret_sts_success;
2507: -- check to see if the quote header info is missing
2508: if p_qte_header_rec.quote_header_id is null or p_qte_header_rec.quote_header_id = fnd_api.g_miss_num then
2509:
2510: if aso_debug_pub.g_debug_flag = 'Y' THEN

Line 2508: if p_qte_header_rec.quote_header_id is null or p_qte_header_rec.quote_header_id = fnd_api.g_miss_num then

2504: END IF;
2505:
2506: x_return_status := fnd_api.g_ret_sts_success;
2507: -- check to see if the quote header info is missing
2508: if p_qte_header_rec.quote_header_id is null or p_qte_header_rec.quote_header_id = fnd_api.g_miss_num then
2509:
2510: if aso_debug_pub.g_debug_flag = 'Y' THEN
2511: aso_debug_pub.add('p_qte_header_rec.quote_header_id is null');
2512: end if;

Line 2520: x_return_status := fnd_api.g_ret_sts_error;

2516: FND_MESSAGE.Set_Token('API_NAME', 'UPDATE_CONFIGURATION', FALSE);
2517: FND_MESSAGE.Set_Token('PARAMETER', 'p_qte_header_rec', FALSE);
2518: FND_MSG_PUB.ADD;
2519: end if;
2520: x_return_status := fnd_api.g_ret_sts_error;
2521: raise fnd_api.g_exc_error;
2522: end if;
2523:
2524:

Line 2521: raise fnd_api.g_exc_error;

2517: FND_MESSAGE.Set_Token('PARAMETER', 'p_qte_header_rec', FALSE);
2518: FND_MSG_PUB.ADD;
2519: end if;
2520: x_return_status := fnd_api.g_ret_sts_error;
2521: raise fnd_api.g_exc_error;
2522: end if;
2523:
2524:
2525: if aso_debug_pub.g_debug_flag = 'Y' then

Line 2567: if (((l_qte_line_dtl_tbl(i).config_header_id is null) or (l_qte_line_dtl_tbl(i).config_header_id = FND_API.G_MISS_NUM)) or

2563:
2564: for i in 1..l_qte_line_dtl_tbl.count loop
2565:
2566: -- check to see if the qte line detail table is properly populated before processing the row
2567: if (((l_qte_line_dtl_tbl(i).config_header_id is null) or (l_qte_line_dtl_tbl(i).config_header_id = FND_API.G_MISS_NUM)) or
2568: ((l_qte_line_dtl_tbl(i).config_revision_num is null) or (l_qte_line_dtl_tbl(i).config_revision_num = FND_API.G_MISS_NUM))) then
2569:
2570: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_ERROR ) THEN
2571: FND_MESSAGE.Set_Name ('ASO' , 'ASO_API_MISSING_COLUMN' );

Line 2568: ((l_qte_line_dtl_tbl(i).config_revision_num is null) or (l_qte_line_dtl_tbl(i).config_revision_num = FND_API.G_MISS_NUM))) then

2564: for i in 1..l_qte_line_dtl_tbl.count loop
2565:
2566: -- check to see if the qte line detail table is properly populated before processing the row
2567: if (((l_qte_line_dtl_tbl(i).config_header_id is null) or (l_qte_line_dtl_tbl(i).config_header_id = FND_API.G_MISS_NUM)) or
2568: ((l_qte_line_dtl_tbl(i).config_revision_num is null) or (l_qte_line_dtl_tbl(i).config_revision_num = FND_API.G_MISS_NUM))) then
2569:
2570: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_ERROR ) THEN
2571: FND_MESSAGE.Set_Name ('ASO' , 'ASO_API_MISSING_COLUMN' );
2572: FND_MESSAGE.Set_Token ('COLUMN' , '.config_header_id', FALSE );

Line 2575: RAISE FND_API.G_EXC_ERROR;

2571: FND_MESSAGE.Set_Name ('ASO' , 'ASO_API_MISSING_COLUMN' );
2572: FND_MESSAGE.Set_Token ('COLUMN' , '.config_header_id', FALSE );
2573: FND_MSG_PUB.ADD;
2574: END IF;
2575: RAISE FND_API.G_EXC_ERROR;
2576: end if;
2577:
2578: if (l_qte_line_dtl_tbl(i).quote_line_id is null) or (l_qte_line_dtl_tbl(i).quote_line_id = FND_API.G_MISS_NUM) then
2579: open get_line_id(l_qte_line_dtl_tbl(i).config_header_id,l_qte_line_dtl_tbl(i).config_revision_num);

Line 2578: if (l_qte_line_dtl_tbl(i).quote_line_id is null) or (l_qte_line_dtl_tbl(i).quote_line_id = FND_API.G_MISS_NUM) then

2574: END IF;
2575: RAISE FND_API.G_EXC_ERROR;
2576: end if;
2577:
2578: if (l_qte_line_dtl_tbl(i).quote_line_id is null) or (l_qte_line_dtl_tbl(i).quote_line_id = FND_API.G_MISS_NUM) then
2579: open get_line_id(l_qte_line_dtl_tbl(i).config_header_id,l_qte_line_dtl_tbl(i).config_revision_num);
2580: fetch get_line_id into l_qte_line_dtl_tbl(i).quote_line_id;
2581: close get_line_id;
2582: end if;

Line 2603: IF fnd_api.to_boolean (p_commit) THEN

2599:
2600: end loop;
2601:
2602:
2603: IF fnd_api.to_boolean (p_commit) THEN
2604: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
2605: aso_debug_pub.ADD ('Commiting the work',1,'N');
2606: END IF;
2607: COMMIT WORK;

Line 2624: WHEN FND_API.G_EXC_ERROR THEN

2620: END IF;
2621:
2622:
2623: EXCEPTION
2624: WHEN FND_API.G_EXC_ERROR THEN
2625: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS(
2626: P_API_NAME => L_API_NAME
2627: ,P_PKG_NAME => G_PKG_NAME
2628: ,P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_ERROR

Line 2634: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

2630: ,X_MSG_COUNT => X_MSG_COUNT
2631: ,X_MSG_DATA => X_MSG_DATA
2632: ,X_RETURN_STATUS => X_RETURN_STATUS);
2633:
2634: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2635: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS(
2636: P_API_NAME => L_API_NAME
2637: ,P_PKG_NAME => G_PKG_NAME
2638: ,P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR