[Home] [Help]
12777: AS
12778: BEGIN
12779: IF (x_status <> PUBLICATION_ERROR) AND(p_session_parameter <> model_copy)
12780: THEN
12781: ---------------- insert the fields of cz_pb_client_apps
12782: cz_pb_mgr.v_insert_string :='INSERT INTO cz_pb_client_apps'||p_db_link || ' ' ||
12783: '(PUBLICATION_ID,FND_APPLICATION_ID,APPLICATION_SHORT_NAME,NOTES)' || ' ' ||
12784: 'SELECT '||p_new_publication_id||',t.APPLICATION_ID,t.APPLICATION_SHORT_NAME,NOTES' || ' ' ||
12785: 'FROM cz_pb_client_apps,fnd_application' ||p_db_link|| ' ' ||
12778: BEGIN
12779: IF (x_status <> PUBLICATION_ERROR) AND(p_session_parameter <> model_copy)
12780: THEN
12781: ---------------- insert the fields of cz_pb_client_apps
12782: cz_pb_mgr.v_insert_string :='INSERT INTO cz_pb_client_apps'||p_db_link || ' ' ||
12783: '(PUBLICATION_ID,FND_APPLICATION_ID,APPLICATION_SHORT_NAME,NOTES)' || ' ' ||
12784: 'SELECT '||p_new_publication_id||',t.APPLICATION_ID,t.APPLICATION_SHORT_NAME,NOTES' || ' ' ||
12785: 'FROM cz_pb_client_apps,fnd_application' ||p_db_link|| ' ' ||
12786: 't WHERE cz_pb_client_apps.publication_id = :1' || ' ' ||
12781: ---------------- insert the fields of cz_pb_client_apps
12782: cz_pb_mgr.v_insert_string :='INSERT INTO cz_pb_client_apps'||p_db_link || ' ' ||
12783: '(PUBLICATION_ID,FND_APPLICATION_ID,APPLICATION_SHORT_NAME,NOTES)' || ' ' ||
12784: 'SELECT '||p_new_publication_id||',t.APPLICATION_ID,t.APPLICATION_SHORT_NAME,NOTES' || ' ' ||
12785: 'FROM cz_pb_client_apps,fnd_application' ||p_db_link|| ' ' ||
12786: 't WHERE cz_pb_client_apps.publication_id = :1' || ' ' ||
12787: 'and cz_pb_client_apps.APPLICATION_SHORT_NAME=t.APPLICATION_SHORT_NAME';
12788: EXECUTE IMMEDIATE v_insert_string using p_old_publication_id;
12789:
12782: cz_pb_mgr.v_insert_string :='INSERT INTO cz_pb_client_apps'||p_db_link || ' ' ||
12783: '(PUBLICATION_ID,FND_APPLICATION_ID,APPLICATION_SHORT_NAME,NOTES)' || ' ' ||
12784: 'SELECT '||p_new_publication_id||',t.APPLICATION_ID,t.APPLICATION_SHORT_NAME,NOTES' || ' ' ||
12785: 'FROM cz_pb_client_apps,fnd_application' ||p_db_link|| ' ' ||
12786: 't WHERE cz_pb_client_apps.publication_id = :1' || ' ' ||
12787: 'and cz_pb_client_apps.APPLICATION_SHORT_NAME=t.APPLICATION_SHORT_NAME';
12788: EXECUTE IMMEDIATE v_insert_string using p_old_publication_id;
12789:
12790: COMMIT;
12783: '(PUBLICATION_ID,FND_APPLICATION_ID,APPLICATION_SHORT_NAME,NOTES)' || ' ' ||
12784: 'SELECT '||p_new_publication_id||',t.APPLICATION_ID,t.APPLICATION_SHORT_NAME,NOTES' || ' ' ||
12785: 'FROM cz_pb_client_apps,fnd_application' ||p_db_link|| ' ' ||
12786: 't WHERE cz_pb_client_apps.publication_id = :1' || ' ' ||
12787: 'and cz_pb_client_apps.APPLICATION_SHORT_NAME=t.APPLICATION_SHORT_NAME';
12788: EXECUTE IMMEDIATE v_insert_string using p_old_publication_id;
12789:
12790: COMMIT;
12791: ----------insert the fields of cz_publication_usages
19877: UPDATE cz_model_publications
19878: SET deleted_flag = '1'
19879: WHERE publication_id = publicationid;
19880:
19881: DELETE FROM cz_pb_client_apps
19882: WHERE publication_id = publicationid;
19883:
19884: DELETE FROM cz_publication_usages
19885: WHERE publication_id = publicationid;
19908: || 'END;';
19909:
19910: EXECUTE IMMEDIATE 'BEGIN'
19911: || ' '
19912: || 'DELETE FROM cz_pb_client_apps'
19913: || v_cz_link_name
19914: || ''
19915: || ' '
19916: || 'WHERE publication_id = '
20160: BEGIN
20161: DELETE FROM cz_publication_usages
20162: WHERE cz_publication_usages.publication_id = publicationid;
20163:
20164: DELETE FROM cz_pb_client_apps
20165: WHERE cz_pb_client_apps.publication_id = publicationid;
20166:
20167: DELETE FROM cz_pb_languages
20168: WHERE cz_pb_languages.publication_id = publicationid;
20161: DELETE FROM cz_publication_usages
20162: WHERE cz_publication_usages.publication_id = publicationid;
20163:
20164: DELETE FROM cz_pb_client_apps
20165: WHERE cz_pb_client_apps.publication_id = publicationid;
20166:
20167: DELETE FROM cz_pb_languages
20168: WHERE cz_pb_languages.publication_id = publicationid;
20169: EXCEPTION
20189: INTO v_application_short_name
20190: FROM fnd_application
20191: WHERE application_id = p_application_id_tbl(i);
20192:
20193: INSERT INTO cz_pb_client_apps
20194: (publication_id, fnd_application_id, application_short_name, notes
20195: )
20196: VALUES (publicationid, p_application_id_tbl(i), v_application_short_name, NULL
20197: );
20264:
20265: EXECUTE IMMEDIATE v_edit_str using p_remote_publication_id;
20266:
20267:
20268: v_edit_str := 'DELETE FROM cz_pb_client_apps'||p_tgt_link||' ' ||
20269: 'WHERE cz_pb_client_apps.publication_id = :1';
20270:
20271: EXECUTE IMMEDIATE v_edit_str using p_remote_publication_id;
20272:
20265: EXECUTE IMMEDIATE v_edit_str using p_remote_publication_id;
20266:
20267:
20268: v_edit_str := 'DELETE FROM cz_pb_client_apps'||p_tgt_link||' ' ||
20269: 'WHERE cz_pb_client_apps.publication_id = :1';
20270:
20271: EXECUTE IMMEDIATE v_edit_str using p_remote_publication_id;
20272:
20273: v_edit_str := 'DELETE FROM cz_pb_languages'||p_tgt_link||' ' ||
20284: ||' t WHERE s.application_id =:1 and '
20285: ||' s.APPLICATION_SHORT_NAME=t.APPLICATION_SHORT_NAME'
20286: into v_application_short_name,tgt_appl_id using p_application_id_tbl(i);
20287:
20288: v_edit_str :='INSERT INTO cz_pb_client_apps'||p_tgt_link||' (publication_id,fnd_application_id,application_short_name)'
20289: || ' ' || ' values (:1,:2,:3)';
20290:
20291: EXECUTE IMMEDIATE v_edit_str USING p_remote_publication_id,tgt_appl_id,v_application_short_name;
20292:
21029: AS
21030: BEGIN
21031: SELECT fnd_application_id
21032: BULK COLLECT INTO x_applicationid_tbl
21033: FROM cz_pb_client_apps
21034: WHERE publication_id = p_publication_id;
21035:
21036: SELECT usage_id
21037: BULK COLLECT INTO x_usageid_tbl
21891: l_inventory_item_id cz_devl_projects.inventory_item_id%TYPE;
21892: l_organization_id cz_devl_projects.organization_id%TYPE;
21893: l_product_key cz_devl_projects.product_key%TYPE;
21894: l_ui_def_id cz_ui_defs.ui_def_id%TYPE;
21895: l_short_name cz_pb_client_apps.application_short_name%TYPE;
21896: pub_overlap EXCEPTION;
21897: no_model_id EXCEPTION;
21898: no_model_exists EXCEPTION;
21899: no_ui_exists EXCEPTION;
22072: INTO l_short_name
22073: FROM fnd_application
22074: WHERE application_id = p_appl_id_tbl(i);
22075:
22076: INSERT INTO cz_pb_client_apps
22077: (publication_id, fnd_application_id, application_short_name
22078: )
22079: VALUES (v_new_publication_id, p_appl_id_tbl(i), l_short_name
22080: );