Error in package body

hi,
please show me an example to creating a package.
with regards.
Edited by: user651567 on Dec 1, 2010 10:48 PM

Hi,
Google "oracle package example" and you get a lot or start reading the manual: [url http://download.oracle.com/docs/cd/E11882_01/appdev.112/e17126/packages.htm#i4362] Oracle Package Example.
Herald ten Dam
http://htendam.wordpress.com

Similar Messages

  • Error to PACKAGE BODY WWSSO_AUTH_EXTERNAL

    hi to all,
    i followed the paper 'Configuring Oracle9iAS Portal for LDAP
    Authentication' in order to redirect authentication Login Server
    to OID.
    After all steps i have to run ssoldap.sql from sqlplus.
    Firstly, i got this errors (when the sql file called to package
    ssoxldap.pkb):
    Errors to PACKAGE BODY WWSSO_AUTH_EXTERNAL:
    LINE/COL ERROR
    0/0 PL/SQL: Compilation unit analysis terminated
    1/14 PLS-00201: identity 'WWSSO_AUTH_EXTERNAL' must be
    declared
    1/14 PLS-00304: if would not compile the body
    'WWSSO_AUTH_EXTERNAL' without its specification.
    after those errors it ask me for ldap configuration.
    if i filled out all the info it will show, afterwards, the same
    error.
    going to portal... works fine .. but the authentication does not
    redirect to oid.
    any suggestions will be appreciated,
    thanks in advance,
    marcos

    Hello Marcos
    Oracle Corporation recommends that you use ssoxoid.pkb
    package if you are using Oracle 8i (8.1.7) or later
    wbr

  • Errors for PACKAGE BODY WWV_FLOW_CUSTOM_AUTH_SSO

    Hi All,
    Running the below package so I can configure SSO...running into the below error.
    Any help is appreciated
    SQL> @custom_auth_sso_902.plb;
    ...wwv_flow_custom_auth_sso
    Warning: Package Body created with compilation errors.
    Errors for PACKAGE BODY WWV_FLOW_CUSTOM_AUTH_SSO:
    LINE/COL ERROR
    0/0 PL/SQL: Compilation unit analysis terminated
    1/14 PLS-00304: cannot compile body of 'WWV_FLOW_CUSTOM_AUTH_SSO'
    without its specification

    You need to ask Apex related questions in the Apex forum.
    Include the 4 digit Oracle and Apex versions you are using when you post your problem.
    I assume that you have read how to implement SSO for Apex applications to be partner applications for Oracle App Server single sign-on authentication? If not, I suggest that you search http://tahiti.oracle.com for the relevant instructions. (cannot recall the exact manual reference - I did this 3 or 4 years ago myself)

  • Error! Package Body Creating

    hi, i am trying to setup DBMS_PROFILER package with sqlplus by typing :
    "@E:\oraclexe\app\oracle\product\10.2.0\server\RDBMS\ADMIN\profload.sql"
    after, i've typed, this results is displayed :
    SQL> @E:\oraclexe\app\oracle\product\10.2.0\server\RDBMS\ADMIN\profload.sql
    Package created
    Grant succeeded
    Synonym created
    Library created
    Warning: Package body created with compilation errors
    Testing for correct installation
    PACKAGE BODY sys.DBMS_PROFILER - missing or invalid
    PL/SQL procedure successfully completed
    So, as expected, when i trying to invoke start_profiler method, this errors would be appeared :
    SQL> exec dbms_profiler.start_profiler('Hello');
    begin dbms_profiler.start_profiler('Hello'); end;
    ORA-04063: package body "SYS.DBMS_PROFILER" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_PROFILER"
    ORA-06512: at line 2
    SQL>
    so, how can i fix this problem?
    thanx for responses

    im using oracle xe 10.0.2.0, and i've logined as SYSDBA.
    i think that there is another problem. may be my profload.sql is broken. Is it possible?
    SQL> @E:\oraclexe\app\oracle\product\10.2.0\server\RDBMS\ADMIN\profload.sql
    Package created
    Grant succeeded
    Synonym created
    Library created
    Warning: Package body created with compilation errors
    Testing for correct installation
    PACKAGE BODY sys.DBMS_PROFILER - missing or invalid
    PL/SQL procedure successfully completed
    i couldnt find any solution yet.

  • Error in package body (pls-00302)

    Hi i tried the following package but getting the error:
    Package spec is created fine...
    Sovled
    Thank you
    Edited by: Smile on Feb 19, 2013 1:58 AM                                                                                                                                                                                                                                                                                                                                       

    The problem must be that you have grant EXECUTE OR DEBUG privilage to MS.K_TRG.GETID through a ROLE.
    You need a direct grant to use this inside a Stored procedure. If its granted through a ROLE then you can only use it in SQL not in stored procedures.
    Thanks,
    Karthick.

  • Apex new installation - HTP package body has errors

    I installed apex on 10G. When i try to access the apex page, i get the following errors in log:
    [Sat Oct 28 08:39:25 2006] [error] [client 192.168.1.90] [ecid: 1162049964:156.153.112.151:9580:0:9,0] mod_plsql: /pls/apex/apex HTTP-404 ORA-04063: package body "SYS.HTP" has errors\nORA-06508: PL/SQL: could not find program unit being called: "SYS.HTP"\nORA-06512: at line 7\n
    When i recompile HTP package body, i get errors:
    SQL> alter package htp compile body;
    Warning: Package Body altered with compilation errors.
    SQL> sho errors
    Errors for PACKAGE BODY HTP:
    LINE/COL ERROR
    14/11 PLS-00323: subprogram or cursor 'TITLE' is declared in a package
    specification and must be defined in the package body
    15/11 PLS-00323: subprogram or cursor 'HTITLE' is declared in a package
    specification and must be defined in the package body
    1691/7 PL/SQL: Statement ignored
    1691/7 PLS-00307: too many declarations of 'PRINT' match this call
    1694/7 PL/SQL: Statement ignored
    1694/7 PLS-00307: too many declarations of 'PRINT' match this call
    1697/7 PL/SQL: Statement ignored
    1697/7 PLS-00307: too many declarations of 'PRN' match this call
    1700/7 PL/SQL: Statement ignored
    1700/7 PLS-00307: too many declarations of 'PRN' match this call
    1703/7 PL/SQL: Statement ignored
    1703/7 PLS-00307: too many declarations of 'PRINT' match this call
    1706/7 PL/SQL: Statement ignored
    1706/7 PLS-00307: too many declarations of 'PRINT' match this call
    1709/7 PL/SQL: Statement ignored
    1709/7 PLS-00307: too many declarations of 'P' match this call
    1712/7 PL/SQL: Statement ignored
    1712/7 PLS-00307: too many declarations of 'P' match this call
    1715/7 PL/SQL: Statement ignored
    1715/7 PLS-00307: too many declarations of 'P' match this call
    Any ideas...

    Please tell us your first name and update your forum profile with it to help us. Also, change your handle to something more reader-friendly. Thanks.
    If your imported applications are set up to use some kind of SSO authenticaiton and you haven't provided for that in your environment then you'll need to change those applications' authentication scheme to something you can deal with.
    Scott

  • ORA-04063:package body "APPS.AP_UTILITIES_PKG" has errors

    Hi,
    AP_UTILITIES_PKG is showing invalid status.when i m trying to compile giving below error.
    SQL> show error
    Errors for PACKAGE BODY AP_UTILITIES_PKG:
    LINE/COL ERROR
    1033/9 PL/SQL: Statement ignored
    1033/21 PLS-00905: object APPS.FND_FLEX_KEY_API is invalid
    1046/9 PL/SQL: Statement ignored
    1046/22 PLS-00905: object APPS.FND_FLEX_KEY_API is invalid
    1059/9 PL/SQL: Statement ignored
    1059/22 PLS-00905: object APPS.FND_FLEX_KEY_API is invalid
    1421/9 PL/SQL: Statement ignored
    1421/21 PLS-00905: object APPS.FND_FLEX_KEY_API is invalid
    1434/9 PL/SQL: Statement ignored
    1434/21 PLS-00905: object APPS.FND_FLEX_KEY_API is invalid
    1447/9 PL/SQL: Statement ignored
    What i know there is a synonym FND_FLEX_VALUE_SET this synonym dropped After that many forms of the application is getting error.when i m trying to create as below it is saying "cannot create a synonym with same name as object"
    It is PRODUCTION issue kindly update me it would be appreciated
    Thanks
    Edited by: userpat on Jul 18, 2010 5:49 AM

    issue occured: EBS 12.0.3 AIX 5.3 DB 10.2.0.2
    select owner,object_name,object_type from dba_objects where object_name like 'FND_FLEX_VALUE_SET%'
    OWNER     OBJECT_NAME     OBJECT_TYPE
    APPLSYS     FND_FLEX_VALUE_SETS_S     SEQUENCE
    APPS     FND_FLEX_VALUE_SETS_S     SYNONYM
    APPLSYS     FND_FLEX_VALUE_SETS     TABLE
    APPLSYS     FND_FLEX_VALUE_SETS_U1     INDEX
    APPLSYS     FND_FLEX_VALUE_SETS_U2     INDEX
    FYI there are two test server for above because of power failure the system went down so i m not able to connect right now so find below output of other PRODUCTION instance that is 11.5.9 AIX 5.2 DB 9.2.0.4
    select owner,object_name,object_type from dba_objects where object_name like 'FND_FLEX_VALUE_SET%'
    OWNER     OBJECT_NAME     OBJECT_TYPE
    APPLSYS     FND_FLEX_VALUE_SETS     TABLE
    APPLSYS     FND_FLEX_VALUE_SETS_S     SEQUENCE
    APPLSYS     FND_FLEX_VALUE_SETS_U1     INDEX
    APPLSYS     FND_FLEX_VALUE_SETS_U2     INDEX
    APPS     FND_FLEX_VALUE_SETS     SYNONYM
    APPS     FND_FLEX_VALUE_SETS_S     SYNONYM
    Kindly update me

  • Export failed with error ORA-04063: package body "SYS.DBMS_CUBE_EXP" has er

    Hi
    We are having 11.2.0.2 database on Linux 5. From last two days the export backup is getting failed with the below error.
    . exporting post-schema procedural objects and actions
    EXP-00008: ORACLE error 4063 encountered
    ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
    ORA-06512: at line 1
    EXP-00083: The previous problem occurred when calling SYS.DBMS_CUBE_EXP.schema_i
    . exporting statistics
    Export terminated successfully with warnings.
    When I checked the status of this package DBMS_CUBE_EXP its showing invalid. I tried to compile the body of the package. But it was throwing below error.
    SQL> show errors
    Errors for PACKAGE BODY DBMS_CUBE_EXP:
    LINE/COL ERROR
    53/5 PL/SQL: SQL Statement ignored
    54/10 PL/SQL: ORA-04045: errors during recompilation/revalidation of
    SYS.DBA_XDS_INSTANCE_SETS
    ORA-01422: exact fetch returns more than requested number of rows
    I tried to query this view or describe the above view. But it was throwing the same error.
    ERROR at line 1:
    ORA-04045: errors during recompilation/revalidation of
    SYS.DBA_XDS_INSTANCE_SETS
    ORA-01422: exact fetch returns more than requested number of rows
    I couldnt get a proper solution from google regarding this view or to compile the above package.
    Now we are stcuked without the backups. It would be great if you guys look into it.
    Thanks
    SHIYAS M

    Yes I tried with take the export with SYS user. This time it thrown the error in the first and last too same as before.
    About to export specified users ...
    . exporting pre-schema procedural objects and actions
    EXP-00008: ORACLE error 4063 encountered
    ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
    ORA-06512: at line 1
    EXP-00083: The previous problem occurred when calling SYS.DBMS_CUBE_EXP.schema_info_exp
    . exporting foreign function library names for user U_20102
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting object type definitions for user U_20102
    About to export U_20102's objects ...
    I ran below scripts as per u provided the link
    @$ORACLE_HOME/rdbms/admin/catdpb.sql and utlrp.sql
    Still it didnt get compiled.
    One more thing I tried running expdp. It totally got failed by throwing the similar error. It didnt even export the tables too.
    ===============================================================================
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    ORA-39126: Worker unexpected fatal error in KUPW$WORKER.GET_TABLE_DATA_OBJECTS []
    ORA-31642: the following SQL statement fails:
    BEGIN "SYS"."DBMS_CUBE_EXP".SCHEMA_CALLOUT(:1,0,1,'11.02.00.00.00'); END;
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "SYS.DBMS_METADATA", line 1245
    ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "SYS.KUPW$WORKER", line 8353
    ----- PL/SQL Call Stack -----
    object line object
    handle number name
    0x1a3257060 19208 package body SYS.KUPW$WORKER
    0x1a3257060 8385 package body SYS.KUPW$WORKER
    0x1a3257060 12748 package body SYS.KUPW$WORKER
    0x1a3257060 2546 package body SYS.KUPW$WORKER
    0x1a3257060 9054 package body SYS.KUPW$WORKER
    0x1a3257060 1688 package body SYS.KUPW$WORKER
    0x1a8bc1630 2 anonymous block
    Estimate in progress using BLOCKS method...
    Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
    ORA-39126: Worker unexpected fatal error in KUPW$WORKER.GET_TABLE_DATA_OBJECTS []
    ORA-31642: the following SQL statement fails:
    BEGIN "SYS"."DBMS_CUBE_EXP".SCHEMA_CALLOUT(:1,0,1,'11.02.00.00.00'); END;
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "SYS.DBMS_METADATA", line 1245
    ORA-04063: package body "SYS.DBMS_CUBE_EXP" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_CUBE_EXP"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "SYS.KUPW$WORKER", line 8353
    ----- PL/SQL Call Stack -----
    object line object
    handle number name
    0x1a3257060 19208 package body SYS.KUPW$WORKER
    0x1a3257060 8385 package body SYS.KUPW$WORKER
    0x1a3257060 12748 package body SYS.KUPW$WORKER
    0x1a3257060 2546 package body SYS.KUPW$WORKER
    0x1a3257060 9054 package body SYS.KUPW$WORKER
    0x1a3257060 1688 package body SYS.KUPW$WORKER
    0x1a8bc1630 2 anonymous block
    Job "SYS"."SYS_EXPORT_SCHEMA_01" stopped due to fatal error at 17:58:34
    =========================================================================

  • ORA-04063: package body "SYS.INITJVMAUX" has errors

    Hi,
    I am upgrading the database from 9.2.0.1 to 9.2.0.6 on microsoft windows xp version 2002
    Following the readme of the patch 3948480 Oracle9i Patch Set Notes Release 2 (9.2.0.6.0) Patch Set 5 for Windows (32-Bit)
    When doing the Postinstallation Tasks step 8.2.2 Upgrade the Database step 6 running the catpatch.sql script getting the following error in the log file
    =====================================================
    Warning: Package Body created with compilation errors.
    Errors for PACKAGE BODY INITJVMAUX:
    LINE/COL ERROR
    23/1 PL/SQL: Statement ignored
    23/19 PLS-00201: identifier 'DBMS_ASSERT.NOOP' must be declared
    84/4 PL/SQL: Statement ignored
    84/22 PLS-00201: identifier 'DBMS_ASSERT.NOOP' must be declared
    call initjvmaux.drp('drop table java$rmjvm$aux')
    ERROR at line 1:
    ORA-04068: existing state of packages has been discarded
    ORA-04063: package body "SYS.INITJVMAUX" has errors
    ==========================================================
    Regards,

    Check out status of components from dba_registry. In case you are not using JVM in your database and only java component is invalid, then you can ignore the error. Else you will be required to load java manually. Check metalink for same,
    -Amit
    http://askoracledba.wordpress.com

  • Data Pump Error - ORA-04063: package body "SYS.DBMS_INTERNAL_LOGSTDBY" has

    Hi All,
    I am getting the following errors when I am trying to connect with datapump.My db is 10g and os is linux.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    ORA-31626: job does not exist
    ORA-04063: package body "SYS.DBMS_INTERNAL_LOGSTDBY" has errors
    ORA-06508: PL/SQL: could not find program unit being called
    ORA-06512: at "SYS.DBMS_LOGSTDBY", line 24
    ORA-06512: at "SYS.KUPV$FT", line 676
    ORA-04063: package body "SYS.DBMS_INTERNAL_LOGSTDBY" has errors
    ORA-06508: PL/SQL: could not find program unit being called
    When I tried to compile this package I am getting the following error
    SQL> alter package DBMS_INTERNAL_LOGSTDBY compile body;
    Warning: Package Body altered with compilation errors.
    SQL> show error
    Errors for PACKAGE BODY DBMS_INTERNAL_LOGSTDBY:
    LINE/COL ERROR
    1405/4 PL/SQL: SQL Statement ignored
    1412/38 PL/SQL: ORA-00904: "SQLTEXT": invalid identifier
    1486/4 PL/SQL: SQL Statement ignored
    1564/7 PL/SQL: ORA-00904: "DBID": invalid identifier
    1751/2 PL/SQL: SQL Statement ignored
    1870/7 PL/SQL: ORA-00904: "DBID": invalid identifier
    Can anyony suggest/guide me how to resolve the issue.
    Thanks in advance

    SQL> SELECT OBJECT_TYPE,OBJECT_NAME FROM DBA_OBJECTS
    2 WHERE OWNER='SYS' AND STATUS<>'VALID';
    OBJECT_TYPE OBJECT_NAME
    VIEW DBA_COMMON_AUDIT_TRAIL
    PACKAGE BODY DBMS_INTERNAL_LOGSTDBY
    PACKAGE BODY DBMS_REGISTRY_SYS
    Thanks

  • Help required in compilation of package body.....

    Hi ..
    While taking the export i encounter the error message..
    . exporting synonyms
    . exporting views
    . exporting stored procedures
    . exporting operators
    . exporting referential integrity constraints
    . exporting triggers
    EXP-00056: ORACLE error 6550 encountered
    ORA-06550: line 1, column 26:
    PLS-00201: identifier 'XDB.DBMS_XDBUTIL_INT' must be declared
    ORA-06550: line 1, column 14:
    PL/SQL: Statement ignored
    EXP-00056: ORACLE error 6550 encountered
    ORA-06550: line 1, column 26:
    PLS-00201: identifier 'XDB.DBMS_XDBUTIL_INT' must be declared
    ORA-06550: line 1, column 14:
    PL/SQL: Statement ignored
    EXP-00000: Export terminated unsuccessfully..
    SELECT status,object_id,object_type,owner,object_name
    FROM dba_objects
    WHERE object_name = 'DBMS_XDBUTIL_INT';
    gives the output as...
    status object type owner object_name
    valid synonym public DBMS_XDBUTIL_INT
    valid package xdb DBMS_XDBUTIL_INT
    invalid package body xdb DBMS_XDBUTIL_INT
    when i try to compile the invalid object...
    SQL> alter package XDB.DBMS_XDBUTIL_INT COMPILE BODY;
    Warning: Package Body altered with compilation errors.
    SQL> sho err
    Errors for PACKAGE BODY XDB.DBMS_XDBUTIL_INT:
    LINE/COL ERROR
    61/7 PL/SQL: Statement ignored
    61/17 PLS-00306: wrong number or types of arguments in call to
    'IS_HIERARCHY_ENABLED_INTERNAL'
    74/7 PL/SQL: Statement ignored
    74/29 PLS-00302: component 'GENERATE_TRGNM' must be declared
    108/9 PL/SQL: Statement ignored
    108/37 PLS-00302: component 'TRUNCATE_NAME' must be declared
    123/7 PLS-00201: identifier 'SYS.DBMS_SYS_SQL' must be declared
    123/7 PL/SQL: Statement ignored
    135/9 PL/SQL: Statement ignored
    LINE/COL ERROR
    135/37 PLS-00302: component 'TRUNCATE_NAME' must be declared
    153/9 PL/SQL: Statement ignored
    153/33 PLS-00302: component 'TRUNCATE_NAME' must be declared
    168/7 PLS-00201: identifier 'SYS.DBMS_SYS_SQL' must be declared
    168/7 PL/SQL: Statement ignored
    181/9 PL/SQL: Statement ignored
    181/33 PLS-00302: component 'TRUNCATE_NAME' must be declared
    Since the code is wrapped .. i cant do anything.. needs ur help.
    sorry for explaining in such a detail...
    Message was edited by:
    437022

    Hi,
    In side the Package Body,
    a) invalid arguments for IS_HIERARCHY_ENABLED_INTERNAL
    b) invalid components GENERATE_TRGNM, etc.
    First, you need to correct the above errors and then
    try to compile the Package Body
    Regards,
    Sailaja

  • Can't compile package body

    hello. i ran in to little issue today. After patch 13839550 was applied to one of our test enviroments, we get one invalid package body. but when i try to compile it shows warrning!
    SQL> alter package APPS.AP_ACCTG_DATA_FIX_PKG compile body;
    Warning: Package Body altered with compilation errors.
    SQL>
    SQL> show err
    Errors for PACKAGE BODY APPS.AP_ACCTG_DATA_FIX_PKG:
    LINE/COL ERROR
    3899/3 PL/SQL: SQL Statement ignored
    3899/3 PLS-00394: wrong number of values in the INTO list of a FETCH
    statement
    Could you please explain what should i do?
    Database - 11.2.0
    eBS - 12.1
    Linux x86
    Thx

    i dont understand how can ichange something here?In this case, you can't.
    If this is one of the standard packages built into an Oracle Apps database, you need to log a tar/sr with Oracle support. (which will probably result in more patches)

  • Error Installing Packaged Applications - Apex 5

    Hi Folks:
    I installed APEX 5 successfully. Everything seems to be running fine except I'm unable to install packaged applications.
    I get a screen that looks like the following when trying to install a package application:
    The text in the dropdowns for the errors begins with:
    Error
    The packaged application installed. However, installation of database objects and seed data has failed.
    Install Summary
    Script Name Status Statements Successful Statements with Errors Total Statements
    Framework Package Specification Success 1 0 1
    Framework Package Body Errors 0 1 1
    eba_dp_ui spec Success 1 0 1
    eba_dp_ui body Errors 0 1 1
    Missing Indexes Errors 0 7 7
    Filter Search Spec Errors 0 1 1
    Filter Search Body Errors 0 1 1
    eba_dp_data_access body Errors 0 1 1
    eba_dp_dashboard body Errors 0 1 1
    eba_dp_demo_data spec & body Errors 1 1 2
    Report Total:   3 14 17
    1 - 10
    Errors
    Framework Package Body
    CREATE OR REPLACE PACKAGE BODY "EBA_DP_FW" as
        function conv_txt_html (
            p_txt_message in varchar2 )
            return varchar2
        is
            l_html_message   varchar2(32767) default p_txt_message;
            l_temp_url varchar2(32767) := null;
            l_length number;
        begin
            l_html_message := replace(l_html_message, chr(10), '<br />');
            l_html_message := replace(l_html_message, chr(13), null);
            return l_html_message;
        end conv_txt_html;
        function conv_urls_links (
            p_string in varchar2 )
            return varchar2
        is
            l_string   varchar2(32767) default p_string;
    It then includes a lot more create, etc. statements that failed.
    I wonder if it is some kind of permissions issue?  I ended up running @apxremov.sql   and reinstalled apex 5 again after I couldn't get the package apps to work the first time but that didn't fix anything.  I have attached a text file that has all the code from the error message.
    The database I installed to is an Oracle 12c Enterprise database.
    It had Oracle Apex 4.2.6 installed on it with many packaged apps (not really using them, just trialing them till 5 came out).  I ran @apxremov.sql before installing Apex 5.
    Any help or ideas are appreciated.
    Thanks,
    Matthew Friend

    Matthew,
    Looking at the error file, it appears that APEX is trying to "upgrade" an existing Data Reporter instance rather than do a fresh install. It's possible (I haven't checked the code) that apexremov.sql doesn't run the packaged applications through their deinstall process, and so their supporting objects may still be present within your schema. I'd suggest removing any objects (especially tables & packages) with a name like 'EBA_DP_%' from your parsing schema, and then trying the install again.
    Regards,
    -D.

  • How to compile HTMLDB_SITE_ADMIN_PRIVS invalid package body?

    Hi,
    I am trying to grant HTMLDB Administrator privilege to assign the other Oracle default schemas to workspaces by executing the following procedure.
    SQL> EXEC HTMLDB_SITE_ADMIN_PRIVS.UNRESTRICT_SCHEMA(p_schema => 'SYSTEM');
    However, the package body is corrupted. As the package body is wrapped, I cannot compile it manually.
    FLOWS_020000@PROD> ALTER PACKAGE HTMLDB_SITE_ADMIN_PRIVS COMPILE BODY;
    Warning: Package Body altered with compilation errors.
    FLOWS_020000@pPROD> SHOW ERRORS;
    Errors for PACKAGE BODY HTMLDB_SITE_ADMIN_PRIVS:
    LINE/COL ERROR
    0/0 PLS-00753: malformed or corrupted wrapped unit
    I'd greatly appreciate if you can provide any suggestion or advice for me to compile or reload this wrapped package body.
    Thanks,
    Deborah

    Hi,
    I am trying to grant HTMLDB Administrator privilege to assign the other Oracle default schemas to workspaces by executing the following procedure.
    SQL> EXEC HTMLDB_SITE_ADMIN_PRIVS.UNRESTRICT_SCHEMA(p_schema => 'SYSTEM');
    However, the package body is corrupted. As the package body is wrapped, I cannot compile it manually.
    FLOWS_020000@PROD> ALTER PACKAGE HTMLDB_SITE_ADMIN_PRIVS COMPILE BODY;
    Warning: Package Body altered with compilation errors.
    FLOWS_020000@pPROD> SHOW ERRORS;
    Errors for PACKAGE BODY HTMLDB_SITE_ADMIN_PRIVS:
    LINE/COL ERROR
    0/0 PLS-00753: malformed or corrupted wrapped unit
    I'd greatly appreciate if you can provide any suggestion or advice for me to compile or reload this wrapped package body.
    Thanks,
    Deborah

  • Error In Package

    is giving this error:
    107/20 PLS-00103: Encountered the symbol "(" when one of the following
             symbols was expected:
             : =), Default character varying large
             The symbol ": =" has been replaced by "(" to continue.Why?
    this line in my editor, is not refering to this...
    How can I locate the correct line??
    thanks

    Friends, please, I´m having difficult to resolve the errors in package... Please help me;;
    Package:
    --  Package : pkg_frota_empresa
    --  Descrição:
    --    Este package contém as funções para implementação do módulo frota, para todos os processos
    --    e telas que são referente a Cadastro de Empresas para o Módulo de Frota
    --  Definir os PKG utilizado no módulo:
    --  Histórico:
    --    28/12/2009 - André - Implementação.
    -- @D:\RepositNovo\FwCard\Des\Modulos\Card_Frota\Package\pkg_frota_empresa.sql
    -- @C:\CARD_DES\Modulos\Card_Frota\Package\pkg_frota_empresa_teste.sql
    CREATE OR REPLACE PACKAGE pkg_frota_empresa_teste
    IS
    -- Definicao dos Tipos de Tabelas Dinamicas
    -- Definicao de constantes
    -- Definição de Variaveis globais
    g_frota_cliente    frota_cliente%ROWTYPE;
    g_contrato_cliente contrato_cliente%ROWTYPE;
    TYPE regemprec_type IS RECORD
        (  id_frota_cliente        NUMBER
         , id_cliente              VARCHAR2(50)
         , id_pessoa_juridica      VARCHAR2(50)
         , cnpj                    VARCHAR2(50)
         , id_tipo_documento       VARCHAR2(50)
         , ie                      VARCHAR2(50)
         , im                      VARCHAR2(50)
         , razao_social            VARCHAR2(50)
         , nome_fantasia           VARCHAR2(50)
         , ddd                     VARCHAR2(50)
         , telefone                VARCHAR2(50)
         , fax                     VARCHAR2(50)
         , ddd_cel                 VARCHAR2(50)
         , fone_cel                VARCHAR2(50)
         , email                   VARCHAR2(50)
         , nome_impresso           VARCHAR2(50)
         , id_ramo_atividade       VARCHAR2(50)
         , fatura_enviada          VARCHAR2(50)
         , id_estado_cartao        VARCHAR2(50)
         , id_matriz               VARCHAR2(50)
         , id_cliente_categoria    VARCHAR2(50)
         , end_extrato_cnv_empresa VARCHAR2(50)
         , id_agente               VARCHAR2(50)
         , aceitar_cpf_nulo        VARCHAR2(1));
    TYPE regemp_type IS TABLE OF regemprec_type INDEX BY BINARY_INTEGER;
    -- Definição de Procedures e Funçoes que deverão ser publica, acesso de outras funçoes
    PROCEDURE inicializar;
    --Frota Cliente
    PROCEDURE inc_altfrotacliente(
       p_reg frota_cliente%ROWTYPE
    --Frota Cliente
    /*PROCEDURE inc_alt_frotacliente_exec(
      p_id_frota_cliente         IN OUT frota_cliente.id_frota_cliente%TYPE,
      p_id_cliente               IN     frota_cliente.id_cliente%TYPE,
      p_limite_mensal            IN     frota_cliente.limite_mensal%TYPE        DEFAULT 0,
      p_limite_trans             IN     frota_cliente.limite_trans%TYPE         DEFAULT 0,
      p_qtd_max_litros           IN     frota_cliente.qtd_max_litros%TYPE       DEFAULT 0,
      p_valor_max                IN     frota_cliente.valor_max%TYPE            DEFAULT 0,
      p_ver_agenda_condutor      IN     frota_cliente.ver_agenda_condutor%TYPE  DEFAULT '0',
      p_ver_km                   IN     frota_cliente.ver_km%TYPE               DEFAULT '0',
      p_ver_valor_max            IN     frota_cliente.ver_valor_max%TYPE        DEFAULT '0',
      p_diaval_carta_credito     IN     frota_cliente.diaval_carta_credito%TYPE DEFAULT 0
    -- Empresa+Frota_Cliente+Frota_Cliente_Veiculo
    PROCEDURE excluir(
       p_id_frota_cliente         IN  frota_cliente.id_frota_cliente%TYPE
    -- Chama o procedimento acima
    PROCEDURE excluirexec(
      p_id_frota_centro_custo IN frota_centro_custo.id_frota_centro_custo%TYPE
    --Empresa
    PROCEDURE inc_alt(
       p_reg  RegEmp_type
    --Chama o procedimento acima
    PROCEDURE inc_altexec(
       p_id_frota_cliente        IN OUT VARCHAR2,
       p_id_empresa              IN OUT VARCHAR2,
       p_id_pessoa_juridica      IN OUT VARCHAR2,
       p_cnpj                    IN VARCHAR2,
       p_id_tipo_documento       IN VARCHAR2,
       p_ie                      IN VARCHAR2,
       p_im                      IN VARCHAR2,
       p_razaosocial             IN VARCHAR2,
       p_fantasia                IN VARCHAR2,
       p_ddd                     IN VARCHAR2,
       p_telefone                IN VARCHAR2,
       p_fax                     IN VARCHAR2,
       p_ddd_cel                 IN VARCHAR2,
       p_fone_cel                IN VARCHAR2,
       p_email                   IN VARCHAR2,
       p_nome_impresso           IN VARCHAR2,
       p_ramo                    IN VARCHAR2,
       p_fatura_enviada          IN VARCHAR2,
       p_id_estado_cartao        IN VARCHAR2,
       p_id_matriz               IN VARCHAR2,
       p_cliente_categoria       IN VARCHAR2,
       p_end_extrato_cnv_empresa IN VARCHAR2,
       p_agente                  IN VARCHAR2,
       p_cpf_nulo                IN VARCHAR2
    PROCEDURE vrf_empresa(
       p_cnpj IN VARCHAR2,
       p_id_tipo_documento IN tipo_documento.id_tipo_documento%TYPE
    PROCEDURE inc_alt_contrato(
        p_operacao CHAR(1),
        p_reg contrato_cliente%ROWTYPE
    PROCEDURE inc_alt_contratoexec(
        p_operacao                 IN VARCHAR(1),
        p_id_cliente               IN contrato_cliente.id_cliente%TYPE,
        p_id_produto               IN produto.id_produto%TYPE,
        p_data_inicio              IN contrato_cliente.data_inicio%TYPE,
        p_data_fim                 IN contrato_cliente.data_fim%TYPE,
        p_comissao_1               IN contrato_cliente.comissao1%TYPE,
        p_comissao_2               IN contrato_cliente.comissao2%TYPE,
        p_forma_comissao1          IN contrato_cliente.forma_comissao1%TYPE,
        p_forma_comissao2          IN contrato_cliente.forma_comissao2%TYPE,
        p_dia_entrega              IN contrato_cliente.dia_entrega%TYPE,
        p_agente                   IN contrato_cliente.id_agente%TYPE
    END;
    SHOW ERRORS
    --------------------------Inicio das Definições dos Procedimento e Funçoes ------------------------------
    -- Os Procedimentos e Funçoes devem ter um cabeçalho explicando a função os parametros de entrada e saida
    -- As Definições das Variaveis de parametros de funcao e procedures devem iniciar com: p_
    -- As Definições de Variaveis locais deve sempre iniciar com: v_
    CREATE OR REPLACE PACKAGE BODY pkg_frota_empresa
    IS
    -- Function :  inicializar
    -- Descrição: Função que inicializa variaveis do PKG
    PROCEDURE inicializar
    IS
    BEGIN
      RETURN;
    END;
    -- Procedimento : inc_alt_frotacliente
    -- Descrição: Cadastro de Empresa
    -- Entrada
    --   p_reg : Valores a serem operados
    -- OBS:  Sem Commit e tratamento de excessão
    -- Histórico
    -- DATA       - DESENVOLVIMENTO - REQUISITO - INFORMAÇÃO
    -- 20/01/2010 - [ATILIO]        - #79165    - Implementação
    PROCEDURE inc_alt_frotacliente(
       p_reg frota_cliente%ROWTYPE
    IS
    BEGIN
      IF p_reg.id_frota_cliente IS NULL THEN
        SELECT SEQ_FROTA_CLIENTE.NEXTVAL INTO p_reg.id_frota_cliente FROM DUAL;
        INSERT INTO FROTA_CLIENTE VALUES p_reg;
      ELSE
        UPDATE FROTA_CLIENTE
        SET  id_cliente          = p_reg.id_cliente,
             limite_mensal       = p_reg.limite_mensal,
             limite_trans        = p_reg.limite_trans,
             qtd_max_litros      = p_reg.qtd_max_litros,
             valor_max           = p_reg.valor_max,
             ver_agenda_condutor = p_reg.ver_agenda_condutor,
             ver_km              = p_reg.ver_km,
             ver_valor_max       = p_reg.ver_valor_max,
             diaval_carta_credito= p_reg.diaval_carta_credito
        WHERE id_frota_cliente   = p_reg.id_frota_cliente;
      END IF;
    END;
    -- Procedimento : inc_alt_frotacliente_exec
    -- Descrição    : Incluir ou Alterar um registro referente a tabela: FROTA_CLIENTE
    -- Entrada:  p_id_frota_cliente     - Identificador do frota_cliente, quando( =NULL -> Incluir  <>NULL -> Alterar)
    --           p_id_cliente           - Identificador do cliente
    --           p_limite_mensal        - Limite mensal por veiculo
    --           p_limite_trans         - Limite por transação por veiculo
    --           p_qtd_max_litros       - Quantidade maxima de litros por abestecimento
    --           p_valor_max            - Valor máximo por abastecimento
    --           p_ver_agenda_condutor  - Configuração se deve ser verificado o agendamento para permitir abastecimento
    --           p_ver_km               - Configuração se deve verificar a KM no abastecimento
    --           p_ver_valor_max        - Configuração se deve ser verificado o valor máximo no abastecimento
    --           p_diaval_carta_credito - Configura o maximo de dias para vigencia de uma carta frete
    -- Historico
    --   DATA       - DESENVOLVEDOR - REQUISITO - INFORMAÇÃO
    --   20/01/2010 - Atilio - Implementação de Defaults
    /*PROCEDURE inc_alt_frotacliente_exec(
      p_id_frota_cliente         IN OUT frota_cliente.id_frota_cliente%TYPE,
      p_id_cliente               IN     frota_cliente.id_cliente%TYPE,
      p_limite_mensal            IN     frota_cliente.limite_mensal%TYPE        DEFAULT 0,
      p_limite_trans             IN     frota_cliente.limite_trans%TYPE         DEFAULT 0,
      p_qtd_max_litros           IN     frota_cliente.qtd_max_litros%TYPE       DEFAULT 0,
      p_valor_max                IN     frota_cliente.valor_max%TYPE            DEFAULT 0,
      p_ver_agenda_condutor      IN     frota_cliente.ver_agenda_condutor%TYPE  DEFAULT '0',
      p_ver_km                   IN     frota_cliente.ver_km%TYPE               DEFAULT '0',
      p_ver_valor_max            IN     frota_cliente.ver_valor_max%TYPE        DEFAULT '0',
      p_diaval_carta_credito     IN     frota_cliente.diaval_carta_credito%TYPE DEFAULT 0
    IS
    BEGIN
      --preencho o type
      g_frota_cliente.id_frota_cliente         := p_id_frota_cliente;
      g_frota_cliente.id_cliente               := p_id_cliente;
      g_frota_cliente.limite_mensal            := nvl(p_limite_mensal,0);
      g_frota_cliente.limite_trans             := nvl(p_limite_trans,0);
      g_frota_cliente.qtd_max_litros           := p_qtd_max_litros;
      g_frota_cliente.valor_max                := p_valor_max;
      g_frota_cliente.ver_agenda_condutor      := p_ver_agenda_condutor;
      g_frota_cliente.ver_km                   := p_ver_km;
      g_frota_cliente.ver_valor_max            := p_ver_valor_max;
      g_frota_cliente.diaval_carta_credito     := p_diaval_carta_credito;
      inc_alt_frotacliente(g_frota_cliente);
      COMMIT;
      EXCEPTION
      WHEN OTHERS THEN
        fwerr.gerar_exception(p_procedimento => 'pkg_frota_empresa.inc_alt_frotacliente');
    END;*/
    -- Procedimento : excluir
    -- Descrição    : Excluir um registro referente a tabela: FROTA_CLIENTE
    -- Entrada:  p_id_frota_cliente   - Identificador do frota_cliente
    -- OBS: Este procedimento não gera COMMIT, deixando para a função que chama esta responsabilidade
    -- Historico
    --   DATA       - DESENVOLVEDOR - REQUISITO - INFORMAÇÃO
    --   12/01/2010 - JOAO   -                  - Implementação
    --   20/01/2010 - ATILIO -
    PROCEDURE excluir(
      p_id_frota_cliente         IN  frota_cliente.id_frota_cliente%TYPE
    IS
    BEGIN
      DELETE FROTA_CLIENTE_VEICULO WHERE id_frota_cliente = p_id_frota_cliente;
      DELETE FROTA_CLIENTE WHERE id_frota_cliente = p_id_frota_cliente;
    END;
    -- Procedimento : excluirexec
    -- Descrição    : Excluir um registro referente a tabela: FROTA_CLIENTE
    -- Entrada:  p_id_frota_cliente   - Identificador de frota_cliente
    -- OBS:
    -- Historico
    --   DATA       - DESENVOLVEDOR - REQUISITO - INFORMAÇÃO
    --   20/01/2010 - ATILIO   -                  - Implementação
    PROCEDURE excluirexec(
      p_id_frota_cliente  IN  frota_cliente.id_frota_cliente%TYPE DEFAULT NULL
    IS
      v_ret  PLS_INTEGER;
      v_id_cliente NUMBER;
    BEGIN
      IF p_id_frota_cliente IS NULL THEN
        FOR i IN 1..htmldb_application.g_f01.COUNT LOOP
          SELECT id_cliente INTO v_id_cliente FROM frota_cliente WHERE id_frota_cliente = htmldb_application.g_f01(i);
          excluir(p_id_frota_cliente => htmldb_application.g_f01(i));
          v_ret := pkg_limpeza.lmp_empresa(v_id_cliente);
          fwerr.verificar(v_ret=0,v_ret);
        END LOOP;
      ELSE
        SELECT id_cliente INTO v_id_cliente FROM frota_cliente WHERE id_frota_cliente = p_id_frota_cliente;
        excluir(p_id_frota_cliente => p_id_frota_cliente);
        v_ret := pkg_limpeza.lmp_empresa(v_id_cliente);
        fwerr.verificar(v_ret=0,v_ret);
      END IF;
      COMMIT;
    EXCEPTION
      WHEN OTHERS THEN
        fwerr.gerar_exception(p_procedimento => 'excluirexec');
    END;
    -- Procedimento : inc_alt
    -- Descrição    : Inclusão/Alteração Empresa
    -- Entrada:  p_reg   - Referência a tabela temporária
    -- OBS:
    -- Historico
    --   DATA       - DESENVOLVEDOR - REQUISITO - INFORMAÇÃO
    --   20/01/2010 - ATILIO   -                  - Implementação
    PROCEDURE inc_alt(
       p_reg regemp_type
    IS
      v_id_emp  NUMBER;
      v_encontrou BOOLEAN DEFAULT TRUE;
    BEGIN
      IF p_reg(2) IS NULL THEN
        v_encontrou := FALSE;
      ELSE
        BEGIN
          SELECT id_cliente INTO v_id_emp FROM frota_cliente WHERE id_cliente = p_reg(2);
        EXCEPTION
          WHEN NO_DATA_FOUND THEN
          v_encontrou:=FALSE;
        END;
      END IF;
      IF NOT v_encontrou THEN
        ca_empresa_incluir_alterar(p_reg(2) ,p_reg(3) ,p_reg(4) ,p_reg(5) ,p_reg(6) ,p_reg(7) ,p_reg(8) ,p_reg(9) ,p_reg(10),
                                   p_reg(11),p_reg(12),p_reg(13),p_reg(14),p_reg(15),p_reg(16),p_reg(17),p_reg(18),p_reg(19),
                                   p_reg(20),p_reg(21),p_reg(22),p_reg(23),p_reg(24));
        --Constraint - com tab cliente
        SELECT id_cliente INTO v_id_emp FROM cliente WHERE id_cliente = p_reg(2);
        inc_altfrotacliente(p_id_frota_cliente => p_reg(1),
                            p_id_cliente       => v_id_emp);
      ELSE
        ca_empresa_incluir_alterar(p_reg(2) ,p_reg(3) ,p_reg(4) ,p_reg(5) ,p_reg(6) ,p_reg(7) ,p_reg(8) ,p_reg(9) ,p_reg(10),
                                   p_reg(11),p_reg(12),p_reg(13),p_reg(14),p_reg(15),p_reg(16),p_reg(17),p_reg(18),p_reg(19),
                                   p_reg(20),p_reg(21),p_reg(22),p_reg(23),p_reg(24));
      END IF;
    END;
    --  Procedure: inc_altexec
    --  Descrição:
    --    Incluir ou Alterar cadastro de empresa (FROTA)
    --  Entrada:
    --    cadastro de empresa
    --    p_id_frota_cliente     : identificação da empresa dentro do módulo
    --    p_id_empresa           : Identificador da empresa
    --    p_id_pessoa_juridica   : Identificador da empresa
    --    p_cnpj                 : CNPJ da empresa
    --    p_id_tipo_documento    : Indica o tipo de documento
    --    p_ie                   : Inscrição Estadual
    --    p_im                   : Inscrição Municipal
    --    p_razaosocial          : Razão Social
    --    p_fantasia             : Nome Fantasia
    --    p_ddd                  : DDD do telefone
    --    p_telefone             : Número do telefone
    --    p_fax                  : Número do fax
    --    p_ddd_cel              : DDD do celular
    --    p_fone_cel             : Número do celular
    --    p_email                : Email da empresa
    --    p_nome_impresso        : Nome que será impresa na fatura
    --    p_ramo                 : Ramo de Atividade
    --    p_fatura_enviada       : Idicador se a empresa pode reimprimir fatura pelo portal que já
    --                             foram enviada para o banco
    --    p_id_estado_cartao     : Estado que ficará o cartão após ser confeccionado
    --    p_id_matriz            : Identificador da empresa matriz
    --    p_cliente_categoria    : Categoria do Cliente
    --    p_end_extrato_cnv_empresa : Endereço Extrato Conferência
    --    p_agente               : Agente relacionado
    --    p_cpf_nulo             : Cpf nulo
    --  Histórico:
    -- 20/01/2010 - Atílio - Implementação
    PROCEDURE inc_altexec(
        p_id_frota_cliente        IN OUT VARCHAR2,
        p_id_empresa              IN OUT VARCHAR2,
        p_id_pessoa_juridica      IN OUT VARCHAR2,
        p_cnpj                    IN VARCHAR2,
        p_id_tipo_documento       IN VARCHAR2,
        p_ie                      IN VARCHAR2,
        p_im                      IN VARCHAR2,
        p_razaosocial             IN VARCHAR2,
        p_fantasia                IN VARCHAR2,
        p_ddd                     IN VARCHAR2,
        p_telefone                IN VARCHAR2,
        p_fax                     IN VARCHAR2,
        p_ddd_cel                 IN VARCHAR2,
        p_fone_cel                IN VARCHAR2,
        p_email                   IN VARCHAR2,
        p_nome_impresso           IN VARCHAR2,
        p_ramo                    IN VARCHAR2,
        p_fatura_enviada          IN VARCHAR2,
        p_id_estado_cartao        IN VARCHAR2,
        p_id_matriz               IN VARCHAR2,
        p_cliente_categoria       IN VARCHAR2,
        p_end_extrato_cnv_empresa IN VARCHAR2,
        p_agente                  IN VARCHAR2,
        p_cpf_nulo                IN VARCHAR2
    IS
    BEGIN
      RegEmp_type(1)  := p_id_frota_cliente;
      RegEmp_type(2)  := p_id_empresa;
      RegEmp_type(3)  := p_id_pessoa_juridica;
      RegEmp_type(4)  := p_cnpj;
      RegEmp_type(5)  := p_id_tipo_documento;
      RegEmp_type(6)  := p_ie;
      RegEmp_type(7)  := p_im;
      RegEmp_type(8)  := p_razaosocial;
      RegEmp_type(9)  := p_fantasia;
      RegEmp_type(10) := p_ddd;
      RegEmp_type(11) := p_telefone;
      RegEmp_type(12) := p_fax;
      RegEmp_type(13) := p_ddd_cel;
      RegEmp_type(14) := p_fone_cel;
      RegEmp_type(15) := p_email;
      RegEmp_type(16) := p_nome_impresso;
      RegEmp_type(17) := p_ramo;
      RegEmp_type(18) := p_fatura_enviada;
      RegEmp_type(19) := p_id_estado_cartao;
      RegEmp_type(20) := p_id_matriz;
      RegEmp_type(21) := p_cliente_categoria;
      RegEmp_type(22) := p_end_extrato_cnv_empresa;
      RegEmp_type(23) := p_agente;
      RegEmp_type(24) := p_cpf_nulo;
      inc_alt(RegEmp_type);
    EXCEPTION
      WHEN OTHERS THEN
        fwerr.gerar_exception(p_procedimento => 'inc_altexec');
    END;
    -- Procedimento : vrf_empresa
    -- Descrição : Procedimento responsável por verificar se o documento que esta sendo
    --             incluído já não pertence a uma empresa ou pessoa juridica, e para qual
    --             página do sistema será redirecionado.
    -- Entrada p_cnpj              - Documento
    --         p_id_tipo_documento - Tipo do documento da tabela TIPO_DOCUMENTO
    -- Histórico
    -- DATA       - DESENVOLVEDOR - REQUISITO - INFORMAÇÃO
    -- 15/01/2010 - ATILIO   -  #79229        - Implementação
    PROCEDURE vrf_empresa(
        p_cnpj IN VARCHAR2,
        p_id_tipo_documento IN tipo_documento.id_tipo_documento%TYPE)
    IS
      v_cnpj                pessoa_juridica.cnpj%TYPE;
      v_id_empresa          cliente.id_cliente%TYPE DEFAULT NULL;
    BEGIN
      v_cnpj:= fwutl.limpar_numero(p_cnpj);
      FOR lst IN ( SELECT fc.id_cliente as "Cliente",c.id_cliente, pj.id_pessoa_juridica
                     FROM cliente c, pessoa_juridica pj, frota_cliente fc
                    WHERE pj.id_pessoa_juridica = c.id_pessoa_juridica(+)
                      AND c.id_cliente = fc.id_cliente
                      AND pj.cnpj      = v_cnpj)
      LOOP
        v_id_empresa         := lst.id_cliente;
        EXIT;
      END LOOP;
      IF ( v_id_empresa IS NOT NULL ) THEN
        fwapl.redirecionar('f?p='||v('APP_ID')||':15011:'||v('APP_SESSION')||
          '::NO::P15011_CODIGO:'||v_id_empresa);
      ELSE
        fwapl.redirecionar('f?p='||v('APP_ID')||':15013:'||v('APP_SESSION')||
          '::NO:15013:P15013_PAGINA,P15013_CNPJ,P15013_ID_TIPO_DOCUMENTO:15012,'||formatar_docto(v_cnpj,p_id_tipo_documento)||','||p_id_tipo_documento);
      END IF;
      RETURN;
    EXCEPTION
      WHEN OTHERS THEN
        fwerr.gerar_exception(p_procedimento => 'pkg_frota_empresa.vrf_empresa');
    END;
    -- Procedimento : inc_alt_contrato
    -- Descrição    : Incluir/Alterar contrato para a empresa
    -- Histórico
    -- 18/01/2010 - Atilio - (79234) - Implementação
    PROCEDURE inc_alt_contrato(
        p_operacao CHAR(1),
        p_reg contrato_cliente%ROWTYPE
    IS
    BEGIN
      IF p_operacao = 'I' THEN
        ca_empresa_contrato_incluir(p_reg.id_cliente,p_reg.id_produto,p_reg.data_inicio,p_reg.data_fim,p_reg.comissao1,p_reg.comissao2,
                                    p_reg.forma_comissao1,p_reg.forma_comissao2,p_reg.dia_entrega,p_reg.id_agente);
      ELSE
        ca_empresa_contrato_incluir(p_reg.id_cliente,p_reg.id_produto,p_reg.data_inicio,p_reg.data_fim,p_reg.comissao1,p_reg.comissao2,
                                    p_reg.forma_comissao1,p_reg.forma_comissao2,p_reg.dia_entrega,p_reg.id_agente);
      END IF;
    END;
    -- Procedimento : inc_alt_contratoexec
    -- Descrição    : Incluir/Alterar contrato para a empresa
    -- Histórico
    -- 18/01/2010 - Atilio - (79234) - Implementação
    PROCEDURE inc_alt_contratoexec(
        p_operacao                 IN VARCHAR(1),
        p_id_cliente               IN contrato_cliente.id_cliente%TYPE,
        p_id_produto               IN produto.id_produto%TYPE,
        p_data_inicio              IN contrato_cliente.data_inicio%TYPE,
        p_data_fim                 IN contrato_cliente.data_fim%TYPE,
        p_comissao_1               IN contrato_cliente.comissao1%TYPE,
        p_comissao_2               IN contrato_cliente.comissao2%TYPE,
        p_forma_comissao1          IN contrato_cliente.forma_comissao1%TYPE,
        p_forma_comissao2          IN contrato_cliente.forma_comissao2%TYPE,
        p_dia_entrega              IN contrato_cliente.dia_entrega%TYPE,
        p_agente                   IN contrato_cliente.id_agente%TYPE
    IS
    BEGIN
      g_contrato_cliente.p_id_cliente     :=  p_id_cliente;
      g_contrato_cliente.p_id_produto     :=  p_id_produto;
      g_contrato_cliente.p_data_inicio    :=  p_data_inicio;
      g_contrato_cliente.p_data_fim       :=  p_data_fim;
      g_contrato_cliente.p_comissao_1     :=  p_comissao_1;
      g_contrato_cliente.p_comissao_2     :=  p_comissao_2;
      g_contrato_cliente.p_forma_comissao1:=  p_forma_comissao1;
      g_contrato_cliente.p_forma_comissao2:=  p_forma_comissao2;
      g_contrato_cliente.p_dia_entrega    :=  p_dia_entrega;
      g_contrato_cliente.p_agente         :=  p_agente;
      inc_alt_contrato(p_operacao => p_operacao
                      ,p_reg => g_contrato_cliente);
    EXCEPTION
      WHEN OTHERS THEN
        fwerr.gerar_exception(p_procedimento => 'pkg_frota_empresa.inc_alt_contratoexec');
    END;
    ---------------------------Final das Definições dos Procedimento e Funçoes ------------------------------
    BEGIN
      inicializar;
    END;
    SHOW ERRORSERRORS:
    105/20 PLS-00103: Encountered the symbol "(" when one of the following
             symbols was expected:
             : =), Default character varying large
             The symbol ": =" has been replaced by "(" to continue.
    110/42 PLS-00103: Encountered the symbol "(" when one of the following
             symbols was expected:
             : =. ), @% Default character
             The symbol ": =" has been replaced by "(" to continue.
    Warning: Package Body created with compilation errors.
    PROCEDURE inc_alt (
    ERROR at line 1:
    ORA-00900: invalid SQL statement
    Errors for PACKAGE BODY PKG_FROTA_EMPRESA:
    LINE / COL ERROR
    169 / 4 PLS-00103: Encountered the symbol "end-of-file" when one of
             following symbols was expected:
             begin end function package pragma procedure form

Maybe you are looking for

  • Nokia 6300 Text Message Options

    I own a Nokia 6300 which was Made in Hungary. It came with firmware revision version 5.00. I only see 6 options in my Text Message Settings and nothing seems to resolve it. There's supposed to be 10 options. I contacted Nokia care centre and they sug

  • PDF garbled when printed in Adobe Reader

    Hi I've made a document in Pages, then saved it as a Postscript file, and then converted it to a PDF in Preview. When I load it up in Adobe Reader 7, it comes up fine. However, when I print it out, all the text is garbled and the images are seriously

  • Managing exceptions in SQL

    Please assist with this little puzzle. Imagine 2 tables... Products and Stock tables. Products has columns: Product_no Site Status Stock has columns: Product_no Site Location Qty_on_hand Sample data: Products: 1000,MFG,A 1000,SRV,D 1000,DEM,A 1001,SR

  • Is it possible to open Account Search window in a new page

    Hi All, Is it possible to open Account Search window in a new page instead of displaying Account Search on Work center page. Any pointers will be helpful. Thanks, Udaya

  • Solaris 10 cd request

    Hi Is ther a way to get a solaris 10 cd , im in india any information is most welcome .