DBA Data[Home] [Help]

APPS.AP_PURGE_PKG dependencies on AP_CHECKS

Line 809: ap_checks C

805: FROM ap_purge_invoice_list PL
806: WHERE EXISTS
807: (SELECT 'payment not purgeable'
808: FROM ap_invoice_payments_all P,
809: ap_checks C
810: WHERE P.invoice_id = PL.invoice_id
811: AND P.check_id = C.check_id
812: AND (((P.posted_flag <> 'Y'
813: OR

Line 2165: FROM ap_checks_all AC,

2161: ac.check_id, ac.bank_account_id, ac.check_number, ac.check_date,
2162: ac.amount, ac.currency_code, DECODE(void_date, null, null, 'Y'),
2163: p_purge_name, ac.doc_sequence_id, ac.doc_sequence_value, ac.payment_id,
2164: ac.org_id
2165: FROM ap_checks_all AC,
2166: ap_invoice_payments_all IP,
2167: ap_purge_invoice_list PL
2168: WHERE PL.invoice_id = IP.invoice_id
2169: AND IP.check_id = AC.check_id

Line 2860: FROM ap_invoice_payments P, ap_checks C

2856: SET PL.double_check_flag = 'N'
2857: WHERE PL.double_check_flag = 'Y'
2858: AND EXISTS (
2859: SELECT /*+NO_UNNEST*/'payment no longer purgeable'
2860: FROM ap_invoice_payments P, ap_checks C
2861: WHERE P.invoice_id = PL.invoice_id
2862: AND P.check_id = C.check_id
2863: AND (P.posted_flag <> 'Y'
2864: OR P.last_update_date > g_activity_date

Line 2964: , ap_checks apc

2960: OR EXISTS (
2961: SELECT 'payment accounting not purgeable'
2962: FROM xla_events xe
2963: , ap_invoice_payments aip
2964: , ap_checks apc
2965: , xla_ae_headers xeh
2966: , xla_transaction_entities xte
2967: WHERE xte.entity_code = 'AP_CHECKS'
2968: and xte.source_id_int_1 = apc.check_id

Line 2967: WHERE xte.entity_code = 'AP_CHECKS'

2963: , ap_invoice_payments aip
2964: , ap_checks apc
2965: , xla_ae_headers xeh
2966: , xla_transaction_entities xte
2967: WHERE xte.entity_code = 'AP_CHECKS'
2968: and xte.source_id_int_1 = apc.check_id
2969: and PL.invoice_id = aip.invoice_id
2970: and aip.check_id = apc.check_id
2971: and xe.event_id = xeh.event_id

Line 3253: debug_info := 'ap_checks';

3249: current_calling_sequence := 'Count_AP_Rows<-'||P_calling_sequence;
3250:
3251: --
3252:
3253: debug_info := 'ap_checks';
3254: IF g_debug_switch in ('y','Y') THEN
3255: Print('(Count_Ap_Rows)'||debug_info);
3256: END IF;
3257:

Line 3263: FROM ap_checks;

3259:
3260: --
3261: SELECT count(*)
3262: INTO fp_check_rows
3263: FROM ap_checks;
3264:
3265: --
3266: debug_info := 'ap_invoice_payments';
3267: IF g_debug_switch in ('y','Y') THEN

Line 4027: ap_checks = fp_check_rows,

4023:
4024:
4025: UPDATE financials_purges
4026: SET
4027: ap_checks = fp_check_rows,
4028: ap_invoice_payments = fp_invoice_payment_rows,
4029: ap_invoices = fp_invoice_rows,
4030: po_headers = fp_po_header_rows ,
4031: po_receipts = fp_receipt_line_rows,

Line 4678: ap_checks C

4674:
4675: CURSOR overflow_select is
4676: SELECT C.check_stock_id,C.check_number
4677: FROM ap_invoice_payments P, ap_purge_invoice_list PL,
4678: ap_checks C
4679: WHERE P.invoice_id = PL.invoice_id
4680: AND P.check_id = C.check_id
4681: AND PL.double_check_flag = 'Y'
4682: AND PL.invoice_id BETWEEN range_low AND range_high;

Line 4732: FROM ap_checks C

4728:
4729: Begin
4730: SELECT 'exist'
4731: INTO overflow_exist
4732: FROM ap_checks C
4733: WHERE C.check_stock_id = overflow_check_stock_id
4734: AND C.check_number = overflow_check_number
4735: AND C.status_lookup_code = 'OVERFLOW';
4736: Exception

Line 4747: debug_info := 'Delete_Overflow from ap_checks';

4743: LOOP
4744:
4745: if (overflow_exist = 'exist') then
4746:
4747: debug_info := 'Delete_Overflow from ap_checks';
4748: IF g_debug_switch in ('y','Y') THEN
4749: Print('(Overflow)'||debug_info);
4750: END IF;
4751:

Line 4754: DELETE FROM ap_checks C

4750: END IF;
4751:
4752: -- delete_overflow
4753:
4754: DELETE FROM ap_checks C
4755: WHERE C.check_stock_id = overflow_check_stock_id
4756: AND C.check_number = overflow_check_number
4757: AND C.status_lookup_code = 'OVERFLOW';
4758:

Line 4773: FROM ap_checks C

4769:
4770: Begin
4771: SELECT 'exist'
4772: INTO overflow_exist
4773: FROM ap_checks C
4774: WHERE C.check_stock_id = overflow_check_stock_id
4775: AND C.check_number = overflow_check_number
4776: AND C.status_lookup_code = 'OVERFLOW';
4777: Exception

Line 4812: FROM ap_checks C, ap_invoice_selection_criteria D

4808: RETURN BOOLEAN IS
4809:
4810: CURSOR setup_spoil_select is
4811: SELECT distinct C.checkrun_name
4812: FROM ap_checks C, ap_invoice_selection_criteria D
4813: WHERE D.LAST_UPDATE_DATE <= g_activity_date
4814: AND C.checkrun_name NOT IN
4815: (SELECT distinct b.checkrun_name
4816: FROM ap_checks a,

Line 4816: FROM ap_checks a,

4812: FROM ap_checks C, ap_invoice_selection_criteria D
4813: WHERE D.LAST_UPDATE_DATE <= g_activity_date
4814: AND C.checkrun_name NOT IN
4815: (SELECT distinct b.checkrun_name
4816: FROM ap_checks a,
4817: ap_invoice_selection_criteria b
4818: WHERE a.checkrun_name = b.checkrun_name
4819: AND a.status_lookup_code not in
4820: ('SET UP', 'SPOILED'))

Line 4867: DELETE FROM ap_checks C

4863: IF g_debug_switch in ('y','Y') THEN
4864: Print('(Setup_Spoil)'||debug_info);
4865: END IF;
4866:
4867: DELETE FROM ap_checks C
4868: WHERE C.checkrun_name = selected_checkrun
4869: AND C.status_lookup_code in ('SET UP','SPOILED')
4870: AND C.last_update_date <= g_activity_date;
4871:

Line 4946: l_check_id ap_checks.check_id%TYPE;

4942: AND PL.invoice_id BETWEEN low_inv_id AND high_inv_id;
4943:
4944: l_invoice_id ap_invoices.invoice_id%TYPE;
4945: l_invoice_dist_id ap_invoice_distributions.invoice_distribution_id%TYPE;
4946: l_check_id ap_checks.check_id%TYPE;
4947: l_payment_history_id ap_payment_history.payment_history_id%TYPE;
4948: l_invoice_payment_id ap_invoice_payments.invoice_payment_id%TYPE;
4949:
4950: BEGIN

Line 5015: ap_checks C,

5011: DELETE FROM ap_doc_sequence_audit AUD
5012: WHERE (AUD.doc_sequence_id , AUD.doc_sequence_value)
5013: IN (SELECT C.doc_sequence_id , C.doc_sequence_value
5014: FROM ap_purge_invoice_list PL,
5015: ap_checks C,
5016: ap_invoice_payments IP
5017: WHERE PL.double_check_flag = 'Y'
5018: AND PL.invoice_id BETWEEN range_low AND range_high
5019: AND PL.invoice_id = IP.invoice_id

Line 5024: debug_info := 'ap_checks';

5020: AND IP.check_id = C.check_id ) ;
5021:
5022: -- overflow
5023:
5024: debug_info := 'ap_checks';
5025: IF g_debug_switch in ('y','Y') THEN
5026: Print('(Delete_AP_Tables)'||debug_info);
5027: END IF;
5028:

Line 5044: -- bug 5052764 - go to base table ap_checks_all to remove FTS

5040: END IF;
5041:
5042:
5043: -- delete_checks
5044: -- bug 5052764 - go to base table ap_checks_all to remove FTS
5045: DELETE FROM ap_checks_all C
5046: WHERE C.check_id IN (
5047: SELECT P.check_id
5048: FROM ap_invoice_payments P, ap_purge_invoice_list PL

Line 5045: DELETE FROM ap_checks_all C

5041:
5042:
5043: -- delete_checks
5044: -- bug 5052764 - go to base table ap_checks_all to remove FTS
5045: DELETE FROM ap_checks_all C
5046: WHERE C.check_id IN (
5047: SELECT P.check_id
5048: FROM ap_invoice_payments P, ap_purge_invoice_list PL
5049: WHERE P.invoice_id = PL.invoice_id

Line 5389: and aae.source_table = 'AP_CHECKS'

5385: ,ap_accounting_events aae
5386: ,ap_invoice_payments aip
5387: ,ap_purge_invoice_list pil
5388: WHERE aae.source_id = aip.check_id
5389: and aae.source_table = 'AP_CHECKS'
5390: and pil.double_check_flag = 'Y'
5391: and aae.accounting_event_id = aeh.accounting_event_id
5392: and aip.invoice_id = pil.invoice_id
5393: and pil.invoice_id BETWEEN range_low AND range_high);

Line 5424: and aae.source_table = 'AP_CHECKS'

5420: , ap_purge_invoice_list pil
5421: -- bug2153117 removed
5422: -- , ap_ae_headers aeh
5423: WHERE aae.source_id = aip.check_id
5424: and aae.source_table = 'AP_CHECKS'
5425: and pil.double_check_flag = 'Y'
5426: -- Commented the below line as a fix for bug 2880690
5427: -- and aae.accounting_event_id = aeh.accounting_event_id
5428: and aip.invoice_id = pil.invoice_id

Line 5465: AP_CHECKS APC,

5461:
5462: DELETE FROM AP_ACCOUNTING_EVENTS AAE WHERE
5463: aae.source_id in ( SELECT APC.CHECK_ID
5464: FROM AP_PURGE_INVOICE_LIST PIL,
5465: AP_CHECKS APC,
5466: AP_INVOICE_PAYMENTS AIP
5467: WHERE PIL.DOUBLE_CHECK_FLAG = 'Y'
5468: AND APC.CHECK_ID = AIP.CHECK_ID
5469: AND AIP.INVOICE_ID = PIL.INVOICE_ID

Line 5472: AND AAE.SOURCE_TABLE = 'AP_CHECKS' ;

5468: AND APC.CHECK_ID = AIP.CHECK_ID
5469: AND AIP.INVOICE_ID = PIL.INVOICE_ID
5470: AND PIL.INVOICE_ID BETWEEN range_low
5471: AND range_high )
5472: AND AAE.SOURCE_TABLE = 'AP_CHECKS' ;
5473:
5474:
5475: DELETE FROM AP_ACCOUNTING_EVENTS AAE WHERE
5476: AAE.source_id IN ( SELECT APH.CHECK_ID

Line 6504: ap_checks = nvl(ap_checks, 0) - check_rows,

6500:
6501: -- record_final_statistics
6502: UPDATE financials_purges
6503: SET
6504: ap_checks = nvl(ap_checks, 0) - check_rows,
6505: ap_invoice_payments = nvl(ap_invoice_payments, 0) - invoice_payment_rows,
6506: ap_invoices = nvl(ap_invoices, 0) - invoice_rows,
6507: po_headers = nvl(po_headers, 0) - po_header_rows,
6508: po_requisition_headers = nvl(po_requisition_headers, 0) - req_header_rows,