DBA Data[Home] [Help]

APPS.ASG_APPLY dependencies on ASG_USER

Line 30: -- return values <= asg_user.hwm_tranid

26: -- 01-jun-2004 ssabesan Merge 115.33.1158.10 to main line(11.5.9.6)
27: -- Add logging level in call to log() method.
28: -- 01-jun-2004 ssabesan Added table alias in purge_pubitems method
29: -- 18-feb-2003 ssabesan Modifed get_first_tranid and get_next_tranid to
30: -- return values <= asg_user.hwm_tranid
31: -- 24-jan-2003 ssabesan Fix bug # 2737613 ( Upload performance tuning)
32: -- 06-jan-2003 ssabesan Added NOCOPY in function definition
33: -- 06-jan-2003 ssabesan Check whether logging is enabled before invoking
34: -- logging procedure.

Line 189: ' FROM asg_users_inqinfo ' ||

185: 'FROM ' || asg_base.G_OLITE_SCHEMA || '.c$inq ' ||
186: 'WHERE clid$$cs = :1 AND ' ||
187: 'tranid$$ NOT IN ' ||
188: '(SELECT tranid ' ||
189: ' FROM asg_users_inqinfo ' ||
190: ' WHERE device_user_name = :2)';
191: EXECUTE IMMEDIATE l_select_sync_sqlstring
192: INTO p_sync_tables
193: USING p_user_name, p_user_name;

Line 263: DELETE FROM asg_users_inqinfo

259: ' End TranID: ' || p_end_tranid ||
260: ' Compact TranID: ' || p_compact_tranid);
261:
262: -- Remove all records except compact tranID
263: DELETE FROM asg_users_inqinfo
264: WHERE device_user_name = p_user_name AND
265: tranid >= p_start_tranid AND
266: tranid <= p_end_tranid AND
267: tranid <> p_compact_tranid;

Line 269: -- Update asg_users_inqarchive also

265: tranid >= p_start_tranid AND
266: tranid <= p_end_tranid AND
267: tranid <> p_compact_tranid;
268:
269: -- Update asg_users_inqarchive also
270:
271: -- Get the list of pub-items for this tranid
272: -- This is the list of all publication items uploaded for that tranid
273: l_pubitems_1 := null;

Line 328: UPDATE asg_users_inqarchive

324: END LOOP;
325:
326: log('compact_asginq: Pub-Items to be processed during this auto sync: ' ||
327: l_pubitems_1 || l_pubitems_2);
328: UPDATE asg_users_inqarchive
329: SET pub_items1 = l_pubitems_1, pub_items2 = l_pubitems_2
330: WHERE device_user_name = p_user_name AND
331: tranid = p_compact_tranid;
332:

Line 334: DELETE FROM asg_users_inqarchive

330: WHERE device_user_name = p_user_name AND
331: tranid = p_compact_tranid;
332:
333: -- Remove all records except compact tranID
334: DELETE FROM asg_users_inqarchive
335: WHERE device_user_name = p_user_name AND
336: tranid >= p_start_tranid AND
337: tranid <= p_end_tranid AND
338: tranid <> p_compact_tranid;

Line 435: l_sql:='UPDATE ASG_USERS_INQARCHIVE '||

431: log('compact_curr_inqtable: No of Records Deleted IN C$INQ : ' || l_sql_count);
432:
433: IF l_sql_count>0 THEN
434: BEGIN
435: l_sql:='UPDATE ASG_USERS_INQARCHIVE '||
436: 'SET PUB_ITEMS1=replace(PUB_ITEMS1,'''||p_curr_pubitem||''',''*'||p_curr_pubitem||'''),
437: PUB_ITEMS2=replace(PUB_ITEMS2,'''||p_curr_pubitem||''',''*'||p_curr_pubitem||''') '||
438: 'WHERE DEVICE_USER_NAME=:2 AND TRANID=:3';
439: log('compact_curr_inqtable: SQL Command: ' || l_sql);

Line 533: /* to asg_users_inqinfo table */

529:
530: END compact_inqtables;
531:
532: /* Procedure to retrieve transactions that are not yet added */
533: /* to asg_users_inqinfo table */
534: PROCEDURE get_new_tranids(p_user_name IN VARCHAR2,
535: l_tranids_tbl OUT NOCOPY num_tbl_type)
536: IS
537: counter PLS_INTEGER;

Line 549: ' FROM asg_users_inqinfo ' ||

545: 'FROM ' || asg_base.G_OLITE_SCHEMA || '.c$inq ' ||
546: 'WHERE clid$$cs = :user_name AND '||
547: 'tranid$$ NOT IN ' ||
548: '(SELECT tranid ' ||
549: ' FROM asg_users_inqinfo ' ||
550: ' WHERE device_user_name = :user_name)';
551: l_cursor_id := DBMS_SQL.OPEN_CURSOR;
552: DBMS_SQL.PARSE (l_cursor_id, l_select_tranid_sqlstring, DBMS_SQL.v7);
553: DBMS_SQL.BIND_VARIABLE (l_cursor_id, ':user_name', p_user_name );

Line 580: FROM asg_user a, asg_users_inqinfo b

576: IS
577: counter PLS_INTEGER;
578: CURSOR c_clients_yy IS
579: SELECT DISTINCT a.user_name user_name
580: FROM asg_user a, asg_users_inqinfo b
581: WHERE a.user_name = b.device_user_name AND
582: b.processed in ('I', 'N') AND
583: a.enabled = 'Y'
584: ORDER BY a.user_name;

Line 587: FROM asg_user a, asg_users_inqinfo b

583: a.enabled = 'Y'
584: ORDER BY a.user_name;
585: CURSOR c_clients_yn IS
586: SELECT DISTINCT a.user_name user_name
587: FROM asg_user a, asg_users_inqinfo b
588: WHERE a.user_name = b.device_user_name AND
589: b.deferred = 'N' AND b.processed <> 'Y' AND
590: a.enabled = 'Y'
591: ORDER BY a.user_name;

Line 594: FROM asg_user a, asg_users_inqinfo b

590: a.enabled = 'Y'
591: ORDER BY a.user_name;
592: CURSOR c_clients_ny IS
593: SELECT DISTINCT a.user_name user_name
594: FROM asg_user a, asg_users_inqinfo b
595: WHERE a.user_name = b.device_user_name AND
596: b.deferred <> 'N' and b.processed <> 'Y'
597: ORDER BY a.user_name;
598: BEGIN

Line 645: FROM asg_users_inqinfo a

641: IS
642: counter PLS_INTEGER;
643: CURSOR c_all_tran (p_user_name VARCHAR2) IS
644: SELECT tranid
645: FROM asg_users_inqinfo a
646: WHERE a.device_user_name = p_user_name
647: ORDER BY tranid;
648: BEGIN
649: IF ((p_user_name = FND_API.G_MISS_CHAR) OR (p_user_name IS NULL))THEN

Line 912: FROM asg_users_inqinfo a

908: x_return_status OUT NOCOPY VARCHAR2)
909: IS
910: CURSOR c_first_tran (p_user_name VARCHAR2) IS
911: SELECT min(tranid) tran_id
912: FROM asg_users_inqinfo a
913: WHERE a.device_user_name = p_user_name AND
914: a.deferred='N'
915: AND a.tranid <=
916: (SELECT nvl(hwm_tranid,1000000000000)

Line 917: FROM asg_user

913: WHERE a.device_user_name = p_user_name AND
914: a.deferred='N'
915: AND a.tranid <=
916: (SELECT nvl(hwm_tranid,1000000000000)
917: FROM asg_user
918: WHERE user_name=p_user_name);
919: l_compacted_tranid NUMBER;
920: BEGIN
921: IF ((p_user_name = FND_API.G_MISS_CHAR) OR (p_user_name IS NULL))THEN

Line 954: FROM asg_users_inqinfo a

950: x_return_status OUT NOCOPY VARCHAR2)
951: IS
952: CURSOR c_next_tran (p_user_name VARCHAR2, p_tranid VARCHAR2) IS
953: SELECT min(tranid) tran_id
954: FROM asg_users_inqinfo a
955: WHERE tranid > p_tranid AND
956: a.device_user_name = p_user_name AND
957: a.deferred='N'
958: AND a.tranid <=

Line 960: FROM asg_user

956: a.device_user_name = p_user_name AND
957: a.deferred='N'
958: AND a.tranid <=
959: (SELECT nvl(hwm_tranid,1000000000000)
960: FROM asg_user
961: WHERE user_name=p_user_name);
962: l_compacted_tranid NUMBER;
963: BEGIN
964: IF ((p_user_name = FND_API.G_MISS_CHAR) OR (p_user_name IS NULL)) OR

Line 1088: -- Process asg_users_inqinfo/asg_users_inqarchive

1084: -- Process c$inq first
1085: log('process_auto_sync: Processing c$inq');
1086: compact_cinq(p_user_name, p_tranid, l_end_tranid, l_compact_tranid);
1087:
1088: -- Process asg_users_inqinfo/asg_users_inqarchive
1089: log('process_auto_sync: Processing asg inq info tables');
1090: compact_asginq(p_user_name, p_tranid, l_end_tranid, l_compact_tranid);
1091:
1092: -- Process inq tables

Line 1237: FROM asg_user

1233: l_deferred_trans BOOLEAN := FALSE;
1234: l_resource_id NUMBER;
1235: CURSOR c_resource_id (p_user_name VARCHAR2) IS
1236: SELECT resource_id
1237: FROM asg_user
1238: WHERE user_name = p_user_name;
1239: BEGIN
1240: IF ((p_user_name = FND_API.G_MISS_CHAR) OR (p_user_name IS NULL)) OR
1241: ((p_tranid = FND_API.G_MISS_NUM) OR (p_tranid IS NULL)) OR

Line 1261: ' not found in asg_user table',g_err_level);

1257: FETCH c_resource_id INTO l_resource_id;
1258: IF c_resource_id%NOTFOUND THEN
1259: CLOSE c_resource_id;
1260: log('purge_pubitems: User: ' || p_user_name ||
1261: ' not found in asg_user table',g_err_level);
1262: x_return_status := FND_API.G_RET_STS_ERROR;
1263: return;
1264: END IF;
1265: CLOSE c_resource_id;

Line 1333: UPDATE asg_users_inqinfo

1329:
1330: END LOOP;
1331:
1332: IF (l_deferred_trans = TRUE) THEN
1333: UPDATE asg_users_inqinfo
1334: SET deferred = 'Y', processed = 'I',
1335: last_update_date = SYSDATE, last_updated_by = 1
1336: WHERE device_user_name = p_user_name AND
1337: tranid = p_tranid;

Line 1393: UPDATE asg_users_inqinfo

1389: purge_pubitems(p_user_name, p_tranid, l_pubitems_tbl, x_return_status);
1390: END IF;
1391:
1392: -- If no deferred rows, set processed = 'Y'
1393: UPDATE asg_users_inqinfo
1394: SET processed = 'Y', last_update_date=SYSDATE, last_updated_by=1
1395: WHERE device_user_name = p_user_name AND
1396: tranid = p_tranid AND
1397: tranid not IN

Line 1416: FROM asg_users_inqinfo

1412: curr_tranid NUMBER;
1413: l_tranid_tbl num_tbl_type;
1414: cursor c_tranids (p_user_name VARCHAR2, p_max_tranid NUMBER) IS
1415: SELECT tranid
1416: FROM asg_users_inqinfo
1417: WHERE device_user_name = p_user_name AND
1418: tranid <= p_max_tranid;
1419: BEGIN
1420: IF ((p_user_name = FND_API.G_MISS_CHAR) OR (p_user_name IS NULL)) THEN

Line 1457: -- Check if the c$inq and asg_users_inqinfo are in sync.

1453: BEGIN
1454: x_return_status := FND_API.G_RET_STS_SUCCESS;
1455: x_begin_client_apply := FND_API.G_TRUE;
1456:
1457: -- Check if the c$inq and asg_users_inqinfo are in sync.
1458: get_sync_state(p_user_name, l_sync_tables);
1459: log('begin_client_apply: l_sync_tables: ' || l_sync_tables,g_stmt_level);
1460:
1461: IF l_sync_tables = 1 THEN

Line 1462: -- Get all the tranids in c$inq that are not in asg_users_inqinfo

1458: get_sync_state(p_user_name, l_sync_tables);
1459: log('begin_client_apply: l_sync_tables: ' || l_sync_tables,g_stmt_level);
1460:
1461: IF l_sync_tables = 1 THEN
1462: -- Get all the tranids in c$inq that are not in asg_users_inqinfo
1463: get_new_tranids(p_user_name, l_tranids_tbl);
1464:
1465: FOR curr_index in 1..l_tranids_tbl.count LOOP
1466: curr_tranid := l_tranids_tbl(curr_index);

Line 1484: CURSOR c_archive_asg_users(p_user_name VARCHAR2) IS

1480: curr_tranid NUMBER;
1481: curr_tran_processed VARCHAR2(1);
1482: curr_tran_deferred VARCHAR2(1);
1483: curr_tran_archive VARCHAR2(1);
1484: CURSOR c_archive_asg_users(p_user_name VARCHAR2) IS
1485: SELECT tranid, processed, deferred, archive
1486: FROM asg_users_inqinfo
1487: WHERE device_user_name = p_user_name;
1488: BEGIN

Line 1486: FROM asg_users_inqinfo

1482: curr_tran_deferred VARCHAR2(1);
1483: curr_tran_archive VARCHAR2(1);
1484: CURSOR c_archive_asg_users(p_user_name VARCHAR2) IS
1485: SELECT tranid, processed, deferred, archive
1486: FROM asg_users_inqinfo
1487: WHERE device_user_name = p_user_name;
1488: BEGIN
1489:
1490: IF ((p_user_name = FND_API.G_MISS_CHAR) OR (p_user_name IS NULL)) THEN

Line 1497: FOR caau in c_archive_asg_users(p_user_name) LOOP

1493: END IF;
1494:
1495: x_return_status := FND_API.G_RET_STS_SUCCESS;
1496: purge_pubitems(p_user_name, x_return_status);
1497: FOR caau in c_archive_asg_users(p_user_name) LOOP
1498: curr_tranid := caau.tranid;
1499: curr_tran_processed := caau.processed;
1500: curr_tran_deferred := caau.deferred;
1501: curr_tran_archive := caau.archive;

Line 1503: UPDATE asg_users_inqarchive

1499: curr_tran_processed := caau.processed;
1500: curr_tran_deferred := caau.deferred;
1501: curr_tran_archive := caau.archive;
1502: IF (curr_tran_processed = 'Y') AND (curr_tran_archive = 'Y') THEN
1503: UPDATE asg_users_inqarchive
1504: SET processed = 'Y', deferred = curr_tran_deferred,
1505: last_update_date = SYSDATE, last_updated_by = 1
1506: WHERE device_user_name = p_user_name AND
1507: tranid = curr_tranid;

Line 1511: DELETE FROM asg_users_inqinfo

1507: tranid = curr_tranid;
1508: END IF;
1509: END LOOP;
1510:
1511: DELETE FROM asg_users_inqinfo
1512: WHERE device_user_name = p_user_name AND processed = 'Y';
1513: COMMIT;
1514:
1515: END end_client_apply;

Line 1625: FROM asg_user

1621: x_return_status := FND_API.G_RET_STS_SUCCESS;
1622: counter := 1;
1623:
1624: SELECT client_number INTO l_client_num
1625: FROM asg_user
1626: WHERE user_name = p_user_name;
1627:
1628: l_select_seq_sqlstring :=
1629: 'SELECT a.name name, a.curr_val curr_val '||

Line 1724: FROM asg_user

1720: l_pubitems_1 VARCHAR2(4000);
1721: l_pubitems_2 VARCHAR2(4000);
1722: CURSOR c_resource_id (p_user_name VARCHAR2) IS
1723: SELECT resource_id
1724: FROM asg_user
1725: WHERE user_name = p_user_name;
1726: BEGIN
1727: x_return_status := FND_API.G_RET_STS_SUCCESS;
1728: curr_tranid := p_tranid;

Line 1757: || p_user_name || ' in asg_user table',g_err_level);

1753: FETCH c_resource_id into l_resource_id;
1754: CLOSE c_resource_id;
1755: IF l_resource_id IS NULL THEN
1756: log('setup_inq_info: Did not find the user: '
1757: || p_user_name || ' in asg_user table',g_err_level);
1758: x_return_status := FND_API.G_RET_STS_ERROR;
1759: return;
1760: END IF;
1761:

Line 1762: INSERT INTO asg_users_inqinfo (device_user_name,

1758: x_return_status := FND_API.G_RET_STS_ERROR;
1759: return;
1760: END IF;
1761:
1762: INSERT INTO asg_users_inqinfo (device_user_name,
1763: resource_id,
1764: tranid,
1765: sync_date,
1766: processed,

Line 1840: -- Replace with call to table-handler for asg_users_inqarchive

1836: counter2 := counter2 +1;
1837: END IF;
1838: END LOOP;
1839:
1840: -- Replace with call to table-handler for asg_users_inqarchive
1841: INSERT INTO asg_users_inqarchive (device_user_name,
1842: resource_id,
1843: tranid,
1844: sync_date,

Line 1841: INSERT INTO asg_users_inqarchive (device_user_name,

1837: END IF;
1838: END LOOP;
1839:
1840: -- Replace with call to table-handler for asg_users_inqarchive
1841: INSERT INTO asg_users_inqarchive (device_user_name,
1842: resource_id,
1843: tranid,
1844: sync_date,
1845: processed,

Line 1925: UPDATE asg_users_inqinfo

1921: log('process_user: Unknown exception. No inq records found for user: '
1922: || p_user_name || ' for tranid: ' || p_tranid, FND_LOG.LEVEL_ERROR);
1923: log('process_user: Possible cause: Olite was reinstalled while ' ||
1924: 'there were unprocessed inq transactions',g_stmt_level);
1925: UPDATE asg_users_inqinfo
1926: SET processed = 'U', deferred = 'Y'
1927: WHERE device_user_name = p_user_name AND
1928: tranid = p_tranid;
1929: return ;

Line 1975: FROM asg_user

1971:
1972: -- For current user and current publication get the
1973: -- responsibility ID and application ID.
1974: SELECT USER_ID into l_userid
1975: FROM asg_user
1976: WHERE user_name = p_user_name;
1977:
1978: SELECT pr.responsibility_id, pr.app_id
1979: INTO l_respid, l_appid

Line 1980: FROM asg_user_pub_resps pr

1976: WHERE user_name = p_user_name;
1977:
1978: SELECT pr.responsibility_id, pr.app_id
1979: INTO l_respid, l_appid
1980: FROM asg_user_pub_resps pr
1981: WHERE pr.user_name = upper(p_user_name) AND
1982: pr.pub_name = upper(curr_pub) AND
1983: ROWNUM =1;
1984: