DBA Data[Home] [Help]

APPS.AR_PURGE dependencies on AR_BATCHES

Line 728: ar_batches batch,

724: ap_bank_accounts ba2,
725: ap_bank_accounts ba,
726: ar_receipt_methods rm,
727: ar_batch_sources bs,
728: ar_batches batch,
729: ar_batches batch_remit,
730: fnd_document_sequences doc,
731: gl_sets_of_books sob,
732: hz_cust_acct_sites addr,

Line 729: ar_batches batch_remit,

725: ap_bank_accounts ba,
726: ar_receipt_methods rm,
727: ar_batch_sources bs,
728: ar_batches batch,
729: ar_batches batch_remit,
730: fnd_document_sequences doc,
731: gl_sets_of_books sob,
732: hz_cust_acct_sites addr,
733: hz_party_sites party_site,

Line 1970: ar_batches batch,

1966: FROM ar_lookups lu1,
1967: ar_lookups lu2,
1968: ar_receipt_methods rm,
1969: ar_batch_sources bs,
1970: ar_batches batch,
1971: ar_batches batch_remit,
1972: ce_bank_accounts cba,
1973: ce_bank_acct_uses ba2,
1974: ce_bank_branches_v bb,

Line 1971: ar_batches batch_remit,

1967: ar_lookups lu2,
1968: ar_receipt_methods rm,
1969: ar_batch_sources bs,
1970: ar_batches batch,
1971: ar_batches batch_remit,
1972: ce_bank_accounts cba,
1973: ce_bank_acct_uses ba2,
1974: ce_bank_branches_v bb,
1975: fnd_document_sequences doc,

Line 4935: -- lock ar_batches row before deleting

4931: l_batch_id_null BatchTyp ;
4932: l_trans_id NUMBER(15) ;
4933:
4934: --
4935: -- lock ar_batches row before deleting
4936: --
4937: -- bug33843792 removed outer join and changed to cursor
4938: CURSOR cur_batch_id(l_receipt_id NUMBER) IS
4939: SELECT bat.batch_id

Line 4940: FROM ar_batches bat,

4936: --
4937: -- bug33843792 removed outer join and changed to cursor
4938: CURSOR cur_batch_id(l_receipt_id NUMBER) IS
4939: SELECT bat.batch_id
4940: FROM ar_batches bat,
4941: (SELECT distinct batch_id
4942: FROM ar_cash_receipt_history
4943: WHERE cash_receipt_id = l_receipt_id) crh
4944: WHERE crh.batch_id = bat.batch_id

Line 4949: FROM ar_batches bat,

4945: FOR UPDATE OF bat.batch_id NOWAIT ;
4946: --
4947: CURSOR cur_trans_id(l_receipt_id NUMBER) IS
4948: SELECT bat.transmission_request_id
4949: FROM ar_batches bat,
4950: ar_cash_receipt_history crh
4951: WHERE crh.cash_receipt_id = l_receipt_id
4952: AND crh.batch_id = bat.batch_id
4953: AND crh.first_posted_record_flag = 'Y';

Line 4994: -- To handle the case, use BULK for delete stmt for ar_batches.

4990: arp_cr_history_pkg.delete_p_cr(p_entity_id);
4991:
4992: --
4993: -- bug3384792 there could be multiple records for one receipt.
4994: -- To handle the case, use BULK for delete stmt for ar_batches.
4995: -- And for performance, check whether or not there is batch.
4996: IF l_batch_id.COUNT>0
4997: THEN
4998: FORALL i IN l_batch_id.FIRST..l_batch_id.LAST

Line 4999: DELETE FROM ar_batches

4995: -- And for performance, check whether or not there is batch.
4996: IF l_batch_id.COUNT>0
4997: THEN
4998: FORALL i IN l_batch_id.FIRST..l_batch_id.LAST
4999: DELETE FROM ar_batches
5000: WHERE batch_id = l_batch_id(i)
5001: AND NOT EXISTS ( SELECT 'x'
5002: FROM ar_cash_receipt_history h
5003: WHERE h.batch_id = l_batch_id(i) );

Line 5014: UPDATE ar_batches

5010: FOR j IN l_batch_id.FIRST..l_batch_id.LAST
5011: LOOP
5012: IF SQL%BULK_ROWCOUNT(j) = 0
5013: THEN
5014: UPDATE ar_batches
5015: SET purged_children_flag = 'Y'
5016: WHERE batch_id = l_batch_id(j);
5017: END IF;
5018: END LOOP;

Line 5030: FROM ar_batches batch

5026: WHERE transmission_request_id = l_trans_id
5027: AND NOT EXISTS
5028: (
5029: SELECT '*'
5030: FROM ar_batches batch
5031: WHERE batch.transmission_request_id = l_trans_id
5032: );
5033: END IF;
5034: END IF;