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 1083: -- 2. cst_pac_item_cost_details --

1079:
1080: --------------------------------------------------------------------------------
1081: -- Copy data from previous period to current period of the following tables : --
1082: -- 1. cst_pac_item_costs --
1083: -- 2. cst_pac_item_cost_details --
1084: -- 3. cst_pac_quantity_layers --
1085: -- New cost_layer_id and quantity_layer_id are generated for every rows --
1086: -- inserted. --
1087: --------------------------------------------------------------------------------

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

1180: FROM cst_pac_item_costs cpic
1181: WHERE cpic.cost_layer_id = l_prior_period_cost.cost_layer_id;
1182:
1183: --------------------------------------------------
1184: -- Copy prior info of CST_PAC_ITEM_COST_DETAILS --
1185: --------------------------------------------------
1186: l_stmt_num := 40;
1187: INSERT INTO cst_pac_item_cost_details (
1188: cost_layer_id,

Line 1187: INSERT INTO cst_pac_item_cost_details (

1183: --------------------------------------------------
1184: -- Copy prior info of CST_PAC_ITEM_COST_DETAILS --
1185: --------------------------------------------------
1186: l_stmt_num := 40;
1187: INSERT INTO cst_pac_item_cost_details (
1188: cost_layer_id,
1189: cost_element_id,
1190: level_type,
1191: item_cost,

Line 1219: FROM cst_pac_item_cost_details cpicd

1215: i_prog_app_id,
1216: i_prog_id,
1217: SYSDATE,
1218: i_login_id
1219: FROM cst_pac_item_cost_details cpicd
1220: WHERE cpicd.cost_layer_id = l_prior_period_cost.cost_layer_id;
1221:
1222: FOR l_prior_period_qty IN
1223: prior_period_quantity_cursor (l_prior_period_cost.cost_layer_id) LOOP

Line 1619: FROM cst_pac_item_cost_details cpicd

1615: 'Y',
1616: 'N',
1617: NULL,
1618: i_txn_category
1619: FROM cst_pac_item_cost_details cpicd
1620: WHERE cpicd.cost_layer_id = i_cost_layer_id
1621: AND not exists (
1622: SELECT 'not exists in mptcd'
1623: FROM mtl_pac_txn_cost_details mptcd

Line 1773: cst_pac_item_cost_details cpicd,

1769: 0
1770: )
1771: )
1772: FROM mtl_pac_txn_cost_details mptcd,
1773: cst_pac_item_cost_details cpicd,
1774: cst_pac_quantity_layers cpql
1775: WHERE mptcd.transaction_id = i_txn_id
1776: AND mptcd.pac_period_id = i_pac_period_id
1777: AND mptcd.cost_group_id = i_cost_group_id

Line 1785: DELETE FROM cst_pac_item_cost_details

1781: AND cpicd.cost_element_id (+) = mptcd.cost_element_id
1782: AND cpicd.level_type (+) = mptcd.level_type;
1783:
1784: l_stmt_num := 20;
1785: DELETE FROM cst_pac_item_cost_details
1786: WHERE cost_layer_id = i_cost_layer_id;
1787:
1788: l_stmt_num := 30;
1789: INSERT INTO cst_pac_item_cost_details(

Line 1789: INSERT INTO cst_pac_item_cost_details(

1785: DELETE FROM cst_pac_item_cost_details
1786: WHERE cost_layer_id = i_cost_layer_id;
1787:
1788: l_stmt_num := 30;
1789: INSERT INTO cst_pac_item_cost_details(
1790: cost_layer_id,
1791: cost_element_id,
1792: level_type,
1793: last_update_date,

Line 1900: FROM CST_PAC_ITEM_COST_DETAILS v

1896: SUM(ITEM_BUY_COST),
1897: SUM(ITEM_MAKE_COST),
1898: SUM(DECODE(COST_ELEMENT_ID,2,DECODE(LEVEL_TYPE,2,ITEM_COST,0),ITEM_COST)),
1899: SUM(DECODE(COST_ELEMENT_ID,2,DECODE(LEVEL_TYPE,1,ITEM_COST,0),0))
1900: FROM CST_PAC_ITEM_COST_DETAILS v
1901: WHERE v.cost_layer_id = i_cost_layer_id
1902: GROUP BY COST_LAYER_ID)
1903: WHERE cpic.cost_layer_id = i_cost_layer_id
1904: AND EXISTS

Line 1906: FROM cst_pac_item_cost_details cpicd

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