DBA Data[Home] [Help]

APPS.CTO_CONFIG_ITEM_PK dependencies on CST_ITEM_COSTS

Line 6033: cst_item_costs c,

6029: DECODE(MP1.ORGANIZATION_ID, lShipFromOrg ,l_cost_group_id,1) cost_group_id
6030: /*
6031: commented due to reintroduction of bcso
6032: from mtl_parameters mp1,
6033: cst_item_costs c,
6034: mtl_system_items msi
6035: where c.organization_id = mp1.organization_id
6036: and c.inventory_item_id = pModelId
6037: and C.COST_TYPE_ID = 2 -- Average Costing

Line 6048: cst_item_costs c,

6044: and organization_id = mp1.organization_id);
6045: */
6046: from mtl_parameters mp1,
6047: mtl_parameters mp2,
6048: cst_item_costs c,
6049: bom_cto_src_orgs bcso
6050: where c.organization_id = mp1.organization_id
6051: and c.inventory_item_id = pModelId
6052: and C.COST_TYPE_ID = 2 -- Average Costing

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

6062: where inventory_item_id = pConfigId
6063: and organization_id = mp1.organization_id);
6064:
6065:
6066: v_material_cost cst_item_costs.material_cost%type := 0 ;
6067: v_material_overhead_cost cst_item_costs.material_overhead_cost%type := 0 ;
6068: v_resource_cost cst_item_costs.resource_cost%type := 0 ;
6069: v_outside_processing_cost cst_item_costs.outside_processing_cost%type := 0 ;
6070: v_overhead_cost cst_item_costs.overhead_cost%type := 0 ;

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

6063: and organization_id = mp1.organization_id);
6064:
6065:
6066: v_material_cost cst_item_costs.material_cost%type := 0 ;
6067: v_material_overhead_cost cst_item_costs.material_overhead_cost%type := 0 ;
6068: v_resource_cost cst_item_costs.resource_cost%type := 0 ;
6069: v_outside_processing_cost cst_item_costs.outside_processing_cost%type := 0 ;
6070: v_overhead_cost cst_item_costs.overhead_cost%type := 0 ;
6071:

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

6064:
6065:
6066: v_material_cost cst_item_costs.material_cost%type := 0 ;
6067: v_material_overhead_cost cst_item_costs.material_overhead_cost%type := 0 ;
6068: v_resource_cost cst_item_costs.resource_cost%type := 0 ;
6069: v_outside_processing_cost cst_item_costs.outside_processing_cost%type := 0 ;
6070: v_overhead_cost cst_item_costs.overhead_cost%type := 0 ;
6071:
6072:

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

6065:
6066: v_material_cost cst_item_costs.material_cost%type := 0 ;
6067: v_material_overhead_cost cst_item_costs.material_overhead_cost%type := 0 ;
6068: v_resource_cost cst_item_costs.resource_cost%type := 0 ;
6069: v_outside_processing_cost cst_item_costs.outside_processing_cost%type := 0 ;
6070: v_overhead_cost cst_item_costs.overhead_cost%type := 0 ;
6071:
6072:
6073: v_item_cost cst_item_costs.item_cost%type := 0 ;

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

6066: v_material_cost cst_item_costs.material_cost%type := 0 ;
6067: v_material_overhead_cost cst_item_costs.material_overhead_cost%type := 0 ;
6068: v_resource_cost cst_item_costs.resource_cost%type := 0 ;
6069: v_outside_processing_cost cst_item_costs.outside_processing_cost%type := 0 ;
6070: v_overhead_cost cst_item_costs.overhead_cost%type := 0 ;
6071:
6072:
6073: v_item_cost cst_item_costs.item_cost%type := 0 ;
6074: v_cto_cost_type_name cst_cost_types.cost_type%type;

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

6069: v_outside_processing_cost cst_item_costs.outside_processing_cost%type := 0 ;
6070: v_overhead_cost cst_item_costs.overhead_cost%type := 0 ;
6071:
6072:
6073: v_item_cost cst_item_costs.item_cost%type := 0 ;
6074: v_cto_cost_type_name cst_cost_types.cost_type%type;
6075: v_item_cost_frozen cst_item_costs.item_cost%type; --Bugfix 6363308
6076: l_cost_update number; --Bugfix 6363308
6077:

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

6071:
6072:
6073: v_item_cost cst_item_costs.item_cost%type := 0 ;
6074: v_cto_cost_type_name cst_cost_types.cost_type%type;
6075: v_item_cost_frozen cst_item_costs.item_cost%type; --Bugfix 6363308
6076: l_cost_update number; --Bugfix 6363308
6077:
6078: --Bugfix 6363308
6079: CURSOR get_orgs_with_frozen_cost ( p_config_item_id NUMBER)

Line 6083: FROM cst_item_costs

6079: CURSOR get_orgs_with_frozen_cost ( p_config_item_id NUMBER)
6080: IS
6081: SELECT organization_id
6082: , item_cost
6083: FROM cst_item_costs
6084: WHERE inventory_item_id = p_config_item_id
6085: AND cost_type_id = 1;
6086:
6087: v_organization_id NUMBER;

Line 6375: cst_item_costs C,

6371: l_rt_cicd_summary.outside_processing_cost,
6372: l_rt_cicd_summary.overhead_cost
6373: from
6374: mtl_parameters MP1,
6375: cst_item_costs C,
6376: cst_item_cost_details CICD,
6377: mtl_system_items S -- 4172300
6378: where S.organization_id = C.organization_id
6379: and S.inventory_item_id = C.inventory_item_id

Line 6399: from CST_ITEM_COSTS

6395: (mp2.organization_id = mp3.master_organization_id))
6396: )
6397: and NOT EXISTS
6398: (select NULL
6399: from CST_ITEM_COSTS
6400: where inventory_item_id = pConfigId
6401: and organization_id = mp1.cost_organization_id
6402: and cost_type_id in (mp1.primary_cost_method, mp1.avg_rates_cost_type_id))
6403: group by C.organization_id, C.cost_type_id; -- 4172300

Line 6445: Insert a row into the cst_item_costs_table

6441:
6442: end if;
6443:
6444: /*-------------------------------------------------------+
6445: Insert a row into the cst_item_costs_table
6446: +------------------------------------------------------- */
6447:
6448: lStmtNumber := 220;
6449:

Line 6450: insert into CST_ITEM_COSTS

6446: +------------------------------------------------------- */
6447:
6448: lStmtNumber := 220;
6449:
6450: insert into CST_ITEM_COSTS
6451: (inventory_item_id,
6452: organization_id,
6453: cost_type_id,
6454: last_update_date,

Line 6555: cst_item_costs C,

6551: C.attribute14,
6552: C.attribute15
6553: from
6554: mtl_parameters MP1,
6555: cst_item_costs C,
6556: mtl_system_items S,
6557: bom_cto_src_orgs bcso
6558: where S.organization_id = C.organization_id
6559: and S.inventory_item_id = C.inventory_item_id

Line 6569: from CST_ITEM_COSTS

6565: and C.organization_id = MP1.organization_id
6566: and mp1.organization_id = bcso.organization_id
6567: and NOT EXISTS
6568: (select NULL
6569: from CST_ITEM_COSTS
6570: where inventory_item_id = pConfigId
6571: and organization_id = mp1.organization_id
6572: and cost_type_id in (mp1.primary_cost_method, mp1.avg_rates_cost_type_id));
6573:

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

6576: lCnt := sql%rowcount;
6577: --Bugfix 6717614
6578:
6579: IF PG_DEBUG <> 0 THEN
6580: oe_debug_pub.add('Create_Item: ' || ' config item ' || pConfigId || ' after insert:CST_ITEM_COSTS inserted '|| to_char(lCnt),2);
6581: END IF;
6582:
6583:
6584: if( l_rt_cicd_summary.cost_type_id.count> 0 ) then

Line 6586: UPDATE cst_item_costs

6582:
6583:
6584: if( l_rt_cicd_summary.cost_type_id.count> 0 ) then
6585: FORALL j IN 1..l_rt_cicd_summary.cost_type_id.last
6586: UPDATE cst_item_costs
6587: set material_cost = l_rt_cicd_summary.material_cost(j),
6588: material_overhead_cost = l_rt_cicd_summary.material_overhead_cost(j),
6589: resource_cost = l_rt_cicd_summary.resource_cost(j),
6590: outside_processing_cost = l_rt_cicd_summary.outside_processing_cost(j),

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

6602: and cost_type_id = l_rt_cicd_summary.cost_type_id(j) ;
6603:
6604:
6605: IF PG_DEBUG <> 0 THEN
6606: oe_debug_pub.add('Create_Item: ' || 'after update:CST_ITEM_COSTS '|| to_char(sql%rowcount),2);
6607: END IF;
6608: else
6609:
6610: oe_debug_pub.add( 'No update required to CST_ITEM_COSTS as no new records inserted ' , 1 ) ;

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

6606: oe_debug_pub.add('Create_Item: ' || 'after update:CST_ITEM_COSTS '|| to_char(sql%rowcount),2);
6607: END IF;
6608: else
6609:
6610: oe_debug_pub.add( 'No update required to CST_ITEM_COSTS as no new records inserted ' , 1 ) ;
6611:
6612: end if;
6613:
6614:

Line 6668: insert into CST_ITEM_COSTS

6664: /* end bugfix 4057651, default CTO cost type id = 7 if it does not exist */
6665:
6666:
6667:
6668: insert into CST_ITEM_COSTS
6669: (inventory_item_id,
6670: organization_id,
6671: cost_type_id,
6672: last_update_date,

Line 6773: cst_item_costs C,

6769: C.attribute14,
6770: C.attribute15
6771: from
6772: mtl_parameters MP1,
6773: cst_item_costs C,
6774: mtl_system_items S,
6775: bom_cto_src_orgs bcso
6776: where S.organization_id = C.organization_id
6777: and S.inventory_item_id = C.inventory_item_id

Line 6788: from CST_ITEM_COSTS

6784: and C.organization_id = MP1.organization_id
6785: and mp1.organization_id = bcso.organization_id
6786: and NOT EXISTS
6787: (select NULL
6788: from CST_ITEM_COSTS
6789: where inventory_item_id = pConfigId
6790: and organization_id = mp1.organization_id
6791: and cost_type_id = l_cto_cost_type_id);
6792:

Line 6803: UPDATE cst_item_costs

6799:
6800:
6801: if( l_rt_cicd_summary.cost_type_id.count > 0 ) then
6802: FORALL j IN 1..l_rt_cicd_summary.cost_type_id.last
6803: UPDATE cst_item_costs
6804: set material_cost = l_rt_cicd_summary.material_cost(j),
6805: material_overhead_cost = l_rt_cicd_summary.material_overhead_cost(j),
6806: resource_cost = l_rt_cicd_summary.resource_cost(j),
6807: outside_processing_cost = l_rt_cicd_summary.outside_processing_cost(j),

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

6819: and cost_type_id = l_cto_cost_type_id ;
6820:
6821:
6822: IF PG_DEBUG <> 0 THEN
6823: oe_debug_pub.add('Create_Item: ' || 'after update:cst_item_costs for CTO cost type '||to_char(sql%rowcount),2);
6824: END IF;
6825:
6826: else
6827:

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

6824: END IF;
6825:
6826: else
6827:
6828: oe_debug_pub.add( 'No update required to CST_ITEM_COSTS for CTO cost type as no new records inserted ' , 1 ) ;
6829:
6830: end if;
6831:
6832:

Line 7125: UPDATE CST_ITEM_COSTS

7121: From DUAL;
7122:
7123: lStmtNumber := 233;
7124:
7125: UPDATE CST_ITEM_COSTS
7126: SET cost_update_id = l_cost_update
7127: WHERE ORGANIZATION_ID = v_organization_id
7128: AND INVENTORY_ITEM_ID = pConfigId
7129: AND COST_TYPE_ID = 1;