1097: --=================
1098:
1099: -- Added hint for improving performance in bug 7417022
1100: CURSOR cons_csr_type IS
1101: SELECT /*+ leading(mct) use_nl(mct mmt) index(mmt MTL_MATERIAL_TRANSACTIONS_U1) */
1102: mmt.inventory_item_id
1103: , mmt.organization_id
1104: /* Bug 5395579 - Start */
1105: /* mct.blanket_price is used for getting the consumed amt.
1108: --, mmt.transaction_cost
1109: , mct.blanket_price
1110: , SUM(mct.net_qty)
1111: FROM
1112: mtl_material_transactions mmt
1113: , mtl_consumption_transactions mct
1114: WHERE mmt.transaction_id = mct.transaction_id
1115: AND mct.consumption_processed_flag IN ('N','E')
1116: AND mmt.transaction_source_type_id = 1
1493: INTO
1494: l_po_price
1495: , l_header_id
1496: FROM
1497: MTL_MATERIAL_TRANSACTIONS
1498: WHERE transaction_id = p_transaction_source_id;
1499:
1500: ELSE
1501:
2261: distribution_account_id
2262: INTO
2263: l_accrual_account_id
2264: FROM
2265: mtl_material_transactions
2266: WHERE transaction_id = p_transaction_source_id;
2267: ELSE
2268: -- Get the chart of accounts id to pass to the Accounting engine
2269: