DBA Data[Home] [Help]

APPS.AME_TRANS_DATA_PURGE dependencies on FND_FILE

Line 71: FND_FILE.PUT_LINE(FND_FILE.LOG,applicationIdIn || ' Application ID does not exist' );

67: where application_id = applicationIdIn
68: and sysdate between start_date and nvl(end_date - 1/86400,sysdate);
69: exception
70: when no_data_found then
71: FND_FILE.PUT_LINE(FND_FILE.LOG,applicationIdIn || ' Application ID does not exist' );
72: end;
73: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Purge run for Transaction Type: ' || applicationName);
74: FND_FILE.NEW_LINE(FND_FILE.OUTPUT,3);
75: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'The following Transaction IDs will be purged');

Line 73: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Purge run for Transaction Type: ' || applicationName);

69: exception
70: when no_data_found then
71: FND_FILE.PUT_LINE(FND_FILE.LOG,applicationIdIn || ' Application ID does not exist' );
72: end;
73: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Purge run for Transaction Type: ' || applicationName);
74: FND_FILE.NEW_LINE(FND_FILE.OUTPUT,3);
75: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'The following Transaction IDs will be purged');
76: /* Recalculate the attribute use count */
77: for tempAttrUsage in attributeUsageCursor(applicationIdIn) loop

Line 74: FND_FILE.NEW_LINE(FND_FILE.OUTPUT,3);

70: when no_data_found then
71: FND_FILE.PUT_LINE(FND_FILE.LOG,applicationIdIn || ' Application ID does not exist' );
72: end;
73: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Purge run for Transaction Type: ' || applicationName);
74: FND_FILE.NEW_LINE(FND_FILE.OUTPUT,3);
75: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'The following Transaction IDs will be purged');
76: /* Recalculate the attribute use count */
77: for tempAttrUsage in attributeUsageCursor(applicationIdIn) loop
78: attributeId := tempAttrUsage.attribute_id;

Line 75: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'The following Transaction IDs will be purged');

71: FND_FILE.PUT_LINE(FND_FILE.LOG,applicationIdIn || ' Application ID does not exist' );
72: end;
73: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'Purge run for Transaction Type: ' || applicationName);
74: FND_FILE.NEW_LINE(FND_FILE.OUTPUT,3);
75: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'The following Transaction IDs will be purged');
76: /* Recalculate the attribute use count */
77: for tempAttrUsage in attributeUsageCursor(applicationIdIn) loop
78: attributeId := tempAttrUsage.attribute_id;
79: ame_attribute_pkg.updateUseCount(attributeIdIn => attributeId,

Line 130: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'1: ' ||transactionIds(i));

126: /* Transaction is rejected, and purge type is not 'P' so do not purge */
127: transactionIds.delete(i);
128: exit;
129: else
130: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'1: ' ||transactionIds(i));
131: end if;
132: end loop;
133: else
134: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'2: '||transactionIds(i)); -- P

Line 134: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'2: '||transactionIds(i)); -- P

130: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'1: ' ||transactionIds(i));
131: end if;
132: end loop;
133: else
134: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'2: '||transactionIds(i)); -- P
135: end if;
136: else
137: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'3: ' ||transactionIds(i));
138: end if;

Line 137: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'3: ' ||transactionIds(i));

133: else
134: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'2: '||transactionIds(i)); -- P
135: end if;
136: else
137: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'3: ' ||transactionIds(i));
138: end if;
139: end loop;
140: /* compact ID List */
141: ame_util.compactStringList(stringListInOut => transactionIds);

Line 143: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'No.of transaction ids to be purged: '||transactionIds.count);

139: end loop;
140: /* compact ID List */
141: ame_util.compactStringList(stringListInOut => transactionIds);
142: /* Do bulk deletes */
143: FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'No.of transaction ids to be purged: '||transactionIds.count);
144: if(transactionIds.count > 0) then
145: /* ame_temp_old_approver_lists */
146: forall ct in transactionIds.first..transactionIds.last
147: delete from ame_temp_old_approver_lists

Line 177: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);

173: delete from ame_temp_trans_locks
174: where row_timestamp < sysdate - 1;
175: exception
176: when others then
177: FND_FILE.PUT_LINE(FND_FILE.LOG,sqlerrm);
178: ame_util.runtimeException(packageNameIn => 'ame_trans_data_purge',
179: routineNameIn => 'purgeTransData',
180: exceptionNumberIn => sqlcode,
181: exceptionStringIn => sqlerrm);

Line 215: FND_FILE.PUT_LINE (FND_FILE.LOG,'Staring AME deviation data purge process');

211: tempFndapplicationId := applicationIdIn;
212: l_profileDate := to_date(FND_PROFILE.VALUE('AME_DEVITION_PURGE_DATE'),'dd/mm/yyyy');
213: l_endDate := fnd_date.canonical_to_date(endDateIn);
214: dateToDelete := l_endDate;
215: FND_FILE.PUT_LINE (FND_FILE.LOG,'Staring AME deviation data purge process');
216: FND_FILE.PUT_LINE (FND_FILE.LOG,'Application id:'||applicationIdIn);
217: FND_FILE.PUT_LINE (FND_FILE.LOG,'AME internal application id:'||ameApplicationId);
218: FND_FILE.PUT_LINE (FND_FILE.LOG,'Date upto record deltion allowed:'||l_endDate);
219: FND_FILE.PUT_LINE (FND_FILE.LOG,'Profile date:'||l_profileDate);

Line 216: FND_FILE.PUT_LINE (FND_FILE.LOG,'Application id:'||applicationIdIn);

212: l_profileDate := to_date(FND_PROFILE.VALUE('AME_DEVITION_PURGE_DATE'),'dd/mm/yyyy');
213: l_endDate := fnd_date.canonical_to_date(endDateIn);
214: dateToDelete := l_endDate;
215: FND_FILE.PUT_LINE (FND_FILE.LOG,'Staring AME deviation data purge process');
216: FND_FILE.PUT_LINE (FND_FILE.LOG,'Application id:'||applicationIdIn);
217: FND_FILE.PUT_LINE (FND_FILE.LOG,'AME internal application id:'||ameApplicationId);
218: FND_FILE.PUT_LINE (FND_FILE.LOG,'Date upto record deltion allowed:'||l_endDate);
219: FND_FILE.PUT_LINE (FND_FILE.LOG,'Profile date:'||l_profileDate);
220: if l_endDate > l_profileDate then

Line 217: FND_FILE.PUT_LINE (FND_FILE.LOG,'AME internal application id:'||ameApplicationId);

213: l_endDate := fnd_date.canonical_to_date(endDateIn);
214: dateToDelete := l_endDate;
215: FND_FILE.PUT_LINE (FND_FILE.LOG,'Staring AME deviation data purge process');
216: FND_FILE.PUT_LINE (FND_FILE.LOG,'Application id:'||applicationIdIn);
217: FND_FILE.PUT_LINE (FND_FILE.LOG,'AME internal application id:'||ameApplicationId);
218: FND_FILE.PUT_LINE (FND_FILE.LOG,'Date upto record deltion allowed:'||l_endDate);
219: FND_FILE.PUT_LINE (FND_FILE.LOG,'Profile date:'||l_profileDate);
220: if l_endDate > l_profileDate then
221: raise invalidInputDateExc;

Line 218: FND_FILE.PUT_LINE (FND_FILE.LOG,'Date upto record deltion allowed:'||l_endDate);

214: dateToDelete := l_endDate;
215: FND_FILE.PUT_LINE (FND_FILE.LOG,'Staring AME deviation data purge process');
216: FND_FILE.PUT_LINE (FND_FILE.LOG,'Application id:'||applicationIdIn);
217: FND_FILE.PUT_LINE (FND_FILE.LOG,'AME internal application id:'||ameApplicationId);
218: FND_FILE.PUT_LINE (FND_FILE.LOG,'Date upto record deltion allowed:'||l_endDate);
219: FND_FILE.PUT_LINE (FND_FILE.LOG,'Profile date:'||l_profileDate);
220: if l_endDate > l_profileDate then
221: raise invalidInputDateExc;
222: elsif l_endDate > sysdate then

Line 219: FND_FILE.PUT_LINE (FND_FILE.LOG,'Profile date:'||l_profileDate);

215: FND_FILE.PUT_LINE (FND_FILE.LOG,'Staring AME deviation data purge process');
216: FND_FILE.PUT_LINE (FND_FILE.LOG,'Application id:'||applicationIdIn);
217: FND_FILE.PUT_LINE (FND_FILE.LOG,'AME internal application id:'||ameApplicationId);
218: FND_FILE.PUT_LINE (FND_FILE.LOG,'Date upto record deltion allowed:'||l_endDate);
219: FND_FILE.PUT_LINE (FND_FILE.LOG,'Profile date:'||l_profileDate);
220: if l_endDate > l_profileDate then
221: raise invalidInputDateExc;
222: elsif l_endDate > sysdate then
223: dateToDelete := sysdate;

Line 239: FND_FILE.PUT_LINE (FND_FILE.LOG,'number of rows deleted:'||sql%rowcount);

235: (select temp_transactions_id
236: from ame_temp_transactions
237: where trunc(row_timestamp) <= dateToDelete
238: and application_id = tempApplication);
239: FND_FILE.PUT_LINE (FND_FILE.LOG,'number of rows deleted:'||sql%rowcount);
240: update ame_temp_transactions
241: set trans_deviation_flag = 'D'
242: where trunc(row_timestamp) <= dateToDelete
243: and application_id = tempApplication;

Line 250: FND_FILE.PUT_LINE (FND_FILE.LOG,sqlerrm);

246: ame_util.runtimeException(packageNameIn => 'ame_trans_data_purge',
247: routineNameIn => 'purgeDeviationData',
248: exceptionNumberIn => sqlcode,
249: exceptionStringIn => sqlerrm);
250: FND_FILE.PUT_LINE (FND_FILE.LOG,sqlerrm);
251: end;
252: elsif ameApplicationId is null and tempFndapplicationId is not null then
253: open getApplicationList(tempFndapplicationId);
254: fetch getApplicationList bulk collect into applicationIdList;

Line 264: FND_FILE.PUT_LINE (FND_FILE.LOG,'AME internal application id:'||applicationIdList(i));

260: (select temp_transactions_id
261: from ame_temp_transactions
262: where trunc(row_timestamp) <= dateToDelete
263: and application_id = applicationIdList(i));
264: FND_FILE.PUT_LINE (FND_FILE.LOG,'AME internal application id:'||applicationIdList(i));
265: FND_FILE.PUT_LINE (FND_FILE.LOG,'number of rows deleted:'||sql%rowcount);
266: update ame_temp_transactions
267: set trans_deviation_flag = 'D'
268: where trunc(row_timestamp) <= dateToDelete

Line 265: FND_FILE.PUT_LINE (FND_FILE.LOG,'number of rows deleted:'||sql%rowcount);

261: from ame_temp_transactions
262: where trunc(row_timestamp) <= dateToDelete
263: and application_id = applicationIdList(i));
264: FND_FILE.PUT_LINE (FND_FILE.LOG,'AME internal application id:'||applicationIdList(i));
265: FND_FILE.PUT_LINE (FND_FILE.LOG,'number of rows deleted:'||sql%rowcount);
266: update ame_temp_transactions
267: set trans_deviation_flag = 'D'
268: where trunc(row_timestamp) <= dateToDelete
269: and application_id = applicationIdList(i);

Line 277: FND_FILE.PUT_LINE (FND_FILE.LOG,sqlerrm);

273: ame_util.runtimeException(packageNameIn => 'ame_trans_data_purge',
274: routineNameIn => 'purgeDeviationData',
275: exceptionNumberIn => sqlcode,
276: exceptionStringIn => sqlerrm);
277: FND_FILE.PUT_LINE (FND_FILE.LOG,sqlerrm);
278: end;
279: elsif tempTxnId is null and tempFndapplicationId is null then
280: begin
281: delete from ame_txn_approvers

Line 286: FND_FILE.PUT_LINE (FND_FILE.LOG,'number of rows deleted:'||sql%rowcount);

282: where temp_transactions_id in
283: (select temp_transactions_id
284: from ame_temp_transactions
285: where trunc(row_timestamp) <= dateToDelete);
286: FND_FILE.PUT_LINE (FND_FILE.LOG,'number of rows deleted:'||sql%rowcount);
287: update ame_temp_transactions
288: set trans_deviation_flag = 'D'
289: where trunc(row_timestamp) <= dateToDelete;
290: exception

Line 296: FND_FILE.PUT_LINE (FND_FILE.LOG,sqlerrm);

292: ame_util.runtimeException(packageNameIn => 'ame_trans_data_purge',
293: routineNameIn => 'purgeDeviationData',
294: exceptionNumberIn => sqlcode,
295: exceptionStringIn => sqlerrm);
296: FND_FILE.PUT_LINE (FND_FILE.LOG,sqlerrm);
297: end;
298: end if;
299: FND_FILE.PUT_LINE (FND_FILE.LOG,'Completed AME deviation data purge process');
300: exception

Line 299: FND_FILE.PUT_LINE (FND_FILE.LOG,'Completed AME deviation data purge process');

295: exceptionStringIn => sqlerrm);
296: FND_FILE.PUT_LINE (FND_FILE.LOG,sqlerrm);
297: end;
298: end if;
299: FND_FILE.PUT_LINE (FND_FILE.LOG,'Completed AME deviation data purge process');
300: exception
301: when profileNotsetExc then
302: errorCode := -20001;
303: errorMessage :=

Line 310: FND_FILE.PUT_LINE (FND_FILE.LOG,errorMessage);

306: ame_util.runtimeException(packageNameIn => 'ame_trans_data_purge',
307: routineNameIn => 'purgeDeviationData',
308: exceptionNumberIn => errorCode,
309: exceptionStringIn => errorMessage);
310: FND_FILE.PUT_LINE (FND_FILE.LOG,errorMessage);
311: raise_application_error(errorCode,
312: errorMessage);
313: when deleteTodayRecordExc then
314: errorCode := -20001;

Line 322: FND_FILE.PUT_LINE (FND_FILE.LOG,errorMessage);

318: ame_util.runtimeException(packageNameIn => 'ame_trans_data_purge',
319: routineNameIn => 'purgeDeviationData',
320: exceptionNumberIn => errorCode,
321: exceptionStringIn => errorMessage);
322: FND_FILE.PUT_LINE (FND_FILE.LOG,errorMessage);
323: raise_application_error(errorCode,
324: errorMessage);
325: when invalidInputDateExc then
326: l_error_date := FND_PROFILE.VALUE('AME_DEVITION_PURGE_DATE');

Line 337: FND_FILE.PUT_LINE (FND_FILE.LOG,errorMessage);

333: ame_util.runtimeException(packageNameIn => 'ame_trans_data_purge',
334: routineNameIn => 'purgeDeviationData',
335: exceptionNumberIn => errorCode,
336: exceptionStringIn => errorMessage);
337: FND_FILE.PUT_LINE (FND_FILE.LOG,errorMessage);
338: raise_application_error(errorCode,
339: errorMessage);
340: when others then
341: ame_util.runtimeException(packageNameIn => 'ame_trans_data_purge',

Line 345: FND_FILE.PUT_LINE (FND_FILE.LOG,sqlerrm);

341: ame_util.runtimeException(packageNameIn => 'ame_trans_data_purge',
342: routineNameIn => 'purgeDeviationData',
343: exceptionNumberIn => sqlcode,
344: exceptionStringIn => sqlerrm);
345: FND_FILE.PUT_LINE (FND_FILE.LOG,sqlerrm);
346: raise_application_error(sqlcode,
347: sqlerrm);
348: end purgeDeviationData;
349: end ame_trans_data_purge;