COLLECTION in PROCEDURE

how I pass a collection data through OUT parameter in PROCEDURE
SQL>create or replace type mytype as object(eid number,empname varchar2(20));
SQL> create or replace type mytype_nt as table of mytype;
SQL> ed
Wrote file afiedt.buf
1 create or replace procedure myproc(dept in number,aaa out mytype_nt) is
2 begin
3 execute immediate 'select empno,ename from emp where deptno=:1'
4 bulk collect into aaa using dept;
5* end;
SQL> /
Procedure created.
but when I tried to execute this then error has come like
SQL> ed
Wrote file afiedt.buf
1 declare
2 bbb mytype_nt:=mytype_nt();
3 begin
4 myproc(10,bbb);
5 for i in 1..bbb.count loop
6 dbms_output.put_line(bbb(i).eid);
7 end loop;
8* end;
SQL> /
declare
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected - got -
ORA-06512: at "SCOTT.MYPROC", line 3
ORA-06512: at line 4
thankx in advance

You have to call the constructor (mytype()) of the object to initialize it. Besides, there is no need for dynamic SQL. Replace the execute immediate command with
select mytype(empno, ename) bulk collect into aaa from emp where deptno = dept;Regards,
Gerd

Similar Messages

  • Can we Pass Table or Collection in procedure

    Hello All,
    i want to know that can we pass normal tables or PL/SQL tables as parameters to a procedure or function in Oracle 8i/9i.
    If yes the pls let me with an example
    Thanks in advance

    can we pass normal tables or PL/SQL tables as parameters Normal tables, no. Their data as resultsets, yes, using REF CURSOR parameters. we can use collections as paarmeters.
    If yes the pls let me with an example We use them just like any other parameter. Does the documentation have examples? of course it does!!
    Cheers, APC

  • How to use a collection in procedure

    I am having code as:
    type cur_list is ref cursor;
    type TypeList IS TABLE OF tab1.col1%TYPE;
    proc (list in TypeList , p_cur out cur_list ) is
    begin
    open cur_list for select * from tab1 where col1 in (select col1 from list);
    end;
    but.... while opening cursor it is giving error as : PL/SQL types cannot be used in sql statement.
    Please help me

    user13044793 wrote:
    I am having code as:
    type cur_list is ref cursor;
    type TypeList IS TABLE OF tab1.col1%TYPE;
    proc (list in TypeList , p_cur out cur_list ) is
    begin
    open cur_list for select * from tab1 where col1 in (select col1 from list);
    end;
    but.... while opening cursor it is giving error as : PL/SQL types cannot be used in sql statement.
    Please help meIt's correct. The SQL engine cannot access type structures you declare in PL/SQL code. It's like asking one program to go and hack into another program's memory and understand the structures it uses for it's datatypes. SQL and PL/SQL are two seperate processes. SQL can only understand datatypes that can be created as database objects.

  • How to write a procedure using collections

    how can we define collections inside procedure and use it
    i am getting an error executing this proc
    create or replace procedure p_collections
    is
    type calendar is varray(366) of  date;
    calendar c1;
    begin
    for i in 1 .. 100
    loop
    select sysdate bulk collect into c1 from dual;
    end loop;
    DBMS_OUTPUT.PUT_LINE(c1);
    end;Edited by: Rahul_India on Sep 12, 2012 2:54 PM
    Edited by: Rahul_India on Sep 12, 2012 3:07 PM

    That's because you only have one value in the array.
    Here is sample code that you can test in the SCOTT schema.
    set serveroutput on;
    declare
      cursor my_cur is
      select empno from emp;
      type my_type is table of emp.ename%type;
      type my_type2 is table of emp.empno%type;
      dizi my_type;
      dizi2 my_type2;
      query VARCHAR2(100);
    begin
      open my_cur;
      fetch my_cur bulk collect into dizi2;
      close my_cur;
      for i in dizi2.first..dizi2.last
      loop
        dbms_output.put_line(dizi2(i));
      end loop;
    end;
    /Or another sample using a LIMIT clause
    The FETCH does a BULK COLLECT of all data into 'v'. It will either get all the data or none if there isn't any.
    The LOOP construct would be used when you have a LIMIT clause so that Oracle would 'loop' back to
    get the next set of records. Run this example in the SCOTT schema and you will see how the LIMIT clause works.
    I have 14 records in my EMP table.
    DECLARE
      CURSOR c1 IS (SELECT * FROM emp);
      TYPE typ_tbl IS TABLE OF c1%rowtype;
      v typ_tbl;
    BEGIN
      OPEN c1;
      LOOP                                                 --Loop added
        FETCH c1 BULK COLLECT INTO v LIMIT 3; -- process 3 records at a time
            -- process the first 3 max records
           DBMS_OUTPUT.PUT_LINE('Processing ' || v.COUNT || ' records.');
            FOR i IN v.first..v.last LOOP
                DBMS_OUTPUT.PUT_LINE(v(i).empno);
            END LOOP; 
        EXIT WHEN c1%NOTFOUND;
      END LOOP;
      DBMS_OUTPUT.PUT_LINE('All done');
    END;In the FOR loop you would do any processing of the nested table you want to do
    and could use a FORALL to do an INSERT into another table.

  • How to bypass FORALL in SELECT .. BULK COLLECT

    Using Oracle 8.1.7
    I developed a stored procedure LOT
    TYPE TIds IS Table of Integer;
    TYPE TFloats IS Table of Float;
    procedure LOT(Ids TIds) ....
    is
    Prices TFloats;
    Quantities TFloats;
    begin
    for I in 1..Ids.Count loop
    SELECT ...
    BULK COLLECT INTO Prices, Quantities, ...
    WHERE ... = Ids(I)
    end loop;
    end;
    For each Id from IDS collection my procedure SELECTs several
    rows (avg. 2 or 3 rows). IDS contains about 1000 - 10000 items.
    Productivity is very low.
    Because is the many context switches
    between SQL engine and PL/SQL engine.
    The point is to collect all data by single 'huge' SELECT instead
    of numerous 'short' SELECTs.
    I. e. I need somethng like
    FORALL I in 1..Ids.Count
    SELECT ...
    BULK COLLECT INTO Prices, Quantities, ...
    WHERE ... = Ids(I)
    or like this
    FORALL I in 1..Ids.Count
    SELECT ...
    WHERE ... = Ids(I) RETURNING ... BULK COLLECT INTO ...
    I know it's invalid syntax because PL/SQL doesn't support BULK
    COLLECT clause for SELECT in FORALL loop.
    How should I bypass the problem?
    Is a proper way to use temporary table as storehouse for IDS collection?
    Something else?
    Regards,
    Piter Elagin (AlienZzzz)

    Hi Ivan,
       the problem is that the port is configurable at installation time.  On a NetWeaver 04 portal, I believe the default was 50000.  That should get you to one of the servers.  You may try 50100, 50200, etc. 
    You can also ask who ever did the installation.  the other place to look is the webdispatcher configuration file.  It would have to know the server and port to dispatch to.
    Hope that helps.
    John

  • Object Type and Bulk Collect/Forall

    How can I bulk collect into (and read from) a collection which is a table of an object type such as
    CREATE TABLE base_table (
         attr1 NUMBER,
         attr2 NUMBER,
         attr3 NUMBER,
         attr4 NUMBER);
    CREATE OR REPLACE TYPE rec_t IS OBJECT (
         attr1 NUMBER,
         attr2 NUMBER,
         attr3 NUMBER,
         attr4 NUMBER);
    CREATE OR REPLACE TYPE col_t IS TABLE OF rect;
    In my pl sql code I instantiate the collection type and want to populate it with a BULK COLLECT - statemt:
    PROCEDURE test IS
    v_col col_t;
    BEGIN
    SELECT rec_T(attr1, attr2, attr3, attr4)
    BULK COLLECT INTO v_col
    FROM base_table
    FORALL i IN v_col.FIRST..v_col.LAST INSERT INTO base_table VALUES (rec_t(v_col(i)));
    END;
    ? If I do it this way I get the following exception on the FORALL insert:
    PL/SQL: ORA-00947: not enough values
    Edited by: user12149927 on 22.01.2010 00:48

    try like this
    CREATE TABLE BASE_TABLE
      ATTR1  NUMBER,
      ATTR2  NUMBER,
      ATTR3  NUMBER,
      ATTR4  NUMBER
    CREATE OR REPLACE TYPE rec_t IS OBJECT (attr1 number, attr2 number, attr3 number, attr4 number);
    CREATE OR REPLACE TYPE col_t IS TABLE OF rec_t;
    CREATE OR REPLACE PROCEDURE test
    IS
       v_col   col_t;
    BEGIN
           SELECT   rec_t (attr1, attr2, attr3, attr4)
       BULK COLLECT INTO   v_col
             FROM   base_table;
       INSERT INTO base_table
          SELECT   *
            FROM   table (CAST (v_col AS col_t));
    END;Regards,
    Mahesh Kaila
    Edited by: Mahesh Kaila on Jan 22, 2010 12:56 AM

  • Collect pattern in BPM

    Hi All,
    1) On which field I should use correlation in order to post POs into R/3 using Collect Pattern procedure in BPM?
    2)What is the advantage of using Collect Pattern in BPM?

    Hi Krishna,
    Pls give complete scenario, so that exacltly we can help how to use.
    Just for information on collect pattern
    BPM CollectPattern..
    http://help.sap.com/saphelp_nw2004s/helpdata/en/08/16163ff8519a06e10000000a114084/frameset.htm
    Thanks,
    venu

  • Packages Vs. Procedures

    Hi
    Can any one tell the advantages of using Packages Vs. Procedures
    Thanks
    Samir

    As far as I know, they are two completely different things.
    Procedures are blocks of code which perform certain tasks. Packages are "containers" which can contain ,among other things, a collection of procedures. Packages are a way to organize a collection of procedures which might have some common element. So, the question should be whether or not a given set of procedures should be put into a package.
    I hope this helps.
    null

  • P.O - DIFF. BETWEEN INDIVIDUAL RELEASE & COLLECTIVE RELEASE

    Dear All ,
                           Kindly explain the difference individual release & collective release , as i m using ME29N to release here this P.O is to be released by 3 persons - execut. Mgr & G.M , what is scenario in Collective rel procedure
    sap11

    Hi
    It is not possible to release all POs in one time through ME28.
    Through by this Tcode you can view  list of all unreleased POs under one released code then one by one you can release all POs.
    In SAP, there is not any provision to release all POs in one time.
    Vishal...

  • Passing Ref Cursor to Oracle Stored Procedure Via C#

    Hi all,
    I am new to oracle and stuck with an issue. I have three insert stored procedures for three different tables. Two of them have multiple rows to be inserted, which is currently done via iterating through each row and insert to db in C# code. My requirement is to merge these three procedures in one and instead of iterating from C# code send table rows as (ref cursor or collection) to procedure and the procedure will handle the rest.
    I read that ref cursor only works if you're data is in database as it reference the memory but in my case data is build on client side.
    I am using Oracle 11i and ASP.Net 2.0
    Can any help me on this please?
    Edited by: 929463 on Apr 23, 2012 12:38 AM

    929463 wrote:
    I am new to oracle and stuck with an issue. I have three insert stored procedures for three different tables. Two of them have multiple rows to be inserted, which is currently done via iterating through each row and insert to db in C# code. My requirement is to merge these three procedures in one and instead of iterating from C# code send table rows as (ref cursor or collection) to procedure and the procedure will handle the rest.Why a single procedure? How is the procedure to determine the target table to insert the data into? And please - no dynamic SQL as that is 99% of the time wrong.
    A ref cursor is something that PL/SQL creates - with the purpose of passing the cursor handle to your code. This enables the actual SQL statement for that cursor to be moved from client code, into a PL/SQL stored proc. It abstracts the client from having to understand SQL, understand the data model and so on. All clients use the same PL/SQL proc and thus the same code for creating that cursor. Thus no issue of some clients getting it half right or half wrong and dealing with data inconsistencies between clients.
    The PL/SQL proc can be tuned and optimised, modified for catering for data model changes and so on. Without your client code having to be even recompiled as it is isolated against these server changes.
    For all other interaction (running PL/SQL code, doing insert/update/delete/etc SQL statements), you need to create the cursor yourself in your code.
    Also, the SQL engine only sees cursors. There are no differences between cursors. The client (e.g. PL/SQL) can call it a reference cursor, or an implicit cursor, or a DBMS_SQL cursor.. the SQL engine does not know that and does not care.
    A ref cursor is simply a special type of client interface to a SQL cursor, allowing PL/SQL to create that SQL cursor and then pass the handle of that SQL cursor to other code to consume that cursor.
    Okay, so if you want to insert data, you need in your code to create a cursor. This can be a SQL INSERT cursor - the actual insert statement. Or it can be a PL/SQL call - an anonymous PL/SQL code block that calls a stored proc that performs the insert (after applying validation and business logic).
    The cursor will have one or more bind variables. Your client will pass values for these variables and the server-side code (SQL or PL/SQL) will be executed using this as variable data.
    You can for example create a cursor as follows:
    begin
      DoFunkyInsert( :1, :2, :3 );
    end;
    {code}
    3 bind variables are expected. You can now in the client build an array for each of these variables, containing a 100 values each (total of a 100 rows to insert). Do a single execute of the cursor, and tell Oracle that the bind is actually a 100 element array.
    The complete array ships to Oracle - Oracle opens a loop and execute the cursor for each element in the array.
    This is called bulk binding.
    An alternative approach is to define the bind variable as a collection (a non-scalar value). And then code the PL/SQL procedure to open a loop and iterate through the collection/array, inserting a row per iteration.
    The binding itself is more complex as your code know needs to understand Oracle object types and be able to define an array/collection that is a valid Oracle non-scalar data type.
    The +Oracle Call Interface+ (OCI) is quite flexible in this regard. However, as you work via an abstraction layer (e.g. ADO, OleDB, ODBC, etc) your code is subject to whatever functionality this abstraction layer makes available to your code. And this is seldom includes all the power, functionality and flexibility of the (more complex) OCI itself.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Can't make any calls to Canada or even collect cal...

    I installed Skype yesterday and bought a subscription for unlimited calls to Canada. I called numbers I have called for months and all I get is "invalid number". I then tried the collect call procedure to a number specificlly for that and kept getting that the call could not be accepted. I am desperate to get in touch with the government in Canada. 

    If it's only happening to that one contact then the issue may very well be on their end.    Their Internet speed, version, and router settings are a consideration.  You can pass this information along to them:
    1.  Make sure they are using the latest version of Skype.
    2.   Hopefully their Internet speed is ample.  For Skype to get the most out of that speed, you can suggest they place their computers's IP in the DMZ or their router or forward TCP/UDP ports 1024-65535.  Disabling the use of 80/443 and uPnP in the Skype client software (if the option exists) can resolve stability issues.  This can be done on your end as well to provide the most ideal conditions.
    3.  If they are going wireless have them try to go wired to see if anything changes.

  • Creating view to get first row for each table !!

    I am having tables(more than 10) which are related using foreign key and primary key relationship.
    Example:
    Table1:
    T1Prim T1Col1 T1Col2
    Table2
    T2For T2Prim T2Col1 T2Col2 T2Col3
    (here T2For will have value same as T1Prim and in my design it has same column name i.e. T1Prim)
    Table3
    T3For T3Prim T3Col1 T3Col2 T3Col3
    (here T3For will have value same as T2Prim)
    and so on.
    The data in the tables is like For table1 there will be one record, for table2 there will be one record and for table 3 there are more than one records.
    Can i view either the first record for each of them or all records from each of them by writing the following view.
    I have written a view like this:
    Create or replace view test (T1Prim,T1Col1, T1Col2,T2Prim,T2Col1 T2Col2, T2Col3, T3Prim,T3Col1, T3Col2, T3Col3)
    As
    Select
    Table1.T1Prim,
    Table1.T1Col1,
    Table1.T1Col2,
    Table2.T2Prim,
    Table2.T2Col1,
    Table2.T2Col2,
    Table2.T2Col3,
    Table3.T3Prim,
    Table3.T3Col1,
    Table3.T3Col2,
    Table3.T3Col3
    From
    Table1,
    Table2,
    Table3
    where
    Table1.Prim = Table2.For
    and Table2.Prim = Table3.For
    When i ran the select statement on the view I am not getting any data. Whereas there is data when select is ran on individual table.
    Can someone please tell me where i am goofing.
    Thanks in the anticipation that i will get some hint to solve this.
    Eagerly waiting for reply.
    Thanks !!

    I mean use a collection :
    Collection Methods
    A collection method is a built-in function or procedure that operates on collections and is called using dot notation. The methods EXISTS, COUNT, LIMIT, FIRST, LAST, PRIOR, NEXT, EXTEND, TRIM, and DELETE help generalize code, make collections easier to use, and make your applications easier to maintain.
    EXISTS, COUNT, LIMIT, FIRST, LAST, PRIOR, and NEXT are functions, which appear as part of an expression. EXTEND, TRIM, and DELETE are procedures, which appear as a statement. EXISTS, PRIOR, NEXT, TRIM, EXTEND, and DELETE take integer parameters. EXISTS, PRIOR, NEXT, and DELETE can also take VARCHAR2 parameters for associative arrays with string keys. EXTEND and TRIM cannot be used with index-by tables.
    For more information, see "Using Collection Methods".
    Syntax
    Text description of the illustration collection_method_call.gif
    Keyword and Parameter Description
    collection_name
    This identifies an index-by table, nested table, or varray previously declared within the current scope.
    COUNT
    COUNT returns the number of elements that a collection currently contains, which is useful because the current size of a collection is not always known. You can use COUNT wherever an integer expression is allowed.
    For varrays, COUNT always equals LAST. For nested tables, normally, COUNT equals LAST. But, if you delete elements from the middle of a nested table, COUNT is smaller than LAST.
    DELETE
    This procedure has three forms. DELETE removes all elements from a collection. DELETE(n) removes the nth element from an index-by table or nested table. If n is null, DELETE(n) does nothing. DELETE(m,n) removes all elements in the range m..n from an index-by table or nested table. If m is larger than n or if m or n is null, DELETE(m,n) does nothing.
    EXISTS
    EXISTS(n) returns TRUE if the nth element in a collection exists. Otherwise, EXISTS(n) returns FALSE. Mainly, you use EXISTS with DELETE to maintain sparse nested tables. You can also use EXISTS to avoid raising an exception when you reference a nonexistent element. When passed an out-of-range subscript, EXISTS returns FALSE instead of raising SUBSCRIPT_OUTSIDE_LIMIT.
    EXTEND
    This procedure has three forms. EXTEND appends one null element to a collection. EXTEND(n) appends n null elements to a collection. EXTEND(n,i) appends n copies of the ith element to a collection. EXTEND operates on the internal size of a collection. So, if EXTEND encounters deleted elements, it includes them in its tally. You cannot use EXTEND with index-by tables.
    FIRST, LAST
    FIRST and LAST return the first and last (smallest and largest) subscript values in a collection. The subscript values are usually integers, but can also be strings for associative arrays. If the collection is empty, FIRST and LAST return NULL. If the collection contains only one element, FIRST and LAST return the same subscript value.
    For varrays, FIRST always returns 1 and LAST always equals COUNT. For nested tables, normally, LAST equals COUNT. But, if you delete elements from the middle of a nested table, LAST is larger than COUNT.
    index
    This is an expression that must yield (or convert implicitly to) an integer in most cases, or a string for an associative array declared with string keys.
    LIMIT
    For nested tables, which have no maximum size, LIMIT returns NULL. For varrays, LIMIT returns the maximum number of elements that a varray can contain (which you must specify in its type definition).
    NEXT, PRIOR
    PRIOR(n) returns the subscript that precedes index n in a collection. NEXT(n) returns the subscript that succeeds index n. If n has no predecessor, PRIOR(n) returns NULL. Likewise, if n has no successor, NEXT(n) returns NULL.
    TRIM
    This procedure has two forms. TRIM removes one element from the end of a collection. TRIM(n) removes n elements from the end of a collection. If n is greater than COUNT, TRIM(n) raises SUBSCRIPT_BEYOND_COUNT. You cannot use TRIM with index-by tables.
    TRIM operates on the internal size of a collection. So, if TRIM encounters deleted elements, it includes them in its tally.
    Usage Notes
    You cannot use collection methods in a SQL statement. If you try, you get a compilation error.
    Only EXISTS can be applied to atomically null collections. If you apply another method to such collections, PL/SQL raises COLLECTION_IS_NULL.
    You can use PRIOR or NEXT to traverse collections indexed by any series of subscripts. For example, you can use PRIOR or NEXT to traverse a nested table from which some elements have been deleted.
    EXTEND operates on the internal size of a collection, which includes deleted elements. You cannot use EXTEND to initialize an atomically null collection. Also, if you impose the NOT NULL constraint on a TABLE or VARRAY type, you cannot apply the first two forms of EXTEND to collections of that type.
    If an element to be deleted does not exist, DELETE simply skips it; no exception is raised. Varrays are dense, so you cannot delete their individual elements.
    PL/SQL keeps placeholders for deleted elements. So, you can replace a deleted element simply by assigning it a new value. However, PL/SQL does not keep placeholders for trimmed elements.
    The amount of memory allocated to a nested table can increase or decrease dynamically. As you delete elements, memory is freed page by page. If you delete the entire table, all the memory is freed.
    In general, do not depend on the interaction between TRIM and DELETE. It is better to treat nested tables like fixed-size arrays and use only DELETE, or to treat them like stacks and use only TRIM and EXTEND.
    Within a subprogram, a collection parameter assumes the properties of the argument bound to it. So, you can apply methods FIRST, LAST, COUNT, and so on to such parameters. For varray parameters, the value of LIMIT is always derived from the parameter type definition, regardless of the parameter mode.
    Examples
    In the following example, you use NEXT to traverse a nested table from which some elements have been deleted:
    i := courses.FIRST; -- get subscript of first element
    WHILE i IS NOT NULL LOOP
    -- do something with courses(i)
    i := courses.NEXT(i); -- get subscript of next element
    END LOOP;
    In the following example, PL/SQL executes the assignment statement only if element i exists:
    IF courses.EXISTS(i) THEN
    courses(i) := new_course;
    END IF;
    The next example shows that you can use FIRST and LAST to specify the lower and upper bounds of a loop range provided each element in that range exists:
    FOR i IN courses.FIRST..courses.LAST LOOP ...
    In the following example, you delete elements 2 through 5 from a nested table:
    courses.DELETE(2, 5);
    In the final example, you use LIMIT to determine if you can add 20 more elements to varray projects:
    IF (projects.COUNT + 20) < projects.LIMIT THEN
    -- add 20 more elements
    Related Topics
    Collections, Functions, Procedures
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/13_elems7.htm#33054
    Joel P�rez

  • Apex_item.hidden does not appear to be working correctly

    Hi,
    I am trying to build a manual MRU form based on the How to tutorial by Christina Cho.
    The differences are that I am using Apex 2.2 and thus apex_item functions and that I am putting the insertion row first before the existing rows (I want most recent records first).
    To simplify testing I removed the select for the existing records (there are none so far). I have the following select:
    select x.problem_id,
    x.person_id,
    x.probcode,
    x.resolved,
    x.diag_date,
    x.resolved_date,
    x.record_status
    from (
    select apex_item.hidden(1,null) problem_id,
    apex_item.hidden(2,:p235_person_id) person_id,
    apex_item.popupkey_from_query(3,null,
    'select probcode||'' - ''||description d,
    probcode from problist',75,75) probcode,
    apex_item.select_list(5, '1','-;1, Yes;2') resolved,
    apex_item.date_popup(6, null, null, :pick_date_format_mask, null, 12) diag_date,
    apex_item.date_popup(7, null, null, :pick_date_format_mask, null, 12) resolved_date,
    apex_item.hidden(8, 'ACT') record_status,
    apex_item.md5_checksum(null, null, null, null, null, null) cks
    from dual
    ) x
    With the apex_item.hidden, the counts apex_application.g_f01, apex_application.g_f02, and apex_application.g_f08 are equal to zero(0) when I submit the data entered. If I change the hidden functions to text functions then the counts are equal to one(1).
    The bad counts appear to be screwing up the collection creation procedure too; I expect it has to do with having a null for a loop end point..
    I expect that I can create a work-around with the text fields and not showing them in the report, but does the hidden function have a real bug?
    Also, for the collection creation routine, what can be done when there is nothing in the arrays? What is the value of the count?
    thanks,
    Peter

    Unchecking the Show checkbox in Report Attributes means you are asking the Apex reporting engine to not render that column on the report.
    If the column in question is a apex_item.hidden() call and it is shown (Show checkbox checked), it will display a "empty" column on the report, but the values will be posted to the g_fNN array you specify.
    I agree it is a little non-intuitive, that is why I always "piggyback" the apex_item.hidden() API call with a column that is going to be rendered on the report.
    Something like
    select
    apex_item.hidden(...)||apex_item.select_list...()
    ...

  • Invalid data type

    I have the following code working perfectly fine:
    CREATE TYPE mytype IS TABLE OF INT;
    SELECT * FROM TABLE(mytype(1,2));
    When I declare the type in a package, however, I get invalid data type. For example,
    CREATE OR REPLACE mypackage AS
    TYPE mytype IS TABLE OF INT;
    END mypackage;
    SELECT * FROM TABLE(mypackage.mytype(1,2));
    I need to include the type in a package because I have a function in the same package that will take the nested table as in parameter.
    YS

    When you need to select from a type, that type has to be created as a SQL type.
    This is true in SQL
    Re: how to use a collection in procedure
    And in a stored procedure
    Re: Passing an array to an Oracle stored procedure

  • Pricing Date effect in invoice

    Hai everybody,.
    What is the effect of Pricing Date field in invoice.?
    I know that it generally take the date as billing date.
    But my requirement is, Pricing Date at invoice should be same as Pricing date at Sales Order,
    How can i do this. and what all the effect of changes.
    please tell me. thanks in advance.
    Varma.

    Hi,
    Date for pricing and exchange rate
    The date that determines date-related pricing elements, such as conditions and foreign exchange rate.
    Use
    You can use the pricing date as one of the selection criteria when you process billing documents collectively.
    Procedure
    The system proposes the current date. You can change it manually in the document. If you change the pricing date, the system recalculates pricing for the entire document. If the date is in the past, you receive a warning before you can continue.
    Determining the Proposal
    In the order: You can customize the order type to determine a proposal, such as the current date or the requested delivery date as the pricing date.
    In the billing document: The billing date is proposed as the pricing date.

Maybe you are looking for

  • Help: grey screen with progress bar at startup, no success repairing in disk utility

    I got my MacBook pro in December 2011 and never had an issue with it until this same thing happened in February 2013. Basically, what happens is the computer starts to run really slowly, so I forced shut down. When I tried to power it back on, I can'

  • PGI Accounting Document

    Hi, After PGI, material document gets trigger, but in material document, when I click on "Accounting Document", system give me following message: Material document does not include an accounting document Do let me know any settings to create accounti

  • Why does the iphone have such a small headphone jack!?

    The headphone jack on the iphone is not wide enough for any of my non apple headphones to fit. in fact the official apple cable i have for the ipod video does not even fit... this does not make much sense to me. also, on a side note, not being able t

  • Sniffer Trace on ACE w/VACLs and One-Arm Design

    Wow...that was a mouthful of a title! Here is what I'm trying to accomplish. There is an application that is having issues. This application is being load balanced by the ACE. The ACE is configured in a One-Armed design. Essentially the application f

  • Help with event window and "Nav" button?

    I lost my event window, where do I locate it? Also, in the event window there should be a "Nav" buttion, I didn't see it when I had it up, why? Running version 11.5 on CS5.5.