DBA Data[Home] [Help]

APPS.CSTPACDP dependencies on MTL_CST_ACTUAL_COST_DETAILS

Line 822: Update mtl_cst_actual_cost_details

818:
819: l_stmt_num := 50;
820: -- Update the transaction costed date
821:
822: Update mtl_cst_actual_cost_details
823: set transaction_costed_date = sysdate
824: where transaction_id = i_txn_id
825: and transaction_costed_date is NULL;
826:

Line 1456: from mtl_cst_actual_cost_details

1452:
1453: /* assembly completion or assembly return */
1454: select count(*)
1455: into l_mat_ovhd_exists
1456: from mtl_cst_actual_cost_details
1457: where transaction_id = i_txn_id
1458: and organization_id = i_org_id
1459: and cost_element_id = 2
1460: and level_type = 1;

Line 2308: from mtl_cst_actual_cost_details

2304:
2305: if (l_ovhd_absp = 1) then
2306: select count(*)
2307: into l_mat_ovhd_exists
2308: from mtl_cst_actual_cost_details
2309: where transaction_id = i_txn_id
2310: and organization_id = i_org_id
2311: and cost_element_id = 2
2312: and level_type = 1;

Line 3677: from mtl_cst_actual_cost_details mcacd

3673: IF (l_earn_moh = 0)
3674: THEN
3675: select l_ppv - nvl(sum(mcacd.actual_cost),0)
3676: into l_ppv
3677: from mtl_cst_actual_cost_details mcacd
3678: where mcacd.transaction_id = i_txn_id
3679: and mcacd.organization_id = l_std_org;
3680:
3681: ELSE

Line 3684: from mtl_cst_actual_cost_details mcacd

3680:
3681: ELSE
3682: select l_ppv - nvl(sum(mcacd.actual_cost),0)
3683: into l_ppv
3684: from mtl_cst_actual_cost_details mcacd
3685: where mcacd.transaction_id = i_txn_id
3686: and mcacd.organization_id = l_std_org
3687: and not (cost_element_id = 2
3688: and level_type = 1);

Line 3945: from mtl_cst_actual_cost_details mcacd

3941:
3942: IF(l_earn_moh = 0) THEN
3943: select l_ppv - nvl(sum(mcacd.actual_cost),0)
3944: into l_ppv
3945: from mtl_cst_actual_cost_details mcacd
3946: where mcacd.transaction_id = i_txn_id
3947: and mcacd.organization_id = l_std_org;
3948:
3949: else

Line 3953: from mtl_cst_actual_cost_details mcacd

3949: else
3950:
3951: select l_ppv - nvl(sum(mcacd.actual_cost),0)
3952: into l_ppv
3953: from mtl_cst_actual_cost_details mcacd
3954: where mcacd.transaction_id = i_txn_id
3955: and mcacd.organization_id = l_std_org
3956: and not (cost_element_id = 2
3957: and level_type = 1);

Line 4502: from mtl_cst_actual_cost_details

4498: l_stmt_num := 20;
4499:
4500: select count(*)
4501: into l_ele_exist
4502: from mtl_cst_actual_cost_details
4503: where transaction_id = i_txn_id
4504: and organization_id = i_org_id;
4505:
4506: if (l_ele_exist = 0) then

Line 4535: from mtl_cst_actual_cost_details

4531:
4532: select (sum(new_cost) - sum(prior_cost)),sum(variance_amount)
4533: ,sum(onhand_variance_amount)
4534: into l_cost,l_var,l_onhand_var
4535: from mtl_cst_actual_cost_details
4536: where transaction_id = i_txn_id
4537: and organization_id = i_org_id
4538: and cost_element_id = cost_element;
4539:

Line 4671: from mtl_cst_actual_cost_details cacd

4667: l_stmt_num := 60;
4668:
4669: select nvl(sum(variance_amount),0)
4670: into l_var
4671: from mtl_cst_actual_cost_details cacd
4672: where transaction_id = i_txn_id
4673: and organization_id = i_org_id;
4674:
4675: if (l_var <> 0) then

Line 5300: from mtl_cst_actual_cost_details mcacd

5296: l_cost_grp_id := i_cost_grp_id;
5297: l_layer_id := -1;
5298: select count(*)
5299: into l_ele_exist
5300: from mtl_cst_actual_cost_details mcacd
5301: where mcacd.transaction_id = i_txn_id
5302: and mcacd.organization_id = i_org_id
5303: and mcacd.layer_id = l_layer_id;
5304:

Line 5386: from mtl_cst_actual_cost_details

5382: l_stmt_num := 100;
5383:
5384: select sum(actual_cost), nvl(sum(variance_amount),0)
5385: into l_cost, l_var
5386: from mtl_cst_actual_cost_details
5387: where transaction_id = i_txn_id
5388: and organization_id = i_org_id
5389: and layer_id = l_layer_id
5390: and cost_element_id = cost_element;

Line 5627: from mtl_cst_actual_cost_details mcacd

5623: l_stmt_num := 30;
5624:
5625: select count(*)
5626: into l_ele_exist
5627: from mtl_cst_actual_cost_details mcacd
5628: where mcacd.transaction_id = i_txn_id
5629: and mcacd.organization_id = i_org_id
5630: and mcacd.layer_id = l_layer_id
5631: and nvl(mcacd.transaction_action_id,-99) =

Line 5662: from mtl_cst_actual_cost_details

5658:
5659:
5660: select sum(actual_cost), nvl(sum(variance_amount),0)
5661: into l_cost, l_var
5662: from mtl_cst_actual_cost_details
5663: where transaction_id = i_txn_id
5664: and organization_id = i_org_id
5665: and layer_id = l_layer_id
5666: and cost_element_id = cost_element

Line 5728: from mtl_cst_actual_cost_details cacd

5724: l_stmt_num := 60;
5725:
5726: select nvl(sum(variance_amount),0)
5727: into l_var
5728: from mtl_cst_actual_cost_details cacd
5729: where transaction_id = i_txn_id
5730: and organization_id = i_org_id
5731: and layer_id = l_layer_id
5732: and nvl(transaction_action_id,-99) =

Line 5785: from mtl_cst_actual_cost_details

5781: if (l_txn_type = 68) and (l_txn_action_id = 2) then
5782: l_stmt_num := 80;
5783: select nvl(max(layer_id), l_layer_id)
5784: into l_to_layer_id
5785: from mtl_cst_actual_cost_details
5786: where transaction_id = i_txn_id
5787: and layer_id <> l_layer_id;
5788:
5789: if ((l_layer_id = l_to_layer_id) OR ((l_layer_id <> l_to_layer_id) and (i_p_qty < 0))) then

Line 5797: from mtl_cst_actual_cost_details cacd

5793: for cost_element in 1..5 loop
5794: l_stmt_num := 100;
5795: select nvl(sum(payback_variance_amount),0)
5796: into l_payback_var
5797: from mtl_cst_actual_cost_details cacd
5798: where transaction_id = i_txn_id
5799: and organization_id = i_org_id
5800: and layer_id = l_layer_id
5801: and cost_element_id = cost_element;

Line 6017: from mtl_cst_actual_cost_details

6013: -- Join on layer_id and transaction_action_id only for a CITW transaction.
6014:
6015: select count(*)
6016: into l_ele_exist
6017: from mtl_cst_actual_cost_details
6018: where transaction_id = i_txn_id
6019: and organization_id = i_org_id
6020: and decode(i_comm_iss_flag,1,l_layer_id,layer_id) = layer_id
6021: and nvl(decode(i_comm_iss_flag,1,i_cost_txn_action_id,transaction_action_id),-99)=

Line 6039: from mtl_cst_actual_cost_details cacd

6035: l_stmt_num := 20;
6036:
6037: select sum(actual_cost)
6038: into l_elemental_cost(cost_element)
6039: from mtl_cst_actual_cost_details cacd
6040: where transaction_id = i_txn_id
6041: and organization_id = i_org_id
6042: and cost_element_id = cost_element
6043: and decode(i_comm_iss_flag,1,l_layer_id,layer_id) = layer_id and

Line 6180: from mtl_cst_actual_cost_details cacd,

6176: select decode(c1.minimum_accountable_unit,
6177: null,ROUND((nvl(sum(actual_cost),0)*abs(i_p_qty)),c1.precision)/abs(i_p_qty),
6178: (ROUND((nvl(sum(actual_cost),0)*abs(i_p_qty))/c1.minimum_accountable_unit)*c1.minimum_accountable_unit)/abs(i_p_qty))
6179: into l_ce_round_cost
6180: from mtl_cst_actual_cost_details cacd,
6181: cst_organization_definitions cod,
6182: fnd_currencies c1,
6183: gl_sets_of_books gsb
6184: where cacd.transaction_id = i_txn_id

Line 6210: from mtl_cst_actual_cost_details cacd

6206: l_stmt_num := 55;
6207:
6208: select nvl(sum(actual_cost),0)
6209: into l_cost
6210: from mtl_cst_actual_cost_details cacd
6211: where transaction_id = i_txn_id
6212: and organization_id = i_org_id
6213: and (cost_element_id <> 2
6214: OR

Line 6349: from mtl_cst_actual_cost_details

6345: l_stmt_num := 10;
6346: -- Join on layer_id and transaction_action_id only for a CITW transaction.
6347: select count(*)
6348: into l_ele_exist
6349: from mtl_cst_actual_cost_details
6350: where transaction_id = i_txn_id
6351: and organization_id = i_org_id;
6352:
6353: if (l_ele_exist = 0) then

Line 6367: from mtl_cst_actual_cost_details cacd

6363:
6364: if (cost_element = 1) then
6365: select sum(actual_cost)
6366: into l_cost
6367: from mtl_cst_actual_cost_details cacd
6368: where transaction_id = i_txn_id
6369: and organization_id = i_org_id
6370: and (level_type = 2
6371: or (level_type = 1 and cost_element_id =1));

Line 6375: from mtl_cst_actual_cost_details cacd

6371: or (level_type = 1 and cost_element_id =1));
6372: elsif (cost_element <> 2) then
6373: select sum(actual_cost)
6374: into l_cost
6375: from mtl_cst_actual_cost_details cacd
6376: where transaction_id = i_txn_id
6377: and organization_id = i_org_id
6378: and level_type = 1
6379: and cost_element_id = cost_element;

Line 7631: |Insert standard cost into mtl_cst_actual_cost_details

7627: end if; /* if (!wms_flg ) */
7628:
7629:
7630: /*----------------------------------------------------------------------+
7631: |Insert standard cost into mtl_cst_actual_cost_details
7632: +----------------------------------------------------------------------*/
7633: fnd_file.put_line(fnd_file.log, 'inserting into mcacd');
7634:
7635: l_stmt_num := 280;