DBA Data[Home] [Help]

APPS.ASG_APPLY dependencies on ASG_USER

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

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

Line 193: ' FROM asg_users_inqinfo ' ||

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

Line 267: DELETE FROM asg_users_inqinfo

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

Line 273: -- Update asg_users_inqarchive also

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

Line 332: UPDATE asg_users_inqarchive

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

Line 338: DELETE FROM asg_users_inqarchive

334: WHERE device_user_name = p_user_name AND
335: tranid = p_compact_tranid;
336:
337: -- Remove all records except compact tranID
338: DELETE FROM asg_users_inqarchive
339: WHERE device_user_name = p_user_name AND
340: tranid >= p_start_tranid AND
341: tranid <= p_end_tranid AND
342: tranid <> p_compact_tranid;

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

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

Line 538: /* to asg_users_inqinfo table */

534:
535: END compact_inqtables;
536:
537: /* Procedure to retrieve transactions that are not yet added */
538: /* to asg_users_inqinfo table */
539: PROCEDURE get_new_tranids(p_user_name IN VARCHAR2,
540: l_tranids_tbl OUT NOCOPY num_tbl_type)
541: IS
542: counter PLS_INTEGER;

Line 554: ' FROM asg_users_inqinfo ' ||

550: 'FROM ' || asg_base.G_OLITE_SCHEMA || '.c$inq ' ||
551: 'WHERE clid$$cs = :user_name AND '||
552: 'tranid$$ NOT IN ' ||
553: '(SELECT tranid ' ||
554: ' FROM asg_users_inqinfo ' ||
555: ' WHERE device_user_name = :user_name)';
556: l_cursor_id := DBMS_SQL.OPEN_CURSOR;
557: DBMS_SQL.PARSE (l_cursor_id, l_select_tranid_sqlstring, DBMS_SQL.v7);
558: DBMS_SQL.BIND_VARIABLE (l_cursor_id, ':user_name', p_user_name );

Line 585: FROM asg_user a, asg_users_inqinfo b

581: IS
582: counter PLS_INTEGER;
583: CURSOR c_clients_yy IS
584: SELECT DISTINCT a.user_name user_name
585: FROM asg_user a, asg_users_inqinfo b
586: WHERE a.user_name = b.device_user_name AND
587: b.processed in ('I', 'N') AND
588: a.enabled = 'Y'
589: ORDER BY a.user_name;

Line 592: FROM asg_user a, asg_users_inqinfo b

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

Line 599: FROM asg_user a, asg_users_inqinfo b

595: a.enabled = 'Y'
596: ORDER BY a.user_name;
597: CURSOR c_clients_ny IS
598: SELECT DISTINCT a.user_name user_name
599: FROM asg_user a, asg_users_inqinfo b
600: WHERE a.user_name = b.device_user_name AND
601: b.deferred <> 'N' and b.processed <> 'Y'
602: ORDER BY a.user_name;
603: BEGIN

Line 650: FROM asg_users_inqinfo a

646: IS
647: counter PLS_INTEGER;
648: CURSOR c_all_tran (p_user_name VARCHAR2) IS
649: SELECT tranid
650: FROM asg_users_inqinfo a
651: WHERE a.device_user_name = p_user_name
652: ORDER BY tranid;
653: BEGIN
654: IF ((p_user_name = FND_API.G_MISS_CHAR) OR (p_user_name IS NULL))THEN

Line 918: FROM asg_users_inqinfo a

914: x_return_status OUT NOCOPY VARCHAR2)
915: IS
916: CURSOR c_first_tran (p_user_name VARCHAR2) IS
917: SELECT min(tranid) tran_id
918: FROM asg_users_inqinfo a
919: WHERE a.device_user_name = p_user_name AND
920: a.deferred='N'
921: AND a.tranid <=
922: (SELECT nvl(hwm_tranid,1000000000000)

Line 923: FROM asg_user

919: WHERE a.device_user_name = p_user_name AND
920: a.deferred='N'
921: AND a.tranid <=
922: (SELECT nvl(hwm_tranid,1000000000000)
923: FROM asg_user
924: WHERE user_name=p_user_name);
925: l_compacted_tranid NUMBER;
926: BEGIN
927: IF ((p_user_name = FND_API.G_MISS_CHAR) OR (p_user_name IS NULL))THEN

Line 960: FROM asg_users_inqinfo a

956: x_return_status OUT NOCOPY VARCHAR2)
957: IS
958: CURSOR c_next_tran (p_user_name VARCHAR2, p_tranid VARCHAR2) IS
959: SELECT min(tranid) tran_id
960: FROM asg_users_inqinfo a
961: WHERE tranid > p_tranid AND
962: a.device_user_name = p_user_name AND
963: a.deferred='N'
964: AND a.tranid <=

Line 966: FROM asg_user

962: a.device_user_name = p_user_name AND
963: a.deferred='N'
964: AND a.tranid <=
965: (SELECT nvl(hwm_tranid,1000000000000)
966: FROM asg_user
967: WHERE user_name=p_user_name);
968: l_compacted_tranid NUMBER;
969: BEGIN
970: IF ((p_user_name = FND_API.G_MISS_CHAR) OR (p_user_name IS NULL)) OR

Line 1094: -- Process asg_users_inqinfo/asg_users_inqarchive

1090: -- Process c$inq first
1091: log('process_auto_sync: Processing c$inq');
1092: compact_cinq(p_user_name, p_tranid, l_end_tranid, l_compact_tranid);
1093:
1094: -- Process asg_users_inqinfo/asg_users_inqarchive
1095: log('process_auto_sync: Processing asg inq info tables');
1096: compact_asginq(p_user_name, p_tranid, l_end_tranid, l_compact_tranid);
1097:
1098: -- Process inq tables

Line 1249: FROM asg_user

1245: l_deferred_trans BOOLEAN := FALSE;
1246: l_resource_id NUMBER;
1247: CURSOR c_resource_id (p_user_name VARCHAR2) IS
1248: SELECT resource_id
1249: FROM asg_user
1250: WHERE user_name = p_user_name;
1251: BEGIN
1252: IF ((p_user_name = FND_API.G_MISS_CHAR) OR (p_user_name IS NULL)) OR
1253: ((p_tranid = FND_API.G_MISS_NUM) OR (p_tranid IS NULL)) OR

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

1269: FETCH c_resource_id INTO l_resource_id;
1270: IF c_resource_id%NOTFOUND THEN
1271: CLOSE c_resource_id;
1272: log('purge_pubitems: User: ' || p_user_name ||
1273: ' not found in asg_user table',g_err_level);
1274: x_return_status := FND_API.G_RET_STS_ERROR;
1275: return;
1276: END IF;
1277: CLOSE c_resource_id;

Line 1345: UPDATE asg_users_inqinfo

1341:
1342: END LOOP;
1343:
1344: IF (l_deferred_trans = TRUE) THEN
1345: UPDATE asg_users_inqinfo
1346: SET deferred = 'Y', processed = 'I',
1347: last_update_date = SYSDATE, last_updated_by = 1
1348: WHERE device_user_name = p_user_name AND
1349: tranid = p_tranid;

Line 1406: UPDATE asg_users_inqinfo

1402: purge_pubitems(p_user_name, p_tranid, l_pubitems_tbl, x_return_status);
1403: END IF;
1404:
1405: -- If no deferred rows, set processed = 'Y'
1406: UPDATE asg_users_inqinfo
1407: SET processed = 'Y', last_update_date=SYSDATE, last_updated_by=1
1408: WHERE device_user_name = p_user_name AND
1409: tranid = p_tranid AND
1410: tranid not IN

Line 1429: FROM asg_users_inqinfo

1425: curr_tranid NUMBER;
1426: l_tranid_tbl num_tbl_type;
1427: cursor c_tranids (p_user_name VARCHAR2, p_max_tranid NUMBER) IS
1428: SELECT tranid
1429: FROM asg_users_inqinfo
1430: WHERE device_user_name = p_user_name AND
1431: tranid <= p_max_tranid;
1432: BEGIN
1433: IF ((p_user_name = FND_API.G_MISS_CHAR) OR (p_user_name IS NULL)) THEN

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

1466: BEGIN
1467: x_return_status := FND_API.G_RET_STS_SUCCESS;
1468: x_begin_client_apply := FND_API.G_TRUE;
1469:
1470: -- Check if the c$inq and asg_users_inqinfo are in sync.
1471: get_sync_state(p_user_name, l_sync_tables);
1472: log('begin_client_apply: l_sync_tables: ' || l_sync_tables,g_stmt_level);
1473:
1474: IF l_sync_tables = 1 THEN

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

1471: get_sync_state(p_user_name, l_sync_tables);
1472: log('begin_client_apply: l_sync_tables: ' || l_sync_tables,g_stmt_level);
1473:
1474: IF l_sync_tables = 1 THEN
1475: -- Get all the tranids in c$inq that are not in asg_users_inqinfo
1476: get_new_tranids(p_user_name, l_tranids_tbl);
1477:
1478: FOR curr_index in 1..l_tranids_tbl.count LOOP
1479: curr_tranid := l_tranids_tbl(curr_index);

Line 1497: CURSOR c_archive_asg_users(p_user_name VARCHAR2) IS

1493: curr_tranid NUMBER;
1494: curr_tran_processed VARCHAR2(1);
1495: curr_tran_deferred VARCHAR2(1);
1496: curr_tran_archive VARCHAR2(1);
1497: CURSOR c_archive_asg_users(p_user_name VARCHAR2) IS
1498: SELECT tranid, processed, deferred, archive
1499: FROM asg_users_inqinfo
1500: WHERE device_user_name = p_user_name;
1501: BEGIN

Line 1499: FROM asg_users_inqinfo

1495: curr_tran_deferred VARCHAR2(1);
1496: curr_tran_archive VARCHAR2(1);
1497: CURSOR c_archive_asg_users(p_user_name VARCHAR2) IS
1498: SELECT tranid, processed, deferred, archive
1499: FROM asg_users_inqinfo
1500: WHERE device_user_name = p_user_name;
1501: BEGIN
1502:
1503: IF ((p_user_name = FND_API.G_MISS_CHAR) OR (p_user_name IS NULL)) THEN

Line 1510: FOR caau in c_archive_asg_users(p_user_name) LOOP

1506: END IF;
1507:
1508: x_return_status := FND_API.G_RET_STS_SUCCESS;
1509: purge_pubitems(p_user_name, x_return_status);
1510: FOR caau in c_archive_asg_users(p_user_name) LOOP
1511: curr_tranid := caau.tranid;
1512: curr_tran_processed := caau.processed;
1513: curr_tran_deferred := caau.deferred;
1514: curr_tran_archive := caau.archive;

Line 1516: UPDATE asg_users_inqarchive

1512: curr_tran_processed := caau.processed;
1513: curr_tran_deferred := caau.deferred;
1514: curr_tran_archive := caau.archive;
1515: IF (curr_tran_processed = 'Y') AND (curr_tran_archive = 'Y') THEN
1516: UPDATE asg_users_inqarchive
1517: SET processed = 'Y', deferred = curr_tran_deferred,
1518: last_update_date = SYSDATE, last_updated_by = 1
1519: WHERE device_user_name = p_user_name AND
1520: tranid = curr_tranid;

Line 1524: DELETE FROM asg_users_inqinfo

1520: tranid = curr_tranid;
1521: END IF;
1522: END LOOP;
1523:
1524: DELETE FROM asg_users_inqinfo
1525: WHERE device_user_name = p_user_name AND processed = 'Y';
1526: COMMIT;
1527:
1528: END end_client_apply;

Line 1700: FROM asg_user

1696:
1697: counter := 1;
1698:
1699: SELECT client_number INTO l_client_num
1700: FROM asg_user
1701: WHERE user_name = p_user_name;
1702:
1703: l_select_seq_sqlstring :=
1704: 'SELECT a.name name, a.curr_val curr_val '||

Line 1807: FROM asg_user

1803: x_return_status := FND_API.G_RET_STS_SUCCESS;
1804: counter := 1;
1805:
1806: SELECT client_number INTO l_client_num
1807: FROM asg_user
1808: WHERE user_name = p_user_name;
1809:
1810: l_select_seq_sqlstring :=
1811: 'SELECT a.name name, a.curr_val curr_val '||

Line 1907: FROM asg_user

1903: l_pubitems_1 VARCHAR2(4000);
1904: l_pubitems_2 VARCHAR2(4000);
1905: CURSOR c_resource_id (p_user_name VARCHAR2) IS
1906: SELECT resource_id
1907: FROM asg_user
1908: WHERE user_name = p_user_name;
1909: BEGIN
1910: x_return_status := FND_API.G_RET_STS_SUCCESS;
1911: curr_tranid := p_tranid;

Line 1930: 'AND NOT EXISTS (SELECT 1 FROM asg_users_inqinfo ' ||

1926: 'FROM ' || asg_base.G_OLITE_SCHEMA || '.c$inq ci ' ||
1927: 'WHERE clid$$cs = :1 AND ' ||
1928: ' tranid$$ = :2 AND ' ||
1929: ' store in (select item_id from asg_pub_item) ' ||
1930: 'AND NOT EXISTS (SELECT 1 FROM asg_users_inqinfo ' ||
1931: ' WHERE device_user_name = ci.clid$$cs AND TRANID =ci.tranid$$) ' ;
1932: EXECUTE IMMEDIATE l_select_inqcnt_sqlstring
1933: INTO l_inq_count
1934: USING p_user_name, p_tranid;

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

1939: FETCH c_resource_id into l_resource_id;
1940: CLOSE c_resource_id;
1941: IF l_resource_id IS NULL THEN
1942: log('setup_inq_info: Did not find the user: '
1943: || p_user_name || ' in asg_user table',g_err_level);
1944: x_return_status := FND_API.G_RET_STS_ERROR;
1945: return;
1946: END IF;
1947:

Line 1948: INSERT INTO asg_users_inqinfo (device_user_name,

1944: x_return_status := FND_API.G_RET_STS_ERROR;
1945: return;
1946: END IF;
1947:
1948: INSERT INTO asg_users_inqinfo (device_user_name,
1949: resource_id,
1950: tranid,
1951: sync_date,
1952: processed,

Line 1984: ' AND NOT EXISTS (SELECT 1 FROM asg_users_inqarchive ' ||

1980: 'FROM ' || asg_base.G_OLITE_SCHEMA || '.c$inq ci '||
1981: 'WHERE clid$$cs = :1 AND ' ||
1982: ' tranid$$ = :2 AND ' ||
1983: ' store in (select item_id from asg_pub_item) '||
1984: ' AND NOT EXISTS (SELECT 1 FROM asg_users_inqarchive ' ||
1985: ' WHERE device_user_name = ci.clid$$cs AND TRANID =ci.tranid$$) '||
1986: ' ORDER BY store';
1987:
1988: l_cursor_id1 := DBMS_SQL.OPEN_CURSOR;

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

2025: counter2 := counter2 +1;
2026: END IF;
2027: END LOOP;
2028:
2029: -- Replace with call to table-handler for asg_users_inqarchive
2030: INSERT INTO asg_users_inqarchive (device_user_name,
2031: resource_id,
2032: tranid,
2033: sync_date,

Line 2030: INSERT INTO asg_users_inqarchive (device_user_name,

2026: END IF;
2027: END LOOP;
2028:
2029: -- Replace with call to table-handler for asg_users_inqarchive
2030: INSERT INTO asg_users_inqarchive (device_user_name,
2031: resource_id,
2032: tranid,
2033: sync_date,
2034: processed,

Line 2114: UPDATE asg_users_inqinfo

2110: log('process_user: Unknown exception. No inq records found for user: '
2111: || p_user_name || ' for tranid: ' || p_tranid, FND_LOG.LEVEL_ERROR);
2112: log('process_user: Possible cause: Olite was reinstalled while ' ||
2113: 'there were unprocessed inq transactions',g_stmt_level);
2114: UPDATE asg_users_inqinfo
2115: SET processed = 'U', deferred = 'Y'
2116: WHERE device_user_name = p_user_name AND
2117: tranid = p_tranid;
2118: return ;

Line 2164: FROM asg_user

2160:
2161: -- For current user and current publication get the
2162: -- responsibility ID and application ID.
2163: SELECT USER_ID into l_userid
2164: FROM asg_user
2165: WHERE user_name = p_user_name;
2166:
2167: SELECT pr.responsibility_id, pr.app_id
2168: INTO l_respid, l_appid

Line 2169: FROM asg_user_pub_resps pr

2165: WHERE user_name = p_user_name;
2166:
2167: SELECT pr.responsibility_id, pr.app_id
2168: INTO l_respid, l_appid
2169: FROM asg_user_pub_resps pr
2170: WHERE pr.user_name = upper(p_user_name) AND
2171: pr.pub_name = upper(curr_pub) AND
2172: ROWNUM =1;
2173: