The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT
OEOT.NAME
INTO L_ORDER_TYPE_LOW
FROM
OE_TRANSACTION_TYPES_TL OEOT
WHERE OEOT.TRANSACTION_TYPE_ID = P_ORDER_TYPE_LOW
AND OEOT.LANGUAGE = USERENV('LANG');
SELECT
OEOT.NAME
INTO L_ORDER_TYPE_HIGH
FROM
OE_TRANSACTION_TYPES_TL OEOT
WHERE OEOT.TRANSACTION_TYPE_ID = P_ORDER_TYPE_HIGH
AND OEOT.LANGUAGE = USERENV('LANG');
SELECT
OEOT.NAME
INTO L_ORDER_TYPE_LOW
FROM
OE_TRANSACTION_TYPES_TL OEOT
WHERE OEOT.TRANSACTION_TYPE_ID = P_ORDER_TYPE_LOW
AND OEOT.LANGUAGE = USERENV('LANG');
SELECT
OEOT.NAME
INTO L_ORDER_TYPE_HIGH
FROM
OE_TRANSACTION_TYPES_TL OEOT
WHERE OEOT.TRANSACTION_TYPE_ID = P_ORDER_TYPE_HIGH
AND OEOT.LANGUAGE = USERENV('LANG');
SELECT
MEANING
INTO L_TEMP
FROM
OE_LOOKUPS
WHERE LOOKUP_TYPE = 'OEXOEIOD ORDER BY'
AND SUBSTR(LOOKUP_CODE
,1
,1) = SUBSTR(UPPER(P_ORDER_BY)
,1
,1);
SELECT
1
INTO L_COUNT
FROM
OE_ORDER_LINES_ALL L,
RA_CUSTOMER_TRX_LINES_ALL TRXL,
OE_ORDER_HEADERS H
WHERE L.HEADER_ID = C_LINE_COUNTFORMULA.HEADER_ID1
AND H.HEADER_ID = L.HEADER_ID
AND TRXL.INTERFACE_LINE_CONTEXT = P_INVOICE_LINE_CONTEXT
AND TRXL.INTERFACE_LINE_ATTRIBUTE1 = H.ORDER_NUMBER
AND TO_CHAR(L.LINE_ID) = TRXL.INTERFACE_LINE_ATTRIBUTE6
AND NVL(L.ORG_ID
,0) = NVL(LP_ORG_ID
,0)
AND NVL(TRXL.ORG_ID
,0) = NVL(LP_ORG_ID
,0)
AND ROWNUM = 1;
SELECT
PRECISION
INTO L_PRECISION
FROM
FND_CURRENCIES
WHERE CURRENCY_CODE = L_CURRENCY;
SELECT
MEANING
INTO L_TEMP
FROM
FND_LOOKUPS
WHERE LOOKUP_CODE = P_USE_FUNCTIONAL_CURRENCY
AND LOOKUP_TYPE = 'YES_NO';
SELECT
PRECISION
INTO L_PRECISION
FROM
FND_CURRENCIES
WHERE CURRENCY_CODE = L_CURRENCY;
SELECT
MEANING
INTO L_MEANING
FROM
OE_LOOKUPS
WHERE LOOKUP_TYPE = 'REPORT_ORDER_CATEGORY'
AND LOOKUP_CODE = P_ORDER_CATEGORY;
SELECT
MEANING
INTO L_MEANING
FROM
OE_LOOKUPS
WHERE LOOKUP_TYPE = 'REPORT_LINE_DISPLAY'
AND LOOKUP_CODE = P_LINE_CATEGORY;
SELECT
NVL(OE_SYS_PARAMETERS.VALUE('MASTER_ORGANIZATION_ID'
,MO_GLOBAL.GET_CURRENT_ORG_ID)
,0)
INTO V_MASTER_ORG
FROM
DUAL;
SELECT
PRECISION
INTO W_PRECISION
FROM
FND_CURRENCIES
WHERE CURRENCY_CODE = CURRENCY1;
SELECT COUNT(*) INTO COUNT_OE_ORDER_HEADERS FROM OE_ORDER_HEADERS;
SELECT COUNT(*) INTO COUNT_oe_order_lines_all FROM oe_order_lines_all;
SELECT COUNT(*) INTO COUNT_oe_transaction_types_tl FROM oe_transaction_types_tl;
SELECT COUNT(*) INTO COUNT_hz_cust_site_uses_all FROM hz_cust_site_uses_all;
SELECT COUNT(*) INTO COUNT_hz_cust_acct_sites_all FROM hz_cust_acct_sites_all;
SELECT COUNT(*) INTO COUNT_hz_party_sites FROM hz_party_sites;
SELECT COUNT(*) INTO COUNT_hz_locations FROM hz_locations;
SELECT COUNT(*) INTO COUNT_ra_salesreps_all FROM ra_salesreps_all;
SELECT COUNT(*) INTO COUNT_fnd_territories_vl FROM fnd_territories_vl;
SELECT COUNT(*) INTO COUNT_hz_parties FROM hz_parties;
SELECT COUNT(*) INTO COUNT_hz_cust_accounts FROM hz_cust_accounts;
SELECT sob.name ,
sob.currency_code
INTO
l_company_name ,
l_functional_currency
FROM gl_sets_of_books sob,
fnd_currencies cur
WHERE sob.set_of_books_id = p_sob_id
AND sob.currency_code = cur.currency_code
;
SELECT cp.user_concurrent_program_name
INTO l_report_name
FROM FND_CONCURRENT_PROGRAMS_VL cp,
FND_CONCURRENT_REQUESTS cr
WHERE cr.request_id = P_CONC_REQUEST_ID
AND cp.application_id = cr.program_application_id
AND cp.concurrent_program_id = cr.concurrent_program_id
;
MODE="SELECT"
DISPLAY="ALL"
TABLEALIAS="SI"
');
SELECT MEANING
INTO l_meaning
FROM OE_LOOKUPS
WHERE LOOKUP_TYPE = 'ITEM_DISPLAY_CODE'
AND LOOKUP_CODE = substr(upper(p_print_description),1,1)
;
SELECT MEANING
INTO l_meaning
FROM OE_LOOKUPS
WHERE LOOKUP_TYPE = 'ITEM_DISPLAY_CODE'
AND LOOKUP_CODE = substr(upper(p_print_description),1,1)
;
SELECT MEANING
INTO l_meaning
FROM FND_LOOKUPS
WHERE LOOKUP_TYPE = 'YES_NO'
AND LOOKUP_CODE = substr(upper(p_open_orders_only),1,1)
;
select sitems.description description
into v_description
from mtl_system_items_vl sitems
-- where sitems.customer_order_enabled_flag = 'Y'
-- and sitems.bom_item_type in (1,4)
where nvl(sitems.organization_id,0) = c_master_org
and sitems.inventory_item_id = ITEM_DSPFORMULA.inventory_item_id;
select citems.customer_item_number item,
nvl(citems.customer_item_desc,sitems.description) description
into v_item,v_description
from mtl_customer_items citems,
mtl_customer_item_xrefs cxref,
mtl_system_items_vl sitems
where citems.customer_item_id = cxref.customer_item_id
and cxref.inventory_item_id = sitems.inventory_item_id
and citems.customer_item_id = ordered_item_id
and nvl(sitems.organization_id,0) = c_master_org
and sitems.inventory_item_id = ITEM_DSPFORMULA.inventory_item_id;
select items.cross_reference item,
nvl(items.description,sitems.description) description
into v_item,v_description
from mtl_cross_reference_types xtypes,
mtl_cross_references items,
mtl_system_items_vl sitems
where xtypes.cross_reference_type = items.cross_reference_type
and items.inventory_item_id = sitems.inventory_item_id
and items.cross_reference = ordered_item
and items.cross_reference_type = item_identifier_type
and nvl(sitems.organization_id,0) = c_master_org
and sitems.inventory_item_id = ITEM_DSPFORMULA.inventory_item_id
--Bug 3433353 begin
and items.org_independent_flag = 'N'
and items.organization_id = c_master_org;
select items.cross_reference item,
nvl(items.description,sitems.description) description
into v_item,v_description
from mtl_cross_reference_types xtypes,
mtl_cross_references items,
mtl_system_items_vl sitems
where xtypes.cross_reference_type =
items.cross_reference_type
and items.inventory_item_id =
sitems.inventory_item_id
and items.cross_reference = ordered_item
and items.cross_reference_type = item_identifier_type
and nvl(sitems.organization_id,0) = c_master_org
and sitems.inventory_item_id = ITEM_DSPFORMULA.inventory_item_id
and items.org_independent_flag = 'Y';