The following lines contain the word 'select', 'insert', 'update' or 'delete':
PROCEDURE Update_Status_Lost(
itemtype in varchar2,
itemkey in varchar2,
actid in number,
funcmode in varchar2,
resultout in out nocopy varchar2)
IS
--
l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
oe_debug_pub.add( 'ENTERING OE_Negotiate_WF.Update_Status_Lost:'||ITEMTYPE||'/'||ITEMKEY ,1 ) ;
OE_ORDER_WF_UTIL.Update_Quote_Blanket( p_item_type => OE_GLOBALS.G_WFI_NGO,
p_item_key => itemkey,
p_flow_status_code => 'LOST',
p_open_flag => 'N',
x_return_status => l_return_status);
wf_core.context('OE_Negotiate_WF', 'Update_Status_Lost', itemtype, itemkey, to_char(actid), funcmode);
END Update_Status_Lost;
SELECT item_type_code, ordered_quantity
FROM oe_order_lines_all
WHERE header_id = to_number(itemkey);
OE_ORDER_WF_UTIL.Update_Quote_Blanket(p_item_type => OE_GLOBALS.G_WFI_NGO,
p_item_key => itemkey,
p_flow_status_code => 'DRAFT_SUBMITTED',
p_draft_submitted_flag => 'Y',
x_return_status => l_return_status);
oe_debug_pub.add('Submit_Draft_Internal: Finish calling Update Draft Submitted status: ' || l_return_status, 1);
OE_ORDER_WF_UTIL.Update_Quote_Blanket(p_item_type => OE_GLOBALS.G_WFI_NGO,
p_item_key => itemkey,
p_flow_status_code => 'PENDING_CUSTOMER_ACCEPTANCE',
x_return_status => l_return_status);
PROCEDURE Update_Customer_Accepted(
itemtype in varchar2,
itemkey in varchar2,
actid in number,
funcmode in varchar2,
resultout in out nocopy varchar2)
IS
--
l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
oe_debug_pub.add( 'ENTERING OE_Negotiate_WF.Update_Customer_Accepted:'||ITEMTYPE||'/'||ITEMKEY ,1 ) ;
OE_ORDER_WF_UTIL.Update_Quote_Blanket(p_item_type => OE_GLOBALS.G_WFI_NGO,
p_item_key => itemkey,
p_flow_status_code => 'CUSTOMER_ACCEPTED',
x_return_status => l_return_status);
wf_core.context('OE_Negotiate_WF', 'Update_Customer_Accepted', itemtype, itemkey, to_char(actid), funcmode);
END Update_Customer_Accepted;
PROCEDURE Update_Customer_Rejected(
itemtype in varchar2,
itemkey in varchar2,
actid in number,
funcmode in varchar2,
resultout in out nocopy varchar2)
IS
--
l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
oe_debug_pub.add( 'ENTERING OE_Negotiate_WF.Update_Customer_Rejected:'||ITEMTYPE||'/'||ITEMKEY ,1 ) ;
OE_ORDER_WF_UTIL.Update_Quote_Blanket(p_item_type => OE_GLOBALS.G_WFI_NGO,
p_item_key => itemkey,
p_flow_status_code => 'DRAFT_CUSTOMER_REJECTED',
p_draft_submitted_flag => 'N',
x_return_status => l_return_status);
wf_core.context('OE_Negotiate_WF', 'Update_Customer_Rejected', itemtype, itemkey, to_char(actid), funcmode);
END Update_Customer_Rejected;
select expiration_date
into l_expiration_date
from oe_order_headers_all
where header_id = to_number(itemkey);
select expiration_date
into l_expiration_date
from oe_blanket_headers_all
where header_id = to_number(itemkey);
OE_ORDER_WF_UTIL.Update_Quote_Blanket(p_item_type => OE_GLOBALS.G_WFI_NGO,
p_item_key => itemkey,
p_flow_status_code => 'OFFER_EXPIRED',
p_open_flag => 'N',
x_return_status => l_return_status);
select sold_to_org_id, expiration_date, salesrep_id
into l_sold_to_org_id, l_expiration_date, l_salesrep_id
from oe_order_headers_all
where header_id = to_number(itemkey);
select sold_to_org_id, expiration_date, salesrep_id
into l_sold_to_org_id, l_expiration_date, l_salesrep_id
from oe_blanket_headers_all
where header_id = to_number(itemkey);
SELECT item_key, item_type
INTO l_item_key, l_item_type --l_header_id AME ER
FROM wf_item_activity_statuses
WHERE notification_id = TO_NUMBER (document_id);
oe_debug_pub.ADD ('item key selected is:' || l_item_key);
SELECT item_key, item_type
INTO l_item_key, l_item_type -- l_header_id AME ER
FROM wf_item_activity_statuses_h
WHERE notification_id = TO_NUMBER (document_id);
SELECT order_number
INTO l_blanket_number
FROM oe_blanket_headers_all
WHERE header_id = l_header_id;
SELECT oh.order_number, oh.order_type_id,
t.NAME
INTO l_quote_number, l_transaction_type_id,
l_transaction_type_name
FROM oe_order_headers_all oh, oe_transaction_types_tl t
WHERE header_id = l_header_id
AND t.LANGUAGE = USERENV ('LANG')
AND t.transaction_type_id = oh.order_type_id;
select wpa.activity_name
into l_activity_name
from wf_item_activity_statuses wias, wf_process_activities wpa
where item_type = OE_GLOBALS.G_WFI_NGO
and item_key = to_char(p_header_id)
and activity_status = wf_engine.eng_notified
and wpa.activity_name in ('SUBMIT_DRAFT_ELIGIBLE', 'NEGOTIATION_COMPLETE_ELIGIBLE')
and wias.process_activity = wpa.instance_id;
select count(1)
into l_wf_item_count
from wf_items
where item_type = 'OENH'
and item_key = To_Char(p_header_id); -- Added to char function for bug 11793697
select count(1)
into l_so_count
from oe_order_headers_all
where header_id = p_header_id;
select count(1)
into l_bsa_count
from oe_blanket_headers_all
where header_id = p_header_id;
select wpa.activity_name
into l_activity_name
from wf_item_activity_statuses wias, wf_process_activities wpa
where item_type = OE_GLOBALS.G_WFI_NGO
and item_key = to_char(p_header_id)
and activity_status = wf_engine.eng_notified
and wpa.activity_name = l_customer_acceptance
and wias.process_activity = wpa.instance_id;
select wpa.activity_name
into l_activity_name
from wf_item_activity_statuses wias, wf_process_activities wpa
where item_type = OE_GLOBALS.G_WFI_NGO
and item_key = to_char(p_header_id)
and activity_status = wf_engine.eng_notified
and wpa.activity_name = l_customer_acceptance
and wias.process_activity = wpa.instance_id;
select wpa.activity_name
into l_activity_name
from wf_item_activity_statuses wias, wf_process_activities wpa
where item_type = OE_GLOBALS.G_WFI_NGO
and item_key = to_char(p_header_id)
and activity_status = wf_engine.eng_notified
and wpa.activity_name in ('WAIT_FOR_EXPIRATION', 'WAIT_FOR_FINAL_EXPIRATION')
and wias.process_activity = wpa.instance_id;
select count(1)
into l_wf_item_count
from wf_items
where item_type = 'OENH'
and item_key = to_char(p_header_id); -- Bug 9209740, p_header_id conversion to char.
select count(1)
into l_so_count
from oe_order_headers_all
where header_id = p_header_id;
select count(1)
into l_bsa_count
from oe_blanket_headers_all
where header_id = p_header_id;
select wpa.activity_name
into l_activity_name
from wf_item_activity_statuses wias, wf_process_activities wpa
where item_type = OE_GLOBALS.G_WFI_NGO
and item_key = to_char(p_header_id)
and activity_status = wf_engine.eng_notified
and wpa.activity_name = l_submit_draft_eligible
and wias.process_activity = wpa.instance_id;
select sold_to_org_id, expiration_date, salesrep_id
into l_sold_to_org_id, l_expiration_date, l_salesrep_id
from oe_order_headers_all
where header_id = p_header_id;
select sold_to_org_id, expiration_date, salesrep_id
into l_sold_to_org_id, l_expiration_date, l_salesrep_id
from oe_blanket_headers_all
where header_id = p_header_id;
select expiration_date
into l_expiration_date
from oe_order_headers_all
where header_id = to_number(itemkey);
select expiration_date
into l_expiration_date
from oe_blanket_headers_all
where header_id = to_number(itemkey);
select wpa.activity_name
into l_activity_name
from wf_item_activity_statuses wias, wf_process_activities wpa
where item_type = OE_GLOBALS.G_WFI_NGO
and item_key = to_char(p_header_id)
and activity_status = wf_engine.eng_notified
and wpa.activity_name = l_customer_acceptance
and wias.process_activity = wpa.instance_id;