49: from ( select item_catalog_group_id
50: from mtl_item_catalog_groups_b
51: connect by prior parent_catalog_group_id = item_catalog_group_id
52: start with item_catalog_group_id = p_item_catalog_grp_id ) icc,
53: BOM_STRUCTURES_B structures
54: where structures.pk1_value = icc.item_catalog_group_id
55: and structures.obj_name = 'EGO_CATALOG_GROUP'
56: and rownum = 1;
57:
65: where exists (select 1
66: from EGO_MTL_CATALOG_GRP_VERS_B
67: where item_catalog_group_id = p_item_catalog_grp_id)
68: and not exists (select 1
69: from BOM_STRUCTURES_B
70: where pk1_value = p_item_catalog_grp_id
71: and obj_name = 'EGO_CATALOG_GROUP');
72:
73: if l_create_header = 1 then
77: select bom_inventory_components_s.nextval
78: into l_bill_sequence_id
79: from dual;
80:
81: insert into BOM_STRUCTURES_B
82: (BILL_SEQUENCE_ID,
83: SOURCE_BILL_SEQUENCE_ID,
84: COMMON_BILL_SEQUENCE_ID,
85: ORGANIZATION_ID,
113: LAST_UPDATED_BY,
114: CREATION_DATE,
115: CREATED_BY,
116: LAST_UPDATE_LOGIN
117: from BOM_STRUCTURES_B
118: where BILL_SEQUENCE_ID = icc_structure.bill_sequence_id ;
119:
120: end loop;
121:
172: SELECT bill_sequence_id,
173: structure_type_id
174: INTO l_bill_seq_id,
175: l_structure_type_id
176: FROM BOM_STRUCTURES_B
177: WHERE pk1_value = p_item_catalog_grp_id
178: AND obj_name = 'EGO_CATALOG_GROUP';
179: Exception
180: when others then
495: l_pk2_value,
496: l_effectivity_control,
497: l_alternate_bom_designator,
498: l_structure_type_id
499: FROM BOM_STRUCTURES_B
500: WHERE pk1_value = p_item_catalog_grp_id
501: and obj_name = 'EGO_CATALOG_GROUP';
502: Exception
503: when others then
562: l_par_pk2_value,
563: l_par_effectivity_control,
564: l_par_alternate_bom_designator,
565: l_par_structure_type_id
566: FROM BOM_STRUCTURES_B
567: WHERE pk1_value = l_parent_catalog_grp_id
568: and obj_name = 'EGO_CATALOG_GROUP';
569: Exception
570: when others then
798: where item_catalog_group_id = p_item_catalog_grp_id;
799: else
800: select pk1_value
801: into l_item_catalog_grp_id
802: from BOM_STRUCTURES_B
803: where bill_sequence_id = p_parent_bill_seq_id
804: and obj_name= 'EGO_CATALOG_GROUP';
805:
806: select concatenated_segments
1039: l_pk2_value,
1040: l_effectivity_control,
1041: l_alternate_bom_designator,
1042: l_structure_type_id
1043: FROM BOM_STRUCTURES_B
1044: WHERE pk1_value = p_item_catalog_grp_id
1045: and obj_name = 'EGO_CATALOG_GROUP';
1046: Exception
1047: when others then
1099: l_par_pk2_value,
1100: l_par_effectivity_control,
1101: l_par_alternate_bom_designator,
1102: l_par_structure_type_id
1103: FROM BOM_STRUCTURES_B
1104: WHERE pk1_value = l_parent_catalog_grp_id
1105: and obj_name = 'EGO_CATALOG_GROUP';
1106: Exception
1107: when others then
1694: from (select item_catalog_group_id
1695: from mtl_item_catalog_groups_b
1696: connect by prior parent_catalog_group_id = item_catalog_group_id
1697: start with item_catalog_group_id = p_item_catalog_grp_id) icc,
1698: bom_structures_b icc_structure,
1699: bom_components_b icc_str_components
1700: where icc_structure.pk1_value = icc.item_catalog_group_id
1701: and icc_structure.pk2_value = p_organization_id
1702: and icc_structure.obj_name = 'EGO_CATALOG_GROUP'
1775: l_stmt_no := 50;
1776: begin
1777: select bill_sequence_id
1778: into l_catalog_bill_sequence_id
1779: from bom_structures_b
1780: where pk1_value = to_char(l_catalog_group_id)
1781: and pk2_value = to_char(p_organization_id)
1782: and obj_name = 'EGO_CATALOG_GROUP'
1783: and assembly_type = 2
1790: l_stmt_no := 60;
1791: begin
1792: select null
1793: into l_catalog_bill_sequence_id
1794: from bom_structures_b
1795: where pk1_value in (select item_catalog_group_id
1796: from mtl_item_catalog_groups_b
1797: connect by prior parent_catalog_group_id = item_catalog_group_id
1798: start with item_catalog_group_id = l_catalog_group_id)
2262:
2263: cursor item_structure(p_inventory_item_id Number,
2264: p_organization_id Number) is
2265: select structure_type_id,alternate_bom_designator,bill_sequence_id
2266: from bom_structures_b
2267: where
2268: assembly_item_id = p_inventory_item_id
2269: and organization_id = p_organization_id
2270: and obj_name is null
2296: from (select item_catalog_group_id
2297: from mtl_item_catalog_groups_b
2298: connect by prior parent_catalog_group_id = item_catalog_group_id
2299: start with item_catalog_group_id = p_item_catalog_grp_id) icc,
2300: bom_structures_b icc_structure,
2301: bom_components_b icc_str_components
2302: where icc_structure.pk1_value = icc.item_catalog_group_id
2303: and icc_structure.pk2_value = p_organization_id
2304: and icc_structure.obj_name = 'EGO_CATALOG_GROUP'
2370: begin
2371: l_stmt_no := 30;
2372: select bill_sequence_id,structure_type_id,alternate_bom_designator
2373: into l_catalog_bill_sequence_id,l_catalog_str_type_id,G_ALTCODE
2374: from bom_structures_b
2375: where pk1_value = to_char(l_catalog_group_id)
2376: and pk2_value = to_char(p_organization_id)
2377: and obj_name = 'EGO_CATALOG_GROUP'
2378: and assembly_type = 2
2388: begin
2389: l_stmt_no := 40;
2390: select structure_type_id,alternate_bom_designator
2391: into l_catalog_str_type_id,G_ALTCODE
2392: from bom_structures_b
2393: where pk1_value in (select item_catalog_group_id
2394: from mtl_item_catalog_groups_b
2395: connect by prior parent_catalog_group_id = item_catalog_group_id
2396: start with item_catalog_group_id = l_catalog_group_id)
2971: from (select item_catalog_group_id
2972: from mtl_item_catalog_groups_b
2973: connect by prior parent_catalog_group_id = item_catalog_group_id
2974: start with item_catalog_group_id = p_item_catalog_grp_id) icc,
2975: bom_structures_b icc_structure,
2976: bom_components_b icc_str_components
2977: where icc_structure.pk1_value = icc.item_catalog_group_id
2978: and icc_structure.pk2_value = p_organization_id
2979: and icc_structure.obj_name = 'EGO_CATALOG_GROUP'
3021: from ( select item_catalog_group_id
3022: from mtl_item_catalog_groups_b
3023: connect by prior parent_catalog_group_id = item_catalog_group_id
3024: start with item_catalog_group_id = p_item_catalog_grp_id ) icc,
3025: BOM_STRUCTURES_B structures
3026: where structures.pk1_value = icc.item_catalog_group_id
3027: and structures.obj_name = 'EGO_CATALOG_GROUP'
3028: and rownum = 1;
3029:
3037: where exists (select 1
3038: from EGO_MTL_CATALOG_GRP_VERS_B
3039: where item_catalog_group_id = p_item_catalog_grp_id)
3040: and not exists (select 1
3041: from BOM_STRUCTURES_B
3042: where pk1_value = p_item_catalog_grp_id
3043: and obj_name = 'EGO_CATALOG_GROUP');
3044:
3045: if l_create_header = 1 then
3049: select bom_inventory_components_s.nextval
3050: into l_bill_sequence_id
3051: from dual;
3052:
3053: insert into BOM_STRUCTURES_B
3054: (BILL_SEQUENCE_ID,
3055: SOURCE_BILL_SEQUENCE_ID,
3056: COMMON_BILL_SEQUENCE_ID,
3057: ORGANIZATION_ID,
3085: LAST_UPDATED_BY,
3086: CREATION_DATE,
3087: CREATED_BY,
3088: LAST_UPDATE_LOGIN
3089: from BOM_STRUCTURES_B
3090: where BILL_SEQUENCE_ID = icc_structure.bill_sequence_id ;
3091:
3092: end loop;
3093:
3114: select 1
3115: into l_updatable
3116: from dual
3117: where not exists (select 1
3118: from BOM_STRUCTURES_B bsb,
3119: (select item_catalog_group_id
3120: from mtl_item_catalog_groups_b
3121: connect by prior item_catalog_group_id = parent_catalog_group_id
3122: start with item_catalog_group_id = p_item_catalog_grp_id ) child_icc