The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT cust_account_id
INTO x_cust_account_id
FROM aso_quote_headers_all
WHERE quote_header_id = p_quote_header_id;
SELECT qh.cust_account_id, qs.ship_to_party_site_id,qs.ship_to_cust_account_id
FROM aso_quote_headers_all qh, aso_shipments qs
WHERE qh.quote_header_id = qs.quote_header_id
AND qh.quote_header_id = l_quote_header_id
AND qs.quote_line_id is NULL;
SELECT qh.cust_account_id, qs.ship_to_party_site_id,qs.ship_to_cust_account_id
FROM aso_quote_headers_all qh,
aso_shipments qs,
aso_quote_lines_all ql
WHERE qh.quote_header_id = qs.quote_header_id
AND ql.quote_header_id = qh.quote_header_id
AND ql.quote_line_id = l_quote_line_id
AND ql.quote_line_id = qs.quote_line_id;
SELECT cust_account_id,
invoice_to_party_site_id,
invoice_to_cust_account_id
FROM aso_quote_headers_all
WHERE quote_header_id = l_quote_header_id;
SELECT qh.cust_account_id,
ql.invoice_to_party_site_id,
ql.invoice_to_cust_account_id
FROM aso_quote_headers_all qh, aso_quote_lines_all ql
WHERE ql.quote_line_id = l_quote_line_id
AND ql.quote_header_id = qh.quote_header_id;
SELECT qs.ship_to_party_site_id
FROM aso_shipments qs
WHERE qs.quote_header_id = l_quote_header_id
AND qs.quote_line_id IS NULL;
SELECT qs.ship_to_party_site_id
FROM aso_shipments qs
WHERE qs.quote_line_id = l_quote_line_id;
SELECT qs.invoice_to_party_site_id
FROM aso_quote_headers_all qs
WHERE qs.quote_header_id = l_quote_header_id;
SELECT qs.invoice_to_party_site_id
FROM aso_quote_lines_all qs
WHERE qs.quote_line_id = l_quote_line_id;
SELECT customer_class_code
INTO x_class_code
FROM hz_cust_accounts
WHERE cust_account_id = p_cust_account_id;
SELECT profile_class_id
FROM HZ_CUSTOMER_PROFILES
WHERE cust_account_id = p_cust_account_id;
SELECT sales_channel_code
INTO x_sales_channel_code
FROM hz_cust_accounts
WHERE cust_account_id = p_cust_account_id;
SELECT DECODE(PARTY.PARTY_TYPE, 'ORGANIZATION',PARTY.GSA_INDICATOR_FLAG,'N') gsa_indicator
INTO x_gsa
FROM hz_cust_accounts cust_acct, hz_parties party
WHERE cust_acct.cust_account_id = p_cust_account_id
and CUST_ACCT.PARTY_ID = PARTY.PARTY_ID;
SELECT SUM(nvl(quantity,0))
INTO l_quote_qty
FROM aso_quote_lines_all
WHERE quote_header_id=p_qte_header_id
AND (line_category_code<>'RETURN' OR line_category_code IS NULL)
GROUP BY quote_header_id;
SELECT SUM((nvl(quantity,0))*(LINE_LIST_PRICE))
INTO l_quote_amount
FROM aso_quote_lines_all
WHERE quote_header_id=p_qte_header_id
AND (line_category_code<>'RETURN' OR line_category_code IS NULL)
AND charge_periodicity_code IS NULL
GROUP BY quote_header_id;
SELECT shippable_item_flag
INTO x_shippable_item_flag
FROM aso_i_items_v i, aso_quote_lines_all l
WHERE l.quote_line_id = p_qte_line_id
and l.inventory_item_id = i.inventory_item_id
and l.organization_id = i.organization_id;
l_control_rec.TEMP_TABLE_INSERT_FLAG := 'Y';
l_control_rec.TEMP_TABLE_INSERT_FLAG := 'Y';
SELECT QUOTE_HEADER_ID
FROM ASO_QUOTE_LINES_ALL
WHERE QUOTE_LINE_ID = p_qte_line_id;
SELECT price_list_id , CURRENCY_CODE
FROM ASO_QUOTE_HEADERS_ALL
WHERE QUOTE_HEADER_ID = l_qte_header_id;
/* Changed the delete statement as per bug 1874082 */
/*Removed the Complex Delete Statement with UNION bug 2585468 */
DELETE from ASO_PRICE_ADJ_RELATIONSHIPS
WHERE quote_line_id = p_qte_line_id;
aso_debug_pub.add('ASO_PRICING_INT:Rltd adj Lines deleted '||sql%ROWCOUNT,1,'Y');
DELETE FROM ASO_PRICE_ADJUSTMENTS
WHERE quote_line_id = p_qte_line_id;
aso_debug_pub.add('ASO_PRICING_INT:ADJ Lines deleted '||sql%ROWCOUNT,1,'Y');
ASO_PRICING_CALLBACK_PVT.Update_Quote_Rows (
p_qte_line_tbl => lx_qte_line_tbl,
p_qte_line_dtl_tbl => lx_qte_line_dtl_tbl,
p_price_adj_tbl => lx_price_adj_tbl,
p_price_adj_attr_tbl => lx_price_adj_attr_tbl,
p_price_adj_rltship_tbl => lx_price_adj_rltship_tbl);
Procedure Delete_Promotion (
P_Api_Version_Number IN NUMBER,
P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
P_Commit IN VARCHAR2 := FND_API.G_FALSE,
p_price_attr_tbl IN ASO_QUOTE_PUB.Price_Attributes_Tbl_Type,
x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
x_msg_count OUT NOCOPY /* file.sql.39 change */ NUMBER,
x_msg_data OUT NOCOPY /* file.sql.39 change */ VARCHAR2)
IS
BEGIN
ASO_PRICING_CORE_PVT.Delete_Promotion (
P_Api_Version_Number => P_Api_Version_Number,
P_Init_Msg_List => P_Init_Msg_List,
P_Commit => P_Commit,
p_price_attr_tbl => p_price_attr_tbl,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data);
END Delete_Promotion;
Cursor get_po is SELECT payment_ref_number from aso_payments
WHERE
payment_type_code ='PO' and quote_header_id = p_qte_header_id and quote_line_id is NULL;
Cursor get_po is SELECT payment_ref_number from aso_payments
WHERE
payment_type_code ='PO' and quote_line_id = p_qte_line_id;
Cursor get_req_date is SELECT request_date from aso_shipments
WHERE
quote_header_id = p_qte_header_id and quote_line_id is NULL;
Cursor get_req_date is SELECT request_date from aso_shipments
WHERE quote_line_id = p_qte_line_id ;
Cursor get_frieght is SELECT FREIGHT_TERMS_CODE from aso_shipments
WHERE
quote_header_id = p_qte_header_id and quote_line_id is NULL;
Cursor get_frieght is SELECT FREIGHT_TERMS_CODE from aso_shipments
WHERE
quote_line_id = p_qte_line_id;
Cursor get_pmnt_term is SELECT payment_term_id from aso_payments
WHERE
quote_header_id = p_qte_header_id and quote_line_id IS null;
Cursor get_pmnt_term is SELECT payment_term_id from aso_payments
WHERE
quote_line_id = p_qte_line_id;