109:
110: ER2625376: changes made to BOM should be visible to Order unitl Booking.
111:
112: OE_Config_Util.Get_Config_effective_Date should be used to decide
113: the date for effective/diabled filter on bom_explosions sqls.
114:
115: p_creatione_date parameter will be renamed to p_effective_date.
116: ------------------------------------------------------------------------*/
117:
519: /*-----------------------------------------------------------------------
520: PROCEDURE: Check_Min_Max
521: This procedure loops through the options table.
522: For each option,
523: it selects the min and max quantity from bom_explosions table. Some or all
524: of the options might not have the min max range set up in the BOM set up.
525: if the ordered quantity is not within the range, it popuplates a message
526: and it sets the return staus to error.
527: If all the options are within the min max range, we return success.
564: oe_debug_pub.add('NO CHECK SINCE QTY = 0' ) ;
565: END IF;
566: ELSE
567:
568: SELECT /*+ INDEX(BE1 BOM_EXPLOSIONS_N1) */
569: nvl(be1.high_quantity,0), nvl(be1.low_quantity,0)
570: INTO l_max_allowed_qty, l_min_allowed_qty
571: FROM bom_explosions be1
572: WHERE be1.TOP_BILL_SEQUENCE_ID = p_top_bill_sequence_id
567:
568: SELECT /*+ INDEX(BE1 BOM_EXPLOSIONS_N1) */
569: nvl(be1.high_quantity,0), nvl(be1.low_quantity,0)
570: INTO l_max_allowed_qty, l_min_allowed_qty
571: FROM bom_explosions be1
572: WHERE be1.TOP_BILL_SEQUENCE_ID = p_top_bill_sequence_id
573: AND be1.component_code = p_options_tbl(I).component_code
574: AND be1.effectivity_date <=
575: p_effective_date
780: l_return_status VARCHAR2(1):= FND_API.G_RET_STS_SUCCESS;
781: l_valid_config VARCHAR2(10) := 'TRUE';
782:
783: CURSOR MUTUALLY_EXCLUSIVE_OPTIONS IS
784: SELECT /*+ INDEX(BOMEXP BOM_EXPLOSIONS_N1) */
785: bomexp.description, bomexp.component_code
786: FROM BOM_EXPLOSIONS BOMEXP
787: WHERE bomexp.explosion_type = 'OPTIONAL'
788: AND bomexp.top_bill_sequence_id = p_top_bill_sequence_id
782:
783: CURSOR MUTUALLY_EXCLUSIVE_OPTIONS IS
784: SELECT /*+ INDEX(BOMEXP BOM_EXPLOSIONS_N1) */
785: bomexp.description, bomexp.component_code
786: FROM BOM_EXPLOSIONS BOMEXP
787: WHERE bomexp.explosion_type = 'OPTIONAL'
788: AND bomexp.top_bill_sequence_id = p_top_bill_sequence_id
789: AND bomexp.plan_level >= 0
790: AND bomexp.effectivity_date <=
939: l_return_status VARCHAR2(1):= FND_API.G_RET_STS_SUCCESS;
940: l_complete_config VARCHAR2(10) := 'TRUE';
941:
942: CURSOR MANDATORY_COMPONENTS IS
943: SELECT /*+ INDEX(BOMEXP BOM_EXPLOSIONS_N1) */
944: bomexp.description, bomexp.component_code
945: --,bomexp.sort_order???? perf
946: FROM bom_explosions bomexp
947: WHERE bomexp.explosion_type = 'OPTIONAL'
942: CURSOR MANDATORY_COMPONENTS IS
943: SELECT /*+ INDEX(BOMEXP BOM_EXPLOSIONS_N1) */
944: bomexp.description, bomexp.component_code
945: --,bomexp.sort_order???? perf
946: FROM bom_explosions bomexp
947: WHERE bomexp.explosion_type = 'OPTIONAL'
948: AND bomexp.top_bill_sequence_id = p_top_bill_sequence_id
949: AND bomexp.plan_level >= 0
950: AND bomexp.effectivity_date <=
957: /*
958: CURSOR MANDATORY_COMPONENTS IS
959: SELECT bomexp.description, bomexp.component_code
960: FROM OE_ORDER_LINES OECFG
961: , BOM_EXPLOSIONS BOMEXP
962: WHERE OECFG.TOP_MODEL_LINE_ID = p_top_model_line_id
963: AND OECFG.SERVICE_REFERENCE_LINE_ID IS NULL
964: AND OECFG.ITEM_TYPE_CODE IN ( 'MODEL', 'CLASS' )
965: AND BOMEXP.EXPLOSION_TYPE = 'OPTIONAL'