DBA Data[Home] [Help]

APPS.CSTPAPBR dependencies on MTL_MATERIAL_TRANSACTIONS

Line 9: | MTL_MATERIAL_TRANSACTIONS or WIP_TRANSACTIONS depending on the type of txn |

5:
6: /*============================================================================+
7: | This procedure is called by the Accounting Package for the Accounting Lib. |
8: | It first gets the details of the transaction from either |
9: | MTL_MATERIAL_TRANSACTIONS or WIP_TRANSACTIONS depending on the type of txn |
10: | that is being processed. The appropriate procedure is then called to create |
11: | the accounting entry lines in the form of a PL/SQL table. |
12: |============================================================================*/
13:

Line 182: mtl_material_transactions mmt,

178: l_ae_txn_rec.om_line_id,
179: l_ae_txn_rec.cogs_percentage,
180: l_ae_txn_rec.expense_account_id
181: FROM
182: mtl_material_transactions mmt,
183: mtl_system_items msi
184: WHERE
185: mmt.inventory_item_id = msi.inventory_item_id AND
186: mmt.organization_id = msi.organization_id AND

Line 672: FROM mtl_material_transactions mmt,mtl_interorg_parameters mip

668:
669: l_stmt_num := 12;
670: SELECT nvl(mmt.fob_point,mip.fob_point)
671: INTO l_fob_point
672: FROM mtl_material_transactions mmt,mtl_interorg_parameters mip
673: WHERE mmt.transaction_id = i_ae_txn_rec.transaction_id
674: AND mip.from_organization_id = i_ae_txn_rec.xfer_organization_id
675: AND mip.to_organization_id = i_ae_txn_rec.organization_id;
676:

Line 773: FROM mtl_material_transactions mmt

769: (i_ae_txn_rec.txn_action_id =1 and i_ae_txn_rec.txn_src_type_id =1) OR
770: (i_ae_txn_rec.txn_action_id =29 and i_ae_txn_rec.txn_src_type_id =1)
771: THEN
772: SELECT mmt.rcv_transaction_id into l_rcv_txn
773: FROM mtl_material_transactions mmt
774: WHERE mmt.transaction_id = i_ae_txn_rec.transaction_id;
775:
776: fnd_file.put_line(fnd_file.log,'i_ae_txn_rec.transaction_id << '|| i_ae_txn_rec.transaction_id);
777: fnd_file.put_line(fnd_file.log,'l_rcv_txn << '|| l_rcv_txn );

Line 938: from mtl_material_transactions

934: procedure */
935:
936: select nvl(logical_transaction, 2)
937: into l_logical_transaction
938: from mtl_material_transactions
939: where transaction_id = i_ae_txn_rec.transaction_id;
940:
941: -- Calling procedures, depending on transaction_source_type_id and transaction_action_id.
942: -- --------------------------------------------------------------------------------------

Line 1967: FROM mtl_material_transactions mmt,mtl_interorg_parameters mip

1963: /* Get FOB Point */
1964: IF (i_ae_txn_rec.txn_action_id IN (12,21,15,22)) THEN -- INVCONV sikhanna
1965: SELECT nvl(mmt.fob_point,mip.fob_point)
1966: INTO l_fob_point
1967: FROM mtl_material_transactions mmt,mtl_interorg_parameters mip
1968: WHERE mmt.transaction_id = i_ae_txn_rec.transaction_id
1969: AND mip.from_organization_id = decode(i_ae_txn_rec.txn_action_id,
1970: 21,i_ae_txn_rec.organization_id,
1971: 22,i_ae_txn_rec.organization_id, -- INVCONV sikhanna

Line 2264: FROM mtl_material_transactions

2260:
2261: l_stmt_num := 43;
2262: SELECT transfer_transaction_id
2263: INTO l_txfr_txn_id
2264: FROM mtl_material_transactions
2265: WHERE transaction_id = i_ae_txn_rec.transaction_id;
2266:
2267: END IF;
2268:

Line 2285: FROM mtl_material_transactions

2281: 3, decode(sign(i_ae_txn_rec.primary_quantity),
2282: 1, transfer_organization_id,
2283: organization_id),
2284: NULL)
2285: FROM mtl_material_transactions
2286: WHERE transaction_id = i_ae_txn_rec.transaction_id);
2287: EXCEPTION
2288: WHEN no_data_found THEN
2289: l_shipping_cg_id := -1;

Line 2544: FROM mtl_material_transactions MMT

2540: IF (i_ae_txn_rec.txn_action_id = 15) THEN
2541:
2542: SELECT NVL(mmt.transfer_price,0)
2543: INTO l_transfer_price
2544: FROM mtl_material_transactions MMT
2545: WHERE MMT.transaction_id = i_ae_txn_rec.transaction_id;
2546:
2547: ELSE
2548:

Line 2551: FROM mtl_material_transactions MMT

2547: ELSE
2548:
2549: SELECT NVL(mmt.transfer_price,0) * l_conv_rate
2550: INTO l_transfer_price
2551: FROM mtl_material_transactions MMT
2552: WHERE MMT.transaction_id = i_ae_txn_rec.transaction_id;
2553:
2554: END IF;
2555:

Line 2808: mtl_material_transactions mmt

2804: l_io_freight_acct,
2805: l_io_txfr_cr_acct,
2806: l_io_txfr_var_acct
2807: FROM mtl_interorg_parameters mip,
2808: mtl_material_transactions mmt
2809: WHERE mip.from_organization_id = i_ae_txn_rec.organization_id
2810: AND mip.to_organization_id = i_ae_txn_rec.xfer_organization_id
2811: AND mmt.transaction_id = i_ae_txn_rec.transaction_id;
2812:

Line 2887: FROM mtl_material_transactions

2883: /* Get transfer credit information */
2884: l_stmt_num := 112;
2885: SELECT nvl(transfer_percentage,0),nvl(transfer_cost,0)
2886: INTO l_txfr_percent,l_txfr_cost
2887: FROM mtl_material_transactions
2888: WHERE transaction_id = i_ae_txn_rec.transaction_id;
2889:
2890: IF (l_txfr_percent <> 0) THEN
2891: l_txfr_credit := (l_txfr_percent * l_pacp_pwac_cost / 100);

Line 2979: FROM mtl_material_transactions

2975: /* Get transfer credit information */
2976: l_stmt_num := 117;
2977: SELECT nvl(transfer_percentage,0),nvl(transfer_cost,0)
2978: INTO l_txfr_percent,l_txfr_cost
2979: FROM mtl_material_transactions
2980: WHERE transaction_id = i_ae_txn_rec.transaction_id;
2981:
2982: IF (l_txfr_percent <> 0) THEN
2983: l_txfr_credit := (l_txfr_percent * l_prev_period_pwac_cost / 100);

Line 3129: FROM mtl_material_transactions

3125: l_stmt_num := 145;
3126:
3127: SELECT nvl(transfer_percentage,0),nvl(transfer_cost,0)
3128: INTO l_txfr_percent,l_txfr_cost
3129: FROM mtl_material_transactions
3130: WHERE transaction_id = i_ae_txn_rec.transaction_id;
3131:
3132: IF (l_txfr_percent <> 0) THEN
3133: l_txfr_credit := (l_txfr_percent * (l_perp_ship_value)/ (100 * abs(i_ae_txn_rec.primary_quantity)));

Line 3277: FROM mtl_interorg_parameters mip,mtl_material_transactions mmt

3273: l_io_freight_acct,
3274: l_io_txfr_var_acct,
3275: l_txfr_cost, -- transfer price
3276: l_trp_cost -- transportation cost
3277: FROM mtl_interorg_parameters mip,mtl_material_transactions mmt
3278: WHERE mip.from_organization_id = i_ae_txn_rec.organization_id
3279: AND mip.to_organization_id = i_ae_txn_rec.xfer_organization_id
3280: AND mmt.transaction_id = i_ae_txn_rec.transaction_id;
3281:

Line 3370: mtl_material_transactions mmt

3366: mmt.transportation_dist_account
3367: INTO l_io_pay_acct,
3368: l_io_freight_acct
3369: FROM mtl_interorg_parameters mip,
3370: mtl_material_transactions mmt
3371: WHERE mip.from_organization_id = i_ae_txn_rec.organization_id
3372: AND mip.to_organization_id = i_ae_txn_rec.xfer_organization_id
3373: AND mmt.transaction_id = i_ae_txn_rec.transaction_id;
3374:

Line 3415: FROM mtl_material_transactions

3411: l_stmt_num := 215;
3412:
3413: SELECT nvl(transportation_cost,0) * l_conv_rate /* convert from shipping org currency to receiving org currency */
3414: INTO l_trp_cost
3415: FROM mtl_material_transactions
3416: WHERE transaction_id = i_ae_txn_rec.transaction_id;
3417:
3418: l_ae_line_rec.transaction_value := l_trp_cost;
3419: l_ae_line_rec.account := l_io_freight_acct;

Line 3622: FROM mtl_interorg_parameters mip,mtl_material_transactions mmt

3618: INTO l_io_rcv_acct,
3619: l_io_freight_acct,
3620: l_io_txfr_cr_acct,
3621: l_io_txfr_var_acct
3622: FROM mtl_interorg_parameters mip,mtl_material_transactions mmt
3623: WHERE mip.from_organization_id = i_ae_txn_rec.organization_id
3624: AND mip.to_organization_id = i_ae_txn_rec.xfer_organization_id
3625: AND mmt.transaction_id = i_ae_txn_rec.transaction_id;
3626:

Line 3706: FROM mtl_material_transactions

3702: nvl(transportation_cost,0)
3703: INTO l_txfr_percent,
3704: l_txfr_cost,
3705: l_trp_cost
3706: FROM mtl_material_transactions
3707: WHERE transaction_id = i_ae_txn_rec.transaction_id;
3708:
3709: IF (l_txfr_percent <> 0) THEN
3710: l_txfr_credit := (l_txfr_percent * l_pacp_pwac_cost / 100);

Line 3835: FROM mtl_material_transactions

3831: nvl(transportation_cost,0)
3832: INTO l_txfr_percent,
3833: l_txfr_cost,
3834: l_trp_cost
3835: FROM mtl_material_transactions
3836: WHERE transaction_id = i_ae_txn_rec.transaction_id;
3837:
3838: IF (l_txfr_percent <> 0) THEN
3839: l_txfr_credit := (l_txfr_percent * l_prev_period_pwac_cost / 100);

Line 4006: FROM mtl_interorg_parameters mip,mtl_material_transactions mmt

4002: INTO l_io_rcv_acct,
4003: l_io_freight_acct,
4004: l_io_txfr_cr_acct,
4005: l_io_txfr_var_acct
4006: FROM mtl_interorg_parameters mip,mtl_material_transactions mmt
4007: WHERE mip.from_organization_id = i_ae_txn_rec.organization_id -- INVCONV condition is opposite
4008: AND mip.to_organization_id = i_ae_txn_rec.xfer_organization_id
4009: AND mmt.transaction_id = i_ae_txn_rec.transaction_id;
4010:

Line 4021: FROM mtl_material_transactions mmt

4017: SELECT nvl(transfer_price,0),
4018: nvl(transportation_cost,0)
4019: INTO l_txfr_cost, -- transfer price
4020: l_trp_cost -- transportation cost
4021: FROM mtl_material_transactions mmt
4022: WHERE mmt.transaction_id = i_ae_txn_rec.transaction_id;
4023:
4024: l_stmt_num := 328;
4025: /* create debit entries */

Line 4145: FROM mtl_material_transactions

4141: l_stmt_num := 342;
4142:
4143: SELECT nvl(transfer_percentage,0),nvl(transfer_cost,0),nvl(transportation_cost,0)
4144: INTO l_txfr_percent,l_txfr_cost,l_trp_cost
4145: FROM mtl_material_transactions
4146: WHERE transaction_id = i_ae_txn_rec.transaction_id;
4147:
4148: IF (l_txfr_percent <> 0) THEN
4149: l_txfr_credit := (l_txfr_percent * l_perp_ship_value) / (100 * abs(i_ae_txn_rec.primary_quantity));

Line 4466: FROM mtl_material_transactions

4462: /* Credit Intercompany Accrual Account */
4463:
4464: SELECT nvl(expense_account_id,-1)
4465: INTO l_accrual_account
4466: FROM mtl_material_transactions
4467: WHERE transaction_id = i_ae_txn_rec.transaction_id;
4468:
4469: l_stmt_num := 396;
4470: -- Bug 5573993 - Derive the Intercompany account to break dependency on perpetual

Line 4520: FROM mtl_material_transactions MMT

4516: l_stmt_num := 401;
4517:
4518: SELECT NVL(mmt.transfer_price,0)
4519: INTO l_transfer_price
4520: FROM mtl_material_transactions MMT
4521: WHERE MMT.transaction_id = i_ae_txn_rec.transaction_id;
4522:
4523: IF g_debug_flag = 'Y' THEN
4524: fnd_file.put_line(fnd_file.log,l_api_name || ': ' || l_stmt_num ||

Line 4862: FROM mtl_interorg_parameters mip,mtl_material_transactions mmt

4858: INTO l_io_rcv_acct,
4859: l_io_freight_acct,
4860: l_io_txfr_cr_acct,
4861: l_io_txfr_var_acct
4862: FROM mtl_interorg_parameters mip,mtl_material_transactions mmt
4863: WHERE mip.from_organization_id = i_ae_txn_rec.xfer_organization_id
4864: AND mip.to_organization_id = i_ae_txn_rec.organization_id
4865: AND mmt.transaction_id = i_ae_txn_rec.transaction_id;
4866:

Line 4982: FROM mtl_material_transactions

4978:
4979: l_stmt_num := 492;
4980: SELECT nvl(transfer_percentage,0),nvl(transfer_cost,0),nvl(transportation_cost,0),primary_quantity
4981: INTO l_txfr_percent,l_txfr_cost,l_trp_cost,l_txfr_txn_qty
4982: FROM mtl_material_transactions
4983: WHERE transaction_id = l_txfr_txn_id;
4984:
4985: IF (l_txfr_percent <> 0) THEN
4986: l_txfr_credit := (l_txfr_percent * l_pacp_pwac_cost / 100);

Line 5105: FROM mtl_material_transactions

5101: l_stmt_num := 505;
5102:
5103: SELECT nvl(transfer_percentage,0),nvl(transfer_cost,0),nvl(transportation_cost,0),primary_quantity
5104: INTO l_txfr_percent,l_txfr_cost,l_trp_cost,l_txfr_txn_qty
5105: FROM mtl_material_transactions
5106: WHERE transaction_id = l_txfr_txn_id;
5107:
5108: IF (l_txfr_percent <> 0) THEN
5109: l_txfr_credit := (l_txfr_percent * l_prev_period_pwac_cost / 100);

Line 5276: FROM mtl_material_transactions

5272: We also need the shipment transaction quantity since this is the quantity we'll
5273: need to divide by to get the unit transfer and transportation cost. */
5274: SELECT nvl(transfer_percentage,0),nvl(transfer_cost,0),nvl(transportation_cost,0),primary_quantity
5275: INTO l_txfr_percent,l_txfr_cost,l_trp_cost,l_txfr_txn_qty
5276: FROM mtl_material_transactions
5277: WHERE transaction_id = l_txfr_txn_id;
5278:
5279: IF (l_txfr_percent <> 0) THEN
5280: l_txfr_credit := (l_txfr_percent * (l_perp_ship_value)/ (100 * abs(l_txfr_txn_qty)));

Line 5617: mtl_material_transactions mmt

5613: mmt.transportation_dist_account
5614: INTO l_io_pay_acct,
5615: l_io_freight_acct
5616: FROM mtl_interorg_parameters mip,
5617: mtl_material_transactions mmt
5618: WHERE mip.from_organization_id = i_ae_txn_rec.xfer_organization_id
5619: AND mip.to_organization_id = i_ae_txn_rec.organization_id
5620: AND mmt.transaction_id = i_ae_txn_rec.transaction_id;
5621:

Line 5664: FROM mtl_material_transactions mmt

5660: SELECT nvl(transfer_price,0),
5661: nvl(transportation_cost,0)
5662: INTO l_txfr_cost, -- transfer price
5663: l_trp_cost -- transportation cost
5664: FROM mtl_material_transactions mmt
5665: WHERE mmt.transaction_id = i_ae_txn_rec.transaction_id;
5666:
5667: /* Credit freight account */
5668:

Line 5793: FROM mtl_interorg_parameters mip,mtl_material_transactions mmt

5789: INTO l_io_rcv_acct,
5790: l_io_freight_acct,
5791: l_io_txfr_cr_acct,
5792: l_io_txfr_var_acct
5793: FROM mtl_interorg_parameters mip,mtl_material_transactions mmt
5794: WHERE mip.from_organization_id = i_ae_txn_rec.organization_id -- INVCONV condition is opposite
5795: AND mip.to_organization_id = i_ae_txn_rec.xfer_organization_id
5796: AND mmt.transaction_id = i_ae_txn_rec.transaction_id;
5797:

Line 5808: FROM mtl_material_transactions mmt

5804: SELECT nvl(transfer_price,0),
5805: nvl(transportation_cost,0)
5806: INTO l_txfr_cost, -- transfer price
5807: l_trp_cost -- transportation cost
5808: FROM mtl_material_transactions mmt
5809: WHERE mmt.transaction_id = i_ae_txn_rec.transaction_id;
5810:
5811: l_stmt_num := 655;
5812: /* create debit entries */

Line 6603: from rcv_transactions rt, mtl_material_transactions mmt

6599: Account */
6600:
6601: select nvl(rt.dropship_type_code, 3)
6602: into l_dropship_type_code
6603: from rcv_transactions rt, mtl_material_transactions mmt
6604: where mmt.rcv_transaction_id = rt.transaction_id
6605: and mmt.transaction_id = i_ae_txn_rec.transaction_id;
6606:
6607: if (l_dropship_type_code = 1 or l_dropship_type_code = 2) then

Line 6636: FROM mtl_material_transactions MMT,

6632: IF l_ref_om_line_id IS NOT NULL THEN
6633:
6634: SELECT count(*)
6635: INTO l_count_so
6636: FROM mtl_material_transactions MMT,
6637: mtl_pac_actual_cost_details MPACD
6638: WHERE (MMT.transaction_action_id = 1 OR MMT.transaction_action_id = 7)
6639: AND MMT.transaction_source_type_id = 2
6640: AND EXISTS (SELECT 1

Line 7234: from mtl_material_transactions

7230: --update i_ae_txn_rec.
7231:
7232: select nvl(quantity_adjusted, 0)
7233: into l_qty
7234: from mtl_material_transactions
7235: where transaction_id = i_ae_txn_rec.transaction_id;
7236:
7237: -- Figure out Retroactive price update account.
7238: -- ---------------------------------------------

Line 9407: l_curr_type MTL_MATERIAL_TRANSACTIONS.CURRENCY_CONVERSION_TYPE%TYPE;

9403: l_snd_curr GL_SETS_OF_BOOKS.CURRENCY_CODE%TYPE;
9404: l_rcv_sob_id NUMBER;
9405: l_rcv_coa_id NUMBER;
9406: l_rcv_curr GL_SETS_OF_BOOKS.CURRENCY_CODE%TYPE;
9407: l_curr_type MTL_MATERIAL_TRANSACTIONS.CURRENCY_CONVERSION_TYPE%TYPE;
9408: l_conv_rate NUMBER;
9409: l_conv_date DATE;
9410: l_err_rec CSTPALTY.cst_ae_err_rec_type;
9411: l_from_org NUMBER;

Line 9474: FROM mtl_material_transactions

9470: 3, decode(sign(i_ae_txn_rec.primary_quantity),
9471: 1, transfer_organization_id,
9472: organization_id),
9473: NULL)
9474: FROM mtl_material_transactions
9475: WHERE transaction_id = i_ae_txn_rec.transaction_id);
9476: EXCEPTION
9477: WHEN no_data_found THEN
9478: l_shipping_cg_id := -1;

Line 9542: FROM mtl_material_transactions MMT, oe_order_headers_all OEH, oe_order_lines_all OEL

9538: l_stmt_num := 40;
9539:
9540: SELECT MMT.trx_source_line_id, OEH.header_id, OEH.sold_to_org_id, OEH.order_type_id
9541: INTO l_line_id, l_header_id, l_cust_id, l_order_type
9542: FROM mtl_material_transactions MMT, oe_order_headers_all OEH, oe_order_lines_all OEL
9543: WHERE MMT.transaction_id = i_ae_txn_rec.transaction_id
9544: AND OEL.line_id = MMT.trx_source_line_id
9545: AND OEL.header_id = OEH.header_id;
9546:

Line 9556: FROM mtl_material_transactions MMT, rcv_transactions RT

9552: -- For action id 22, transfer_transaction_id points to receiving txn, not the shipping txn,
9553: -- because it got created after goods are received, so goto else part...
9554: decode(l_pd_txfr_ind, 1, 0, nvl(MMT.transfer_transaction_id, 0))
9555: INTO l_ship_num, l_req_line, l_txf_txn_id
9556: FROM mtl_material_transactions MMT, rcv_transactions RT
9557: WHERE MMT.transaction_id = i_ae_txn_rec.transaction_id
9558: AND RT.transaction_id = MMT.rcv_transaction_id;
9559:
9560:

Line 9567: FROM mtl_material_transactions MMT, oe_order_headers_all OEH, oe_order_lines_all OEL

9563: l_stmt_num := 60;
9564:
9565: SELECT MMT.trx_source_line_id, OEH.header_id, OEH.sold_to_org_id, OEH.order_type_id
9566: INTO l_line_id, l_header_id, l_cust_id, l_order_type
9567: FROM mtl_material_transactions MMT, oe_order_headers_all OEH, oe_order_lines_all OEL
9568: WHERE MMT.transaction_id = i_ae_txn_rec.xfer_transaction_id
9569: AND MMT.trx_source_line_id = OEL.line_id
9570: AND OEL.header_id = OEH.header_id;
9571:

Line 9578: FROM mtl_material_transactions MMT, oe_order_headers_all OEH, oe_order_lines_all OEL

9574: l_stmt_num := 70;
9575:
9576: SELECT MMT.trx_source_line_id, OEH.header_id, OEH.sold_to_org_id, OEH.order_type_id
9577: INTO l_line_id, l_header_id, l_cust_id, l_order_type
9578: FROM mtl_material_transactions MMT, oe_order_headers_all OEH, oe_order_lines_all OEL
9579: WHERE MMT.transaction_action_id = 21
9580: AND MMT.transaction_source_type_id = 8
9581: AND MMT.organization_id = l_from_org
9582: AND MMT.inventory_item_id = i_ae_txn_rec.inventory_item_id

Line 9926: FROM mtl_material_transactions mmt

9922: This cannot be NULL as it is stamped by INV Manager and not
9923: during Cost Processing in CSTPAVCP.Cost_LogicalSOReceipt */
9924: SELECT distribution_account_id
9925: INTO l_mmt_exp_account
9926: FROM mtl_material_transactions mmt
9927: WHERE mmt.transaction_id = i_ae_txn_rec.xfer_transaction_id;
9928:
9929: l_stmt_num := 120;
9930:

Line 10086: mtl_material_transactions mmt

10082: INTO l_io_rcv_acct,
10083: l_io_txfr_cr_acct,
10084: l_io_txfr_var_acct
10085: FROM mtl_interorg_parameters mip,
10086: mtl_material_transactions mmt
10087: WHERE mip.from_organization_id = i_ae_txn_rec.organization_id
10088: AND mip.to_organization_id = i_ae_txn_rec.xfer_organization_id
10089: AND mmt.transaction_id = i_ae_txn_rec.transaction_id;
10090:

Line 10260: mtl_material_transactions mmt

10256: distribution_account_id
10257: INTO l_io_pay_acct,
10258: l_mmt_exp_account
10259: FROM mtl_interorg_parameters mip,
10260: mtl_material_transactions mmt
10261: WHERE mip.from_organization_id = i_ae_txn_rec.xfer_organization_id
10262: AND mip.to_organization_id = i_ae_txn_rec.organization_id
10263: AND mmt.transaction_id = i_ae_txn_rec.transaction_id;
10264:

Line 10414: FROM mtl_interorg_parameters mip,mtl_material_transactions mmt

10410: nvl(mmt.transfer_price,0)
10411: INTO l_io_rcv_acct,
10412: l_io_txfr_var_acct,
10413: l_transfer_price -- transfer price
10414: FROM mtl_interorg_parameters mip,mtl_material_transactions mmt
10415: WHERE mip.from_organization_id = i_ae_txn_rec.organization_id
10416: AND mip.to_organization_id = i_ae_txn_rec.xfer_organization_id
10417: AND mmt.transaction_id = i_ae_txn_rec.transaction_id;
10418:

Line 10546: mtl_material_transactions mmt

10542: INTO l_io_pay_acct,
10543: l_mmt_exp_account,
10544: l_transfer_price -- transfer price
10545: FROM mtl_interorg_parameters mip,
10546: mtl_material_transactions mmt
10547: WHERE mip.from_organization_id = i_ae_txn_rec.xfer_organization_id
10548: AND mip.to_organization_id = i_ae_txn_rec.organization_id
10549: AND mmt.transaction_id = i_ae_txn_rec.transaction_id;
10550:

Line 10718: FROM mtl_material_transactions

10714:
10715: /* Get transfer credit information */
10716: SELECT nvl(transfer_percentage,0),nvl(transfer_cost,0)
10717: INTO l_txfr_percent,l_txfr_cost
10718: FROM mtl_material_transactions
10719: WHERE transaction_id = i_ae_txn_rec.transaction_id;
10720:
10721: l_stmt_num := 110;
10722:

Line 10957: p_transaction_id IN MTL_MATERIAL_TRANSACTIONS.TRANSACTION_ID%TYPE,

10953:
10954:
10955: PROCEDURE CompEncumbrance_IntOrdersExp (
10956: p_api_version IN NUMBER,
10957: p_transaction_id IN MTL_MATERIAL_TRANSACTIONS.TRANSACTION_ID%TYPE,
10958: p_req_line_id IN PO_REQUISITION_LINES_ALL.REQUISITION_LINE_ID%TYPE,
10959: p_item_id IN MTL_SYSTEM_ITEMS.INVENTORY_ITEM_ID%TYPE,
10960: p_organization_id IN MTL_PARAMETERS.ORGANIZATION_ID%TYPE,
10961: p_primary_qty IN MTL_MATERIAL_TRANSACTIONS.PRIMARY_QUANTITY%TYPE,

Line 10961: p_primary_qty IN MTL_MATERIAL_TRANSACTIONS.PRIMARY_QUANTITY%TYPE,

10957: p_transaction_id IN MTL_MATERIAL_TRANSACTIONS.TRANSACTION_ID%TYPE,
10958: p_req_line_id IN PO_REQUISITION_LINES_ALL.REQUISITION_LINE_ID%TYPE,
10959: p_item_id IN MTL_SYSTEM_ITEMS.INVENTORY_ITEM_ID%TYPE,
10960: p_organization_id IN MTL_PARAMETERS.ORGANIZATION_ID%TYPE,
10961: p_primary_qty IN MTL_MATERIAL_TRANSACTIONS.PRIMARY_QUANTITY%TYPE,
10962: p_total_primary_qty IN NUMBER,
10963: x_encumbrance_amount OUT NOCOPY NUMBER,
10964: x_encumbrance_account OUT NOCOPY NUMBER,
10965: o_ae_err_rec OUT NOCOPY CSTPALTY.cst_ae_err_rec_type

Line 11096: p_transaction_id IN MTL_MATERIAL_TRANSACTIONS.TRANSACTION_ID%TYPE,

11092: END CompEncumbrance_IntOrdersExp;
11093:
11094: PROCEDURE CompEncumbrance_IntOrdersExp (
11095: p_api_version IN NUMBER,
11096: p_transaction_id IN MTL_MATERIAL_TRANSACTIONS.TRANSACTION_ID%TYPE,
11097: x_encumbrance_amount OUT NOCOPY NUMBER,
11098: x_encumbrance_account OUT NOCOPY NUMBER,
11099: o_ae_err_rec OUT NOCOPY CSTPALTY.cst_ae_err_rec_type
11100: ) IS

Line 11103: l_primary_qty MTL_MATERIAL_TRANSACTIONS.PRIMARY_QUANTITY%TYPE;

11099: o_ae_err_rec OUT NOCOPY CSTPALTY.cst_ae_err_rec_type
11100: ) IS
11101:
11102: l_total_primary_qty NUMBER;
11103: l_primary_qty MTL_MATERIAL_TRANSACTIONS.PRIMARY_QUANTITY%TYPE;
11104: l_organization_id MTL_MATERIAL_TRANSACTIONS.ORGANIZATION_ID%TYPE;
11105: l_trx_source_line_id MTL_MATERIAL_TRANSACTIONS.TRX_SOURCE_LINE_ID%TYPE;
11106: l_req_line_id PO_REQUISITION_LINES_ALL.REQUISITION_LINE_ID%TYPE;
11107: l_item_id MTL_MATERIAL_TRANSACTIONS.INVENTORY_ITEM_ID%TYPE;

Line 11104: l_organization_id MTL_MATERIAL_TRANSACTIONS.ORGANIZATION_ID%TYPE;

11100: ) IS
11101:
11102: l_total_primary_qty NUMBER;
11103: l_primary_qty MTL_MATERIAL_TRANSACTIONS.PRIMARY_QUANTITY%TYPE;
11104: l_organization_id MTL_MATERIAL_TRANSACTIONS.ORGANIZATION_ID%TYPE;
11105: l_trx_source_line_id MTL_MATERIAL_TRANSACTIONS.TRX_SOURCE_LINE_ID%TYPE;
11106: l_req_line_id PO_REQUISITION_LINES_ALL.REQUISITION_LINE_ID%TYPE;
11107: l_item_id MTL_MATERIAL_TRANSACTIONS.INVENTORY_ITEM_ID%TYPE;
11108: l_txn_action_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_ACTION_ID%TYPE;

Line 11105: l_trx_source_line_id MTL_MATERIAL_TRANSACTIONS.TRX_SOURCE_LINE_ID%TYPE;

11101:
11102: l_total_primary_qty NUMBER;
11103: l_primary_qty MTL_MATERIAL_TRANSACTIONS.PRIMARY_QUANTITY%TYPE;
11104: l_organization_id MTL_MATERIAL_TRANSACTIONS.ORGANIZATION_ID%TYPE;
11105: l_trx_source_line_id MTL_MATERIAL_TRANSACTIONS.TRX_SOURCE_LINE_ID%TYPE;
11106: l_req_line_id PO_REQUISITION_LINES_ALL.REQUISITION_LINE_ID%TYPE;
11107: l_item_id MTL_MATERIAL_TRANSACTIONS.INVENTORY_ITEM_ID%TYPE;
11108: l_txn_action_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_ACTION_ID%TYPE;
11109: l_txn_src_type_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_SOURCE_TYPE_ID%TYPE;

Line 11107: l_item_id MTL_MATERIAL_TRANSACTIONS.INVENTORY_ITEM_ID%TYPE;

11103: l_primary_qty MTL_MATERIAL_TRANSACTIONS.PRIMARY_QUANTITY%TYPE;
11104: l_organization_id MTL_MATERIAL_TRANSACTIONS.ORGANIZATION_ID%TYPE;
11105: l_trx_source_line_id MTL_MATERIAL_TRANSACTIONS.TRX_SOURCE_LINE_ID%TYPE;
11106: l_req_line_id PO_REQUISITION_LINES_ALL.REQUISITION_LINE_ID%TYPE;
11107: l_item_id MTL_MATERIAL_TRANSACTIONS.INVENTORY_ITEM_ID%TYPE;
11108: l_txn_action_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_ACTION_ID%TYPE;
11109: l_txn_src_type_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_SOURCE_TYPE_ID%TYPE;
11110: l_rcv_txn_id MTL_MATERIAL_TRANSACTIONS.RCV_TRANSACTION_ID%TYPE;
11111: l_txn_type_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_TYPE_ID%TYPE;

Line 11108: l_txn_action_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_ACTION_ID%TYPE;

11104: l_organization_id MTL_MATERIAL_TRANSACTIONS.ORGANIZATION_ID%TYPE;
11105: l_trx_source_line_id MTL_MATERIAL_TRANSACTIONS.TRX_SOURCE_LINE_ID%TYPE;
11106: l_req_line_id PO_REQUISITION_LINES_ALL.REQUISITION_LINE_ID%TYPE;
11107: l_item_id MTL_MATERIAL_TRANSACTIONS.INVENTORY_ITEM_ID%TYPE;
11108: l_txn_action_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_ACTION_ID%TYPE;
11109: l_txn_src_type_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_SOURCE_TYPE_ID%TYPE;
11110: l_rcv_txn_id MTL_MATERIAL_TRANSACTIONS.RCV_TRANSACTION_ID%TYPE;
11111: l_txn_type_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_TYPE_ID%TYPE;
11112: l_txn_date MTL_MATERIAL_TRANSACTIONS.TRANSACTION_DATE%TYPE;

Line 11109: l_txn_src_type_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_SOURCE_TYPE_ID%TYPE;

11105: l_trx_source_line_id MTL_MATERIAL_TRANSACTIONS.TRX_SOURCE_LINE_ID%TYPE;
11106: l_req_line_id PO_REQUISITION_LINES_ALL.REQUISITION_LINE_ID%TYPE;
11107: l_item_id MTL_MATERIAL_TRANSACTIONS.INVENTORY_ITEM_ID%TYPE;
11108: l_txn_action_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_ACTION_ID%TYPE;
11109: l_txn_src_type_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_SOURCE_TYPE_ID%TYPE;
11110: l_rcv_txn_id MTL_MATERIAL_TRANSACTIONS.RCV_TRANSACTION_ID%TYPE;
11111: l_txn_type_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_TYPE_ID%TYPE;
11112: l_txn_date MTL_MATERIAL_TRANSACTIONS.TRANSACTION_DATE%TYPE;
11113:

Line 11110: l_rcv_txn_id MTL_MATERIAL_TRANSACTIONS.RCV_TRANSACTION_ID%TYPE;

11106: l_req_line_id PO_REQUISITION_LINES_ALL.REQUISITION_LINE_ID%TYPE;
11107: l_item_id MTL_MATERIAL_TRANSACTIONS.INVENTORY_ITEM_ID%TYPE;
11108: l_txn_action_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_ACTION_ID%TYPE;
11109: l_txn_src_type_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_SOURCE_TYPE_ID%TYPE;
11110: l_rcv_txn_id MTL_MATERIAL_TRANSACTIONS.RCV_TRANSACTION_ID%TYPE;
11111: l_txn_type_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_TYPE_ID%TYPE;
11112: l_txn_date MTL_MATERIAL_TRANSACTIONS.TRANSACTION_DATE%TYPE;
11113:
11114: l_stmt_num NUMBER;

Line 11111: l_txn_type_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_TYPE_ID%TYPE;

11107: l_item_id MTL_MATERIAL_TRANSACTIONS.INVENTORY_ITEM_ID%TYPE;
11108: l_txn_action_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_ACTION_ID%TYPE;
11109: l_txn_src_type_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_SOURCE_TYPE_ID%TYPE;
11110: l_rcv_txn_id MTL_MATERIAL_TRANSACTIONS.RCV_TRANSACTION_ID%TYPE;
11111: l_txn_type_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_TYPE_ID%TYPE;
11112: l_txn_date MTL_MATERIAL_TRANSACTIONS.TRANSACTION_DATE%TYPE;
11113:
11114: l_stmt_num NUMBER;
11115: l_api_name VARCHAR2(100) := 'CompEncumbrance_IntOrdersExp';

Line 11112: l_txn_date MTL_MATERIAL_TRANSACTIONS.TRANSACTION_DATE%TYPE;

11108: l_txn_action_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_ACTION_ID%TYPE;
11109: l_txn_src_type_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_SOURCE_TYPE_ID%TYPE;
11110: l_rcv_txn_id MTL_MATERIAL_TRANSACTIONS.RCV_TRANSACTION_ID%TYPE;
11111: l_txn_type_id MTL_MATERIAL_TRANSACTIONS.TRANSACTION_TYPE_ID%TYPE;
11112: l_txn_date MTL_MATERIAL_TRANSACTIONS.TRANSACTION_DATE%TYPE;
11113:
11114: l_stmt_num NUMBER;
11115: l_api_name VARCHAR2(100) := 'CompEncumbrance_IntOrdersExp';
11116: l_api_version NUMBER := 1.0;

Line 11153: MTL_MATERIAL_TRANSACTIONS mmt

11149: l_txn_type_id,
11150: l_rcv_txn_id,
11151: l_txn_date
11152: FROM
11153: MTL_MATERIAL_TRANSACTIONS mmt
11154: WHERE
11155: transaction_id = p_transaction_id;
11156:
11157: -- Get total received quantity so far just before processing the current receipt transaction

Line 11163: from mtl_material_transactions

11159: -- total receipt quantity of all the receipts is less than corresponding requisition quantity.
11160: l_stmt_num := 20;
11161: SELECT sum(primary_quantity)
11162: INTO l_total_primary_qty
11163: from mtl_material_transactions
11164: where transaction_action_id = l_txn_action_id
11165: and transaction_source_type_id = l_txn_src_type_id
11166: and transaction_type_id = l_txn_type_id
11167: and trx_source_line_id = l_req_line_id