DBA Data[Home] [Help]

APPS.AR_PURGE dependencies on AR_BATCHES

Line 1053: ar_batches batch,

1049: FROM ar_lookups lu1,
1050: ar_lookups lu2,
1051: ar_receipt_methods rm,
1052: ar_batch_sources bs,
1053: ar_batches batch,
1054: ar_batches batch_remit,
1055: ce_bank_accounts cba,
1056: ce_bank_acct_uses ba2,
1057: ce_bank_branches_v bb,

Line 1054: ar_batches batch_remit,

1050: ar_lookups lu2,
1051: ar_receipt_methods rm,
1052: ar_batch_sources bs,
1053: ar_batches batch,
1054: ar_batches batch_remit,
1055: ce_bank_accounts cba,
1056: ce_bank_acct_uses ba2,
1057: ce_bank_branches_v bb,
1058: fnd_document_sequences doc,

Line 4102: -- lock ar_batches row before deleting

4098: l_ar_ps_key_value_list gl_ca_utility_pkg.r_key_value_arr;
4099: l_ar_dist_key_value_list gl_ca_utility_pkg.r_key_value_arr;
4100:
4101: --
4102: -- lock ar_batches row before deleting
4103: --
4104: -- bug33843792 removed outer join and changed to cursor
4105: CURSOR cur_batch_id(l_receipt_id NUMBER) IS
4106: SELECT bat.batch_id

Line 4107: FROM ar_batches bat,

4103: --
4104: -- bug33843792 removed outer join and changed to cursor
4105: CURSOR cur_batch_id(l_receipt_id NUMBER) IS
4106: SELECT bat.batch_id
4107: FROM ar_batches bat,
4108: (SELECT distinct batch_id
4109: FROM ar_cash_receipt_history
4110: WHERE cash_receipt_id = l_receipt_id) crh
4111: WHERE crh.batch_id = bat.batch_id

Line 4116: FROM ar_batches bat,

4112: FOR UPDATE OF bat.batch_id NOWAIT ;
4113: --
4114: CURSOR cur_trans_id(l_receipt_id NUMBER) IS
4115: SELECT bat.transmission_request_id
4116: FROM ar_batches bat,
4117: ar_cash_receipt_history crh
4118: WHERE crh.cash_receipt_id = l_receipt_id
4119: AND crh.batch_id = bat.batch_id
4120: AND crh.first_posted_record_flag = 'Y';

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

4171: arp_cr_history_pkg.delete_p_cr(p_entity_id);
4172:
4173: --
4174: -- bug3384792 there could be multiple records for one receipt.
4175: -- To handle the case, use BULK for delete stmt for ar_batches.
4176: -- And for performance, check whether or not there is batch.
4177: IF l_batch_id.COUNT>0
4178: THEN
4179: FORALL i IN l_batch_id.FIRST..l_batch_id.LAST

Line 4180: DELETE FROM ar_batches

4176: -- And for performance, check whether or not there is batch.
4177: IF l_batch_id.COUNT>0
4178: THEN
4179: FORALL i IN l_batch_id.FIRST..l_batch_id.LAST
4180: DELETE FROM ar_batches
4181: WHERE batch_id = l_batch_id(i)
4182: AND NOT EXISTS ( SELECT 'x'
4183: FROM ar_cash_receipt_history h
4184: WHERE h.batch_id = l_batch_id(i) )

Line 4197: UPDATE ar_batches

4193: FOR j IN l_batch_id.FIRST..l_batch_id.LAST
4194: LOOP
4195: IF SQL%BULK_ROWCOUNT(j) = 0
4196: THEN
4197: UPDATE ar_batches
4198: SET purged_children_flag = 'Y'
4199: WHERE batch_id = l_batch_id(j);
4200: END IF;
4201: END LOOP;

Line 4210: p_table_name => 'AR_BATCHES',

4206: +---------------------------------*/
4207:
4208: /* ar_mrc_engine.maintain_mrc_data(
4209: p_event_mode => 'DELETE',
4210: p_table_name => 'AR_BATCHES',
4211: p_mode => 'BATCH',
4212: p_key_value_list => l_ar_batch_key_value_list);*/
4213:
4214: --

Line 4223: FROM ar_batches batch

4219: WHERE transmission_request_id = l_trans_id
4220: AND NOT EXISTS
4221: (
4222: SELECT '*'
4223: FROM ar_batches batch
4224: WHERE batch.transmission_request_id = l_trans_id
4225: );
4226: END IF;
4227: END IF;