DBA Data[Home] [Help]

APPS.CSTPACDP dependencies on MTL_CST_ACTUAL_COST_DETAILS

Line 731: Update mtl_cst_actual_cost_details

727:
728: l_stmt_num := 50;
729: -- Update the transaction costed date
730:
731: Update mtl_cst_actual_cost_details
732: set transaction_costed_date = sysdate
733: where transaction_id = i_txn_id
734: and transaction_costed_date is NULL;
735:

Line 1365: from mtl_cst_actual_cost_details

1361:
1362: /* assembly completion or assembly return */
1363: select count(*)
1364: into l_mat_ovhd_exists
1365: from mtl_cst_actual_cost_details
1366: where transaction_id = i_txn_id
1367: and organization_id = i_org_id
1368: and cost_element_id = 2
1369: and level_type = 1;

Line 2217: from mtl_cst_actual_cost_details

2213:
2214: if (l_ovhd_absp = 1) then
2215: select count(*)
2216: into l_mat_ovhd_exists
2217: from mtl_cst_actual_cost_details
2218: where transaction_id = i_txn_id
2219: and organization_id = i_org_id
2220: and cost_element_id = 2
2221: and level_type = 1;

Line 3586: from mtl_cst_actual_cost_details mcacd

3582: IF (l_earn_moh = 0)
3583: THEN
3584: select l_ppv - nvl(sum(mcacd.actual_cost),0)
3585: into l_ppv
3586: from mtl_cst_actual_cost_details mcacd
3587: where mcacd.transaction_id = i_txn_id
3588: and mcacd.organization_id = l_std_org;
3589:
3590: ELSE

Line 3593: from mtl_cst_actual_cost_details mcacd

3589:
3590: ELSE
3591: select l_ppv - nvl(sum(mcacd.actual_cost),0)
3592: into l_ppv
3593: from mtl_cst_actual_cost_details mcacd
3594: where mcacd.transaction_id = i_txn_id
3595: and mcacd.organization_id = l_std_org
3596: and not (cost_element_id = 2
3597: and level_type = 1);

Line 3854: from mtl_cst_actual_cost_details mcacd

3850:
3851: IF(l_earn_moh = 0) THEN
3852: select l_ppv - nvl(sum(mcacd.actual_cost),0)
3853: into l_ppv
3854: from mtl_cst_actual_cost_details mcacd
3855: where mcacd.transaction_id = i_txn_id
3856: and mcacd.organization_id = l_std_org;
3857:
3858: else

Line 3862: from mtl_cst_actual_cost_details mcacd

3858: else
3859:
3860: select l_ppv - nvl(sum(mcacd.actual_cost),0)
3861: into l_ppv
3862: from mtl_cst_actual_cost_details mcacd
3863: where mcacd.transaction_id = i_txn_id
3864: and mcacd.organization_id = l_std_org
3865: and not (cost_element_id = 2
3866: and level_type = 1);

Line 4411: from mtl_cst_actual_cost_details

4407: l_stmt_num := 20;
4408:
4409: select count(*)
4410: into l_ele_exist
4411: from mtl_cst_actual_cost_details
4412: where transaction_id = i_txn_id
4413: and organization_id = i_org_id;
4414:
4415: if (l_ele_exist = 0) then

Line 4444: from mtl_cst_actual_cost_details

4440:
4441: select (sum(new_cost) - sum(prior_cost)),sum(variance_amount)
4442: ,sum(onhand_variance_amount)
4443: into l_cost,l_var,l_onhand_var
4444: from mtl_cst_actual_cost_details
4445: where transaction_id = i_txn_id
4446: and organization_id = i_org_id
4447: and cost_element_id = cost_element;
4448:

Line 4580: from mtl_cst_actual_cost_details cacd

4576: l_stmt_num := 60;
4577:
4578: select nvl(sum(variance_amount),0)
4579: into l_var
4580: from mtl_cst_actual_cost_details cacd
4581: where transaction_id = i_txn_id
4582: and organization_id = i_org_id;
4583:
4584: if (l_var <> 0) then

Line 5208: from mtl_cst_actual_cost_details mcacd

5204: l_cost_grp_id := i_cost_grp_id;
5205: l_layer_id := -1;
5206: select count(*)
5207: into l_ele_exist
5208: from mtl_cst_actual_cost_details mcacd
5209: where mcacd.transaction_id = i_txn_id
5210: and mcacd.organization_id = i_org_id
5211: and mcacd.layer_id = l_layer_id;
5212:

Line 5294: from mtl_cst_actual_cost_details

5290: l_stmt_num := 100;
5291:
5292: select sum(actual_cost), nvl(sum(variance_amount),0)
5293: into l_cost, l_var
5294: from mtl_cst_actual_cost_details
5295: where transaction_id = i_txn_id
5296: and organization_id = i_org_id
5297: and layer_id = l_layer_id
5298: and cost_element_id = cost_element;

Line 5535: from mtl_cst_actual_cost_details mcacd

5531: l_stmt_num := 30;
5532:
5533: select count(*)
5534: into l_ele_exist
5535: from mtl_cst_actual_cost_details mcacd
5536: where mcacd.transaction_id = i_txn_id
5537: and mcacd.organization_id = i_org_id
5538: and mcacd.layer_id = l_layer_id
5539: and nvl(mcacd.transaction_action_id,-99) =

Line 5570: from mtl_cst_actual_cost_details

5566:
5567:
5568: select sum(actual_cost), nvl(sum(variance_amount),0)
5569: into l_cost, l_var
5570: from mtl_cst_actual_cost_details
5571: where transaction_id = i_txn_id
5572: and organization_id = i_org_id
5573: and layer_id = l_layer_id
5574: and cost_element_id = cost_element

Line 5636: from mtl_cst_actual_cost_details cacd

5632: l_stmt_num := 60;
5633:
5634: select nvl(sum(variance_amount),0)
5635: into l_var
5636: from mtl_cst_actual_cost_details cacd
5637: where transaction_id = i_txn_id
5638: and organization_id = i_org_id
5639: and layer_id = l_layer_id
5640: and nvl(transaction_action_id,-99) =

Line 5693: from mtl_cst_actual_cost_details

5689: if (l_txn_type = 68) and (l_txn_action_id = 2) then
5690: l_stmt_num := 80;
5691: select nvl(max(layer_id), l_layer_id)
5692: into l_to_layer_id
5693: from mtl_cst_actual_cost_details
5694: where transaction_id = i_txn_id
5695: and layer_id <> l_layer_id;
5696:
5697: if ((l_layer_id = l_to_layer_id) OR ((l_layer_id <> l_to_layer_id) and (i_p_qty < 0))) then

Line 5705: from mtl_cst_actual_cost_details cacd

5701: for cost_element in 1..5 loop
5702: l_stmt_num := 100;
5703: select nvl(sum(payback_variance_amount),0)
5704: into l_payback_var
5705: from mtl_cst_actual_cost_details cacd
5706: where transaction_id = i_txn_id
5707: and organization_id = i_org_id
5708: and layer_id = l_layer_id
5709: and cost_element_id = cost_element;

Line 5925: from mtl_cst_actual_cost_details

5921: -- Join on layer_id and transaction_action_id only for a CITW transaction.
5922:
5923: select count(*)
5924: into l_ele_exist
5925: from mtl_cst_actual_cost_details
5926: where transaction_id = i_txn_id
5927: and organization_id = i_org_id
5928: and decode(i_comm_iss_flag,1,l_layer_id,layer_id) = layer_id
5929: and nvl(decode(i_comm_iss_flag,1,i_cost_txn_action_id,transaction_action_id),-99)=

Line 5947: from mtl_cst_actual_cost_details cacd

5943: l_stmt_num := 20;
5944:
5945: select sum(actual_cost)
5946: into l_elemental_cost(cost_element)
5947: from mtl_cst_actual_cost_details cacd
5948: where transaction_id = i_txn_id
5949: and organization_id = i_org_id
5950: and cost_element_id = cost_element
5951: and decode(i_comm_iss_flag,1,l_layer_id,layer_id) = layer_id and

Line 6085: from mtl_cst_actual_cost_details cacd,

6081: select decode(c1.minimum_accountable_unit,
6082: null,ROUND((nvl(sum(actual_cost),0)*abs(i_p_qty)),c1.precision)/abs(i_p_qty),
6083: (ROUND((nvl(sum(actual_cost),0)*abs(i_p_qty))/c1.minimum_accountable_unit)*c1.minimum_accountable_unit)/abs(i_p_qty))
6084: into l_ce_round_cost
6085: from mtl_cst_actual_cost_details cacd,
6086: cst_organization_definitions cod,
6087: fnd_currencies c1,
6088: gl_sets_of_books gsb
6089: where cacd.transaction_id = i_txn_id

Line 6237: from mtl_cst_actual_cost_details

6233: l_stmt_num := 10;
6234: -- Join on layer_id and transaction_action_id only for a CITW transaction.
6235: select count(*)
6236: into l_ele_exist
6237: from mtl_cst_actual_cost_details
6238: where transaction_id = i_txn_id
6239: and organization_id = i_org_id;
6240:
6241: if (l_ele_exist = 0) then

Line 6255: from mtl_cst_actual_cost_details cacd

6251:
6252: if (cost_element = 1) then
6253: select sum(actual_cost)
6254: into l_cost
6255: from mtl_cst_actual_cost_details cacd
6256: where transaction_id = i_txn_id
6257: and organization_id = i_org_id
6258: and (level_type = 2
6259: or (level_type = 1 and cost_element_id =1));

Line 6263: from mtl_cst_actual_cost_details cacd

6259: or (level_type = 1 and cost_element_id =1));
6260: elsif (cost_element <> 2) then
6261: select sum(actual_cost)
6262: into l_cost
6263: from mtl_cst_actual_cost_details cacd
6264: where transaction_id = i_txn_id
6265: and organization_id = i_org_id
6266: and level_type = 1
6267: and cost_element_id = cost_element;

Line 7432: |Insert standard cost into mtl_cst_actual_cost_details

7428: end if; /* if (!wms_flg ) */
7429:
7430:
7431: /*----------------------------------------------------------------------+
7432: |Insert standard cost into mtl_cst_actual_cost_details
7433: +----------------------------------------------------------------------*/
7434: fnd_file.put_line(fnd_file.log, 'inserting into mcacd');
7435:
7436: l_stmt_num := 280;