DBA Data[Home] [Help]

APPS.CSTPFCHK dependencies on CST_PAC_ITEM_COST_DETAILS

Line 49: --| CST_PAC_ITEM_COST_DETAILS |

45: --| initialized to total layer quantity of previous |
46: --| period. Base bug 3775498 fix. |
47: --| 05/24/2006 vmutyala Bug 5239716 : Replaced Non Mergeable View |
48: --| CST_PAC_ITEM_COSTS_V with base table |
49: --| CST_PAC_ITEM_COST_DETAILS |
50: --| 02/07/2008 vjavli Bug 6751847 performance fix: i_txn_category |
51: --| parameter added to procedures compute_pac_cost_ |
52: --| hook, calc_pac_cost_hook and periodic_cost_update_|
53: --| hook. i_txn_category added while insert into |

Line 187: ** records in CST_PAC_ITEM_COST_DETAILS. Since we are using **

183: l_ret_val := 0;
184:
185: /********************************************************************
186: ** Create detail rows in MTL_PAC_ACTUAL_COST_DETAILS based on **
187: ** records in CST_PAC_ITEM_COST_DETAILS. Since we are using **
188: ** current average the actual cost, prior cost and new cost are **
189: ** all the same. **
190: ** If detail rows do not exist in CST_PAC_ITEM_COST_DETAILS, **
191: ** we will insert a TL material 0 cost layer. **

Line 190: ** If detail rows do not exist in CST_PAC_ITEM_COST_DETAILS, **

186: ** Create detail rows in MTL_PAC_ACTUAL_COST_DETAILS based on **
187: ** records in CST_PAC_ITEM_COST_DETAILS. Since we are using **
188: ** current average the actual cost, prior cost and new cost are **
189: ** all the same. **
190: ** If detail rows do not exist in CST_PAC_ITEM_COST_DETAILS, **
191: ** we will insert a TL material 0 cost layer. **
192: ********************************************************************/
193:
194: l_stmt_num := 30;

Line 198: from cst_pac_item_cost_details

194: l_stmt_num := 30;
195:
196: select count(*)
197: into l_cost_details
198: from cst_pac_item_cost_details
199: where cost_layer_id = i_cost_layer_id;
200:
201: if (l_cost_details > 0) then
202:

Line 264: FROM cst_pac_item_cost_details cpicd

260: 'N',
261: 'N',
262: NULL,
263: i_txn_category
264: FROM cst_pac_item_cost_details cpicd
265: WHERE cpicd.cost_layer_id = i_cost_layer_id;
266:
267: else
268: l_stmt_num := 50;

Line 474: FROM cst_pac_item_cost_details cpicd

470: (SELECT cpicd.item_cost,
471: cpicd.item_buy_cost,
472: cpicd.item_make_cost,
473: 'N'
474: FROM cst_pac_item_cost_details cpicd
475: WHERE cpicd.cost_layer_id = i_cost_layer_id
476: AND cpicd.cost_element_id = mpacd.cost_element_id
477: AND cpicd.level_type = mpacd.level_type)
478: WHERE mpacd.transaction_id = i_txn_id

Line 483: FROM cst_pac_item_cost_details cpicd

479: AND mpacd.cost_group_id = i_cost_group_id
480: AND mpacd.cost_layer_id = i_cost_layer_id
481: AND EXISTS
482: (SELECT 'there is details in cpicd'
483: FROM cst_pac_item_cost_details cpicd
484: WHERE cpicd.cost_layer_id = i_cost_layer_id
485: AND cpicd.cost_element_id = mpacd.cost_element_id
486: AND cpicd.level_type = mpacd.level_type);
487:

Line 547: FROM cst_pac_item_cost_details cpicd

543: 'N',
544: 'N',
545: NULL,
546: i_txn_category
547: FROM cst_pac_item_cost_details cpicd
548: WHERE cost_layer_id = i_cost_layer_id
549: AND NOT EXISTS
550: (SELECT 'this detail is not in mpacd already'
551: FROM mtl_pac_actual_cost_details mpacd

Line 630: UPDATE cst_pac_item_cost_details cpicd

626:
627:
628: l_stmt_num := 60;
629:
630: UPDATE cst_pac_item_cost_details cpicd
631: SET (last_update_date,
632: last_updated_by,
633: last_update_login,
634: request_id,

Line 661: INSERT INTO cst_pac_item_cost_details(

657: WHERE cpicd.cost_layer_id = i_cost_layer_id;
658:
659: l_stmt_num := 70;
660:
661: INSERT INTO cst_pac_item_cost_details(
662: cost_layer_id,
663: cost_element_id,
664: level_type,
665: last_update_date,

Line 775: FROM CST_PAC_ITEM_COST_DETAILS v

771: SUM(ITEM_BUY_COST),
772: SUM(ITEM_MAKE_COST),
773: SUM(DECODE(COST_ELEMENT_ID,2,DECODE(LEVEL_TYPE,2,ITEM_COST,0),ITEM_COST)),
774: SUM(DECODE(COST_ELEMENT_ID,2,DECODE(LEVEL_TYPE,1,ITEM_COST,0),0))
775: FROM CST_PAC_ITEM_COST_DETAILS v
776: WHERE v.cost_layer_id = i_cost_layer_id
777: GROUP BY COST_LAYER_ID)
778: WHERE cpic.cost_layer_id = i_cost_layer_id
779: AND EXISTS

Line 781: FROM cst_pac_item_cost_details cpicd

777: GROUP BY COST_LAYER_ID)
778: WHERE cpic.cost_layer_id = i_cost_layer_id
779: AND EXISTS
780: (SELECT 'there is detail cost'
781: FROM cst_pac_item_cost_details cpicd
782: WHERE cpicd.cost_layer_id = i_cost_layer_id);
783:
784:
785: l_stmt_num := 90;

Line 1088: -- 2. cst_pac_item_cost_details --

1084:
1085: --------------------------------------------------------------------------------
1086: -- Copy data from previous period to current period of the following tables : --
1087: -- 1. cst_pac_item_costs --
1088: -- 2. cst_pac_item_cost_details --
1089: -- 3. cst_pac_quantity_layers --
1090: -- New cost_layer_id and quantity_layer_id are generated for every rows --
1091: -- inserted. --
1092: --------------------------------------------------------------------------------

Line 1189: -- Copy prior info of CST_PAC_ITEM_COST_DETAILS --

1185: FROM cst_pac_item_costs cpic
1186: WHERE cpic.cost_layer_id = l_prior_period_cost.cost_layer_id;
1187:
1188: --------------------------------------------------
1189: -- Copy prior info of CST_PAC_ITEM_COST_DETAILS --
1190: --------------------------------------------------
1191: l_stmt_num := 40;
1192: INSERT INTO cst_pac_item_cost_details (
1193: cost_layer_id,

Line 1192: INSERT INTO cst_pac_item_cost_details (

1188: --------------------------------------------------
1189: -- Copy prior info of CST_PAC_ITEM_COST_DETAILS --
1190: --------------------------------------------------
1191: l_stmt_num := 40;
1192: INSERT INTO cst_pac_item_cost_details (
1193: cost_layer_id,
1194: cost_element_id,
1195: level_type,
1196: item_cost,

Line 1224: FROM cst_pac_item_cost_details cpicd

1220: i_prog_app_id,
1221: i_prog_id,
1222: SYSDATE,
1223: i_login_id
1224: FROM cst_pac_item_cost_details cpicd
1225: WHERE cpicd.cost_layer_id = l_prior_period_cost.cost_layer_id;
1226:
1227: FOR l_prior_period_qty IN
1228: prior_period_quantity_cursor (l_prior_period_cost.cost_layer_id) LOOP

Line 1624: FROM cst_pac_item_cost_details cpicd

1620: 'Y',
1621: 'N',
1622: NULL,
1623: i_txn_category
1624: FROM cst_pac_item_cost_details cpicd
1625: WHERE cpicd.cost_layer_id = i_cost_layer_id
1626: AND not exists (
1627: SELECT 'not exists in mptcd'
1628: FROM mtl_pac_txn_cost_details mptcd

Line 1778: cst_pac_item_cost_details cpicd,

1774: 0
1775: )
1776: )
1777: FROM mtl_pac_txn_cost_details mptcd,
1778: cst_pac_item_cost_details cpicd,
1779: cst_pac_quantity_layers cpql
1780: WHERE mptcd.transaction_id = i_txn_id
1781: AND mptcd.pac_period_id = i_pac_period_id
1782: AND mptcd.cost_group_id = i_cost_group_id

Line 1790: DELETE FROM cst_pac_item_cost_details

1786: AND cpicd.cost_element_id (+) = mptcd.cost_element_id
1787: AND cpicd.level_type (+) = mptcd.level_type;
1788:
1789: l_stmt_num := 20;
1790: DELETE FROM cst_pac_item_cost_details
1791: WHERE cost_layer_id = i_cost_layer_id;
1792:
1793: l_stmt_num := 30;
1794: INSERT INTO cst_pac_item_cost_details(

Line 1794: INSERT INTO cst_pac_item_cost_details(

1790: DELETE FROM cst_pac_item_cost_details
1791: WHERE cost_layer_id = i_cost_layer_id;
1792:
1793: l_stmt_num := 30;
1794: INSERT INTO cst_pac_item_cost_details(
1795: cost_layer_id,
1796: cost_element_id,
1797: level_type,
1798: last_update_date,

Line 1905: FROM CST_PAC_ITEM_COST_DETAILS v

1901: SUM(ITEM_BUY_COST),
1902: SUM(ITEM_MAKE_COST),
1903: SUM(DECODE(COST_ELEMENT_ID,2,DECODE(LEVEL_TYPE,2,ITEM_COST,0),ITEM_COST)),
1904: SUM(DECODE(COST_ELEMENT_ID,2,DECODE(LEVEL_TYPE,1,ITEM_COST,0),0))
1905: FROM CST_PAC_ITEM_COST_DETAILS v
1906: WHERE v.cost_layer_id = i_cost_layer_id
1907: GROUP BY COST_LAYER_ID)
1908: WHERE cpic.cost_layer_id = i_cost_layer_id
1909: AND EXISTS

Line 1911: FROM cst_pac_item_cost_details cpicd

1907: GROUP BY COST_LAYER_ID)
1908: WHERE cpic.cost_layer_id = i_cost_layer_id
1909: AND EXISTS
1910: (SELECT 'there is detail cost'
1911: FROM cst_pac_item_cost_details cpicd
1912: WHERE cpicd.cost_layer_id = i_cost_layer_id);
1913:
1914: /* Fix for Bug 1970458
1915: * For a value change periodic update cost transaction,