Use this function to get the application ID of the application to be imported. The application ID should either not exist in the instance or, if it does exist, must be in the workspace where the application is being imported to.
APEX_APPLICATION_INSTALL.GET_APPLICATION_ID RETURN NUMBER;
The following example returns the value of the application ID value in the
declare l_id number; begin l_id := apex_application_install.get_application_id; end;