DBA Data[Home] [Help]

APPS.CST_INVENTORY_PVT dependencies on STANDARD

Line 80: -- Standard Start of API savepoint

76: l_def_cost_type_id NUMBER;
77: l_cost_org_id NUMBER;
78: l_primary_cost_method NUMBER;
79: BEGIN
80: -- Standard Start of API savepoint
81: SAVEPOINT Populate_ItemList_PVT;
82:
83: -- Check for call compatibility
84: IF NOT FND_API.Compatible_API_Call(

Line 462: -- Standard Start of API savepoint

458: l_api_version CONSTANT NUMBER := 1.0;
459: l_msg_level_threshold NUMBER;
460: l_stmt_num NUMBER := 0;
461: BEGIN
462: -- Standard Start of API savepoint
463: SAVEPOINT Populate_CostGroupList_PVT;
464:
465: -- Check for call compatibility
466: IF NOT FND_API.Compatible_API_Call(

Line 642: -- Standard Start of API savepoint

638: l_api_version CONSTANT NUMBER := 1.0;
639: l_msg_level_threshold NUMBER;
640: l_stmt_num NUMBER := 0;
641: BEGIN
642: -- Standard Start of API savepoint
643: SAVEPOINT Populate_SubinventoryList_PVT;
644:
645: -- Check for call compatibility
646: IF NOT FND_API.Compatible_API_Call(

Line 741: -- Standard Start of API savepoint

737: l_msg_level_threshold NUMBER;
738: l_stmt_num NUMBER := 0;
739: l_cost_method NUMBER; /*Bug 9161102 : FP of Bug 7355767*/
740: BEGIN
741: -- Standard Start of API savepoint
742: SAVEPOINT Calculate_OnhandQty_PVT;
743:
744: -- Check for call compatibility
745: IF NOT FND_API.Compatible_API_Call(

Line 969: -- standard cost updates (non-PJM/WMS)

965: -- Ignore periodic cost updates
966: AND MMT.transaction_source_type_id <> 14
967: -- The only transactions other than the ones ignored above that
968: -- affect inventory valuation and have null cost_group_id are
969: -- standard cost updates (non-PJM/WMS)
970: AND ( ( MMT.transaction_type_id = 24
971: AND MMT.cost_group_id IS NULL
972: )
973: OR EXISTS (

Line 1094: -- Standard Start of API savepoint

1090: --BUG#6109468-FPBUG5606455
1091: l_uncosted_txn_count NUMBER;
1092: l_stmt_num NUMBER := 0;
1093: BEGIN
1094: -- Standard Start of API savepoint
1095: SAVEPOINT Calculate_IntransitQty_PVT;
1096:
1097: -- Check for call compatibility
1098: IF NOT FND_API.Compatible_API_Call(

Line 3203: -- Standard Start of API savepoint

3199: l_api_version CONSTANT NUMBER := 1.0;
3200: l_msg_level_threshold NUMBER;
3201: l_stmt_num NUMBER := 0;
3202: BEGIN
3203: -- Standard Start of API savepoint
3204: SAVEPOINT Calculate_ReceivingQty_PVT;
3205:
3206: -- Check for call compatibility
3207: IF NOT FND_API.Compatible_API_Call(

Line 3517: CURSOR c_standard IS

3513: l_rcv_cost_source NUMBER; -- added in 12i for as of date changes
3514: l_exp_item_flag NUMBER;
3515: l_rec cst_inv_cost_temp%ROWTYPE;
3516:
3517: CURSOR c_standard IS
3518: SELECT DISTINCT
3519: CIQT.organization_id,
3520: CIQT.inventory_item_id,
3521: CIQT.cost_type_id

Line 3597: -- Standard update only originated by standard cost update avoid PAC cost update

3593: AND MMT.transaction_date > p_valuation_date
3594: AND mmt.transaction_action_id NOT IN (5,30,40,41,42,43,50,51,52,/* 9764385: 15,22,*/11,17,10,13,9,14,7,26,36,25,56,57)
3595: AND NOT (mmt.transaction_action_id IN (2,28,55,3) AND mmt.primary_quantity > 0)
3596: --
3597: -- Standard update only originated by standard cost update avoid PAC cost update
3598: --
3599: AND NOT (mmt.transaction_action_id = 24 AND mmt.transaction_source_type_id <> 11)
3600: AND MMT.inventory_item_id = p_inventory_item_id
3601: AND MMT.organization_id = p_organization_id

Line 3686: l_rec.inventory_asset_flag := 1; --Standard cost update is only done for asset items

3682: l_rec.organization_id := p_organization_id;
3683: l_rec.inventory_item_id := p_inventory_item_id;
3684: l_rec.cost_type_id := 1;
3685: l_rec.cost_source := 2; --PAST
3686: l_rec.inventory_asset_flag := 1; --Standard cost update is only done for asset items
3687:
3688: IF( l_mcacd_txn IS NOT null) THEN
3689: log(' MCACD TXN FOUND');
3690:

Line 3729: -- Standard Start of API savepoint

3725:
3726: END use_transactional_cost;
3727:
3728: BEGIN
3729: -- Standard Start of API savepoint
3730: SAVEPOINT Calculate_InventoryCost_PVT;
3731:
3732: -- Check for call compatibility
3733: IF NOT FND_API.Compatible_API_Call(

Line 3762: -- Calculate the costs for CIQT records that belongs to Standard costing

3758: END IF;
3759:
3760: IF p_valuation_date IS NULL
3761: THEN
3762: -- Calculate the costs for CIQT records that belongs to Standard costing
3763: -- organizations
3764: OPEN c_standard;
3765: l_stmt_num := 10;
3766: LOOP

Line 3764: OPEN c_standard;

3760: IF p_valuation_date IS NULL
3761: THEN
3762: -- Calculate the costs for CIQT records that belongs to Standard costing
3763: -- organizations
3764: OPEN c_standard;
3765: l_stmt_num := 10;
3766: LOOP
3767: FETCH c_standard
3768: INTO l_organization_id,

Line 3767: FETCH c_standard

3763: -- organizations
3764: OPEN c_standard;
3765: l_stmt_num := 10;
3766: LOOP
3767: FETCH c_standard
3768: INTO l_organization_id,
3769: l_inventory_item_id,
3770: l_cost_type_id;
3771:

Line 3773: WHEN c_standard%NOTFOUND;

3769: l_inventory_item_id,
3770: l_cost_type_id;
3771:
3772: EXIT
3773: WHEN c_standard%NOTFOUND;
3774:
3775: INSERT
3776: INTO cst_inv_cost_temp(
3777: organization_id,

Line 3812: p_error_text => l_stmt_num||': Calculated '||c_standard%ROWCOUNT||

3808: THEN
3809: FND_MSG_PUB.Add_Exc_Msg(
3810: p_pkg_name => G_PKG_NAME,
3811: p_procedure_name => l_api_name,
3812: p_error_text => l_stmt_num||': Calculated '||c_standard%ROWCOUNT||
3813: ' current standard costs'
3814: );
3815: END IF;
3816: CLOSE c_standard;

Line 3813: ' current standard costs'

3809: FND_MSG_PUB.Add_Exc_Msg(
3810: p_pkg_name => G_PKG_NAME,
3811: p_procedure_name => l_api_name,
3812: p_error_text => l_stmt_num||': Calculated '||c_standard%ROWCOUNT||
3813: ' current standard costs'
3814: );
3815: END IF;
3816: CLOSE c_standard;
3817:

Line 3816: CLOSE c_standard;

3812: p_error_text => l_stmt_num||': Calculated '||c_standard%ROWCOUNT||
3813: ' current standard costs'
3814: );
3815: END IF;
3816: CLOSE c_standard;
3817:
3818:
3819:
3820: -- Calculate the costs for CIQT records that belong to Actual costing

Line 3921: OPEN c_standard;

3917: /* Set rcv_cost_source to 3 for Current Receiving Cost */
3918: l_rcv_cost_source := 3;
3919:
3920: ELSE /* p_valuation_date is not null: Calculate Past Costs */
3921: OPEN c_standard;
3922: l_stmt_num := 40;
3923:
3924: IF l_msg_level_threshold <= FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW
3925: THEN

Line 3930: 'past standard costs'

3926: FND_MSG_PUB.Add_Exc_Msg(
3927: p_pkg_name => G_PKG_NAME,
3928: p_procedure_name => l_api_name,
3929: p_error_text => l_stmt_num||': Calculating '||
3930: 'past standard costs'
3931: );
3932: END IF;
3933:
3934:

Line 3936: FETCH c_standard

3932: END IF;
3933:
3934:
3935: LOOP
3936: FETCH c_standard
3937: INTO l_organization_id,
3938: l_inventory_item_id,
3939: l_cost_type_id;
3940:

Line 3942: WHEN c_standard%NOTFOUND;

3938: l_inventory_item_id,
3939: l_cost_type_id;
3940:
3941: EXIT
3942: WHEN c_standard%NOTFOUND;
3943:
3944: l_min_cost_update_id := NULL;
3945: l_max_cost_update_id := NULL;
3946:

Line 4040: FROM cst_standard_costs CSC,

4036: --get the cost update history ID after the end period call
4037:
4038: SELECT MIN(CSC.cost_update_id)
4039: INTO l_min_cost_update_id
4040: FROM cst_standard_costs CSC,
4041: mtl_parameters MP
4042: WHERE MP.organization_id = l_organization_id
4043: AND CSC.organization_id = MP.cost_organization_id
4044: AND CSC.inventory_item_id = l_inventory_item_id

Line 4045: AND CSC.standard_cost_revision_date > p_valuation_date;

4041: mtl_parameters MP
4042: WHERE MP.organization_id = l_organization_id
4043: AND CSC.organization_id = MP.cost_organization_id
4044: AND CSC.inventory_item_id = l_inventory_item_id
4045: AND CSC.standard_cost_revision_date > p_valuation_date;
4046: -- This logic will only work if the CSC records with
4047: -- standard_cost_revision_date > p_valuation_date have not
4048: -- been purged. Although CSC is populated for cost child
4049: -- organizations, CEC is not. We join through MP to be

Line 4047: -- standard_cost_revision_date > p_valuation_date have not

4043: AND CSC.organization_id = MP.cost_organization_id
4044: AND CSC.inventory_item_id = l_inventory_item_id
4045: AND CSC.standard_cost_revision_date > p_valuation_date;
4046: -- This logic will only work if the CSC records with
4047: -- standard_cost_revision_date > p_valuation_date have not
4048: -- been purged. Although CSC is populated for cost child
4049: -- organizations, CEC is not. We join through MP to be
4050: -- consistent.
4051:

Line 4059: FROM cst_standard_costs CSC,

4055: IF l_min_cost_update_id IS NOT NULL THEN
4056: -- Yes. Figure out the prior cost update
4057: SELECT MAX(CSC.cost_update_id)
4058: INTO l_max_cost_update_id
4059: FROM cst_standard_costs CSC,
4060: mtl_parameters MP
4061: WHERE MP.organization_id = l_organization_id
4062: AND CSC.organization_id = MP.cost_organization_id
4063: AND CSC.inventory_item_id = l_inventory_item_id

Line 4064: AND CSC.standard_cost_revision_date <= p_valuation_date;

4060: mtl_parameters MP
4061: WHERE MP.organization_id = l_organization_id
4062: AND CSC.organization_id = MP.cost_organization_id
4063: AND CSC.inventory_item_id = l_inventory_item_id
4064: AND CSC.standard_cost_revision_date <= p_valuation_date;
4065: --bug#13384489 begin
4066: --l_latest_cost_update_id
4067: DECLARE
4068: CURSOR csc_cur

Line 4071: FROM cst_standard_costs CSC,

4067: DECLARE
4068: CURSOR csc_cur
4069: IS
4070: SELECT CSC.cost_update_id
4071: FROM cst_standard_costs CSC,
4072: mtl_parameters MP
4073: WHERE MP.organization_id = l_organization_id
4074: AND CSC.organization_id = MP.cost_organization_id
4075: AND CSC.inventory_item_id = l_inventory_item_id

Line 4076: AND CSC.standard_cost_revision_date <= p_valuation_date

4072: mtl_parameters MP
4073: WHERE MP.organization_id = l_organization_id
4074: AND CSC.organization_id = MP.cost_organization_id
4075: AND CSC.inventory_item_id = l_inventory_item_id
4076: AND CSC.standard_cost_revision_date <= p_valuation_date
4077: order by CSC.standard_cost_revision_date DESC; -- to get the latest updated record's cost_update_id
4078: BEGIN
4079: OPEN csc_cur;
4080: FETCH csc_cur INTO l_latest_cost_update_id;

Line 4077: order by CSC.standard_cost_revision_date DESC; -- to get the latest updated record's cost_update_id

4073: WHERE MP.organization_id = l_organization_id
4074: AND CSC.organization_id = MP.cost_organization_id
4075: AND CSC.inventory_item_id = l_inventory_item_id
4076: AND CSC.standard_cost_revision_date <= p_valuation_date
4077: order by CSC.standard_cost_revision_date DESC; -- to get the latest updated record's cost_update_id
4078: BEGIN
4079: OPEN csc_cur;
4080: FETCH csc_cur INTO l_latest_cost_update_id;
4081: CLOSE csc_cur;

Line 4110: 1, -- Standard cost update is only done for asset items

4106: SELECT l_organization_id,
4107: l_inventory_item_id,
4108: 1,
4109: 2, -- PAST
4110: 1, -- Standard cost update is only done for asset items
4111: SUM(NVL(CEC.standard_cost,0)),
4112: SUM(DECODE(CEC.cost_element_id,1,NVL(CEC.standard_cost,0),0)),
4113: SUM(DECODE(CEC.cost_element_id,2,NVL(CEC.standard_cost,0),0)),
4114: SUM(DECODE(CEC.cost_element_id,3,NVL(CEC.standard_cost,0),0)),

Line 4111: SUM(NVL(CEC.standard_cost,0)),

4107: l_inventory_item_id,
4108: 1,
4109: 2, -- PAST
4110: 1, -- Standard cost update is only done for asset items
4111: SUM(NVL(CEC.standard_cost,0)),
4112: SUM(DECODE(CEC.cost_element_id,1,NVL(CEC.standard_cost,0),0)),
4113: SUM(DECODE(CEC.cost_element_id,2,NVL(CEC.standard_cost,0),0)),
4114: SUM(DECODE(CEC.cost_element_id,3,NVL(CEC.standard_cost,0),0)),
4115: SUM(DECODE(CEC.cost_element_id,4,NVL(CEC.standard_cost,0),0)),

Line 4112: SUM(DECODE(CEC.cost_element_id,1,NVL(CEC.standard_cost,0),0)),

4108: 1,
4109: 2, -- PAST
4110: 1, -- Standard cost update is only done for asset items
4111: SUM(NVL(CEC.standard_cost,0)),
4112: SUM(DECODE(CEC.cost_element_id,1,NVL(CEC.standard_cost,0),0)),
4113: SUM(DECODE(CEC.cost_element_id,2,NVL(CEC.standard_cost,0),0)),
4114: SUM(DECODE(CEC.cost_element_id,3,NVL(CEC.standard_cost,0),0)),
4115: SUM(DECODE(CEC.cost_element_id,4,NVL(CEC.standard_cost,0),0)),
4116: SUM(DECODE(CEC.cost_element_id,5,NVL(CEC.standard_cost,0),0))

Line 4113: SUM(DECODE(CEC.cost_element_id,2,NVL(CEC.standard_cost,0),0)),

4109: 2, -- PAST
4110: 1, -- Standard cost update is only done for asset items
4111: SUM(NVL(CEC.standard_cost,0)),
4112: SUM(DECODE(CEC.cost_element_id,1,NVL(CEC.standard_cost,0),0)),
4113: SUM(DECODE(CEC.cost_element_id,2,NVL(CEC.standard_cost,0),0)),
4114: SUM(DECODE(CEC.cost_element_id,3,NVL(CEC.standard_cost,0),0)),
4115: SUM(DECODE(CEC.cost_element_id,4,NVL(CEC.standard_cost,0),0)),
4116: SUM(DECODE(CEC.cost_element_id,5,NVL(CEC.standard_cost,0),0))
4117: FROM cst_elemental_costs CEC,

Line 4114: SUM(DECODE(CEC.cost_element_id,3,NVL(CEC.standard_cost,0),0)),

4110: 1, -- Standard cost update is only done for asset items
4111: SUM(NVL(CEC.standard_cost,0)),
4112: SUM(DECODE(CEC.cost_element_id,1,NVL(CEC.standard_cost,0),0)),
4113: SUM(DECODE(CEC.cost_element_id,2,NVL(CEC.standard_cost,0),0)),
4114: SUM(DECODE(CEC.cost_element_id,3,NVL(CEC.standard_cost,0),0)),
4115: SUM(DECODE(CEC.cost_element_id,4,NVL(CEC.standard_cost,0),0)),
4116: SUM(DECODE(CEC.cost_element_id,5,NVL(CEC.standard_cost,0),0))
4117: FROM cst_elemental_costs CEC,
4118: mtl_parameters MP

Line 4115: SUM(DECODE(CEC.cost_element_id,4,NVL(CEC.standard_cost,0),0)),

4111: SUM(NVL(CEC.standard_cost,0)),
4112: SUM(DECODE(CEC.cost_element_id,1,NVL(CEC.standard_cost,0),0)),
4113: SUM(DECODE(CEC.cost_element_id,2,NVL(CEC.standard_cost,0),0)),
4114: SUM(DECODE(CEC.cost_element_id,3,NVL(CEC.standard_cost,0),0)),
4115: SUM(DECODE(CEC.cost_element_id,4,NVL(CEC.standard_cost,0),0)),
4116: SUM(DECODE(CEC.cost_element_id,5,NVL(CEC.standard_cost,0),0))
4117: FROM cst_elemental_costs CEC,
4118: mtl_parameters MP
4119: WHERE CEC.cost_update_id = l_max_cost_update_id

Line 4116: SUM(DECODE(CEC.cost_element_id,5,NVL(CEC.standard_cost,0),0))

4112: SUM(DECODE(CEC.cost_element_id,1,NVL(CEC.standard_cost,0),0)),
4113: SUM(DECODE(CEC.cost_element_id,2,NVL(CEC.standard_cost,0),0)),
4114: SUM(DECODE(CEC.cost_element_id,3,NVL(CEC.standard_cost,0),0)),
4115: SUM(DECODE(CEC.cost_element_id,4,NVL(CEC.standard_cost,0),0)),
4116: SUM(DECODE(CEC.cost_element_id,5,NVL(CEC.standard_cost,0),0))
4117: FROM cst_elemental_costs CEC,
4118: mtl_parameters MP
4119: WHERE CEC.cost_update_id = l_max_cost_update_id
4120: AND MP.organization_id = l_organization_id

Line 4164: -- 1, -- Standard cost update is only done for asset items

4160: -- SELECT l_organization_id,
4161: -- l_inventory_item_id,
4162: -- 1,
4163: -- 2, -- PAST
4164: -- 1, -- Standard cost update is only done for asset items
4165: -- 0,
4166: -- 0,
4167: -- 0,
4168: -- 0,

Line 4240: p_error_text => l_stmt_num||': Calculated '||c_standard%ROWCOUNT||

4236: THEN
4237: FND_MSG_PUB.Add_Exc_Msg(
4238: p_pkg_name => G_PKG_NAME,
4239: p_procedure_name => l_api_name,
4240: p_error_text => l_stmt_num||': Calculated '||c_standard%ROWCOUNT||
4241: ' past standard costs'
4242: );
4243: END IF;
4244: CLOSE c_standard;

Line 4241: ' past standard costs'

4237: FND_MSG_PUB.Add_Exc_Msg(
4238: p_pkg_name => G_PKG_NAME,
4239: p_procedure_name => l_api_name,
4240: p_error_text => l_stmt_num||': Calculated '||c_standard%ROWCOUNT||
4241: ' past standard costs'
4242: );
4243: END IF;
4244: CLOSE c_standard;
4245:

Line 4244: CLOSE c_standard;

4240: p_error_text => l_stmt_num||': Calculated '||c_standard%ROWCOUNT||
4241: ' past standard costs'
4242: );
4243: END IF;
4244: CLOSE c_standard;
4245:
4246: IF l_msg_level_threshold <= FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH
4247: THEN
4248: FND_MSG_PUB.Add_Exc_Msg(