OCIDescribeAny() to describe a package

I tried to retrieve information about a package using
OCIDescribeAny(). My problem is when there is only one procedure
inside a package, my code doesn't work.If there are over two
procedures inside a package,my code can retrieve some of
proceures,then crashed. the following is part of code to
retrieve the information.Can any one help me to solve this
problem?
static void describe_package()
     // package to be described
     text *objptr;
     ub4 objp_len;
     OCIParam* parmh;//parameter handle
     OCIParam* arglst;     //level 0 arguemnt list handle
     OCIParam* arglst1;     //level 1 arguemnt list handle     
     OCIParam* arglst2;//level 2 arguemnt list handle
     OCIParam* arglst3;//level 3 arguemnt list handle
     OCIParam* arg;//level 0 arguemnt handle     
     OCIParam* arg1;//level 1 arguemnt handle
     OCIParam* arg2;//level 2 arguemnt handle
     OCIParam* arg3;//level 3 arguemnt handle
     ub2 numargs, numargs1,numargs2, numargs3;
     ub4 namelen, namelen1, namelen2, namelen3;
     ub4 i, j, k, m;
     //ub2     arglst_type;
     text* name;
     text* name1;
     text* name2;
     text* name3;
     sword retval;
     objptr = pkgname;
     objp_len = strlen(objptr);
     //describe handle
     checkerr (errhp, OCIHandleAlloc((dvoid *) envhp, (dvoid
**) &dschp,
(ub4) OCI_HTYPE_DESCRIBE,
(size_t) 0, (dvoid **) 0));
     if ((retval = (OCIDescribeAny(svchp, errhp, objptr,
objp_len, OCI_OTYPE_NAME,0,
                              OCI_PTYPE_PKG,
dschp))) != OCI_SUCCESS)
          if (retval == OCI_NO_DATA)
          printf("NO DATA: OCIDescribeAny on %s\n",
&objptr);
     else
/* OCI_ERROR */
          printf( "ERROR: OCIDescribeAny on %s\n",
&objptr);
          checkerr(errhp, retval);
          return;
     if (OCIAttrGet(dschp, OCI_HTYPE_DESCRIBE, &parmh, 0,
OCI_ATTR_PARAM, errhp))
          return ;
     if (OCIAttrGet(parmh, OCI_DTYPE_PARAM, &arglst, 0,
OCI_ATTR_LIST_SUBPROGRAMS, errhp))
          return ;
     //if (OCIAttrGet(arglst,OCI_DTYPE_PARAM, &numargs, 0,
OCI_ATTR_NUM_PARAMS, errhp))
     //     return ;
     if (arglst)
          OCIAttrGet(arglst,OCI_DTYPE_PARAM, &numargs, 0,
OCI_ATTR_NUM_PARAMS, errhp);
          for (i = 1; i <= numargs; i++)
               OCIParamGet (arglst, OCI_DTYPE_PARAM,
errhp, &arg, i);
               OCIAttrGet (arg, OCI_DTYPE_PARAM, &name,
&namelen, OCI_ATTR_NAME, errhp);
               OCIAttrGet (arg, OCI_DTYPE_PARAM,
&arglst1, 0, OCI_ATTR_LIST_ARGUMENTS, errhp);               
               if (arglst1)
                    OCIAttrGet
(arglst1,OCI_DTYPE_PARAM, &numargs1, 0, OCI_ATTR_NUM_PARAMS,
errhp);
                    for (j = 1; j <= numargs1; j++)
                         OCIParamGet (arglst,
OCI_DTYPE_PARAM, errhp, &arg1, j);
                         OCIAttrGet (arg1,
OCI_DTYPE_PARAM, &name1, &namelen1, OCI_ATTR_NAME, errhp);
                         OCIAttrGet (arg1,
OCI_DTYPE_PARAM, &arglst2, 0, OCI_ATTR_LIST_ARGUMENTS, errhp);
                         if (arglst2)
                              OCIAttrGet
(arglst2, OCI_DTYPE_PARAM, &numargs2, 0, OCI_ATTR_NUM_PARAMS,
errhp);
                              for (k = 1; k <=
numargs2; k++)
     OCIParamGet (arglst2, OCI_DTYPE_PARAM, errhp, &arg2, k);
     OCIAttrGet (arg2, OCI_DTYPE_PARAM, &arglst3, 0,
OCI_ATTR_LIST_ARGUMENTS, errhp);
     OCIAttrGet (arg1, OCI_DTYPE_PARAM, &name2, &namelen2,
OCI_ATTR_NAME, errhp);
     //OCIAttrGet (name1, OCI_DTYPE_PARAM, &arglst_type, 0,
OCI_ATTR_DATA_TYPE, errhp);                         
                                   if
(arglst3)
     OCIAttrGet (arglst3, OCI_DTYPE_PARAM, &numargs3, 0,
OCI_ATTR_NUM_PARAMS, errhp);
     for (m = 1; m <= numargs3; m++)
     OCIParamGet (arglst3, OCI_DTYPE_PARAM, errhp, &arg3, m);
     OCIAttrGet (arg3, OCI_DTYPE_PARAM, &name3, &namelen3,
OCI_ATTR_NAME, errhp);
     }//end for m
                                   }//end
arglst3
                              }//end for k
                         }//end arglst2
                    } //end for j
               }//end arglst1
          }//end for i
     }//end arglst
     //free the describe handle
     OCIHandleFree((dvoid *) dschp, (ub4) OCI_HTYPE_DESCRIBE);
Thanks a lot.

The arglist starts from 0th position for packages.
Try for (i=0; i<=numargs-1;++i).

Similar Messages

  • How to describe a packaged procedure

    Hi Gurus,
    is there a simple way to describe a packaged procedure? say for example I want to see what the parameters of procedure "SET_SCHEDULER_ATTRIBUTE" in dbms_scheduler.. currently I have to give
    SQL> desc dbms_scheduler
    on SQL*Plus and it scrolls to probably 10 pages and then I have to locate the correct procedure i am interested in..
    So my question is, is there a simple way to describe just the procedure? I tried desc dbms_scheduler.SET_SCHEDULER_ATTRIBUTE, but it doesn't work.
    My database versions is 10.2.. OS=Linux.
    Thanks in advance.

    Like this:
    SQL> select argument_name
      2        ,position
      3        ,data_type
      4        ,in_out
      5  from   dba_arguments
      6  where  owner = 'SYS'
      7  and    package_name = 'DBMS_SCHEDULER'
      8  and    object_name = 'SET_SCHEDULER_ATTRIBUTE'
      9  order by position
    10  ;
    ARGUMENT_NAME                              POSITION DATA_TYPE                      IN_OUT
    ATTRIBUTE                                         1 VARCHAR2                       IN
    VALUE                                             2 VARCHAR2                       IN

  • Use OCIDescribeAny to describe Procedure in a package?

    I used the following code retrieve the parameter information for
    procedures:
    OCIDescribeAny(svchp, errhp, objptr, objp_len, OCI_OTYPE_NAME,0,
              OCI_PTYPE_PROC, deschp);
    if (OCIAttrGet(deschp, OCI_HTYPE_DESCRIBE, &parmh, 0,
    OCI_ATTR_PARAM, errhp))
              return ;
         if (OCIAttrGet(parmh, OCI_DTYPE_PARAM, &arglst, 0,
    OCI_ATTR_LIST_ARGUMENTS, errhp))
              return ;
         if (OCIAttrGet(arglst,OCI_DTYPE_PARAM, &numargs, 0,
    OCI_ATTR_NUM_PARAMS, errhp))
              return ;
    If I pass a procedure which exists in a package, I will get a
    object does not exist error. How can I describe a procedure in a
    package using OCIDescribeAny ? Thanks.

    I tested it in the SQL Worksheet (rather than the PL/SQL editor), but I see the same behaviour as you when I try with your example in the PL/SQL editor. A little testing suggests that the problem is that the completion insight doesn't understand the context of where it is in the PL/SQL and so doesn't know what options to list.
    If I try adding the end for the new procedure and then going back to after the "(":procedure Proc_test_call
    is
    begin
    pkg_test2.proc_test2(
    end proc_test_call;I just get begin and declare as options - ie completion insight thinks I am no longer in scope of the package (as other package components not listed) and starting a new block.
    If I try adding an assignment before the procedure call (not logical, I know, but I had been testing with a function in my schema):procedure Proc_test_call
    is
    begin
      result := pkg_test2.proc_test2(I get what we should (parameters for proc_test2 and local scope items).
    Your workaround of adding the closing backet for the procedure call helps the completion insight understand the context of where it is and so it can give the right options.
    I have previously avoided parameter completion insight as earlier versions had big performance problems when connected to a schema with a large number of PL/SQL objects (our main schema has 5.5 million records in all_arguments), but the performance has certainly been fixed. However, the PL/SQL editor still seems pretty hit and miss as to whether the parameter completion insight works, which seems largely to be because it doesn't always the context of where it is in the PL/SQL.
    theFurryOne

  • F4 describe for packages with public synonyms error

    v1.1.0.23 If I hit the F4 key to do a describe for a package that has a public synonym, an error box pops up that says "No valid query. No query found for version of the selected database" . After 5 presses of the OK button, a flyout window displays that contains the package spec.

    Hi
    I am not sure but maybe you need to use this command:
    SQL> insert into ums_sita_address values
    ('EK','EK','DXB',SITA_ADDRESSES_TY());
    SITA_ADDRESSES_TY() instead SITA_ADDRESSES_NT
    Regards

  • What is the difference between the function declared in the package and pac

    What is the difference between defining a function in the package and package body ?
    Edited by: user10641405 on Nov 19, 2009 1:29 PM

    If you describe a package, you will only see the functions declared in the spec.
    If you only declare them in the body then they are not available to other packages (they are private to the package, not public)

  • Existing state of packages has been discarded...

    Hi all,
    I know this is a long shot and probably you need more details to help, but please take a look in case you've encountered something similar before... It is a pretty interesting problem.
    Ok, I have two packages, say, A and B. Package A is composed of utility functions, and package B makes use of those functions. These packages are compiled as part of the schema installation, where package A is always compiled first. I also have unit test scripts for each procedure in each package.
    Now, after schema installation, when I run the unit test for some procedures in package B, I get the following error:
    ORA-04068: existing state of packages has been discarded
    ORA-04065: not executed, altered or dropped stored procedure "my_schema.pkg_A"
    ORA-06508: PL/SQL: could not find program unit being called
    ORA-06512: at "my_schema.pkg_B", line 18
    ORA-06512: at line 5
    Some interesting notes:
    - I can run the unit test of all pkg A procedures. I can also describe the package. Which seems to me that pkg A has been compiled successfully.
    - If I log into a sqlplus session, run the unit test for a pkg B procedure, which then fails with the above message. Then I run a unit test of a pkg A proceudre, which succeeds. Then I run the same pkg B unit test, it will work then. And all the other pkg B procedures will work from this point on.
    - But if I log out from sqlplus session, and log in again, and run the pkg B procedure unit test again, it will fail as before.
    - Certain procedures in pkg B have no problem running. They also call pkg A procedures. However, the pkg A procedures are always invoked in the where or order by clauses in these cases. The pkg B procedures that call pkg A procedure in a standalone statement will always fail.
    - The fact above made me suspect that function-based indexes (which were created using pkg A procedures) were used in cases where pkg B procedures work. And that in those cases pkg A hasn't really been invoked. However, when I monitor those indexes using v$object_usage, it shows they are not used. (I have a very small set of data.)
    - After schema installation, if I compile pkg B again, the problem will disappear.
    Does this ring a bell to anyone? Any help will be appreciated.
    Thanks,
    Gloria Chung

    Thanks for reading and responding.
    I'm compiling both header and body for both packages.
    I ran the following query after schema installation, which returned 0:
    select count(*) from user_objects where status='INVALID';
    The schema installation involved putting new copies of both package A and B.
    If I only recompile the package body after installation, it will still 'cure' the problem. I.e. if I run any of the affected pkg B unit test, it will run successfully.
    It is assumed there is no schema before 'schema installation'.
    Thanks,
    Gloria

  • PL/SQL package valid, but Oracle cannot "see" it

    We recently upgraded from 8.1.7.2 to 8.1.7.4. A strange thing I have noticed is that even though a given package and spec are are listed as valid in the dba_objects table, I am unable to describe the package nor execute any of the package procedures/functions. When trying to execute, it indicates that the package does not exist. When I do a describe on it, it returns a blank line, yet I can pull the code from the dba_source table. To fix the problem, all I have to do is an "alter package xxxx compile".
    Anyone know what could cause this problem. I'm not sure, but think it could be related to 8.1.7.4 since I never noticed it when we were on 8.1.7.2. This can be quite troublesome to trouble shoot.

    Steven, I don't have an answer for your problem, but we experience a similar problem on 8.1.7.4. All packages are valid, but a call to a particular packaged function, on a brand new session, results in: ORA-06508 PL/SQL: could not find program unit being called.
    Our "cure" is to compile the respective package body, although it is already compiled and valid, at least according to the data dictionary.

  • BASELINE PACKAGE V 5.600 best practice,preconfigured smartforms isfor free?

    Hello i want install in the system of my customer the BASELINE PACKAGE V 5.600 because i need preconfigured smartforms.
    I have a question. if i use the user id of my customer in servicemarketplace the customer have to pay BASELINE PACKAGE V 5.6000 or IS FOR FREE??
    here is described the package: http://www.scribd.com/doc/6120793/SAP-Best-Practices-Whatsnew-V5600-En
    here the path on servicemarketplace:
    Installations and Upgrades
    Installations and Upgrades -> SAP Best Practices -> SAP BP BASELINE PACKAGE -> SAP BP BASELINE -> Package I -> BASELINE PACKAGE - V1.- V5.600
    Thanks a lot!!

    Hi,
    If you are able to download it directly then i dont think it is a paid consulting.
    Prior to providing the service, SAP mentions that it would be a paid service & asks for your approval. If you give the approval, then only it processes further.
    If you are not prompted with any such information, then please go ahead & download.
    Best regards,
    Prashant

  • Can't replace an app package

    When I click "Replace" link I get "ShowDialog failed." message at the top of the "Upload and describe your package" form. Using IE11 on Windows 8.1. Everything was okay yesterday.

    try it bit later again... mostly works for me
    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

  • Organizing package building wiki entries

    Right now we have three separate wiki entries that describe the package building in Arch:
    http://wiki.archlinux.org/index.php/Arc … _Standards
    http://wiki.archlinux.org/index.php/The … guidelines
    http://wiki.archlinux.org/index.php/ABS … _Explained
    I started maintaining packages a few months ago, and while I was learning how to build packages I was getting a little tired of having to sift through multiple resources with duplicate information. This is kind of a shameless plug, but I took the entries, updated and re-wrote them:
    http://www.bytetrap.com/blog/2008/09/16 … rch-linux/
    Thoughts? Every factoid mentioned in those three wiki entries -should- be mentioned in my post. If I get enough thumbs up I'd be happy re-organize the current three wiki entries into the single entry that I compiled.

    btartsa wrote:
    I noticed in the "preparing the file'" section you recommend using pacman -Up (package file). What is the benefit of using the -p flag?
    -p, --file
        Signifies that the package supplied on the command line is a file and not an entry in the database. The file will be decompressed and queried. This is useful in combination with --info and --list.
    I'm just wondering because I've never used it. Nice work!
    I took that line pretty much verbatim from the wiki entry, but the -p flag I believe ensures that you install the package that you built instead of the pre-built binary from the pacman database. So this only really applies/comes in handy if you build a package from the PKGBUILD file when the binary already exists, preventing you from installing the binary.
    Also, I don't think this is usually a big problem either because the package you build is usually named pkgname.tar.gz, while when you query a package via pacman, you just use the pkgname. So you usually just do pacman -U pkgname.tar.gz instead of pacman -U pkgname anyway. If for some reason your package file was named pkgname, you would have to use the -p flag to ensure that you install your pakcage instead of the pre-built binary.

  • Packages of stored procedures in E-Business Suite 11i

    Hello,
    Where can I find information on stored procedures and packages in EBS? I have tried Enterprise Manager but that doesn't have sufficient information about what a procedure does. I am looking for packages that let me create a customer, query a product, create an order, delete an order, query order list etc. Is there some web site that describes those packages?
    Thanks.
    Rahul

    refer etrm on metalink. etrm is available on metalink which gives all the API's available and a brief explanation of the same.

  • Sending email using UJ_CUSTOM_LOGIC BADI

    Hi all,
    I'm currently working on a BPC (BusinessObjects Planning and Consolidation) project. BPC provides a UJ_CUSTOM_LOGIC BADI which can be used to extend the functionality of script logic. For example, each time a user saves data it calls a logic script. It is possible to call the BADI from this logic script.
    I d'ont relally know ABAP but I need to determine if my need can be solved using ABAP: when the user saves data it calls the BADI. Is it possible to send an email from this BADI? HOw can I do it?
    thanks for your help,
    Alex

    Hi Gersh,
    I created a simple BADI which rises described exeption event of class CX_UJ_STATIC_CHECK.
    What can I say - after launching described code package status becomes "Failed".
    But as for the transfer of my own error message text - it does not work.
    I was trying to transmit to the class constructor my own structure instead of CX_UJ_STATIC_CHECK=>IF_T100_MESSAGE~DEFAULT_TEXTID, namely
    DATA: l_mytext LIKE IF_T100_MESSAGE=>T100KEY.
      l_mytext-msgid = 'UJ0_EXCEPTION'.
      l_mytext-msgno = '000'.
      l_mytext-attr1 = '=== Here is an error message1 !!! ==='.
      l_mytext-attr2 = '=== Here is an error message2 !!! ==='.
      l_mytext-attr3 = '=== Here is an error message3 !!! ==='.
      l_mytext-attr4 = '=== Here is an error message4 !!! ==='.
      " Let's test Gersh sample code
      RAISE EXCEPTION TYPE CX_UJ_STATIC_CHECK
                 EXPORTING
                    textid      = l_mytext.
    As a result it looks like a new instance contains this structure, but it is not used in a CX_UJ_STATIC_CHECK error handler.
    I'll write if I find details.
    Best regards,
    Konstantin.

  • App Certification Fails While uploading into Windows Phone Store..

    Hi Everyone,
    I am facing an issue from last few days and stuck badly .
    Whenever i am uploading my app in windows phone store getting the below error for everytime..
    Your app submission does not include a privacy policy. Apps that use, collect, or share personal information must include a privacy policy that informs users how
    this information is used, stored, secured, and disclosed. See policy 10.5.1 for details about the requirements for a privacy policy.
    Please let me know what i need to do to resolve the above issue. What step i need to take..
    Thanks in advance!!!!

    As part of the submission process (Upload and describe your package) there is a section where you can add a privacy policy.  It is a step you need to do

  • Acces the same array in other .as file gives message it don't exist..

    I am working on a little shooter as a project for learning as3.
    I have struggled a lot with as3 syntax but am willing to bite the bullet and hope someday the light will shine...
    the problem:
    I have created three movieclips in a fla.
    I connected 4 .as files to that fla:
    bomber.as
    bullet.as
    kanon.as
    shooter.as (connected to the file/stage itself).
    All the behaviors of the mc's are described in packages in their own connected .as file.
    I want to do a hitTestObject with all the "bullets" and the "bomber".
    inside the as file f the bullet I make an array to store the bullets.
    when I want to acces this same array in another .as file i get a message it don't exist..
    Someone can suggest a solution...?
    any help is very much appreciated!

    package {
        import flash.display.MovieClip;
        import flash.events.MouseEvent;
        import flash.events.KeyboardEvent;
        import flash.events.*;//ik mankeer een event; ik weet niet welke, daarom importeer ik maar alle events...
        import flash.utils.Timer;
        import flash.utils.*;
        import kanon_mc;
        public class shooter extends MovieClip {
            public var varkanon:kanon_mc=new kanon_mc;
            public function shooter() {
                mijnTimer.addEventListener(TimerEvent.TIMER,tikTak);
                mijnTimer.start();
                varkanon=new kanon_mc  ;
                stage.addChild(varkanon); 
                varkanon.x=10; 
                varkanon.y=10; 
                //varkanon.x=stage.stageHeight-varkanon.height;
                stage.addEventListener(KeyboardEvent.KEY_DOWN,keyDownHandler);
                stage.addEventListener(KeyboardEvent.KEY_UP,keyUpHandler);
    TypeError: Error #1009: .... object  null ...
    at kanon_mc()
    at shooter()
    what am I doing wrong?
    the shoother is attached to the document and kanon_mc is a movieclip in the library.

  • SQL Developer 4.0: 'Open Declaration' bugs

    There are several issues I have with this function:
    1) Sometimes, when used, it would just "hang" the UI, loading the CPU for 50% for a few seconds.
    2) It doesn't seem to work for functions/procedures outside packages, you have to use 'Popup describe' instead. Is that intended?
    3) I don't know if it's actually related to 'Open Declaration', but Logging Page sometimes throws a pair oracle.dbtools.parser.plsql.DictionaryQuery errors, supposedly around the same time hangs occur I may be wrong on this one, but still thought it's worth reporting:
    Error 1:
    select null name, -1 LINE, -1 COL, null USAGE,
    case when obj.object_type like 'JAVA%' then 'JAVA' else obj.object_type end TYPE,
    OWNER, case when obj.object_type like 'JAVA%' then 'JAVA' else obj.object_type end OBJECT_TYPE,
    obj.OBJECT_NAME
    from sys.dba_objects obj where rownum <= 10 and obj.object_type != 'TABLE PARTITION' and obj.object_type != 'TABLE SUBPARTITION' and obj.object_type != 'JAVA CLASS' and object_name like :object_name and object_type = :object_type
    union all
    select null name, -1 LINE, -1 COL, null USAGE,
    case when obj.object_type like 'JAVA%' then 'JAVA' else obj.object_type end TYPE,
    OWNER, case when obj.object_type like 'JAVA%' then 'JAVA' else obj.object_type end OBJECT_TYPE,
    obj.OBJECT_NAME
    from sys.dba_objects obj where rownum <= 10 and obj.object_type != 'TABLE PARTITION' and obj.object_type != 'TABLE SUBPARTITION' and obj.object_type != 'JAVA CLASS' and object_name like :object_name and object_type = :object_type
    union all
    select * from (select text name, LINE, instr(upper(text),upper(:text)) COL, null USAGE, TYPE, OWNER, type OBJECT_TYPE, name OBJECT_NAME
    from sys.all_source where rownum <= 10
    and upper(text) like upper(:text1) and name not like 'BIN$%'
    and (instr(text,'--')<=0 or instr(text,'--')>instr(upper(text),upper(:text2)))
    and (instr(text,'/*')<=0 or instr(text,'/*')>instr(upper(text),upper(:text3)))
    and type like 'PACKAGE%' and name = :name
    ) where col = 1 or substr(name/*text*/,col-1,1)=' '
    order by type, line and owner = :owner
    Error 2:
    ORA-00907: missing right parenthesis
    The 'and owner = :owner' part is obviously misplaced, causing the error.
    P.S. A bit off-topic: SQLDev gives me quite a lot of various warnings both on logging page and in console. They don't seem to break anything, but should I report them anyway? And should I create a separate thread for each group of these, if I do?

    Okay, I've done some testing. It's far from exhaustive, but shows that 'Open Declaration' works differently in worksheet and package pl/sql editor, and that it depends on the case of the procedure/function that is inspected!
    I also found out the cause of ORA-00907 message.
    The cause of hangs also became somewhat possible to determine.
    Sorry I couldn't test it more, but I already wasted about 2 hours on it, because I did it on our test (much slower) database, and each hang lasted about half a minute. I also didn't test inter-package 'Open Declaration' behavior, because I still have work to do. Hopefully what I found will be enough.
    Also, another note is that "hangs" didn't burn the CPU while I tested it, unlike on production database.
    We don't have HR schema anymore, so I unlocked SCOTT/TIGER forgotten by everyone, which had no functions/packages/whatsoever, only 4 tables.
    All tests were done under 'SCOTT' user. Here's the test suite:
    Creating the necessary function, procedure and package:
    create or replace function z_test_opendecl_f return number as
    begin
      return 1;
    end z_test_opendecl_f;
    create or replace procedure z_test_opendecl_proc as
    begin
      null;
    end z_test_opendecl_proc;
    create or replace package z_test_opendecl_pack is
      function call_z_func return number;
      procedure call_z_proc;
    end z_test_opendecl_pack;
    create or replace package body z_test_opendecl_pack is
      procedure call_z_proc is
      begin
      --call lowercase external proc without schema
      --popup describe works
      --open declaration throws "PL/SQL unit Z_TEST_OPENDECL_PROC does not exist" message box
      --AND (nailed it!) writes ORA-00907 message I mentioned earlier in point (3) to logging page.
      Z_TEST_OPENDECL_PROC;
      --call lowercase external proc without schema
      --same behavior as above
      z_test_opendecl_proc;
      --call mixed case external proc without schema
      --same behavior as above
      Z_Test_Opendecl_Proc;
      --call lowercase external proc with schema
      --popup describe works
      --open declaration hangs, then opens procedure
      scott.z_test_opendecl_proc;
    --call mixed case external proc with schema
      --popup describe works
      --open declaration hangs, then gives messagebox
      scott.Z_Test_Opendecl_Proc;
      end call_z_proc;
      function call_z_func return number is
      vRet number;
      begin
      --Same behavior as with procedures above
      vRet := z_test_opendecl_f;
      vRet := scott.z_test_opendecl_f;
      --Calling the procedure inside the package
      --without schema, uppercase
      --popup describe opens spec
      --open declaration hangs, then opens spec
      CALL_Z_PROC;
      --without schema, uppercase
      --popup describe opens spec
      --open declaration hangs, then opens spec
      Z_TEST_OPENDECL_PACK.CALL_Z_PROC;
      --with schema, uppercase
      --popup describe opens 'SCOTT' user popup
      --open declaration hangs, then opens spec
      SCOTT.Z_TEST_OPENDECL_PACK.CALL_Z_PROC;
      --Inline SQL, 'Open Declaration' behavior:
      select Z_TEST_OPENDECL_F --gives a messagebox, whatever the case
      into vRet
      from dual d
      where z_test_opendecl_f = 1 -- messagebox
      or scott.z_test_opendecl_f = 1 --opens declaration
      or CALL_Z_FUNC = 1 -- scrolls to function declaration
      or Z_TEST_OPENDECL_PACK.CALL_Z_FUNC = 1 --hangs, opens declaration
      or SCOTT.Z_TEST_OPENDECL_PACK.CALL_Z_FUNC = 1; --does NOTHING
      end call_z_func;
    end z_test_opendecl_pack;
    (Comments inside package body apply to Package Body Editor).
    Here are the tests for worksheet:
    --Worksheet tests
    declare
      vRet number;
    begin
      --NO SCHEMA SPECIFIED
      --call the procedure
      --both popup describe and open declaration open the procedure page
      Z_TEST_OPENDECL_PROC;
      --call the procedure - lowercase
      --both popup describe and open declaration open the procedure page
      z_test_opendecl_proc;
      --call the procedure - mixed case
      --popup describe opens the page
      --open declaration shows "PL/SQL unit Z_Test_Opendecl_Proc does not exist" messagebox
      Z_Test_Opendecl_Proc;
      --call the function
      --both popup describe and open declaration open the function page
      vRet := Z_TEST_OPENDECL_F;
      --call the function - lowercase
      --both popup describe and open declaration open the function page
      vRet := z_test_opendecl_f;
      --call the function - mixed case
      --popup describe opens the page
      --open declaration shows "PL/SQL unit Z_TEST_opendecl_f does not exist" messagebox
      vRet := Z_TEST_opendecl_f;
      -- call the package procedure
      -- popup describe opens package spec
      -- open declaration hangs, then opens package spec
      Z_TEST_OPENDECL_PACK.CALL_Z_PROC;
      -- call the package function
      -- popup describe opens package spec
      -- open declaration hangs, then opens package spec
      vRet := Z_TEST_OPENDECL_PACK.CALL_Z_FUNC;
      -- call the package function - mixed case
      -- popup describe opens package spec
      -- open declaration hangs, then shows "PL/SQL unit CALL_z_func does not exist" messagebox
      vRet := Z_TEST_OPENDECL_PACK.CALL_z_func;
      --inline SQL
      --Shows the same behavior
      select Z_TEST_OPENDECL_F --works
      into vRet
      from dual
      where Z_TEST_OPENDECL_F = 1 -- works
      or Z_TEST_OPENDECL_PACK.CALL_Z_FUNC = 1 -- hangs, but works
      or Z_TEST_opendecl_f = 1; -- messagebox
      --WITH SCHEMA SPECIFIED
      --Usual calls mostly exhibit the same behavior, except all of them hang on "Open Declaration" now
      -- call the package function
      -- popup describe opens 'SCOTT' user popup (!?)
      -- open declaration hangs, then opens package spec
      vRet := SCOTT.Z_TEST_OPENDECL_PACK.CALL_Z_FUNC;
      --inline SQL
      --Shows the same behavior
      select SCOTT.Z_TEST_OPENDECL_F --works
      into vRet
      from dual
      where SCOTT.Z_TEST_OPENDECL_F = 1 -- works
      or SCOTT.Z_TEST_OPENDECL_PACK.CALL_Z_FUNC = 1 -- hangs, but works
      or SCOTT.Z_TEST_opendecl_f = 1; -- messagebox
    end;
    There was also an error on production DB I wasn't able to reproduce while testing:
    while editing package body, calling 'Open Declaration' on function name inside inline SQL did nothing - neither the message box appeared nor declaration was opened, it also doesn't hang.
    I can't disclose the names, but it looks like this:
    select myFunction(t.id,vLocalVar) into vLocalVar2 from tablename t;
    We have a lot of objects on production, maybe it times out or something, I don't know. Autocomplete also doesn't work unless I call it explicitly with ctrl+space.
    An assumption regarding the hangs: we have a ton of public synonyms and a lot of java objects; the hangs are probably related to poor java object querying performance discussed in neighboring topic.

Maybe you are looking for