DBA Data[Home] [Help]

APPS.CSTPLVCP dependencies on MTL_CST_ACTUAL_COST_DETAILS

Line 427: mtl_cst_actual_cost_details MCACD

423: FROM oe_order_lines_all OOLA, /*BUG 5768680 Changes introduced to improve performance*/
424: oe_order_headers_all OOHA, /* of the layer cost worker*/
425: mtl_sales_orders MSO,
426: mtl_material_transactions MMT,
427: mtl_cst_actual_cost_details MCACD
428: WHERE OOLA.line_id = l_so_line_id
429: AND OOHA.header_id = OOLA.header_id
430: AND MSO.segment1 = TO_CHAR(OOHA.order_number) -- extraneous MSOs are possible
431: AND MMT.transaction_source_id = MSO.sales_order_id

Line 1325: ** standard org, so need populate mtl_cst_actual_cost_details with **

1321: end if;
1322:
1323: /***********************************************************************
1324: ** In the following conditions we will be doing distribution for the **
1325: ** standard org, so need populate mtl_cst_actual_cost_details with **
1326: ** the standard costs. **
1327: ** 1. intransit interorg and one of the orgs is standard. **
1328: ** 2. direct interorg and the txn_org_id is standard. **
1329: ***********************************************************************/

Line 1373: insert into mtl_cst_actual_cost_details (

1369: /* If no rows exist in cicd (item hasn't been costed), insert into */
1370: /* mcacd using 0 value of this level material */
1371: if (l_count > 0) then
1372: FND_FILE.PUT_LINE(FND_FILE.LOG,'Insert into MCACD for std org using cost from CICD');
1373: insert into mtl_cst_actual_cost_details (
1374: transaction_id,
1375: organization_id,
1376: layer_id,
1377: cost_element_id,

Line 1426: insert into mtl_cst_actual_cost_details (

1422: and inventory_item_id = i_item_id
1423: group by cost_element_id, level_type;
1424: else
1425: FND_FILE.PUT_LINE(FND_FILE.LOG,'Insert into MCACD for std org using 0 cost');
1426: insert into mtl_cst_actual_cost_details (
1427: transaction_id,
1428: organization_id,
1429: layer_id,
1430: cost_element_id,

Line 1567: from mtl_cst_actual_cost_details cacd

1563: i_prg_appl_id,
1564: i_prg_id,
1565: sysdate,
1566: nvl(sum(actual_cost),0)
1567: from mtl_cst_actual_cost_details cacd
1568: where cacd.transaction_id = i_txn_id
1569: and cacd.organization_id = l_std_org
1570: and cacd.layer_id = -1)
1571: where mmt.transaction_id = i_txn_id;

Line 1900: insert into mtl_cst_actual_cost_details (

1896: l_stmt_num := 210;
1897: -- if the receiving org is std exp, copy the txn info
1898: -- into MCACD from MCTCD.
1899:
1900: insert into mtl_cst_actual_cost_details (
1901: transaction_id,
1902: organization_id,
1903: layer_id,
1904: cost_element_id,

Line 1971: from mtl_cst_actual_cost_details cacd

1967: i_prg_appl_id,
1968: i_prg_id,
1969: sysdate,
1970: nvl(sum(actual_cost),0)
1971: from mtl_cst_actual_cost_details cacd
1972: where cacd.transaction_id = l_txn_update_id
1973: and cacd.organization_id = l_std_org
1974: and cacd.layer_id = -1)
1975: where mmt.transaction_id = l_txn_update_id;

Line 2009: insert into mtl_cst_actual_cost_details (

2005:
2006: if (l_txfr_std_exp = 1) then
2007: l_stmt_num := 260;
2008: FND_FILE.PUT_LINE(FND_FILE.LOG, to_char(l_stmt_num) || ' insert into MCACD from MCTCD with l_txfr_std_exp = 1');
2009: insert into mtl_cst_actual_cost_details (
2010: transaction_id,
2011: organization_id,
2012: layer_id,
2013: cost_element_id,

Line 2078: from mtl_cst_actual_cost_details cacd

2074: i_prg_appl_id,
2075: i_prg_id,
2076: sysdate,
2077: nvl(sum(actual_cost),0)
2078: from mtl_cst_actual_cost_details cacd
2079: where cacd.transaction_id = l_txn_update_id
2080: and cacd.organization_id = l_std_org
2081: and cacd.layer_id = -1)
2082: where mmt.transaction_id = l_txn_update_id;

Line 2104: insert into mtl_cst_actual_cost_details (

2100: end if;
2101:
2102: l_stmt_num := 270;
2103: FND_FILE.PUT_LINE(FND_FILE.LOG, to_char(l_stmt_num) || ' insert into MCACD from MCTCD with l_to_std_exp = 1');
2104: insert into mtl_cst_actual_cost_details (
2105: transaction_id,
2106: organization_id,
2107: layer_id,
2108: cost_element_id,

Line 2175: from mtl_cst_actual_cost_details cacd

2171: i_prg_appl_id,
2172: i_prg_id,
2173: sysdate,
2174: nvl(sum(actual_cost),0)
2175: from mtl_cst_actual_cost_details cacd
2176: where cacd.transaction_id = l_txn_update_id
2177: and cacd.organization_id = l_std_org
2178: and cacd.layer_id = -1)
2179: where mmt.transaction_id = l_txn_update_id;

Line 2751: from mtl_cst_actual_cost_details mcacd

2747: mcacd.actual_cost,
2748: mcacd.prior_cost,
2749: mcacd.new_cost,
2750: mcacd.layer_id
2751: from mtl_cst_actual_cost_details mcacd
2752: where mcacd.transaction_id = c_transaction_id
2753: and mcacd.layer_id = i_to_layer;
2754:
2755: type t_cst_element is table of number

Line 3163: insert into mtl_cst_actual_cost_details(

3159:
3160: l_stmt_num := 80;
3161:
3162: if l_inv_layer_id = 0 then -- no layer cost
3163: insert into mtl_cst_actual_cost_details(
3164: transaction_id,
3165: organization_id,
3166: layer_id,
3167: cost_element_id,

Line 3210: insert into mtl_cst_actual_cost_details(

3206: 'N',
3207: 0,
3208: 'N');
3209: else -- has layer cost
3210: insert into mtl_cst_actual_cost_details(
3211: transaction_id,
3212: organization_id,
3213: layer_id,
3214: cost_element_id,

Line 3551: insert into mtl_cst_actual_cost_details(

3547:
3548: l_stmt_num := 100;
3549:
3550: if (l_exp_item = 0 and l_layer_chg = 1 and l_to_exp = 1 and i_hook = 0) then
3551: insert into mtl_cst_actual_cost_details(
3552: transaction_id,
3553: organization_id,
3554: layer_id,
3555: cost_element_id,

Line 3597: from mtl_cst_actual_cost_details mcacd

3593: mcacd.actual_cost,
3594: 'N',
3595: 0,
3596: 'N'
3597: from mtl_cst_actual_cost_details mcacd
3598: where transaction_id = i_txn_id
3599: and organization_id = i_org_id
3600: and layer_id = l_from_layer;
3601:

Line 3658: from mtl_cst_actual_cost_details mcacd

3654: i_prg_id,
3655: sysdate,
3656: i_item_id,
3657: mcacd.actual_cost
3658: from mtl_cst_actual_cost_details mcacd
3659: where transaction_id = i_txn_id
3660: and organization_id = i_org_id
3661: and layer_id = l_from_layer;
3662:

Line 3949: from mtl_cst_actual_cost_details mcacd

3945: SUM(NVL(mcacd.actual_cost, 0)),
3946: SUM(NVL(mcacd.prior_cost, 0)),
3947: SUM(NVL(mcacd.new_cost, 0)),
3948: SUM(NVL(mcacd.variance_amount, 0))
3949: from mtl_cst_actual_cost_details mcacd
3950: where mcacd.transaction_id = i_txn_id
3951: and mcacd.layer_id = l_to_layer)
3952: where mmt1.transaction_id = l_txf_txn_id
3953: and mmt1.primary_quantity > 0;