24: bic.component_yield_factor component_yield,
25: msik.primary_uom_code uom,
26: bic.wip_supply_type,
27: lu.meaning wip_supply_type_disp
28: from bom_inventory_components bic,
29: mtl_system_items_kfv msik,
30: mfg_lookups lu
31: where bic.bill_sequence_id = l_bill_sequence_id
32: and bic.effectivity_date <= sysdate
43: and msik.stock_enabled_flag= l_stock_flag
44: order by component_sequence_id;
45:
46: /* Bug#3013574: If it is for rebuildable item
47: then the no check on BOM_INVENTORY_COMPONENTS.from_end_item_unit_number
48: and BOM_INVENTORY_COMPONENTS.to_end_item_unit_number is required */
49:
50: CURSOR C_REBUILD_COMPONENTS( l_stock_flag VARCHAR2) IS
51: SELECT
44: order by component_sequence_id;
45:
46: /* Bug#3013574: If it is for rebuildable item
47: then the no check on BOM_INVENTORY_COMPONENTS.from_end_item_unit_number
48: and BOM_INVENTORY_COMPONENTS.to_end_item_unit_number is required */
49:
50: CURSOR C_REBUILD_COMPONENTS( l_stock_flag VARCHAR2) IS
51: SELECT
52: bic.component_sequence_id,
58: msik.primary_uom_code uom,
59: bic.wip_supply_type,
60: lu.meaning wip_supply_type_disp
61: FROM
62: bom_inventory_components bic,
63: mtl_system_items_kfv msik,
64: mfg_lookups lu
65: WHERE
66: bic.bill_sequence_id = l_bill_sequence_id
96: bic.component_yield_factor component_yield,
97: msik.primary_uom_code uom,
98: bic.wip_supply_type,
99: lu.meaning wip_supply_type_disp
100: from bom_inventory_components bic,
101: bom_bill_of_materials bbom,
102: mtl_system_items_kfv msik,
103: mfg_lookups lu
104: where bbom.assembly_item_id = i_phantom_item_id
167: and organization_id = i_organization_id;
168:
169: /* Bug#3013574: If the i_asset_group_id being passed corresponds to Asset Group
170: continue doing the work as is being done. If it is for rebuildable item
171: then the no check on BOM_INVENTORY_COMPONENTS.from_end_item_unit_number
172: and BOM_INVENTORY_COMPONENTS.to_end_item_unit_number is required */
173:
174: IF (l_eam_item_type = 1) THEN
175: OPEN components( l_stock_enabled_flag );
168:
169: /* Bug#3013574: If the i_asset_group_id being passed corresponds to Asset Group
170: continue doing the work as is being done. If it is for rebuildable item
171: then the no check on BOM_INVENTORY_COMPONENTS.from_end_item_unit_number
172: and BOM_INVENTORY_COMPONENTS.to_end_item_unit_number is required */
173:
174: IF (l_eam_item_type = 1) THEN
175: OPEN components( l_stock_enabled_flag );
176: LOOP
257: BEGIN
258: select bic.component_item_id
259: into l_component_item_id
260: from bom_bill_of_materials bbom,
261: bom_inventory_components bic
262: where bbom.assembly_item_id = i_assembly_item_id
263: and bbom.organization_id = i_organization_id
264: and bbom.alternate_bom_designator is null
265: and bbom.common_bill_sequence_id = bic.bill_sequence_id
292: and alternate_bom_designator is null;
293:
294: select nvl(max(item_num),100)
295: into l_item_sequence_num
296: from bom_inventory_components
297: where bill_sequence_id=l_bill_sequence_id;
298:
299: l_seq_increment := to_number(nvl(fnd_profile.value('BOM:ITEM_SEQUENCE_INCREMENT'),'10'));
300: l_item_sequence_num := l_item_sequence_num + l_seq_increment;
339: l_bom_component_tbl(l_index2).supply_subinventory := i_component_table(l_index1).supply_subinventory;
340: l_bom_component_tbl(l_index2).location_name := i_component_table(l_index1).supply_locator_name;
341: l_bom_component_tbl(l_index2).from_end_item_unit_number := i_asset_number;
342: l_bom_component_tbl(l_index2).to_end_item_unit_number := i_asset_number;
343: -- Default In Required Fields. All hardcoded values are as per design. Pls refer to eTRM for object: BOM_INVENTORY_COMPONENTS to view description of below hardcoded columns.
344: l_bom_component_tbl(l_index2).operation_sequence_number := 1;
345: -- Modified for bug# 3844669.
346: l_bom_component_tbl(l_index2).item_sequence_number := l_start_item_seq_number + l_seq_increment*(l_index2 - 1);
347: l_bom_component_tbl(l_index2).projected_yield := 1;