[Home] [Help]
670:
671: l_stmt_num := 10;
672: debug(' l_stmt_num:'||l_stmt_num);
673:
674: /* check if there are accounts selected in CST_ACCRUAL_ACCOUNTS table. If not then error out */
675:
676: SELECT count(*)
677: INTO l_acc_accounts
678: FROM cst_accrual_accounts
674: /* check if there are accounts selected in CST_ACCRUAL_ACCOUNTS table. If not then error out */
675:
676: SELECT count(*)
677: INTO l_acc_accounts
678: FROM cst_accrual_accounts
679: WHERE operating_unit_id = p_operating_unit
680: AND ROWNUM = 1;
681:
682: debug(' l_acc_accounts:'||l_acc_accounts);
1131: rcv_receiving_sub_ledger rrs,
1132: xla_distribution_links xld, --BUG#7275286
1133: rcv_transactions rt,
1134: po_headers_all poh
1135: ,cst_accrual_accounts ca --BUG#7528609
1136: ,PO_distributions_all pod
1137: WHERE pawo.org_id = p_operating_unit
1138: AND pawo.transaction_source_code = 'PO'
1139: AND pawo.po_transaction_id IS NOT NULL
1256: gl_sets_of_books gsob,
1257: fnd_currencies fc,
1258: ap_ae_lines_all aal,
1259: xla_distribution_links xld
1260: ,cst_accrual_accounts ca
1261: WHERE pawo.org_id = p_operating_unit
1262: AND pawo.po_distribution_id IS NULL -- Misc Invoices
1263: AND pawo.transaction_source_code = 'AP'
1264: AND pawo.invoice_id IS NOT NULL
1390: financials_system_params_all fsp,
1391: gl_sets_of_books gsob,
1392: fnd_currencies fc,
1393: ap_ae_lines_all aal,
1394: cst_accrual_accounts caa,
1395: xla_distribution_links xld
1396: WHERE pawo.org_id = p_operating_unit
1397: AND pawo.po_distribution_id IS NULL -- Misc Invoices
1398: AND pawo.transaction_source_code = 'AP'
1537: financials_system_params_all fsp,
1538: gl_sets_of_books gsob,
1539: fnd_currencies fc,
1540: ap_ae_lines aal,
1541: cst_accrual_accounts caa,
1542: xla_distribution_links xld,
1543: xla_ae_lines xal
1544: WHERE pawo.org_id = p_operating_unit
1545: AND pawo.po_distribution_id IS NOT NULL -- Reg Invoices and consigned
1705: financials_system_params_all fsp,
1706: gl_sets_of_books gsob,
1707: fnd_currencies fc,
1708: ap_ae_lines aal,
1709: cst_accrual_accounts caa,
1710: xla_distribution_links xld
1711: WHERE pawo.org_id = p_operating_unit
1712: AND pawo.po_distribution_id IS NOT NULL -- Reg Invoices and consigned
1713: AND pod.po_distribution_id = pawo.po_distribution_id
1848: pawo.program_update_date
1849: FROM po_accrual_write_offs_all pawo,
1850: mtl_transaction_accounts mta,
1851: xla_distribution_links xld
1852: ,cst_accrual_accounts ca --BUG#7528609
1853: WHERE pawo.transaction_source_code = 'INV'
1854: AND pawo.org_id = p_operating_unit
1855: AND pawo.inv_transaction_id = mta.transaction_id
1856: --{BUG#7528609
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
1967: WHERE pawo.org_id = p_operating_unit
1968: AND pawo.transaction_source_code ='INV'
1969: AND cwo.write_off_id = pawo.write_off_id
1970: AND pawo.inv_transaction_id = mta.transaction_id
2051: po_lookup_codes plc,
2052: rcv_receiving_sub_ledger rrs,
2053: rcv_transactions rt,
2054: xla_distribution_links xld,
2055: cst_accrual_accounts ca --BUG#7528609
2056: WHERE pawo.org_id = p_operating_unit
2057: AND pawo.transaction_source_code = 'PO'
2058: AND cwo.write_off_id = pawo.write_off_id
2059: AND plc.displayed_field = pawo.accrual_code
2143: po_accrual_write_offs_all pawo,
2144: po_lookup_codes plc,
2145: ap_invoice_distributions_all aida,
2146: ap_ae_lines_all aal,
2147: cst_accrual_accounts ca, --BUG#7528609
2148: xla_distribution_links xld
2149: ,xla_ae_lines xlal --XLD AP <=> n XLA AE line AP with different GL Accounts
2150: ,financials_system_params_all fsp --BUG#13869348
2151: WHERE pawo.org_id = p_operating_unit
2426: xdl.source_distribution_id_num_1
2427: FROM xla_ae_headers xah,
2428: xla_ae_lines xal,
2429: xla_distribution_links xdl,
2430: cst_accrual_accounts caa,
2431: financials_system_params_all fsp
2432: WHERE fsp.org_id = p_operating_unit
2433: AND caa.operating_unit_id = p_operating_unit
2434: AND xah.application_id = 200 -- AP
2721: SELECT 1 FROM
2722: xla_ae_lines l,
2723: xla_ae_headers h,
2724: xla_event_types_b xet,
2725: cst_accrual_accounts caa
2726: WHERE caa.operating_unit_id = p_ou_id
2727: AND xet.application_id = 707
2728: AND xet.entity_code = 'MTL_ACCOUNTING_EVENTS'
2729: AND h.application_id = 707
2873: FROM xla_ae_headers xah,
2874: xla_ae_lines xal,
2875: xla_transaction_entities_upg xte,
2876: mtl_material_transactions mmt,
2877: cst_accrual_accounts caa,
2878: financials_system_params_all fsp
2879: WHERE xal.code_combination_id = caa.accrual_account_id
2880: AND caa.operating_unit_id = p_operating_unit
2881: AND fsp.org_id = p_operating_unit
3009: FROM xla_ae_headers xah,
3010: xla_ae_lines xal,
3011: xla_transaction_entities_upg xte,
3012: mtl_material_transactions mmt,
3013: cst_accrual_accounts caa,
3014: financials_system_params_all fsp,
3015: mtl_parameters mp /* Bug 13728770 */
3016: WHERE xal.code_combination_id = caa.accrual_account_id
3017: AND caa.operating_unit_id = p_operating_unit
3091: FROM xla_ae_headers xah,
3092: xla_ae_lines xal,
3093: xla_transaction_entities_upg xte,
3094: mtl_material_transactions mmt,
3095: cst_accrual_accounts caa,
3096: financials_system_params_all fsp,
3097: mtl_parameters mp /* Bug 13728770 */
3098: WHERE xal.code_combination_id = caa.accrual_account_id
3099: AND caa.operating_unit_id = p_operating_unit
3662: xla_distribution_links xdl,
3663: po_headers_all poh,
3664: po_lines_all pol,
3665: po_distributions_all pod,
3666: cst_accrual_accounts caa,
3667: financials_system_params_all fsp
3668: WHERE fsp.org_id = p_operating_unit
3669: AND xah.ledger_id = fsp.set_of_books_id
3670: AND xah.application_id = 707
3783: xla_distribution_links xdl,
3784: po_headers_all poh,
3785: po_lines_all pol,
3786: po_distributions_all pod,
3787: cst_accrual_accounts caa,
3788: financials_system_params_all fsp
3789: WHERE fsp.org_id = p_operating_unit
3790: AND xah.ledger_id = fsp.set_of_books_id
3791: AND xah.application_id = 555
3947: xla_ae_lines xal,
3948: xla_distribution_links xdl,
3949: po_lines_all pol,
3950: po_distributions_all pod,
3951: cst_accrual_accounts caa,
3952: financials_system_params_all fsp,
3953: xla_transaction_entities_upg xte,
3954: po_headers_all poh /* -- Changes to pick Vendor from PO instead of APIA. Bug 7312170 */
3955: WHERE xal.code_combination_id = caa.accrual_account_id