DBA Data[Home] [Help]

APPS.ASG_CONS_QPKG dependencies on ASG_BASE

Line 59: PROCEDURE get_pubitem_list(p_pubitem_tbl IN OUT NOCOPY asg_base.pub_item_tbl_type)

55: g_auto_synch CHAR := 'N';
56: g_last_synch_successful VARCHAR2(1) := FND_API.G_TRUE;
57: g_device_type VARCHAR2(30):= NULL;
58:
59: PROCEDURE get_pubitem_list(p_pubitem_tbl IN OUT NOCOPY asg_base.pub_item_tbl_type)
60: IS
61: counter PLS_INTEGER;
62: l_cursor_id NUMBER;
63: l_cursor_ret NUMBER;

Line 69: p_pubitem_tbl:=asg_base.g_empty_pub_item_tbl;

65: l_pubitem_name VARCHAR2(30);
66: l_comp_ref VARCHAR2(1);
67: BEGIN
68: --set the pub item table to empty
69: p_pubitem_tbl:=asg_base.g_empty_pub_item_tbl;
70: l_select_pi_sqlstring :=
71: 'SELECT name, comp_ref ' ||
72: 'FROM ' || asg_base.G_OLITE_SCHEMA ||'.' ||'c$pub_list_q';
73:

Line 72: 'FROM ' || asg_base.G_OLITE_SCHEMA ||'.' ||'c$pub_list_q';

68: --set the pub item table to empty
69: p_pubitem_tbl:=asg_base.g_empty_pub_item_tbl;
70: l_select_pi_sqlstring :=
71: 'SELECT name, comp_ref ' ||
72: 'FROM ' || asg_base.G_OLITE_SCHEMA ||'.' ||'c$pub_list_q';
73:
74: l_cursor_id := DBMS_SQL.OPEN_CURSOR;
75: DBMS_SQL.PARSE (l_cursor_id, l_select_pi_sqlstring, DBMS_SQL.v7);
76: DBMS_SQL.DEFINE_COLUMN (l_cursor_id, 1, l_pubitem_name, 30);

Line 199: asg_base.set_upload_tranid(p_tranid);

195: IF asg_helper.is_user_synch_enabled(p_clientid,l_disabled_synch_message)
196: = FND_API.G_FALSE THEN
197: raise synch_disabled;
198: END IF;
199: asg_base.set_upload_tranid(p_tranid);
200: --set hwm_tranid to tranid-1 and make synch_errors null
201: -- Moved to download_init Because we shouldn't process uploads when it is in auto sync
202: -- asg_helper.set_synch_errmsg(p_clientid,(p_tranid-1),null,null);
203:

Line 214: IF (asg_base.is_auto_sync() = 'N')

210: insert_auto_sync_tranids(p_clientid, p_tranid);
211: COMMIT;
212:
213: -- Synchronous Upload logic
214: IF (asg_base.is_auto_sync() = 'N')
215: AND (fnd_profile.value_specific('ASG_SYNCHRONOUS_UPLOAD',asg_base.get_user_id(p_clientid))='Y') THEN
216:
217: l_sync_id:=set_sync_id(p_clientid, p_tranid);
218: UPDATE asg_user SET hwm_tranid = nvl(l_sync_id,hwm_tranid) WHERE user_name = p_clientid;

Line 215: AND (fnd_profile.value_specific('ASG_SYNCHRONOUS_UPLOAD',asg_base.get_user_id(p_clientid))='Y') THEN

211: COMMIT;
212:
213: -- Synchronous Upload logic
214: IF (asg_base.is_auto_sync() = 'N')
215: AND (fnd_profile.value_specific('ASG_SYNCHRONOUS_UPLOAD',asg_base.get_user_id(p_clientid))='Y') THEN
216:
217: l_sync_id:=set_sync_id(p_clientid, p_tranid);
218: UPDATE asg_user SET hwm_tranid = nvl(l_sync_id,hwm_tranid) WHERE user_name = p_clientid;
219: asg_apply.synchronous_process_upload(p_clientid);

Line 271: l_pub_item_tbl asg_base.pub_item_tbl_type;

267: l_disabled_synch_message VARCHAR2(2000);
268: l_sqlerror_message VARCHAR2(512);
269: synch_disabled EXCEPTION;
270: password_expired EXCEPTION;
271: l_pub_item_tbl asg_base.pub_item_tbl_type;
272: l_bool_ret BOOLEAN;
273: l_ret_msg varchar2(512);
274: l_pwd_expired VARCHAR2(1);
275: l_is_auto_sync VARCHAR2(1);

Line 287: l_upload_tranid := asg_base.get_upload_tranid();

283: ' current tranid: ' || p_curr_tranid,
284: 'asg_cons_qpkg',g_stmt_level);
285: END IF;
286: BEGIN
287: l_upload_tranid := asg_base.get_upload_tranid();
288:
289: -- Set Sync Id only if sync is NORMAL
290: -- or not a download only sync
291: l_is_auto_sync := asg_base.is_auto_sync();

Line 291: l_is_auto_sync := asg_base.is_auto_sync();

287: l_upload_tranid := asg_base.get_upload_tranid();
288:
289: -- Set Sync Id only if sync is NORMAL
290: -- or not a download only sync
291: l_is_auto_sync := asg_base.is_auto_sync();
292: l_is_download_only_sync := asg_base.is_download_only_sync(p_clientid, p_curr_tranid);
293:
294: asg_helper.log('Auto Sync: ' || l_is_auto_sync || ' and Download only sync: ' || l_is_download_only_sync
295: ,'asg_cons_qpkg',g_stmt_level);

Line 292: l_is_download_only_sync := asg_base.is_download_only_sync(p_clientid, p_curr_tranid);

288:
289: -- Set Sync Id only if sync is NORMAL
290: -- or not a download only sync
291: l_is_auto_sync := asg_base.is_auto_sync();
292: l_is_download_only_sync := asg_base.is_download_only_sync(p_clientid, p_curr_tranid);
293:
294: asg_helper.log('Auto Sync: ' || l_is_auto_sync || ' and Download only sync: ' || l_is_download_only_sync
295: ,'asg_cons_qpkg',g_stmt_level);
296:

Line 319: g_auto_synch := asg_base.is_auto_sync();

315: END IF;
316: -- Initialize all the session information except the list of pubitems
317: -- to be downloaded
318: g_first_synch := asg_download.isFirstSync();
319: g_auto_synch := asg_base.is_auto_sync();
320: l_last_synch_date := find_last_synch_date(p_clientid,
321: p_last_tranid);
322: g_device_type := find_device_type(p_clientid);
323: asg_base.init(p_clientid, p_last_tranid, p_curr_tranid,

Line 323: asg_base.init(p_clientid, p_last_tranid, p_curr_tranid,

319: g_auto_synch := asg_base.is_auto_sync();
320: l_last_synch_date := find_last_synch_date(p_clientid,
321: p_last_tranid);
322: g_device_type := find_device_type(p_clientid);
323: asg_base.init(p_clientid, p_last_tranid, p_curr_tranid,
324: l_last_synch_date, asg_base.g_empty_pub_item_tbl);
325:
326: -- check out if this user needs complete
327: -- refresh since he's been a dormant user.

Line 324: l_last_synch_date, asg_base.g_empty_pub_item_tbl);

320: l_last_synch_date := find_last_synch_date(p_clientid,
321: p_last_tranid);
322: g_device_type := find_device_type(p_clientid);
323: asg_base.init(p_clientid, p_last_tranid, p_curr_tranid,
324: l_last_synch_date, asg_base.g_empty_pub_item_tbl);
325:
326: -- check out if this user needs complete
327: -- refresh since he's been a dormant user.
328: asg_helper.log('Checking if user: '

Line 433: asg_base.set_pub_items(l_pub_item_tbl);

429: -- The final pub items list should be in l_pub_item_tbl
430: get_pubitem_list(l_pub_item_tbl);
431:
432: -- Store the list of pubitems to be refreshed
433: asg_base.set_pub_items(l_pub_item_tbl);
434:
435: -- Write to log all the session information for this user
436: asg_base.print_all_globals();
437: asg_helper.log('download_init', 'asg_consq_pkg',g_err_level);

Line 436: asg_base.print_all_globals();

432: -- Store the list of pubitems to be refreshed
433: asg_base.set_pub_items(l_pub_item_tbl);
434:
435: -- Write to log all the session information for this user
436: asg_base.print_all_globals();
437: asg_helper.log('download_init', 'asg_consq_pkg',g_err_level);
438: END download_init;
439:
440: -- Notifies when all the client's data is sent

Line 469: l_last_tranid := asg_base.get_last_tranid();

465: 'asg_download.purgesdq ' || l_sqlerror_message);
466: END IF;
467:
468: -- Update the synctime end in asg_user table
469: l_last_tranid := asg_base.get_last_tranid();
470: IF ((l_last_tranid <= -1) OR
471: (g_first_synch = TRUE)) THEN
472: UPDATE asg_user
473: SET last_tranid = l_last_tranid,

Line 481: prior_synch_date_end = asg_base.get_last_synch_date(),

477: ELSE
478: IF(g_last_synch_successful = FND_API.G_TRUE) THEN
479: UPDATE asg_user
480: SET last_tranid = l_last_tranid,
481: prior_synch_date_end = asg_base.get_last_synch_date(),
482: last_synch_date_end = sysdate
483: WHERE user_name = p_clientid;
484: ELSE
485: UPDATE asg_user

Line 492: asg_base.reset_all_globals();

488: WHERE user_name = p_clientid;
489: END IF;
490: END IF;
491: -- Reset all session information
492: asg_base.reset_all_globals();
493:
494: IF(asg_helper.check_is_log_enabled(g_stmt_level))
495: THEN
496: asg_helper.log('Download complete DONE for client: ' || p_clientid,

Line 511: ' transaction-id: ' || asg_base.get_current_tranid ||

507: IF(asg_helper.check_is_log_enabled(g_err_level))
508: THEN
509: asg_helper.log('User Synch Error: ' ||p_clientid || ' ' ||
510: to_char(sysdate, 'yyyy-mm-dd') ||
511: ' transaction-id: ' || asg_base.get_current_tranid ||
512: ' Exception in purgesdq ' || l_sqlerror_message,
513: 'asg_cons_qpkg',g_err_level);
514: END IF;
515: -- Reset all session information

Line 516: asg_base.reset_all_globals();

512: ' Exception in purgesdq ' || l_sqlerror_message,
513: 'asg_cons_qpkg',g_err_level);
514: END IF;
515: -- Reset all session information
516: asg_base.reset_all_globals();
517: RAISE_APPLICATION_ERROR(-20996, 'Exception during download ' ||
518: l_sqlerror_message);
519: END ;
520: /**/

Line 533: ' transaction-id: ' || asg_base.get_current_tranid ||

529: IF(asg_helper.check_is_log_enabled(g_err_level))
530: THEN
531: asg_helper.log('User Synch Error: ' ||p_clientid || ' ' ||
532: to_char(sysdate, 'yyyy-mm-dd') ||
533: ' transaction-id: ' || asg_base.get_current_tranid ||
534: ' Exception in download_complete ' || l_sqlerror_message,
535: 'asg_cons_qpkg',g_err_level);
536: END IF;
537: -- Reset all session information

Line 538: asg_base.reset_all_globals();

534: ' Exception in download_complete ' || l_sqlerror_message,
535: 'asg_cons_qpkg',g_err_level);
536: END IF;
537: -- Reset all session information
538: asg_base.reset_all_globals();
539: RAISE_APPLICATION_ERROR(-20996, 'Exception during download ' ||
540: l_sqlerror_message);
541: END download_complete;
542:

Line 551: l_qry_string1:='select count(*) from '||asg_base.G_OLITE_SCHEMA

547: l_rec_count1 NUMBER;
548: l_rec_count2 NUMBER;
549: l_qry_string1 VARCHAR2(512);
550: BEGIN
551: l_qry_string1:='select count(*) from '||asg_base.G_OLITE_SCHEMA
552: ||'.c$pub_list_q';
553: EXECUTE IMMEDIATE l_qry_string1 into l_rec_count1;
554: l_qry_string1:='select count(*) from '||asg_base.G_OLITE_SCHEMA
555: ||'.c$pub_list_q where comp_ref=''Y''';

Line 554: l_qry_string1:='select count(*) from '||asg_base.G_OLITE_SCHEMA

550: BEGIN
551: l_qry_string1:='select count(*) from '||asg_base.G_OLITE_SCHEMA
552: ||'.c$pub_list_q';
553: EXECUTE IMMEDIATE l_qry_string1 into l_rec_count1;
554: l_qry_string1:='select count(*) from '||asg_base.G_OLITE_SCHEMA
555: ||'.c$pub_list_q where comp_ref=''Y''';
556: EXECUTE IMMEDIATE l_qry_string1 into l_rec_count2;
557: IF(l_rec_count1 = l_rec_count2) THEN
558: p_is_first_synch:='Y';

Line 567: PROCEDURE update_rec_count(p_pubitem_tbl IN asg_base.pub_item_tbl_type,

563:
564:
565: --PROCEDURE FOR PERFORMING BATCH UPDATES ON MOBILEADMIN.C$PUB_LIST_Q
566:
567: PROCEDURE update_rec_count(p_pubitem_tbl IN asg_base.pub_item_tbl_type,
568: p_clientid IN VARCHAR2)
569: IS
570: l_loopvar NUMBER;
571: l_qry_string VARCHAR2(1024);

Line 583: l_qry_string:='update '||asg_base.G_OLITE_SCHEMA||'.c$pub_list_q '||

579: LOOP
580: IF(p_pubitem_tbl(l_loopvar).rec_count is not null OR
581: p_pubitem_tbl(l_loopvar).name not like 'C$%')
582: THEN
583: l_qry_string:='update '||asg_base.G_OLITE_SCHEMA||'.c$pub_list_q '||
584: ' set rec_count= :1 ' ||
585: ' where name = :2';
586: EXECUTE IMMEDIATE l_qry_string
587: USING p_pubitem_tbl(l_loopvar).rec_count, p_pubitem_tbl(l_loopvar).name;

Line 599: PROCEDURE process_first_synch(p_pubitem_tbl IN asg_base.pub_item_tbl_type,

595:
596:
597: --PROCEDURE FOR POPULATING rec_count MOBILEADMIN.C$PUB_LIST_Q FOR FIRST TIME SYNCH
598:
599: PROCEDURE process_first_synch(p_pubitem_tbl IN asg_base.pub_item_tbl_type,
600: p_clientid IN VARCHAR2)
601: IS
602: l_curr_pubitem VARCHAR2(128);
603: l_loopvar NUMBER;

Line 610: l_pubitem_tbl asg_base.pub_item_tbl_type;

606: l_total NUMBER;
607: l_rec_count1 NUMBER;
608: l_qry_string1 VARCHAR2(1024);
609: l_qry_string2 VARCHAR2(1024);
610: l_pubitem_tbl asg_base.pub_item_tbl_type;
611:
612: BEGIN
613: l_total:=0;
614: l_pubitem_tbl := p_pubitem_tbl;

Line 620: asg_base.init(p_clientid,-1,0,null,p_pubitem_tbl);

616: THEN
617: asg_helper.log('Inside process_first_synch for :'||p_clientid,
618: 'asg_cons_qpkg',g_stmt_level);
619: END IF;
620: asg_base.init(p_clientid,-1,0,null,p_pubitem_tbl);
621:
622: FOR l_loopvar in 1..l_pubitem_tbl.count
623: LOOP
624: l_curr_pubitem:=l_pubitem_tbl(l_loopvar).name;

Line 669: l_user_name := asg_base.get_user_name;

665: IS
666: l_user_name VARCHAR2(100);
667: l_qry_string VARCHAR2(1024);
668: BEGIN
669: l_user_name := asg_base.get_user_name;
670: l_qry_string := 'update '||asg_base.G_OLITE_SCHEMA||'.c$pub_list_q '
671: ||'set comp_ref = ''Y'' '||' where name IN ('
672: ||'SELECT publication_item FROM asg_complete_refresh '
673: ||' WHERE synch_completed=''N'' AND user_name = :1 '

Line 670: l_qry_string := 'update '||asg_base.G_OLITE_SCHEMA||'.c$pub_list_q '

666: l_user_name VARCHAR2(100);
667: l_qry_string VARCHAR2(1024);
668: BEGIN
669: l_user_name := asg_base.get_user_name;
670: l_qry_string := 'update '||asg_base.G_OLITE_SCHEMA||'.c$pub_list_q '
671: ||'set comp_ref = ''Y'' '||' where name IN ('
672: ||'SELECT publication_item FROM asg_complete_refresh '
673: ||' WHERE synch_completed=''N'' AND user_name = :1 '
674: ||' AND publication_item IN '

Line 675: ||' ( SELECT name FROM '||asg_base.G_OLITE_SCHEMA

671: ||'set comp_ref = ''Y'' '||' where name IN ('
672: ||'SELECT publication_item FROM asg_complete_refresh '
673: ||' WHERE synch_completed=''N'' AND user_name = :1 '
674: ||' AND publication_item IN '
675: ||' ( SELECT name FROM '||asg_base.G_OLITE_SCHEMA
676: ||'.c$pub_list_q ))' ;
677: EXECUTE IMMEDIATE l_qry_string
678: USING l_user_name;
679: END set_complete_refresh;

Line 705: ' (SELECT name FROM '||asg_base.G_OLITE_SCHEMA||

701: ' synch_completed=''Y'',last_update_date=sysdate ' ||
702: ' WHERE user_name= :1 ' ||
703: ' AND ' ||
704: ' publication_item IN ' ||
705: ' (SELECT name FROM '||asg_base.G_OLITE_SCHEMA||
706: '.c$pub_list_q)';
707: EXECUTE IMMEDIATE l_qry_string
708: USING p_user_name;
709:

Line 732: '(SELECT name FROM '||asg_base.G_OLITE_SCHEMA||

728: l_qry_string:= ' DELETE FROM asg_complete_refresh '||
729: ' WHERE user_name = :1 ' ||
730: ' AND synch_completed = ''Y'' AND '||
731: ' publication_item IN ' ||
732: '(SELECT name FROM '||asg_base.G_OLITE_SCHEMA||
733: '.c$pub_list_q)';
734: EXECUTE IMMEDIATE l_qry_string
735: USING p_user_name;
736: END delete_row;

Line 763: ||'(SELECT name FROM '||asg_base.G_OLITE_SCHEMA

759: --so set all PI's of the current user to complete_synch
760: l_str:= 'UPDATE asg_complete_refresh SET synch_completed=''N'' , '
761: ||' last_update_date = sysdate WHERE user_name = :1 '
762: ||' AND publication_item in '
763: ||'(SELECT name FROM '||asg_base.G_OLITE_SCHEMA
764: ||'.c$pub_list_q)';
765: EXECUTE IMMEDIATE l_str
766: USING p_user_name;
767: END IF;

Line 781: l_user_id := asg_base.get_user_id(p_user_name);

777: l_user_id NUMBER;
778: BEGIN
779: -- If custom publication item download is disabled
780: -- then remove all custom entries from c$pub_list_q
781: l_user_id := asg_base.get_user_id(p_user_name);
782: l_customProfValue := fnd_profile.VALUE_SPECIFIC(
783: name => 'ASG_DISABLE_CUSTOM_SYNCH',
784: user_id => l_user_id,
785: responsibility_id => null,

Line 794: l_dml := 'DELETE FROM '||asg_base.G_OLITE_SCHEMA||'.c$pub_list_q ' ||

790: THEN
791: asg_helper.log('Disabling download of custom pub items ',
792: 'asg_cons_qpkg', g_stmt_level);
793: END IF;
794: l_dml := 'DELETE FROM '||asg_base.G_OLITE_SCHEMA||'.c$pub_list_q ' ||
795: ' WHERE name IN ' ||
796: ' (select a.name from asg_pub_item a,asg_pub b' ||
797: ' where a.pub_name=b.name and b.custom=''Y'')';
798: EXECUTE IMMEDIATE l_dml;

Line 810: l_pubitem_tbl asg_base.pub_item_tbl_type;

806: IS
807: l_upload_tranid NUMBER;
808: l_detect_conflict VARCHAR2(1);
809: l_pubitem VARCHAR2(30);
810: l_pubitem_tbl asg_base.pub_item_tbl_type;
811: l_counter NUMBER;
812: BEGIN
813:
814: l_upload_tranid := asg_base.get_upload_tranid();

Line 814: l_upload_tranid := asg_base.get_upload_tranid();

810: l_pubitem_tbl asg_base.pub_item_tbl_type;
811: l_counter NUMBER;
812: BEGIN
813:
814: l_upload_tranid := asg_base.get_upload_tranid();
815:
816: -- Check if conflict detection is needed other wise return
817: IF(asg_helper.check_is_log_enabled(g_stmt_level)) THEN
818: asg_helper.log('Checking if conflicts should be detected.',

Line 865: p_pubitem_tbl IN OUT NOCOPY asg_base.pub_item_tbl_type)

861: PROCEDURE is_conflict_detection_needed(
862: p_user_name IN VARCHAR2,
863: p_upload_tranid IN NUMBER,
864: p_detect_conflict IN OUT NOCOPY VARCHAR2,
865: p_pubitem_tbl IN OUT NOCOPY asg_base.pub_item_tbl_type)
866: IS
867: l_conf_pis_exist VARCHAR2(1);
868: l_query_string VARCHAR2(512);
869: l_query_string2 VARCHAR2(512);

Line 884: IF (l_conf_pis_exist = asg_base.G_NO) THEN

880:
881: p_detect_conflict := FND_API.G_FALSE;
882: l_conf_pis_exist := conflict_pub_items_exist(p_user_name,
883: p_upload_tranid);
884: IF (l_conf_pis_exist = asg_base.G_NO) THEN
885: return;
886: END IF;
887:
888: -- Ok, some pub items are uploaded which need conflict detection

Line 891: 'FROM ' || asg_base.G_OLITE_SCHEMA || '.c$inq ci, ' ||

887:
888: -- Ok, some pub items are uploaded which need conflict detection
889: -- Call the publication level wrapper.
890: /* l_query_string := 'SELECT distinct api.pub_name ' ||
891: 'FROM ' || asg_base.G_OLITE_SCHEMA || '.c$inq ci, ' ||
892: ' asg_pub_item api ' ||
893: 'WHERE ci.clid$$cs = ''' || p_user_name || ''' AND ' ||
894: ' ci.tranid$$ = ' || p_upload_tranid || ' AND ' ||
895: ' ci.store = api.name';*/

Line 897: 'FROM ' || asg_base.G_OLITE_SCHEMA || '.c$inq ci, ' ||

893: 'WHERE ci.clid$$cs = ''' || p_user_name || ''' AND ' ||
894: ' ci.tranid$$ = ' || p_upload_tranid || ' AND ' ||
895: ' ci.store = api.name';*/
896: l_query_string := 'SELECT distinct api.pub_name ' ||
897: 'FROM ' || asg_base.G_OLITE_SCHEMA || '.c$inq ci, ' ||
898: ' asg_pub_item api ' ||
899: 'WHERE ci.clid$$cs = :1 AND ' ||
900: ' ci.tranid$$ = :2 AND ' ||
901: ' ci.store = api.name';

Line 953: IF (l_pub_detect_conflict = asg_base.G_YES) THEN

949: asg_helper.log('Publication callback returned: ' ||
950: l_pub_detect_conflict,
951: 'asg_cons_qpkg',g_stmt_level);
952: END IF;
953: IF (l_pub_detect_conflict = asg_base.G_YES) THEN
954: -- Conflicts should be detected for this publication
955: -- Build a comma separated list for use later.
956: IF (l_conf_pubs IS NULL) THEN
957: l_conf_pubs := '''' || l_pub_name || '''';

Line 992: l_conf_pis_exist VARCHAR2(1) := asg_base.G_NO;

988: RETURN VARCHAR2
989: IS
990: l_query_string VARCHAR2(512);
991: l_conf_pi_count NUMBER;
992: l_conf_pis_exist VARCHAR2(1) := asg_base.G_NO;
993: BEGIN
994: -- As an optimization, first check the inq to see if there are
995: -- any pub items uploaded that have detect_conflict set to yes.
996: -- and will not be complete refreshed

Line 998: 'FROM ' || asg_base.G_OLITE_SCHEMA || '.c$inq ci, ' ||

994: -- As an optimization, first check the inq to see if there are
995: -- any pub items uploaded that have detect_conflict set to yes.
996: -- and will not be complete refreshed
997: l_query_string := 'SELECT count(*) ' ||
998: 'FROM ' || asg_base.G_OLITE_SCHEMA || '.c$inq ci, ' ||
999: asg_base.G_OLITE_SCHEMA || '.c$pub_list_q cpq, ' ||
1000: ' asg_pub_item api ' ||
1001: 'WHERE ci.clid$$cs = :1 AND ' ||
1002: ' ci.tranid$$ = :2 AND ' ||

Line 999: asg_base.G_OLITE_SCHEMA || '.c$pub_list_q cpq, ' ||

995: -- any pub items uploaded that have detect_conflict set to yes.
996: -- and will not be complete refreshed
997: l_query_string := 'SELECT count(*) ' ||
998: 'FROM ' || asg_base.G_OLITE_SCHEMA || '.c$inq ci, ' ||
999: asg_base.G_OLITE_SCHEMA || '.c$pub_list_q cpq, ' ||
1000: ' asg_pub_item api ' ||
1001: 'WHERE ci.clid$$cs = :1 AND ' ||
1002: ' ci.tranid$$ = :2 AND ' ||
1003: ' ci.store = api.name AND ' ||

Line 1018: l_conf_pis_exist := asg_base.G_YES;

1014: EXECUTE IMMEDIATE l_query_string
1015: INTO l_conf_pi_count
1016: USING p_user_name, p_upload_tran_id;
1017: IF (l_conf_pi_count > 0) THEN
1018: l_conf_pis_exist := asg_base.G_YES;
1019: END IF;
1020: return l_conf_pis_exist;
1021:
1022: END conflict_pub_items_exist;

Line 1028: p_pubitem_tbl IN OUT NOCOPY asg_base.pub_item_tbl_type)

1024: PROCEDURE get_conf_pub_items_list(
1025: p_user_name IN VARCHAR2,
1026: p_upload_tranid IN NUMBER,
1027: l_conf_pubs IN VARCHAR2,
1028: p_pubitem_tbl IN OUT NOCOPY asg_base.pub_item_tbl_type)
1029: IS
1030: l_query_string VARCHAR2(4000);
1031: l_pubitem VARCHAR2(30);
1032: l_cursor_id NUMBER;

Line 1037: 'FROM ' || asg_base.G_OLITE_SCHEMA || '.c$inq ci , ' ||

1033: l_cursor_ret NUMBER;
1034: l_counter NUMBER;
1035: BEGIN
1036: /* l_query_string := 'SELECT ci.store ' ||
1037: 'FROM ' || asg_base.G_OLITE_SCHEMA || '.c$inq ci , ' ||
1038: asg_base.G_OLITE_SCHEMA || '.c$pub_list_q cpq, ' ||
1039: ' asg_pub_item api ' ||
1040: 'WHERE ci.clid$$cs = ''' || p_user_name || ''' AND ' ||
1041: ' ci.tranid$$ = ' || p_upload_tranid || ' AND ' ||

Line 1038: asg_base.G_OLITE_SCHEMA || '.c$pub_list_q cpq, ' ||

1034: l_counter NUMBER;
1035: BEGIN
1036: /* l_query_string := 'SELECT ci.store ' ||
1037: 'FROM ' || asg_base.G_OLITE_SCHEMA || '.c$inq ci , ' ||
1038: asg_base.G_OLITE_SCHEMA || '.c$pub_list_q cpq, ' ||
1039: ' asg_pub_item api ' ||
1040: 'WHERE ci.clid$$cs = ''' || p_user_name || ''' AND ' ||
1041: ' ci.tranid$$ = ' || p_upload_tranid || ' AND ' ||
1042: ' ci.store = api.name AND ' ||

Line 1048: 'FROM ' || asg_base.G_OLITE_SCHEMA || '.c$inq ci , ' ||

1044: ' cpq.comp_ref <> ''Y'' AND ' ||
1045: ' api.detect_conflict = ''Y'' AND ' ||
1046: ' api.pub_name in (' || l_conf_pubs || ')';*/
1047: l_query_string := 'SELECT ci.store ' ||
1048: 'FROM ' || asg_base.G_OLITE_SCHEMA || '.c$inq ci , ' ||
1049: asg_base.G_OLITE_SCHEMA || '.c$pub_list_q cpq, ' ||
1050: ' asg_pub_item api ' ||
1051: 'WHERE ci.clid$$cs = :1 AND ' ||
1052: ' ci.tranid$$ = :2 AND ' ||

Line 1049: asg_base.G_OLITE_SCHEMA || '.c$pub_list_q cpq, ' ||

1045: ' api.detect_conflict = ''Y'' AND ' ||
1046: ' api.pub_name in (' || l_conf_pubs || ')';*/
1047: l_query_string := 'SELECT ci.store ' ||
1048: 'FROM ' || asg_base.G_OLITE_SCHEMA || '.c$inq ci , ' ||
1049: asg_base.G_OLITE_SCHEMA || '.c$pub_list_q cpq, ' ||
1050: ' asg_pub_item api ' ||
1051: 'WHERE ci.clid$$cs = :1 AND ' ||
1052: ' ci.tranid$$ = :2 AND ' ||
1053: ' ci.store = api.name AND ' ||

Line 1102: ' ( select name from '||asg_base.G_OLITE_SCHEMA||'.c$pub_list_q )';

1098: BEGIN
1099: asg_helper.log('Processing Purge SDQ','asg_cons_qpkg',g_stmt_level);
1100:
1101: l_qry_string := 'select distinct pub_name from asg_pub_item where item_id in '||
1102: ' ( select name from '||asg_base.G_OLITE_SCHEMA||'.c$pub_list_q )';
1103: l_cursor_id := dbms_sql.open_cursor();
1104: DBMS_SQL.parse(l_cursor_id,l_qry_string,DBMS_SQL.v7);
1105: DBMS_SQL.define_column(l_cursor_id,1,l_pub_name,30);
1106: l_ret_val := DBMS_SQL.execute(l_cursor_id);

Line 1124: l_qry_string1 := 'update '||asg_base.G_OLITE_SCHEMA||'.c$pub_list_q '||

1120: THEN
1121: -- process first time .set publication to complete refresh
1122: asg_helper.log('Setting user '||p_clientid||' to complete refresh for '||
1123: ' publication '||l_pub_name,'asg_cons_qpkg',g_stmt_level);
1124: l_qry_string1 := 'update '||asg_base.G_OLITE_SCHEMA||'.c$pub_list_q '||
1125: ' set comp_ref = ''Y'' where name in '||
1126: ' ( select item_id from asg_pub_item where '||
1127: ' pub_name = :1 )';
1128: EXECUTE IMMEDIATE l_qry_string1

Line 1138: l_qry_string1 := 'update '||asg_base.G_OLITE_SCHEMA||'.c$pub_list_q '||

1134: THEN
1135: -- last synch failed. ..so again set to complete refresh .
1136: asg_helper.log('Re-setting user '||p_clientid||' to complete refresh for '||
1137: ' publication '||l_pub_name,'asg_cons_qpkg',g_stmt_level);
1138: l_qry_string1 := 'update '||asg_base.G_OLITE_SCHEMA||'.c$pub_list_q '||
1139: ' set comp_ref = ''Y'' where name in '||
1140: ' ( select item_id from asg_pub_item where '||
1141: ' pub_name = :1 )';
1142: EXECUTE IMMEDIATE l_qry_string1

Line 1245: l_inqtable_name := asg_base.G_OLITE_SCHEMA ||

1241:
1242: -- One more optimization before checking for conflicts
1243: -- Check if there any UPD DML from client
1244: -- and then check if there is any UPD DML from server
1245: l_inqtable_name := asg_base.G_OLITE_SCHEMA ||
1246: '.' || 'cfm$' || p_pubitem || ' ';
1247: l_query_string := 'SELECT count(*) ' ||
1248: 'FROM ' || l_inqtable_name ||
1249: 'WHERE clid$$cs = :1 AND ' ||

Line 1274: l_client_wins := asg_base.G_CLIENT_WINS;

1270: INTO l_piv, l_primary_key_columns, l_conflict_callout
1271: FROM asg_pub_item
1272: WHERE name = p_pubitem;
1273:
1274: l_client_wins := asg_base.G_CLIENT_WINS;
1275: l_server_wins := asg_base.G_SERVER_WINS;
1276: l_download_tranid := asg_base.get_current_tranid();
1277: -- Get the access_id of updated DMLs
1278: insert into asg_conf_info (user_name,

Line 1275: l_server_wins := asg_base.G_SERVER_WINS;

1271: FROM asg_pub_item
1272: WHERE name = p_pubitem;
1273:
1274: l_client_wins := asg_base.G_CLIENT_WINS;
1275: l_server_wins := asg_base.G_SERVER_WINS;
1276: l_download_tranid := asg_base.get_current_tranid();
1277: -- Get the access_id of updated DMLs
1278: insert into asg_conf_info (user_name,
1279: pub_item,

Line 1276: l_download_tranid := asg_base.get_current_tranid();

1272: WHERE name = p_pubitem;
1273:
1274: l_client_wins := asg_base.G_CLIENT_WINS;
1275: l_server_wins := asg_base.G_SERVER_WINS;
1276: l_download_tranid := asg_base.get_current_tranid();
1277: -- Get the access_id of updated DMLs
1278: insert into asg_conf_info (user_name,
1279: pub_item,
1280: transaction_id,

Line 1508: asg_base.detect_device_switch(p_user_name, l_device_type);

1504: RETURN VARCHAR2 IS
1505: l_device_type VARCHAR2(30) := null;
1506: BEGIN
1507: -- Find the device type and detect device switch as well
1508: asg_base.detect_device_switch(p_user_name, l_device_type);
1509: RETURN l_device_type;
1510: EXCEPTION
1511: WHEN OTHERS THEN
1512: return l_device_type;