[Home] [Help]
609: (all_org = 2 AND organization_id = org_id));
610:
611:
612: stmt_num := 7;
613: /* Update the operation code from the standard operation id */
614:
615: UPDATE BOM_OP_SEQUENCES_INTERFACE BOSI
616: SET operation_code = (SELECT operation_code
617: FROM BOM_STANDARD_OPERATIONS bso
613: /* Update the operation code from the standard operation id */
614:
615: UPDATE BOM_OP_SEQUENCES_INTERFACE BOSI
616: SET operation_code = (SELECT operation_code
617: FROM BOM_STANDARD_OPERATIONS bso
618: WHERE bso.standard_operation_id = BOSI.standard_operation_id
619: and bso.organization_id = BOSI.organization_id)
620: WHERE process_flag = 1
621: AND upper(transaction_type) in (G_Create, G_Delete, G_Update)
614:
615: UPDATE BOM_OP_SEQUENCES_INTERFACE BOSI
616: SET operation_code = (SELECT operation_code
617: FROM BOM_STANDARD_OPERATIONS bso
618: WHERE bso.standard_operation_id = BOSI.standard_operation_id
619: and bso.organization_id = BOSI.organization_id)
620: WHERE process_flag = 1
621: AND upper(transaction_type) in (G_Create, G_Delete, G_Update)
622: AND standard_operation_id is not null
618: WHERE bso.standard_operation_id = BOSI.standard_operation_id
619: and bso.organization_id = BOSI.organization_id)
620: WHERE process_flag = 1
621: AND upper(transaction_type) in (G_Create, G_Delete, G_Update)
622: AND standard_operation_id is not null
623: AND organization_id is not null
624: AND
625: (
626: ( (p_batch_id IS NULL) AND (BOSI.batch_id IS NULL) )
626: ( (p_batch_id IS NULL) AND (BOSI.batch_id IS NULL) )
627: OR ( p_batch_id = BOSI.batch_id )
628: )
629: AND exists (SELECT 'x'
630: FROM BOM_STANDARD_OPERATIONS bso
631: WHERE bso.standard_operation_id = BOSI.standard_operation_id
632: and bso.organization_id = BOSI.organization_id);
633:
634: stmt_num := 8;
627: OR ( p_batch_id = BOSI.batch_id )
628: )
629: AND exists (SELECT 'x'
630: FROM BOM_STANDARD_OPERATIONS bso
631: WHERE bso.standard_operation_id = BOSI.standard_operation_id
632: and bso.organization_id = BOSI.organization_id);
633:
634: stmt_num := 8;
635: /* Update the department code from the department id */
648: ( (p_batch_id IS NULL) AND (BOSI.batch_id IS NULL) )
649: OR ( p_batch_id = BOSI.batch_id )
650: )
651: AND exists (SELECT 'x'
652: FROM BOM_STANDARD_OPERATIONS bso
653: WHERE bso.department_id = BOSI.department_id
654: and bso.organization_id = BOSI.organization_id);
655:
656: stmt_num := 9;
658:
659: UPDATE BOM_OP_SEQUENCES_INTERFACE BOSI
660: SET(line_op_seq_number, line_op_code)
661: = (SELECT bos1.operation_seq_num, bso1.operation_code
662: FROM BOM_OPERATION_SEQUENCES BOS1, BOM_STANDARD_OPERATIONS BSO1
663: WHERE BOS1.operation_sequence_id = BOSI.line_op_seq_id
664: AND BSO1.organization_id = BOSI.organization_id
665: AND BOS1.standard_operation_id = BSO1.standard_operation_id)
666: WHERE process_flag = 1
661: = (SELECT bos1.operation_seq_num, bso1.operation_code
662: FROM BOM_OPERATION_SEQUENCES BOS1, BOM_STANDARD_OPERATIONS BSO1
663: WHERE BOS1.operation_sequence_id = BOSI.line_op_seq_id
664: AND BSO1.organization_id = BOSI.organization_id
665: AND BOS1.standard_operation_id = BSO1.standard_operation_id)
666: WHERE process_flag = 1
667: AND upper(transaction_type) in (G_Delete, G_Update)
668: AND line_op_seq_id is not null
669: AND
671: ( (p_batch_id IS NULL) AND (BOSI.batch_id IS NULL) )
672: OR ( p_batch_id = BOSI.batch_id )
673: )
674: AND exists (SELECT 'x'
675: FROM BOM_OPERATION_SEQUENCES BOS1, BOM_STANDARD_OPERATIONS BSO1
676: WHERE BOS1.operation_sequence_id = BOSI.line_op_seq_id
677: AND BSO1.organization_id = BOSI.organization_id
678: AND BOS1.standard_operation_id = BSO1.standard_operation_id);
679:
674: AND exists (SELECT 'x'
675: FROM BOM_OPERATION_SEQUENCES BOS1, BOM_STANDARD_OPERATIONS BSO1
676: WHERE BOS1.operation_sequence_id = BOSI.line_op_seq_id
677: AND BSO1.organization_id = BOSI.organization_id
678: AND BOS1.standard_operation_id = BSO1.standard_operation_id);
679:
680: UPDATE BOM_OP_SEQUENCES_INTERFACE BOSI
681: SET(process_seq_number, process_code)
682: = (SELECT bos1.operation_seq_num, bso1.operation_code
679:
680: UPDATE BOM_OP_SEQUENCES_INTERFACE BOSI
681: SET(process_seq_number, process_code)
682: = (SELECT bos1.operation_seq_num, bso1.operation_code
683: FROM BOM_OPERATION_SEQUENCES BOS1, BOM_STANDARD_OPERATIONS BSO1
684: WHERE BOS1.operation_sequence_id = BOSI.process_op_seq_id
685: AND BSO1.organization_id = BOSI.organization_id
686: AND BOS1.standard_operation_id = BSO1.standard_operation_id)
687: WHERE process_flag = 1
682: = (SELECT bos1.operation_seq_num, bso1.operation_code
683: FROM BOM_OPERATION_SEQUENCES BOS1, BOM_STANDARD_OPERATIONS BSO1
684: WHERE BOS1.operation_sequence_id = BOSI.process_op_seq_id
685: AND BSO1.organization_id = BOSI.organization_id
686: AND BOS1.standard_operation_id = BSO1.standard_operation_id)
687: WHERE process_flag = 1
688: AND upper(transaction_type) in (G_Delete, G_Update)
689: AND process_op_seq_id is not null
690: AND
692: ( (p_batch_id IS NULL) AND (BOSI.batch_id IS NULL) )
693: OR ( p_batch_id = BOSI.batch_id )
694: )
695: AND exists (SELECT 'x'
696: FROM BOM_OPERATION_SEQUENCES BOS1, BOM_STANDARD_OPERATIONS BSO1
697: WHERE BOS1.operation_sequence_id = BOSI.process_op_seq_id
698: AND BSO1.organization_id = BOSI.organization_id
699: AND BOS1.standard_operation_id = BSO1.standard_operation_id);
700:
695: AND exists (SELECT 'x'
696: FROM BOM_OPERATION_SEQUENCES BOS1, BOM_STANDARD_OPERATIONS BSO1
697: WHERE BOS1.operation_sequence_id = BOSI.process_op_seq_id
698: AND BSO1.organization_id = BOSI.organization_id
699: AND BOS1.standard_operation_id = BSO1.standard_operation_id);
700:
701: stmt_num := 10;
702: /* Update the delete_group_name from bom_interface_delete_groups */
703: UPDATE BOM_OP_SEQUENCES_INTERFACE BOSI