The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT 1, uomc.uom_class um_type, uomc.conversion_rate std_factor
FROM mtl_uom_conversions uomc, mtl_units_of_measure uom, sy_uoms_mst sy
WHERE sy.um_code = Vum_code
AND uom.unit_of_measure = sy.unit_of_measure
AND uomc.uom_code = uom.uom_code
AND uomc.inventory_item_id = Vinventory_item_id
AND ( (uomc.disable_date IS NULL)
OR (uomc.disable_date > sysdate) )
UNION
SELECT 2, um_type, std_factor
FROM sy_uoms_mst
WHERE um_code = Vum_code
AND delete_mark = 0
ORDER by 1;
SELECT item_um
FROM ic_item_mst
WHERE item_id = v_item_id;
SELECT type_factor, type_factorrev
FROM ic_item_cnv
WHERE item_id = v_item_id
AND lot_id = v_lot_id
AND delete_mark = 0
AND um_type = v_um_type;
SELECT item_no
FROM ic_item_mst
WHERE item_id = Vitem_id;
SELECT inventory_item_id
FROM mtl_system_items
WHERE segment1= Vitem_no
AND rownum = 1;
SELECT 1, uomc.uom_class um_type, uomc.conversion_rate std_factor
FROM mtl_uom_conversions uomc, mtl_units_of_measure uom, sy_uoms_mst sy
WHERE sy.um_code = Vum_code
AND uom.unit_of_measure = sy.unit_of_measure
AND uomc.uom_code = uom.uom_code
AND uomc.inventory_item_id = Vinventory_item_id
UNION
SELECT 2, um_type, std_factor
FROM sy_uoms_mst
WHERE um_code = Vum_code
AND delete_mark = 0
ORDER by 1;
SELECT item_um
FROM ic_item_mst
WHERE item_id = v_item_id;
SELECT type_factor
FROM ic_item_cnv
WHERE item_id = v_item_id
AND lot_id = v_lot_id
AND delete_mark = 0
AND um_type = v_um_type;
SELECT num_data
FROM lm_item_dat
WHERE orgn_code = v_lab_type
AND item_id = v_item_id
AND formula_id = v_formula_id
AND tech_parm_name = v_parm_name
AND delete_mark = 0;
SELECT item_no
FROM ic_item_mst
WHERE item_id = Vitem_id;
SELECT inventory_item_id
FROM mtl_system_items
WHERE segment1= Vitem_no
AND rownum = 1;
specified from within a select statement for I2.
PARAMETERS:
pitem_id The surrogate key of the item number
plot_id The surrogate key for the lot number/
sublot of the item number being converted.
ALLOWS ZERO if performing a LAB conversion.
pcur_qty The current quantity to convert.
pcur_uom The current unit of measure to convert from.
pnew_uom The unit of measure to convert to.
SPECIAL NOTES:
RETURNS:
0 - SUCCESS
-1 - Package problem.
-3 - UM_TYPE and conversion factor for current UOM not found.
-4 - UM_TYPE and conversion factor for NEW UOM not found.
-5 - Cannot determine INVENTORY UOM for item.
-6 - UM_TYPE and conversion factor for INV UOM not found.
-7 - Cannot find conversion factor for CURRENT UOM.
-10 - Cannot find conversion factor for NEW UOM.
============================================================== */
FUNCTION i2uom_cv(pitem_id NUMBER,
plot_id NUMBER,
pcur_uom VARCHAR2,
pcur_qty NUMBER ,
pnew_uom VARCHAR2)
RETURN NUMBER IS
/* Variable Declarations
=====================*/
l_iret NUMBER := -1;