1349:
1350: CTO_WIP_WORKFLOW_API_PK.CTO_DEBUG( 'PROCESS_CONFIGURATOR_DATA' , 'done CTOMCFGB perform_match ' ) ;
1351:
1352:
1353: select /*+ INDEX (BOM_CTO_ORDER_LINES_GT BOM_CTO_ORDER_LINES_GT_U1) */
1354: perform_match , config_item_id into x_match_found , x_top_matched_item_id
1355: from bom_cto_order_lines_gt
1356: where line_id = v_ato_line_id ;
1357:
1351:
1352:
1353: select /*+ INDEX (BOM_CTO_ORDER_LINES_GT BOM_CTO_ORDER_LINES_GT_U1) */
1354: perform_match , config_item_id into x_match_found , x_top_matched_item_id
1355: from bom_cto_order_lines_gt
1356: where line_id = v_ato_line_id ;
1357:
1358: CTO_WIP_WORKFLOW_API_PK.CTO_DEBUG( 'PROCESS_CONFIGURATOR_DATA' , 'CTOMCFGB perform_match result ' || x_match_found ) ;
1359:
1638:
1639: update bom_cto_order_lines set config_item_id = p_top_predefined_item_id
1640: , perform_match = 'U' where line_id = p_top_ato_line_id ;
1641:
1642: update /*+ INDEX (BOM_CTO_ORDER_LINES_GT BOM_CTO_ORDER_LINES_GT_U1) */
1643: bom_cto_order_lines_gt
1644: set config_item_id = p_top_predefined_item_id
1645: , perform_match = 'U'
1646: where line_id = p_top_ato_line_id ;
1639: update bom_cto_order_lines set config_item_id = p_top_predefined_item_id
1640: , perform_match = 'U' where line_id = p_top_ato_line_id ;
1641:
1642: update /*+ INDEX (BOM_CTO_ORDER_LINES_GT BOM_CTO_ORDER_LINES_GT_U1) */
1643: bom_cto_order_lines_gt
1644: set config_item_id = p_top_predefined_item_id
1645: , perform_match = 'U'
1646: where line_id = p_top_ato_line_id ;
1647:
1652:
1653: update bom_cto_order_lines set config_item_id = p_top_predefined_item_id
1654: , perform_match = 'N' where line_id = p_top_ato_line_id ;
1655:
1656: update /*+ INDEX (BOM_CTO_ORDER_LINES_GT BOM_CTO_ORDER_LINES_GT_U1) */
1657: bom_cto_order_lines_gt
1658: set config_item_id = p_top_predefined_item_id
1659: , perform_match = 'N'
1660: where line_id = p_top_ato_line_id ;
1653: update bom_cto_order_lines set config_item_id = p_top_predefined_item_id
1654: , perform_match = 'N' where line_id = p_top_ato_line_id ;
1655:
1656: update /*+ INDEX (BOM_CTO_ORDER_LINES_GT BOM_CTO_ORDER_LINES_GT_U1) */
1657: bom_cto_order_lines_gt
1658: set config_item_id = p_top_predefined_item_id
1659: , perform_match = 'N'
1660: where line_id = p_top_ato_line_id ;
1661:
2469: ' parent line_id ' || p_bcol_tab(i).parent_ato_line_id ||
2470: ' parent qty ' || p_bcol_tab(p_bcol_tab(i).parent_ato_line_id ).ordered_quantity , 1) ;
2471: v_step := i ;
2472:
2473: Insert into bom_cto_order_lines_gt(
2474: HEADER_ID ,
2475: LINE_ID ,
2476: LINK_TO_LINE_ID ,
2477: ATO_LINE_ID ,
2680: l_x_config_id := NULL;
2681:
2682:
2683:
2684: select /*+ INDEX (BOM_CTO_ORDER_LINES_GT BOM_CTO_ORDER_LINES_GT_U1) */
2685: perform_match into l_perform_match
2686: from bom_cto_order_lines_gt
2687: where line_id = l_next_rec.line_id ;
2688:
2682:
2683:
2684: select /*+ INDEX (BOM_CTO_ORDER_LINES_GT BOM_CTO_ORDER_LINES_GT_U1) */
2685: perform_match into l_perform_match
2686: from bom_cto_order_lines_gt
2687: where line_id = l_next_rec.line_id ;
2688:
2689:
2690:
2691: if( l_perform_match = 'N' ) then
2692:
2693: begin
2694:
2695: update /*+ INDEX (BOM_CTO_ORDER_LINES_GT BOM_CTO_ORDER_LINES_GT_U1) */
2696: bom_cto_order_lines_gt set perform_match = 'N'
2697: where perform_match = 'Y'
2698: and line_id = l_next_rec.parent_ato_line_id ;
2699:
2692:
2693: begin
2694:
2695: update /*+ INDEX (BOM_CTO_ORDER_LINES_GT BOM_CTO_ORDER_LINES_GT_U1) */
2696: bom_cto_order_lines_gt set perform_match = 'N'
2697: where perform_match = 'Y'
2698: and line_id = l_next_rec.parent_ato_line_id ;
2699:
2700: exception
2764:
2765:
2766: /* update the perform match column to 'N' so that this item is canned */
2767: begin
2768: update /*+ INDEX (BOM_CTO_ORDER_LINES_GT BOM_CTO_ORDER_LINES_GT_U1) */
2769: bom_cto_order_lines_gt
2770: set perform_match = 'N'
2771: where line_id = l_next_rec.line_id
2772: and perform_match = 'Y';
2765:
2766: /* update the perform match column to 'N' so that this item is canned */
2767: begin
2768: update /*+ INDEX (BOM_CTO_ORDER_LINES_GT BOM_CTO_ORDER_LINES_GT_U1) */
2769: bom_cto_order_lines_gt
2770: set perform_match = 'N'
2771: where line_id = l_next_rec.line_id
2772: and perform_match = 'Y';
2773:
2783: is attempted against its parent and it is canned
2784: */
2785:
2786: begin
2787: update /*+ INDEX (BOM_CTO_ORDER_LINES_GT BOM_CTO_ORDER_LINES_GT_U1) */
2788: bom_cto_order_lines_gt
2789: set perform_match = 'N'
2790: where line_id = l_next_rec.parent_ato_line_id
2791: and perform_match = 'Y';
2784: */
2785:
2786: begin
2787: update /*+ INDEX (BOM_CTO_ORDER_LINES_GT BOM_CTO_ORDER_LINES_GT_U1) */
2788: bom_cto_order_lines_gt
2789: set perform_match = 'N'
2790: where line_id = l_next_rec.parent_ato_line_id
2791: and perform_match = 'Y';
2792:
2808: || to_char(l_next_rec.line_id)
2809: || ' is ' || to_char(l_x_config_id) ,1);
2810: */
2811:
2812: update /*+ INDEX (BOM_CTO_ORDER_LINES_GT BOM_CTO_ORDER_LINES_GT_U1) */
2813: bom_cto_order_lines_gt
2814: set config_item_id = l_x_config_id
2815: where line_id = l_next_rec.line_id;
2816:
2809: || ' is ' || to_char(l_x_config_id) ,1);
2810: */
2811:
2812: update /*+ INDEX (BOM_CTO_ORDER_LINES_GT BOM_CTO_ORDER_LINES_GT_U1) */
2813: bom_cto_order_lines_gt
2814: set config_item_id = l_x_config_id
2815: where line_id = l_next_rec.line_id;
2816:
2817: l_stmt_num := 40 ;