DBA Data[Home] [Help]

APPS.AR_PURGE dependencies on AR_CORRESPONDENCES

Line 4328: TYPE Del_Cid_Tab IS TABLE OF ar_correspondences.correspondence_id%TYPE INDEX BY BINARY_INTEGER;

4324: DECLARE
4325: l_batch_id NUMBER(15) ;
4326:
4327: /* bug2021662 : added for getting deleted correspondence_id */
4328: TYPE Del_Cid_Tab IS TABLE OF ar_correspondences.correspondence_id%TYPE INDEX BY BINARY_INTEGER;
4329: del_cid Del_Cid_Tab;
4330:
4331: l_corr_row BINARY_INTEGER := 0 ;
4332:

Line 4449: UPDATE ar_correspondences corr

4445: --
4446: DELETE FROM ar_customer_call_topics
4447: WHERE customer_trx_id = p_entity_id ;
4448: --
4449: UPDATE ar_correspondences corr
4450: SET corr.purged_children_flag = 'Y'
4451: WHERE corr.correspondence_id IN
4452: (
4453: SELECT sched.correspondence_id

Line 4473: DELETE FROM ar_correspondences corr

4469: )
4470: RETURNING correspondence_id BULK COLLECT INTO del_cid ;
4471: --
4472: /* bug2021662 :this DELETE stmt does not work correctly
4473: DELETE FROM ar_correspondences corr
4474: WHERE corr.correspondence_id NOT IN
4475: (
4476: SELECT sched.correspondence_id
4477: FROM ar_correspondence_pay_sched sched,

Line 4489: DELETE FROM ar_correspondences corr

4485: for gotton correspondence_id
4486: */
4487: IF del_cid.count > 0 THEN
4488: FORALL l_corr_row IN del_cid.FIRST..del_cid.LAST
4489: DELETE FROM ar_correspondences corr
4490: WHERE not exists
4491: (
4492: SELECT 'there are children records'
4493: FROM ar_correspondence_pay_sched sched