DBA Data[Home] [Help]

APPS.CTO_CONFIG_BOM_PK dependencies on BOM_EXPLOSION_TEMP

Line 4095: bom_explosion_temp bet

4091: mtl_system_items si2,
4092: bom_bill_of_materials bbm,
4093: bom_inventory_components bic, -- Components
4094: bom_inventory_components bic1, -- Parent
4095: bom_explosion_temp bet
4096: /*-----------------------------------------------------------------------------------------------------+
4097: For a multilevel model , ato_line_id=xLineId will not fetch included items of lower level
4098: non-phantom models so Parent_ATO_Line_id is used in the join condition.
4099: e.g. For a bill like this :

Line 4160: SELECT /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */

4156: and ( bic.disable_date is null or
4157: (bic.disable_date is not null and bic.disable_date >= sysdate )) ;/* New Approach for Effectivity Dates */
4158:
4159: CURSOR c_model_oc_oi_rows(xConfigBillId bom_inventory_components.bill_sequence_id%TYPE) IS
4160: SELECT /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */
4161: nvl(operation_seq_num,1) operation_seq_num, -- 2433862
4162: component_code,
4163: rowid
4164: from bom_explosion_temp

Line 4164: from bom_explosion_temp

4160: SELECT /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */
4161: nvl(operation_seq_num,1) operation_seq_num, -- 2433862
4162: component_code,
4163: rowid
4164: from bom_explosion_temp
4165: where bill_sequence_id = xConfigBillId
4166: and component_code IS NOT NULL
4167: ORDER BY component_code;
4168:

Line 4215: INSERT INTO BOM_EXPLOSION_TEMP

4211: -- component_code to insert comp_code of classes /items
4212: -- from bcol
4213: --
4214:
4215: INSERT INTO BOM_EXPLOSION_TEMP
4216: ( top_bill_sequence_id,
4217: organization_id,
4218: plan_level,
4219: sort_order,

Line 4389: select /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */

4385: IF PG_DEBUG <> 0 THEN
4386: oe_debug_pub.add ('inherit_op_seq_ml: ' || 'Second -- Inserted in BE Temp ' || lCnt ||' Option item/Option class rows with bill seq id as '|| pConfigBillId,1);
4387: END IF;
4388:
4389: select /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */
4390: count(*) into v_zero_qty_count from bom_explosion_temp
4391: where bill_sequence_id = pConfigBillId and component_quantity = 0 ;
4392:
4393: oe_debug_pub.add( 'MODELS: CHECK Raise Exception for Zero QTY Count ' || v_zero_qty_count , 1 ) ;

Line 4390: count(*) into v_zero_qty_count from bom_explosion_temp

4386: oe_debug_pub.add ('inherit_op_seq_ml: ' || 'Second -- Inserted in BE Temp ' || lCnt ||' Option item/Option class rows with bill seq id as '|| pConfigBillId,1);
4387: END IF;
4388:
4389: select /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */
4390: count(*) into v_zero_qty_count from bom_explosion_temp
4391: where bill_sequence_id = pConfigBillId and component_quantity = 0 ;
4392:
4393: oe_debug_pub.add( 'MODELS: CHECK Raise Exception for Zero QTY Count ' || v_zero_qty_count , 1 ) ;
4394:

Line 4414: /*update bom_explosion_temp set disable_date = g_futuredate

4410:
4411: /* begin Extend Effectivity Dates for Option Items with disable date */
4412:
4413: --Bug 7418622.FP for 7154767
4414: /*update bom_explosion_temp set disable_date = g_futuredate
4415: where ( component_item_id , operation_seq_num, nvl(assembly_item_id,-1) , disable_date) in
4416: ( select component_item_id, operation_seq_num, nvl(assembly_item_id,-1), max(disable_date)
4417: from bom_inventory_comps_interface
4418: where bill_sequence_id = pConfigBillId

Line 4422: UPDATE bom_explosion_temp

4418: where bill_sequence_id = pConfigBillId
4419: group by component_item_id, operation_seq_num, assembly_item_id)
4420: and disable_date <> g_futuredate ;*/
4421:
4422: UPDATE bom_explosion_temp
4423: SET disable_date = g_futuredate
4424: WHERE
4425: (
4426: component_item_id,

Line 4437: FROM bom_explosion_temp

4433: SELECT component_item_id ,
4434: --operation_seq_num ,
4435: NVL(assembly_item_id,-1),
4436: MAX(disable_date)
4437: FROM bom_explosion_temp
4438: WHERE bill_sequence_id = pConfigBillId
4439: GROUP BY component_item_id,
4440: -- Bugfix 16459665 - FP for 16318708: There should not be a group by on operation
4441: -- seqence otherwise the disable date is pushed to future for all the operations

Line 4465: INSERT INTO bom_explosion_temp

4461: lStmtNumber := 510;
4462:
4463: /*Insert Incl. items under Base Model */
4464:
4465: INSERT INTO bom_explosion_temp
4466: (
4467: top_bill_sequence_id,
4468: organization_id,
4469: plan_level,

Line 4652: -- UPDATE bom_explosion_temp bet

4648: -- FOR r1 in c_model_oc_oi_rows(pConfigBillId) LOOP
4649: -- IF r1.operation_seq_num = 1 AND
4650: -- instr(r1.component_code,'-',1,2)<>0
4651: -- THEN
4652: -- UPDATE bom_explosion_temp bet
4653: -- SET bet.operation_seq_num = (
4654: -- SELECT /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */
4655: -- nvl(operation_seq_num,1)
4656: -- FROM bom_explosion_temp

Line 4654: -- SELECT /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */

4650: -- instr(r1.component_code,'-',1,2)<>0
4651: -- THEN
4652: -- UPDATE bom_explosion_temp bet
4653: -- SET bet.operation_seq_num = (
4654: -- SELECT /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */
4655: -- nvl(operation_seq_num,1)
4656: -- FROM bom_explosion_temp
4657: -- WHERE component_code = substr(bet.component_code,1,to_number(instr(bet.component_code,'-',-1,1))-1)
4658: -- AND bill_sequence_id = pConfigBillId

Line 4656: -- FROM bom_explosion_temp

4652: -- UPDATE bom_explosion_temp bet
4653: -- SET bet.operation_seq_num = (
4654: -- SELECT /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */
4655: -- nvl(operation_seq_num,1)
4656: -- FROM bom_explosion_temp
4657: -- WHERE component_code = substr(bet.component_code,1,to_number(instr(bet.component_code,'-',-1,1))-1)
4658: -- AND bill_sequence_id = pConfigBillId
4659: -- AND top_bill_sequence_id = pConfigBillId)
4660: -- WHERE component_code = r1.component_code

Line 4699: -- UPDATE bom_explosion_temp bet

4695: -- IF r1.operation_seq_num = 1 AND instr(r1.component_code,'-',1,2)<>0 THEN
4696: -- IF PG_DEBUG <> 0 THEN -- 13079222
4697: -- oe_debug_pub.add ('Component Code: ' || r1.component_code,1);
4698: -- END IF;
4699: -- UPDATE bom_explosion_temp bet
4700: -- SET bet.operation_seq_num = (
4701: -- SELECT /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */
4702: -- --Bugfix 10167279: Adding the distinct clause
4703: -- distinct nvl(operation_seq_num,1) -- 2433862

Line 4701: -- SELECT /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */

4697: -- oe_debug_pub.add ('Component Code: ' || r1.component_code,1);
4698: -- END IF;
4699: -- UPDATE bom_explosion_temp bet
4700: -- SET bet.operation_seq_num = (
4701: -- SELECT /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */
4702: -- --Bugfix 10167279: Adding the distinct clause
4703: -- distinct nvl(operation_seq_num,1) -- 2433862
4704: -- FROM bom_explosion_temp
4705: -- WHERE component_code = substr(bet.component_code,1,to_number(instr(bet.component_code,'-',-1,1))-1)

Line 4704: -- FROM bom_explosion_temp

4700: -- SET bet.operation_seq_num = (
4701: -- SELECT /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */
4702: -- --Bugfix 10167279: Adding the distinct clause
4703: -- distinct nvl(operation_seq_num,1) -- 2433862
4704: -- FROM bom_explosion_temp
4705: -- WHERE component_code = substr(bet.component_code,1,to_number(instr(bet.component_code,'-',-1,1))-1)
4706: -- AND bill_sequence_id = pConfigBillId
4707: -- AND top_bill_sequence_id = pConfigBillId)
4708: -- WHERE component_code = r1.component_code

Line 4729: SELECT /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */

4725: END IF;
4726:
4727: lStmtNumber := 531;
4728: SELECT DISTINCT nvl(operation_seq_num,1) INTO l_bet_op_seq FROM (
4729: SELECT /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */
4730: operation_seq_num,
4731: Dense_Rank() over (PARTITION BY bill_sequence_id, component_item_id ORDER BY effectivity_date, operation_seq_num asc) rnk
4732: FROM bom_explosion_temp
4733: WHERE component_code = substr(r1.component_code,1,to_number(instr(r1.component_code,'-',-1,1))-1)

Line 4732: FROM bom_explosion_temp

4728: SELECT DISTINCT nvl(operation_seq_num,1) INTO l_bet_op_seq FROM (
4729: SELECT /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */
4730: operation_seq_num,
4731: Dense_Rank() over (PARTITION BY bill_sequence_id, component_item_id ORDER BY effectivity_date, operation_seq_num asc) rnk
4732: FROM bom_explosion_temp
4733: WHERE component_code = substr(r1.component_code,1,to_number(instr(r1.component_code,'-',-1,1))-1)
4734: AND SYSDATE >= effectivity_date
4735: AND SYSDATE <= Nvl(disable_date, sysdate)
4736: AND bill_sequence_id = pConfigBillId

Line 4754: SELECT /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */

4750:
4751: begin
4752: lStmtNumber := 532;
4753: SELECT DISTINCT nvl(operation_seq_num,1) INTO l_bet_op_seq FROM (
4754: SELECT /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */
4755: operation_seq_num,
4756: Dense_Rank() over (PARTITION BY bill_sequence_id, component_item_id ORDER BY effectivity_date, operation_seq_num asc) rnk
4757: FROM bom_explosion_temp
4758: WHERE component_code = substr(r1.component_code,1,to_number(instr(r1.component_code,'-',-1,1))-1)

Line 4757: FROM bom_explosion_temp

4753: SELECT DISTINCT nvl(operation_seq_num,1) INTO l_bet_op_seq FROM (
4754: SELECT /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */
4755: operation_seq_num,
4756: Dense_Rank() over (PARTITION BY bill_sequence_id, component_item_id ORDER BY effectivity_date, operation_seq_num asc) rnk
4757: FROM bom_explosion_temp
4758: WHERE component_code = substr(r1.component_code,1,to_number(instr(r1.component_code,'-',-1,1))-1)
4759: AND bill_sequence_id = pConfigBillId
4760: AND top_bill_sequence_id = pConfigBillId)
4761: WHERE rnk = 1;

Line 4784: UPDATE bom_explosion_temp bet

4780: oe_debug_pub.add ('Operation_sequence num : ' || l_bet_op_seq,1);
4781: END IF;
4782:
4783: lStmtNumber := 533;
4784: UPDATE bom_explosion_temp bet
4785: SET bet.operation_seq_num = l_bet_op_seq
4786: WHERE component_code = r1.component_code
4787: AND rowid = r1.rowid;
4788:

Line 4797: INSERT INTO bom_explosion_temp

4793:
4794: /* Open cursor c_incl_items_all_level */
4795:
4796: FOR r2 in c_incl_items_all_level (pOrgId ,pLineId ,pConfigBillId,g_SchShpDate,g_EstRelDate ) LOOP
4797: INSERT INTO bom_explosion_temp
4798: ( top_bill_sequence_id,
4799: organization_id,
4800: plan_level,
4801: sort_order,

Line 4979: select /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */

4975: assembly_item_id /* Bug Fix: 4147224 */
4976: , basis_type, /* LBM changes */
4977: batch_id
4978: )
4979: select /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */
4980: nvl(operation_seq_num,1), -- 2433862
4981: component_item_id,
4982: SYSDATE, -- last_updated_date
4983: 1, -- last_updated_by

Line 5049: from bom_explosion_temp

5045: top_item_id,
5046: assembly_item_id /* Bug Fix: 4147224 */
5047: , nvl(basis_type,1), /* LBM project */
5048: cto_msutil_pub.bom_batch_id
5049: from bom_explosion_temp
5050: where bill_sequence_id = pConfigBillId;
5051:
5052: lCnt := sql%rowcount ;
5053: IF PG_DEBUG <> 0 THEN

Line 5150: DELETE /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */

5146:
5147: lStmtNumber := 560;
5148:
5149: /*Flushing the temp table*/
5150: DELETE /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */
5151: from bom_explosion_temp
5152: WHERE bill_sequence_id = pConfigBillId;
5153:
5154: return(1);

Line 5151: from bom_explosion_temp

5147: lStmtNumber := 560;
5148:
5149: /*Flushing the temp table*/
5150: DELETE /*+ INDEX ( BOM_EXPLOSION_TEMP BOM_EXPLOSION_TEMP_N11) */
5151: from bom_explosion_temp
5152: WHERE bill_sequence_id = pConfigBillId;
5153:
5154: return(1);
5155: