DBA Data[Home] [Help]

APPS.CST_ACCRUAL_LOAD dependencies on CST_WRITE_OFFS

Line 1001: | table into the new CST_WRITE_OFFS and |

997: | Purpose : This Procedure has all the necessary code to upgrade |
998: | old write off data into the new tables. |
999: | This procedure upgrades PO,AP and Inventory Write off |
1000: | transactions from the old PO_ACCRUAL_WRITE_OFFS_ALL |
1001: | table into the new CST_WRITE_OFFS and |
1002: | CST_WRITE_OFF_DETAILS table.This upgrade is done only |
1003: | for the very first run of the load program for the |
1004: | given OU.The old WIP write off data is not Upgraded. |
1005: | |

Line 1067: INSERT into cst_write_offs

1063: l_stmt_num := 10;
1064: debug(' l_stmt_num:'||l_stmt_num);
1065: debug(' Upgrading WO Receiving data ');
1066:
1067: INSERT into cst_write_offs
1068: (write_off_id,
1069: transaction_date,
1070: accrual_account_id,
1071: offset_account_id,

Line 1188: INSERT into cst_write_offs

1184: debug(' l_stmt_num :'||l_stmt_num);
1185: debug(' l_old_erv :'||l_old_erv);
1186: debug(' Upgrading WO miscellenaous AP invoice 11i');
1187:
1188: INSERT into cst_write_offs
1189: (write_off_id,
1190: transaction_date,
1191: accrual_account_id,
1192: offset_account_id,

Line 1322: INSERT into cst_write_offs

1318: l_stmt_num := 45;
1319: debug(' l_stmt_num :'||l_stmt_num);
1320: debug(' Upgrading WO miscellenaous AP invoice 11.0');
1321:
1322: INSERT into cst_write_offs
1323: (write_off_id,
1324: transaction_date,
1325: accrual_account_id,
1326: offset_account_id,

Line 1454: INSERT into cst_write_offs

1450: l_stmt_num := 50;
1451: debug(' l_stmt_num :'||l_stmt_num);
1452: debug(' Upgrading WO regular AP INVOICE data 11i');
1453:
1454: INSERT into cst_write_offs
1455: (write_off_id,
1456: transaction_date,
1457: accrual_account_id,
1458: offset_account_id,

Line 1621: INSERT into cst_write_offs

1617: debug(' Upgrading WO AP INVOICE data 11.0');
1618:
1619: /* Bug 6757017: The following query will upgrade write off date from 11.0 releases
1620: where the line_match_order wouild be null */
1621: INSERT into cst_write_offs
1622: (write_off_id,
1623: transaction_date,
1624: accrual_account_id,
1625: offset_account_id,

Line 1791: INSERT into cst_write_offs

1787: entered amount for pre 11.5.10 txns as it is not technically feasible because of the way
1788: we store the currency info in MTA for the txns.So we will be inserting NULL as entered amounts
1789: for pre 11.5.10 txns */
1790:
1791: INSERT into cst_write_offs
1792: (write_off_id,
1793: transaction_date,
1794: accrual_account_id,
1795: offset_account_id,

Line 1962: FROM cst_write_offs cwo,

1958: --{Need the original XLA entries
1959: ,xld.ae_header_id
1960: ,xld.ae_line_num
1961: --}
1962: FROM cst_write_offs cwo,
1963: po_accrual_write_offs_all pawo,
1964: mtl_transaction_accounts mta,
1965: xla_distribution_links xld,
1966: cst_accrual_accounts ca --BUG7528609

Line 2049: FROM cst_write_offs cwo,

2045: --{Need the original XLA entries
2046: ,xld.ae_header_id
2047: ,xld.ae_line_num
2048: --}
2049: FROM cst_write_offs cwo,
2050: po_accrual_write_offs_all pawo,
2051: po_lookup_codes plc,
2052: rcv_receiving_sub_ledger rrs,
2053: rcv_transactions rt,

Line 2142: FROM cst_write_offs cwo,

2138: --{ Need the original XLA entries
2139: ,MAX(xld.ae_header_id)
2140: ,MAX(xld.ae_line_num)
2141: --}
2142: FROM cst_write_offs cwo,
2143: po_accrual_write_offs_all pawo,
2144: po_lookup_codes plc,
2145: ap_invoice_distributions_all aida,
2146: ap_ae_lines_all aal,

Line 2517: FROM cst_write_offs cwo1

2513: AND NVL(pra.consigned_consumption_flag,'N') = 'Y'
2514: )
2515: )
2516: AND NOT EXISTS (SELECT 1
2517: FROM cst_write_offs cwo1
2518: WHERE cwo1.transaction_type_code = 'WRITE OFF'
2519: AND cwo1.invoice_distribution_id is NOT NULL
2520: AND cwo1.accrual_account_id = xla.code_combination_id
2521: AND cwo1.invoice_distribution_id = aida.invoice_distribution_id

Line 2523: FROM cst_write_offs cwo2

2519: AND cwo1.invoice_distribution_id is NOT NULL
2520: AND cwo1.accrual_account_id = xla.code_combination_id
2521: AND cwo1.invoice_distribution_id = aida.invoice_distribution_id
2522: AND cwo1.write_off_id = ( SELECT MAX(write_off_id)
2523: FROM cst_write_offs cwo2
2524: WHERE cwo2.invoice_distribution_id is NOT NULL
2525: AND cwo2.invoice_distribution_id = aida.invoice_distribution_id
2526: AND cwo2.accrual_account_id = xla.code_combination_id
2527: AND EXISTS (Select 1 from cst_write_off_details cwod

Line 2604: FROM cst_write_offs cwo1

2600: AND NVL(pra.consigned_consumption_flag,'N') = 'Y'
2601: )
2602: )
2603: AND NOT EXISTS (SELECT 1
2604: FROM cst_write_offs cwo1
2605: WHERE cwo1.transaction_type_code = 'WRITE OFF'
2606: AND cwo1.invoice_distribution_id is NOT NULL
2607: AND cwo1.accrual_account_id = xla.code_combination_id
2608: AND cwo1.invoice_distribution_id = aida.invoice_distribution_id

Line 2610: FROM cst_write_offs cwo2

2606: AND cwo1.invoice_distribution_id is NOT NULL
2607: AND cwo1.accrual_account_id = xla.code_combination_id
2608: AND cwo1.invoice_distribution_id = aida.invoice_distribution_id
2609: AND cwo1.write_off_id = ( SELECT MAX(write_off_id)
2610: FROM cst_write_offs cwo2
2611: WHERE cwo2.invoice_distribution_id is NOT NULL
2612: AND cwo2.invoice_distribution_id = aida.invoice_distribution_id
2613: AND cwo2.accrual_account_id = xla.code_combination_id
2614: AND EXISTS (Select 1 from cst_write_off_details cwod

Line 2909: FROM cst_write_offs cwo1

2905: AND hoi.org_information3 = to_char(p_operating_unit)
2906: )
2907: AND NOT EXISTS (
2908: SELECT 1
2909: FROM cst_write_offs cwo1
2910: WHERE cwo1.transaction_type_code = 'WRITE OFF'
2911: AND cwo1.inventory_transaction_id is NOT NULL
2912: AND cwo1.inventory_transaction_id = mmt.transaction_id
2913: AND cwo1.accrual_account_id = xal.code_combination_id

Line 2915: FROM cst_write_offs cwo2

2911: AND cwo1.inventory_transaction_id is NOT NULL
2912: AND cwo1.inventory_transaction_id = mmt.transaction_id
2913: AND cwo1.accrual_account_id = xal.code_combination_id
2914: AND cwo1.write_off_id = ( SELECT MAX(write_off_id)
2915: FROM cst_write_offs cwo2
2916: WHERE cwo2.inventory_transaction_id is NOT NULL
2917: AND cwo2.inventory_transaction_id = mmt.transaction_id
2918: AND cwo2.accrual_account_id = xal.code_combination_id
2919: AND EXISTS ( Select 1 from cst_write_off_details cwod

Line 3041: FROM cst_write_offs cwo1

3037: AND hoi.org_information3 = to_char(p_operating_unit) --bug 10648494
3038: )
3039: AND NOT EXISTS (
3040: SELECT 1
3041: FROM cst_write_offs cwo1
3042: WHERE cwo1.transaction_type_code = 'WRITE OFF'
3043: AND cwo1.inventory_transaction_id is NOT NULL
3044: AND cwo1.inventory_transaction_id = mmt.transaction_id
3045: AND cwo1.accrual_account_id = xal.code_combination_id

Line 3047: FROM cst_write_offs cwo2

3043: AND cwo1.inventory_transaction_id is NOT NULL
3044: AND cwo1.inventory_transaction_id = mmt.transaction_id
3045: AND cwo1.accrual_account_id = xal.code_combination_id
3046: AND cwo1.write_off_id = ( SELECT MAX(write_off_id)
3047: FROM cst_write_offs cwo2
3048: WHERE cwo2.inventory_transaction_id is NOT NULL
3049: AND cwo2.inventory_transaction_id = mmt.transaction_id
3050: AND cwo2.accrual_account_id = xal.code_combination_id
3051: AND EXISTS ( Select 1 from cst_write_off_details cwod

Line 3124: FROM cst_write_offs cwo1

3120: AND hoi.org_information3 = to_char(p_operating_unit) --bug 10648494
3121: )
3122: AND NOT EXISTS (
3123: SELECT 1
3124: FROM cst_write_offs cwo1
3125: WHERE cwo1.transaction_type_code = 'WRITE OFF'
3126: AND cwo1.inventory_transaction_id is NOT NULL
3127: AND cwo1.inventory_transaction_id = mmt.transaction_id
3128: AND cwo1.accrual_account_id = xal.code_combination_id

Line 3130: FROM cst_write_offs cwo2

3126: AND cwo1.inventory_transaction_id is NOT NULL
3127: AND cwo1.inventory_transaction_id = mmt.transaction_id
3128: AND cwo1.accrual_account_id = xal.code_combination_id
3129: AND cwo1.write_off_id = ( SELECT MAX(write_off_id)
3130: FROM cst_write_offs cwo2
3131: WHERE cwo2.inventory_transaction_id is NOT NULL
3132: AND cwo2.inventory_transaction_id = mmt.transaction_id
3133: AND cwo2.accrual_account_id = xal.code_combination_id
3134: AND EXISTS ( Select 1 from cst_write_off_details cwod

Line 3513: FROM cst_write_offs cwo

3509: UNION
3510: -- Consig can have po distribution ID stamped but should be excluded from AP PO Load
3511: --FP BUG10406951
3512: SELECT DISTINCT cwo.po_distribution_id
3513: FROM cst_write_offs cwo
3514: , po_distributions_all pod
3515: WHERE cwo.transaction_date between p_from_date AND p_to_date
3516: AND cwo.operating_unit_id = p_operating_unit
3517: AND cwo.po_distribution_id = pod.po_distribution_id

Line 4017: SELECT /*+ INDEX(CWO CST_WRITE_OFFS_N5)*/

4013: operating_unit_id,
4014: build_id,
4015: request_id
4016: )
4017: SELECT /*+ INDEX(CWO CST_WRITE_OFFS_N5)*/
4018: cwo.transaction_date,
4019: cwo.write_off_amount,
4020: cwo.entered_amount,
4021: NULL, -- quantity for write off is NULL

Line 4040: FROM cst_write_offs cwo,

4036: pod.destination_type_code,
4037: cwo.operating_unit_id,
4038: l_build_id,
4039: l_request_id
4040: FROM cst_write_offs cwo,
4041: --{ Immunization for po_vendor merge
4042: po_distributions_all pod,
4043: po_headers_all poh
4044: --}