DBA Data[Home] [Help]

APPS.CST_PAC_ITERATION_PROCESS_PVT dependencies on MTL_PAC_ACT_CST_DTL_TEMP

Line 285: -- cursor to get actual cost from MTL_PAC_ACT_CST_DTL_TEMP

281: IS
282:
283: l_routine CONSTANT VARCHAR2(30) := 'Get_Correspond_Pmac_Cost';
284:
285: -- cursor to get actual cost from MTL_PAC_ACT_CST_DTL_TEMP
286: CURSOR new_pwac_cost_cur( c_transaction_id NUMBER
287: , c_period_id NUMBER
288: , c_cost_type_id NUMBER
289: , c_cost_group_id NUMBER

Line 295: mtl_pac_act_cst_dtl_temp

291: IS
292: SELECT
293: SUM(actual_cost)
294: FROM
295: mtl_pac_act_cst_dtl_temp
296: WHERE cost_group_id = c_cost_group_id
297: AND cost_type_id = c_cost_type_id
298: AND pac_period_id <= c_period_id
299: AND transaction_id = c_transaction_id;

Line 445: -- cursor to get actual cost from MTL_PAC_ACT_CST_DTL_TEMP

441: IS
442:
443: l_routine CONSTANT VARCHAR2(30) := 'Get_Correspond_Pwac_New_Cost';
444:
445: -- cursor to get actual cost from MTL_PAC_ACT_CST_DTL_TEMP
446: CURSOR new_pwac_cost_cur( c_transaction_id NUMBER
447: , c_period_id NUMBER
448: , c_cost_type_id NUMBER
449: , c_cost_group_id NUMBER

Line 457: mtl_pac_act_cst_dtl_temp

453: IS
454: SELECT
455: actual_cost
456: FROM
457: mtl_pac_act_cst_dtl_temp
458: WHERE cost_group_id = c_cost_group_id
459: AND pac_period_id <= c_period_id
460: AND cost_type_id = c_cost_type_id
461: AND transaction_id = c_transaction_id

Line 629: mtl_pac_act_cst_dtl_temp

625: SELECT
626: actual_cost
627: , new_cost
628: FROM
629: mtl_pac_act_cst_dtl_temp
630: WHERE cost_group_id = c_cost_group_id
631: AND pac_period_id <= c_period_id
632: AND cost_type_id = c_cost_type_id
633: AND transaction_id = c_opp_transaction_id

Line 650: mtl_pac_act_cst_dtl_temp

646: IS
647: SELECT
648: actual_cost
649: FROM
650: mtl_pac_act_cst_dtl_temp
651: WHERE cost_group_id = c_cost_group_id
652: AND pac_period_id <= c_period_id
653: AND cost_type_id = c_cost_type_id
654: AND transaction_id = c_transaction_id

Line 866: mtl_pac_act_cst_dtl_temp

862: , cost_element_id
863: , level_type
864: , actual_cost
865: FROM
866: mtl_pac_act_cst_dtl_temp
867: WHERE pac_period_id = c_period_id
868: AND cost_group_id = c_cost_group_id
869: AND transaction_id = c_transaction_id
870: AND inventory_item_id = c_inventory_item_id

Line 1021: UPDATE MTL_PAC_ACT_CST_DTL_TEMP

1017:
1018: -- Update moh absorption cost in pac txn temp table
1019: IF pac_bal_txn_idx.cost_element_id = 2 AND l_moh_absorption_cost <> 0 THEN
1020:
1021: UPDATE MTL_PAC_ACT_CST_DTL_TEMP
1022: SET moh_absorption_cost = l_moh_absorption_cost
1023: WHERE CURRENT OF pac_bal_txn_cursor;
1024:
1025: END IF; -- check for moh absorption

Line 1075: -- Insert into MTL_PAC_ACT_CST_DTL_TEMP

1071:
1072: CLOSE pac_group1_cost_layer;
1073:
1074:
1075: -- Insert into MTL_PAC_ACT_CST_DTL_TEMP
1076: -- Cost owned transactions
1077: INSERT INTO MTL_PAC_ACT_CST_DTL_TEMP
1078: ( COST_GROUP_ID
1079: , TRANSACTION_ID

Line 1077: INSERT INTO MTL_PAC_ACT_CST_DTL_TEMP

1073:
1074:
1075: -- Insert into MTL_PAC_ACT_CST_DTL_TEMP
1076: -- Cost owned transactions
1077: INSERT INTO MTL_PAC_ACT_CST_DTL_TEMP
1078: ( COST_GROUP_ID
1079: , TRANSACTION_ID
1080: , PAC_PERIOD_ID
1081: , COST_TYPE_ID

Line 1922: FROM MTL_PAC_ACT_CST_DTL_TEMP mpacdt

1918: , FND_GLOBAL.prog_appl_id
1919: , FND_GLOBAL.conc_program_id
1920: , SYSDATE
1921: , FND_GLOBAL.login_id
1922: FROM MTL_PAC_ACT_CST_DTL_TEMP mpacdt
1923: WHERE mpacdt.pac_period_id = p_pac_period_id
1924: AND mpacdt.inventory_item_id = p_inventory_item_id
1925: AND mpacdt.cost_group_id = nvl(p_cost_group_id, mpacdt.cost_group_id)
1926: AND EXISTS (SELECT 'X'

Line 3897: -- Insert into MTL_PAC_ACT_CST_DTL_TEMP only if the iteration

3893: FND_MSG_PUB.Add;
3894: RAISE FND_API.G_EXC_ERROR;
3895: END IF;
3896:
3897: -- Insert into MTL_PAC_ACT_CST_DTL_TEMP only if the iteration
3898: -- process flag is enabled with more than 1 iteration
3899:
3900: IF p_iteration_proc_flag = 'Y' AND p_end_iteration_num > 1 THEN
3901:

Line 3903: INSERT INTO MTL_PAC_ACT_CST_DTL_TEMP

3899:
3900: IF p_iteration_proc_flag = 'Y' AND p_end_iteration_num > 1 THEN
3901:
3902: -- Cost owned transactions
3903: INSERT INTO MTL_PAC_ACT_CST_DTL_TEMP
3904: ( COST_GROUP_ID
3905: , TRANSACTION_ID
3906: , PAC_PERIOD_ID
3907: , COST_TYPE_ID

Line 3950: ,'After inserting mtl_pac_act_cst_dtl_temp:'||

3946:
3947: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
3948: FND_LOG.string(FND_LOG.LEVEL_STATEMENT
3949: ,G_MODULE_HEAD || l_routine || '.After_ins_MPACD_TEMP'
3950: ,'After inserting mtl_pac_act_cst_dtl_temp:'||
3951: l_group1_interorg_tab(i).transaction_id
3952: );
3953: END IF;
3954:

Line 3956: INSERT INTO MTL_PAC_ACT_CST_DTL_TEMP

3952: );
3953: END IF;
3954:
3955: -- Bug 5593086 Pad with nonexistent rows
3956: INSERT INTO MTL_PAC_ACT_CST_DTL_TEMP
3957: ( COST_GROUP_ID
3958: , TRANSACTION_ID
3959: , PAC_PERIOD_ID
3960: , COST_TYPE_ID

Line 4006: FROM mtl_pac_act_cst_dtl_temp mpacdt

4002: UNION
4003: SELECT 2 level_type FROM DUAL) lt
4004: WHERE NOT EXISTS
4005: (SELECT 1
4006: FROM mtl_pac_act_cst_dtl_temp mpacdt
4007: WHERE mpacdt.cost_group_id = p_cost_group_id
4008: AND mpacdt.transaction_id = l_group1_interorg_tab(i).transaction_id
4009: AND mpacdt.pac_period_id = p_period_id
4010: AND mpacdt.cost_type_id = p_cost_type_id

Line 4017: ,'After padding mtl_pac_act_cst_dtl_temp:'||

4013:
4014: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
4015: FND_LOG.string(FND_LOG.LEVEL_STATEMENT
4016: ,G_MODULE_HEAD || l_routine || '.After_pad_MPACD_TEMP'
4017: ,'After padding mtl_pac_act_cst_dtl_temp:'||
4018: l_group1_interorg_tab(i).transaction_id
4019: );
4020: END IF;
4021:

Line 4118: UPDATE MTL_PAC_ACT_CST_DTL_TEMP

4114: AND cost_group_id = p_cost_group_id
4115: AND inventory_item_id = p_inventory_item_id;
4116:
4117: FORALL l_mpacd_idx IN l_txn_id_tbl.FIRST .. l_txn_id_tbl.LAST
4118: UPDATE MTL_PAC_ACT_CST_DTL_TEMP
4119: SET variance_amount = l_variance_amt_tbl(l_mpacd_idx)
4120: WHERE pac_period_id = p_period_id
4121: AND cost_type_id = p_cost_type_id
4122: AND cost_group_id = p_cost_group_id

Line 4370: -- Insert into MTL_PAC_ACT_CST_DTL_TEMP only if the iteration

4366: FND_MSG_PUB.Add;
4367: RAISE FND_API.G_EXC_ERROR;
4368: END IF;
4369:
4370: -- Insert into MTL_PAC_ACT_CST_DTL_TEMP only if the iteration
4371: -- process flag is enabled and consecutive iterations exist
4372:
4373: IF p_iteration_proc_flag = 'Y' AND p_end_iteration_num > 1 THEN
4374:

Line 4376: INSERT INTO MTL_PAC_ACT_CST_DTL_TEMP

4372:
4373: IF p_iteration_proc_flag = 'Y' AND p_end_iteration_num > 1 THEN
4374:
4375: -- Cost derived transactions
4376: INSERT INTO MTL_PAC_ACT_CST_DTL_TEMP
4377: ( COST_GROUP_ID
4378: , TRANSACTION_ID
4379: , PAC_PERIOD_ID
4380: , COST_TYPE_ID

Line 4421: ,'After inserting mtl_pac_act_cst_dtl_temp:' ||

4417:
4418: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
4419: FND_LOG.string(FND_LOG.LEVEL_STATEMENT
4420: ,G_MODULE_HEAD || l_routine || '.after_ins_gp2'
4421: ,'After inserting mtl_pac_act_cst_dtl_temp:' ||
4422: l_group2_interorg_tab(i).transaction_id
4423: );
4424: END IF;
4425:

Line 4427: INSERT INTO MTL_PAC_ACT_CST_DTL_TEMP

4423: );
4424: END IF;
4425:
4426: -- Bug 5593086 Pad with nonexistent rows
4427: INSERT INTO MTL_PAC_ACT_CST_DTL_TEMP
4428: ( COST_GROUP_ID
4429: , TRANSACTION_ID
4430: , PAC_PERIOD_ID
4431: , COST_TYPE_ID

Line 4475: FROM mtl_pac_act_cst_dtl_temp mpacdt

4471: UNION
4472: SELECT 2 level_type FROM DUAL) lt
4473: WHERE NOT EXISTS
4474: (SELECT 1
4475: FROM mtl_pac_act_cst_dtl_temp mpacdt
4476: WHERE mpacdt.cost_group_id = p_cost_group_id
4477: AND mpacdt.transaction_id = l_group2_interorg_tab(i).transaction_id
4478: AND mpacdt.pac_period_id = p_period_id
4479: AND mpacdt.cost_type_id = p_cost_type_id

Line 4487: ,'After padding mtl_pac_act_cst_dtl_temp:'||

4483:
4484: IF (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
4485: FND_LOG.string(FND_LOG.LEVEL_STATEMENT
4486: ,G_MODULE_HEAD || l_routine || '.after_pad_gp2'
4487: ,'After padding mtl_pac_act_cst_dtl_temp:'||
4488: l_group2_interorg_tab(i).transaction_id
4489: );
4490: END IF;
4491:

Line 4724: mtl_pac_act_cst_dtl_temp

4720: , transportation_cost
4721: , moh_absorption_cost
4722: , new_buy_quantity
4723: FROM
4724: mtl_pac_act_cst_dtl_temp
4725: WHERE pac_period_id = c_period_id
4726: AND cost_group_id = c_cost_group_id
4727: AND transaction_id = c_transaction_id
4728: AND inventory_item_id = c_inventory_item_id

Line 4750: mtl_pac_act_cst_dtl_temp

4746: IS
4747: SELECT
4748: nvl(actual_cost,0) actual_cost
4749: FROM
4750: mtl_pac_act_cst_dtl_temp
4751: WHERE pac_period_id = c_pac_period_id
4752: AND cost_group_id = c_cost_group_id
4753: AND inventory_item_id = c_inventory_item_id
4754: AND transaction_id = c_transaction_id

Line 5051: UPDATE MTL_PAC_ACT_CST_DTL_TEMP

5047: -- + moh_absorption_cost
5048: -- For all other cost elements, actual_cost will be New Cost of
5049: -- corresponding transaction
5050: -- =======================================================================
5051: UPDATE MTL_PAC_ACT_CST_DTL_TEMP
5052: SET actual_cost = decode(cost_element_id, 2,
5053: decode(level_type,1, (l_new_correspond_cost + l_unit_transfer_cost +
5054: (transportation_cost/l_txn_quantity) + moh_absorption_cost), l_new_correspond_cost),l_new_correspond_cost)
5055: , transfer_cost = DECODE(cost_element_id, 2, decode(level_type,1, l_unit_transfer_cost,0),0)

Line 5125: UPDATE mtl_pac_act_cst_dtl_temp

5121: -- ===============================================
5122: l_period_new_balance :=
5123: G_PWAC_NEW_COST_TBL(l_cost_element_id)(l_level_type).period_new_balance;
5124:
5125: UPDATE mtl_pac_act_cst_dtl_temp
5126: SET variance_amount = decode(sign(l_period_quantity),
5127: 0, l_period_new_balance,
5128: (-1 * sign(l_period_new_balance)),
5129: l_period_new_balance,0)

Line 5298: update mtl_pac_act_cst_dtl_temp mpacdt

5294: -- bind variables before handing over to SQL Engine. With function, it'll have
5295: -- to switch for each record
5296: -- ===========================================================================
5297:
5298: update mtl_pac_act_cst_dtl_temp mpacdt
5299: set mpacdt.actual_cost = (select (CASE mpacdt.level_type
5300: WHEN 1 THEN
5301: (CASE mpacdt.cost_element_id
5302: WHEN 1 THEN G_PWAC_NEW_COST_TBL(1)(1).final_new_cost

Line 5684: -- mtl_pac_act_cst_dtl_temp of an interorg item

5680: END LOOP; -- end of optimal cost group
5681:
5682: -- ===================================================================
5683: -- Delete MPACD for the corresponding inserted pac transactions in
5684: -- mtl_pac_act_cst_dtl_temp of an interorg item
5685: -- Only if the iteration process flag is enabled and consecutive
5686: -- iterations exist
5687: -- ===================================================================
5688: IF l_iteration_num = 1 AND p_iteration_proc_flag = 'Y' THEN

Line 5700: FROM mtl_pac_act_cst_dtl_temp

5696: and pac_period_id = p_period_id
5697: and interorg_receipt_flag = 'Y')
5698: AND transaction_id IN (
5699: SELECT transaction_id
5700: FROM mtl_pac_act_cst_dtl_temp
5701: WHERE pac_period_id = p_period_id
5702: AND inventory_item_id = l_inventory_item_id);
5703:
5704: