106:
107: BEGIN
108: SELECT NVL ( ccicv.item_cost, 0 )
109: INTO x_item_cost
110: FROM cst_cg_item_costs_view ccicv,
111: mtl_parameters mp
112: WHERE l_locator_id IS NULL
113: AND ccicv.organization_id = p_organization_id
114: AND ccicv.inventory_item_id = p_inventory_item_id
120: )
121: UNION ALL
122: SELECT NVL ( ccicv.item_cost, 0 )
123: FROM mtl_item_locations mil,
124: cst_cg_item_costs_view ccicv,
125: mtl_parameters mp
126: WHERE l_locator_id IS NOT NULL
127: AND mil.organization_id = p_organization_id
128: AND mil.inventory_location_id = l_locator_id
138: UNION ALL
139: SELECT NVL ( ccicv.item_cost, 0 )
140: FROM mtl_item_locations mil,
141: mrp_project_parameters mrp,
142: cst_cg_item_costs_view ccicv,
143: mtl_parameters mp
144: WHERE l_locator_id IS NOT NULL
145: AND mil.organization_id = p_organization_id
146: AND mil.inventory_location_id = l_locator_id