DBA Data[Home] [Help]

APPS.AML_PURGE_SALES_LEADS dependencies on AS_SALES_LEAD_LINES

Line 70: aml_debug(1,Recs_deleted(6)||l_no_of_rows_deleted||'AS_SALES_LEAD_LINES');

66: aml_debug(1,Recs_deleted(2)||l_no_of_rows_deleted||'AS_CHANGED_ACCOUNTS_ALL');
67: aml_debug(1,Recs_deleted(3)||l_no_of_rows_deleted||'AML_INTERACTION_LEADS');
68: aml_debug(1,Recs_deleted(4)||l_no_of_rows_deleted||'AS_SALES_LEADS_LOG');
69: aml_debug(1,Recs_deleted(5)||l_no_of_rows_deleted||'AS_SALES_LEAD_CONTACTS');
70: aml_debug(1,Recs_deleted(6)||l_no_of_rows_deleted||'AS_SALES_LEAD_LINES');
71: -- aml_debug(1,Recs_deleted(7)||l_no_of_rows_deleted||'AS_SALES_LEAD_OPPORTUNITY');
72: aml_debug(1,Recs_deleted(8)||l_no_of_rows_deleted||'AML_MONITOR_LOG');
73: aml_debug(1,Recs_deleted(9)||l_no_of_rows_deleted||'PV_ENTITY_RULES_APPLIED');
74: aml_debug(1,Recs_deleted(10)||l_no_of_rows_deleted||'AS_TERRITORY_ACCESSES');

Line 114: FROM AS_SALES_LEAD_LINES

110: Recs_deleted(5) := Recs_deleted(5) + SQL%ROWCOUNT;
111:
112: FORALL I IN P_Id_Tab.FIRST..P_Id_Tab.LAST
113: DELETE
114: FROM AS_SALES_LEAD_LINES
115: WHERE Sales_Lead_Id = P_Id_Tab(I);
116: Recs_deleted(6) := Recs_deleted(6) + SQL%ROWCOUNT;
117:
118: /*FORALL I IN P_Id_Tab.FIRST..P_Id_Tab.LAST

Line 196: a Pl/Sql table. Then all the records in child tables like AS_ACCESSES_ALL, AS_SALES_LEAD_LINES and the main

192:
193: aml_debug(2,'Purge Sales Leads starts');
194:
195: /* First, unqualified the leads that needs to be purged are identified and the sales lead id is taken. This is stored in
196: a Pl/Sql table. Then all the records in child tables like AS_ACCESSES_ALL, AS_SALES_LEAD_LINES and the main
197: table AS_SALES_LEADS are deleted. Since the number of records to be purged will be high this is done in batch
198: of 10000 records. The Sales Lead Ids which are stored in a Pl/Sql table are then passed to the local procedure
199: Delete_Unqualified_Leads. Since this procedure takes sales lead ids in batches of 10000,
200: for the remaining records it has be done with a simple select statement.