The following lines contain the word 'select', 'insert', 'update' or 'delete':
x_header_rec.operation := OE_GLOBALS.G_OPR_UPDATE;
, x_last_update_date OUT NOCOPY DATE
, x_last_updated_by OUT NOCOPY NUMBER
, x_last_update_login OUT NOCOPY NUMBER
, x_order_number OUT NOCOPY NUMBER
, x_lock_control OUT NOCOPY NUMBER
, x_quote_number OUT NOCOPY NUMBER
,x_shipping_method_code OUT NOCOPY VARCHAR2 --4159701
, x_freight_carrier_code OUT NOCOPY VARCHAR2 --4159701
, x_shipping_method OUT NOCOPY VARCHAR2--4159701
, x_freight_carrier OUT NOCOPY VARCHAR2 --4159701
, x_freight_terms_code OUT NOCOPY VARCHAR2 --4348011
, x_freight_terms OUT NOCOPY VARCHAR2
, x_payment_term_id OUT NOCOPY NUMBER
, x_payment_term OUT NOCOPY VARCHAR2
)
IS
l_x_old_header_rec OE_Order_PUB.Header_Rec_Type;
l_x_header_rec.operation := OE_GLOBALS.G_OPR_UPDATE;
x_last_update_date := l_x_header_rec.last_update_date;
x_last_updated_by := l_x_header_rec.last_updated_by;
x_last_update_login := l_x_header_rec.last_update_login;
PROCEDURE Delete_Row
( x_return_status OUT NOCOPY VARCHAR2
, x_msg_count OUT NOCOPY NUMBER
, x_msg_data OUT NOCOPY VARCHAR2
, p_header_id IN NUMBER
)
IS
l_x_old_header_rec OE_Order_PUB.Header_Rec_Type;
SAVEPOINT Header_Delete;
oe_debug_pub.add('Entering OE_OE_FORM_HEADER.DELETE_ROW', 1);
l_x_header_rec.operation := OE_GLOBALS.G_OPR_DELETE;
oe_debug_pub.add('Exiting OE_OE_FORM_HEADER.DELETE_ROW', 1);
ROLLBACK TO SAVEPOINT Header_Delete ;
ROLLBACK TO SAVEPOINT Header_Delete ;
ROLLBACK TO SAVEPOINT Header_Delete ;
, 'Delete_Row'
);
END Delete_Row;
OE_DELAYED_REQUESTS_PVT.Delete_Reqs_for_Deleted_Entity(
p_entity_code => OE_GLOBALS.G_ENTITY_HEADER
,p_entity_id => p_header_id
,x_return_status => l_return_status);
Procedure Delete_All_Requests
( x_return_status OUT NOCOPY VARCHAR2
, x_msg_count OUT NOCOPY NUMBER
, x_msg_data OUT NOCOPY VARCHAR2
)
IS
l_return_status Varchar2(30);
, 'Delete_All_Requests'
);
END Delete_All_Requests;
Select count(sales_credit_id)
from oe_sales_credits sc,
oe_sales_credit_types sct
where header_id = p_header_id
and sct.sales_Credit_type_id = sc.sales_credit_type_id
and sct.quota_flag = 'Y'
and line_id is null;
SELECT id_flex_num
FROM fnd_id_flex_structures
WHERE id_flex_code = X_Id_Flex_Code;
SELECT meaning,lookup_type
FROM AR_LOOKUPS
WHERE (lookup_code=fob_point_code
AND lookup_type='FOB')
OR (lookup_code=tax_exempt_flag
AND lookup_type='TAX_CONTROL_FLAG')
OR (lookup_code=tax_exempt_reason_code
AND lookup_type='TAX_REASON')
OR (lookup_code=return_reason_code
AND lookup_type='CREDIT_MEMO_REASON')
OR (lookup_code=tax_point_code
AND lookup_type='TAX_POINT_TYPE');
SELECT meaning,lookup_type
FROM FND_LOOKUP_VALUES LV
WHERE LANGUAGE = userenv('LANG')
and VIEW_APPLICATION_ID = 660
and((lookup_code= shipment_priority_code
and lookup_type='SHIPMENT_PRIORITY')
or (lookup_code=freight_terms_code
and lookup_type='FREIGHT_TERMS')
or (lookup_code=payment_type_code
and lookup_type='PAYMENT TYPE')
or (lookup_code=flow_status_code
and lookup_type='FLOW_STATUS')
--or (lookup_code=credit_card_code --R12 CC Encryption
--and lookup_type='CREDIT_CARD')
or (lookup_code=sales_channel_code
and lookup_type='SALES_CHANNEL'))
and security_group_id =fnd_global.Lookup_Security_Group(lv.lookup_type,lv.view_application_id);
SELECT Name
INTO x_header_val_rec.salesrep
FROM ra_salesreps
WHERE salesrep_id=p_header_rec_type.salesrep_id
AND org_id=p_header_rec_type.org_id;
Select phone_area_code,phone_number,phone_extension,phone_country_code
Into x_header_val_rec.phone_area_code,x_header_val_rec.phone_number,
x_header_val_rec.phone_extension,x_header_val_rec.phone_country_code
From hz_contact_points
Where contact_point_id=p_header_rec_type.sold_to_phone_id;
Select meaning
INTO x_header_val_rec.shipping_method
FROM oe_ship_methods_v
WHERE lookup_code =p_header_rec_type.shipping_method_code ;
Select description
INTO x_header_val_rec.freight_carrier
FROM org_freight
WHERE freight_code=p_header_rec_type.freight_carrier_code
and organization_id = p_header_rec_type.ship_from_org_id;
SELECT 'Y'
INTO x_header_val_rec.hold_exists_flag
FROM OE_ORDER_HOLDS
WHERE HEADER_ID = p_header_rec_type.header_id
AND RELEASED_FLAG = 'N';
SELECT 'Y'
INTO x_header_val_rec.Messages_exists_flag
FROM OE_PROCESSING_MSGS
WHERE header_id = p_header_rec_type.header_id
AND NVL(message_status_code, '0') <> 'CLOSED' --datafix_begin_end
AND rownum < 2;
select meaning
into x_header_val_rec.order_date_type
from oe_lookups
where lookup_type = 'REQUEST_DATE_TYPE'
AND lookup_code=p_header_rec_type.order_date_type_code;
select meaning
into x_header_val_rec.demand_class
from oe_fnd_common_lookups_v
where lookup_type = 'DEMAND_CLASS'
AND lookup_code=p_header_rec_type.demand_class_code;
SELECT /* MOAC_SQL_CHANGE */ cas.cust_account_id,
party.party_name,
cust.account_number,
site.location,
addr.address1,
addr.address2,
addr.address3,
addr.address4,
DECODE(addr.city, NULL, NULL,addr.city || ', ') ||
DECODE(addr.state, NULL, addr.province || ', ', addr.state || ', ') || -- 3603600
DECODE(addr.postal_code, NULL, NULL,addr.postal_code || ', ') ||
DECODE(addr.country, NULL, NULL,addr.country)
INTO x_header_val_rec.deliver_to_customer_id,
x_header_val_rec.deliver_to_customer_name,
x_header_val_rec.deliver_to_customer_number,
x_header_val_rec.deliver_to,
x_header_val_rec.deliver_to_address1,
x_header_val_rec.deliver_to_address2,
x_header_val_rec.deliver_to_address3,
x_header_val_rec.deliver_to_address4,
x_header_val_rec.deliver_to_address5
FROM HZ_CUST_SITE_USES_ALL site,
HZ_CUST_ACCT_SITES_ALL cas,
hz_cust_accounts cust,
hz_parties party,
hz_party_sites ps,
hz_locations addr
WHERE site.cust_acct_site_id = cas.cust_acct_site_id
AND site.site_use_code='DELIVER_TO'
AND site.site_use_id=p_header_rec_type.deliver_to_org_id
AND cust.cust_account_id = cas.cust_account_id
AND party.party_id = cust.party_id
AND cas.party_site_id = ps.party_site_id
AND ps.location_id = addr.location_id;
select name
into x_header_val_rec.deliver_to_contact
from oe_contacts_v
where contact_id=p_header_rec_type.deliver_to_contact_id;
select name||' : '||revision
into x_header_val_rec.agreement
from oe_agreements
where agreement_id=p_header_rec_type.agreement_id;
select name
into x_header_val_rec.order_source
from oe_order_sources
where order_source_id=p_header_rec_type.order_source_id;
select name
into x_header_val_rec.source_document_type
from oe_order_sources
where order_source_id=p_header_rec_type.source_document_type_id;
select user_conversion_type
into x_header_val_rec.conversion_type
from gl_daily_conversion_types
where conversion_type=p_header_rec_type.conversion_type_code;
select meaning into x_header_val_rec.ib_owner_dsp
from oe_lookups
where lookup_type='ITEM_OWNER' and lookup_code=p_header_rec_type.ib_owner;
select meaning into x_header_val_rec.ib_installed_at_location_dsp
from oe_lookups
where lookup_type='ITEM_INSTALL_LOCATION' and lookup_code=p_header_rec_type.ib_installed_at_location;
select meaning into x_header_val_rec.ib_current_location_dsp
from oe_lookups
where lookup_type='ITEM_CURRENT_LOCATION' and lookup_code=p_header_rec_type.ib_current_location;
SELECT NVL(SUM(NVL(commitment_applied_amount, 0)), 0)
INTO l_commitment_amount
FROM oe_payments
WHERE header_id = p_header_rec_type.header_id;
SELECT
CREDIT_CARD_CODE
,CREDIT_CARD_HOLDER_NAME
,CREDIT_CARD_NUMBER
,CREDIT_CARD_EXPIRATION_DATE
,CREDIT_CARD_APPROVAL_CODE
,CREDIT_CARD_APPROVAL_DATE
into
l_credit_card_code,
l_credit_card_holder_name,
l_credit_card_number,
l_credit_card_expiration_date,
l_credit_card_approval_code ,
l_credit_card_approval_date
FROM OE_ORDER_HEADERS_ALL
WHERE HEADER_ID = p_header_rec_type.header_id;
SELECT trxn_extension_id
INTO l_trxn_extension_id
FROM oe_payments
WHERE header_id = p_header_rec_type.header_id
AND nvl(payment_collection_event,'PREPAY') = 'INVOICE'
AND payment_type_code = 'CREDIT_CARD'
AND line_id is null;
SELECT SET_OF_BOOKS_ID
, CURRENCY_CODE
INTO g_set_of_books_rec.set_of_books_id
, g_set_of_books_rec.currency_code
FROM OE_GL_SETS_OF_BOOKS_V
WHERE SET_OF_BOOKS_ID = l_set_of_books_id;
SELECT /* MOAC_SQL_CHANGE */ cas.cust_account_id
INTO x_invoice_to_customer_id
FROM HZ_CUST_SITE_USES_ALL site,
HZ_CUST_ACCT_SITES_ALL cas
WHERE site.cust_acct_site_id = cas.cust_acct_site_id
AND site.site_use_code=l_site_use_code
AND site.site_use_id=p_site_use_id;
SELECT /* MOAC_SQL_CHANGE */ cas.cust_account_id
INTO x_ship_to_customer_id
FROM HZ_CUST_SITE_USES_ALL site,
HZ_CUST_ACCT_SITES_ALL cas
WHERE site.cust_acct_site_id = cas.cust_acct_site_id
AND site.site_use_code=l_site_use_code
AND site.site_use_id=p_site_use_id;
SELECT nvl(gsa_indicator_flag,'N')
INTO x_gsa_indicator
FROM hz_parties party,
hz_cust_accounts acct
WHERE acct.cust_account_id=p_sold_to_org_id
AND party.party_id = acct.party_id;
l_x_line_tbl(i).operation:= OE_GLOBALS.G_OPR_UPDATE;
select /* MOAC_SQL_CHANGE */ cust.cust_account_id,
party.party_name,
cust.account_number
INTO x_customer_id,
x_customer_name,
x_customer_number
from
hz_cust_site_uses_all site,
hz_cust_acct_sites_all cas,
hz_cust_accounts cust,
hz_parties party
where site.site_use_code = p_site_use_code
and site_use_id = p_site_use_id
and site.cust_acct_site_id = cas.cust_acct_site_id
and cas.cust_account_id = cust.cust_account_id
and cust.party_id=party.party_id;
p_agreement_rec.last_update_date := sysdate;
p_agreement_rec.last_updated_by := FND_GLOBAL.USER_ID;
select phone_format_style,area_code_size
from hz_phone_formats
where territory_code=l_territory_code;
SELECT COUNT(bug_id)
INTO l_bug_count
FROM ad_bugs where bug_number IN ('2116159','2239222','2488745');
select customer_id into l_customer_id
from fnd_user
where user_id = l_user_id;
select 1 into l_dummy
from hz_parties
where party_id = l_customer_id;
select default_country into l_user_territory_code
from ar_system_parameters;
select Count(territory_code)
into l_count
from hz_phone_formats
where territory_code=l_user_territory_code
and area_code_size=length(p_area_code);
select Count(territory_code)
into l_count
from hz_phone_formats
where territory_code=l_user_territory_code
and area_code_size=0;
select Count(territory_code)
into l_total_count
from hz_phone_formats
where territory_code=l_user_territory_code;
l_sql_stmt := 'SELECT Count(territory_code)'||
' FROM hz_phone_country_codes'||
' where territory_code=:1 and'||
' NVL(area_code_length,length(:2))=length(:3)';
l_sql_stmt:='SELECT area_code_length'||
' FROM hz_phone_country_codes'||
' WHERE territory_code=:l_territory_code';
l_sql_stmt:='SELECT phone_length-NVL(AREA_CODE_LENGTH,0)'||
' FROM hz_phone_country_codes'||
' where territory_code=:l_user_territory_code';
l_sql_stmt:='SELECT phone_length - NVL(area_code_length,0)'||
' FROM hz_phone_country_codes'||
' WHERE territory_code=:l_territory_code';
ELSIF l_header_rec.operation = OE_GLOBALS.G_OPR_UPDATE then
l_operation := OE_PC_GLOBALS.UPDATE_OP;
FUNCTION Get_Opr_Update
----------------------------------------------------------
RETURN varchar2
IS
BEGIN
RETURN OE_GLOBALS.G_OPR_UPDATE;
Select enabled_flag from oe_lookups where lookup_type=p_lookup_type1 and lookup_code=p_lookup_code1;