[Home] [Help]
105: l_stmt_num := 10;
106:
107: select count(*)
108: into l_txn_cost_exist
109: from mtl_pac_txn_cost_details
110: where transaction_id = i_txn_id
111: and cost_group_id = i_cost_group_id
112: and pac_period_id = i_pac_period_id;
113:
173: 'Y',
174: 'N',
175: NULL,
176: i_txn_category
177: FROM mtl_pac_txn_cost_details mptcd
178: WHERE transaction_id = i_txn_id
179: AND pac_period_id = i_pac_period_id
180: AND cost_group_id = i_cost_group_id;
181:
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
1629: WHERE mptcd.transaction_id = i_txn_id
1630: AND mptcd.pac_period_id = i_pac_period_id
1631: AND mptcd.cost_group_id = i_cost_group_id
1632: AND mptcd.cost_element_id = cpicd.cost_element_id
1773: ),
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
1833: /* item cost with the new cost. Otherwise set it to 0 */
1834: l_stmt_num := 40;
1835: SELECT DECODE(MAX(value_change),NULL, 1, 0)
1836: INTO l_update_flag
1837: FROM mtl_pac_txn_cost_details mptcd
1838: WHERE mptcd.transaction_id = i_txn_id
1839: AND mptcd.pac_period_id = i_pac_period_id
1840: AND mptcd.cost_group_id = i_cost_group_id;
1841: