Mimic "show data as percent of row parent" in non-pivot table

Is it possible to implement or mimic the 'percentage of parent row' functionality, foreseen for pivot tables in obiee 11g, for a 'normal' table?
We use a rather fixed table, in which no drilling is allowed - conditions are applied by means of prompts and filters. The report is based upon the store dimension, which has as hierarchy: country > cluster > store. We have added a column to represent the 'share' of a store's net turnover in the cluster total. The results looks like:
country  cluster  store  turnover   share
=======  =======  =====  ========   =====
belgium  1        a        20.000   66.7%
                  b        10.000   33.3%
         cluster total:    30.000  100.0%
         2        c        40.000   57.1%
                  d        30.000   42.9%
         cluster total:    70.000  100.0%
country total:            100.000  100.0%
holland  3        e        50.000   71.4%
         4        f        20.000   28.6%
         cluster total:    70.000  100.0%
country total:             70.000  100.0%
grand total:              170.000  100.0%Instead of all the total levels showing as 100% however, we would like to see each sub-total represented as a percentage of the level above, much like the forementioned pivot table functionality. For the example above that would mean it should look like:
country  cluster  store  turnover   share
=======  =======  =====  ========   =====
belgium  1        a        20.000   66.7%
                  b        10.000   33.3%
         cluster total:    30.000   30.0%
         2        c        40.000   57.1%
                  d        30.000   42.9%
         cluster total:    70.000   70.0%
country total:            100.000   58.8%
holland  3        e        50.000   71.4%
         4        f        20.000   28.6%
         cluster total:    70.000  100.0%
country total:             70.000   41.2%
grand total:              170.000  100.0%Any advice or idea would be greatly appreciated...

902360 wrote:
Hello,
I'd like to know if there's a way to configure the Pivot Table "Show Data As - Percent of" precision.
ATM, I have some reports using SR types where one of those are much bigger than the others.. So when the report its generated, it returns something like:
TYPE A: 99%
TYPE B: 0%
TYPE C: 0%
TYPE D: 0%
How can I show the other types correct value? Something like number of decimal places...
Ps: As criteria to this report, I have changed my Data Format to "Number", "Minus: -123" with 15 Decimal Places.
Thanks,
RamonYup. Can do. Read this link:
http://shivabizint.wordpress.com/2008/09/14/changing-the-precession-of-percent-of-columns-in-pivot-table-of-obiee/

Similar Messages

  • Show Data as percent of Column with static table

    Hello,
    I have a problem calculating a % in a table. I have two columns in criteria tab:
    Departments and measure
    I need an extra column that calc % of total departments for each department. I know that I can do it with pivot table creating a new column and put: Show Data --> as Percent of --> Column but I need to do with static table.
    Is possible to do it??
    Thanks!!!

    Alex,
    You could try the following example here :
    http://www.biconsultinggroup.com/knowledgebase.asp?CategoryID=198&SubCategoryID=364
    using sum( measure by dimension attribute)
    This should give you access to the grand total in the report as a column, from which you can derive % of.
    HTH, if correct please mark answered / award points as you see fit to do so!!
    Alastair

  • Copy a certain row of data into the next row in a same internal table ??

    HI, guys.
    May i know how to copy a certain row of data into the next row in a same internal table ?? Bcz I plan to update a certain colum of data in the row just now into another value..
    For example:-
    *at first...
    ebeln1   ebelp1   xblnr1
    ebeln2   ebelp2   xblnr2
    ebeln3   ebelp3   xblnr3
    *after that, become...
    ebeln1   ebelp1   xblnr1
    ebeln2   ebelp2   xblnr2
    ebeln2   ebelp2   xblnr4
    ebeln2   ebelp2   xblnr5
    ebeln3   ebelp3   xblnr3
    Thanks in advance.

    hi,
    If you have this kind of requirement then you must be having 2 internal tables ,one existing data and 2nd from which you have to insert the records into 1st table.
    so in this case,
    loop at itab1.
      v_index = sy-tabix.
      loop at itab2 into wa where pri_key = itab1-pri_key.
      v_index = v_index + 1.
      insert  wa into itab index v_index.
      endloop.
    endloop.
    Using this code ,your data records similar to your 1st tables primary key records will get inserted into table.

  • Sub Total value is empty in  parent child hierarchy pivot table

    Hi All,
    I am using obiee 11.1.1.6.2 in Test environment. Is it a known issue/bug for 11.1.1.6.2 to show empty/blank values for sub total when using parent child hierarchy pivot table. The sub total for parent value is showing but sub total for child value is coming blank. However, in 11.1.1.5.0, we do not have any issue with this.
    Is it a known bug in obiee 11.1.1.6.2?
    Thanks,
    Sushil

    Yes it is a known bug...
    Thanks.

  • Oracle error ORA-22905: cannot access rows from a non-nested table item

    Oracle error ORA-22905: cannot access rows from a non-nested table item
    Creating a report using oracle plsql code .
    Getting error ;
    Oracle error ORA-22905: cannot access rows from a non-nested table item
    when I am trying to pass data in clause in pl sql proc
    basically I have a proc which takes 2 parameters(a and b)
    proc (
    P_a varchar2,
    p_b varchar2,
    OUT SYS_REFCURSOR
    culprit code which is giving me  the error and on google they say cast it but I dont know how to do it in my context
    --where  id in (
    --        SELECT * FROM THE (SELECT p_cd_common.get_table_from_string(P_a) FROM dual)
    --        union
    --        SELECT * FROM THE (SELECT p_cd_common.get_table_from_string(P_b) FROM dual)
    data sample returned from this :SELECT * FROM THE (SELECT p_cd_common.get_table_from_string(P_a) FROM dual)
    'Abc','def',
    data sample returned from this;SELECT * FROM THE (SELECT p_cd_common.get_table_from_string(P_b) FROM dual)
    'fgd','fth',
    Any answers ?
    How to pass data in clause in a better way

    Why are you creating a duplicate post? I already asked you to post p_cd_common.get_table_from_string. In particular what is function return type and where it is declared. As I already mentioned, most likely function return type is declared in the package and therefore is PL/SQL type. And TABLE operator can only work with SQL types.
    SY.

  • ORA-22905: cannot access rows from a non-nested table item in Table func

    I am using a table function in Oracle 8.1.7.4.0. I did declare an object type and a collection type like this:
    CREATE TYPE t_obj AS OBJECT ...
    CREATE TYPE t_tab AS TABLE OF t_obj;
    My table function returns t_tab and is called like this:
    SELECT ... FROM TABLE (CAST (my_pkg.table_fnc AS t_tab)) ...
    This works pretty well as long as I run it in the same schema that owns the function and the 2 types. As soon as I run this query from another schema, I get an ORA-22905: cannot access rows from a non-nested table item error, even though I granted execute on both the types and the function to the other user and I created public synonyms for all 3 objects.
    As soon as I specify the schema name of t_tab in the cast, the query runs fine:
    SELECT ... FROM TABLE (CAST (my_pkg.table_fnc AS owner.t_tab)) ...
    I don't like to have a schema hard coded in a query, therefore I'd like to do this without the schema. Any ideas of how to get around this error?

    Richard,
    your 3 statements are correct. I'll go ahead and log a TAR.
    Both DESCs return the same output when run as the other user. And, running the table function directly in SQL*Plus (SELECT my_pkg.table_fnc FROM dual;) also returns a result and no errors. The problem has to be in the CAST function.
    Thanks for your help.

  • ORA-22905: cannot access rows from a non-nested table item

    Hi All,
    This is the overview of the query used in the package.
    select ename,empno,sal,deptno from
    (select deptno from dept) a,
    (select ename,empno,sal from emp1) b
    where empno in (select * from table (pkg1.fun1('empno')))
    and a.deptno=b.deptno
    union
    select ename,empno,sal,deptno from
    (select deptno from dept) c,
    (select ename,empno,sal from emp2) d
    where empno in (select * from table (pkg1.fun1('empno')))
    and c.deptno=d.deptno
    Here the pkg1.fun1 will convert the string ('empno') into table form. ('empno') is the input parameter to the package and is a string of emp numbers.
    compilation is successful. when this is executed the below error pops up
    "ORA-22905: cannot access rows from a non-nested table item"
    Is there any problem with the table function which i am using in this query
    could anyone guide me to the solution.
    Thanks All

    I have used
    CREATE OR REPLACE
    type tab_num as table of number;
    select * from table (cast(pkg1.fun1('empno')) as tab_num))
    This throws an error during compilation itself
    "PL/SQL: ORA-00932: inconsistent datatypes:expected number got varchar2

  • SP which returns error cannot access rows from a non-nested table item.

    Dear Experts
    I have an SP which gives error " cannot access rows from a non-nested table item ". But here the strange thing is, it works fine with one query. But I write union query with another table, only then it gives error.
    CREATE OR REPLACE PROCEDURE SP_MONTHLYSALESUMMARY (
    P_TRANSACTIONMONTH VARCHAR2,
    P_LEDGERID VARCHAR2,
    O_RESULTSET OUT TYPES.CURSORTYPE)
    AS
    BEGIN
    OPEN O_RESULTSET FOR
    -- POINT OF SALE
    SELECT
    L.DESCRIPTION LEDGERNAME,
    LS.DESCRIPTION LEDGERSUBGROUPNAME,
    C.CORPORATENO
    || E.EMPLOYEENO
    || AF.AFFILIATEMEMBERNO
    || M.MEMBERNO
    AS ID,
    C.NAME || E.NAME || AF.NAME || M.NAME AS NAME,
    SUM(CASE
    WHEN PB.EMPLOYEE_ID IS NOT NULL
    AND T.ISCREDITTRANSACTIONMODE = 2
    THEN
    PB.TAXAMOUNT
    ELSE
    0
    END)
    EMPLOYEEDEBITCARDTAXAMOUNT,
    L.PRINTNO
    FROM POINTOFSALEBILL PB
    INNER JOIN POINTOFSALEBILLDETAIL PD
    ON PB.POINTOFSALEBILL_ID = PD.POINTOFSALEBILL_ID
    INNER JOIN TRANSACTIONTYPE TY
    ON TY.TRANSACTIONTYPE_ID = PB.TRANSACTIONTYPE_ID
    INNER JOIN TRANSACTIONMODE T
    ON T.TRANSACTIONMODE_ID = PB.TRANSACTIONMODE_ID
    INNER JOIN LEDGER L
    ON L.LEDGER_ID = PD.LEDGER_ID
    INNER JOIN LEDGERSUBGROUP LS
    ON LS.LEDGERSUBGROUP_ID = L.LEDGERSUBGROUP_ID
    LEFT JOIN CORPORATE C
    ON C.CORPORATE_ID = PB.CORPORATE_ID
    LEFT JOIN EMPLOYEE E
    ON E.EMPLOYEE_ID = PB.EMPLOYEE_ID
    LEFT JOIN AFFILIATEMEMBER AF
    ON AF.AFFILIATEMEMBER_ID = PB.AFFILIATEMEMBER_ID
    LEFT JOIN MEMBER M
    ON M.MEMBER_ID = PB.MEMBER_ID
    WHERE TY.ISDEBIT = 1 AND PB.FLAG = 0 AND T.ISROOMNO = 2
    AND (P_TRANSACTIONMONTH IS NULL
    OR P_TRANSACTIONMONTH =
    TO_CHAR (PB.BILLDATE, 'fmMONTH-YYYY'))
    AND (P_LEDGERID IS NULL
    OR L.LEDGER_ID IN
    ( (SELECT COLUMN_VALUE
    FROM TABLE(GET_ROWS_FROM_LIST1 (
    P_LEDGERID,
    GROUP BY L.DESCRIPTION,
    LS.DESCRIPTION,
    C.CORPORATENO
    || E.EMPLOYEENO
    || AF.AFFILIATEMEMBERNO
    || M.MEMBERNO,
    C.NAME || E.NAME || AF.NAME || M.NAME,
    L.PRINTNO;
    END SP_MONTHLYSALESUMMARY;
    GET_ROWS_FROM_LIST1 is a function, which i am using to pass " IN " to oracle. There is no problem with this, since it works fine with one query
    REATE OR REPLACE FUNCTION BCLUB1868.GET_ROWS_FROM_LIST1
    (L IN LONG DEFAULT NULL, SEP IN VARCHAR2 DEFAULT ',')
    RETURN MYVARCHARTABLE1 PIPELINED
    AS
    L_POS INT := 1;
    L_NEXT INT;
    L_PART VARCHAR(500);
    BEGIN
    SELECT INSTR( L, SEP, L_POS) INTO L_NEXT FROM DUAL;
    WHILE (L_NEXT>0)
    LOOP
    SELECT SUBSTR(L, L_POS, L_NEXT - L_POS) INTO L_PART FROM DUAL;
    PIPE ROW(L_PART);
    SELECT L_NEXT + 1, INSTR( L, SEP, L_POS)
    INTO L_POS, L_NEXT FROM DUAL;
    END LOOP;
    SELECT SUBSTR(L, L_POS) INTO L_PART FROM DUAL;
    PIPE ROW(L_PART);
    RETURN;
    END;
    Request help from you all experts in the forum

    Here it is
    CREATE OR REPLACE PROCEDURE SP_GRCS (
    P_TRANSACTIONMONTH VARCHAR2,
    P_LEDGERID VARCHAR2,
    O_RESULTSET OUT TYPES.CURSORTYPE)
    AS
    BEGIN
    OPEN O_RESULTSET FOR
    -- Point of sale
    SELECT *
    FROM ( SELECT L.DESCRIPTION LEDGERNAME,
    LS.DESCRIPTION LEDGERSUBGROUPNAME,
    C.CORPORATENO
    || E.EMPLOYEENO
    || AF.AFFILIATEMEMBERNO
    || M.MEMBERNO
    AS ID,
    C.NAME || E.NAME || AF.NAME || M.NAME AS NAME,
    SUM(CASE
    WHEN PB.EMPLOYEE_ID IS NULL
    AND T.ISCREDITTRANSACTIONMODE = 1
    THEN
    PB.BILLAMOUNT
    ELSE
    0
    END)
    MEMBERDEBITAMOUNT,
    L.PRINTNO
    FROM POINTOFSALEBILL PB
    INNER JOIN POINTOFSALEBILLDETAIL PD
    ON PB.POINTOFSALEBILL_ID = PD.POINTOFSALEBILL_ID
    INNER JOIN TRANSACTIONTYPE TY
    ON TY.TRANSACTIONTYPE_ID = PB.TRANSACTIONTYPE_ID
    INNER JOIN TRANSACTIONMODE T
    ON T.TRANSACTIONMODE_ID = PB.TRANSACTIONMODE_ID
    INNER JOIN LEDGER L
    ON L.LEDGER_ID = PD.LEDGER_ID
    INNER JOIN LEDGERSUBGROUP LS
    ON LS.LEDGERSUBGROUP_ID = L.LEDGERSUBGROUP_ID
    LEFT JOIN CORPORATE C
    ON C.CORPORATE_ID = PB.CORPORATE_ID
    LEFT JOIN EMPLOYEE E
    ON E.EMPLOYEE_ID = PB.EMPLOYEE_ID
    LEFT JOIN AFFILIATEMEMBER AF
    ON AF.AFFILIATEMEMBER_ID = PB.AFFILIATEMEMBER_ID
    LEFT JOIN MEMBER M
    ON M.MEMBER_ID = PB.MEMBER_ID
    WHERE TY.ISDEBIT = 1 AND PB.FLAG = 0 AND T.ISROOMNO = 2
    AND (P_TRANSACTIONMONTH IS NULL
    OR P_TRANSACTIONMONTH =
    TO_CHAR (PB.BILLDATE, 'fmMONTH-YYYY'))
    AND (P_LEDGERID IS NULL
    OR L.LEDGER_ID IN
    ( (SELECT COLUMN_VALUE
    FROM TABLE(GET_ROWS_FROM_LIST1 (
    P_LEDGERID,
    GROUP BY L.DESCRIPTION,
    LS.DESCRIPTION,
    C.CORPORATENO
    || E.EMPLOYEENO
    || AF.AFFILIATEMEMBERNO
    || M.MEMBERNO,
    C.NAME || E.NAME || AF.NAME || M.NAME,
    L.PRINTNO
    UNION ALL
    -- Guest Registration
    SELECT L.DESCRIPTION LEDGERNAME,
    LS.DESCRIPTION LEDGERSUBGROUPNAME,
    C.CORPORATENO
    || E.EMPLOYEENO
    || AF.AFFILIATEMEMBERNO
    || M.MEMBERNO
    AS ID,
    C.NAME || E.NAME || AF.NAME || M.NAME AS NAME,
    SUM(CASE
    WHEN PB.EMPLOYEE_ID IS NULL
    AND T.ISCREDITTRANSACTIONMODE = 1
    THEN
    PB.BILLAMOUNT
    ELSE
    0
    END)
    MEMBERDEBITAMOUNT,
    L.PRINTNO
    FROM GUESTREGISTRATION PB
    INNER JOIN GUESTREGISTRATIONDETAIL PD
    ON PB.GUESTREGISTRATION_ID = PD.GUESTREGISTRATION_ID
    INNER JOIN TRANSACTIONTYPE TY
    ON TY.TRANSACTIONTYPE_ID = PB.TRANSACTIONTYPE_ID
    INNER JOIN TRANSACTIONMODE T
    ON T.TRANSACTIONMODE_ID = PB.TRANSACTIONMODE_ID
    INNER JOIN LEDGER L
    ON L.LEDGER_ID = PD.LEDGER_ID
    INNER JOIN LEDGERSUBGROUP LS
    ON LS.LEDGERSUBGROUP_ID = L.LEDGERSUBGROUP_ID
    LEFT JOIN CORPORATE C
    ON C.CORPORATE_ID = PB.CORPORATE_ID
    LEFT JOIN EMPLOYEE E
    ON E.EMPLOYEE_ID = PB.EMPLOYEE_ID
    LEFT JOIN AFFILIATEMEMBER AF
    ON AF.AFFILIATEMEMBER_ID = PB.AFFILIATEMEMBER_ID
    LEFT JOIN MEMBER M
    ON M.MEMBER_ID = PB.MEMBER_ID
    WHERE TY.ISDEBIT = 1 AND PB.FLAG = 0 AND T.ISROOMNO = 2
    AND (P_TRANSACTIONMONTH IS NULL
    OR P_TRANSACTIONMONTH =
    TO_CHAR (PB.BILLDATE, 'fmMONTH-YYYY'))
    AND (P_LEDGERID IS NULL
    OR L.LEDGER_ID IN
    ( (SELECT COLUMN_VALUE
    FROM TABLE(GET_ROWS_FROM_LIST1 (
    P_LEDGERID,
    GROUP BY L.DESCRIPTION,
    LS.DESCRIPTION,
    C.CORPORATENO
    || E.EMPLOYEENO
    || AF.AFFILIATEMEMBERNO
    || M.MEMBERNO,
    C.NAME || E.NAME || AF.NAME || M.NAME,
    L.PRINTNO)
    ORDER BY PRINTNO;
    END SP_GRCS;
    I have even tried adding L.Ledger_ID in select statement.

  • Showing data for the first row only

    Oracle Experts ,
    Below is my table in oracle.I wnat show Company ID only for the first row of each company. Table 2 is my output .
    Company Country Company ID
    BARCALAYS UK 1
    BARCALAYS USA 1
    BARCALAYS Australia 1
    Kingfisher UK 2
    Kingfisher INDIA 2
    Kingfisher INDIA 2
    Output Table 2 :
    Company Country Company ID
    BARCALAYS UK 1
    BARCALAYS USA Null
    BARCALAYS Australia Null
    Kingfisher UK 2
    Kingfisher INDIA Null
    Kingfisher INDIA Null
    Please give me a sql query.
    Many thanks in advance .
    Regards,
    Dirasa

    based on if a particular country is appearing twice for the same company and company_id wether to show the company_id for that country or not you may use any of the below queries :)
    /* Will show compan_ID twice if the country is repeated */
      with x as (
          select 'Foo' company_name, 'UK' country, 1 company_id from dual
          union all
          select 'Foo', 'USA', 1 from dual
          union ALL
           select 'Foo', 'USA', 1 from dual
           UNION ALL
          select 'Foo', 'AUS', 1 from dual
          union ALL
        select 'Foo', 'AUS', 1 from dual
          union all     
          select 'Bar', 'UK', 2 from dual
          union all
         select 'Bar', 'USA', 2 from dual
         union all
         select 'Bar', 'India', 2 from dual
    SELECT company_name,country,CASE WHEN rn=1 THEN company_id ELSE NULL END company_id
       FROM (SELECT
       company_name,company_id,country,rank()over(PARTITION BY company_name,company_id ORDER BY country) rn
        FROM x)
    /* Will NOT show compan_ID twice even if the country is repeated */   
      with x as (
          select 'Foo' company_name, 'UK' country, 1 company_id from dual
          union all
          select 'Foo', 'USA', 1 from dual
          union all
          select 'Foo', 'AUS', 1 from dual
          union ALL
        select 'Foo', 'AUS', 1 from dual
          union all     
                 select 'Foo', 'USA', 1 from dual
           UNION ALL
          select 'Bar', 'UK', 2 from dual
          union all
         select 'Bar', 'USA', 2 from dual
         union all
         select 'Bar', 'India', 2 from dual
    SELECT company_name,country,CASE WHEN rn=1 THEN company_id ELSE NULL END company_id
       FROM (SELECT
       company_name,company_id,country,row_number()over(PARTITION BY company_name,company_id ORDER BY country) rn
        FROM x)
    /* Will show compan_ID twice if the country is repeated */
      with x as (
          select 'Foo' company_name, 'UK' country, 1 company_id from dual
          union all
          select 'Foo', 'USA', 1 from dual
          union ALL
           select 'Foo', 'USA', 1 from dual
           UNION ALL     
          select 'Foo', 'AUS', 1 from dual
          union ALL
        select 'Foo', 'AUS', 1 from dual
          union all     
          select 'Bar', 'UK', 2 from dual
          union all
         select 'Bar', 'USA', 2 from dual
         union all
         select 'Bar', 'India', 2 from dual
    SELECT company_name,country,CASE WHEN rn=1 THEN company_id ELSE NULL END company_id
       FROM (SELECT
       company_name,company_id,country,dense_rank()over(PARTITION BY company_name,company_id ORDER BY country) rn
        FROM x)
                    Cheers!!!
    Bhushan

  • Include Row/Column Headers in Pivot Table Export to Excel

    I am using JDeveloper version 11.1.2.3
    I am trying to export my pivot table to excel using dvt:exportPivotTableData. I'd like to include column/row headers in the export, but can't seem to find a way to do that. Is there a way to do this in my jdeveloper version?

    I am using JDeveloper version 11.1.2.3
    I am trying to export my pivot table to excel using dvt:exportPivotTableData. I'd like to include column/row headers in the export, but can't seem to find a way to do that. Is there a way to do this in my jdeveloper version?

  • Bex: Show Data present in multiple rows in single row

    Hi ,
    I have a dso with field and data like
    Material itemtype Launch Date Text
    1. 100001 10 10/11/2010 delivered to x
    2. 100001 20 10/11/2010 not delivered
    3. 100001 30 05/12/2010 delivered to y
    i have to show this data in report as single record with format condition like
    Material itemtypetext 10 itemtypetext 20 itemtypetext 30
    100001 delivered to x not delivered delivered to y
    here the itemtypetext 10 value is calculated as = if itemtype=10 and Launch date < today
    the itemtypetext 20 value is calculated as = if itemtype=20 and Launch date < today
    the itemtypetext 30 value is calculated as = if itemtype=30 and Launch date < today
    Thanks
    Prashant
    Material   itemtypetext10     itemtypetext20        itemtypetext 30
    100001     delivered to x    not delivered           delivered to y
    Can you please tell me how can i achieve this. and is it better to do in Datamodel or in Bex reporting?

    Hi,
    i dont understand what your meaning about value of itemtype text? Could you please explain it again clearly or give uns a complete example?
    This condition is a bit complex for query formular to realize it, Instead of it you could  create a new virtuell Characteristic with a flag to do it. e.g If lauch < today, this flag will be '1', else will be '0'. Then we could restrict KF in the query to calculate.

  • Inserting static text in between rows returned from a pivot table

    Is there a way to type static text (eg. “Note that the data for Land has an accuracy of 98%”) in between rows returned from the dataset in the rtf template. The alternative would be to break the BI analysis report (which is the source of the template data) into 2 parts and then insert each part into the template one below the other with the text typed in between.

    Oracle support has confirmed that this requirement is not possible to implement

  • Adding an editable row in an non editable table.

    Hi,
    My requirement is to add an Editable row in a table which is in display mode only, i mean i cannot edit the data that is present in the table.
    But if the user presses the Add Row button on the Table Toolbar, a new editable row should be added in the end, so that he can save the new data entered.
    methods tried:
    1: I have used Inputfield as Cell Editors, with their Read only Property check marked, thougt that with the new element created, it would not be Read Only.
    2: Binded the read only property with a context attribute, but still was not able to achieve this functionality.
    3: Tried the above two steps with the "Enabled" property of the Table Coloumn Cell Editors as well, but no result.
    Please give me some pointers on this.
    Regards,
    Ashish

    Hi Ashish,
    The approach you were following was correct, but I am not sure where you have placed the Enabled property attribute in the context.
    Please follow these steps:
    1. The table you are creating should have the enabled property set.
    2. The context with you are binding the table should have an additional attribute say ISENABLED of type boolean.
    3. Bind this attribute with the ENABLED property of all the input enabled fields in your table.
    4. When binding the non-editable data into the table, set this property to ABAP_FALSE for each record. This will make the existing data non editable.
    5. Use the below code for adding a new row and set the ISENABLE property of the added row to ABAP_TRUE.
        elem_table = node_table->create_element( ).
        node_table->bind_element( new_item =  elem_table set_initial_elements = abap_false ).
        stru_table-isenable = abap_true .
        elem_new_row->set_static_attributes( static_attributes = stru_table ).
    Let me know how you go about it.
    Cheers,
    Pratibha

  • ERROR:-22905:ORA-22905: cannot access rows from a non-nested table item

    Hi. I have some code running on oracle 9i that gives me above error.
    Following are my type declarations.
    drop type_obj_tea_icore_glr;
    drop type_tbl_tea_icore_glr;
    create or replace type type_obj_tea_icore_glr as object (
    ns_comp_id_parent number,
    ns_comp_id_child number,
    serv_item_id number,
    glr_display_order number,
    exchange_carrier_circuit_id varchar2(53)
    show err
    create or replace type type_tbl_tea_icore_glr as table of type_obj_tea_icore_glr;
    show err
    I have a function in an oracle package tea_icore_pkg with following signature.
    FUNCTION sortpvcdesign (
    p_document_number serv_req_si.document_number%TYPE,
    p_pvc_serv_item_id serv_item.serv_item_id%TYPE,
    p_orig_port_serv_item_id serv_item.serv_item_id%TYPE
    RETURN type_tbl_tea_icore_glr
    If I run following from SQL prompt, it works fine.
    SELECT * FROM TABLE (tea_icore_pkg.sortpvcdesign(255082,2782636,2723752) );
    But when I use that within another procedure of the same packge, as follows:
    FOR glr_rec IN
    (SELECT *
    FROM TABLE
    (CAST
    (sortpvcdesign (c_pvcs.order_nbr,
    c_pvcs.pvc_serv_item_id,
    c_pvcs.orig_port_serv_item_id
    ) AS type_tbl_tea_icore_glr
    LOOP
    At the runtime, I got the above error message ( as referred to in subject ). I took all of the suggestions on CAST without much success. The user/schema is only one schema here. I mean, no permissions issue. I granted all on above types to public.
    Can someone help?

    Bil,
    I tried both with CAST and without CAST with specifying the colums. The same error.
    OR glr_rec IN
    (SELECT ns_comp_id_parent, ns_comp_id_child, serv_item_id,
    glr_display_order, exchange_carrier_circuit_id
    FROM TABLE
    (CAST
    (sortpvcdesign (c_pvcs.order_nbr,
    c_pvcs.pvc_serv_item_id,
    c_pvcs.orig_port_serv_item_id
    ) AS type_tbl_tea_icore_glr
    LOOP

  • Rows To Columns Or Pivot Table with SQL Model over two tables

    hi @all
    oracle 10.2.0.4
    i have following situation
    table_1
    t1_id   t1_name
    1      reggie
    table_2
    t2_id   t2_t1_id   t2_start_date   t2_end_date
    1      1      01.01.2008      31.03.2008
    2      1      01.06.2008      31.07.2008
    cardinality from table_1 to table_2 is one to many
    now i need this
    t1_name   t2_start_date_1   t2_end_date_1   t2_start_date_2   t2_end_date_2   t2_start_date_x   t2_end_date_x
    reggie      01.01.2008      31.03.2008      01.06.2008      31.07.2008
    i think the max occurrence of start/enddate can be 15
    can somebody help

    Hello,
    One way, assuming 15 is the maximum:
    SELECT t1.name,
            t2.t2_start_date t2_start_date_1,   t2.t2_end_date t2_end_date_1,
            LEAD(t2.t2_start_date,1) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date) t2_start_date_2,
            LEAD(t2.t2_end_date,1) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_2,
            LEAD(t2.t2_start_date,2) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_3,
            LEAD(t2.t2_end_date,2) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_3,
            LEAD(t2.t2_start_date,3) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_4,
            LEAD(t2.t2_end_date,3) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_4,
            LEAD(t2.t2_start_date,4) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_5,
            LEAD(t2.t2_end_date,4) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_5,
            LEAD(t2.t2_start_date,5) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_6,
            LEAD(t2.t2_end_date,5) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_6,
            LEAD(t2.t2_start_date,6) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_7,
            LEAD(t2.t2_end_date,6) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_7,
            LEAD(t2.t2_start_date,7) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_8,
            LEAD(t2.t2_end_date,7) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_8,
            LEAD(t2.t2_start_date,8) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_9,
            LEAD(t2.t2_end_date,8) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_9,
            LEAD(t2.t2_start_date,9) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_10,
            LEAD(t2.t2_end_date,9) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_10,
            LEAD(t2.t2_start_date,10) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_11,
            LEAD(t2.t2_end_date,10) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_11,
            LEAD(t2.t2_start_date,11) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_12,
            LEAD(t2.t2_end_date,11) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_12,
            LEAD(t2.t2_start_date,12) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_13,
            LEAD(t2.t2_end_date,12) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_13,
            LEAD(t2.t2_start_date,13) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date)t2_start_date_14,
            LEAD(t2.t2_end_date,13) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date)t2_end_date_14,
            LEAD(t2.t2_start_date,14)  OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_start_date) t2_start_date_15,        
            LEAD(t2.t2_end_date,14) OVER (PARTITION BY t2.t2_t1_id ORDER BY t2.t2_end_date) t2_end_date_15
      FROM table_1 t1
      JOIN table_2 t2 ON (t1.t1_id = t2.t2_t1_id)
    WHERE (t2.t2_start_date,   t2.t2_end_date) IN (
      SELECT MIN(t2_start_date), MIN(t2_end_date)
        FROM  table_2 t22
      WHERE t2.t2_id = t22.t2_id);
    Edit
    Fixed incomplete code

Maybe you are looking for