DBA Data[Home] [Help]

APPS.CST_INVENTORY_PVT dependencies on STANDARD

Line 43: -- Standard Start of API savepoint

39: l_def_cost_type_id NUMBER;
40: l_cost_org_id NUMBER;
41: l_primary_cost_method NUMBER;
42: BEGIN
43: -- Standard Start of API savepoint
44: SAVEPOINT Populate_ItemList_PVT;
45:
46: -- Check for call compatibility
47: IF NOT FND_API.Compatible_API_Call(

Line 424: -- Standard Start of API savepoint

420: l_api_version CONSTANT NUMBER := 1.0;
421: l_msg_level_threshold NUMBER;
422: l_stmt_num NUMBER := 0;
423: BEGIN
424: -- Standard Start of API savepoint
425: SAVEPOINT Populate_CostGroupList_PVT;
426:
427: -- Check for call compatibility
428: IF NOT FND_API.Compatible_API_Call(

Line 582: -- Standard Start of API savepoint

578: l_api_version CONSTANT NUMBER := 1.0;
579: l_msg_level_threshold NUMBER;
580: l_stmt_num NUMBER := 0;
581: BEGIN
582: -- Standard Start of API savepoint
583: SAVEPOINT Populate_SubinventoryList_PVT;
584:
585: -- Check for call compatibility
586: IF NOT FND_API.Compatible_API_Call(

Line 680: -- Standard Start of API savepoint

676: l_api_version CONSTANT NUMBER := 1.0;
677: l_msg_level_threshold NUMBER;
678: l_stmt_num NUMBER := 0;
679: BEGIN
680: -- Standard Start of API savepoint
681: SAVEPOINT Calculate_OnhandQty_PVT;
682:
683: -- Check for call compatibility
684: IF NOT FND_API.Compatible_API_Call(

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

890: -- Ignore periodic cost updates
891: AND MMT.transaction_source_type_id <> 14
892: -- The only transactions other than the ones ignored above that
893: -- affect inventory valuation and have null cost_group_id are
894: -- standard cost updates (non-PJM/WMS)
895: AND ( ( MMT.transaction_type_id = 24
896: AND MMT.cost_group_id IS NULL
897: )
898: OR EXISTS (

Line 1019: -- Standard Start of API savepoint

1015: --BUG#6109468-FPBUG5606455
1016: l_uncosted_txn_count NUMBER;
1017: l_stmt_num NUMBER := 0;
1018: BEGIN
1019: -- Standard Start of API savepoint
1020: SAVEPOINT Calculate_IntransitQty_PVT;
1021:
1022: -- Check for call compatibility
1023: IF NOT FND_API.Compatible_API_Call(

Line 3110: -- Standard Start of API savepoint

3106: l_api_version CONSTANT NUMBER := 1.0;
3107: l_msg_level_threshold NUMBER;
3108: l_stmt_num NUMBER := 0;
3109: BEGIN
3110: -- Standard Start of API savepoint
3111: SAVEPOINT Calculate_ReceivingQty_PVT;
3112:
3113: -- Check for call compatibility
3114: IF NOT FND_API.Compatible_API_Call(

Line 3417: CURSOR c_standard IS

3413: l_msg_data VARCHAR2(2000);
3414:
3415: l_rcv_cost_source NUMBER; -- added in 12i for as of date changes
3416:
3417: CURSOR c_standard IS
3418: SELECT DISTINCT
3419: CIQT.organization_id,
3420: CIQT.inventory_item_id,
3421: CIQT.cost_type_id

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

3493: AND MMT.transaction_date > c_valuation_date
3494: AND mmt.transaction_action_id NOT IN (5,30,40,41,42,43,50,51,52,15,22,11,17,10,13,9,14,7,26,36,25,56,57)
3495: AND NOT (mmt.transaction_action_id IN (2,28,55,3) AND mmt.primary_quantity > 0)
3496: --
3497: -- Standard update only originated by standard cost update avoid PAC cost update
3498: --
3499: AND NOT (mmt.transaction_action_id = 24 AND mmt.transaction_source_type_id <> 11)
3500: AND MMT.inventory_item_id = c_inventory_item_id
3501: AND MMT.organization_id = c_organization_id

Line 3550: -- Standard Start of API savepoint

3546: p_rec.overhead_cost);
3547: END ins_cst_inv_cost_temp;
3548: --}
3549: BEGIN
3550: -- Standard Start of API savepoint
3551: SAVEPOINT Calculate_InventoryCost_PVT;
3552:
3553: -- Check for call compatibility
3554: IF NOT FND_API.Compatible_API_Call(

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

3579: END IF;
3580:
3581: IF p_valuation_date IS NULL
3582: THEN
3583: -- Calculate the costs for CIQT records that belongs to Standard costing
3584: -- organizations
3585: OPEN c_standard;
3586: l_stmt_num := 10;
3587: LOOP

Line 3585: OPEN c_standard;

3581: IF p_valuation_date IS NULL
3582: THEN
3583: -- Calculate the costs for CIQT records that belongs to Standard costing
3584: -- organizations
3585: OPEN c_standard;
3586: l_stmt_num := 10;
3587: LOOP
3588: FETCH c_standard
3589: INTO l_organization_id,

Line 3588: FETCH c_standard

3584: -- organizations
3585: OPEN c_standard;
3586: l_stmt_num := 10;
3587: LOOP
3588: FETCH c_standard
3589: INTO l_organization_id,
3590: l_inventory_item_id,
3591: l_cost_type_id;
3592:

Line 3594: WHEN c_standard%NOTFOUND;

3590: l_inventory_item_id,
3591: l_cost_type_id;
3592:
3593: EXIT
3594: WHEN c_standard%NOTFOUND;
3595:
3596: INSERT
3597: INTO cst_inv_cost_temp(
3598: organization_id,

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

3629: THEN
3630: FND_MSG_PUB.Add_Exc_Msg(
3631: p_pkg_name => G_PKG_NAME,
3632: p_procedure_name => l_api_name,
3633: p_error_text => l_stmt_num||': Calculated '||c_standard%ROWCOUNT||
3634: ' current standard costs'
3635: );
3636: END IF;
3637: CLOSE c_standard;

Line 3634: ' current standard costs'

3630: FND_MSG_PUB.Add_Exc_Msg(
3631: p_pkg_name => G_PKG_NAME,
3632: p_procedure_name => l_api_name,
3633: p_error_text => l_stmt_num||': Calculated '||c_standard%ROWCOUNT||
3634: ' current standard costs'
3635: );
3636: END IF;
3637: CLOSE c_standard;
3638:

Line 3637: CLOSE c_standard;

3633: p_error_text => l_stmt_num||': Calculated '||c_standard%ROWCOUNT||
3634: ' current standard costs'
3635: );
3636: END IF;
3637: CLOSE c_standard;
3638:
3639:
3640:
3641: -- Calculate the costs for CIQT records that belong to Actual costing

Line 3742: OPEN c_standard;

3738: /* Set rcv_cost_source to 3 for Current Receiving Cost */
3739: l_rcv_cost_source := 3;
3740:
3741: ELSE /* p_valuation_date is not null: Calculate Past Costs */
3742: OPEN c_standard;
3743: l_stmt_num := 40;
3744:
3745: IF l_msg_level_threshold <= FND_MSG_PUB.G_MSG_LVL_DEBUG_LOW
3746: THEN

Line 3751: 'past standard costs'

3747: FND_MSG_PUB.Add_Exc_Msg(
3748: p_pkg_name => G_PKG_NAME,
3749: p_procedure_name => l_api_name,
3750: p_error_text => l_stmt_num||': Calculating '||
3751: 'past standard costs'
3752: );
3753: END IF;
3754:
3755:

Line 3757: FETCH c_standard

3753: END IF;
3754:
3755:
3756: LOOP
3757: FETCH c_standard
3758: INTO l_organization_id,
3759: l_inventory_item_id,
3760: l_cost_type_id;
3761:

Line 3763: WHEN c_standard%NOTFOUND;

3759: l_inventory_item_id,
3760: l_cost_type_id;
3761:
3762: EXIT
3763: WHEN c_standard%NOTFOUND;
3764:
3765: l_min_cost_update_id := NULL;
3766: l_max_cost_update_id := NULL;
3767:

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

3919: l_rec.organization_id := l_organization_id;
3920: l_rec.inventory_item_id := l_inventory_item_id;
3921: l_rec.cost_type_id := 1;
3922: l_rec.cost_source := 2; --PAST
3923: l_rec.inventory_asset_flag := 1; --Standard cost update is only done for asset items
3924:
3925: IF( l_mcacd_txn IS NOT null) THEN
3926: l_rec.item_cost := l_mcacd_cost;
3927: l_rec.material_cost := l_material_cost;

Line 3959: -- Item cost will no longer be derived based on standard cost update history

3955: END IF;
3956:
3957: ----
3958: -- BUG#7484428
3959: -- Item cost will no longer be derived based on standard cost update history
3960: -- but with transaction cost
3961: ----
3962: /*
3963: SELECT MIN(CSC.cost_update_id)

Line 3965: FROM cst_standard_costs CSC,

3961: ----
3962: /*
3963: SELECT MIN(CSC.cost_update_id)
3964: INTO l_min_cost_update_id
3965: FROM cst_standard_costs CSC,
3966: mtl_parameters MP
3967: WHERE MP.organization_id = l_organization_id
3968: AND CSC.organization_id = MP.cost_organization_id
3969: AND CSC.inventory_item_id = l_inventory_item_id

Line 3970: AND CSC.standard_cost_revision_date > p_valuation_date;

3966: mtl_parameters MP
3967: WHERE MP.organization_id = l_organization_id
3968: AND CSC.organization_id = MP.cost_organization_id
3969: AND CSC.inventory_item_id = l_inventory_item_id
3970: AND CSC.standard_cost_revision_date > p_valuation_date;
3971: -- This logic will only work if the CSC records with
3972: -- standard_cost_revision_date > p_valuation_date have not
3973: -- been purged. Although CSC is populated for cost child
3974: -- organizations, CEC is not. We join through MP to be

Line 3972: -- standard_cost_revision_date > p_valuation_date have not

3968: AND CSC.organization_id = MP.cost_organization_id
3969: AND CSC.inventory_item_id = l_inventory_item_id
3970: AND CSC.standard_cost_revision_date > p_valuation_date;
3971: -- This logic will only work if the CSC records with
3972: -- standard_cost_revision_date > p_valuation_date have not
3973: -- been purged. Although CSC is populated for cost child
3974: -- organizations, CEC is not. We join through MP to be
3975: -- consistent.
3976:

Line 3984: FROM cst_standard_costs CSC,

3980: -- Yes. Figure out the prior cost update
3981:
3982: SELECT MAX(CSC.cost_update_id)
3983: INTO l_max_cost_update_id
3984: FROM cst_standard_costs CSC,
3985: mtl_parameters MP
3986: WHERE MP.organization_id = l_organization_id
3987: AND CSC.organization_id = MP.cost_organization_id
3988: AND CSC.inventory_item_id = l_inventory_item_id

Line 3989: AND CSC.standard_cost_revision_date <= p_valuation_date;

3985: mtl_parameters MP
3986: WHERE MP.organization_id = l_organization_id
3987: AND CSC.organization_id = MP.cost_organization_id
3988: AND CSC.inventory_item_id = l_inventory_item_id
3989: AND CSC.standard_cost_revision_date <= p_valuation_date;
3990:
3991: IF l_max_cost_update_id IS NOT NULL
3992: THEN
3993: -- Use the cost in cst_elemental_costs.

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

4008: SELECT l_organization_id,
4009: l_inventory_item_id,
4010: 1,
4011: 2, -- PAST
4012: 1, -- Standard cost update is only done for asset items
4013: SUM(NVL(CEC.standard_cost,0)),
4014: SUM(DECODE(CEC.cost_element_id,1,NVL(CEC.standard_cost,0),0)),
4015: SUM(DECODE(CEC.cost_element_id,2,NVL(CEC.standard_cost,0),0)),
4016: SUM(DECODE(CEC.cost_element_id,3,NVL(CEC.standard_cost,0),0)),

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

4009: l_inventory_item_id,
4010: 1,
4011: 2, -- PAST
4012: 1, -- Standard cost update is only done for asset items
4013: SUM(NVL(CEC.standard_cost,0)),
4014: SUM(DECODE(CEC.cost_element_id,1,NVL(CEC.standard_cost,0),0)),
4015: SUM(DECODE(CEC.cost_element_id,2,NVL(CEC.standard_cost,0),0)),
4016: SUM(DECODE(CEC.cost_element_id,3,NVL(CEC.standard_cost,0),0)),
4017: SUM(DECODE(CEC.cost_element_id,4,NVL(CEC.standard_cost,0),0)),

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

4010: 1,
4011: 2, -- PAST
4012: 1, -- Standard cost update is only done for asset items
4013: SUM(NVL(CEC.standard_cost,0)),
4014: SUM(DECODE(CEC.cost_element_id,1,NVL(CEC.standard_cost,0),0)),
4015: SUM(DECODE(CEC.cost_element_id,2,NVL(CEC.standard_cost,0),0)),
4016: SUM(DECODE(CEC.cost_element_id,3,NVL(CEC.standard_cost,0),0)),
4017: SUM(DECODE(CEC.cost_element_id,4,NVL(CEC.standard_cost,0),0)),
4018: SUM(DECODE(CEC.cost_element_id,5,NVL(CEC.standard_cost,0),0))

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

4011: 2, -- PAST
4012: 1, -- Standard cost update is only done for asset items
4013: SUM(NVL(CEC.standard_cost,0)),
4014: SUM(DECODE(CEC.cost_element_id,1,NVL(CEC.standard_cost,0),0)),
4015: SUM(DECODE(CEC.cost_element_id,2,NVL(CEC.standard_cost,0),0)),
4016: SUM(DECODE(CEC.cost_element_id,3,NVL(CEC.standard_cost,0),0)),
4017: SUM(DECODE(CEC.cost_element_id,4,NVL(CEC.standard_cost,0),0)),
4018: SUM(DECODE(CEC.cost_element_id,5,NVL(CEC.standard_cost,0),0))
4019: FROM cst_elemental_costs CEC,

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

4012: 1, -- Standard cost update is only done for asset items
4013: SUM(NVL(CEC.standard_cost,0)),
4014: SUM(DECODE(CEC.cost_element_id,1,NVL(CEC.standard_cost,0),0)),
4015: SUM(DECODE(CEC.cost_element_id,2,NVL(CEC.standard_cost,0),0)),
4016: SUM(DECODE(CEC.cost_element_id,3,NVL(CEC.standard_cost,0),0)),
4017: SUM(DECODE(CEC.cost_element_id,4,NVL(CEC.standard_cost,0),0)),
4018: SUM(DECODE(CEC.cost_element_id,5,NVL(CEC.standard_cost,0),0))
4019: FROM cst_elemental_costs CEC,
4020: mtl_parameters MP

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

4013: SUM(NVL(CEC.standard_cost,0)),
4014: SUM(DECODE(CEC.cost_element_id,1,NVL(CEC.standard_cost,0),0)),
4015: SUM(DECODE(CEC.cost_element_id,2,NVL(CEC.standard_cost,0),0)),
4016: SUM(DECODE(CEC.cost_element_id,3,NVL(CEC.standard_cost,0),0)),
4017: SUM(DECODE(CEC.cost_element_id,4,NVL(CEC.standard_cost,0),0)),
4018: SUM(DECODE(CEC.cost_element_id,5,NVL(CEC.standard_cost,0),0))
4019: FROM cst_elemental_costs CEC,
4020: mtl_parameters MP
4021: WHERE CEC.cost_update_id = l_max_cost_update_id

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

4014: SUM(DECODE(CEC.cost_element_id,1,NVL(CEC.standard_cost,0),0)),
4015: SUM(DECODE(CEC.cost_element_id,2,NVL(CEC.standard_cost,0),0)),
4016: SUM(DECODE(CEC.cost_element_id,3,NVL(CEC.standard_cost,0),0)),
4017: SUM(DECODE(CEC.cost_element_id,4,NVL(CEC.standard_cost,0),0)),
4018: SUM(DECODE(CEC.cost_element_id,5,NVL(CEC.standard_cost,0),0))
4019: FROM cst_elemental_costs CEC,
4020: mtl_parameters MP
4021: WHERE CEC.cost_update_id = l_max_cost_update_id
4022: AND MP.organization_id = l_organization_id

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

4053: SELECT l_organization_id,
4054: l_inventory_item_id,
4055: 1,
4056: 2, -- PAST
4057: 1, -- Standard cost update is only done for asset items
4058: 0,
4059: 0,
4060: 0,
4061: 0,

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

4132: THEN
4133: FND_MSG_PUB.Add_Exc_Msg(
4134: p_pkg_name => G_PKG_NAME,
4135: p_procedure_name => l_api_name,
4136: p_error_text => l_stmt_num||': Calculated '||c_standard%ROWCOUNT||
4137: ' past standard costs'
4138: );
4139: END IF;
4140: CLOSE c_standard;

Line 4137: ' past standard costs'

4133: FND_MSG_PUB.Add_Exc_Msg(
4134: p_pkg_name => G_PKG_NAME,
4135: p_procedure_name => l_api_name,
4136: p_error_text => l_stmt_num||': Calculated '||c_standard%ROWCOUNT||
4137: ' past standard costs'
4138: );
4139: END IF;
4140: CLOSE c_standard;
4141:

Line 4140: CLOSE c_standard;

4136: p_error_text => l_stmt_num||': Calculated '||c_standard%ROWCOUNT||
4137: ' past standard costs'
4138: );
4139: END IF;
4140: CLOSE c_standard;
4141:
4142: IF l_msg_level_threshold <= FND_MSG_PUB.G_MSG_LVL_DEBUG_HIGH
4143: THEN
4144: FND_MSG_PUB.Add_Exc_Msg(