The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT mr.*
FROM mtl_reservations mr
WHERE demand_source_type_id = INV_RESERVATION_GLOBAL.g_source_type_oe
AND supply_source_type_id = INV_RESERVATION_GLOBAL.g_source_type_inv
AND demand_source_line_id = p_line_id
ORDER BY mr.reservation_id;
SELECT count(1)
FROM mtl_reservations mr
WHERE demand_source_type_id = INV_RESERVATION_GLOBAL.g_source_type_oe
AND supply_source_type_id = INV_RESERVATION_GLOBAL.g_source_type_wip
AND demand_source_line_id = p_line_id
ORDER BY mr.reservation_id;
SELECT *
FROM mtl_system_items_b m
WHERE m.inventory_item_id = p_inventory_item_id
AND m.organization_id = p_organization_id;
SELECT *
FROM oe_order_lines_all
WHERE line_id = p_so_line_id;
SELECT *
FROM gme_material_details
WHERE batch_id = p_batch_id
AND inventory_item_id = p_inventory_item_id
AND line_type = gme_common_pvt.g_line_type_prod;
SELECT ol.line_number, mtl.segment1,
oh.order_number
FROM oe_order_headers_all oh
,oe_order_lines_all ol
,oe_transaction_types_all ot
,mtl_system_items mtl
WHERE ol.line_id = p_so_line_id
and ol.header_id = oh.header_id
and oh.order_type_id = ot.transaction_type_id
and mtl.inventory_item_id = ol.inventory_item_id;
SELECT sum(mr.primary_reservation_quantity),primary_uom_code
into l_total_primary_rsv_qty, l_primary_uom_code
FROM mtl_reservations mr
WHERE demand_source_type_id = INV_RESERVATION_GLOBAL.g_source_type_oe
AND supply_source_type_id = INV_RESERVATION_GLOBAL.g_source_type_inv
AND demand_source_line_id = l_so_line_rec.line_id
GROUP BY mr.primary_uom_code;
l_batch_header_rec.update_inventory_ind := 'Y';
SELECT *
FROM fnd_attached_docs_form_VL
WHERE function_name = decode(0,1,NULL,'OEXOEORD')
AND function_type = decode(0,1,NULL,'O')
AND (security_type = 4 OR publish_flag = 'Y')
AND category_id = p_so_category_id
AND ((entity_name = 'OE_ORDER_LINES') AND (pk1_value = p_so_line_id ));
FND_ATTACHED_DOCUMENTS_PKG.INSERT_ROW (
X_Rowid => so_attchments_row.row_id
,X_attached_document_id => so_attchments_row.attached_document_id
,X_document_id => so_attchments_row.document_id
,X_creation_date => so_attchments_row.CREATION_DATE
,X_created_by => so_attchments_row.CREATED_BY
,X_last_update_date => so_attchments_row.LAST_UPDATE_DATE
,X_last_updated_by => so_attchments_row.LAST_UPDATED_BY
,X_last_update_login => so_attchments_row.LAST_UPDATE_LOGIN
,X_seq_num => so_attchments_row.SEQ_NUM
,X_entity_name => 'GME_BATCH_HEADER'
,X_column1 => so_attchments_row.COLUMN1
,X_pk1_value => p_batch_id
,X_pk2_value => NULL
,X_pk3_value => NULL
,X_pk4_value => NULL
,X_pk5_value => NULL
,X_automatically_added_flag => so_attchments_row.AUTOMATICALLY_ADDED_FLAG
,X_request_id => so_attchments_row.REQUEST_ID
,X_program_application_id => so_attchments_row.PROGRAM_APPLICATION_ID
,X_program_id => so_attchments_row.PROGRAM_ID
,X_program_update_date => so_attchments_row.PROGRAM_UPDATE_DATE
,X_Attribute_Category => so_attchments_row.ATTRIBUTE_CATEGORY
,X_Attribute1 => so_attchments_row.ATTRIBUTE1
,X_Attribute2 => so_attchments_row.ATTRIBUTE2
,X_Attribute3 => so_attchments_row.ATTRIBUTE3
,X_Attribute4 => so_attchments_row.ATTRIBUTE4
,X_Attribute5 => so_attchments_row.ATTRIBUTE5
,X_Attribute6 => so_attchments_row.ATTRIBUTE6
,X_Attribute7 => so_attchments_row.ATTRIBUTE7
,X_Attribute8 => so_attchments_row.ATTRIBUTE8
,X_Attribute9 => so_attchments_row.ATTRIBUTE9
,X_Attribute10 => so_attchments_row.ATTRIBUTE10
,X_Attribute11 => so_attchments_row.ATTRIBUTE11
,X_Attribute12 => so_attchments_row.ATTRIBUTE12
,X_Attribute13 => so_attchments_row.ATTRIBUTE13
,X_Attribute14 => so_attchments_row.ATTRIBUTE14
,X_Attribute15 => so_attchments_row.ATTRIBUTE15
, X_datatype_id => so_attchments_row.DATATYPE_ID
, X_category_id => p_batch_category_id
, X_security_type => so_attchments_row.SECURITY_TYPE
, X_security_id => so_attchments_row.SECURITY_ID
, X_publish_flag => so_attchments_row.PUBLISH_FLAG
, X_image_type => so_attchments_row.IMAGE_TYPE
, X_storage_type => so_attchments_row.STORAGE_TYPE
, X_usage_type => so_attchments_row.USAGE_TYPE
, X_language => USERENV('LANG')
, X_description => so_attchments_row.DOCUMENT_DESCRIPTION
, X_file_name => so_attchments_row.FILE_NAME
, X_media_id => so_attchments_row.MEDIA_ID
, X_doc_attribute_Category => so_attchments_row.DOC_ATTRIBUTE_CATEGORY
, X_doc_attribute1 => so_attchments_row.DOC_ATTRIBUTE1
, X_doc_attribute2 => so_attchments_row.DOC_ATTRIBUTE2
, X_doc_attribute3 => so_attchments_row.DOC_ATTRIBUTE3
, X_doc_attribute4 => so_attchments_row.DOC_ATTRIBUTE4
, X_doc_attribute5 => so_attchments_row.DOC_ATTRIBUTE5
, X_doc_attribute6 => so_attchments_row.DOC_ATTRIBUTE6
, X_doc_attribute7 => so_attchments_row.DOC_ATTRIBUTE7
, X_doc_attribute8 => so_attchments_row.DOC_ATTRIBUTE8
, X_doc_attribute9 => so_attchments_row.DOC_ATTRIBUTE9
, X_doc_attribute11 => so_attchments_row.DOC_ATTRIBUTE11
, X_doc_attribute12 => so_attchments_row.DOC_ATTRIBUTE12
, X_doc_attribute13 => so_attchments_row.DOC_ATTRIBUTE13
, X_doc_attribute14 => so_attchments_row.DOC_ATTRIBUTE14
, X_doc_attribute15 => so_attchments_row.DOC_ATTRIBUTE15
, X_create_doc => 'Y' --- Default is 'N'
);
SELECT *
FROM oe_order_lines_all
WHERE line_id = p_line_id;
SELECT item_type
FROM mtl_system_items_b m
WHERE m.inventory_item_id = p_inventory_item_id
AND m.organization_id = p_organization_id;
Select decode(site_use_id, null, 0, site_use_id) site_use_id
, decode(customer_id, null, 0, customer_id) customer_id
, decode(inventory_item_id, null, 0, inventory_item_id) item_id
, decode(item_type, null, ' ', item_type) item_type
, rule_assign_id
, rule_id
, organization_id
From gme_mto_rule_assignments
Where organization_id = p_mto_assignments_rec.organization_id
and (inventory_item_id = p_mto_assignments_rec.inventory_item_id
or inventory_item_id is null )
and (item_type = p_mto_assignments_rec.item_type
or item_type is null)
and (customer_id = p_mto_assignments_rec.customer_id
or customer_id is null)
and (site_use_id = p_mto_assignments_rec.site_use_id
or site_use_id is null)
Order by
3 desc
, 1 desc
, 2 desc
, 4 desc
;
Select *
From gme_mto_rules
Where rule_id = l_mto_assignments_rec.rule_id;