DBA Data[Home] [Help]

APPS.CTO_AUTO_PURGE_PK dependencies on BOM_CTO_ORDER_LINES

Line 200: --Begin Bugfix 6241681: Removing the reference of purged configs from bom_cto_order_lines

196: end if;
197:
198: FND_FILE.PUT_LINE(FND_FILE.LOG,'Rows deleted from bcmo:'|| sql%rowcount); --end bugfix 3557190
199:
200: --Begin Bugfix 6241681: Removing the reference of purged configs from bom_cto_order_lines
201: l_stmt_num := 80;
202: FND_FILE.PUT_LINE(FND_FILE.LOG,'Removing the references of purged configs from bom_cto_order_lines');
203: k := dist_cfg_idx_by_id_tbl.first;
204:

Line 202: FND_FILE.PUT_LINE(FND_FILE.LOG,'Removing the references of purged configs from bom_cto_order_lines');

198: FND_FILE.PUT_LINE(FND_FILE.LOG,'Rows deleted from bcmo:'|| sql%rowcount); --end bugfix 3557190
199:
200: --Begin Bugfix 6241681: Removing the reference of purged configs from bom_cto_order_lines
201: l_stmt_num := 80;
202: FND_FILE.PUT_LINE(FND_FILE.LOG,'Removing the references of purged configs from bom_cto_order_lines');
203: k := dist_cfg_idx_by_id_tbl.first;
204:
205: WHILE k is not null
206: LOOP

Line 214: FROM bom_cto_order_lines

210: FND_FILE.PUT_LINE(FND_FILE.LOG,'Going to check if this config is linked to some SO=>'||to_char(l_config_item_id));
211:
212: SELECT ato_line_id
213: BULK COLLECT INTO lbcolline_tbl --Bulk Collecting as a config may be linked to more than one line
214: FROM bom_cto_order_lines
215: WHERE config_item_id = l_config_item_id;
216:
217: FND_FILE.PUT_LINE(FND_FILE.LOG,'No. of lines this config is linked to=>'||to_char(lbcolline_tbl.count));
218:

Line 232: FROM bom_cto_order_lines

228:
229: l_stmt_num := 90;
230: SELECT parent_ato_line_id, line_id
231: INTO lpatolineid, llineid
232: FROM bom_cto_order_lines
233: WHERE config_item_id = l_config_item_id
234: and ato_line_id = lbcolline_tbl(j);
235:
236: FND_FILE.PUT_LINE(FND_FILE.LOG,'Looping to remove the references of all the parents for config id=>'||to_char(l_config_item_id));

Line 243: UPDATE bom_cto_order_lines SET config_item_id = NULL WHERE line_id = llineid;

239: --llineid := lline_tbl(j);
240: --lpatolineid := lpatoline_tbl(j);
241:
242: WHILE llineid <> lpatolineid LOOP
243: UPDATE bom_cto_order_lines SET config_item_id = NULL WHERE line_id = llineid;
244:
245: llineid := lpatolineid;
246:
247: SELECT parent_ato_line_id

Line 249: FROM bom_cto_order_lines

245: llineid := lpatolineid;
246:
247: SELECT parent_ato_line_id
248: INTO lpatolineid
249: FROM bom_cto_order_lines
250: WHERE line_id = llineid;
251:
252: END LOOP; --while loop ends
253:

Line 254: UPDATE bom_cto_order_lines SET config_item_id = NULL WHERE line_id = llineid;

250: WHERE line_id = llineid;
251:
252: END LOOP; --while loop ends
253:
254: UPDATE bom_cto_order_lines SET config_item_id = NULL WHERE line_id = llineid;
255: END IF; --if config line exists
256: END LOOP; --for loop ends
257: ELSE
258: FND_FILE.PUT_LINE(FND_FILE.LOG,'Cant find reference of config id=>'||to_char(l_config_item_id)||' in bcol');

Line 269: --Bugfix 6241681: Removing the reference of purged configs from bom_cto_order_lines

265:
266: k:= dist_cfg_idx_by_id_tbl.next(k);
267:
268: END LOOP; --while loop ends
269: --Bugfix 6241681: Removing the reference of purged configs from bom_cto_order_lines
270:
271: FND_FILE.PUT_LINE(FND_FILE.LOG,'Batch ID: '|| to_char(l_batch_id));
272:
273: commit ;