The following lines contain the word 'select', 'insert', 'update' or 'delete':
select quote_line_id, item_type_code ,quantity, inventory_item_id
from aso_quote_lines
where quote_header_id = p_quote_header_id
and inventory_item_id = l_inventory_item_id;
select l.quote_line_id
,l.item_type_code
,l.quantity
,l.inventory_item_id
,l.organization_id
,l.uom_code
,dl.quote_line_detail_id
,dl.service_duration
,dl.service_period
from aso_quote_lines l, aso_quote_line_details dl
where l.quote_header_id = p_quote_header_id
and l.item_type_code = 'SRV'
and dl.service_ref_line_id = p_service_ref_line_id
and dl.quote_line_id = l.quote_line_id;
procedure updateserviceLine(
p_qte_line_rec IN ASO_Quote_Pub.Qte_Line_Rec_Type
,p_qte_line_dtl_rec IN ASO_Quote_Pub.Qte_Line_dtl_Rec_Type
,p_qte_line_tbl_db IN ASO_Quote_Pub.Qte_Line_Tbl_Type
,p_qte_line_dtl_tbl_db IN ASO_Quote_Pub.Qte_Line_dtl_Tbl_Type
,x_qte_line_rec OUT NOCOPY ASO_Quote_Pub.Qte_Line_Rec_Type
,x_qte_line_dtl_rec OUT NOCOPY ASO_Quote_Pub.Qte_Line_dtl_Rec_Type
)
IS
l_qte_line_rec ASO_Quote_Pub.Qte_Line_Rec_Type
:= ASO_Quote_Pub.g_miss_Qte_Line_rec;
IBE_Util.Debug('updateserviceline p_qte_line_tbl_db.count='
||p_qte_line_tbl_db.count);
IBE_Util.Debug('updateserviceline start update');
IBE_Util.Debug('update service inventory_item_id'||l_qte_line_rec.inventory_item_id);
l_qte_line_rec.operation_code := 'UPDATE';
:= 'UPDATE';
IBE_Util.Debug('update service inventory_item_id'||x_qte_line_rec.inventory_item_id);
IBE_Util.Debug('update service quote_line_id'||x_qte_line_rec.quote_line_id);
IBE_Util.Debug('update service quote_line_id'||x_qte_line_dtl_rec.quote_line_detail_id);
END updateserviceline;
select term_id
from oe_agreements
where agreement_id = p_contract_id;
select payment_id
from aso_payments
where quote_header_id = p_quote_hdr_id
and quote_line_id is null;
if(p_hdr_payment_tbl(counter).operation_code <> 'DELETE') then
l_hdr_payment_tbl(counter).payment_term_id := l_payment_term_id;
l_hdr_payment_tbl(counter).operation_code := 'UPDATE';
p_auto_update_active_quote IN VARCHAR2 := FND_API.G_TRUE ,
p_hdr_payment_tbl IN aso_quote_pub.Payment_Tbl_Type ,
x_hdr_payment_tbl OUT NOCOPY aso_quote_pub.Payment_Tbl_Type ,
x_qte_header_rec OUT NOCOPY ASO_Quote_Pub.Qte_Header_Rec_Type,
x_return_status OUT NOCOPY VARCHAR2 ,
x_msg_count OUT NOCOPY NUMBER ,
x_msg_data OUT NOCOPY VARCHAR2
)
IS
l_duration NUMBER := NULL;
l_last_update_date DATE;
/*A quote header_id is passed in during every update quote operation*/
ELSE
IF NOT FND_API.To_Boolean(p_auto_update_active_quote) THEN
IF FND_Msg_Pub.Check_Msg_Level(FND_Msg_Pub.G_MSG_LVL_ERROR) THEN
FND_Message.Set_Name('IBE', 'IBE_SC_QUOTE_NEED_REFRESH');
SELECT price_list_id
INTO x_qte_header_rec.price_list_id
FROM OE_Agreements_B
WHERE agreement_id = x_qte_header_rec.contract_id;
SELECT party_id ,
cust_account_id ,
last_update_date,
contract_id ,
quote_source_code,
resource_id,
publish_flag,
price_list_id
INTO l_party_id ,
l_cust_account_id ,
l_last_update_date,
l_contract_id ,
l_quote_source_code,
l_resource_id,
l_publish_flag,
l_price_list_id
FROM aso_quote_headers_all
WHERE quote_header_id = x_qte_header_rec.quote_header_id;
x_qte_header_rec.last_update_date := l_last_update_date;
Ideally we do not want to change the price list id put in by the Sales Rep for Update of published Quotes.
This is true only when the agreement is not associated to the quote.*/
IF (l_resource_id is not null AND nvl(l_publish_flag,'N')='Y'
AND l_agmt_associated = FND_API.G_FALSE AND l_price_list_id is not null) THEN
IF (IBE_UTIL.G_DEBUGON = l_true) THEN
IBE_UTIL.debug('Please revert back the price list id as in the DB,as this is a Published quote, price_list_id='||l_price_list_id);
SELECT price_list_id
INTO x_qte_header_rec.price_list_id
FROM OE_Agreements_B
WHERE agreement_id = l_contract_id;
SELECT payment_id into l_org_payment_id FROM ASO_payments
WHERE QUOTE_HEADER_ID = x_qte_header_rec.quote_header_id AND quote_line_id is null;
select quote_line_id, item_type_code ,quantity,marketing_source_code_id
from aso_quote_lines
where quote_header_id = p_quote_header_id
and inventory_item_id = l_inventory_item_id and uom_code = l_uom_code;
select pricing_line_type_indicator
from aso_quote_lines
where quote_header_id = p_quote_header_id;
x_qte_line_tbl(i).operation_code := 'DELETE';
x_qte_line_tbl(i).operation_code := 'UPDATE';
updateserviceLine
( p_qte_line_rec => x_qte_line_tbl(l_line_tbl_index)
,p_qte_line_dtl_rec => x_qte_line_dtl_tbl(l_line_dtl_tbl_index)
,p_qte_line_tbl_db => l_qte_line_tbl_service_db
,p_qte_line_dtl_tbl_db => l_qte_line_dtl_tbl_service_db
,x_qte_line_rec => l_qte_line_tbl_tmp(l_line_tbl_index)
,x_qte_line_dtl_rec => l_qte_line_dtl_tbl_tmp(l_line_dtl_tbl_index));
x_qte_line_tbl(i).operation_code := 'UPDATE';
PROCEDURE DeleteSharees(
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_Quote_HEADER_ID IN NUMBER
,p_minisite_id IN NUMBER := FND_API.G_MISS_NUM
,X_Return_Status OUT NOCOPY VARCHAR2
,X_Msg_Count OUT NOCOPY NUMBER
,X_Msg_Data OUT NOCOPY VARCHAR2
)
IS
l_api_name CONSTANT VARCHAR2(30) := 'DeleteSharees';
SELECT quote_sharee_id,
party_id,
cust_account_id,
quote_sharee_number,
contact_point_id,
fnd.customer_id shared_by_party_id
FROM IBE_SH_QUOTE_ACCESS, fnd_user fnd
where quote_header_id = c_quote_header_id
and ibe_sh_quote_access.created_by = fnd.user_id;
SAVEPOINT DELETESHAREES_pvt;
/*DELETE
FROM ibe_sh_quote_access
WHERE quote_header_id = p_quote_header_id;*/
IBE_UTIL.DEBUG('DeleteSharees:Calling delete_recipient');
IBE_QUOTE_SAVESHARE_V2_PVT.DELETE_RECIPIENT(
P_Quote_access_rec => l_qte_access_rec ,
p_minisite_id => p_minisite_id ,
--p_notes => p_notes ,
x_return_status => x_return_status ,
x_msg_count => x_msg_count ,
x_msg_data => x_msg_data );
IBE_UTIL.DEBUG('DeleteSharees:Done calling delete_recipient');
ROLLBACK TO DELETESHAREES_pvt;
IBE_UTIL.DEBUG('Expected error in IBE_QUOTE_SAVE_PVT.DeleteSharees');
IBE_UTIL.DEBUG('Unexpected error in IBE_QUOTE_SAVE_PVT.DeleteSharees');
ROLLBACK TO DELETESHAREES_pvt;
IBE_UTIL.DEBUG('Unknown error in IBE_QUOTE_SAVE_PVT.DeleteSharees');
ROLLBACK TO DELETESHAREES_pvt;
END DeleteSharees;
PROCEDURE Delete(
p_api_version_number IN NUMBER := 1 ,
p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE ,
p_commit IN VARCHAR2 := FND_API.G_FALSE ,
x_return_status OUT NOCOPY VARCHAR2 ,
x_msg_count OUT NOCOPY NUMBER ,
x_msg_data OUT NOCOPY VARCHAR2 ,
p_quote_header_id IN NUMBER ,
p_expunge_flag IN VARCHAR2 := FND_API.G_TRUE ,
p_minisite_id IN NUMBER :=FND_API.G_MISS_NUM ,
p_last_update_date IN DATE := FND_API.G_MISS_DATE,
p_Quote_access_tbl IN IBE_QUOTE_SAVESHARE_pvt.QUOTE_ACCESS_TBL_TYPE
:= IBE_QUOTE_SAVESHARE_pvt.G_miss_quote_access_Tbl ,
p_notes IN VARCHAR2 := FND_API.G_MISS_CHAR,
-- in even that we are deleting a shared cart
-- could be owner or admin recipient
p_initiator_party_id IN NUMBER :=FND_API.G_MISS_NUM ,
p_initiator_account_id IN NUMBER :=FND_API.G_MISS_NUM
)
IS
l_api_name CONSTANT VARCHAR2(30) := 'DELETE';
l_last_update_date DATE;
select quote_status_id
from aso_quote_statuses_vl
where status_code = 'INACTIVE';
select quote_sharee_id
from ibe_sh_quote_access
where quote_header_id = c_qte_header_id;
select party_id, cust_account_id
from aso_quote_headers_all
where quote_header_id = p_quote_header_id;
IBE_Util.Debug('START IBE_Quote_Save_pvt.Delete()');
SAVEPOINT DELETE_pvt;
select quote_sharee_number into l_retrieval_number
from ibe_sh_quote_access
where party_id = p_initiator_party_id
and quote_header_id = p_quote_header_id
and cust_account_id = p_initiator_account_id;
IBE_Quote_Misc_pvt.Validate_User_Update
(
p_init_msg_list => FND_API.G_TRUE
,p_quote_header_id => p_quote_header_id
,p_validate_user => FND_API.G_TRUE
,p_quote_retrieval_number => l_retrieval_number
,p_privilege_type_code => 'A'
,p_save_type => OP_DELETE_CART
,p_last_update_date => p_last_update_date
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
);
/* -- validate last_update_date
IF (p_last_update_date is not null
and p_last_update_date <> FND_API.G_MISS_DATE) THEN
IF (IBE_UTIL.G_DEBUGON = l_true) THEN
IBE_UTIL.DEBUG('validate last_update_date ');
IBE_Quote_Misc_pvt.validateQuoteLastUpdateDate
( p_api_version_number => p_api_version_number
,p_quote_header_id => p_quote_header_id
,p_last_update_date => p_last_update_date
,X_Return_Status => x_return_status
,X_Msg_Count => x_msg_count
,X_Msg_Data => x_msg_data
);
IBE_UTIL.DEBUG('Quote_save_pvt.Delete: Ready to call deactivate_quote');
p_delete_context => 'IBE_SC_CART_DELETED',
P_minisite_id => p_minisite_id ,
p_notes => p_notes ,
p_quote_access_tbl => p_quote_access_tbl ,
p_api_version => p_api_version_number ,
p_init_msg_list => fnd_api.g_false ,
p_commit => fnd_api.g_false ,
x_return_status => x_return_status ,
x_msg_count => x_msg_count ,
x_msg_data => x_msg_data );
/*If p_expunge_flag is true then call aso_quote_pub.delete, else
invalidate the quote setting the quote status to 'INVALID' status
and expiring the quote*/
IF (IBE_UTIL.G_DEBUGON = l_true) THEN
IBE_UTIL.DEBUG('expunge flag is: '||p_expunge_flag);
IBE_Util.Debug('ASO_Quote_Pub.Delete_Quote() starts');
ASO_Quote_Pub.Delete_quote(
P_Api_Version_Number => P_Api_Version_Number
,P_Init_Msg_List => FND_API.G_FALSE
,P_Commit => FND_API.G_FALSE
,P_qte_header_id => P_Quote_Header_Id
,x_Return_Status => x_return_status
,x_Msg_Count => x_msg_count
,x_Msg_Data => x_msg_data );
IBE_Util.Debug('ASO_Quote_Pub.Delete_Quote() finishes');
l_quote_header_rec.last_update_date := p_last_update_date;
IBE_UTIL.DEBUG('l_quote_header_rec.last_update_date :'||l_quote_header_rec.last_update_date);
p_save_type => OP_DELETE_CART ,
p_qte_header_rec => l_Quote_header_rec ,
x_quote_header_id => l_quote_header_id ,
x_last_update_date => l_last_update_date ,
x_return_status => x_return_status ,
x_msg_count => x_msg_count ,
x_msg_data => x_msg_data);
IBE_Util.Debug('End IBE_Quote_Save_pvt.Delete()');
IBE_Util.Debug('Expected error: End IBE_Quote_Save_pvt.Delete()');
ROLLBACK TO DELETE_pvt;
IBE_Util.Debug('Unexpected error: End IBE_Quote_Save_pvt.Delete()');
ROLLBACK TO DELETE_pvt;
IBE_Util.Debug('Unknown error: End IBE_Quote_Save_pvt.Delete()');
ROLLBACK TO DELETE_pvt;
END DELETE;
PROCEDURE DeleteAllLines(
p_api_version_number IN NUMBER := 1 ,
p_init_msg_list IN VARCHAR2 := FND_API.G_TRUE ,
p_commit IN VARCHAR2 := FND_API.G_FALSE ,
x_return_status OUT NOCOPY VARCHAR2 ,
x_msg_count OUT NOCOPY NUMBER ,
x_msg_data OUT NOCOPY VARCHAR2 ,
p_quote_header_id IN NUMBER ,
p_last_update_date IN DATE := FND_API.G_MISS_DATE,
p_sharee_number IN NUMBER := FND_API.G_MISS_NUM ,
x_quote_header_id OUT NOCOPY NUMBER ,
x_last_update_date OUT NOCOPY DATE
)
is
l_api_name CONSTANT VARCHAR2(30) := 'DELETEALLLINES';
select quote_line_id
from aso_quote_lines
where quote_header_id = p_quote_header_id;
SAVEPOINT DELETEALLLINES_pvt;
IBE_Quote_Misc_pvt.Validate_User_Update
( p_init_msg_list => p_init_msg_list
,p_quote_header_id => p_quote_header_id
,p_quote_retrieval_number => p_sharee_number
,p_validate_user => FND_API.G_TRUE
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
);
l_qte_line_rec.operation_code := 'DELETE';
,x_last_update_date => x_last_update_date
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
);
IBE_Util.Debug('Expected error: IBE_Quote_Save_pvt.DeleteAllLines()');
ROLLBACK TO DELETEALLLINES_pvt;
IBE_Util.Debug('Unexpected error:IBE_Quote_Save_pvt.DeleteAllLines()');
ROLLBACK TO DELETEALLLINES_pvt;
IBE_Util.Debug('Unknown error: IBE_Quote_Save_pvt.DeleteAllLines()');
ROLLBACK TO DELETEALLLINES_pvt;
END DeleteAllLines;
PROCEDURE Set_Last_Update_Date(p_qte_header_id IN NUMBER,
px_last_update_date OUT NOCOPY DATE)
IS
BEGIN
IF p_qte_header_id <> FND_API.G_MISS_NUM THEN
px_last_update_date := IBE_Quote_Misc_pvt.getQuoteLastUpdateDate(p_qte_header_id);
END Set_Last_Update_Date;
,x_last_update_date OUT NOCOPY DATE
,X_Return_Status OUT NOCOPY VARCHAR2
,X_Msg_Count OUT NOCOPY NUMBER
,X_Msg_Data OUT NOCOPY VARCHAR2
)
is
l_api_name CONSTANT VARCHAR2(30) := 'AddItemsToCart';
select aqld.service_ref_line_id refLine, aql2.inventory_item_id invId
from ASO_QUOTE_LINES aql,
ASO_QUOTE_LINES aql2,
ASO_QUOTE_LINE_DETAILS aqld
where aql.item_type_code = 'SVA' and
aql.quote_line_id = aqld.service_ref_line_id and
aql.quote_header_id = l_quote_header_id and
aqld.quote_line_id = aql2.quote_line_id
order by aql2.QUOTE_LINE_ID;
select PRIMARY_UOM_CODE uomCode, SERVICE_DURATION_PERIOD_CODE period, SERVICE_DURATION duration
from MTL_SYSTEM_ITEMS_VL
where inventory_item_id = l_inventory_item_id and
organization_id = l_organization_id;
Select ql.quote_line_id
From aso_quote_lines ql, aso_quote_line_details qld
where ql.quote_line_id = qld.quote_line_id
And qld.service_ref_line_id = c_service_ref_line_id;
select marketing_source_code_id
from aso_quote_headers_all
where quote_header_id = p_quote_header_id;
select pricing_attribute1
from aso_price_attributes
where quote_header_id = p_quote_header_id
and quote_line_id is null;
select 1 from fnd_lookups
where lookup_type = p_support_lookup_type
and lookup_code = p_support_lookup_code;
SELECT COUNT(*) INTO l_numLines
FROM aso_quote_lines
WHERE quote_header_id = p_Qte_Header_Rec.quote_header_id;
SELECT COUNT(*) INTO l_numLines
FROM aso_quote_lines
WHERE quote_header_id = p_Qte_Header_Rec.quote_header_id and
item_type_code = 'SVA';
SELECT COUNT(inventory_item_id) INTO l_numLines
FROM aso_quote_lines
WHERE quote_header_id = p_Qte_Header_Rec.quote_header_id and
inventory_item_id = l_Qte_Line_Tbl(i).inventory_item_id;
l_Qte_Line_Tbl(l_Qte_Line_Tbl.count).operation_code := 'DELETE';
,x_last_update_date => x_last_update_date
,X_Return_Status => x_Return_Status
,X_Msg_Count => x_Msg_Count
,X_Msg_Data => x_Msg_Data
);
,x_last_update_date => x_last_update_date
,x_Qte_Header_Rec => lx_Qte_Header_Rec_tmp
,x_Hd_Price_Attributes_Tbl => lx_Hd_Price_Attributes_Tbl_tmp
,x_Hd_Payment_Tbl => lx_Hd_Payment_Tbl_tmp
,x_Hd_Shipment_Tbl => lx_Hd_Shipment_Tbl_tmp
,x_Hd_Shipment_Rec => lx_Hd_Shipment_Rec
,x_Hd_Freight_Charge_Tbl => lx_Hd_Freight_Charge_Tbl_tmp
,x_Hd_Tax_Detail_Tbl => lx_Hd_Tax_Detail_Tbl_tmp
,x_Qte_Line_Tbl => x_Qte_Line_Tbl
,x_Qte_Line_Dtl_Tbl => lx_Qte_Line_Dtl_Tbl
,x_Line_Attr_Ext_Tbl => lx_Line_Attr_Ext_Tbl
,x_Line_rltship_tbl => lx_Line_rltship_tbl
,x_Ln_Price_Attributes_Tbl => lx_Ln_Price_Attributes_Tbl
,x_Ln_Payment_Tbl => lx_Ln_Payment_Tbl
,x_Ln_Shipment_Tbl => lx_Ln_Shipment_Tbl
,x_Ln_Freight_Charge_Tbl => lx_Ln_Freight_Charge_Tbl
,x_Ln_Tax_Detail_Tbl => lx_Ln_Tax_Detail_Tbl
,x_Price_Adjustment_Tbl => lx_Price_Adjustment_Tbl_tmp
,x_Price_Adj_Attr_Tbl => lx_Price_Adj_Attr_Tbl_tmp
,x_Price_Adj_Rltship_Tbl => lx_Price_Adj_Rltship_Tbl_tmp
,X_Return_Status => x_Return_Status
,X_Msg_Count => x_Msg_Count
,X_Msg_Data => x_Msg_Data
);
,x_last_update_date OUT NOCOPY DATE
,X_Return_Status OUT NOCOPY VARCHAR2
,X_Msg_Count OUT NOCOPY NUMBER
,X_Msg_Data OUT NOCOPY VARCHAR2
)
is
l_api_name CONSTANT VARCHAR2(30) := 'ADDMODELSTOCART';
l_input_selection cz_cf_api.input_selection;
IBE_Quote_Misc_pvt.Validate_User_Update
( p_init_msg_list => p_init_msg_list
,p_quote_header_id => p_Qte_Header_Rec.quote_header_id
,p_party_id => p_Qte_Header_Rec.party_id
,p_cust_account_id => p_Qte_Header_Rec.cust_account_id
,p_quote_retrieval_number => p_sharee_Number
,p_validate_user => FND_API.G_TRUE
,P_save_type => P_save_flag
,p_last_update_date => p_Qte_Header_Rec.last_update_date
,x_return_status => x_return_status
,x_msg_count => lx_msg_count
,x_msg_data => lx_msg_data
);
,x_last_update_date => x_last_update_date
,X_Return_Status => x_return_status
,X_Msg_Count => lx_msg_count
,X_Msg_Data => lx_msg_data
);
/*This cursor selects price_list_id and term_id(payment_term_id as in aso_payments) */
cursor c_term_pricelist(p_agreement_id number) is
select price_list_id, term_id
from oe_agreements_b
where agreement_id = p_agreement_id;
/*This cursor selects payment_id from aso_payments based on the qte_header_id and quote_line_id*/
cursor c_payment_id(p_quote_header_id number, p_quote_line_id number) is
select payment_id
from aso_payments
where quote_header_id = p_quote_header_id
and quote_line_id = p_quote_line_id;
if the record is present then operation code in the l_ln_payment_tbl= 'UPDATE'
else it is 'CREATE'*/
l_payment_id := fnd_api.g_miss_num;
(l_ln_payment_tbl(l_pmt_rec_counter).operation_code <> 'DELETE')) then
if (l_payment_id <> fnd_api.g_miss_num ) then
IF (IBE_UTIL.G_DEBUGON = l_true) THEN
ibe_util.debug('Operation code is UPDATE');
l_ln_payment_tbl(l_pmt_rec_counter).operation_code := 'UPDATE';
Select resource_id,quote_name
from aso_quote_headers_all
Where quote_header_id = quote_hdr_id;
x_last_update_date OUT NOCOPY Date ,
p_minisite_id IN NUMBER ,
p_last_update_date IN Date ,
p_quote_header_id IN NUMBER:= FND_API.G_MISS_NUM,
p_party_id IN NUMBER:= FND_API.G_MISS_NUM,
p_cust_account_id IN NUMBER:= FND_API.G_MISS_NUM,
p_validate_user IN VARCHAR2:= FND_API.G_FALSE ,
P_quote_name IN VARCHAR2 ,
P_Reason_code IN VARCHAR2 ,
P_url IN VARCHAR2:= FND_API.G_MISS_CHAR,
P_COMMENTS IN VARCHAR2,
p_retrieval_number IN NUMBER := FND_API.G_MISS_NUM,
p_contract_context IN VARCHAR2 :='N',
p_notes IN VARCHAR2 := NULL) is
Cursor c_find_resourceid(qte_hdr_id number) is
select resource_id,ASSISTANCE_REASON_CODE
from aso_quote_headers_all
where quote_header_id = qte_hdr_id;
select resource_id
from jtf_rs_salesreps_mo_v
where salesrep_id = salesrep;*/
SELECT Resource_Id
/* FROM JTF_RS_SRP_VL */
FROM JTF_RS_SALESREPS_MO_V
WHERE Salesrep_number = l_Srep
AND NVL(status,'A') = 'A'
AND nvl(trunc(start_date_active), trunc(sysdate)) <= trunc(sysdate)
AND nvl(trunc(end_date_active), trunc(sysdate)) >= trunc(sysdate) ;
select user_id
from jtf_rs_resource_extns
where resource_id = resourceid;
select quote_status_id
from aso_quote_statuses_b
where status_code = p_status_code;
select lookup_code, meaning
from fnd_lookup_values_vl
where lookup_code = lkp_code
and lookup_type = 'IBE_SALES_ASSIST_REASONS_LK';
lx_last_update_date DATE;
IBE_Quote_Misc_pvt.Validate_User_Update
( p_init_msg_list => p_Init_Msg_List
,p_quote_header_id => p_quote_header_id
,p_party_id => p_party_id
,p_cust_account_id => p_cust_account_id
,p_validate_user => p_validate_user
,p_quote_retrieval_number => p_retrieval_number
,p_save_type => SALES_ASSISTANCE
,p_last_update_date => p_last_update_date
,x_return_status => lx_return_status
,x_msg_count => lx_msg_count
,x_msg_data => lx_msg_data
);
l_qte_hdr_rec.last_update_date := p_last_update_date;
x_last_update_date => lx_last_update_date ,
x_return_status => lx_return_status ,
x_msg_count => lx_msg_count ,
x_msg_data => lx_msg_data);
this is done because recipients cannot update a cart after it becomes a quote*/
IF (IBE_UTIL.G_DEBUGON = l_true) THEN
IBE_UTIL.DEBUG('Calling share_readonly to downgrade the access levels of all recipients to R status');
Set_Last_Update_Date(p_quote_header_id, x_last_update_date);
Set_Last_Update_Date(p_quote_header_id, x_last_update_date);
,p_auto_update_active_quote IN VARCHAR2 := FND_API.G_TRUE
,p_combineSameItem IN VARCHAR2 := FND_API.G_MISS_CHAR
,p_sharee_Number IN Number := FND_API.G_MISS_NUM
,p_sharee_party_id IN Number := FND_API.G_MISS_NUM
,p_sharee_cust_account_id IN Number := FND_API.G_MISS_NUM
,p_minisite_id IN NUMBER := FND_API.G_MISS_NUM
,p_changeowner IN VARCHAR2 := FND_API.G_FALSE
,p_Control_Rec IN ASO_Quote_Pub.Control_Rec_Type
:= ASO_Quote_Pub.G_Miss_Control_Rec
,p_Qte_Header_Rec IN ASO_Quote_Pub.Qte_Header_Rec_Type
:= ASO_Quote_Pub.G_MISS_Qte_Header_Rec
,p_hd_Price_Attributes_Tbl IN ASO_Quote_Pub.Price_Attributes_Tbl_Type
:= ASO_Quote_Pub.G_Miss_Price_Attributes_Tbl
,p_hd_Payment_Tbl IN ASO_Quote_Pub.Payment_Tbl_Type
:= ASO_Quote_Pub.G_MISS_PAYMENT_TBL
,p_hd_Shipment_TBL IN ASO_Quote_Pub.Shipment_tbl_Type
:= ASO_Quote_Pub.G_MISS_SHIPMENT_TBL
,p_hd_Freight_Charge_Tbl IN ASO_Quote_Pub.Freight_Charge_Tbl_Type
:= ASO_Quote_Pub.G_Miss_Freight_Charge_Tbl
,p_hd_Tax_Detail_Tbl IN ASO_Quote_Pub.Tax_Detail_Tbl_Type
:= ASO_Quote_Pub.G_Miss_Tax_Detail_Tbl
,p_Qte_Line_Tbl IN ASO_Quote_Pub.Qte_Line_Tbl_Type
:= ASO_Quote_Pub.G_MISS_QTE_LINE_TBL
,p_Qte_Line_Dtl_Tbl IN ASO_Quote_Pub.Qte_Line_Dtl_Tbl_Type
:= ASO_Quote_Pub.G_MISS_QTE_LINE_DTL_TBL
,p_Line_Attr_Ext_Tbl IN ASO_Quote_Pub.Line_Attribs_Ext_Tbl_Type
:= ASO_Quote_Pub.G_MISS_Line_Attribs_Ext_TBL
,p_line_rltship_tbl IN ASO_Quote_Pub.Line_Rltship_Tbl_Type
:= ASO_Quote_Pub.G_MISS_Line_Rltship_Tbl
,p_Price_Adjustment_Tbl IN ASO_Quote_Pub.Price_Adj_Tbl_Type
:= ASO_Quote_Pub.G_Miss_Price_Adj_Tbl
,p_Price_Adj_Attr_Tbl IN ASO_Quote_Pub.Price_Adj_Attr_Tbl_Type
:= ASO_Quote_Pub.G_Miss_PRICE_ADJ_ATTR_Tbl
,p_Price_Adj_Rltship_Tbl IN ASO_Quote_Pub.Price_Adj_Rltship_Tbl_Type
:= ASO_Quote_Pub.G_Miss_Price_Adj_Rltship_Tbl
,p_Ln_Price_Attributes_Tbl IN ASO_Quote_Pub.Price_Attributes_Tbl_Type
:= ASO_Quote_Pub.G_Miss_Price_Attributes_Tbl
,p_Ln_Payment_Tbl IN ASO_Quote_Pub.Payment_Tbl_Type
:= ASO_Quote_Pub.G_MISS_PAYMENT_TBL
,p_Ln_Shipment_Tbl IN ASO_Quote_Pub.Shipment_Tbl_Type
:= ASO_Quote_Pub.G_MISS_SHIPMENT_TBL
,p_Ln_Freight_Charge_Tbl IN ASO_Quote_Pub.Freight_Charge_Tbl_Type
:= ASO_Quote_Pub.G_Miss_Freight_Charge_Tbl
,p_Ln_Tax_Detail_Tbl IN ASO_Quote_Pub.Tax_Detail_Tbl_Type
:= ASO_Quote_Pub.G_Miss_Tax_Detail_Tbl
,p_save_type IN NUMBER := FND_API.G_MISS_NUM
,x_quote_header_id OUT NOCOPY varchar2
,x_last_update_date OUT NOCOPY DATE
,X_Return_Status OUT NOCOPY VARCHAR2
,X_Msg_Count OUT NOCOPY NUMBER
,X_Msg_Data OUT NOCOPY VARCHAR2
)
is
lx_Qte_Header_Rec ASO_Quote_Pub.Qte_Header_Rec_Type;
,p_auto_update_active_quote => p_auto_update_active_quote
,p_combineSameItem => p_combineSameItem
,p_sharee_Number => p_sharee_Number
,p_sharee_party_id => p_sharee_party_id
,p_sharee_cust_account_id => p_sharee_cust_account_id
,p_minisite_id => p_minisite_id
,p_changeowner => p_changeowner
,p_Control_Rec => p_Control_Rec
,p_Qte_Header_Rec => p_Qte_Header_Rec
,p_hd_Price_Attributes_Tbl => p_hd_Price_Attributes_Tbl
,p_hd_Payment_Tbl => p_hd_Payment_Tbl
,p_hd_Shipment_Tbl => p_hd_Shipment_Tbl
,p_hd_Freight_Charge_Tbl => p_hd_Freight_Charge_Tbl
,p_hd_Tax_Detail_Tbl => p_hd_Tax_Detail_tbl
,p_Qte_Line_Tbl => p_Qte_Line_Tbl
,p_Qte_Line_Dtl_Tbl => p_Qte_Line_Dtl_Tbl
,p_Line_Attr_Ext_Tbl => p_Line_Attr_Ext_Tbl
,p_line_rltship_tbl => p_line_rltship_tbl
,p_Price_Adjustment_Tbl => p_Price_Adjustment_Tbl
,p_Price_Adj_Attr_Tbl => p_Price_Adj_Attr_Tbl
,p_Price_Adj_Rltship_Tbl => p_Price_Adj_Rltship_Tbl
,p_Ln_Price_Attributes_Tbl => p_Ln_Price_Attributes_Tbl
,p_Ln_Payment_Tbl => p_Ln_Payment_Tbl
,p_Ln_Shipment_Tbl => p_Ln_Shipment_Tbl
,p_Ln_Freight_Charge_Tbl => p_Ln_Freight_Charge_Tbl
,p_Ln_Tax_Detail_Tbl => p_Ln_Tax_Detail_Tbl
,p_save_type => p_save_type
,x_quote_header_id => x_quote_header_id
,x_last_update_date => x_last_update_date
,x_Qte_Header_Rec => lx_Qte_Header_Rec
,x_Hd_Price_Attributes_Tbl => lx_Hd_Price_Attributes_Tbl
,x_Hd_Payment_Tbl => lx_Hd_Payment_Tbl
,x_Hd_Shipment_Tbl => lx_Hd_Shipment_Tbl
,x_Hd_Shipment_Rec => lx_Hd_Shipment_Rec
,x_Hd_Freight_Charge_Tbl => lx_Hd_Freight_Charge_Tbl
,x_Hd_Tax_Detail_Tbl => lx_Hd_Tax_Detail_Tbl
,x_Qte_Line_Tbl => lx_Qte_Line_Tbl
,x_Qte_Line_Dtl_Tbl => lx_Qte_Line_Dtl_Tbl
,x_Line_Attr_Ext_Tbl => lx_Line_Attr_Ext_Tbl
,x_Line_rltship_tbl => lx_Line_rltship_tbl
,x_Ln_Price_Attributes_Tbl => lx_Ln_Price_Attributes_Tbl
,x_Ln_Payment_Tbl => lx_Ln_Payment_Tbl
,x_Ln_Shipment_Tbl => lx_Ln_Shipment_Tbl
,x_Ln_Freight_Charge_Tbl => lx_Ln_Freight_Charge_Tbl
,x_Ln_Tax_Detail_Tbl => lx_Ln_Tax_Detail_Tbl
,x_Price_Adjustment_Tbl => lx_Price_Adjustment_Tbl
,x_Price_Adj_Attr_Tbl => lx_Price_Adj_Attr_Tbl
,x_Price_Adj_Rltship_Tbl => lx_Price_Adj_Rltship_Tbl
,X_Return_Status => x_Return_Status
,X_Msg_Count => x_Msg_Count
,X_Msg_Data => x_Msg_Data
);
,p_auto_update_active_quote IN VARCHAR2 := FND_API.G_TRUE
,p_combineSameItem IN VARCHAR2 := FND_API.G_MISS_CHAR
,p_sharee_Number IN Number := FND_API.G_MISS_NUM
,p_sharee_party_id IN Number := FND_API.G_MISS_NUM
,p_sharee_cust_account_id IN Number := FND_API.G_MISS_NUM
,p_minisite_id IN NUMBER := FND_API.G_MISS_NUM
,p_changeowner IN VARCHAR2 := FND_API.G_FALSE
,p_Control_Rec IN ASO_Quote_Pub.Control_Rec_Type
:= ASO_Quote_Pub.G_Miss_Control_Rec
,p_Qte_Header_Rec IN ASO_Quote_Pub.Qte_Header_Rec_Type
:= ASO_Quote_Pub.G_MISS_Qte_Header_Rec
,p_hd_Price_Attributes_Tbl IN ASO_Quote_Pub.Price_Attributes_Tbl_Type
:= ASO_Quote_Pub.G_Miss_Price_Attributes_Tbl
,p_hd_Payment_Tbl IN ASO_Quote_Pub.Payment_Tbl_Type
:= ASO_Quote_Pub.G_MISS_PAYMENT_TBL
,p_hd_Shipment_TBL IN ASO_Quote_Pub.Shipment_tbl_Type
:= ASO_Quote_Pub.G_MISS_SHIPMENT_TBL
,p_hd_Freight_Charge_Tbl IN ASO_Quote_Pub.Freight_Charge_Tbl_Type
:= ASO_Quote_Pub.G_Miss_Freight_Charge_Tbl
,p_hd_Tax_Detail_Tbl IN ASO_Quote_Pub.Tax_Detail_Tbl_Type
:= ASO_Quote_Pub.G_Miss_Tax_Detail_Tbl
,p_Qte_Line_Tbl IN ASO_Quote_Pub.Qte_Line_Tbl_Type
:= ASO_Quote_Pub.G_MISS_QTE_LINE_TBL
,p_Qte_Line_Dtl_Tbl IN ASO_Quote_Pub.Qte_Line_Dtl_Tbl_Type
:= ASO_Quote_Pub.G_MISS_QTE_LINE_DTL_TBL
,p_Line_Attr_Ext_Tbl IN ASO_Quote_Pub.Line_Attribs_Ext_Tbl_Type
:= ASO_Quote_Pub.G_MISS_Line_Attribs_Ext_TBL
,p_line_rltship_tbl IN ASO_Quote_Pub.Line_Rltship_Tbl_Type
:= ASO_Quote_Pub.G_MISS_Line_Rltship_Tbl
,p_Price_Adjustment_Tbl IN ASO_Quote_Pub.Price_Adj_Tbl_Type
:= ASO_Quote_Pub.G_Miss_Price_Adj_Tbl
,p_Price_Adj_Attr_Tbl IN ASO_Quote_Pub.Price_Adj_Attr_Tbl_Type
:= ASO_Quote_Pub.G_Miss_PRICE_ADJ_ATTR_Tbl
,p_Price_Adj_Rltship_Tbl IN ASO_Quote_Pub.Price_Adj_Rltship_Tbl_Type
:= ASO_Quote_Pub.G_Miss_Price_Adj_Rltship_Tbl
,p_Ln_Price_Attributes_Tbl IN ASO_Quote_Pub.Price_Attributes_Tbl_Type
:= ASO_Quote_Pub.G_Miss_Price_Attributes_Tbl
,p_Ln_Payment_Tbl IN ASO_Quote_Pub.Payment_Tbl_Type
:= ASO_Quote_Pub.G_MISS_PAYMENT_TBL
,p_Ln_Shipment_Tbl IN ASO_Quote_Pub.Shipment_Tbl_Type
:= ASO_Quote_Pub.G_MISS_SHIPMENT_TBL
,p_Ln_Freight_Charge_Tbl IN ASO_Quote_Pub.Freight_Charge_Tbl_Type
:= ASO_Quote_Pub.G_Miss_Freight_Charge_Tbl
,p_Ln_Tax_Detail_Tbl IN ASO_Quote_Pub.Tax_Detail_Tbl_Type
:= ASO_Quote_Pub.G_Miss_Tax_Detail_Tbl
,p_save_type IN NUMBER := FND_API.G_MISS_NUM
,x_quote_header_id OUT NOCOPY varchar2
,x_last_update_date OUT NOCOPY DATE
,x_Qte_Header_Rec IN OUT NOCOPY ASO_Quote_Pub.Qte_Header_Rec_Type
,x_Hd_Price_Attributes_Tbl IN OUT NOCOPY ASO_Quote_Pub.Price_Attributes_Tbl_Type
,x_Hd_Payment_Tbl IN OUT NOCOPY ASO_Quote_Pub.Payment_Tbl_Type
,x_Hd_Shipment_Tbl IN OUT NOCOPY ASO_Quote_Pub.Shipment_Tbl_Type
,x_Hd_Shipment_Rec IN OUT NOCOPY ASO_Quote_Pub.Shipment_Rec_Type
,x_Hd_Freight_Charge_Tbl IN OUT NOCOPY ASO_Quote_Pub.Freight_Charge_Tbl_Type
,x_Hd_Tax_Detail_Tbl IN OUT NOCOPY ASO_Quote_Pub.TAX_DETAIL_TBL_TYPE
,x_Qte_Line_Tbl IN OUT NOCOPY ASO_Quote_Pub.Qte_Line_Tbl_Type
,x_Qte_Line_Dtl_Tbl IN OUT NOCOPY ASO_Quote_Pub.Qte_Line_Dtl_Tbl_Type
,x_Line_Attr_Ext_Tbl IN OUT NOCOPY ASO_Quote_Pub.Line_Attribs_Ext_Tbl_Type
,x_Line_rltship_tbl IN OUT NOCOPY ASO_Quote_Pub.Line_Rltship_Tbl_Type
,x_Ln_Price_Attributes_Tbl IN OUT NOCOPY ASO_Quote_Pub.Price_Attributes_Tbl_Type
,x_Ln_Payment_Tbl IN OUT NOCOPY ASO_Quote_Pub.Payment_Tbl_Type
,x_Ln_Shipment_Tbl IN OUT NOCOPY ASO_Quote_Pub.Shipment_Tbl_Type
,x_Ln_Freight_Charge_Tbl IN OUT NOCOPY ASO_Quote_Pub.Freight_Charge_Tbl_Type
,x_Ln_Tax_Detail_Tbl IN OUT NOCOPY ASO_Quote_Pub.TAX_DETAIL_TBL_TYPE
,x_Price_Adjustment_Tbl IN OUT NOCOPY ASO_Quote_Pub.Price_Adj_Tbl_Type
,x_Price_Adj_Attr_Tbl IN OUT NOCOPY ASO_Quote_Pub.Price_Adj_Attr_Tbl_Type
,x_Price_Adj_Rltship_Tbl IN OUT NOCOPY ASO_Quote_Pub.Price_Adj_Rltship_Tbl_Type
,X_Return_Status OUT NOCOPY VARCHAR2
,X_Msg_Count OUT NOCOPY NUMBER
,X_Msg_Data OUT NOCOPY VARCHAR2
)
is
l_api_name CONSTANT VARCHAR2(30) := 'SAVE';
ld_last_update_date date;
select term_id, price_list_id
from oe_agreements_b
where agreement_id = p_agreement_id;
select quote_status_id
from aso_quote_statuses_vl
where status_code = p_status_code;
IF(p_save_type <> OP_DELETE_CART) THEN
IF (IBE_UTIL.G_DEBUGON = l_true) THEN
IBE_UTIL.DEBUG('SAVE: Calling Validate User');
IBE_Quote_Misc_pvt.Validate_User_Update
( p_init_msg_list => p_Init_Msg_List
,p_quote_header_id => p_Qte_Header_Rec.quote_header_id
,p_party_id => p_Qte_Header_Rec.party_id
,p_cust_account_id => p_Qte_Header_Rec.cust_account_id
,p_quote_retrieval_number => p_sharee_Number
,p_validate_user => FND_API.G_TRUE
,p_save_type => p_save_type
,p_last_update_date => p_Qte_Header_Rec.last_update_date
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data );
has not expired because we do not want to allow updates on expired carts*/
l_is_quote_usable := IBE_QUOTE_MISC_PVT.is_quote_usable(p_qte_header_rec.quote_header_id,
p_Qte_Header_Rec.party_id,
p_Qte_Header_Rec.cust_account_id);
,p_auto_update_active_quote => p_auto_update_active_quote
,x_qte_header_rec => l_qte_header_rec
,p_hdr_Payment_Tbl => p_hd_payment_tbl
,x_hdr_payment_tbl => l_hd_Payment_Tbl
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data );
/*This code validates the recipient's access level against the minimum required access level for a create/update
operation which is "F"*/
IF ( ( p_sharee_Number is not null)
and ( p_sharee_Number <> FND_API.G_MISS_NUM)) THEN
l_privilege_type_code := IBE_Quote_Misc_pvt.GetShareeprivilege(l_qte_header_rec.quote_header_id
,p_sharee_Number);
/* Start of CREATE QUOTE or UPDATE QUOTE conditions*/
/* "Create quote" is invoked if there is no incoming quote_header_id and no quote header id found
in the database for the operating user, otherwise "Update quote" is invoked*/
IF l_qte_header_rec.quote_header_id IS NULL
OR l_qte_header_rec.quote_header_id = FND_API.G_MISS_NUM THEN
--Fix for bug 2512597
-- Force the quote_status_id to be 'STORE DRAFT' if there is no input value
IF l_qte_header_rec.quote_status_id is null OR
l_qte_header_rec.quote_status_id = fnd_api.g_miss_num then
for rec_quote_sts_id in c_quote_sts_id('STORE DRAFT') loop
l_qte_header_rec.quote_status_id := rec_quote_sts_id.quote_status_id;
IBE_Util.Debug('In Update Header MinisiteId Dynamic SQL');
l_upd_stmnt := 'Update ASO_QUOTE_HEADERS_ALL set minisite_id = :1
where quote_header_id = :2';
FND_MESSAGE.set_name('IBE', 'IBE_UPDATE_MSITE_HDR_ERR');
l_hd_payment_tbl(I).operation_code := 'UPDATE'; -- Bug# 1955991
l_hd_payment_tbl(I).last_update_date :=
IBE_Quote_Misc_pvt.getQuoteLastUpdateDate(l_qte_header_rec.quote_header_id); -- Bug# 1955991
/* Added by Sri 09/06 since the header last update date should be the value in the db */
l_qte_header_rec.last_update_date :=
IBE_Quote_Misc_pvt.getQuoteLastUpdateDate(l_qte_header_rec.quote_header_id); -- Bug# 1955991
l_hd_shipment_tbl(I).operation_code := 'UPDATE';
l_hd_shipment_tbl(I).last_update_date :=
IBE_Quote_Misc_pvt.getQuoteLastUpdateDate(l_qte_header_rec.quote_header_id); -- Bug# 1955991
/* Added by Sri 09/06 since the header last update date should be the value in the db */
l_qte_header_rec.last_update_date :=
IBE_Quote_Misc_pvt.getQuoteLastUpdateDate(l_qte_header_rec.quote_header_id); -- Bug# 1955991
UpdateQuoteForSharee(
p_api_version_number => p_api_version_number
,p_init_msg_list => FND_API.G_FALSE
,p_commit => FND_API.G_FALSE
,p_sharee_party_id => p_sharee_party_id
,p_sharee_cust_account_id => p_sharee_cust_account_id
,p_control_rec => p_control_rec
,p_qte_header_rec => l_qte_header_rec
,p_Hd_Price_Attributes_Tbl => p_Hd_Price_Attributes_Tbl
,p_Hd_Payment_Tbl => l_Hd_Payment_Tbl
,p_Hd_Shipment_Tbl => l_Hd_Shipment_Tbl
,p_Hd_Tax_Detail_Tbl => p_Hd_Tax_Detail_Tbl
,p_Hd_Freight_Charge_Tbl => p_Hd_Freight_Charge_Tbl
,p_qte_line_tbl => l_qte_line_tbl
,p_Qte_Line_Dtl_Tbl => l_Qte_Line_Dtl_Tbl
,p_Line_rltship_tbl => p_Line_rltship_tbl
,p_Line_Attr_Ext_Tbl => p_Line_Attr_Ext_Tbl
,p_Ln_Price_Attributes_Tbl => p_Ln_Price_Attributes_Tbl
,p_Ln_Payment_Tbl => l_Ln_Payment_Tbl
,p_Ln_Shipment_Tbl => p_Ln_Shipment_Tbl
,p_Ln_Tax_Detail_Tbl => p_Ln_Tax_Detail_Tbl
,p_Ln_Freight_Charge_Tbl => p_Ln_Freight_Charge_Tbl
,p_Price_Adj_Attr_Tbl => p_Price_Adj_Attr_Tbl
,p_Price_Adjustment_Tbl => p_Price_Adjustment_Tbl
,p_Price_Adj_Rltship_Tbl => p_Price_Adj_Rltship_Tbl
,x_qte_header_rec => x_qte_header_rec
,x_qte_line_tbl => x_qte_line_tbl
,X_Return_Status => X_Return_Status
,X_Msg_Count => X_Msg_Count
,X_Msg_Data => X_Msg_Data);
IBE_Util.Debug('ASO_Quote_Pub.Update_Quote() starts');
IBE_Util.Debug('Save : COUNT: just before aso update' || p_Ln_Price_Attributes_Tbl.count);
ASO_Quote_Pub.Update_quote(
P_Api_Version_Number => P_Api_Version_Number
,P_Init_Msg_List => FND_API.G_FALSE
,P_Commit => FND_API.G_FALSE
,P_Control_Rec => p_control_rec
,P_qte_header_rec => l_Qte_Header_Rec
,P_Qte_Line_Tbl => l_Qte_Line_Tbl
,p_Line_rltship_tbl => p_Line_rltship_tbl
,p_Qte_Line_Dtl_Tbl => l_Qte_Line_Dtl_Tbl
,p_Hd_Price_Attributes_Tbl => p_Hd_Price_Attributes_Tbl
,p_Hd_Payment_Tbl => l_Hd_Payment_Tbl
,p_Hd_Shipment_Tbl => l_Hd_Shipment_Tbl
,p_Hd_Tax_Detail_Tbl => p_Hd_Tax_Detail_Tbl
,p_Ln_Price_Attributes_Tbl => p_Ln_Price_Attributes_Tbl
,p_Ln_Payment_Tbl => l_Ln_Payment_Tbl
,p_Ln_Shipment_Tbl => p_Ln_Shipment_Tbl
,p_Ln_Tax_Detail_Tbl => p_Ln_Tax_Detail_Tbl
,p_Price_Adj_Attr_Tbl => p_Price_Adj_Attr_Tbl
,p_Price_Adjustment_Tbl => p_Price_Adjustment_Tbl
,p_Price_Adj_Rltship_Tbl => p_Price_Adj_Rltship_Tbl
,p_Line_Attr_Ext_Tbl => p_Line_Attr_Ext_Tbl
,p_Hd_Freight_Charge_Tbl => p_Hd_Freight_Charge_Tbl
,p_Ln_Freight_Charge_Tbl => p_Ln_Freight_Charge_Tbl
,x_qte_header_rec => x_Qte_Header_Rec
,X_Qte_Line_Tbl => x_Qte_Line_Tbl
,X_Qte_Line_Dtl_Tbl => x_Qte_Line_Dtl_Tbl
,x_Hd_Price_Attributes_Tbl => X_Hd_Price_Attributes_Tbl
,X_Hd_Payment_Tbl => x_Hd_Payment_Tbl
,X_Hd_Shipment_Tbl => x_Hd_Shipment_Tbl
,X_Hd_Freight_Charge_Tbl => x_Hd_Freight_Charge_Tbl
,X_Hd_Tax_Detail_Tbl => x_Hd_Tax_Detail_Tbl
,x_Line_Attr_Ext_Tbl => x_Line_Attr_Ext_Tbl
,X_Line_rltship_tbl => x_Line_Rltship_Tbl
,X_Price_Adjustment_Tbl => x_Price_Adjustment_Tbl
,X_Price_Adj_Attr_Tbl => X_Price_Adj_Attr_Tbl
,X_Price_Adj_Rltship_Tbl => x_Price_Adj_Rltship_Tbl
,X_Ln_Price_Attributes_Tbl => X_Ln_Price_Attributes_Tbl
,X_Ln_Payment_Tbl => x_Ln_Payment_Tbl
,X_Ln_Shipment_Tbl => x_Ln_Shipment_Tbl
,X_Ln_Freight_Charge_Tbl => x_Ln_Freight_Charge_Tbl
,X_Ln_Tax_Detail_Tbl => x_Ln_Tax_Detail_Tbl
,X_Return_Status => x_return_status
,X_Msg_Count => x_msg_count
,X_Msg_Data => x_msg_data);
IBE_Util.Debug('ASO_Quote_Pub.Update_Quote() finishes : '|| x_return_status);
END IF; -- end of create/update
x_last_update_date := x_qte_header_rec.last_update_date;
Set_Last_Update_Date(l_qte_header_rec.quote_header_id, x_last_update_date);
Set_Last_Update_Date(l_qte_header_rec.quote_header_id, x_last_update_date);
Set_Last_Update_Date(l_qte_header_rec.quote_header_id, x_last_update_date);
PROCEDURE UpdateQuoteForSharee(
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_sharee_Party_Id IN NUMBER
,p_sharee_Cust_account_Id IN NUMBER
,p_changeowner IN VARCHAR2 := FND_API.G_FALSE
,P_Control_Rec IN ASO_Quote_Pub.Control_Rec_Type
,P_Qte_Header_Rec IN ASO_Quote_Pub.Qte_Header_Rec_Type
:= ASO_Quote_Pub.G_MISS_Qte_Header_Rec
,p_Hd_Price_Attributes_Tbl in ASO_Quote_Pub.Price_Attributes_Tbl_Type
:= ASO_Quote_Pub.G_MISS_Price_Attributes_Tbl
,p_Hd_Payment_Tbl in ASO_Quote_Pub.Payment_Tbl_Type
:= ASO_Quote_Pub.G_MISS_PAYMENT_TBL
,p_Hd_Shipment_Tbl in ASO_Quote_Pub.Shipment_Tbl_Type
:= ASO_Quote_Pub.G_MISS_SHIPMENT_Tbl
,p_Hd_Tax_Detail_Tbl in ASO_Quote_Pub.TAX_DETAIL_TBL_TYPE
:= ASO_Quote_Pub.G_MISS_Tax_Detail_Tbl
,p_Hd_Freight_Charge_Tbl in ASO_Quote_Pub.Freight_Charge_Tbl_Type
:= ASO_Quote_Pub.G_MISS_Freight_Charge_Tbl
,p_qte_line_tbl in ASO_Quote_Pub.Qte_Line_Tbl_Type
:= ASO_Quote_Pub.G_MISS_QTE_LINE_TBL
,p_Qte_Line_Dtl_Tbl in ASO_Quote_Pub.Qte_Line_Dtl_Tbl_Type
:= ASO_Quote_Pub.G_MISS_QTE_LINE_DTL_TBL
,p_Line_rltship_tbl in ASO_Quote_Pub.Line_Rltship_Tbl_Type
:= ASO_Quote_Pub.G_MISS_Line_Rltship_Tbl
,p_Line_Attr_Ext_Tbl in ASO_Quote_Pub.Line_Attribs_Ext_Tbl_Type
:= ASO_Quote_Pub.G_MISS_Line_Attribs_Ext_Tbl
,p_Ln_Price_Attributes_Tbl in ASO_Quote_Pub.Price_Attributes_Tbl_Type
:= ASO_Quote_Pub.G_MISS_Price_Attributes_Tbl
,p_Ln_Payment_Tbl in ASO_Quote_Pub.Payment_Tbl_Type
:= ASO_Quote_Pub.G_MISS_PAYMENT_TBL
,p_Ln_Shipment_Tbl in ASO_Quote_Pub.Shipment_Tbl_Type
:= ASO_Quote_Pub.G_MISS_SHIPMENT_TBL
,p_Ln_Tax_Detail_Tbl in ASO_Quote_Pub.TAX_DETAIL_TBL_TYPE
:= ASO_Quote_Pub.G_MISS_Tax_Detail_Tbl
,p_Ln_Freight_Charge_Tbl in ASO_Quote_Pub.Freight_Charge_Tbl_Type
:= ASO_Quote_Pub.G_MISS_Freight_Charge_Tbl
,p_Price_Adj_Attr_Tbl in ASO_Quote_Pub.Price_Adj_Attr_Tbl_Type
:= ASO_Quote_Pub.G_MISS_PRICE_ADJ_ATTR_Tbl
,p_Price_Adjustment_Tbl in ASO_Quote_Pub.Price_Adj_Tbl_Type
:= ASO_Quote_Pub.G_MISS_Price_Adj_Tbl
,p_Price_Adj_Rltship_Tbl in ASO_Quote_Pub.Price_Adj_Rltship_Tbl_Type
:= ASO_Quote_Pub.G_MISS_Price_Adj_Rltship_Tbl
,x_qte_header_rec OUT NOCOPY ASO_Quote_Pub.Qte_Header_Rec_Type
,x_qte_line_tbl OUT NOCOPY ASO_Quote_Pub.Qte_Line_Tbl_Type
,X_Return_Status OUT NOCOPY VARCHAR2
,X_Msg_Count OUT NOCOPY NUMBER
,X_Msg_Data OUT NOCOPY VARCHAR2
)
IS
l_api_name CONSTANT VARCHAR2(30) := 'UpdateQuoteForSharee';
IBE_Util.Debug('Begin IBE_Quote_Save_pvt.UpdateQuoteForSharee()');
SAVEPOINT UpdateQuoteForSharee_pvt;
IBE_Util.Debug('ASO_Quote_Pub.Update_Quote() starts');
ASO_Quote_Pub.Update_Quote(
P_Api_Version_Number => P_Api_Version_Number
,P_Init_Msg_List => FND_API.G_FALSE
,P_Commit => FND_API.G_FALSE
,P_Control_Rec => p_control_rec
,P_qte_header_rec => l_Qte_Header_Rec
,P_Qte_Line_Tbl => p_Qte_Line_Tbl
,p_Line_rltship_tbl => p_Line_rltship_tbl
,p_Qte_Line_Dtl_Tbl => p_Qte_Line_Dtl_Tbl
,p_Hd_Price_Attributes_Tbl => p_Hd_Price_Attributes_Tbl
,p_Hd_Payment_Tbl => p_Hd_Payment_Tbl
,p_Hd_Shipment_Tbl => p_Hd_Shipment_Tbl
,p_Hd_Tax_Detail_Tbl => p_Hd_Tax_Detail_Tbl
,p_Ln_Price_Attributes_Tbl => p_Ln_Price_Attributes_Tbl
,p_Ln_Payment_Tbl => p_Ln_Payment_Tbl
,p_Ln_Shipment_Tbl => p_Ln_Shipment_Tbl
,p_Ln_Tax_Detail_Tbl => p_Ln_Tax_Detail_Tbl
,p_Price_Adj_Attr_Tbl => p_Price_Adj_Attr_Tbl
,p_Price_Adjustment_Tbl => p_Price_Adjustment_Tbl
,p_Price_Adj_Rltship_Tbl => p_Price_Adj_Rltship_Tbl
,p_Line_Attr_Ext_Tbl => p_Line_Attr_Ext_Tbl
,p_Hd_Freight_Charge_Tbl => p_Hd_Freight_Charge_Tbl
,p_Ln_Freight_Charge_Tbl => p_Ln_Freight_Charge_Tbl
,x_qte_header_rec => x_Qte_Header_Rec
,X_Qte_Line_Tbl => x_Qte_Line_Tbl
,X_Qte_Line_Dtl_Tbl => lx_Qte_Line_Dtl_Tbl
,x_Hd_Price_Attributes_Tbl => lX_Hd_Price_Attributes_Tbl
,X_Hd_Payment_Tbl => lx_Hd_Payment_Tbl
,X_Hd_Shipment_Tbl => lx_Hd_Shipment_Tbl
,X_Hd_Freight_Charge_Tbl => lx_Hd_Freight_Charge_Tbl
,X_Hd_Tax_Detail_Tbl => lx_Hd_Tax_Detail_Tbl
,x_Line_Attr_Ext_Tbl => lx_Line_Attr_Ext_Tbl
,X_Line_rltship_tbl => lx_Line_Rltship_Tbl
,X_Price_Adjustment_Tbl => lx_Price_Adjustment_Tbl
,X_Price_Adj_Attr_Tbl => lX_Price_Adj_Attr_Tbl
,X_Price_Adj_Rltship_Tbl => lx_Price_Adj_Rltship_Tbl
,X_Ln_Price_Attributes_Tbl => lX_Ln_Price_Attributes_Tbl
,X_Ln_Payment_Tbl => lx_Ln_Payment_Tbl
,X_Ln_Shipment_Tbl => lx_Ln_Shipment_Tbl
,X_Ln_Freight_Charge_Tbl => lx_Ln_Freight_Charge_Tbl
,X_Ln_Tax_Detail_Tbl => lx_Ln_Tax_Detail_Tbl
,X_Return_Status => x_return_status
,X_Msg_Count => x_msg_count
,X_Msg_Data => x_msg_data);
IBE_Util.Debug('ASO_Quote_Pub.Update_Quote() finishes');
l_qte_header_rec.last_update_date :=x_qte_header_rec.last_update_date;
IBE_Util.Debug('ASO_Quote_Pub.Update_Quote() starts');
ASO_Quote_Pub.Update_quote(
P_Api_Version_Number => P_Api_Version_Number
,P_Init_Msg_List => FND_API.G_FALSE
,P_Commit => FND_API.G_FALSE
,P_qte_header_rec => l_Qte_Header_Rec
,x_qte_header_rec => x_Qte_Header_Rec
,X_Qte_Line_Tbl => x_Qte_Line_Tbl
,X_Qte_Line_Dtl_Tbl => lx_Qte_Line_Dtl_Tbl
,x_Hd_Price_Attributes_Tbl => lX_Hd_Price_Attributes_Tbl
,X_Hd_Payment_Tbl => lx_Hd_Payment_Tbl
,X_Hd_Shipment_Tbl => lx_Hd_Shipment_Tbl
,X_Hd_Freight_Charge_Tbl => lx_Hd_Freight_Charge_Tbl
,X_Hd_Tax_Detail_Tbl => lx_Hd_Tax_Detail_Tbl
,x_Line_Attr_Ext_Tbl => lx_Line_Attr_Ext_Tbl
,X_Line_rltship_tbl => lx_Line_Rltship_Tbl
,X_Price_Adjustment_Tbl => lx_Price_Adjustment_Tbl
,X_Price_Adj_Attr_Tbl => lX_Price_Adj_Attr_Tbl
,X_Price_Adj_Rltship_Tbl => lx_Price_Adj_Rltship_Tbl
,X_Ln_Price_Attributes_Tbl => lX_Ln_Price_Attributes_Tbl
,X_Ln_Payment_Tbl => lx_Ln_Payment_Tbl
,X_Ln_Shipment_Tbl => lx_Ln_Shipment_Tbl
,X_Ln_Freight_Charge_Tbl => lx_Ln_Freight_Charge_Tbl
,X_Ln_Tax_Detail_Tbl => lx_Ln_Tax_Detail_Tbl
,X_Return_Status => x_return_status
,X_Msg_Count => x_msg_count
,X_Msg_Data => x_msg_data);
IBE_Util.Debug('ASO_Quote_Pub.Update_Quote() finishes');
IBE_Util.Debug('End IBE_Quote_Save_pvt.UpdateQuoteForSharee()');
ROLLBACK TO UpdateQuoteForSharee_pvt;
IBE_Util.Debug('End IBE_Quote_Save_pvt.UpdateQuoteForSharee()');
ROLLBACK TO UpdateQuoteForSharee_pvt;
IBE_Util.Debug('End IBE_Quote_Save_pvt.UpdateQuoteForSharee()');
ROLLBACK TO UpdateQuoteForSharee_pvt;
IBE_Util.Debug('End IBE_Quote_Save_pvt.UpdateQuoteForSharee()');
END UpdateQuoteForSharee;
,x_last_update_date OUT NOCOPY DATE
,X_Return_Status OUT NOCOPY VARCHAR2
,X_Msg_Count OUT NOCOPY NUMBER
,X_Msg_Data OUT NOCOPY VARCHAR2
)
IS
l_api_name CONSTANT VARCHAR2(30) := 'getHdrDefaultValues';
select shipment_id, SHIP_TO_PARTY_SITE_ID
from ASO_shipments
where QUOTE_HEADER_ID = l_quote_header_id and
quote_line_id is null;
select ship_to_party_id
from ASO_shipments
where QUOTE_HEADER_ID = l_quote_header_id and
quote_line_id is null and
SHIP_TO_CUST_ACCOUNT_ID is null and
SHIP_TO_PARTY_SITE_ID is null;
select quote_header_id, INVOICE_TO_PARTY_SITE_ID
from ASO_quote_headers
where QUOTE_HEADER_ID = l_quote_header_id;
select invoice_to_party_id
from ASO_quote_headers
where QUOTE_HEADER_ID = l_quote_header_id and
INVOICE_TO_CUST_ACCOUNT_ID is null and
INVOICE_TO_PARTY_SITE_ID is null;
opCode = Update
if shipTo_partyId is not null -> partyId = shipTo_partyId
else
there is shipment record but no shipTo_partyId -> partyId = cookie's
*/
IF (IBE_UTIL.G_DEBUGON = l_true) THEN
IBE_Util.Debug('getDefaultAddress: l_party_id ='||l_party_id);
l_opCode := 'UPDATE';
l_opCode := 'UPDATE';
select shipment_id, SHIP_METHOD_CODE
from ASO_shipments
where QUOTE_HEADER_ID = l_quote_header_id and
quote_line_id is null;
SELECT msite_information1
FROM ibe_msite_information m, wsh_carrier_ship_methods o, oe_system_parameters_all oesp
WHERE m.msite_id = l_msite_id
AND m.msite_information_context = l_ship_mthd
AND m.msite_information1 = o.ship_method_code
AND oesp.org_id = l_org_id
AND o.organization_id = oesp.master_organization_id
AND o.web_enabled = l_web_enabled
AND o.enabled_flag = l_enabled_flag
Order by msite_information1;
l_opCode := 'UPDATE';
select payment_id, PAYMENT_TYPE_CODE
from ASO_payments
where QUOTE_HEADER_ID = l_quote_header_id and
quote_line_id is null;
SELECT msite_information1
FROM ibe_msite_information a, fnd_lookup_values b
WHERE a.msite_id = l_msite_id
AND a.msite_information1 = b.lookup_code
AND a.msite_information1 = 'CREDIT_CARD'
AND b.LOOKUP_TYPE = 'IBE_PAYMENT_TYPE'
AND b.ENABLED_FLAG ='Y' AND (b.TAG='Y' or b.TAG is null)
AND b.language = userenv('lang');
SELECT msite_information1
FROM ibe_msite_information a, fnd_lookup_values b
WHERE a.msite_id = l_msite_id
AND a.msite_information1 = b.lookup_code
AND a.msite_information1 <> 'CREDIT_CARD'
AND b.LOOKUP_TYPE = 'IBE_PAYMENT_TYPE'
AND b.ENABLED_FLAG ='Y' AND (b.TAG='Y' or b.TAG is null)
AND b.language = userenv('lang');
l_opCode := 'UPDATE';
select tax_detail_id, tax_exempt_flag
from ASO_TAX_DETAILS
where QUOTE_HEADER_ID = l_quote_header_id and
quote_line_id is null;
l_opCode := 'UPDATE';
select quote_header_id, end_customer_party_id, end_customer_cust_party_id, end_customer_party_site_id, end_customer_cust_account_id
from ASO_quote_headers
where QUOTE_HEADER_ID = l_quote_header_id;
select SHIP_TO_CUST_ACCOUNT_ID, ship_to_party_id, ship_to_party_site_id
from aso_shipments
where QUOTE_HEADER_ID = l_quote_header_id and
quote_line_id is null;
IBE_Quote_Misc_pvt.validate_user_update(
p_init_msg_list => p_Init_Msg_List
,p_quote_header_id => p_quote_id
,p_party_id => p_party_id
,p_cust_account_id => p_cust_account_id
,p_quote_retrieval_number => p_quote_retrieval_number
,p_validate_user => p_validate_user
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
);
this is done because recipients cannot update a cart after it becomes a quote*/
IF(IBE_UTIL.G_DEBUGON = 'Y') THEN
IBE_UTIL.DEBUG('Calling share_readonly to downgrade the access levels of all recipients to R status');
x_last_update_date OUT NOCOPY Date ,
x_quote_header_id OUT NOCOPY NUMBER ,
p_last_update_date IN Date ,
p_quote_header_id IN NUMBER:= FND_API.G_MISS_NUM,
p_party_id IN NUMBER:= FND_API.G_MISS_NUM,
p_cust_account_id IN NUMBER:= FND_API.G_MISS_NUM,
p_validate_user IN VARCHAR2:= FND_API.G_FALSE ,
P_new_quote_name IN VARCHAR2 ,
p_retrieval_number IN NUMBER := FND_API.G_MISS_NUM,
p_minisite_id IN NUMBER ) is
CURSOR c_check_for_quote(c_quote_header_id NUMBER) IS
SELECT count(*) is_published_quote
FROM ASO_QUOTE_HEADERS_ALL
WHERE quote_header_id = c_quote_header_id
AND resource_id is not null
AND publish_flag = 'Y';
select count(*) is_shared_cart
from ibe_sh_quote_access
where quote_header_id = c_quote_header_id;
SELECT order_type_id,currency_code
FROM aso_quote_headers
WHERE quote_header_id = p_quote_header_id;
lx_last_update_date DATE;
IBE_UTIL.DEBUG('DUPLICATE_CART: p_last_update_date = '||p_last_update_date);
IBE_Quote_Misc_pvt.Validate_User_Update
( p_init_msg_list => p_Init_Msg_List
,p_quote_header_id => p_quote_header_id
,p_party_id => p_party_id
,p_cust_account_id => p_cust_account_id
,p_validate_user => p_validate_user
,p_quote_retrieval_number => p_retrieval_number
,p_save_type => OP_DUPLICATE_CART
,p_last_update_date => p_last_update_date
,x_return_status => lx_return_status
,x_msg_count => lx_msg_count
,x_msg_data => lx_msg_data
);
,x_last_update_date => lx_last_update_date
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data
);
,x_last_update_date OUT NOCOPY DATE
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
) IS
L_API_VERSION CONSTANT NUMBER := 1.0;
lx_last_update_date DATE;
l_refcursor_query VARCHAR2(1000) := 'select aql.quote_header_id,
aql.quote_line_id,
aql.inventory_item_id,
aql.organization_id,
aql.uom_code,
aql.quantity,
aqld.config_header_id,
aqld.config_revision_num
from aso_quote_lines_all aql,
aso_quote_line_details AQLD
where aqld.quote_line_id = aql.quote_line_id and
aqld.ref_line_id is null and
aql.quote_header_id = :1';
,x_last_update_date => x_last_update_date
,X_Return_Status => x_return_status
,X_Msg_Count => x_msg_count
,X_Msg_Data => x_msg_data
);
,x_last_update_date => lx_last_update_date
,X_Return_Status => x_Return_Status
,X_Msg_Count => x_Msg_Count
,X_Msg_Data => x_Msg_Data
);
l_Qte_Header_Rec.last_update_date := lx_last_update_date;
SELECT primary_uom_code, service_duration_period_code, service_duration
FROM mtl_system_items
WHERE inventory_item_id = p_svc_item_id and organization_id = p_org_id;
PROCEDURE UPDATE_SUPPORT_AND_QUANTITY(
p_api_version IN NUMBER,
p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
p_quote_header_id IN NUMBER,
p_quote_line_id_tbl IN JTF_NUMBER_TABLE := NULL,
p_line_quantity_tbl IN JTF_NUMBER_TABLE := NULL,
p_new_service_id_tbl IN JTF_NUMBER_TABLE := NULL,
p_organization_id IN NUMBER := FND_API.G_MISS_NUM,
p_party_id IN NUMBER := FND_API.G_MISS_NUM,
p_cust_account_id IN NUMBER := FND_API.G_MISS_NUM,
p_sharee_number IN NUMBER := FND_API.G_MISS_NUM,
p_minisite_id IN NUMBER := FND_API.G_MISS_NUM,
p_price_list_id IN NUMBER := FND_API.G_MISS_NUM,
p_currency_code IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_header_pricing_event IN VARCHAR2 := FND_API.G_MISS_CHAR,
p_save_type IN NUMBER := FND_API.G_MISS_NUM,
p_last_update_date IN DATE := FND_API.G_MISS_DATE,
x_last_update_date IN OUT NOCOPY DATE
)
IS
l_api_name CONSTANT VARCHAR2(30) := 'UPDATE_SUPPORT_AND_QUANTITY';
l_deleted_svc_map_tbl JTF_VARCHAR2_TABLE_100 := NULL;
SELECT AQL.quote_line_id,ALD.service_ref_line_id,AQL.inventory_item_id
FROM aso_quote_lines_all AQL, aso_quote_line_details ALD
WHERE AQL.quote_header_id = p_quote_header_id and AQL.quote_line_id=ALD.quote_line_id
and AQL.item_type_code='SRV'
ORDER BY ALD.service_ref_line_id,AQL.inventory_item_id;
SELECT quote_line_id, quantity FROM aso_quote_lines_all
WHERE quote_header_id = p_quote_header_id and ITEM_TYPE_CODE='SVA'
ORDER BY quote_line_id;
SELECT quantity FROM aso_quote_lines_all
WHERE quote_line_id = p_quote_line_id;
SAVEPOINT UPDATE_SUPPORT_LEVEL_AND_QTY;
IBE_UTIL.debug('Need to update quantity');
IBE_UTIL.debug('No need to update quantity');
-- update quantities
IF l_line_qty_size>0 THEN
IF (IBE_UTIL.G_DEBUGON = FND_API.G_TRUE) THEN
IBE_UTIL.debug('updating quantities, l_line_rec_index='||l_line_rec_index);
l_quote_line_tbl(l_line_rec_index).operation_code := 'UPDATE';
IBE_UTIL.debug('quantities updated, l_line_rec_index='||l_line_rec_index);
IBE_UTIL.debug('no quantity updated, l_line_rec_index='||l_line_rec_index);
IBE_UTIL.debug('checking if need to update quantity...');
l_quote_line_id_tbl.DELETE(i);
l_line_quantity_tbl.DELETE(i);
IF l_deleted_svc_map_tbl IS NULL THEN
l_deleted_svc_map_tbl := JTF_VARCHAR2_TABLE_100();
l_deleted_svc_map_tbl.EXTEND;
l_deleted_svc_map_tbl(l_map_index) := 'DELETE';
IBE_UTIL.debug('populating l_deleted_svc_map_tbl table,l_map_index='||l_map_index);
l_deleted_svc_map_tbl(l_map_index) := 'KEEP'; -- keep the svc item
l_new_service_id_tbl.DELETE(i);
IBE_UTIL.debug('l_deleted_svc_map_tbl('||l_map_index||')='||l_deleted_svc_map_tbl(l_map_index));
IBE_UTIL.debug('applying l_deleted_svc_map_tbl table, service item='||rec_svc_line.inventory_item_id);
IBE_UTIL.debug('l_map_index='||l_map_index||', opcode='||l_deleted_svc_map_tbl(l_map_index));
IF l_deleted_svc_map_tbl(l_map_index) = 'DELETE' THEN
IF (IBE_UTIL.G_DEBUGON = FND_API.G_TRUE) THEN
IBE_UTIL.debug('deleting svc line, inventory_item_id='||rec_svc_line.inventory_item_id);
l_quote_line_tbl(l_line_rec_index).operation_code := 'DELETE';
IBE_UTIL.debug('svc line deleted, l_line_rec_index='||l_line_rec_index);
l_quote_line_id_tbl.DELETE(i);
l_line_quantity_tbl.DELETE(i);
IBE_UTIL.debug('nothing to update, returning...');
l_quote_header_rec.last_update_date := p_last_update_date;
,p_auto_update_active_quote => FND_API.G_FALSE
,p_combinesameitem => 1
,p_sharee_number => p_sharee_number
,p_sharee_party_id => l_sharee_party_id
,p_sharee_cust_account_id => l_sharee_cust_account_id
,p_minisite_id => p_minisite_id
,p_control_rec => l_control_rec
,p_qte_header_rec => l_quote_header_rec
,p_qte_line_tbl => l_quote_line_tbl
,p_qte_line_dtl_tbl => l_quote_line_dtl_tbl
,p_save_type => p_save_type
,x_quote_header_id => l_quote_header_id
,x_last_update_date => x_last_update_date
,x_return_status => x_return_status
,x_msg_count => x_msg_count
,x_msg_data => x_msg_data);
IBE_UTIL.debug('x_last_update_date='||x_last_update_date);
ROLLBACK TO UPDATE_SUPPORT_LEVEL_AND_QTY;
ROLLBACK TO UPDATE_SUPPORT_LEVEL_AND_QTY;
ROLLBACK TO UPDATE_SUPPORT_LEVEL_AND_QTY;
END UPDATE_SUPPORT_AND_QUANTITY;