DBA Data[Home] [Help]

APPS.CTO_CONFIG_ITEM_PK dependencies on CST_ITEM_COSTS

Line 6218: cst_item_costs c,

6214: DECODE(MP1.ORGANIZATION_ID, lShipFromOrg ,l_cost_group_id,1) cost_group_id
6215: /*
6216: commented due to reintroduction of bcso
6217: from mtl_parameters mp1,
6218: cst_item_costs c,
6219: mtl_system_items msi
6220: where c.organization_id = mp1.organization_id
6221: and c.inventory_item_id = pModelId
6222: and C.COST_TYPE_ID = 2 -- Average Costing

Line 6233: cst_item_costs c,

6229: and organization_id = mp1.organization_id);
6230: */
6231: from mtl_parameters mp1,
6232: mtl_parameters mp2,
6233: cst_item_costs c,
6234: bom_cto_src_orgs bcso
6235: where c.organization_id = mp1.organization_id
6236: and c.inventory_item_id = pModelId
6237: and C.COST_TYPE_ID = 2 -- Average Costing

Line 6251: v_material_cost cst_item_costs.material_cost%type := 0 ;

6247: where inventory_item_id = pConfigId
6248: and organization_id = mp1.organization_id);
6249:
6250:
6251: v_material_cost cst_item_costs.material_cost%type := 0 ;
6252: v_material_overhead_cost cst_item_costs.material_overhead_cost%type := 0 ;
6253: v_resource_cost cst_item_costs.resource_cost%type := 0 ;
6254: v_outside_processing_cost cst_item_costs.outside_processing_cost%type := 0 ;
6255: v_overhead_cost cst_item_costs.overhead_cost%type := 0 ;

Line 6252: v_material_overhead_cost cst_item_costs.material_overhead_cost%type := 0 ;

6248: and organization_id = mp1.organization_id);
6249:
6250:
6251: v_material_cost cst_item_costs.material_cost%type := 0 ;
6252: v_material_overhead_cost cst_item_costs.material_overhead_cost%type := 0 ;
6253: v_resource_cost cst_item_costs.resource_cost%type := 0 ;
6254: v_outside_processing_cost cst_item_costs.outside_processing_cost%type := 0 ;
6255: v_overhead_cost cst_item_costs.overhead_cost%type := 0 ;
6256:

Line 6253: v_resource_cost cst_item_costs.resource_cost%type := 0 ;

6249:
6250:
6251: v_material_cost cst_item_costs.material_cost%type := 0 ;
6252: v_material_overhead_cost cst_item_costs.material_overhead_cost%type := 0 ;
6253: v_resource_cost cst_item_costs.resource_cost%type := 0 ;
6254: v_outside_processing_cost cst_item_costs.outside_processing_cost%type := 0 ;
6255: v_overhead_cost cst_item_costs.overhead_cost%type := 0 ;
6256:
6257:

Line 6254: v_outside_processing_cost cst_item_costs.outside_processing_cost%type := 0 ;

6250:
6251: v_material_cost cst_item_costs.material_cost%type := 0 ;
6252: v_material_overhead_cost cst_item_costs.material_overhead_cost%type := 0 ;
6253: v_resource_cost cst_item_costs.resource_cost%type := 0 ;
6254: v_outside_processing_cost cst_item_costs.outside_processing_cost%type := 0 ;
6255: v_overhead_cost cst_item_costs.overhead_cost%type := 0 ;
6256:
6257:
6258: v_item_cost cst_item_costs.item_cost%type := 0 ;

Line 6255: v_overhead_cost cst_item_costs.overhead_cost%type := 0 ;

6251: v_material_cost cst_item_costs.material_cost%type := 0 ;
6252: v_material_overhead_cost cst_item_costs.material_overhead_cost%type := 0 ;
6253: v_resource_cost cst_item_costs.resource_cost%type := 0 ;
6254: v_outside_processing_cost cst_item_costs.outside_processing_cost%type := 0 ;
6255: v_overhead_cost cst_item_costs.overhead_cost%type := 0 ;
6256:
6257:
6258: v_item_cost cst_item_costs.item_cost%type := 0 ;
6259: v_cto_cost_type_name cst_cost_types.cost_type%type;

Line 6258: v_item_cost cst_item_costs.item_cost%type := 0 ;

6254: v_outside_processing_cost cst_item_costs.outside_processing_cost%type := 0 ;
6255: v_overhead_cost cst_item_costs.overhead_cost%type := 0 ;
6256:
6257:
6258: v_item_cost cst_item_costs.item_cost%type := 0 ;
6259: v_cto_cost_type_name cst_cost_types.cost_type%type;
6260: v_item_cost_frozen cst_item_costs.item_cost%type; --Bugfix 6363308
6261: l_cost_update number; --Bugfix 6363308
6262:

Line 6260: v_item_cost_frozen cst_item_costs.item_cost%type; --Bugfix 6363308

6256:
6257:
6258: v_item_cost cst_item_costs.item_cost%type := 0 ;
6259: v_cto_cost_type_name cst_cost_types.cost_type%type;
6260: v_item_cost_frozen cst_item_costs.item_cost%type; --Bugfix 6363308
6261: l_cost_update number; --Bugfix 6363308
6262:
6263: --Bugfix 6363308
6264: CURSOR get_orgs_with_frozen_cost ( p_config_item_id NUMBER)

Line 6268: FROM cst_item_costs

6264: CURSOR get_orgs_with_frozen_cost ( p_config_item_id NUMBER)
6265: IS
6266: SELECT organization_id
6267: , item_cost
6268: FROM cst_item_costs
6269: WHERE inventory_item_id = p_config_item_id
6270: AND cost_type_id = 1;
6271:
6272: v_organization_id NUMBER;

Line 6560: cst_item_costs C,

6556: l_rt_cicd_summary.outside_processing_cost,
6557: l_rt_cicd_summary.overhead_cost
6558: from
6559: mtl_parameters MP1,
6560: cst_item_costs C,
6561: cst_item_cost_details CICD,
6562: mtl_system_items S -- 4172300
6563: where S.organization_id = C.organization_id
6564: and S.inventory_item_id = C.inventory_item_id

Line 6584: from CST_ITEM_COSTS

6580: (mp2.organization_id = mp3.master_organization_id))
6581: )
6582: and NOT EXISTS
6583: (select NULL
6584: from CST_ITEM_COSTS
6585: where inventory_item_id = pConfigId
6586: and organization_id = mp1.cost_organization_id
6587: and cost_type_id in (mp1.primary_cost_method, mp1.avg_rates_cost_type_id))
6588: group by C.organization_id, C.cost_type_id; -- 4172300

Line 6630: Insert a row into the cst_item_costs_table

6626:
6627: end if;
6628:
6629: /*-------------------------------------------------------+
6630: Insert a row into the cst_item_costs_table
6631: +------------------------------------------------------- */
6632:
6633: lStmtNumber := 220;
6634:

Line 6635: insert into CST_ITEM_COSTS

6631: +------------------------------------------------------- */
6632:
6633: lStmtNumber := 220;
6634:
6635: insert into CST_ITEM_COSTS
6636: (inventory_item_id,
6637: organization_id,
6638: cost_type_id,
6639: last_update_date,

Line 6740: cst_item_costs C,

6736: C.attribute14,
6737: C.attribute15
6738: from
6739: mtl_parameters MP1,
6740: cst_item_costs C,
6741: mtl_system_items S,
6742: bom_cto_src_orgs bcso
6743: where S.organization_id = C.organization_id
6744: and S.inventory_item_id = C.inventory_item_id

Line 6754: from CST_ITEM_COSTS

6750: and C.organization_id = MP1.organization_id
6751: and mp1.organization_id = bcso.organization_id
6752: and NOT EXISTS
6753: (select NULL
6754: from CST_ITEM_COSTS
6755: where inventory_item_id = pConfigId
6756: and organization_id = mp1.organization_id
6757: and cost_type_id in (mp1.primary_cost_method, mp1.avg_rates_cost_type_id));
6758:

Line 6765: oe_debug_pub.add('Create_Item: ' || ' config item ' || pConfigId || ' after insert:CST_ITEM_COSTS inserted '|| to_char(lCnt),2);

6761: lCnt := sql%rowcount;
6762: --Bugfix 6717614
6763:
6764: IF PG_DEBUG <> 0 THEN
6765: oe_debug_pub.add('Create_Item: ' || ' config item ' || pConfigId || ' after insert:CST_ITEM_COSTS inserted '|| to_char(lCnt),2);
6766: END IF;
6767:
6768:
6769: if( l_rt_cicd_summary.cost_type_id.count> 0 ) then

Line 6771: UPDATE cst_item_costs

6767:
6768:
6769: if( l_rt_cicd_summary.cost_type_id.count> 0 ) then
6770: FORALL j IN 1..l_rt_cicd_summary.cost_type_id.last
6771: UPDATE cst_item_costs
6772: set material_cost = l_rt_cicd_summary.material_cost(j),
6773: material_overhead_cost = l_rt_cicd_summary.material_overhead_cost(j),
6774: resource_cost = l_rt_cicd_summary.resource_cost(j),
6775: outside_processing_cost = l_rt_cicd_summary.outside_processing_cost(j),

Line 6791: oe_debug_pub.add('Create_Item: ' || 'after update:CST_ITEM_COSTS '|| to_char(sql%rowcount),2);

6787: and cost_type_id = l_rt_cicd_summary.cost_type_id(j) ;
6788:
6789:
6790: IF PG_DEBUG <> 0 THEN
6791: oe_debug_pub.add('Create_Item: ' || 'after update:CST_ITEM_COSTS '|| to_char(sql%rowcount),2);
6792: END IF;
6793: else
6794:
6795: oe_debug_pub.add( 'No update required to CST_ITEM_COSTS as no new records inserted ' , 1 ) ;

Line 6795: oe_debug_pub.add( 'No update required to CST_ITEM_COSTS as no new records inserted ' , 1 ) ;

6791: oe_debug_pub.add('Create_Item: ' || 'after update:CST_ITEM_COSTS '|| to_char(sql%rowcount),2);
6792: END IF;
6793: else
6794:
6795: oe_debug_pub.add( 'No update required to CST_ITEM_COSTS as no new records inserted ' , 1 ) ;
6796:
6797: end if;
6798:
6799:

Line 6853: insert into CST_ITEM_COSTS

6849: /* end bugfix 4057651, default CTO cost type id = 7 if it does not exist */
6850:
6851:
6852:
6853: insert into CST_ITEM_COSTS
6854: (inventory_item_id,
6855: organization_id,
6856: cost_type_id,
6857: last_update_date,

Line 6958: cst_item_costs C,

6954: C.attribute14,
6955: C.attribute15
6956: from
6957: mtl_parameters MP1,
6958: cst_item_costs C,
6959: mtl_system_items S,
6960: bom_cto_src_orgs bcso
6961: where S.organization_id = C.organization_id
6962: and S.inventory_item_id = C.inventory_item_id

Line 6973: from CST_ITEM_COSTS

6969: and C.organization_id = MP1.organization_id
6970: and mp1.organization_id = bcso.organization_id
6971: and NOT EXISTS
6972: (select NULL
6973: from CST_ITEM_COSTS
6974: where inventory_item_id = pConfigId
6975: and organization_id = mp1.organization_id
6976: and cost_type_id = l_cto_cost_type_id);
6977:

Line 6988: UPDATE cst_item_costs

6984:
6985:
6986: if( l_rt_cicd_summary.cost_type_id.count > 0 ) then
6987: FORALL j IN 1..l_rt_cicd_summary.cost_type_id.last
6988: UPDATE cst_item_costs
6989: set material_cost = l_rt_cicd_summary.material_cost(j),
6990: material_overhead_cost = l_rt_cicd_summary.material_overhead_cost(j),
6991: resource_cost = l_rt_cicd_summary.resource_cost(j),
6992: outside_processing_cost = l_rt_cicd_summary.outside_processing_cost(j),

Line 7008: oe_debug_pub.add('Create_Item: ' || 'after update:cst_item_costs for CTO cost type '||to_char(sql%rowcount),2);

7004: and cost_type_id = l_cto_cost_type_id ;
7005:
7006:
7007: IF PG_DEBUG <> 0 THEN
7008: oe_debug_pub.add('Create_Item: ' || 'after update:cst_item_costs for CTO cost type '||to_char(sql%rowcount),2);
7009: END IF;
7010:
7011: else
7012:

Line 7013: oe_debug_pub.add( 'No update required to CST_ITEM_COSTS for CTO cost type as no new records inserted ' , 1 ) ;

7009: END IF;
7010:
7011: else
7012:
7013: oe_debug_pub.add( 'No update required to CST_ITEM_COSTS for CTO cost type as no new records inserted ' , 1 ) ;
7014:
7015: end if;
7016:
7017:

Line 7310: UPDATE CST_ITEM_COSTS

7306: From DUAL;
7307:
7308: lStmtNumber := 233;
7309:
7310: UPDATE CST_ITEM_COSTS
7311: SET cost_update_id = l_cost_update
7312: WHERE ORGANIZATION_ID = v_organization_id
7313: AND INVENTORY_ITEM_ID = pConfigId
7314: AND COST_TYPE_ID = 1;