The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT
batch_id, item_id, src_organization_id,
sr_instance_id, to_organization_id, to_sr_instance_id,
src_operating_unit, to_operating_unit,
sales_order_line_id, sales_order_number,
quantity, need_by_date, ship_date,
deliver_to_location_id, deliver_to_requestor_id, preparer_id,
uom_code, charge_account_id, group_code, item_revision,
project_id, task_id, end_item_number, load_type, firm_demand_flag,
ship_method, earliest_ship_date,plan_type,part_condition
FROM
MRP_ORG_TRANSFER_RELEASE
WHERE
transaction_id = l_transaction_id
ORDER BY src_operating_unit;
SELECT level_id, level_value
FROM fnd_profile_options opt,
fnd_profile_option_values opt_vals,
fnd_user_resp_groups user_resp
WHERE opt.profile_option_name = 'ORG_ID'
AND opt.profile_option_id = opt_vals.profile_option_id
AND opt_vals.profile_option_value = to_char(l_org_id)
AND opt_vals.level_id = 10003 -- responsibility level
AND user_resp.user_id = l_user_id
AND user_resp.responsibility_id = opt_vals.level_value
AND user_resp.responsibility_application_id = l_appl_id
AND rownum = 1;
SELECT ORDER_TYPE_ID
FROM PO_SYSTEM_PARAMETERS_ALL
WHERE nvl(ORG_ID,-1) = p_org_id;
select org.organization_id
from oe_invoice_to_orgs_v org, hz_parties hp, hz_cust_accounts hca
where org.customer_id=hca.cust_account_id
and hp.party_id = hca.party_id
and hca.cust_account_id = p_customer_id
and rownum < 2;
select org.organization_id
from oe_ship_to_orgs_v org, hz_parties hp, hz_cust_accounts hca
where org.customer_id = hca.cust_account_id
and hp.party_id = hca.party_id
and hca.cust_account_id = p_customer_id
and org.site_use_id = p_site_use_id
and rownum < 2;
select header_id from oe_order_headers_all
where order_number = p_order_number;
SELECT glsob.CURRENCY_CODE
FROM GL_SETS_OF_BOOKS GLSOB,
FINANCIALS_SYSTEM_PARAMS_ALL FSP
WHERE GLSOB.SET_OF_BOOKS_ID=FSP.SET_OF_BOOKS_ID
AND nvl(FSP.org_id,-1) = p_operating_unit;
e_update_rescheduling_err EXCEPTION;
lv_sql_query := 'select subinventory_code
from CSP_RS_SUBINVENTORIES_V
where organization_id = :l_organization_id
And condition_type = nvl(:l_condition_type,''G'')
And nvl(effective_date_end,to_date(:l_need_by_date)+1) > to_date(:l_need_by_date)
AND OWNER_RESOURCE_TYPE='||'''RS_EMPLOYEE'''||
'AND OWNER_FLAG='||'''Y'''||
'And rownum <2';
/* if it returns success Update the Internal Sales Order
with the Req header id and Req line Ids */
IF l_int_req_ret_sts = FND_API.G_RET_STS_SUCCESS THEN
/* For Security */
IF l_prev_src_org_id <> l_org_trans_rel_cur.src_operating_unit THEN
l_prev_src_org_id := l_org_trans_rel_cur.src_operating_unit;
l_oe_header_rec.operation := OE_GLOBALS.G_OPR_UPDATE;
l_oe_line_rec.operation := OE_GLOBALS.G_OPR_UPDATE;
lv_action_req_Tbl.delete;
OE_SCHEDULE_GRP.Update_Scheduling_Results(p_x_sch_tbl => l_sch_rec_tbl,
p_request_id => l_request_id,
x_return_status => l_return_status);
log_message('Successful in update_scheduling_results.');
log_message('Error in update_scheduling_results: ' || l_return_status);
RAISE e_update_rescheduling_err;
l_sch_rec_tbl.delete;
lv_action_req_tbl.delete;
WHEN e_update_rescheduling_err THEN
LOG_MESSAGE('Error in UPDATE_RESCHEUDLING_RESULTS : e_update_rescheduling_err');
SELECT
batch_id, transaction_id
FROM
MRP_ORG_TRANSFER_RELEASE
WHERE
batch_id = l_batch_id
ORDER BY src_operating_unit;
DELETE from MRP_ORG_TRANSFER_RELEASE
WHERE batch_id = p_batch_id;