DBA Data[Home] [Help]

APPS.ICX_POR_EXT_PURGE dependencies on ICX_POR_EXT_UTL

Line 61: ICX_POR_EXT_UTL.getTableElement(gRtCategoryIds, pIndex) || ',';

57: xShot varchar2(2000) := 'SnapShot('||pMode||')['||pIndex||']--';
58: BEGIN
59: IF (pMode = 'CLASS') THEN
60: xShot := xShot || ' gRtCategoryIds: ' ||
61: ICX_POR_EXT_UTL.getTableElement(gRtCategoryIds, pIndex) || ',';
62: xShot := xShot || ' gCategoryKeys: ' ||
63: ICX_POR_EXT_UTL.getTableElement(gCategoryKeys, pIndex) || ',';
64: xShot := xShot || ' gCategoryTypes: ' ||
65: ICX_POR_EXT_UTL.getTableElement(gCategoryTypes, pIndex);

Line 63: ICX_POR_EXT_UTL.getTableElement(gCategoryKeys, pIndex) || ',';

59: IF (pMode = 'CLASS') THEN
60: xShot := xShot || ' gRtCategoryIds: ' ||
61: ICX_POR_EXT_UTL.getTableElement(gRtCategoryIds, pIndex) || ',';
62: xShot := xShot || ' gCategoryKeys: ' ||
63: ICX_POR_EXT_UTL.getTableElement(gCategoryKeys, pIndex) || ',';
64: xShot := xShot || ' gCategoryTypes: ' ||
65: ICX_POR_EXT_UTL.getTableElement(gCategoryTypes, pIndex);
66: ELSIF (pMode = 'ITEM') THEN
67: xShot := xShot || ' gRtItemIds: ' ||

Line 65: ICX_POR_EXT_UTL.getTableElement(gCategoryTypes, pIndex);

61: ICX_POR_EXT_UTL.getTableElement(gRtCategoryIds, pIndex) || ',';
62: xShot := xShot || ' gCategoryKeys: ' ||
63: ICX_POR_EXT_UTL.getTableElement(gCategoryKeys, pIndex) || ',';
64: xShot := xShot || ' gCategoryTypes: ' ||
65: ICX_POR_EXT_UTL.getTableElement(gCategoryTypes, pIndex);
66: ELSIF (pMode = 'ITEM') THEN
67: xShot := xShot || ' gRtItemIds: ' ||
68: ICX_POR_EXT_UTL.getTableElement(gRtItemIds, pIndex);
69: END IF;

Line 68: ICX_POR_EXT_UTL.getTableElement(gRtItemIds, pIndex);

64: xShot := xShot || ' gCategoryTypes: ' ||
65: ICX_POR_EXT_UTL.getTableElement(gCategoryTypes, pIndex);
66: ELSIF (pMode = 'ITEM') THEN
67: xShot := xShot || ' gRtItemIds: ' ||
68: ICX_POR_EXT_UTL.getTableElement(gRtItemIds, pIndex);
69: END IF;
70:
71: RETURN xShot;
72: END snapShot;

Line 95: IF (ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.DETIL_LEVEL) THEN

91: IF (gCategoryKeys.COUNT = 0) THEN
92: RETURN;
93: END IF;
94:
95: IF (ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.DETIL_LEVEL) THEN
96: FOR i in 1..gCategoryKeys.COUNT LOOP
97: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.DETIL_LEVEL,
98: snapShot(i, 'CLASS'));
99: END LOOP;

Line 97: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.DETIL_LEVEL,

93: END IF;
94:
95: IF (ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.DETIL_LEVEL) THEN
96: FOR i in 1..gCategoryKeys.COUNT LOOP
97: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.DETIL_LEVEL,
98: snapShot(i, 'CLASS'));
99: END LOOP;
100: END IF;
101:

Line 103: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.INFO_LEVEL THEN

99: END LOOP;
100: END IF;
101:
102: xErrLoc := 100;
103: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.INFO_LEVEL THEN
104: ICX_POR_EXT_UTL.debug('Delete from ICX_POR_CATEGORY_DATA_SOURCES');
105: END IF;
106: FORALL i IN 1..gCategoryKeys.COUNT
107: DELETE FROM icx_por_category_data_sources

Line 104: ICX_POR_EXT_UTL.debug('Delete from ICX_POR_CATEGORY_DATA_SOURCES');

100: END IF;
101:
102: xErrLoc := 100;
103: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.INFO_LEVEL THEN
104: ICX_POR_EXT_UTL.debug('Delete from ICX_POR_CATEGORY_DATA_SOURCES');
105: END IF;
106: FORALL i IN 1..gCategoryKeys.COUNT
107: DELETE FROM icx_por_category_data_sources
108: WHERE category_key = gCategoryKeys(i)

Line 111: ICX_POR_EXT_UTL.extCommit;

107: DELETE FROM icx_por_category_data_sources
108: WHERE category_key = gCategoryKeys(i)
109: AND external_source = 'Oracle';
110:
111: ICX_POR_EXT_UTL.extCommit;
112:
113: xErrLoc := 200;
114: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.INFO_LEVEL THEN
115: ICX_POR_EXT_UTL.debug('Delete from ICX_POR_CATEGORY_ORDER_MAP');

Line 114: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.INFO_LEVEL THEN

110:
111: ICX_POR_EXT_UTL.extCommit;
112:
113: xErrLoc := 200;
114: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.INFO_LEVEL THEN
115: ICX_POR_EXT_UTL.debug('Delete from ICX_POR_CATEGORY_ORDER_MAP');
116: END IF;
117: FORALL i IN 1..gRtCategoryIds.COUNT
118: DELETE FROM icx_por_category_order_map

Line 115: ICX_POR_EXT_UTL.debug('Delete from ICX_POR_CATEGORY_ORDER_MAP');

111: ICX_POR_EXT_UTL.extCommit;
112:
113: xErrLoc := 200;
114: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.INFO_LEVEL THEN
115: ICX_POR_EXT_UTL.debug('Delete from ICX_POR_CATEGORY_ORDER_MAP');
116: END IF;
117: FORALL i IN 1..gRtCategoryIds.COUNT
118: DELETE FROM icx_por_category_order_map
119: WHERE rt_category_id = gRtCategoryIds(i)

Line 122: ICX_POR_EXT_UTL.extCommit;

118: DELETE FROM icx_por_category_order_map
119: WHERE rt_category_id = gRtCategoryIds(i)
120: AND external_source = 'Oracle';
121:
122: ICX_POR_EXT_UTL.extCommit;
123:
124: xErrLoc := 300;
125: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.INFO_LEVEL THEN
126: ICX_POR_EXT_UTL.debug('Delete from ICX_POR_TABLE_OF_CONTENTS_TL');

Line 125: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.INFO_LEVEL THEN

121:
122: ICX_POR_EXT_UTL.extCommit;
123:
124: xErrLoc := 300;
125: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.INFO_LEVEL THEN
126: ICX_POR_EXT_UTL.debug('Delete from ICX_POR_TABLE_OF_CONTENTS_TL');
127: END IF;
128: FORALL i IN 1..gRtCategoryIds.COUNT
129: DELETE FROM icx_por_table_of_contents_tl

Line 126: ICX_POR_EXT_UTL.debug('Delete from ICX_POR_TABLE_OF_CONTENTS_TL');

122: ICX_POR_EXT_UTL.extCommit;
123:
124: xErrLoc := 300;
125: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.INFO_LEVEL THEN
126: ICX_POR_EXT_UTL.debug('Delete from ICX_POR_TABLE_OF_CONTENTS_TL');
127: END IF;
128: FORALL i IN 1..gRtCategoryIds.COUNT
129: DELETE FROM icx_por_table_of_contents_tl
130: WHERE child = gRtCategoryIds(i);

Line 132: ICX_POR_EXT_UTL.extCommit;

128: FORALL i IN 1..gRtCategoryIds.COUNT
129: DELETE FROM icx_por_table_of_contents_tl
130: WHERE child = gRtCategoryIds(i);
131:
132: ICX_POR_EXT_UTL.extCommit;
133:
134: xErrLoc := 400;
135: FOR i IN 1..gRtCategoryIds.COUNT LOOP
136:

Line 147: LIMIT ICX_POR_EXT_UTL.gCommitSize;

143:
144: xErrLoc := 430;
145: FETCH cCatItems
146: BULK COLLECT INTO xRtItemIds
147: LIMIT ICX_POR_EXT_UTL.gCommitSize;
148: EXIT WHEN xRtItemIds.COUNT = 0;
149:
150: -- For Category, need also delete all assoicated item records
151: -- For Template Header, only delete that category_item association

Line 155: ICX_POR_DELETE_CATALOG.setCommitSize(ICX_POR_EXT_UTL.gCommitSize);

151: -- For Template Header, only delete that category_item association
152: IF (gCategoryTypes(i) = ICX_POR_EXT_CLASS.CATEGORY_TYPE) THEN
153:
154: xErrLoc := 440;
155: ICX_POR_DELETE_CATALOG.setCommitSize(ICX_POR_EXT_UTL.gCommitSize);
156: xErrLoc := 445;
157: ICX_POR_DELETE_CATALOG.deleteCommonTables(xRtItemIds,
158: ICX_POR_DELETE_CATALOG.CATITEM_TABLE_LAST);
159:

Line 163: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.INFO_LEVEL THEN

159:
160: ELSIF (gCategoryTypes(i) = ICX_POR_EXT_CLASS.TEMPLATE_HEADER_TYPE) THEN
161:
162: xErrLoc := 450;
163: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.INFO_LEVEL THEN
164: ICX_POR_EXT_UTL.debug('Delete from ICX_CAT_CATEGORY_ITEMS');
165: END IF;
166: FORALL j IN 1..xRtItemIds.COUNT
167: DELETE FROM icx_cat_category_items

Line 164: ICX_POR_EXT_UTL.debug('Delete from ICX_CAT_CATEGORY_ITEMS');

160: ELSIF (gCategoryTypes(i) = ICX_POR_EXT_CLASS.TEMPLATE_HEADER_TYPE) THEN
161:
162: xErrLoc := 450;
163: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.INFO_LEVEL THEN
164: ICX_POR_EXT_UTL.debug('Delete from ICX_CAT_CATEGORY_ITEMS');
165: END IF;
166: FORALL j IN 1..xRtItemIds.COUNT
167: DELETE FROM icx_cat_category_items
168: WHERE rt_item_id = xRtItemIds(j)

Line 174: ICX_POR_EXT_UTL.extCommit;

170:
171: END IF;
172:
173: xErrLoc := 460;
174: ICX_POR_EXT_UTL.extCommit;
175:
176: END LOOP;
177:
178: xErrLoc := 480;

Line 184: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.INFO_LEVEL THEN

180:
181: END LOOP;
182:
183: xErrLoc := 500;
184: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.INFO_LEVEL THEN
185: ICX_POR_EXT_UTL.debug('Delete from ICX_CAT_CATEGORIES_TL');
186: END IF;
187: FORALL i IN 1..gRtCategoryIds.COUNT
188: DELETE FROM icx_cat_categories_tl

Line 185: ICX_POR_EXT_UTL.debug('Delete from ICX_CAT_CATEGORIES_TL');

181: END LOOP;
182:
183: xErrLoc := 500;
184: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.INFO_LEVEL THEN
185: ICX_POR_EXT_UTL.debug('Delete from ICX_CAT_CATEGORIES_TL');
186: END IF;
187: FORALL i IN 1..gRtCategoryIds.COUNT
188: DELETE FROM icx_cat_categories_tl
189: WHERE rt_category_id = gRtCategoryIds(i);

Line 192: ICX_POR_EXT_UTL.extAFCommit;

188: DELETE FROM icx_cat_categories_tl
189: WHERE rt_category_id = gRtCategoryIds(i);
190:
191: xErrLoc := 600;
192: ICX_POR_EXT_UTL.extAFCommit;
193:
194: xErrLoc := 700;
195: clearTables('CLASS');
196: EXCEPTION

Line 198: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.deleteCategories-'||

194: xErrLoc := 700;
195: clearTables('CLASS');
196: EXCEPTION
197: when others then
198: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.deleteCategories-'||
199: xErrLoc||' '||SQLERRM);
200: ICX_POR_EXT_UTL.pushError(snapShot(SQL%ROWCOUNT+1, 'CLASS'));
201:
202: ICX_POR_EXT_UTL.extRollback;

Line 200: ICX_POR_EXT_UTL.pushError(snapShot(SQL%ROWCOUNT+1, 'CLASS'));

196: EXCEPTION
197: when others then
198: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.deleteCategories-'||
199: xErrLoc||' '||SQLERRM);
200: ICX_POR_EXT_UTL.pushError(snapShot(SQL%ROWCOUNT+1, 'CLASS'));
201:
202: ICX_POR_EXT_UTL.extRollback;
203:
204: IF (cCatItems%ISOPEN) THEN

Line 202: ICX_POR_EXT_UTL.extRollback;

198: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.deleteCategories-'||
199: xErrLoc||' '||SQLERRM);
200: ICX_POR_EXT_UTL.pushError(snapShot(SQL%ROWCOUNT+1, 'CLASS'));
201:
202: ICX_POR_EXT_UTL.extRollback;
203:
204: IF (cCatItems%ISOPEN) THEN
205: CLOSE cCatItems;
206: END IF;

Line 208: raise ICX_POR_EXT_UTL.gException;

204: IF (cCatItems%ISOPEN) THEN
205: CLOSE cCatItems;
206: END IF;
207:
208: raise ICX_POR_EXT_UTL.gException;
209: END deleteCategories;
210:
211: -- Delete Items
212: procedure deleteItems IS

Line 221: if (ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.DETIL_LEVEL) then

217: IF (gRtItemIds.COUNT = 0) THEN
218: RETURN;
219: END IF;
220:
221: if (ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.DETIL_LEVEL) then
222: FOR i in 1..gRtItemIds.COUNT LOOP
223: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.DETIL_LEVEL,
224: snapShot(i, 'ITEM'));
225: END LOOP;

Line 223: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.DETIL_LEVEL,

219: END IF;
220:
221: if (ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.DETIL_LEVEL) then
222: FOR i in 1..gRtItemIds.COUNT LOOP
223: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.DETIL_LEVEL,
224: snapShot(i, 'ITEM'));
225: END LOOP;
226: end if;
227:

Line 229: ICX_POR_DELETE_CATALOG.setCommitSize(ICX_POR_EXT_UTL.gCommitSize);

225: END LOOP;
226: end if;
227:
228: xErrLoc := 200;
229: ICX_POR_DELETE_CATALOG.setCommitSize(ICX_POR_EXT_UTL.gCommitSize);
230:
231: xErrLoc := 300;
232: ICX_POR_DELETE_CATALOG.deleteCommonTables(gRtItemIds,
233: ICX_POR_DELETE_CATALOG.ITEM_TABLE_LAST);

Line 239: ICX_POR_EXT_UTL.extRollback;

235: xErrLoc := 500;
236: clearTables('ITEM');
237: exception
238: when others then
239: ICX_POR_EXT_UTL.extRollback;
240:
241: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.deleteItems-'||
242: xErrLoc||' '||SQLERRM);
243:

Line 241: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.deleteItems-'||

237: exception
238: when others then
239: ICX_POR_EXT_UTL.extRollback;
240:
241: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.deleteItems-'||
242: xErrLoc||' '||SQLERRM);
243:
244: raise ICX_POR_EXT_UTL.gException;
245: end deleteItems;

Line 244: raise ICX_POR_EXT_UTL.gException;

240:
241: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.deleteItems-'||
242: xErrLoc||' '||SQLERRM);
243:
244: raise ICX_POR_EXT_UTL.gException;
245: end deleteItems;
246:
247: -- Process batch data
248: PROCEDURE processBatchData(pType IN VARCHAR2,

Line 258: gRtCategoryIds.COUNT >= ICX_POR_EXT_UTL.gCommitSize))

254: xErrLoc := 100;
255:
256: IF (pType = 'CLASS' AND
257: (pMode = 'OUTLOOP' OR
258: gRtCategoryIds.COUNT >= ICX_POR_EXT_UTL.gCommitSize))
259: THEN
260: xErrLoc := 200;
261: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.MUST_LEVEL,
262: 'Process batch category purge -- Pending[' ||

Line 261: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.MUST_LEVEL,

257: (pMode = 'OUTLOOP' OR
258: gRtCategoryIds.COUNT >= ICX_POR_EXT_UTL.gCommitSize))
259: THEN
260: xErrLoc := 200;
261: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.MUST_LEVEL,
262: 'Process batch category purge -- Pending[' ||
263: gRtCategoryIds.COUNT || '], Completed[' || gCompletedCount || ']');
264:
265: gCompletedCount := gCompletedCount + gRtCategoryIds.COUNT;

Line 272: gRtItemIds.COUNT >= ICX_POR_EXT_UTL.gCommitSize))

268:
269: xErrLoc := 300;
270: IF (pType = 'ITEM' AND
271: (pMode = 'OUTLOOP' OR
272: gRtItemIds.COUNT >= ICX_POR_EXT_UTL.gCommitSize))
273: THEN
274: xErrLoc := 400;
275: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.MUST_LEVEL,
276: 'Process batch item purge -- Pending[' ||

Line 275: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.MUST_LEVEL,

271: (pMode = 'OUTLOOP' OR
272: gRtItemIds.COUNT >= ICX_POR_EXT_UTL.gCommitSize))
273: THEN
274: xErrLoc := 400;
275: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.MUST_LEVEL,
276: 'Process batch item purge -- Pending[' ||
277: gRtItemIds.COUNT || '], Completed[' || gCompletedCount || ']');
278:
279: gCompletedCount := gCompletedCount + gRtItemIds.COUNT;

Line 287: ICX_POR_EXT_UTL.extRollback;

283: xErrLoc := 500;
284: EXCEPTION
285: when OTHERS then
286: -- rollback;
287: ICX_POR_EXT_UTL.extRollback;
288:
289: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.processBatchData-'||
290: xErrLoc||' '||SQLERRM);
291: raise ICX_POR_EXT_UTL.gException;

Line 289: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.processBatchData-'||

285: when OTHERS then
286: -- rollback;
287: ICX_POR_EXT_UTL.extRollback;
288:
289: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.processBatchData-'||
290: xErrLoc||' '||SQLERRM);
291: raise ICX_POR_EXT_UTL.gException;
292: END processBatchData;
293:

Line 291: raise ICX_POR_EXT_UTL.gException;

287: ICX_POR_EXT_UTL.extRollback;
288:
289: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.processBatchData-'||
290: xErrLoc||' '||SQLERRM);
291: raise ICX_POR_EXT_UTL.gException;
292: END processBatchData;
293:
294: --------------------------------------------------------------
295: -- Purge Classfication Data --

Line 323: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.MUST_LEVEL,

319: xStructureId
320: FROM mtl_default_sets_view
321: WHERE functional_area_id = 2;
322:
323: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.MUST_LEVEL,
324: 'Category Set Information[category_set_id: ' || xCategorySetId ||
325: ', validate_flag: ' || xValidateFlag ||
326: ', structure_id: ' || xStructureId || ']');
327:

Line 392: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.INFO_LEVEL THEN

388: 'AND cat.last_updated_by = '||ICX_POR_EXT_TEST.TEST_USER_ID;
389: END IF;
390:
391: xErrLoc := 270;
392: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.INFO_LEVEL THEN
393: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.INFO_LEVEL,
394: 'Query for category purge: ' || xString);
395: END IF;
396:

Line 393: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.INFO_LEVEL,

389: END IF;
390:
391: xErrLoc := 270;
392: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.INFO_LEVEL THEN
393: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.INFO_LEVEL,
394: 'Query for category purge: ' || xString);
395: END IF;
396:
397: IF xValidateFlag = 'Y' THEN

Line 438: ICX_POR_EXT_UTL.extRollback;

434:
435: xErrLoc := 500;
436: EXCEPTION
437: when others then
438: ICX_POR_EXT_UTL.extRollback;
439:
440: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.openClassCursor-'||
441: xErrLoc||' '||SQLERRM);
442: raise ICX_POR_EXT_UTL.gException;

Line 440: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.openClassCursor-'||

436: EXCEPTION
437: when others then
438: ICX_POR_EXT_UTL.extRollback;
439:
440: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.openClassCursor-'||
441: xErrLoc||' '||SQLERRM);
442: raise ICX_POR_EXT_UTL.gException;
443: END openClassCursor;
444:

Line 442: raise ICX_POR_EXT_UTL.gException;

438: ICX_POR_EXT_UTL.extRollback;
439:
440: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.openClassCursor-'||
441: xErrLoc||' '||SQLERRM);
442: raise ICX_POR_EXT_UTL.gException;
443: END openClassCursor;
444:
445: -- Main procedure to purge classification data
446: PROCEDURE purgeClassificationData(pMode IN PLS_INTEGER,

Line 463: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.MUST_LEVEL,

459: BEGIN
460: xErrLoc := 100;
461: gCompletedCount := 0;
462:
463: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.MUST_LEVEL,
464: 'Purge oracle classification data');
465:
466: xErrLoc := 120;
467: openClassCursor(pMode, pInvCatId, cClass);

Line 480: IF (ICX_POR_EXT_UTL.getDatabaseVersion < 9.0) THEN

476: xRtCategoryIds.DELETE;
477: xKeys.DELETE;
478: xTypes.DELETE;
479:
480: IF (ICX_POR_EXT_UTL.getDatabaseVersion < 9.0) THEN
481: xErrLoc := 150;
482: EXIT WHEN cClass%NOTFOUND;
483: -- Oracle 8i doesn't support BULK Collect from dynamic SQL
484: FOR i IN 1..ICX_POR_EXT_UTL.gCommitSize LOOP

Line 484: FOR i IN 1..ICX_POR_EXT_UTL.gCommitSize LOOP

480: IF (ICX_POR_EXT_UTL.getDatabaseVersion < 9.0) THEN
481: xErrLoc := 150;
482: EXIT WHEN cClass%NOTFOUND;
483: -- Oracle 8i doesn't support BULK Collect from dynamic SQL
484: FOR i IN 1..ICX_POR_EXT_UTL.gCommitSize LOOP
485: FETCH cClass
486: INTO xRtCategoryIds(i), xKeys(i), xTypes(i);
487: EXIT WHEN cClass%NOTFOUND;
488: END LOOP;

Line 493: LIMIT ICX_POR_EXT_UTL.gCommitSize;

489: ELSE
490: xErrLoc := 200;
491: FETCH cClass
492: BULK COLLECT INTO xRtCategoryIds, xKeys, xTypes
493: LIMIT ICX_POR_EXT_UTL.gCommitSize;
494: EXIT WHEN xRtCategoryIds.COUNT = 0;
495: END IF;
496:
497: xErrLoc := 240;

Line 499: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.DEBUG_LEVEL THEN

495: END IF;
496:
497: xErrLoc := 240;
498: FOR i IN 1..xRtCategoryIds.COUNT LOOP
499: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.DEBUG_LEVEL THEN
500: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.DEBUG_LEVEL,
501: 'Classification[rt_category_id: '|| xRtCategoryIds(i) ||
502: ', key: '|| xKeys(i) || ', type: '|| xTypes(i) ||']');
503: END IF;

Line 500: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.DEBUG_LEVEL,

496:
497: xErrLoc := 240;
498: FOR i IN 1..xRtCategoryIds.COUNT LOOP
499: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.DEBUG_LEVEL THEN
500: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.DEBUG_LEVEL,
501: 'Classification[rt_category_id: '|| xRtCategoryIds(i) ||
502: ', key: '|| xKeys(i) || ', type: '|| xTypes(i) ||']');
503: END IF;
504:

Line 523: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.MUST_LEVEL,

519: xErrLoc := 600;
520: -- process remaining
521: processBatchData('CLASS', 'OUTLOOP');
522:
523: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.MUST_LEVEL,
524: 'Total deleted categories: ' || gCompletedCount);
525:
526: xErrLoc := 700;
527: CLOSE cClass;

Line 534: when ICX_POR_EXT_UTL.gException then

530: gRestartTime := 0;
531: gExceptionOccured := false;
532:
533: EXCEPTION
534: when ICX_POR_EXT_UTL.gException then
535: -- rollback;
536: ICX_POR_EXT_UTL.extRollback;
537:
538: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.purgeClassificationData-'||

Line 536: ICX_POR_EXT_UTL.extRollback;

532:
533: EXCEPTION
534: when ICX_POR_EXT_UTL.gException then
535: -- rollback;
536: ICX_POR_EXT_UTL.extRollback;
537:
538: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.purgeClassificationData-'||
539: xErrLoc);
540: raise ICX_POR_EXT_UTL.gException;

Line 538: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.purgeClassificationData-'||

534: when ICX_POR_EXT_UTL.gException then
535: -- rollback;
536: ICX_POR_EXT_UTL.extRollback;
537:
538: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.purgeClassificationData-'||
539: xErrLoc);
540: raise ICX_POR_EXT_UTL.gException;
541: when others then
542: -- rollback;

Line 540: raise ICX_POR_EXT_UTL.gException;

536: ICX_POR_EXT_UTL.extRollback;
537:
538: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.purgeClassificationData-'||
539: xErrLoc);
540: raise ICX_POR_EXT_UTL.gException;
541: when others then
542: -- rollback;
543: ICX_POR_EXT_UTL.extRollback;
544:

Line 543: ICX_POR_EXT_UTL.extRollback;

539: xErrLoc);
540: raise ICX_POR_EXT_UTL.gException;
541: when others then
542: -- rollback;
543: ICX_POR_EXT_UTL.extRollback;
544:
545: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.purgeClassificationData-'||
546: xErrLoc||' '||SQLERRM);
547:

Line 545: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.purgeClassificationData-'||

541: when others then
542: -- rollback;
543: ICX_POR_EXT_UTL.extRollback;
544:
545: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.purgeClassificationData-'||
546: xErrLoc||' '||SQLERRM);
547:
548: -- Bug 2001770
549: -- handle exception ORA-01555: snapshot too old: rollback segment

Line 554: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.MUST_LEVEL,

550: -- number 9 with name "RBS08" too small
551: if (SQLCODE = -01555) then
552: if (gRestartTime < 3) then
553: gRestartTime := gRestartTime + 1;
554: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.MUST_LEVEL,
555: 'Restart ICX_POR_EXT_PURGE.purgeClassificationData ' ||
556: gRestartTime || ' times');
557: gExceptionOccured := true;
558: -- Bug 2305219, zxzhang, 05/06/2002

Line 562: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.ERROR_LEVEL,

558: -- Bug 2305219, zxzhang, 05/06/2002
559: -- purgeClassificationData;
560: purgeClassificationData(pMode, pInvCatId);
561: else
562: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.ERROR_LEVEL,
563: 'Restart ICX_POR_EXT_PURGE.purgeClassificationData too many times');
564: raise ICX_POR_EXT_UTL.gException;
565: end if;
566: else

Line 564: raise ICX_POR_EXT_UTL.gException;

560: purgeClassificationData(pMode, pInvCatId);
561: else
562: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.ERROR_LEVEL,
563: 'Restart ICX_POR_EXT_PURGE.purgeClassificationData too many times');
564: raise ICX_POR_EXT_UTL.gException;
565: end if;
566: else
567: raise ICX_POR_EXT_UTL.gException;
568: end if;

Line 567: raise ICX_POR_EXT_UTL.gException;

563: 'Restart ICX_POR_EXT_PURGE.purgeClassificationData too many times');
564: raise ICX_POR_EXT_UTL.gException;
565: end if;
566: else
567: raise ICX_POR_EXT_UTL.gException;
568: end if;
569:
570: END purgeClassificationData;
571:

Line 657: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.INFO_LEVEL THEN

653: 'AND fsp.inventory_organization_id = m.organization_id) ';
654: END IF;
655:
656: xErrLoc := 270;
657: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.INFO_LEVEL THEN
658: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.INFO_LEVEL,
659: 'Query for item purge: ' || xString);
660: END IF;
661:

Line 658: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.INFO_LEVEL,

654: END IF;
655:
656: xErrLoc := 270;
657: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.INFO_LEVEL THEN
658: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.INFO_LEVEL,
659: 'Query for item purge: ' || xString);
660: END IF;
661:
662: xErrLoc := 280;

Line 695: ICX_POR_EXT_UTL.extRollback;

691:
692: xErrLoc := 600;
693: EXCEPTION
694: when others then
695: ICX_POR_EXT_UTL.extRollback;
696:
697: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.openItemCursor-'||
698: xErrLoc||' '||SQLERRM);
699: raise ICX_POR_EXT_UTL.gException;

Line 697: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.openItemCursor-'||

693: EXCEPTION
694: when others then
695: ICX_POR_EXT_UTL.extRollback;
696:
697: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.openItemCursor-'||
698: xErrLoc||' '||SQLERRM);
699: raise ICX_POR_EXT_UTL.gException;
700: END openItemCursor;
701:

Line 699: raise ICX_POR_EXT_UTL.gException;

695: ICX_POR_EXT_UTL.extRollback;
696:
697: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.openItemCursor-'||
698: xErrLoc||' '||SQLERRM);
699: raise ICX_POR_EXT_UTL.gException;
700: END openItemCursor;
701:
702: -- Process item records
703: PROCEDURE processItemRecords(pCursor IN tItemCursorType)

Line 719: IF (ICX_POR_EXT_UTL.getDatabaseVersion < 9.0) THEN

715: xErrLoc := 200;
716:
717: xRtItemIds.DELETE;
718:
719: IF (ICX_POR_EXT_UTL.getDatabaseVersion < 9.0) THEN
720: xErrLoc := 150;
721: EXIT WHEN pCursor%NOTFOUND;
722: -- Oracle 8i doesn't support BULK Collect from dynamic SQL
723: FOR i IN 1..ICX_POR_EXT_UTL.gCommitSize LOOP

Line 723: FOR i IN 1..ICX_POR_EXT_UTL.gCommitSize LOOP

719: IF (ICX_POR_EXT_UTL.getDatabaseVersion < 9.0) THEN
720: xErrLoc := 150;
721: EXIT WHEN pCursor%NOTFOUND;
722: -- Oracle 8i doesn't support BULK Collect from dynamic SQL
723: FOR i IN 1..ICX_POR_EXT_UTL.gCommitSize LOOP
724: FETCH pCursor
725: INTO xRtItemIds(i);
726: EXIT WHEN pCursor%NOTFOUND;
727: END LOOP;

Line 732: LIMIT ICX_POR_EXT_UTL.gCommitSize;

728: ELSE
729: xErrLoc := 200;
730: FETCH pCursor
731: BULK COLLECT INTO xRtItemIds
732: LIMIT ICX_POR_EXT_UTL.gCommitSize;
733: EXIT WHEN xRtItemIds.COUNT = 0;
734: END IF;
735:
736: xErrLoc := 240;

Line 738: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.DEBUG_LEVEL THEN

734: END IF;
735:
736: xErrLoc := 240;
737: FOR i IN 1..xRtItemIds.COUNT LOOP
738: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.DEBUG_LEVEL THEN
739: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.DEBUG_LEVEL,
740: 'Item[rt_item_id: '|| xRtItemIds(i) || ']');
741: END IF;
742:

Line 739: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.DEBUG_LEVEL,

735:
736: xErrLoc := 240;
737: FOR i IN 1..xRtItemIds.COUNT LOOP
738: IF ICX_POR_EXT_UTL.gDebugLevel >= ICX_POR_EXT_UTL.DEBUG_LEVEL THEN
739: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.DEBUG_LEVEL,
740: 'Item[rt_item_id: '|| xRtItemIds(i) || ']');
741: END IF;
742:
743: xErrLoc := 300;

Line 759: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.MUST_LEVEL,

755: xErrLoc := 600;
756: -- process remaining
757: processBatchData('ITEM', 'OUTLOOP');
758:
759: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.MUST_LEVEL,
760: 'Total deleted items: ' || gCompletedCount);
761:
762: xErrLoc := 700;
763:

Line 766: ICX_POR_EXT_UTL.extRollback;

762: xErrLoc := 700;
763:
764: EXCEPTION
765: when others then
766: ICX_POR_EXT_UTL.extRollback;
767:
768: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.processItemRecords-'||
769: xErrLoc||' '||SQLERRM);
770: raise ICX_POR_EXT_UTL.gException;

Line 768: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.processItemRecords-'||

764: EXCEPTION
765: when others then
766: ICX_POR_EXT_UTL.extRollback;
767:
768: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.processItemRecords-'||
769: xErrLoc||' '||SQLERRM);
770: raise ICX_POR_EXT_UTL.gException;
771: END processItemRecords;
772:

Line 770: raise ICX_POR_EXT_UTL.gException;

766: ICX_POR_EXT_UTL.extRollback;
767:
768: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.processItemRecords-'||
769: xErrLoc||' '||SQLERRM);
770: raise ICX_POR_EXT_UTL.gException;
771: END processItemRecords;
772:
773: -- Main procedure to purge classification data
774: PROCEDURE purgeItemData (pMode IN PLS_INTEGER,

Line 796: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.MUST_LEVEL,

792:
793: xErrLoc := 120;
794: openItemCursor(pMode, pInvCatItemId, 'DELETED_ITEMS', cItem);
795:
796: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.MUST_LEVEL,
797: 'Purge items deleted from item masters');
798:
799: xErrLoc := 140;
800: processItemRecords(cItem);

Line 807: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.MUST_LEVEL,

803:
804: xErrLoc := 160;
805: openItemCursor(pMode, pInvCatItemId, 'INVALID_CATGORY_ITEMS', cItem);
806:
807: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.MUST_LEVEL,
808: 'Purge items with invalid association in MTL_ITEM_CATEGORIES');
809:
810: xErrLoc := 180;
811: processItemRecords(cItem);

Line 832: WHEN ICX_POR_EXT_UTL.gException THEN

828:
829: xErrLoc := 300;
830: ICX_POR_EXT_ITEM.cleanupPrices;
831: EXCEPTION
832: WHEN ICX_POR_EXT_UTL.gException THEN
833: ICX_POR_EXT_UTL.extRollback;
834:
835: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.purgeItemData-'||
836: xErrLoc);

Line 833: ICX_POR_EXT_UTL.extRollback;

829: xErrLoc := 300;
830: ICX_POR_EXT_ITEM.cleanupPrices;
831: EXCEPTION
832: WHEN ICX_POR_EXT_UTL.gException THEN
833: ICX_POR_EXT_UTL.extRollback;
834:
835: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.purgeItemData-'||
836: xErrLoc);
837: raise ICX_POR_EXT_UTL.gException;

Line 835: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.purgeItemData-'||

831: EXCEPTION
832: WHEN ICX_POR_EXT_UTL.gException THEN
833: ICX_POR_EXT_UTL.extRollback;
834:
835: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.purgeItemData-'||
836: xErrLoc);
837: raise ICX_POR_EXT_UTL.gException;
838: WHEN OTHERS THEN
839: ICX_POR_EXT_UTL.extRollback;

Line 837: raise ICX_POR_EXT_UTL.gException;

833: ICX_POR_EXT_UTL.extRollback;
834:
835: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.purgeItemData-'||
836: xErrLoc);
837: raise ICX_POR_EXT_UTL.gException;
838: WHEN OTHERS THEN
839: ICX_POR_EXT_UTL.extRollback;
840:
841: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.purgeItemData-'||

Line 839: ICX_POR_EXT_UTL.extRollback;

835: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.purgeItemData-'||
836: xErrLoc);
837: raise ICX_POR_EXT_UTL.gException;
838: WHEN OTHERS THEN
839: ICX_POR_EXT_UTL.extRollback;
840:
841: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.purgeItemData-'||
842: xErrLoc||' '||SQLERRM);
843:

Line 841: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.purgeItemData-'||

837: raise ICX_POR_EXT_UTL.gException;
838: WHEN OTHERS THEN
839: ICX_POR_EXT_UTL.extRollback;
840:
841: ICX_POR_EXT_UTL.pushError('ICX_POR_EXT_PURGE.purgeItemData-'||
842: xErrLoc||' '||SQLERRM);
843:
844: -- Bug 2001770
845: -- handle exception ORA-01555: snapshot too old: rollback segment

Line 850: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.MUST_LEVEL,

846: -- number 9 with name "RBS08" too small
847: if (SQLCODE = -01555) then
848: if (gRestartTime < 3) then
849: gRestartTime := gRestartTime + 1;
850: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.MUST_LEVEL,
851: 'Restart ICX_POR_EXT_PURGE.purgeItemData ' ||
852: gRestartTime || ' times');
853: gExceptionOccured := true;
854:

Line 857: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.ERROR_LEVEL,

853: gExceptionOccured := true;
854:
855: purgeItemData(pMode, pInvCatItemId);
856: else
857: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.ERROR_LEVEL,
858: 'Restart ICX_POR_EXT_PURGE.purgeItemData too many times');
859: raise ICX_POR_EXT_UTL.gException;
860: end if;
861: else

Line 859: raise ICX_POR_EXT_UTL.gException;

855: purgeItemData(pMode, pInvCatItemId);
856: else
857: ICX_POR_EXT_UTL.debug(ICX_POR_EXT_UTL.ERROR_LEVEL,
858: 'Restart ICX_POR_EXT_PURGE.purgeItemData too many times');
859: raise ICX_POR_EXT_UTL.gException;
860: end if;
861: else
862: raise ICX_POR_EXT_UTL.gException;
863: end if;

Line 862: raise ICX_POR_EXT_UTL.gException;

858: 'Restart ICX_POR_EXT_PURGE.purgeItemData too many times');
859: raise ICX_POR_EXT_UTL.gException;
860: end if;
861: else
862: raise ICX_POR_EXT_UTL.gException;
863: end if;
864:
865: END purgeItemData;
866: