The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT khr.pdt_id,
chrb.contract_number,
khr.id,
chrb.scs_code, -- rmunjulu 4622198
chrb.org_id --added by akrangan to get the org_id of the contract
FROM okc_k_headers_b chrb,
okl_k_headers khr,
okc_k_lines_b okc
WHERE okc.id = p_kle_id
AND khr.id = chrb.id
AND okc.chr_id = chrb.id;
SELECT attribute_category,
attribute1,
attribute2,
attribute3,
attribute4,
attribute5,
attribute6,
attribute7,
attribute8,
attribute9,
attribute10,
attribute11,
attribute12,
attribute13,
attribute14,
attribute15
FROM okl_k_headers okl
WHERE okl.id = p_khr_id;
SELECT attribute_category,
attribute1,
attribute2,
attribute3,
attribute4,
attribute5,
attribute6,
attribute7,
attribute8,
attribute9,
attribute10,
attribute11,
attribute12,
attribute13,
attribute14,
attribute15
FROM okl_k_lines okl
WHERE okl.id = p_kle_id;
SELECT NAME,
tax_owner
FROM okl_product_parameters_v
WHERE id = p_pdt_id;
okl_trx_contracts_pub.update_trx_contracts(
p_api_version => p_api_version,
p_init_msg_list => p_init_msg_list,
x_return_status => l_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_tcnv_rec => l_tcnv_rec,
p_tclv_tbl => l_tclv_tbl,
x_tcnv_rec => lx_tcnv_rec,
x_tclv_tbl => lx_tclv_tbl
);
l_asset_dist_tbl.DELETE;
l_asset_dist_tbl.DELETE;
l_asset_dist_tbl.DELETE;
SELECT o.asset_id, o.asset_number, o.corporate_book, a.cost, o.depreciation_category, a.original_cost, o.current_units,
o.dnz_chr_id ,a.book_type_code, b.book_class, prorate_convention_code
FROM okx_asset_lines_v o, fa_books a, fa_book_controls b
WHERE o.parent_line_id = p_financial_asset_id
AND o.asset_id = a.asset_id
AND a.book_type_code = b.book_type_code
AND a.date_ineffective IS NULL
AND a.transaction_header_id_out IS NULL
ORDER BY book_class;
SELECT cost_retired
FROM fa_retirements
WHERE asset_id = p_asset_id
AND book_type_code = p_book_type_code
ORDER BY last_update_date DESC;
SELECT distribution_id, units_assigned, retirement_id, transaction_units
FROM fa_distribution_history
WHERE asset_id = p_asset_id
AND book_type_code = p_book_type_code
AND date_ineffective IS NULL
AND transaction_header_id_out IS NULL
-- AND retirement_id IS NULL
ORDER BY last_update_date;
SELECT h.id
FROM OKL_TRX_ASSETS h, okl_txl_assets_v l
WHERE h.id = l.tas_id
AND h.tsu_code IN ('ENTERED', 'ERROR')
AND l.kle_id = p_financial_asset_id;
SELECT cii.instance_id instance_id, cii.active_end_date instance_end_date
FROM okc_k_headers_b okhv,
okc_k_lines_b kle_fa,
okc_k_lines_tl klet_fa,
okc_line_styles_b lse_fa,
okc_k_lines_b kle_il,
okc_line_styles_b lse_il,
okc_k_lines_b kle_ib,
okc_line_styles_b lse_ib,
okc_k_items ite,
csi_item_instances cii
WHERE kle_fa.id = klet_fa.id
AND klet_fa.language = USERENV('LANG')
AND kle_fa.chr_id = okhv.id AND lse_fa.id = kle_fa.lse_id
AND lse_fa.lty_code = 'FREE_FORM1'
AND kle_il.cle_id = kle_fa.id
AND lse_il.id = kle_il.lse_id
AND lse_il.lty_code = 'FREE_FORM2'
AND kle_ib.cle_id = kle_il.id
AND lse_ib.id = kle_ib.lse_id
AND lse_ib.lty_code = 'INST_ITEM'
AND ite.cle_id = kle_ib.id
AND ite.jtot_object1_code = 'OKX_IB_ITEM'
AND cii.instance_id = ite.object1_id1
AND kle_fa.id = p_financial_asset_id;
SELECT count(*)
FROM fa_transaction_headers th
WHERE th.asset_id = p_asset_id
AND th.book_type_code = p_book_type_code
AND th.transaction_type_code = 'ADDITION'
AND th.date_effective > p_period_open_date;
SELECT fiscal_year_name
FROM fa_book_controls
WHERE book_type_code = p_book_type_code;
SELECT 'x'
FROM okc_k_lines_b cle, okc_line_styles_b lse
WHERE cle.lse_id = lse.id
AND lse.lty_code = 'FREE_FORM1'
AND cle.id = p_financial_asset_id;
SELECT lkhr.id, lkhr.deal_type, khr.contract_number
FROM okl_k_headers lkhr, okc_k_lines_b cle, okc_k_headers_b khr
WHERE khr.id = cle.chr_id
AND lkhr.id = khr.id
AND cle.id = p_financial_asset_id;
SELECT name, NVL(residual_value,0) -- girao Bug 4106216 NVL the residual value
FROM okl_k_lines_full_v
WHERE id = p_fin_asset_id;
SELECT h.tsu_code, h.tas_type, h.date_trans_occurred, l.dnz_asset_id,
l.asset_number, l.kle_id ,l.DNZ_KHR_ID
FROM OKL_TRX_ASSETS h, OKL_TXL_ASSETS_B l
WHERE h.id = l.tas_id
AND h.date_trans_occurred <= cp_trx_date
AND h.tas_type in ('AMT','AUD','AUS')
AND l.asset_number = cp_asset_number
AND l.kle_id = cp_kle_id;
SELECT SYSDATE INTO l_sys_date FROM DUAL;
l_delta_cost := 0; -- no cost update required, as cost has already been updated thru off lease trx
OKL_TRX_ASSETS_PUB.update_trx_ass_h_def(
p_api_version => p_api_version,
p_init_msg_list => OKC_API.G_FALSE,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_thpv_rec => lp_thpv_rec,
x_thpv_rec => lx_thpv_rec);
OKL_TXL_ASSETS_PUB.update_txl_asset_Def(
p_api_version => p_api_version,
p_init_msg_list => OKC_API.G_FALSE,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_tlpv_rec => lp_tlpv_rec,
x_tlpv_rec => lx_tlpv_rec);
OKL_TRX_ASSETS_PUB.update_trx_ass_h_def(
p_api_version => p_api_version,
p_init_msg_list => OKC_API.G_FALSE,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_thpv_rec => lp_thpv_rec,
x_thpv_rec => lx_thpv_rec);
SELECT order_number
FROM oe_order_headers_all
WHERE header_id = p_header_id;
SELECT header_id, inventory_item_id, nvl(ordered_quantity,1) ordered_quantity, ship_from_org_id, unit_selling_price
FROM oe_order_lines_all
WHERE line_id = p_line_id;
SELECT kle.id kle_id,
cim.number_of_items quantity,
-- RRAVIKIR Legal Entity changes
oar.legal_entity_id
-- Legal Entity changes End
FROM okc_k_lines_b kle,
okc_k_headers_all_b okc,
okl_asset_returns_all_b oar,
mtl_system_items_b msi,
okc_k_lines_b kle2,
okc_line_styles_b lse,
okc_k_items cim,
okl_system_params osp
WHERE okc.id = kle.chr_id
AND oar.kle_id = kle.id
AND oar.imr_id = msi.inventory_item_id
AND msi.organization_id = osp.remk_organization_id
AND kle.id = kle2.cle_id
AND kle2.lse_id = lse.id
AND lse.lty_code = 'ITEM'
AND kle2.id = cim.cle_id
AND oar.imr_id = p_inventory_item_id;
SELECT o.asset_id, o.asset_number, o.corporate_book, a.cost, o.depreciation_category, a.original_cost, o.current_units,
o.dnz_chr_id ,a.book_type_code, b.book_class, a.prorate_convention_code
FROM okx_asset_lines_v o, fa_books a, fa_book_controls b
WHERE o.parent_line_id = p_kle_id
AND o.asset_id = a.asset_id
AND a.book_type_code = b.book_type_code
AND a.date_ineffective IS NULL
AND a.transaction_header_id_out IS NULL
ORDER BY book_class;
SELECT cost_retired
FROM fa_retirements
WHERE asset_id = p_asset_id
AND book_type_code = p_book_type_code
ORDER BY last_update_date DESC;
SELECT distribution_id, units_assigned, retirement_id, transaction_units
FROM fa_distribution_history
WHERE asset_id = p_asset_id
AND book_type_code = p_book_type_code
AND date_ineffective IS NULL
AND transaction_header_id_out IS NULL
--AND retirement_id IS NULL
ORDER BY last_update_date;
SELECT h.id
FROM OKL_TRX_ASSETS h, okl_txl_assets_v l
WHERE h.id = l.tas_id
AND h.tsu_code IN ('ENTERED', 'ERROR')
AND l.kle_id = p_financial_asset_id;
SELECT cii.instance_id instance_id, cii.active_end_date instance_end_date
FROM okc_k_headers_b okhv,
okc_k_lines_b kle_fa,
okc_k_lines_tl klet_fa,
okc_line_styles_b lse_fa,
okc_k_lines_b kle_il,
okc_line_styles_b lse_il,
okc_k_lines_b kle_ib,
okc_line_styles_b lse_ib,
okc_k_items ite,
csi_item_instances cii
WHERE kle_fa.id = klet_fa.id
AND klet_fa.language = USERENV('LANG')
AND kle_fa.chr_id = okhv.id AND lse_fa.id = kle_fa.lse_id
AND lse_fa.lty_code = 'FREE_FORM1'
AND kle_il.cle_id = kle_fa.id
AND lse_il.id = kle_il.lse_id
AND lse_il.lty_code = 'FREE_FORM2'
AND kle_ib.cle_id = kle_il.id
AND lse_ib.id = kle_ib.lse_id
AND lse_ib.lty_code = 'INST_ITEM'
AND ite.cle_id = kle_ib.id
AND ite.jtot_object1_code = 'OKX_IB_ITEM'
AND cii.instance_id = ite.object1_id1
AND kle_fa.id = p_financial_asset_id;
SELECT count(*)
FROM fa_transaction_headers th
WHERE th.asset_id = p_asset_id
AND th.book_type_code = p_book_type_code
AND th.transaction_type_code = 'ADDITION'
AND th.date_effective > p_period_open_date;
SELECT fiscal_year_name
FROM fa_book_controls
WHERE book_type_code = p_book_type_code;
SELECT lkhr.id, lkhr.deal_type, khr.contract_number
FROM okl_k_headers lkhr, okc_k_lines_b cle, okc_k_headers_b khr
WHERE khr.id = cle.chr_id
AND lkhr.id = khr.id
AND cle.id = p_financial_asset_id;
SELECT name, NVL(residual_value,0) --girao bug 4106216 NVL the residual value
FROM okl_k_lines_full_v
WHERE id = p_fin_asset_id;
SELECT h.tsu_code, h.tas_type, h.date_trans_occurred, l.dnz_asset_id,
l.asset_number, l.kle_id ,l.DNZ_KHR_ID
FROM OKL_TRX_ASSETS h, OKL_TXL_ASSETS_B l
WHERE h.id = l.tas_id
AND h.date_trans_occurred <= cp_trx_date
AND h.tas_type in ('AMT','AUD','AUS')
AND l.asset_number = cp_asset_number
AND l.kle_id = cp_kle_id;
SELECT SYSDATE INTO l_sys_date FROM DUAL;
l_delta_cost := 0; -- no cost update required, as cost has already been updated thru off lease trx
OKL_TRX_ASSETS_PUB.update_trx_ass_h_def(
p_api_version => p_api_version,
p_init_msg_list => OKC_API.G_FALSE,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_thpv_rec => lp_thpv_rec,
x_thpv_rec => lx_thpv_rec);
OKL_TXL_ASSETS_PUB.update_txl_asset_Def(
p_api_version => p_api_version,
p_init_msg_list => OKC_API.G_FALSE,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_tlpv_rec => lp_tlpv_rec,
x_tlpv_rec => lx_tlpv_rec);
OKL_TRX_ASSETS_PUB.update_trx_ass_h_def(
p_api_version => p_api_version,
p_init_msg_list => OKC_API.G_FALSE,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_thpv_rec => lp_thpv_rec,
x_thpv_rec => lx_thpv_rec);
SELECT 'x'
FROM fa_retirements
WHERE retirement_id = p_retirement_id;