446: */
447: BEGIN
448: select bill_sequence_id
449: into cnt
450: from bom_bill_of_materials
451: where bill_sequence_id = bom_seq_id;
452: if (mode_type = 2) then
453: return(0);
454: else
537: BEGIN
538: begin
539: select bill_sequence_id
540: into cnt
541: from bom_bill_of_materials
542: where organization_id = org_id
543: and assembly_item_id = assy_id
544: and nvl(alternate_bom_designator, 'NONE') =
545: nvl(alt_desg, 'NONE');
585: if (alt_desg is not null) then
586: begin
587: select bill_sequence_id
588: into cnt
589: from bom_bill_of_materials
590: where organization_id = org_id
591: and assembly_item_id = assy_id
592: and alternate_bom_designator is null
593: and ((assy_type = 2)
765: */
766: begin
767: select bill_sequence_id
768: into cnt
769: from bom_bill_of_materials
770: where bill_sequence_id = cmn_bom_id
771: and assembly_item_id = cmn_item_id
772: and organization_id = cmn_org_id
773: and nvl(alternate_bom_designator, 'NONE') =
1252: stmt_num := 5;
1253: begin
1254: select 'Is pointing to a common'
1255: into dummy
1256: from bom_bill_of_materials
1257: where bill_sequence_id = c1rec.BSI
1258: and common_bill_sequence_id <> c1rec.BSI;
1259:
1260: ret_code := INVPUOPI.mtl_log_interface_err(
1321: stmt_num := 6;
1322: declare
1323: Cursor CheckBOM is
1324: select assembly_type
1325: from bom_bill_of_materials
1326: where bill_sequence_id = c1rec.BSI;
1327: Cursor CheckInterface is
1328: select assembly_type
1329: from bom_bill_of_mtls_interface
2665: select bbom.organization_id,
2666: bbom.assembly_item_id, bic.bom_item_type
2667: into org_id_dummy, assy_id_dummy, comp_type
2668: from bom_inventory_components bic,
2669: bom_bill_of_materials bbom
2670: where component_sequence_id = c1rec.CSI
2671: and bbom.bill_sequence_id = bic.bill_sequence_id;
2672: goto check_bom_type;
2673: exception
2695: select bbom.organization_id,
2696: bbom.assembly_item_id, bic.bom_item_type
2697: into org_id_dummy, assy_id_dummy, comp_type
2698: from bom_inventory_comps_interface bic,
2699: bom_bill_of_materials bbom
2700: where component_sequence_id = c1rec.CSI
2701: and bic.process_flag = 4
2702: and bbom.bill_sequence_id = bic.bill_sequence_id;
2703: goto check_bom_type;
3060: bic.bom_item_type
3061: into assy_id_dummy, org_id_dummy,assy_type_dummy,
3062: comp_id_dummy, comp_type
3063: from bom_inventory_components bic,
3064: bom_bill_of_materials bbom
3065: where component_sequence_id = c1rec.CSI
3066: and bbom.bill_sequence_id = bic.bill_sequence_id;
3067: goto check_bom_type;
3068: exception
3094: bic.bom_item_type
3095: into assy_id_dummy, org_id_dummy,assy_type_dummy,
3096: comp_id_dummy, comp_type
3097: from bom_inventory_comps_interface bic,
3098: bom_bill_of_materials bbom
3099: where component_sequence_id = c1rec.CSI
3100: and bic.process_flag = 4
3101: and bbom.bill_sequence_id = bic.bill_sequence_id;
3102: goto check_bom_type;
3604: dummy_bill := 0;
3605:
3606: select count(*)
3607: into dummy_bill
3608: from bom_bill_of_materials
3609: where organization_id = c0rec.OI
3610: and assembly_item_id = c0rec.AII;
3611:
3612: if (dummy_bill = 0) then