DBA Data[Home] [Help]

APPS.CSTPLENG dependencies on MTL_MATERIAL_TRANSACTIONS

Line 461: from mtl_material_transactions mmt, po_headers_all po

457: /* Purchase Order, use RCV transaction ID */
458: /* Bug 3291126, we should use PO number */
459: select po.segment1
460: into l_src_number
461: from mtl_material_transactions mmt, po_headers_all po
462: where mmt.transaction_id = i_txn_id
463: and mmt.transaction_source_id = po.po_header_id;
464: elsif (i_txn_src_type = 2) then
465: /* Sales Order, use Order Number */

Line 527: from mtl_material_transactions mmt

523: into l_src_number
524: from gl_code_combinations_kfv
525: where code_combination_id = (select
526: nvl(mmt.distribution_account_id,mmt.transaction_source_id)
527: from mtl_material_transactions mmt
528: where transaction_id = i_txn_id);
529: else
530: l_src_number := to_char(i_txn_id);
531: end if;

Line 628: from mtl_material_transactions

624: l_debug := FND_PROFILE.VALUE('MRP_DEBUG');
625:
626: select transaction_type_id
627: into l_txn_type_id
628: from mtl_material_transactions
629: where transaction_id = i_txn_id;
630:
631: /* Write to log file */
632: if (l_debug = 'Y') then

Line 1746: FROM mtl_material_transactions mmt,

1742: SELECT mmt.transaction_type_id,
1743: decode(rt2.parent_transaction_id,-1,rt2.transaction_id,rt2.parent_transaction_id)
1744: INTO l_last_txn_type_id,
1745: l_last_rcv_txn_id
1746: FROM mtl_material_transactions mmt,
1747: rcv_transactions rt1,
1748: rcv_transactions rt2
1749: WHERE mmt.transaction_id = l_last_txn_id
1750: AND mmt.rcv_transaction_id = rt1.transaction_id (+)

Line 1769: FROM mtl_material_transactions mmt,

1765: SELECT mmt.transaction_type_id,
1766: decode(rt2.parent_transaction_id,-1,rt2.transaction_id,rt2.parent_transaction_id)
1767: INTO l_txn_type_id,
1768: l_rcv_txn_id
1769: FROM mtl_material_transactions mmt,
1770: rcv_transactions rt1,
1771: rcv_transactions rt2
1772: WHERE mmt.transaction_id = i_txn_id
1773: AND mmt.rcv_transaction_id = rt1.transaction_id (+)

Line 1904: FROM mtl_material_transactions

1900: /* Get transaction source ID for the transaction */
1901: l_stmt_num := 86;
1902: SELECT transaction_source_id
1903: INTO l_src_id
1904: FROM mtl_material_transactions
1905: WHERE transaction_id = i_txn_id;
1906:
1907: /* Get transaction source name */
1908: l_stmt_num := 89;

Line 1955: FROM mtl_material_transactions

1951: /* Get transaction source ID for the transaction */
1952: l_stmt_num := 105;
1953: SELECT transaction_source_id
1954: INTO l_src_id
1955: FROM mtl_material_transactions
1956: WHERE transaction_id = i_txn_id;
1957:
1958: /* Get transaction source name */
1959: l_stmt_num := 110;

Line 2528: from mtl_material_transactions

2524: l_expsub := 0;
2525:
2526: select transaction_source_id
2527: into l_src_id
2528: from mtl_material_transactions
2529: where transaction_id = i_txn_id;
2530:
2531:
2532: select subinventory_code

Line 2534: from mtl_material_transactions

2530:
2531:
2532: select subinventory_code
2533: into l_subinv
2534: from mtl_material_transactions
2535: where transaction_id = i_txn_id;
2536:
2537: select decode(asset_inventory, 1, 0, 1)
2538: into l_expsub

Line 2685: from mtl_material_transactions

2681: if (i_txn_action_id in (1, 27, 33, 34)) then
2682: l_stmt_num := 25;
2683: select subinventory_code
2684: into l_subinv
2685: from mtl_material_transactions
2686: where transaction_id = i_txn_id;
2687:
2688: select decode(asset_inventory, 1, 0, 1)
2689: into l_expsub

Line 3163: FROM mtl_material_transactions

3159: -- check if the current transaction is a return to receiving or correction
3160: l_stmt_num := 65;
3161: SELECT COUNT(*)
3162: INTO l_rtr
3163: FROM mtl_material_transactions
3164: WHERE transaction_id = i_txn_id
3165: AND transaction_action_id in (1, 29)
3166: AND transaction_source_type_id = 1;
3167: -- if it is, try to first consume the inv layer created by the receipt

Line 3174: FROM mtl_material_transactions mmt_del,

3170: l_stmt_num := 70;
3171: BEGIN
3172: SELECT mmt_del.transaction_id
3173: INTO l_rtr_txn_id
3174: FROM mtl_material_transactions mmt_del,
3175: mtl_material_transactions mmt_rtr,
3176: rcv_transactions rt_rtr
3177: WHERE mmt_del.rcv_transaction_id = rt_rtr.parent_transaction_id
3178: AND rt_rtr.transaction_id = mmt_rtr.rcv_transaction_id

Line 3175: mtl_material_transactions mmt_rtr,

3171: BEGIN
3172: SELECT mmt_del.transaction_id
3173: INTO l_rtr_txn_id
3174: FROM mtl_material_transactions mmt_del,
3175: mtl_material_transactions mmt_rtr,
3176: rcv_transactions rt_rtr
3177: WHERE mmt_del.rcv_transaction_id = rt_rtr.parent_transaction_id
3178: AND rt_rtr.transaction_id = mmt_rtr.rcv_transaction_id
3179: AND mmt_rtr.transaction_id = i_txn_id;

Line 3668: from mtl_material_transactions

3664: l_stmt_num := 15;
3665:
3666: select organization_id, transfer_organization_id, primary_quantity
3667: into l_txn_org_id, l_txfr_org_id, l_txn_qty
3668: from mtl_material_transactions
3669: where transaction_id = i_txn_id;
3670:
3671: -- Determine the from and to org for this transaction.
3672: if (i_txn_action_id = 21) then -- intransit shipment

Line 4005: from mtl_material_transactions

4001: if (l_mclacd_ovhd > 0) then /* mclacd exists */
4002: l_stmt_num := 72;
4003: select transaction_type_id
4004: into l_txn_type_id
4005: from mtl_material_transactions
4006: where transaction_id = i_txn_id;
4007:
4008: /* Bug 2280515 :anjgupta
4009: The variance_amount is zero in the case of interorg receipt transactions.

Line 4233: from mtl_material_transactions

4229:
4230: l_stmt_num := 5;
4231: select transaction_type_id
4232: into l_txn_type_id
4233: from mtl_material_transactions
4234: where transaction_id = i_txn_id;
4235:
4236: l_stmt_num := 6;
4237: select count(*)

Line 4598: ** Update Mtl_Material_Transactions **

4594: and mcacd.layer_id = i_layer_id
4595: and mcacd.transaction_action_id = i_txn_action_id;
4596:
4597: /********************************************************************
4598: ** Update Mtl_Material_Transactions **
4599: ** Need to update prior_costed_quantity now. **
4600: ********************************************************************/
4601: l_stmt_num := 40;
4602: if (i_no_update_mmt = 0) then

Line 4608: from mtl_material_transactions

4604: -- txfr_txn_id to update proper transaction in MMT.
4605: if (i_txn_action_id = 2 and i_txn_qty > 0) then
4606: select transfer_transaction_id
4607: into l_txfr_txn_id
4608: from mtl_material_transactions
4609: where transaction_id = i_txn_id;
4610: else
4611: l_txfr_txn_id := -1;
4612: end if;

Line 4849: from mtl_material_transactions

4845:
4846: -- Get the inv_layer_id whose cost is being changed
4847: select transaction_source_id
4848: into l_inv_layer_id
4849: from mtl_material_transactions
4850: where transaction_id = I_TXN_ID;
4851:
4852: -- check for existence of mctcd
4853: l_stmt_num := 7;

Line 5122: update mtl_material_transactions mmt

5118: end if;
5119:
5120: /* Update MMT.quantity_adjusted with update transaction quantity. */
5121:
5122: update mtl_material_transactions mmt
5123: set last_update_date = sysdate,
5124: last_updated_by = i_user_id,
5125: last_update_login = i_login_id,
5126: program_application_id = i_prg_appl_id,

Line 5929: from mtl_material_transactions

5925: l_conv_date,
5926: l_conv_rate,
5927: l_conv_type,
5928: l_onhand_var_acct
5929: from mtl_material_transactions
5930: where transaction_id = i_txn_id;
5931:
5932: l_stmt_num := 3;
5933: select decode(encumbrance_reversal_flag,1,1,2,0,0)