DBA Data[Home] [Help]

APPS.AMS_LIST_PURGE_PVT dependencies on FND_FILE

Line 1080: fnd_file.put_line(fnd_file.log,'Execution of Delete List entries master concurrent program started.');

1076: type l_char_tbl is table of varchar2(1000) index by binary_integer;
1077: l_list_name_tbl l_char_tbl;
1078:
1079: BEGIN
1080: fnd_file.put_line(fnd_file.log,'Execution of Delete List entries master concurrent program started.');
1081: l_conc_request_id := FND_GLOBAL.conc_request_id();
1082: fnd_file.put_line(fnd_file.log,'Concurrent request id is '||l_conc_request_id);
1083: if p_list_header_id is not null then
1084: fnd_file.put_line(fnd_file.log,'List header id is '||p_list_header_id);

Line 1082: fnd_file.put_line(fnd_file.log,'Concurrent request id is '||l_conc_request_id);

1078:
1079: BEGIN
1080: fnd_file.put_line(fnd_file.log,'Execution of Delete List entries master concurrent program started.');
1081: l_conc_request_id := FND_GLOBAL.conc_request_id();
1082: fnd_file.put_line(fnd_file.log,'Concurrent request id is '||l_conc_request_id);
1083: if p_list_header_id is not null then
1084: fnd_file.put_line(fnd_file.log,'List header id is '||p_list_header_id);
1085: -- Do the in use checks here before updating
1086: -- if it fails go back...

Line 1084: fnd_file.put_line(fnd_file.log,'List header id is '||p_list_header_id);

1080: fnd_file.put_line(fnd_file.log,'Execution of Delete List entries master concurrent program started.');
1081: l_conc_request_id := FND_GLOBAL.conc_request_id();
1082: fnd_file.put_line(fnd_file.log,'Concurrent request id is '||l_conc_request_id);
1083: if p_list_header_id is not null then
1084: fnd_file.put_line(fnd_file.log,'List header id is '||p_list_header_id);
1085: -- Do the in use checks here before updating
1086: -- if it fails go back...
1087: OPEN c_get_list_header_status;
1088: FETCH c_get_list_header_status INTO l_list_header_status;

Line 1094: fnd_file.put_line(fnd_file.log,'List header status is already DELETED');

1090: if l_list_header_status = 'DELETED' then
1091: UPDATE ams_list_headers_all
1092: SET request_id = l_conc_request_id,user_status_id = 314
1093: WHERE list_header_id = p_list_header_id;
1094: fnd_file.put_line(fnd_file.log,'List header status is already DELETED');
1095: else
1096: fnd_file.put_line(fnd_file.log,'List header status is not DELETED. Checking if its in use');
1097: OPEN c_is_used_in_sel;
1098: FETCH c_is_used_in_sel into l_sel_id;

Line 1096: fnd_file.put_line(fnd_file.log,'List header status is not DELETED. Checking if its in use');

1092: SET request_id = l_conc_request_id,user_status_id = 314
1093: WHERE list_header_id = p_list_header_id;
1094: fnd_file.put_line(fnd_file.log,'List header status is already DELETED');
1095: else
1096: fnd_file.put_line(fnd_file.log,'List header status is not DELETED. Checking if its in use');
1097: OPEN c_is_used_in_sel;
1098: FETCH c_is_used_in_sel into l_sel_id;
1099: CLOSE c_is_used_in_sel;
1100: OPEN c_is_used_in_act;

Line 1104: fnd_file.put_line(fnd_file.log,'This list is in use. Could not be deleted.');

1100: OPEN c_is_used_in_act;
1101: FETCH c_is_used_in_act into l_act_id;
1102: CLOSE c_is_used_in_act;
1103: if ((l_sel_id is not null) or (l_act_id is not null)) then -- This list is in use. Dont proceed
1104: fnd_file.put_line(fnd_file.log,'This list is in use. Could not be deleted.');
1105: return;
1106: else
1107: fnd_file.put_line(fnd_file.log,'This list is not in use. Could be deleted.');
1108: UPDATE ams_list_headers_all

Line 1107: fnd_file.put_line(fnd_file.log,'This list is not in use. Could be deleted.');

1103: if ((l_sel_id is not null) or (l_act_id is not null)) then -- This list is in use. Dont proceed
1104: fnd_file.put_line(fnd_file.log,'This list is in use. Could not be deleted.');
1105: return;
1106: else
1107: fnd_file.put_line(fnd_file.log,'This list is not in use. Could be deleted.');
1108: UPDATE ams_list_headers_all
1109: SET request_id = l_conc_request_id, status_code = 'DELETED', user_status_id = 314
1110: WHERE list_header_id = p_list_header_id;
1111: end if;

Line 1114: fnd_file.put_line(fnd_file.log,'No list header id passed. So all the entries for lists in DELETED status will be deleted');

1110: WHERE list_header_id = p_list_header_id;
1111: end if;
1112: end if;
1113: else
1114: fnd_file.put_line(fnd_file.log,'No list header id passed. So all the entries for lists in DELETED status will be deleted');
1115: update ams_list_headers_all
1116: set request_id = l_conc_request_id
1117: where status_code = 'DELETED';
1118: end if;

Line 1119: fnd_file.put_line(fnd_file.log,'Submitting sub requests');

1115: update ams_list_headers_all
1116: set request_id = l_conc_request_id
1117: where status_code = 'DELETED';
1118: end if;
1119: fnd_file.put_line(fnd_file.log,'Submitting sub requests');
1120: ad_conc_utils_pkg.submit_subrequests( x_errbuf => l_errbuf
1121: , x_retcode => l_retcode
1122: , x_workerconc_app_shortname => 'AMS'
1123: , x_workerconc_progname => 'AMSDEWKR'

Line 1129: fnd_file.put_line(fnd_file.log,'children done');

1125: , x_num_workers => p_num_workers
1126: , x_argument4 => l_conc_request_id
1127: );
1128: if l_children_done then
1129: fnd_file.put_line(fnd_file.log,'children done');
1130: else
1131: fnd_file.put_line(fnd_file.log,'children not done');
1132: end if;
1133: l_children_done := FND_CONCURRENT.children_done ( parent_request_id => l_conc_request_id

Line 1131: fnd_file.put_line(fnd_file.log,'children not done');

1127: );
1128: if l_children_done then
1129: fnd_file.put_line(fnd_file.log,'children done');
1130: else
1131: fnd_file.put_line(fnd_file.log,'children not done');
1132: end if;
1133: l_children_done := FND_CONCURRENT.children_done ( parent_request_id => l_conc_request_id
1134: , recursive_flag => 'N'
1135: , interval => 15

Line 1138: fnd_file.put_line(fnd_file.log,'Sub requests completed.');

1134: , recursive_flag => 'N'
1135: , interval => 15
1136: );
1137:
1138: fnd_file.put_line(fnd_file.log,'Sub requests completed.');
1139:
1140: fnd_file.put_line(fnd_file.log,'L ret code is '||l_retcode);
1141:
1142: if l_children_done then

Line 1140: fnd_file.put_line(fnd_file.log,'L ret code is '||l_retcode);

1136: );
1137:
1138: fnd_file.put_line(fnd_file.log,'Sub requests completed.');
1139:
1140: fnd_file.put_line(fnd_file.log,'L ret code is '||l_retcode);
1141:
1142: if l_children_done then
1143: fnd_file.put_line(fnd_file.log,'children done');
1144: else

Line 1143: fnd_file.put_line(fnd_file.log,'children done');

1139:
1140: fnd_file.put_line(fnd_file.log,'L ret code is '||l_retcode);
1141:
1142: if l_children_done then
1143: fnd_file.put_line(fnd_file.log,'children done');
1144: else
1145: fnd_file.put_line(fnd_file.log,'children not done');
1146: end if;
1147:

Line 1145: fnd_file.put_line(fnd_file.log,'children not done');

1141:
1142: if l_children_done then
1143: fnd_file.put_line(fnd_file.log,'children done');
1144: else
1145: fnd_file.put_line(fnd_file.log,'children not done');
1146: end if;
1147:
1148:
1149: IF ((l_retcode <> ad_conc_utils_pkg.conc_fail) AND

Line 1151: fnd_file.put_line(fnd_file.log,'Entries deleted successfully. Need to delete from other tables.');

1147:
1148:
1149: IF ((l_retcode <> ad_conc_utils_pkg.conc_fail) AND
1150: (l_children_done)) then
1151: fnd_file.put_line(fnd_file.log,'Entries deleted successfully. Need to delete from other tables.');
1152: OPEN c_get_list_headers(l_conc_request_id);
1153: LOOP
1154: fnd_file.put_line(fnd_file.log,'Entries deleted successfully. Need to delete from other tables. Total count of header rec is '||l_header_id_tbl.count);
1155: FETCH c_get_list_headers BULK COLLECT INTO l_header_id_tbl,l_list_name_tbl LIMIT 1000;

Line 1154: fnd_file.put_line(fnd_file.log,'Entries deleted successfully. Need to delete from other tables. Total count of header rec is '||l_header_id_tbl.count);

1150: (l_children_done)) then
1151: fnd_file.put_line(fnd_file.log,'Entries deleted successfully. Need to delete from other tables.');
1152: OPEN c_get_list_headers(l_conc_request_id);
1153: LOOP
1154: fnd_file.put_line(fnd_file.log,'Entries deleted successfully. Need to delete from other tables. Total count of header rec is '||l_header_id_tbl.count);
1155: FETCH c_get_list_headers BULK COLLECT INTO l_header_id_tbl,l_list_name_tbl LIMIT 1000;
1156:
1157: delete_list_info(p_id_tbl => l_header_id_tbl,
1158: x_return_status => x_return_status,

Line 1164: fnd_file.put_line(fnd_file.log,'List '||l_list_name_tbl(i)||' is deleted');

1160: x_msg_data => x_msg_data);
1161:
1162: FOR i in 1 .. l_header_id_tbl.count
1163: LOOP
1164: fnd_file.put_line(fnd_file.log,'List '||l_list_name_tbl(i)||' is deleted');
1165: END LOOP;
1166:
1167: COMMIT;
1168:

Line 1175: fnd_file.put_line(fnd_file.log,'Delete Entries concurrent program executed successfully.');

1171: CLOSE C_GET_LIST_HEADERS;
1172:
1173: END IF;
1174: commit;
1175: fnd_file.put_line(fnd_file.log,'Delete Entries concurrent program executed successfully.');
1176: x_retcode := ad_conc_utils_pkg.conc_success;
1177: EXCEPTION
1178: WHEN OTHERS THEN
1179: fnd_file.put_line(fnd_file.log,'Error while executing Delete Entries concurrent program '||sqlerrm);

Line 1179: fnd_file.put_line(fnd_file.log,'Error while executing Delete Entries concurrent program '||sqlerrm);

1175: fnd_file.put_line(fnd_file.log,'Delete Entries concurrent program executed successfully.');
1176: x_retcode := ad_conc_utils_pkg.conc_success;
1177: EXCEPTION
1178: WHEN OTHERS THEN
1179: fnd_file.put_line(fnd_file.log,'Error while executing Delete Entries concurrent program '||sqlerrm);
1180: x_retcode := ad_conc_utils_pkg.conc_fail;
1181: x_errbuf := SQLERRM;
1182: RAISE;
1183: END delete_list_manager;

Line 1214: FND_FILE.PUT_LINE( FND_FILE.LOG, 'X_Worker_Id: '|| x_worker_id );

1210: THEN
1211: RAISE_APPLICATION_ERROR(-20001, 'Cannot get schema name for product: '|| l_product );
1212: END IF;
1213:
1214: FND_FILE.PUT_LINE( FND_FILE.LOG, 'X_Worker_Id: '|| x_worker_id );
1215: FND_FILE.PUT_LINE( FND_FILE.LOG, 'X_Num_Workers: '|| x_num_workers );
1216: FND_FILE.PUT_LINE( FND_FILE.LOG, 'Concurrent request id is '|| x_argument4);
1217:
1218:

Line 1215: FND_FILE.PUT_LINE( FND_FILE.LOG, 'X_Num_Workers: '|| x_num_workers );

1211: RAISE_APPLICATION_ERROR(-20001, 'Cannot get schema name for product: '|| l_product );
1212: END IF;
1213:
1214: FND_FILE.PUT_LINE( FND_FILE.LOG, 'X_Worker_Id: '|| x_worker_id );
1215: FND_FILE.PUT_LINE( FND_FILE.LOG, 'X_Num_Workers: '|| x_num_workers );
1216: FND_FILE.PUT_LINE( FND_FILE.LOG, 'Concurrent request id is '|| x_argument4);
1217:
1218:
1219: l_update_name := x_argument4;

Line 1216: FND_FILE.PUT_LINE( FND_FILE.LOG, 'Concurrent request id is '|| x_argument4);

1212: END IF;
1213:
1214: FND_FILE.PUT_LINE( FND_FILE.LOG, 'X_Worker_Id: '|| x_worker_id );
1215: FND_FILE.PUT_LINE( FND_FILE.LOG, 'X_Num_Workers: '|| x_num_workers );
1216: FND_FILE.PUT_LINE( FND_FILE.LOG, 'Concurrent request id is '|| x_argument4);
1217:
1218:
1219: l_update_name := x_argument4;
1220:

Line 1398: fnd_file.put_line(fnd_file.log,'Execution of Purge list and target group entries master concurrent program started.');

1394: l_end_date date;
1395:
1396: BEGIN
1397:
1398: fnd_file.put_line(fnd_file.log,'Execution of Purge list and target group entries master concurrent program started.');
1399: l_conc_request_id := FND_GLOBAL.conc_request_id();
1400:
1401:
1402: fnd_file.put_line(fnd_file.log,'Concurrent request id is '||l_conc_request_id);

Line 1402: fnd_file.put_line(fnd_file.log,'Concurrent request id is '||l_conc_request_id);

1398: fnd_file.put_line(fnd_file.log,'Execution of Purge list and target group entries master concurrent program started.');
1399: l_conc_request_id := FND_GLOBAL.conc_request_id();
1400:
1401:
1402: fnd_file.put_line(fnd_file.log,'Concurrent request id is '||l_conc_request_id);
1403: fnd_file.put_line(fnd_file.log,'Created from date is '||p_cr_date_from);
1404: fnd_file.put_line(fnd_file.log,'Created to date is '||p_cr_date_to);
1405:
1406: l_start_date := to_date(p_cr_date_from,'YYYY/MM/DD HH24:MI:SS');

Line 1403: fnd_file.put_line(fnd_file.log,'Created from date is '||p_cr_date_from);

1399: l_conc_request_id := FND_GLOBAL.conc_request_id();
1400:
1401:
1402: fnd_file.put_line(fnd_file.log,'Concurrent request id is '||l_conc_request_id);
1403: fnd_file.put_line(fnd_file.log,'Created from date is '||p_cr_date_from);
1404: fnd_file.put_line(fnd_file.log,'Created to date is '||p_cr_date_to);
1405:
1406: l_start_date := to_date(p_cr_date_from,'YYYY/MM/DD HH24:MI:SS');
1407: l_end_date := to_date(p_cr_date_to, 'YYYY/MM/DD HH24:MI:SS');

Line 1404: fnd_file.put_line(fnd_file.log,'Created to date is '||p_cr_date_to);

1400:
1401:
1402: fnd_file.put_line(fnd_file.log,'Concurrent request id is '||l_conc_request_id);
1403: fnd_file.put_line(fnd_file.log,'Created from date is '||p_cr_date_from);
1404: fnd_file.put_line(fnd_file.log,'Created to date is '||p_cr_date_to);
1405:
1406: l_start_date := to_date(p_cr_date_from,'YYYY/MM/DD HH24:MI:SS');
1407: l_end_date := to_date(p_cr_date_to, 'YYYY/MM/DD HH24:MI:SS');
1408:

Line 1410: fnd_file.put_line(fnd_file.log,'Type chosen is '||p_list_type);

1406: l_start_date := to_date(p_cr_date_from,'YYYY/MM/DD HH24:MI:SS');
1407: l_end_date := to_date(p_cr_date_to, 'YYYY/MM/DD HH24:MI:SS');
1408:
1409: if p_list_type is not null then
1410: fnd_file.put_line(fnd_file.log,'Type chosen is '||p_list_type);
1411: UPDATE ams_list_headers_all head
1412: SET request_id = l_conc_request_id,last_update_date = sysdate
1413: WHERE status_code in ('AVAILABLE','LOCKED')
1414: AND trunc(creation_date) between trunc(l_start_date) AND trunc(l_end_date)

Line 1422: fnd_file.put_line(fnd_file.log,'Type is not chosen. All the matching list and target group will be purged. ' );

1418: WHERE head.list_source_type = type.source_type_code
1419: AND nvl(type.remote_flag,'N') = 'Y') ;
1420: -- AND nvl(remote_gen_flag,'N') = 'N';
1421: else
1422: fnd_file.put_line(fnd_file.log,'Type is not chosen. All the matching list and target group will be purged. ' );
1423: UPDATE ams_list_headers_all head
1424: SET request_id = l_conc_request_id,last_update_date = sysdate
1425: WHERE status_code in ('AVAILABLE','LOCKED')
1426: AND trunc(creation_date) between trunc(l_start_date) AND trunc(l_end_date)

Line 1434: fnd_file.put_line(fnd_file.log,'Submitting sub requests');

1430: AND nvl(type.remote_flag,'N') = 'Y') ;
1431: -- AND nvl(remote_gen_flag,'N') = 'N';
1432: end if;
1433:
1434: fnd_file.put_line(fnd_file.log,'Submitting sub requests');
1435: ad_conc_utils_pkg.submit_subrequests( x_errbuf => l_errbuf
1436: , x_retcode => l_retcode
1437: , x_workerconc_app_shortname => 'AMS'
1438: , x_workerconc_progname => 'AMSPEWKR'

Line 1445: fnd_file.put_line(fnd_file.log,'children done');

1441: , x_argument4 => l_conc_request_id
1442: );
1443:
1444: if l_children_done then
1445: fnd_file.put_line(fnd_file.log,'children done');
1446: else
1447: fnd_file.put_line(fnd_file.log,'children not done');
1448: end if;
1449:

Line 1447: fnd_file.put_line(fnd_file.log,'children not done');

1443:
1444: if l_children_done then
1445: fnd_file.put_line(fnd_file.log,'children done');
1446: else
1447: fnd_file.put_line(fnd_file.log,'children not done');
1448: end if;
1449:
1450: l_children_done := fnd_concurrent.children_done ( parent_request_id => l_conc_request_id
1451: , recursive_flag => 'N'

Line 1455: fnd_file.put_line(fnd_file.log,'Sub requests submitted.');

1451: , recursive_flag => 'N'
1452: , interval => 15
1453: );
1454:
1455: fnd_file.put_line(fnd_file.log,'Sub requests submitted.');
1456:
1457: fnd_file.put_line(fnd_file.log,'ret code is '||l_retcode);
1458:
1459: if l_children_done then

Line 1457: fnd_file.put_line(fnd_file.log,'ret code is '||l_retcode);

1453: );
1454:
1455: fnd_file.put_line(fnd_file.log,'Sub requests submitted.');
1456:
1457: fnd_file.put_line(fnd_file.log,'ret code is '||l_retcode);
1458:
1459: if l_children_done then
1460: fnd_file.put_line(fnd_file.log,'children done');
1461: else

Line 1460: fnd_file.put_line(fnd_file.log,'children done');

1456:
1457: fnd_file.put_line(fnd_file.log,'ret code is '||l_retcode);
1458:
1459: if l_children_done then
1460: fnd_file.put_line(fnd_file.log,'children done');
1461: else
1462: fnd_file.put_line(fnd_file.log,'children not done');
1463: end if;
1464:

Line 1462: fnd_file.put_line(fnd_file.log,'children not done');

1458:
1459: if l_children_done then
1460: fnd_file.put_line(fnd_file.log,'children done');
1461: else
1462: fnd_file.put_line(fnd_file.log,'children not done');
1463: end if;
1464:
1465:
1466: IF ((l_retcode <> ad_conc_utils_pkg.conc_fail) AND

Line 1469: fnd_file.put_line(fnd_file.log,'Entries purged successfully. Need to purge from ams_act_logs.');

1465:
1466: IF ((l_retcode <> ad_conc_utils_pkg.conc_fail) AND
1467: (l_children_done)) then
1468:
1469: fnd_file.put_line(fnd_file.log,'Entries purged successfully. Need to purge from ams_act_logs.');
1470:
1471: OPEN c_get_list_headers(l_conc_request_id);
1472: LOOP
1473: FETCH c_get_list_headers BULK COLLECT INTO l_header_id_tbl, l_list_name_tbl LIMIT 1000;

Line 1505: fnd_file.put_line(fnd_file.log,'Entries for list/target group '||l_list_name_tbl(i)||' is deleted');

1501: WHERE list_header_id = l_header_id_tbl(i);
1502:
1503: FOR i in 1 .. l_header_id_tbl.count
1504: LOOP
1505: fnd_file.put_line(fnd_file.log,'Entries for list/target group '||l_list_name_tbl(i)||' is deleted');
1506: END LOOP;
1507:
1508: COMMIT;
1509:

Line 1517: fnd_file.put_line(fnd_file.log,'Purge List and Target group entries concurrent program executed successfully.');

1513:
1514: END IF;
1515: commit;
1516:
1517: fnd_file.put_line(fnd_file.log,'Purge List and Target group entries concurrent program executed successfully.');
1518:
1519: x_retcode := ad_conc_utils_pkg.conc_success;
1520: EXCEPTION
1521: WHEN OTHERS THEN

Line 1522: fnd_file.put_line(fnd_file.log,'Error while executing purge entries concurrent program '||sqlerrm);

1518:
1519: x_retcode := ad_conc_utils_pkg.conc_success;
1520: EXCEPTION
1521: WHEN OTHERS THEN
1522: fnd_file.put_line(fnd_file.log,'Error while executing purge entries concurrent program '||sqlerrm);
1523: x_retcode := ad_conc_utils_pkg.conc_fail;
1524: x_errbuf := SQLERRM;
1525: RAISE;
1526: END purge_entries_manager;

Line 1558: FND_FILE.PUT_LINE( FND_FILE.LOG, 'X_Worker_Id: '|| x_worker_id );

1554: THEN
1555: RAISE_APPLICATION_ERROR(-20001, 'Cannot get schema name for product: '|| l_product );
1556: END IF;
1557:
1558: FND_FILE.PUT_LINE( FND_FILE.LOG, 'X_Worker_Id: '|| x_worker_id );
1559: FND_FILE.PUT_LINE( FND_FILE.LOG, 'X_Num_Workers: '|| x_num_workers );
1560: FND_FILE.PUT_LINE( FND_FILE.LOG, 'Concurrent request id is '|| x_argument4);
1561:
1562:

Line 1559: FND_FILE.PUT_LINE( FND_FILE.LOG, 'X_Num_Workers: '|| x_num_workers );

1555: RAISE_APPLICATION_ERROR(-20001, 'Cannot get schema name for product: '|| l_product );
1556: END IF;
1557:
1558: FND_FILE.PUT_LINE( FND_FILE.LOG, 'X_Worker_Id: '|| x_worker_id );
1559: FND_FILE.PUT_LINE( FND_FILE.LOG, 'X_Num_Workers: '|| x_num_workers );
1560: FND_FILE.PUT_LINE( FND_FILE.LOG, 'Concurrent request id is '|| x_argument4);
1561:
1562:
1563: l_update_name := x_argument4;

Line 1560: FND_FILE.PUT_LINE( FND_FILE.LOG, 'Concurrent request id is '|| x_argument4);

1556: END IF;
1557:
1558: FND_FILE.PUT_LINE( FND_FILE.LOG, 'X_Worker_Id: '|| x_worker_id );
1559: FND_FILE.PUT_LINE( FND_FILE.LOG, 'X_Num_Workers: '|| x_num_workers );
1560: FND_FILE.PUT_LINE( FND_FILE.LOG, 'Concurrent request id is '|| x_argument4);
1561:
1562:
1563: l_update_name := x_argument4;
1564: