The following lines contain the word 'select', 'insert', 'update' or 'delete':
'INSERT INTO mrp_po_reschedule_gt (
purchase_order_id
, po_number
, line_id
, line_location_id
, distribution_id
, quantity
, need_by_date
, action
, uom
, operating_unit
, created_by
, creation_date
, last_updated_by
, last_update_date
, last_update_login
) (
SELECT
po_header_id
, po_number
, po_line_id
, po_line_location_id
, po_distribution_id
, po_quantity
, new_need_by_date
, action
, uom
, operating_unit
, fnd_global.user_id
, Sysdate
, fnd_global.user_id
, Sysdate
, fnd_global.user_id
FROM msc_purchase_order_interface' || p_dblink ||
' WHERE sr_instance_id = :p_instance_id
AND batch_id = :p_batch_id)';
SELECT USER_ID
INTO l_user_id
FROM FND_USER
WHERE USER_NAME = p_user_name;
SELECT USER_ID
INTO l_user_id
FROM FND_USER
WHERE USER_NAME = p_user_name;
SELECT responsibility_id
INTO l_resp_id
FROM FND_responsibility_vl
WHERE responsibility_name = p_resp_name
AND application_Id = l_appl_id;
l_sql_stmt := 'DELETE FROM msc_purchase_order_interface'||p_dblink||
' WHERE batch_id = :p_batch_id';
select DECODE( A2M_DBLINK,
NULL, NULL,
'@'||A2M_DBLINK),
INSTANCE_ID
from MRP_AP_APPS_INSTANCES_ALL
where ALLOW_RELEASE_FLAG=1
and instance_id = p_instance_id
and instance_code=p_instance_code
and nvl(A2M_DBLINK,'-1') = nvl(p_dblink,'-1');
SELECT i.purchase_order_id
, i.line_id
, i.po_number
, i.line_location_id
, i.distribution_id
, i.quantity
, i.need_by_date
, u.unit_of_measure
, i.operating_unit
bulk collect into
g_po_header_ids
, g_po_line_ids
, g_po_numbers
, g_line_location_ids
, g_distribution_ids
, g_qtys
, g_promise_dates
, g_uoms
, g_operating_units
FROM mrp_po_reschedule_gt i,
mtl_uom_conversions u
WHERE i.uom = u.uom_code
AND u.inventory_item_id = 0
AND i.action <> 2
ORDER BY i.purchase_order_id;
SELECT i.po_header_id
, i.po_line_id
, i.po_number
, i.po_line_location_id
, i.po_distribution_id
, i.po_quantity
, i.new_need_by_date
, u.unit_of_measure
, i.operating_unit
bulk collect into
g_po_header_ids
, g_po_line_ids
, g_po_numbers
, g_line_location_ids
, g_distribution_ids
, g_qtys
, g_promise_dates
, g_uoms
, g_operating_units
FROM msc_purchase_order_interface i,
msc_uom_conversions u
WHERE i.sr_instance_id = l_instance_id
AND i.uom = u.uom_code
AND u.inventory_item_id = 0
AND i.batch_id = p_batch_id
AND i.action <> 2
ORDER BY i.po_header_id;
select po_header_id
from po_headers
where segment1 = p_PO_NUMBER
and type_lookup_code IN ('STANDARD', 'BLANKET', 'PLANNED');
SELECT 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 '|| --?????
' purchase_order_id,'||
' line_id,'||
' po_number'||
' from mrp_po_reschedule_gt ' ||
' where action = 2 '||
' order by po_number ';
' select po_header_id,'||
' po_line_id,'||
' po_number'||
' from msc_purchase_order_interface' ||
' where sr_instance_id = '||p_instance_id||
' and batch_id ='||p_batch_id ||
' and action = 2' ||
' order by po_number ';
SELECT org_id
INTO l_po_operating_unit
FROM po_headers_all
WHERE po_header_id = v_po_header_id(i);
select org_id
into l_po_operating_unit
from po_headers_all
where PO_HEADER_ID= l_po_header_id;
select substr(l_po_number,
instr(l_po_number,'(',1,1)+1,
instr(l_po_number,')',1,1) - instr(l_po_number,'(',1,1) -1)
into l_po_release_num
from dual;
select po_release_id
into l_po_release_id
from po_releases_all
where po_header_id = l_po_header_id
and release_num = l_po_release_number ;
PO_DOCUMENT_UPDATE_GRP.update_document (p_api_version => 1.0,
p_init_msg_list => FND_API.G_TRUE,
x_return_status => l_po_return_status,
p_changes => l_changes,
p_run_submission_checks => FND_API.G_TRUE,
p_launch_approvals_flag => FND_API.G_TRUE,
p_buyer_id => NULL,
p_update_source => NULL,
p_override_date => NULL,
x_api_errors => l_po_api_errors
);