230: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Resource_Grp_Id ' || P_Copy_Quote_Header_Rec.Resource_Grp_Id , 1 , 'N' );
231: aso_debug_pub.ADD ( 'Copy_Quote - P_Copy_Quote_Header_Rec.Quote_Name ' || P_Copy_Quote_Header_Rec.Quote_Name , 1 , 'N' );
232: END IF;
233:
234: l_qte_header_rec := ASO_UTILITY_PVT.Query_Header_Row ( P_Copy_Quote_Header_Rec.Quote_Header_Id );
235:
236: IF ( P_Copy_Quote_Control_Rec.New_Version = FND_API.G_FALSE ) THEN
237: IF ( P_Copy_Quote_Header_Rec.Quote_Number IS NULL
238: OR P_Copy_Quote_Header_Rec.Quote_Number = FND_API.G_MISS_NUM
832: );
833:
834: EXCEPTION
835: WHEN FND_API.G_EXC_ERROR THEN
836: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
837: P_API_NAME => L_API_NAME
838: , P_PKG_NAME => G_PKG_NAME
839: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_ERROR
840: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
836: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
837: P_API_NAME => L_API_NAME
838: , P_PKG_NAME => G_PKG_NAME
839: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_ERROR
840: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
841: , X_MSG_COUNT => X_MSG_COUNT
842: , X_MSG_DATA => X_MSG_DATA
843: , X_RETURN_STATUS => X_RETURN_STATUS
844: );
843: , X_RETURN_STATUS => X_RETURN_STATUS
844: );
845:
846: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
847: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
848: P_API_NAME => L_API_NAME
849: , P_PKG_NAME => G_PKG_NAME
850: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR
851: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
847: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
848: P_API_NAME => L_API_NAME
849: , P_PKG_NAME => G_PKG_NAME
850: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR
851: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
852: , X_MSG_COUNT => X_MSG_COUNT
853: , X_MSG_DATA => X_MSG_DATA
854: , X_RETURN_STATUS => X_RETURN_STATUS
855: );
854: , X_RETURN_STATUS => X_RETURN_STATUS
855: );
856:
857: WHEN OTHERS THEN
858: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
859: P_API_NAME => L_API_NAME
860: , P_PKG_NAME => G_PKG_NAME
861: , P_SQLCODE => SQLCODE
862: , P_SQLERRM => SQLERRM
859: P_API_NAME => L_API_NAME
860: , P_PKG_NAME => G_PKG_NAME
861: , P_SQLCODE => SQLCODE
862: , P_SQLERRM => SQLERRM
863: , P_EXCEPTION_LEVEL => ASO_UTILITY_PVT.G_EXC_OTHERS
864: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
865: , X_MSG_COUNT => X_MSG_COUNT
866: , X_MSG_DATA => X_MSG_DATA
867: , X_RETURN_STATUS => X_RETURN_STATUS
860: , P_PKG_NAME => G_PKG_NAME
861: , P_SQLCODE => SQLCODE
862: , P_SQLERRM => SQLERRM
863: , P_EXCEPTION_LEVEL => ASO_UTILITY_PVT.G_EXC_OTHERS
864: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
865: , X_MSG_COUNT => X_MSG_COUNT
866: , X_MSG_DATA => X_MSG_DATA
867: , X_RETURN_STATUS => X_RETURN_STATUS
868: );
1005: -- API body
1006: --
1007:
1008: l_price_adj_tbl :=
1009: ASO_UTILITY_PVT.Query_Price_Adj_Rows (
1010: p_qte_header_id => l_qte_header_id
1011: , p_qte_line_id => NULL
1012: );
1013:
1013:
1014: l_dup_Price_Adj_Tbl := l_price_adj_tbl;
1015:
1016: l_price_adj_attr_tbl :=
1017: ASO_UTILITY_PVT.Query_Price_Adj_Attr_Rows (
1018: p_price_adj_tbl => l_price_adj_tbl
1019: );
1020:
1021: l_price_attr_tbl :=
1018: p_price_adj_tbl => l_price_adj_tbl
1019: );
1020:
1021: l_price_attr_tbl :=
1022: ASO_UTILITY_PVT.Query_Price_Attr_Rows (
1023: p_qte_header_id => l_qte_header_id
1024: , p_qte_line_id => NULL
1025: );
1026:
1024: , p_qte_line_id => NULL
1025: );
1026:
1027: /* l_payment_tbl :=
1028: ASO_UTILITY_PVT.Query_Payment_Rows (
1029: p_qte_header_id => l_qte_header_id
1030: , p_qte_line_id => NULL
1031: ); */
1032:
1034: aso_debug_pub.ADD ( 'Copy_Rows - payment_tbl.count: ' || TO_CHAR ( l_payment_tbl.COUNT ) , 1 , 'N' );
1035: END IF;
1036:
1037: l_tax_detail_tbl :=
1038: ASO_UTILITY_PVT.Query_Tax_Detail_Rows (
1039: p_qte_header_id => l_qte_header_id
1040: , p_qte_line_id => NULL
1041: , p_shipment_tbl => ASO_QUOTE_PUB.g_miss_shipment_tbl
1042: );
1044: aso_debug_pub.ADD ( 'Copy_Rows - tax_dtl_tbl.count: ' || TO_CHAR ( l_tax_detail_tbl.COUNT ) , 1 , 'N' );
1045: END IF;
1046:
1047: l_shipment_tbl :=
1048: ASO_UTILITY_PVT.Query_Shipment_Rows (
1049: p_qte_header_id => l_qte_header_id
1050: , p_qte_line_id => NULL
1051: );
1052: IF aso_debug_pub.g_debug_flag = 'Y' THEN
1053: aso_debug_pub.ADD ( 'Copy_Rows - shipment_tbl.count: ' || TO_CHAR ( l_shipment_tbl.COUNT ) , 1 , 'N' );
1054: END IF;
1055:
1056: l_freight_charge_tbl :=
1057: ASO_UTILITY_PVT.Query_Freight_Charge_Rows (
1058: P_Shipment_Tbl => l_shipment_tbl
1059: );
1060:
1061: l_Line_Attr_Ext_Tbl :=
1058: P_Shipment_Tbl => l_shipment_tbl
1059: );
1060:
1061: l_Line_Attr_Ext_Tbl :=
1062: ASO_UTILITY_PVT.Query_Line_Attribs_header_Rows (
1063: P_Qte_header_Id => l_qte_header_id
1064: );
1065:
1066: l_sales_credit_tbl :=
1063: P_Qte_header_Id => l_qte_header_id
1064: );
1065:
1066: l_sales_credit_tbl :=
1067: ASO_UTILITY_PVT.Query_Sales_Credit_Row (
1068: P_qte_header_Id => l_qte_header_id
1069: , P_qte_line_id => NULL
1070: );
1071:
1069: , P_qte_line_id => NULL
1070: );
1071:
1072: l_quote_party_tbl :=
1073: ASO_UTILITY_PVT.Query_Quote_Party_Row (
1074: P_Qte_header_Id => l_qte_header_id
1075: , P_qte_line_id => NULL
1076: );
1077:
1228:
1229: x_qte_header_id := l_qte_header_rec.quote_header_id;
1230:
1231: -- Copy the header payment record
1232: l_payment_tbl := ASO_UTILITY_PVT.Query_Payment_Rows(p_qte_header_id =>l_qte_header_id,p_qte_line_id =>NULL);
1233:
1234: IF l_payment_tbl.count > 0 then
1235:
1236: FOR j IN 1 .. l_payment_tbl.COUNT LOOP
1550:
1551: EXCEPTION
1552:
1553: WHEN FND_API.G_EXC_ERROR THEN
1554: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
1555: P_API_NAME => L_API_NAME
1556: , P_PKG_NAME => G_PKG_NAME
1557: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_ERROR
1558: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
1554: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
1555: P_API_NAME => L_API_NAME
1556: , P_PKG_NAME => G_PKG_NAME
1557: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_ERROR
1558: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
1559: , X_MSG_COUNT => X_MSG_COUNT
1560: , X_MSG_DATA => X_MSG_DATA
1561: , X_RETURN_STATUS => X_RETURN_STATUS
1562: );
1561: , X_RETURN_STATUS => X_RETURN_STATUS
1562: );
1563:
1564: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1565: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
1566: P_API_NAME => L_API_NAME
1567: , P_PKG_NAME => G_PKG_NAME
1568: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR
1569: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
1565: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
1566: P_API_NAME => L_API_NAME
1567: , P_PKG_NAME => G_PKG_NAME
1568: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR
1569: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
1570: , X_MSG_COUNT => X_MSG_COUNT
1571: , X_MSG_DATA => X_MSG_DATA
1572: , X_RETURN_STATUS => X_RETURN_STATUS
1573: );
1572: , X_RETURN_STATUS => X_RETURN_STATUS
1573: );
1574:
1575: WHEN OTHERS THEN
1576: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
1577: P_API_NAME => L_API_NAME
1578: , P_PKG_NAME => G_PKG_NAME
1579: , P_SQLCODE => SQLCODE
1580: , P_SQLERRM => SQLERRM
1577: P_API_NAME => L_API_NAME
1578: , P_PKG_NAME => G_PKG_NAME
1579: , P_SQLCODE => SQLCODE
1580: , P_SQLERRM => SQLERRM
1581: , P_EXCEPTION_LEVEL => ASO_UTILITY_PVT.G_EXC_OTHERS
1582: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
1583: , X_MSG_COUNT => X_MSG_COUNT
1584: , X_MSG_DATA => X_MSG_DATA
1585: , X_RETURN_STATUS => X_RETURN_STATUS
1578: , P_PKG_NAME => G_PKG_NAME
1579: , P_SQLCODE => SQLCODE
1580: , P_SQLERRM => SQLERRM
1581: , P_EXCEPTION_LEVEL => ASO_UTILITY_PVT.G_EXC_OTHERS
1582: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
1583: , X_MSG_COUNT => X_MSG_COUNT
1584: , X_MSG_DATA => X_MSG_DATA
1585: , X_RETURN_STATUS => X_RETURN_STATUS
1586: );
1854: END IF;
1855:
1856:
1857: l_qte_line_tbl :=
1858: ASO_UTILITY_PVT.Query_Qte_Line_Rows ( p_qte_header_id );
1859:
1860: FOR i IN 1 .. l_qte_line_tbl.COUNT LOOP
1861: l_line_index_link_tbl ( l_qte_line_tbl ( i ).quote_line_id ) :=
1862: FND_API.G_MISS_NUM;
1926:
1927:
1928:
1929: l_qte_line_tbl := ASO_QUOTE_PUB.G_MISS_QTE_LINE_TBL ;
1930: l_qte_line_rec := ASO_UTILITY_PVT.Query_Qte_Line_Row ( P_Qte_Line_Id );
1931: l_qte_line_tbl(1) := l_qte_line_rec;
1932:
1933:
1934:
1932:
1933:
1934:
1935: -- Getting the quote line detail record
1936: l_qte_line_dtl_tbl := ASO_UTILITY_PVT.Query_Line_Dtl_Rows ( P_Qte_Line_Id );
1937:
1938:
1939: IF l_qte_line_rec.line_category_code = 'RETURN' THEN
1940: IF aso_debug_pub.g_debug_flag = 'Y' THEN
2063: END IF;
2064:
2065: IF l_line_index_link_tbl ( l_qte_line_id ) = FND_API.G_MISS_NUM THEN
2066:
2067: l_qte_line_dtl_tbl := ASO_UTILITY_PVT.Query_Line_Dtl_Rows ( l_qte_line_id );
2068:
2069: IF l_qte_line_tbl ( i ).item_type_code = 'MDL' THEN
2070:
2071: IF l_qte_line_dtl_tbl.COUNT > 0 THEN
2145: IF l_qte_line_tbl ( i ).item_type_code <> 'CFG'
2146: AND l_qte_line_tbl ( i ).item_type_code <> 'OPT'
2147: AND l_service_item_flag <> 'Y' THEN
2148:
2149: l_line_attr_Ext_Tbl := ASO_UTILITY_PVT.Query_Line_Attribs_Ext_Rows ( l_qte_line_id );
2150:
2151: IF ( P_Qte_Line_Id IS NOT NULL ) AND (P_Qte_Line_Id <> FND_API.G_MISS_NUM) THEN
2152:
2153: l_price_adj_tbl := ASO_UTILITY_PVT.Query_Price_Adj_NonPRG_Rows(p_qte_header_id, l_qte_line_id);
2149: l_line_attr_Ext_Tbl := ASO_UTILITY_PVT.Query_Line_Attribs_Ext_Rows ( l_qte_line_id );
2150:
2151: IF ( P_Qte_Line_Id IS NOT NULL ) AND (P_Qte_Line_Id <> FND_API.G_MISS_NUM) THEN
2152:
2153: l_price_adj_tbl := ASO_UTILITY_PVT.Query_Price_Adj_NonPRG_Rows(p_qte_header_id, l_qte_line_id);
2154: ELSE
2155: l_price_adj_tbl := ASO_UTILITY_PVT.Query_Price_Adj_Rows(p_qte_header_id, l_qte_line_id);
2156: END IF;
2157:
2151: IF ( P_Qte_Line_Id IS NOT NULL ) AND (P_Qte_Line_Id <> FND_API.G_MISS_NUM) THEN
2152:
2153: l_price_adj_tbl := ASO_UTILITY_PVT.Query_Price_Adj_NonPRG_Rows(p_qte_header_id, l_qte_line_id);
2154: ELSE
2155: l_price_adj_tbl := ASO_UTILITY_PVT.Query_Price_Adj_Rows(p_qte_header_id, l_qte_line_id);
2156: END IF;
2157:
2158: l_dup_Price_Adj_Tbl := l_price_adj_tbl;
2159:
2156: END IF;
2157:
2158: l_dup_Price_Adj_Tbl := l_price_adj_tbl;
2159:
2160: l_price_adj_attr_tbl := ASO_UTILITY_PVT.Query_Price_Adj_Attr_Rows( p_price_adj_tbl => l_price_adj_tbl );
2161:
2162: l_price_attr_tbl := ASO_UTILITY_PVT.Query_Price_Attr_Rows(p_qte_header_id, l_qte_line_id);
2163:
2164: --l_payment_tbl := ASO_UTILITY_PVT.Query_Payment_Rows(p_qte_header_id, L_QTE_LINE_ID);
2158: l_dup_Price_Adj_Tbl := l_price_adj_tbl;
2159:
2160: l_price_adj_attr_tbl := ASO_UTILITY_PVT.Query_Price_Adj_Attr_Rows( p_price_adj_tbl => l_price_adj_tbl );
2161:
2162: l_price_attr_tbl := ASO_UTILITY_PVT.Query_Price_Attr_Rows(p_qte_header_id, l_qte_line_id);
2163:
2164: --l_payment_tbl := ASO_UTILITY_PVT.Query_Payment_Rows(p_qte_header_id, L_QTE_LINE_ID);
2165:
2166: l_payment_tbl := ASO_QUOTE_PUB.g_miss_payment_tbl;
2160: l_price_adj_attr_tbl := ASO_UTILITY_PVT.Query_Price_Adj_Attr_Rows( p_price_adj_tbl => l_price_adj_tbl );
2161:
2162: l_price_attr_tbl := ASO_UTILITY_PVT.Query_Price_Attr_Rows(p_qte_header_id, l_qte_line_id);
2163:
2164: --l_payment_tbl := ASO_UTILITY_PVT.Query_Payment_Rows(p_qte_header_id, L_QTE_LINE_ID);
2165:
2166: l_payment_tbl := ASO_QUOTE_PUB.g_miss_payment_tbl;
2167:
2168: l_shipment_tbl := ASO_UTILITY_PVT.Query_Shipment_Rows(p_qte_header_id, L_QTE_LINE_ID);
2164: --l_payment_tbl := ASO_UTILITY_PVT.Query_Payment_Rows(p_qte_header_id, L_QTE_LINE_ID);
2165:
2166: l_payment_tbl := ASO_QUOTE_PUB.g_miss_payment_tbl;
2167:
2168: l_shipment_tbl := ASO_UTILITY_PVT.Query_Shipment_Rows(p_qte_header_id, L_QTE_LINE_ID);
2169:
2170: l_sales_credit_tbl := ASO_UTILITY_PVT.Query_Sales_Credit_Row(p_qte_header_id, L_QTE_LINE_ID);
2171:
2172: l_quote_party_tbl := ASO_UTILITY_PVT.Query_Quote_Party_Row(p_qte_header_id, L_QTE_LINE_ID);
2166: l_payment_tbl := ASO_QUOTE_PUB.g_miss_payment_tbl;
2167:
2168: l_shipment_tbl := ASO_UTILITY_PVT.Query_Shipment_Rows(p_qte_header_id, L_QTE_LINE_ID);
2169:
2170: l_sales_credit_tbl := ASO_UTILITY_PVT.Query_Sales_Credit_Row(p_qte_header_id, L_QTE_LINE_ID);
2171:
2172: l_quote_party_tbl := ASO_UTILITY_PVT.Query_Quote_Party_Row(p_qte_header_id, L_QTE_LINE_ID);
2173:
2174: l_freight_charge_tbl := ASO_UTILITY_PVT.Query_Freight_Charge_Rows(l_shipment_tbl);
2168: l_shipment_tbl := ASO_UTILITY_PVT.Query_Shipment_Rows(p_qte_header_id, L_QTE_LINE_ID);
2169:
2170: l_sales_credit_tbl := ASO_UTILITY_PVT.Query_Sales_Credit_Row(p_qte_header_id, L_QTE_LINE_ID);
2171:
2172: l_quote_party_tbl := ASO_UTILITY_PVT.Query_Quote_Party_Row(p_qte_header_id, L_QTE_LINE_ID);
2173:
2174: l_freight_charge_tbl := ASO_UTILITY_PVT.Query_Freight_Charge_Rows(l_shipment_tbl);
2175:
2176: l_tax_detail_tbl := ASO_UTILITY_PVT.Query_Tax_Detail_Rows(p_qte_header_id, L_QTE_LINE_ID, l_shipment_tbl);
2170: l_sales_credit_tbl := ASO_UTILITY_PVT.Query_Sales_Credit_Row(p_qte_header_id, L_QTE_LINE_ID);
2171:
2172: l_quote_party_tbl := ASO_UTILITY_PVT.Query_Quote_Party_Row(p_qte_header_id, L_QTE_LINE_ID);
2173:
2174: l_freight_charge_tbl := ASO_UTILITY_PVT.Query_Freight_Charge_Rows(l_shipment_tbl);
2175:
2176: l_tax_detail_tbl := ASO_UTILITY_PVT.Query_Tax_Detail_Rows(p_qte_header_id, L_QTE_LINE_ID, l_shipment_tbl);
2177:
2178: l_qte_line_tbl(i).quote_line_id := NULL;
2172: l_quote_party_tbl := ASO_UTILITY_PVT.Query_Quote_Party_Row(p_qte_header_id, L_QTE_LINE_ID);
2173:
2174: l_freight_charge_tbl := ASO_UTILITY_PVT.Query_Freight_Charge_Rows(l_shipment_tbl);
2175:
2176: l_tax_detail_tbl := ASO_UTILITY_PVT.Query_Tax_Detail_Rows(p_qte_header_id, L_QTE_LINE_ID, l_shipment_tbl);
2177:
2178: l_qte_line_tbl(i).quote_line_id := NULL;
2179:
2180: l_qte_line_tbl ( i ).object_version_number := FND_API.G_MISS_NUM;
2331: ato_line_id = decode(l_ato_model,fnd_api.g_true,lx_qte_line_rec.quote_line_id,null)
2332: where quote_line_id = lx_qte_line_rec.quote_line_id;
2333:
2334: -- Copy the payment record
2335: l_payment_tbl := ASO_UTILITY_PVT.Query_Payment_Rows(p_qte_header_id, L_QTE_LINE_ID);
2336:
2337: IF l_payment_tbl.count > 0 then
2338:
2339: FOR j IN 1 .. l_payment_tbl.COUNT LOOP
2861:
2862: EXCEPTION
2863:
2864: WHEN FND_API.G_EXC_ERROR THEN
2865: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
2866: P_API_NAME => L_API_NAME
2867: , P_PKG_NAME => G_PKG_NAME
2868: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_ERROR
2869: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
2865: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
2866: P_API_NAME => L_API_NAME
2867: , P_PKG_NAME => G_PKG_NAME
2868: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_ERROR
2869: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
2870: , X_MSG_COUNT => X_MSG_COUNT
2871: , X_MSG_DATA => X_MSG_DATA
2872: , X_RETURN_STATUS => X_RETURN_STATUS
2873: );
2872: , X_RETURN_STATUS => X_RETURN_STATUS
2873: );
2874:
2875: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2876: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
2877: P_API_NAME => L_API_NAME
2878: , P_PKG_NAME => G_PKG_NAME
2879: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR
2880: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
2876: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
2877: P_API_NAME => L_API_NAME
2878: , P_PKG_NAME => G_PKG_NAME
2879: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR
2880: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
2881: , X_MSG_COUNT => X_MSG_COUNT
2882: , X_MSG_DATA => X_MSG_DATA
2883: , X_RETURN_STATUS => X_RETURN_STATUS
2884: );
2883: , X_RETURN_STATUS => X_RETURN_STATUS
2884: );
2885:
2886: WHEN OTHERS THEN
2887: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
2888: P_API_NAME => L_API_NAME
2889: , P_PKG_NAME => G_PKG_NAME
2890: , P_SQLCODE => SQLCODE
2891: , P_SQLERRM => SQLERRM
2888: P_API_NAME => L_API_NAME
2889: , P_PKG_NAME => G_PKG_NAME
2890: , P_SQLCODE => SQLCODE
2891: , P_SQLERRM => SQLERRM
2892: , P_EXCEPTION_LEVEL => ASO_UTILITY_PVT.G_EXC_OTHERS
2893: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
2894: , X_MSG_COUNT => X_MSG_COUNT
2895: , X_MSG_DATA => X_MSG_DATA
2896: , X_RETURN_STATUS => X_RETURN_STATUS
2889: , P_PKG_NAME => G_PKG_NAME
2890: , P_SQLCODE => SQLCODE
2891: , P_SQLERRM => SQLERRM
2892: , P_EXCEPTION_LEVEL => ASO_UTILITY_PVT.G_EXC_OTHERS
2893: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
2894: , X_MSG_COUNT => X_MSG_COUNT
2895: , X_MSG_DATA => X_MSG_DATA
2896: , X_RETURN_STATUS => X_RETURN_STATUS
2897: );
3036: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3037: aso_debug_pub.ADD ( 'Copy_Config - inside cursor qte_line_id ' || qte_line_id , 1 , 'Y' );
3038: END IF;
3039:
3040: l_qte_line_rec := ASO_UTILITY_PVT.Query_Qte_Line_Row ( qte_line_id );
3041:
3042: IF p_new_qte_header_id = p_qte_header_id THEN
3043:
3044: OPEN get_old_line_id (
3069: IF (p_line_quantity is not null ) and (p_line_quantity <> FND_API.G_MISS_NUM ) THEN
3070: l_qte_line_rec.quantity := p_line_quantity;
3071: END IF;
3072:
3073: l_qte_line_dtl_tbl := ASO_UTILITY_PVT.Query_Line_Dtl_Rows ( qte_line_id );
3074:
3075: FOR k IN 1 .. l_qte_line_dtl_tbl.COUNT LOOP
3076: l_qte_line_dtl_tbl ( k ).config_header_id := p_config_header_id;
3077: l_qte_line_dtl_tbl ( k ).config_revision_num := p_config_revision_num;
3076: l_qte_line_dtl_tbl ( k ).config_header_id := p_config_header_id;
3077: l_qte_line_dtl_tbl ( k ).config_revision_num := p_config_revision_num;
3078: END LOOP;
3079:
3080: l_line_attr_Ext_Tbl := ASO_UTILITY_PVT.Query_Line_Attribs_Ext_Rows ( qte_line_id );
3081:
3082: l_price_adj_tbl := ASO_UTILITY_PVT.Query_Price_Adj_Rows ( p_qte_header_id , qte_line_id );
3083: l_dup_price_adj_tbl := l_price_adj_tbl;
3084:
3078: END LOOP;
3079:
3080: l_line_attr_Ext_Tbl := ASO_UTILITY_PVT.Query_Line_Attribs_Ext_Rows ( qte_line_id );
3081:
3082: l_price_adj_tbl := ASO_UTILITY_PVT.Query_Price_Adj_Rows ( p_qte_header_id , qte_line_id );
3083: l_dup_price_adj_tbl := l_price_adj_tbl;
3084:
3085: l_price_adj_attr_tbl := ASO_UTILITY_PVT.Query_Price_Adj_Attr_Rows(p_price_adj_tbl => l_price_adj_tbl);
3086:
3081:
3082: l_price_adj_tbl := ASO_UTILITY_PVT.Query_Price_Adj_Rows ( p_qte_header_id , qte_line_id );
3083: l_dup_price_adj_tbl := l_price_adj_tbl;
3084:
3085: l_price_adj_attr_tbl := ASO_UTILITY_PVT.Query_Price_Adj_Attr_Rows(p_price_adj_tbl => l_price_adj_tbl);
3086:
3087: l_price_attr_tbl := ASO_UTILITY_PVT.Query_Price_Attr_Rows ( p_qte_header_id , qte_line_id );
3088:
3089: --l_payment_tbl := ASO_UTILITY_PVT.Query_Payment_Rows ( p_qte_header_id , qte_line_id );
3083: l_dup_price_adj_tbl := l_price_adj_tbl;
3084:
3085: l_price_adj_attr_tbl := ASO_UTILITY_PVT.Query_Price_Adj_Attr_Rows(p_price_adj_tbl => l_price_adj_tbl);
3086:
3087: l_price_attr_tbl := ASO_UTILITY_PVT.Query_Price_Attr_Rows ( p_qte_header_id , qte_line_id );
3088:
3089: --l_payment_tbl := ASO_UTILITY_PVT.Query_Payment_Rows ( p_qte_header_id , qte_line_id );
3090:
3091: l_shipment_tbl := ASO_UTILITY_PVT.Query_Shipment_Rows ( p_qte_header_id , qte_line_id );
3085: l_price_adj_attr_tbl := ASO_UTILITY_PVT.Query_Price_Adj_Attr_Rows(p_price_adj_tbl => l_price_adj_tbl);
3086:
3087: l_price_attr_tbl := ASO_UTILITY_PVT.Query_Price_Attr_Rows ( p_qte_header_id , qte_line_id );
3088:
3089: --l_payment_tbl := ASO_UTILITY_PVT.Query_Payment_Rows ( p_qte_header_id , qte_line_id );
3090:
3091: l_shipment_tbl := ASO_UTILITY_PVT.Query_Shipment_Rows ( p_qte_header_id , qte_line_id );
3092:
3093: l_sales_credit_tbl := ASO_UTILITY_PVT.Query_Sales_Credit_Row ( p_qte_header_id , qte_line_id );
3087: l_price_attr_tbl := ASO_UTILITY_PVT.Query_Price_Attr_Rows ( p_qte_header_id , qte_line_id );
3088:
3089: --l_payment_tbl := ASO_UTILITY_PVT.Query_Payment_Rows ( p_qte_header_id , qte_line_id );
3090:
3091: l_shipment_tbl := ASO_UTILITY_PVT.Query_Shipment_Rows ( p_qte_header_id , qte_line_id );
3092:
3093: l_sales_credit_tbl := ASO_UTILITY_PVT.Query_Sales_Credit_Row ( p_qte_header_id , qte_line_id );
3094:
3095: l_quote_party_tbl := ASO_UTILITY_PVT.Query_Quote_Party_Row ( p_qte_header_id , qte_line_id );
3089: --l_payment_tbl := ASO_UTILITY_PVT.Query_Payment_Rows ( p_qte_header_id , qte_line_id );
3090:
3091: l_shipment_tbl := ASO_UTILITY_PVT.Query_Shipment_Rows ( p_qte_header_id , qte_line_id );
3092:
3093: l_sales_credit_tbl := ASO_UTILITY_PVT.Query_Sales_Credit_Row ( p_qte_header_id , qte_line_id );
3094:
3095: l_quote_party_tbl := ASO_UTILITY_PVT.Query_Quote_Party_Row ( p_qte_header_id , qte_line_id );
3096:
3097: l_freight_charge_tbl := ASO_UTILITY_PVT.Query_Freight_Charge_Rows ( l_shipment_tbl );
3091: l_shipment_tbl := ASO_UTILITY_PVT.Query_Shipment_Rows ( p_qte_header_id , qte_line_id );
3092:
3093: l_sales_credit_tbl := ASO_UTILITY_PVT.Query_Sales_Credit_Row ( p_qte_header_id , qte_line_id );
3094:
3095: l_quote_party_tbl := ASO_UTILITY_PVT.Query_Quote_Party_Row ( p_qte_header_id , qte_line_id );
3096:
3097: l_freight_charge_tbl := ASO_UTILITY_PVT.Query_Freight_Charge_Rows ( l_shipment_tbl );
3098:
3099: l_tax_detail_tbl := ASO_UTILITY_PVT.Query_Tax_Detail_Rows ( p_qte_header_id , qte_line_id , l_shipment_tbl );
3093: l_sales_credit_tbl := ASO_UTILITY_PVT.Query_Sales_Credit_Row ( p_qte_header_id , qte_line_id );
3094:
3095: l_quote_party_tbl := ASO_UTILITY_PVT.Query_Quote_Party_Row ( p_qte_header_id , qte_line_id );
3096:
3097: l_freight_charge_tbl := ASO_UTILITY_PVT.Query_Freight_Charge_Rows ( l_shipment_tbl );
3098:
3099: l_tax_detail_tbl := ASO_UTILITY_PVT.Query_Tax_Detail_Rows ( p_qte_header_id , qte_line_id , l_shipment_tbl );
3100:
3101: OPEN C_Serviceable_Product ( l_qte_line_rec.organization_id , l_qte_line_rec.inventory_item_id );
3095: l_quote_party_tbl := ASO_UTILITY_PVT.Query_Quote_Party_Row ( p_qte_header_id , qte_line_id );
3096:
3097: l_freight_charge_tbl := ASO_UTILITY_PVT.Query_Freight_Charge_Rows ( l_shipment_tbl );
3098:
3099: l_tax_detail_tbl := ASO_UTILITY_PVT.Query_Tax_Detail_Rows ( p_qte_header_id , qte_line_id , l_shipment_tbl );
3100:
3101: OPEN C_Serviceable_Product ( l_qte_line_rec.organization_id , l_qte_line_rec.inventory_item_id );
3102: FETCH C_Serviceable_Product INTO l_serviceable_product_flag;
3103: CLOSE C_Serviceable_Product;
3264: RAISE FND_API.G_EXC_ERROR;
3265: END IF;
3266:
3267: -- Copy the payment record
3268: l_payment_tbl := ASO_UTILITY_PVT.Query_Payment_Rows ( p_qte_header_id , qte_line_id );
3269: IF l_payment_tbl.count > 0 then
3270:
3271: FOR j IN 1 .. l_payment_tbl.COUNT LOOP
3272: l_payment_tbl ( j ).QUOTE_HEADER_ID := p_new_qte_header_id;
3520: aso_debug_pub.ADD ( 'Copy_Service - inside cursor qte_line_id ' || qte_line_id , 1 , 'Y' );
3521: END IF;
3522:
3523: l_qte_line_rec :=
3524: ASO_UTILITY_PVT.Query_Qte_Line_Row ( qte_line_id );
3525:
3526: IF p_new_qte_header_id = p_qte_header_id THEN
3527:
3528: OPEN get_qte_line_number(lx_line_index_link_tbl(p_qte_line_id));
3539: END IF;
3540:
3541: l_qte_line_rec.quote_header_id := p_new_qte_header_id;
3542: l_qte_line_dtl_tbl :=
3543: ASO_UTILITY_PVT.Query_Line_Dtl_Rows ( qte_line_id );
3544:
3545: IF l_qte_line_dtl_tbl.COUNT > 0 THEN
3546:
3547: FOR k IN 1 .. l_qte_line_dtl_tbl.COUNT LOOP
3568: IF aso_debug_pub.g_debug_flag = 'Y' THEN
3569: aso_debug_pub.ADD ( 'Copy_Service - 2 l_service_ref_line_id ' || l_service_ref_line_id , 1 , 'Y' );
3570: END IF;
3571:
3572: l_line_attr_Ext_Tbl := ASO_UTILITY_PVT.Query_Line_Attribs_Ext_Rows ( qte_line_id );
3573:
3574: l_price_adj_tbl := ASO_UTILITY_PVT.Query_Price_Adj_Rows ( p_qte_header_id , qte_line_id );
3575:
3576: l_dup_price_adj_tbl := l_price_adj_tbl;
3570: END IF;
3571:
3572: l_line_attr_Ext_Tbl := ASO_UTILITY_PVT.Query_Line_Attribs_Ext_Rows ( qte_line_id );
3573:
3574: l_price_adj_tbl := ASO_UTILITY_PVT.Query_Price_Adj_Rows ( p_qte_header_id , qte_line_id );
3575:
3576: l_dup_price_adj_tbl := l_price_adj_tbl;
3577:
3578: l_price_adj_attr_tbl := ASO_UTILITY_PVT.Query_Price_Adj_Attr_Rows ( p_price_adj_tbl => l_price_adj_tbl );
3574: l_price_adj_tbl := ASO_UTILITY_PVT.Query_Price_Adj_Rows ( p_qte_header_id , qte_line_id );
3575:
3576: l_dup_price_adj_tbl := l_price_adj_tbl;
3577:
3578: l_price_adj_attr_tbl := ASO_UTILITY_PVT.Query_Price_Adj_Attr_Rows ( p_price_adj_tbl => l_price_adj_tbl );
3579:
3580: l_price_attr_tbl := ASO_UTILITY_PVT.Query_Price_Attr_Rows ( p_qte_header_id , qte_line_id );
3581:
3582: --l_payment_tbl := ASO_UTILITY_PVT.Query_Payment_Rows ( p_qte_header_id , QTE_LINE_ID );
3576: l_dup_price_adj_tbl := l_price_adj_tbl;
3577:
3578: l_price_adj_attr_tbl := ASO_UTILITY_PVT.Query_Price_Adj_Attr_Rows ( p_price_adj_tbl => l_price_adj_tbl );
3579:
3580: l_price_attr_tbl := ASO_UTILITY_PVT.Query_Price_Attr_Rows ( p_qte_header_id , qte_line_id );
3581:
3582: --l_payment_tbl := ASO_UTILITY_PVT.Query_Payment_Rows ( p_qte_header_id , QTE_LINE_ID );
3583:
3584: l_shipment_tbl := ASO_UTILITY_PVT.Query_Shipment_Rows ( p_qte_header_id , QTE_LINE_ID );
3578: l_price_adj_attr_tbl := ASO_UTILITY_PVT.Query_Price_Adj_Attr_Rows ( p_price_adj_tbl => l_price_adj_tbl );
3579:
3580: l_price_attr_tbl := ASO_UTILITY_PVT.Query_Price_Attr_Rows ( p_qte_header_id , qte_line_id );
3581:
3582: --l_payment_tbl := ASO_UTILITY_PVT.Query_Payment_Rows ( p_qte_header_id , QTE_LINE_ID );
3583:
3584: l_shipment_tbl := ASO_UTILITY_PVT.Query_Shipment_Rows ( p_qte_header_id , QTE_LINE_ID );
3585:
3586: l_sales_credit_tbl := ASO_UTILITY_PVT.Query_Sales_Credit_Row ( p_qte_header_id , QTE_LINE_ID );
3580: l_price_attr_tbl := ASO_UTILITY_PVT.Query_Price_Attr_Rows ( p_qte_header_id , qte_line_id );
3581:
3582: --l_payment_tbl := ASO_UTILITY_PVT.Query_Payment_Rows ( p_qte_header_id , QTE_LINE_ID );
3583:
3584: l_shipment_tbl := ASO_UTILITY_PVT.Query_Shipment_Rows ( p_qte_header_id , QTE_LINE_ID );
3585:
3586: l_sales_credit_tbl := ASO_UTILITY_PVT.Query_Sales_Credit_Row ( p_qte_header_id , QTE_LINE_ID );
3587:
3588: l_quote_party_tbl := ASO_UTILITY_PVT.Query_Quote_Party_Row ( p_qte_header_id , QTE_LINE_ID );
3582: --l_payment_tbl := ASO_UTILITY_PVT.Query_Payment_Rows ( p_qte_header_id , QTE_LINE_ID );
3583:
3584: l_shipment_tbl := ASO_UTILITY_PVT.Query_Shipment_Rows ( p_qte_header_id , QTE_LINE_ID );
3585:
3586: l_sales_credit_tbl := ASO_UTILITY_PVT.Query_Sales_Credit_Row ( p_qte_header_id , QTE_LINE_ID );
3587:
3588: l_quote_party_tbl := ASO_UTILITY_PVT.Query_Quote_Party_Row ( p_qte_header_id , QTE_LINE_ID );
3589:
3590: l_freight_charge_tbl := ASO_UTILITY_PVT.Query_Freight_Charge_Rows ( l_shipment_tbl );
3584: l_shipment_tbl := ASO_UTILITY_PVT.Query_Shipment_Rows ( p_qte_header_id , QTE_LINE_ID );
3585:
3586: l_sales_credit_tbl := ASO_UTILITY_PVT.Query_Sales_Credit_Row ( p_qte_header_id , QTE_LINE_ID );
3587:
3588: l_quote_party_tbl := ASO_UTILITY_PVT.Query_Quote_Party_Row ( p_qte_header_id , QTE_LINE_ID );
3589:
3590: l_freight_charge_tbl := ASO_UTILITY_PVT.Query_Freight_Charge_Rows ( l_shipment_tbl );
3591:
3592: l_tax_detail_tbl := ASO_UTILITY_PVT.Query_Tax_Detail_Rows ( p_qte_header_id , QTE_LINE_ID , l_shipment_tbl );
3586: l_sales_credit_tbl := ASO_UTILITY_PVT.Query_Sales_Credit_Row ( p_qte_header_id , QTE_LINE_ID );
3587:
3588: l_quote_party_tbl := ASO_UTILITY_PVT.Query_Quote_Party_Row ( p_qte_header_id , QTE_LINE_ID );
3589:
3590: l_freight_charge_tbl := ASO_UTILITY_PVT.Query_Freight_Charge_Rows ( l_shipment_tbl );
3591:
3592: l_tax_detail_tbl := ASO_UTILITY_PVT.Query_Tax_Detail_Rows ( p_qte_header_id , QTE_LINE_ID , l_shipment_tbl );
3593:
3594: l_qte_line_rec.quote_line_id := NULL;
3588: l_quote_party_tbl := ASO_UTILITY_PVT.Query_Quote_Party_Row ( p_qte_header_id , QTE_LINE_ID );
3589:
3590: l_freight_charge_tbl := ASO_UTILITY_PVT.Query_Freight_Charge_Rows ( l_shipment_tbl );
3591:
3592: l_tax_detail_tbl := ASO_UTILITY_PVT.Query_Tax_Detail_Rows ( p_qte_header_id , QTE_LINE_ID , l_shipment_tbl );
3593:
3594: l_qte_line_rec.quote_line_id := NULL;
3595: l_qte_line_rec.object_version_number := FND_API.G_MISS_NUM;
3596:
3722: END IF;
3723:
3724:
3725: -- Copy the payment record
3726: l_payment_tbl := ASO_UTILITY_PVT.Query_Payment_Rows ( p_qte_header_id , QTE_LINE_ID );
3727:
3728: IF l_payment_tbl.count > 0 then
3729:
3730: FOR j IN 1 .. l_payment_tbl.COUNT LOOP
4066:
4067: EXCEPTION
4068:
4069: WHEN FND_API.G_EXC_ERROR THEN
4070: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
4071: P_API_NAME => L_API_NAME
4072: , P_PKG_NAME => G_PKG_NAME
4073: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_ERROR
4074: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
4070: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
4071: P_API_NAME => L_API_NAME
4072: , P_PKG_NAME => G_PKG_NAME
4073: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_ERROR
4074: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
4075: , X_MSG_COUNT => X_MSG_COUNT
4076: , X_MSG_DATA => X_MSG_DATA
4077: , X_RETURN_STATUS => X_RETURN_STATUS
4078: );
4077: , X_RETURN_STATUS => X_RETURN_STATUS
4078: );
4079:
4080: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
4081: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
4082: P_API_NAME => L_API_NAME
4083: , P_PKG_NAME => G_PKG_NAME
4084: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR
4085: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
4081: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
4082: P_API_NAME => L_API_NAME
4083: , P_PKG_NAME => G_PKG_NAME
4084: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR
4085: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
4086: , X_MSG_COUNT => X_MSG_COUNT
4087: , X_MSG_DATA => X_MSG_DATA
4088: , X_RETURN_STATUS => X_RETURN_STATUS
4089: );
4088: , X_RETURN_STATUS => X_RETURN_STATUS
4089: );
4090:
4091: WHEN OTHERS THEN
4092: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
4093: P_API_NAME => L_API_NAME
4094: , P_PKG_NAME => G_PKG_NAME
4095: , P_SQLCODE => SQLCODE
4096: , P_SQLERRM => SQLERRM
4093: P_API_NAME => L_API_NAME
4094: , P_PKG_NAME => G_PKG_NAME
4095: , P_SQLCODE => SQLCODE
4096: , P_SQLERRM => SQLERRM
4097: , P_EXCEPTION_LEVEL => ASO_UTILITY_PVT.G_EXC_OTHERS
4098: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
4099: , X_MSG_COUNT => X_MSG_COUNT
4100: , X_MSG_DATA => X_MSG_DATA
4101: , X_RETURN_STATUS => X_RETURN_STATUS
4094: , P_PKG_NAME => G_PKG_NAME
4095: , P_SQLCODE => SQLCODE
4096: , P_SQLERRM => SQLERRM
4097: , P_EXCEPTION_LEVEL => ASO_UTILITY_PVT.G_EXC_OTHERS
4098: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
4099: , X_MSG_COUNT => X_MSG_COUNT
4100: , X_MSG_DATA => X_MSG_DATA
4101: , X_RETURN_STATUS => X_RETURN_STATUS
4102: );
4469: aso_debug_pub.ADD ( 'SPLIT_MODEL_LINE - After Validating the Quote Line ' , 1 , 'N' );
4470: END IF;
4471:
4472: -- Getting the quote line record
4473: l_qte_line_rec := ASO_UTILITY_PVT.Query_Qte_Line_Row ( P_Original_Qte_Line_Rec.quote_line_id );
4474:
4475: -- Getting the quote line detail record
4476: l_qte_line_detail_tbl := ASO_UTILITY_PVT.Query_Line_Dtl_Rows ( P_Original_Qte_Line_Rec.quote_line_id );
4477:
4472: -- Getting the quote line record
4473: l_qte_line_rec := ASO_UTILITY_PVT.Query_Qte_Line_Row ( P_Original_Qte_Line_Rec.quote_line_id );
4474:
4475: -- Getting the quote line detail record
4476: l_qte_line_detail_tbl := ASO_UTILITY_PVT.Query_Line_Dtl_Rows ( P_Original_Qte_Line_Rec.quote_line_id );
4477:
4478: -- Getting the shipment details for the quote line
4479: l_qte_shipment_dtl_tbl := ASO_UTILITY_PVT.Query_Shipment_Rows (P_Qte_Header_Rec.quote_header_id, P_Original_Qte_Line_Rec.quote_line_id );
4480:
4475: -- Getting the quote line detail record
4476: l_qte_line_detail_tbl := ASO_UTILITY_PVT.Query_Line_Dtl_Rows ( P_Original_Qte_Line_Rec.quote_line_id );
4477:
4478: -- Getting the shipment details for the quote line
4479: l_qte_shipment_dtl_tbl := ASO_UTILITY_PVT.Query_Shipment_Rows (P_Qte_Header_Rec.quote_header_id, P_Original_Qte_Line_Rec.quote_line_id );
4480:
4481:
4482: -- Copy the Qte line table to the local variable
4483: For i in 1..P_Qte_Line_Tbl.count LOOP
4648: l_line_index_link_tbl (P_Original_Qte_Line_Rec.quote_line_id ) := FND_API.G_MISS_NUM;
4649:
4650: IF l_line_index_link_tbl ( P_Original_Qte_Line_Rec.quote_line_id ) = FND_API.G_MISS_NUM THEN
4651: l_qte_line_detail_tbl :=
4652: ASO_UTILITY_PVT.Query_Line_Dtl_Rows ( P_Original_Qte_Line_Rec.quote_line_id );
4653:
4654: IF l_qte_line_rec.item_type_code = 'MDL' THEN
4655:
4656: IF aso_debug_pub.g_debug_flag = 'Y' THEN
4741: IF l_qte_line_rec.item_type_code <> 'CFG'
4742: AND l_qte_line_rec.item_type_code <> 'OPT'
4743: AND l_service_item_flag <> 'Y' THEN
4744:
4745: l_line_attr_Ext_Tbl := ASO_UTILITY_PVT.Query_Line_Attribs_Ext_Rows ( P_Original_Qte_Line_Rec.quote_line_id);
4746:
4747: l_price_adj_tbl := ASO_UTILITY_PVT.Query_Price_Adj_NonPRG_Rows ( P_Qte_Header_Rec.quote_header_id ,
4748: P_Original_Qte_Line_Rec.quote_line_id);
4749: l_dup_Price_Adj_Tbl := l_price_adj_tbl;
4743: AND l_service_item_flag <> 'Y' THEN
4744:
4745: l_line_attr_Ext_Tbl := ASO_UTILITY_PVT.Query_Line_Attribs_Ext_Rows ( P_Original_Qte_Line_Rec.quote_line_id);
4746:
4747: l_price_adj_tbl := ASO_UTILITY_PVT.Query_Price_Adj_NonPRG_Rows ( P_Qte_Header_Rec.quote_header_id ,
4748: P_Original_Qte_Line_Rec.quote_line_id);
4749: l_dup_Price_Adj_Tbl := l_price_adj_tbl;
4750:
4751: l_price_adj_attr_tbl := ASO_UTILITY_PVT.Query_Price_Adj_Attr_Rows(p_price_adj_tbl => l_price_adj_tbl);
4747: l_price_adj_tbl := ASO_UTILITY_PVT.Query_Price_Adj_NonPRG_Rows ( P_Qte_Header_Rec.quote_header_id ,
4748: P_Original_Qte_Line_Rec.quote_line_id);
4749: l_dup_Price_Adj_Tbl := l_price_adj_tbl;
4750:
4751: l_price_adj_attr_tbl := ASO_UTILITY_PVT.Query_Price_Adj_Attr_Rows(p_price_adj_tbl => l_price_adj_tbl);
4752:
4753: l_price_attr_tbl := ASO_UTILITY_PVT.Query_Price_Attr_Rows( P_Qte_Header_Rec.quote_header_id,
4754: P_Original_Qte_Line_Rec.quote_line_id);
4755:
4749: l_dup_Price_Adj_Tbl := l_price_adj_tbl;
4750:
4751: l_price_adj_attr_tbl := ASO_UTILITY_PVT.Query_Price_Adj_Attr_Rows(p_price_adj_tbl => l_price_adj_tbl);
4752:
4753: l_price_attr_tbl := ASO_UTILITY_PVT.Query_Price_Attr_Rows( P_Qte_Header_Rec.quote_header_id,
4754: P_Original_Qte_Line_Rec.quote_line_id);
4755:
4756: /* l_payment_tbl := ASO_UTILITY_PVT.Query_Payment_Rows ( P_Qte_Header_Rec.quote_header_id,
4757: P_Original_Qte_Line_Rec.quote_line_id); */
4752:
4753: l_price_attr_tbl := ASO_UTILITY_PVT.Query_Price_Attr_Rows( P_Qte_Header_Rec.quote_header_id,
4754: P_Original_Qte_Line_Rec.quote_line_id);
4755:
4756: /* l_payment_tbl := ASO_UTILITY_PVT.Query_Payment_Rows ( P_Qte_Header_Rec.quote_header_id,
4757: P_Original_Qte_Line_Rec.quote_line_id); */
4758:
4759: l_shipment_tbl := ASO_UTILITY_PVT.Query_Shipment_Rows ( P_Qte_Header_Rec.quote_header_id,
4760: P_Original_Qte_Line_Rec.quote_line_id);
4755:
4756: /* l_payment_tbl := ASO_UTILITY_PVT.Query_Payment_Rows ( P_Qte_Header_Rec.quote_header_id,
4757: P_Original_Qte_Line_Rec.quote_line_id); */
4758:
4759: l_shipment_tbl := ASO_UTILITY_PVT.Query_Shipment_Rows ( P_Qte_Header_Rec.quote_header_id,
4760: P_Original_Qte_Line_Rec.quote_line_id);
4761:
4762: l_sales_credit_tbl := ASO_UTILITY_PVT.Query_Sales_Credit_Row ( P_Qte_Header_Rec.quote_header_id,
4763: P_Original_Qte_Line_Rec.quote_line_id);
4758:
4759: l_shipment_tbl := ASO_UTILITY_PVT.Query_Shipment_Rows ( P_Qte_Header_Rec.quote_header_id,
4760: P_Original_Qte_Line_Rec.quote_line_id);
4761:
4762: l_sales_credit_tbl := ASO_UTILITY_PVT.Query_Sales_Credit_Row ( P_Qte_Header_Rec.quote_header_id,
4763: P_Original_Qte_Line_Rec.quote_line_id);
4764:
4765: l_quote_party_tbl := ASO_UTILITY_PVT.Query_Quote_Party_Row ( P_Qte_Header_Rec.quote_header_id,
4766: P_Original_Qte_Line_Rec.quote_line_id);
4761:
4762: l_sales_credit_tbl := ASO_UTILITY_PVT.Query_Sales_Credit_Row ( P_Qte_Header_Rec.quote_header_id,
4763: P_Original_Qte_Line_Rec.quote_line_id);
4764:
4765: l_quote_party_tbl := ASO_UTILITY_PVT.Query_Quote_Party_Row ( P_Qte_Header_Rec.quote_header_id,
4766: P_Original_Qte_Line_Rec.quote_line_id);
4767:
4768: l_freight_charge_tbl := ASO_UTILITY_PVT.Query_Freight_Charge_Rows ( l_shipment_tbl );
4769:
4764:
4765: l_quote_party_tbl := ASO_UTILITY_PVT.Query_Quote_Party_Row ( P_Qte_Header_Rec.quote_header_id,
4766: P_Original_Qte_Line_Rec.quote_line_id);
4767:
4768: l_freight_charge_tbl := ASO_UTILITY_PVT.Query_Freight_Charge_Rows ( l_shipment_tbl );
4769:
4770: l_tax_detail_tbl := ASO_UTILITY_PVT.Query_Tax_Detail_Rows ( P_Qte_Header_Rec.quote_header_id,
4771: P_Original_Qte_Line_Rec.quote_line_id,
4772: l_shipment_tbl);
4766: P_Original_Qte_Line_Rec.quote_line_id);
4767:
4768: l_freight_charge_tbl := ASO_UTILITY_PVT.Query_Freight_Charge_Rows ( l_shipment_tbl );
4769:
4770: l_tax_detail_tbl := ASO_UTILITY_PVT.Query_Tax_Detail_Rows ( P_Qte_Header_Rec.quote_header_id,
4771: P_Original_Qte_Line_Rec.quote_line_id,
4772: l_shipment_tbl);
4773:
4774: l_qte_line_rec.quote_line_id := NULL;
4937: END IF;
4938:
4939:
4940: -- Copy the payment record
4941: l_payment_tbl := ASO_UTILITY_PVT.Query_Payment_Rows ( P_Qte_Header_Rec.quote_header_id,
4942: P_Original_Qte_Line_Rec.quote_line_id);
4943:
4944: IF l_payment_tbl.count > 0 then
4945:
5267: IF aso_debug_pub.g_debug_flag = 'Y' THEN
5268: aso_debug_pub.ADD ( ' Getting the last update date of the quote before updating the quote ', 1 , 'N' );
5269: END IF;
5270:
5271: l_quote_header_rec := ASO_UTILITY_PVT.Query_Header_Row(P_Qte_Header_Rec.quote_header_id);
5272:
5273: OPEN get_latest_date (
5274: P_Qte_Header_Rec.quote_header_id
5275: );
5415: aso_debug_pub.ADD ( ' End of Split_Model_Line ', 1 , 'N' );
5416: END IF;
5417: EXCEPTION
5418: WHEN FND_API.G_EXC_ERROR THEN
5419: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
5420: P_API_NAME => L_API_NAME
5421: , P_PKG_NAME => G_PKG_NAME
5422: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_ERROR
5423: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
5419: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
5420: P_API_NAME => L_API_NAME
5421: , P_PKG_NAME => G_PKG_NAME
5422: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_ERROR
5423: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
5424: , X_MSG_COUNT => X_MSG_COUNT
5425: , X_MSG_DATA => X_MSG_DATA
5426: , X_RETURN_STATUS => X_RETURN_STATUS
5427: );
5426: , X_RETURN_STATUS => X_RETURN_STATUS
5427: );
5428:
5429: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
5430: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
5431: P_API_NAME => L_API_NAME
5432: , P_PKG_NAME => G_PKG_NAME
5433: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR
5434: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
5430: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
5431: P_API_NAME => L_API_NAME
5432: , P_PKG_NAME => G_PKG_NAME
5433: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR
5434: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
5435: , X_MSG_COUNT => X_MSG_COUNT
5436: , X_MSG_DATA => X_MSG_DATA
5437: , X_RETURN_STATUS => X_RETURN_STATUS
5438: );
5438: );
5439:
5440:
5441: WHEN OTHERS THEN
5442: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
5443: P_API_NAME => L_API_NAME
5444: , P_PKG_NAME => G_PKG_NAME
5445: , P_SQLCODE => SQLCODE
5446: , P_SQLERRM => SQLERRM
5443: P_API_NAME => L_API_NAME
5444: , P_PKG_NAME => G_PKG_NAME
5445: , P_SQLCODE => SQLCODE
5446: , P_SQLERRM => SQLERRM
5447: , P_EXCEPTION_LEVEL => ASO_UTILITY_PVT.G_EXC_OTHERS
5448: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
5449: , X_MSG_COUNT => X_MSG_COUNT
5450: , X_MSG_DATA => X_MSG_DATA
5451: , X_RETURN_STATUS => X_RETURN_STATUS
5444: , P_PKG_NAME => G_PKG_NAME
5445: , P_SQLCODE => SQLCODE
5446: , P_SQLERRM => SQLERRM
5447: , P_EXCEPTION_LEVEL => ASO_UTILITY_PVT.G_EXC_OTHERS
5448: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
5449: , X_MSG_COUNT => X_MSG_COUNT
5450: , X_MSG_DATA => X_MSG_DATA
5451: , X_RETURN_STATUS => X_RETURN_STATUS
5452: );
5610:
5611: EXCEPTION
5612:
5613: WHEN FND_API.G_EXC_ERROR THEN
5614: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
5615: P_API_NAME => L_API_NAME
5616: , P_PKG_NAME => G_PKG_NAME
5617: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_ERROR
5618: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
5614: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
5615: P_API_NAME => L_API_NAME
5616: , P_PKG_NAME => G_PKG_NAME
5617: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_ERROR
5618: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
5619: , X_MSG_COUNT => X_MSG_COUNT
5620: , X_MSG_DATA => X_MSG_DATA
5621: , X_RETURN_STATUS => X_RETURN_STATUS
5622: );
5621: , X_RETURN_STATUS => X_RETURN_STATUS
5622: );
5623:
5624: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
5625: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
5626: P_API_NAME => L_API_NAME
5627: , P_PKG_NAME => G_PKG_NAME
5628: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR
5629: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
5625: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
5626: P_API_NAME => L_API_NAME
5627: , P_PKG_NAME => G_PKG_NAME
5628: , P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR
5629: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
5630: , X_MSG_COUNT => X_MSG_COUNT
5631: , X_MSG_DATA => X_MSG_DATA
5632: , X_RETURN_STATUS => X_RETURN_STATUS
5633: );
5632: , X_RETURN_STATUS => X_RETURN_STATUS
5633: );
5634:
5635: WHEN OTHERS THEN
5636: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS (
5637: P_API_NAME => L_API_NAME
5638: , P_PKG_NAME => G_PKG_NAME
5639: , P_SQLCODE => SQLCODE
5640: , P_SQLERRM => SQLERRM
5637: P_API_NAME => L_API_NAME
5638: , P_PKG_NAME => G_PKG_NAME
5639: , P_SQLCODE => SQLCODE
5640: , P_SQLERRM => SQLERRM
5641: , P_EXCEPTION_LEVEL => ASO_UTILITY_PVT.G_EXC_OTHERS
5642: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
5643: , X_MSG_COUNT => X_MSG_COUNT
5644: , X_MSG_DATA => X_MSG_DATA
5645: , X_RETURN_STATUS => X_RETURN_STATUS
5638: , P_PKG_NAME => G_PKG_NAME
5639: , P_SQLCODE => SQLCODE
5640: , P_SQLERRM => SQLERRM
5641: , P_EXCEPTION_LEVEL => ASO_UTILITY_PVT.G_EXC_OTHERS
5642: , P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
5643: , X_MSG_COUNT => X_MSG_COUNT
5644: , X_MSG_DATA => X_MSG_DATA
5645: , X_RETURN_STATUS => X_RETURN_STATUS
5646: );
5689: END IF;
5690:
5691: x_return_status := FND_API.G_RET_STS_SUCCESS;
5692:
5693: l_qte_header_rec := ASO_UTILITY_PVT.Query_Header_Row (l_payment_rec.Quote_Header_Id );
5694: IF ( l_payment_rec.Quote_Line_Id IS NOT NULL and l_payment_rec.Quote_Line_Id <> fnd_api.g_miss_num) then
5695: l_qte_line_rec := ASO_UTILITY_PVT.Query_Qte_Line_Row ( l_payment_rec.Quote_Line_Id );
5696: END IF;
5697:
5691: x_return_status := FND_API.G_RET_STS_SUCCESS;
5692:
5693: l_qte_header_rec := ASO_UTILITY_PVT.Query_Header_Row (l_payment_rec.Quote_Header_Id );
5694: IF ( l_payment_rec.Quote_Line_Id IS NOT NULL and l_payment_rec.Quote_Line_Id <> fnd_api.g_miss_num) then
5695: l_qte_line_rec := ASO_UTILITY_PVT.Query_Qte_Line_Row ( l_payment_rec.Quote_Line_Id );
5696: END IF;
5697:
5698: if (l_payment_rec.trxn_extension_id is not null or l_payment_rec.trxn_extension_id <> fnd_api.g_miss_num) then
5699:
5892: END IF;
5893:
5894: EXCEPTION
5895: WHEN FND_API.G_EXC_ERROR THEN
5896: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS(
5897: P_API_NAME => L_API_NAME
5898: ,P_PKG_NAME => G_PKG_NAME
5899: ,P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_ERROR
5900: ,P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
5896: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS(
5897: P_API_NAME => L_API_NAME
5898: ,P_PKG_NAME => G_PKG_NAME
5899: ,P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_ERROR
5900: ,P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
5901: ,X_MSG_COUNT => X_MSG_COUNT
5902: ,X_MSG_DATA => X_MSG_DATA
5903: ,X_RETURN_STATUS => X_RETURN_STATUS);
5904:
5902: ,X_MSG_DATA => X_MSG_DATA
5903: ,X_RETURN_STATUS => X_RETURN_STATUS);
5904:
5905: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
5906: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS(
5907: P_API_NAME => L_API_NAME
5908: ,P_PKG_NAME => G_PKG_NAME
5909: ,P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR
5910: ,P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
5906: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS(
5907: P_API_NAME => L_API_NAME
5908: ,P_PKG_NAME => G_PKG_NAME
5909: ,P_EXCEPTION_LEVEL => FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR
5910: ,P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
5911: ,X_MSG_COUNT => X_MSG_COUNT
5912: ,X_MSG_DATA => X_MSG_DATA
5913: ,X_RETURN_STATUS => X_RETURN_STATUS);
5914:
5912: ,X_MSG_DATA => X_MSG_DATA
5913: ,X_RETURN_STATUS => X_RETURN_STATUS);
5914:
5915: WHEN OTHERS THEN
5916: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS(
5917: P_API_NAME => L_API_NAME
5918: ,P_PKG_NAME => G_PKG_NAME
5919: ,P_EXCEPTION_LEVEL => ASO_UTILITY_PVT.G_EXC_OTHERS
5920: ,P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
5915: WHEN OTHERS THEN
5916: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS(
5917: P_API_NAME => L_API_NAME
5918: ,P_PKG_NAME => G_PKG_NAME
5919: ,P_EXCEPTION_LEVEL => ASO_UTILITY_PVT.G_EXC_OTHERS
5920: ,P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
5921: ,X_MSG_COUNT => X_MSG_COUNT
5922: ,X_MSG_DATA => X_MSG_DATA
5923: ,X_RETURN_STATUS => X_RETURN_STATUS);
5916: ASO_UTILITY_PVT.HANDLE_EXCEPTIONS(
5917: P_API_NAME => L_API_NAME
5918: ,P_PKG_NAME => G_PKG_NAME
5919: ,P_EXCEPTION_LEVEL => ASO_UTILITY_PVT.G_EXC_OTHERS
5920: ,P_PACKAGE_TYPE => ASO_UTILITY_PVT.G_PVT
5921: ,X_MSG_COUNT => X_MSG_COUNT
5922: ,X_MSG_DATA => X_MSG_DATA
5923: ,X_RETURN_STATUS => X_RETURN_STATUS);
5924: