I also need to copy pages from one application (core) to others. Again is there anyway to do this other than through the web interface?
set define off set verify off set serveroutput on size 1000000 set feedback off WHENEVER SQLERROR EXIT SQL.SQLCODE ROLLBACK begin wwv_flow.g_import_in_progress := true; end; / prompt Set Credentials... begin -- Assumes you are running the script connected to SQL*Plus as the Oracle user APEX_040000 or as the owner (parsing schema) of the application. wwv_flow_api.set_security_group_id(p_security_group_id=>nvl(wwv_flow_application_install.get_workspace_id,<YOUR_WORKSPACE_NUMBER>)); end; / begin wwv_flow.g_import_in_progress := true; end; / begin select value into wwv_flow_api.g_nls_numeric_chars from nls_session_parameters where parameter='NLS_NUMERIC_CHARACTERS'; end; / begin execute immediate 'alter session set nls_numeric_characters=''.,'''; end; / begin wwv_flow.g_browser_language := 'en'; end; / prompt Check Compatibility... begin -- This date identifies the minimum version required to import this file. wwv_flow_api.set_version(p_version_yyyy_mm_dd=>'2010.05.13'); end; / prompt Set Application ID... begin -- SET APPLICATION ID wwv_flow.g_flow_id := nvl(wwv_flow_application_install.get_application_id,<YOUR_APP_ID>); wwv_flow_api.g_id_offset := nvl(wwv_flow_application_install.get_offset,0); null; end; / PROMPT ...Remove page <YOUR_PAGE_ID> begin wwv_flow_api.remove_page (p_flow_id=>wwv_flow.g_flow_id, p_page_id=><YOUR_PAGE_ID>); end; /
RobDemp wrote:No. It's indicative of the risks inherent in using an undocumented, unsupported API. Doing so may have corrupted your applications and/or the APEX instance, and voided any support contract you have with Oracle.
Thanks for the response. This is very close to what I want.
However when I import the page the report region lose the template associated with it.
It goes from Report Region to 'No Template'
Is this normal?
RobDemp wrote:It seems that you are importing only page 15 and also the report template used in this page doesn't exist in your target instance/system.
I not sure what you are referring to. evrm gave me the idea and I ran in sqlplus
apex_application_install.set_application_alias( 'F' || apex_application_install.get_application_id );
This produces the report without the template set.
You can calculate the correct offset based on the export page and the page you want to replace.
p_plug_template=> 8931054716739067023+ wwv_flow_api.g_id_offset,