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 2527: from mtl_material_transactions

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

Line 2533: from mtl_material_transactions

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

Line 2684: from mtl_material_transactions

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

Line 3146: FROM mtl_material_transactions

3142: -- check if the current transaction is a return to receiving or correction
3143: l_stmt_num := 65;
3144: SELECT COUNT(*)
3145: INTO l_rtr
3146: FROM mtl_material_transactions
3147: WHERE transaction_id = i_txn_id
3148: AND transaction_action_id in (1, 29)
3149: AND transaction_source_type_id = 1;
3150: -- if it is, try to first consume the inv layer created by the receipt

Line 3157: FROM mtl_material_transactions mmt_del,

3153: l_stmt_num := 70;
3154: BEGIN
3155: SELECT mmt_del.transaction_id
3156: INTO l_rtr_txn_id
3157: FROM mtl_material_transactions mmt_del,
3158: mtl_material_transactions mmt_rtr,
3159: rcv_transactions rt_rtr
3160: WHERE mmt_del.rcv_transaction_id = rt_rtr.parent_transaction_id
3161: AND rt_rtr.transaction_id = mmt_rtr.rcv_transaction_id

Line 3158: mtl_material_transactions mmt_rtr,

3154: BEGIN
3155: SELECT mmt_del.transaction_id
3156: INTO l_rtr_txn_id
3157: FROM mtl_material_transactions mmt_del,
3158: mtl_material_transactions mmt_rtr,
3159: rcv_transactions rt_rtr
3160: WHERE mmt_del.rcv_transaction_id = rt_rtr.parent_transaction_id
3161: AND rt_rtr.transaction_id = mmt_rtr.rcv_transaction_id
3162: AND mmt_rtr.transaction_id = i_txn_id;

Line 3651: from mtl_material_transactions

3647: l_stmt_num := 15;
3648:
3649: select organization_id, transfer_organization_id, primary_quantity
3650: into l_txn_org_id, l_txfr_org_id, l_txn_qty
3651: from mtl_material_transactions
3652: where transaction_id = i_txn_id;
3653:
3654: -- Determine the from and to org for this transaction.
3655: if (i_txn_action_id = 21) then -- intransit shipment

Line 3984: from mtl_material_transactions

3980: if (l_mclacd_ovhd > 0) then /* mclacd exists */
3981: l_stmt_num := 72;
3982: select transaction_type_id
3983: into l_txn_type_id
3984: from mtl_material_transactions
3985: where transaction_id = i_txn_id;
3986:
3987: /* Bug 2280515 :anjgupta
3988: The variance_amount is zero in the case of interorg receipt transactions.

Line 4211: from mtl_material_transactions

4207:
4208: l_stmt_num := 5;
4209: select transaction_type_id
4210: into l_txn_type_id
4211: from mtl_material_transactions
4212: where transaction_id = i_txn_id;
4213:
4214: l_stmt_num := 6;
4215: select count(*)

Line 4494: ** Update Mtl_Material_Transactions **

4490: and mcacd.layer_id = i_layer_id
4491: and mcacd.transaction_action_id = i_txn_action_id;
4492:
4493: /********************************************************************
4494: ** Update Mtl_Material_Transactions **
4495: ** Need to update prior_costed_quantity now. **
4496: ********************************************************************/
4497: l_stmt_num := 40;
4498: if (i_no_update_mmt = 0) then

Line 4504: from mtl_material_transactions

4500: -- txfr_txn_id to update proper transaction in MMT.
4501: if (i_txn_action_id = 2 and i_txn_qty > 0) then
4502: select transfer_transaction_id
4503: into l_txfr_txn_id
4504: from mtl_material_transactions
4505: where transaction_id = i_txn_id;
4506: else
4507: l_txfr_txn_id := -1;
4508: end if;

Line 4745: from mtl_material_transactions

4741:
4742: -- Get the inv_layer_id whose cost is being changed
4743: select transaction_source_id
4744: into l_inv_layer_id
4745: from mtl_material_transactions
4746: where transaction_id = I_TXN_ID;
4747:
4748: -- check for existence of mctcd
4749: l_stmt_num := 7;

Line 5018: update mtl_material_transactions mmt

5014: end if;
5015:
5016: /* Update MMT.quantity_adjusted with update transaction quantity. */
5017:
5018: update mtl_material_transactions mmt
5019: set last_update_date = sysdate,
5020: last_updated_by = i_user_id,
5021: last_update_login = i_login_id,
5022: program_application_id = i_prg_appl_id,

Line 5825: from mtl_material_transactions

5821: l_conv_date,
5822: l_conv_rate,
5823: l_conv_type,
5824: l_onhand_var_acct
5825: from mtl_material_transactions
5826: where transaction_id = i_txn_id;
5827:
5828: l_stmt_num := 3;
5829: select decode(encumbrance_reversal_flag,1,1,2,0,0)