Pie graph slice derivation returning two rows

Hi All,
I have a requirement to derive the series name when the user clicks on a pie graph's series.
Below is my pie graphs code
<dvt:pieGraph id="pieGraph1"
value="#{bindings.DashboardTransPieVO1.graphModel}"
subType="PIE" threeDEffect="true"
animationOnDisplay="auto"
seriesRolloverBehavior="RB_HIGHLIGHT"
dynamicResize="DYNAMIC_SIZE" style="Default"
partialTriggers="::cil2"
clickListener="#{viewScope.DashboardScreenBean.drillPie}"
drillingEnabled="true">
<dvt:background>
<dvt:specialEffects/>
</dvt:background>
<dvt:graphPieFrame/>
<dvt:seriesSet>
<dvt:series/>
</dvt:seriesSet>
<dvt:legendTitle text="#{ethuiBundle.TRANSACTION_STATES}"
rendered="true"/>
<dvt:graphFootnote text="Footnote" rendered="false"/>
<dvt:sliceLabel>
<dvt:numberFormat numberType="NUMTYPE_GENERAL"
decimalDigit="0"/>
</dvt:sliceLabel>
<dvt:pieLabel rendered="false"/>
<dvt:graphSubtitle text="Subtitle" rendered="false"/>
<dvt:graphTitle text="Title" rendered="false"/>
</dvt:pieGraph>
I am using following code for that in clickListener of pie graph:
ComponentHandle handle = clickEvent.getComponentHandle();
if (handle instanceof DataComponentHandle)
DataComponentHandle dhandle = (DataComponentHandle)handle;
// Get the value displayed in the series
System.out.println(" @@@@Value: " + dhandle.getValue(DataComponentHandle.UNFORMATTED_VALUE));
// Get the series attributes
Attributes [] seriesInfo = dhandle.getSeriesAttributes();
if(seriesInfo != null)
for(Attributes attrs: seriesInfo)
System.out.println(" @@@@Series value: " + attrs.getValue(Attributes.LABEL_VALUE));
System.out.println(" @@@@Series name: " + attrs.getValue(Attributes.LABEL_ATTRIBUTE));
System.out.println(" @@@@Series value id: " + attrs.getValue(Attributes.ID_VALUE));
System.out.println(" @@@@Series name id: " + attrs.getValue(Attributes.ID_ATTRIBUTE));
The issue is it is returning me two rows for Attributes array. The first row is containing nulls in Attributes array with the exception of ID value and ID Attribute. They carry some standard value like 0 and some text respectively for them.
The 2nd row contains the data I am looking for.
My query is why two rows are being returned?
Thanks

Check this code:
REPORT  ytest_pie.
DATA: BEGIN OF data  OCCURS 1,
        text(36),
        feld1 TYPE p,
      END OF data,
      BEGIN OF opts OCCURS 1,
        c(80) TYPE c,
      END OF opts,
      BEGIN OF tyear OCCURS 1,
        c(20) TYPE c,
      END OF   tyear.
opts-c = 'P2TYPE = PI'.
APPEND opts.
data-text = 'X 10'.
data-feld1 = '10'.
APPEND data.
data-text = 'Y 20'.
data-feld1 = '20'.
APPEND data.
CALL FUNCTION 'GRAPH_MATRIX_2D'
  TABLES
    data        = data
    opts        = opts
    tcol        = tyear
  EXCEPTIONS
    col_invalid = 1
    opt_invalid = 2
    OTHERS      = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Similar Messages

  • [CLOSED] MAX returning two rows

    Hi all,
    I need to write a query that return 1 row.
    If 'part 1' returns a value, the query needs to return null. If 'part 1' returns multiple values for latest_date, I need to return the latest of the dates.
    Currently, this is the query I have. However this query returns more than 1 row.
    Anny pointers are appreciated. Thanks
    select Max(transaction_table.latest_date)
    ,transaction_table.status
    from
    ---part 1
    (select
    sysdate latest_date
    ,'hello' status
    from dual
    UNION
    --part 2
    select
    NULL latest_date
    ,NULL status
    from dual) transaction_table
    group by transaction_table.status;
    RESULT:
    MAX(TRANSACTION_TABLE.LATEST_DATE) STATUS
    17-MAR-08 hello
    2 rows selected
    Message was edited by:
    user594688
    THANK YOU for all the replies

    Hi,
    max funtion never returns two rows :-)
    If 'part 1' returns a value, the query needs to
    return null. If 'part 1' returns multiple values for
    latest_date, I need to return the latest of the
    dates.It can't dual always return 1 row.
    So, why do you need part 2?
    >
    Currently, this is the query I have. However this
    query returns more than 1 row.
    This will make your query return one row, but that's probably not what you want:
    SQL> with md AS
      2    (select max(latest_date) max_date
      3     from
      4     ---part 1
      5       (select sysdate latest_date
      6              ,'hello' status
      7        from dual
      8       UNION
      9     --part 2
    10        select NULL latest_date
    11              ,NULL status
    12        from dual))
    13  select transaction_table.*
    14  from   md
    15        ,(select sysdate latest_date
    16                ,'hello' status
    17            from dual
    18         UNION
    19         select NULL latest_date
    20               ,NULL status
    21         from dual) transaction_table
    22  where md.max_date = transaction_table.latest_date;
    LATEST_DA STATU
    17-MAR-08 hello
    1 row selected.Regards
    Peter

  • Returning two rows with one column containing only one place

    Dear all;
    I have a query that returns two rows similar to this below
    ID      PLACE            PROGRAM
    A       NEWYORK      PROGRAM A
    A       NEWYORK      PROGRAM B
    I would like this instead
    ID      PLACE             PROGRAM
    A       NEWYORK       PROGRAM A
                                   PROGRAM  B
    All help is appreciated. Thank you.Edited by: user13328581 on Mar 22, 2011 11:52 AM

    user13328581 wrote:
    WOW...THanks a lot Solomon, I have never used partitions and row_number in such a manner...can you please explain your logic.Sure:
    row_number() over(partition by id order by place,program)This will take all rows returned by the query andsplit them into buckets (partitions) by id. Inside each bucket it will order rows by place and program and assign them row numbers. So for each ID row number 1 will be row with first (alphabetically) place first programt. And this is the row where we want ID to show up. That is why we wrap the above analytic function in CASE statement which will do exactly that. Now:
    row_number() over(partition by id,place order by program)does pretty much the same just bucket is ID and PLACE combination. So for each such combination we want to show only for the first (alphabetically) programt.
    Now notice in ORDER BY clause I prefix ID and PLACE with table alias. You must do it since otherwise query alias ID and PLACE will take precedence resulting in wrong sort order (remember we nulled all ID and PLACE except for row number 1).
    SY.

  • PIE Graph does not return when values = 0

    I use this code to create a PIE Chart
    select null LINK
    ,'E0' LABEL
    ,(select count(*)
    from parts
    where om_geometry like 'E0'
    start with childid = :P1_SELECTED_NODE
    connect by prior childid = parentid) VALUE
    from parts where childid = :P1_SELECTED_NODE
    union
    select null LINK
    ,'E1' LABEL
    ,(select count(*)
    from parts
    where om_geometry like 'E1'
    start with childid = :P1_SELECTED_NODE
    connect by prior childid = parentid) VALUE
    from parts where childid = :P1_SELECTED_NODE
    union
    select null LINK
    ,'E2' LABEL
    ,(select count(*)
    from parts
    where om_geometry like 'E2'
    start with childid = :P1_SELECTED_NODE
    connect by prior childid = parentid) VALUE
    from parts where childid = :P1_SELECTED_NODE
    union
    select null LINK
    ,'E3' LABEL
    ,(select count(*)
    from parts
    where om_geometry like 'E3'
    start with childid = :P1_SELECTED_NODE
    connect by prior childid = parentid) VALUE
    from parts where childid = :P1_SELECTED_NODE
    union
    select null LINK
    ,'E4' LABEL
    ,(select count(*)
    from parts
    where om_geometry like 'E4'
    start with childid = :P1_SELECTED_NODE
    connect by prior childid = parentid) VALUE
    from parts where childid = :P1_SELECTED_NODE
    It works beautifully, except when each of the values returned equate to zero.
    When this is the case the svg chart is not returned. Any ideas?

    That will come in handy. I have some line graphs to do as well. I am using version 2.2 so i don't think they fixed it. However, i have some good news i have found a work around to my problem. With my set of data i am always going to be bringing back at max 5 values for the data, so i created an item type for each one and set a value in a temporary table. e.g.
    declare
    l_id number;
    begin
    delete from graph_temp where name like 'E0' and graph_name like 'P1_GEOM';
    select count(*) into l_id
    from parts
    where om_geometry like 'E0'
    start with childid = :P1_SELECTED_NODE
    connect by prior childid = parentid;
    if l_id > 0 then
    insert into graph_temp (name,value, graph_name) values ('E0',l_id,'P1_GEOM');
    end if;
    return l_id;
    end;
    As you can see the table only gets populated when the value is greater than zero. My graph then becomes a simple select from the graph_temp table. The only change i now need to make is to have a session id column in the graph_temp table so i only remove the correct session info each time.

  • Returning one row per group

    I apologize if this is a duplicate of some other post, but I'm not finding this exact scenario.
    Assume that I have a table that looks like this:
    select * from PROD_TABLE
    PROD DESCRIPTION
    1234 CANDLES
    1234 CANDLE
    1235 BRAKE PADS
    1235 BRAKE PAD
    (Yes, I know, I know, but it's for a POC, so dirty data will be cleaned up later.)
    What I'd like to do is create a select statement that returns two rows from this table, one row for Prod 1234, one row for Prod 1235, and I DON'T CARE which description is returned for the corresponding Prod. For the POC, it's just not important which one is returned.
    How can I craft the select statement?

    try this
    SQL> with t as (select 1234 prod, 'CANDLES' dec from dual union all
      2  select 1234 ,'CANDLE' dec from dual union all
      3  select 1235 ,'BRAKE PADS' dec from dual union all
      4  select 1235 ,'BRAKE PAD' dec from dual)
      5  SELECT prod, DEC
      6    FROM ( SELECT a.*
      7                , ROW_NUMBER ( ) OVER ( PARTITION BY prod ORDER BY prod ) rn
      8            FROM t a )
      9   WHERE rn = 1
    10  /
          PROD DEC
          1234 CANDLES
          1235 BRAKE PADS
    SQL>

  • Oracle view return more rows than its base query

    O/S : AIX
    Database : 11g R (11.1.0.6.0)
    Query in questioon :
    select A.CompanyCode, A.Code ElementCode, A.ItemTypeCode ElementItemTypeCode, A.SubcodeKey ElementSubcodeKey,
    D.DecoSubcode01 SubCode01, D.DecoSubcode02 SubCode02, D.DecoSubcode03 SubCode03, D.DecoSubcode04 SubCode04,
    D.DecoSubcode05 SubCode05, D.DecoSubcode06 SubCode06, D.DecoSubcode07 SubCode07, D.DecoSubcode08 SubCode08,
    D.DecoSubcode09 SubCode09, D.DecoSubcode10 SubCode10, C.ItemTypeBCode, C.SubCode01B, C.SubCode02B, C.SubCode03B,
    C.SubCode04B, C.SubCode05B, C.SubCode06B, C.SubCode07B, C.SubCode08B, C.SubCode09B, C.SubCode10B,
    B1.ValueString SlipNo, B2.ValueString EmployeeCode, B3.ValueString SetNo, B4.ValueString SalesOrderCounterCode,
    B5.ValueString SalesOrderCode, B6.ValueString Remarks, B7.ValueDecimal SumTareWeight, B8.ValueString PackingUMCode,
    B9.ValueString PrimaryUMCode, B10.ValueString PlantCode, B11.ValueDecimal PackingFormCode, D.LogicalWarehouseCode FromWarehouseCode,
    D.TemplateCode FromTemplateCode, D.PhysicalWarehouseCode FromPhysicalWarehouseCode, D.WHSLOCATIONWAREHOUSEZONECODE FromZoneCode,
    D.WarehouseLocationCode FromLocationCode, E.LogicalWarehouseCode ToWarehouseCode, E.TemplateCode ToTemplateCode, E.PhysicalWarehouseCode ToPhysicalWarehouseCode,
    E.WHSLOCATIONWAREHOUSEZONECODE ToZoneCode, E.WarehouseLocationCode ToLocationCode, D.TransactionDate, D.ItemTypeCode, E.WeightGross SumGrossWeight, E.WeightNet SumNetWeight
    FROM Elements A, ADStorage B1, ADStorage B2, ADStorage B3, ADStorage B4, ADStorage B5, ADStorage B6, ADStorage B7,
    ADStorage B8, ADStorage B9, ADStorage B10, ADStorage B11, GoodCutAndFentDetail C, StockTransaction D, StockTransaction E
    where A.ABSUNIQUEID=B1.UNIQUEID and B1.NameEntityName='Elements' and B1.FieldName ='GoodCutAndFentSlipNo'
    and A.ABSUNIQUEID=B2.UNIQUEID and B2.NameEntityName='Elements' and B2.FieldName ='GoodCutAndFentEmployee'
    and A.ABSUNIQUEID=B3.UNIQUEID and B3.NameEntityName='Elements' and B3.FieldName ='GoodCutAndFentSetNo'
    and A.ABSUNIQUEID=B4.UNIQUEID and B4.NameEntityName='Elements' and B4.FieldName ='GoodCutAndFentSOCounterCode'
    and A.ABSUNIQUEID=B5.UNIQUEID and B5.NameEntityName='Elements' and B5.FieldName ='GoodCutAndFentSOCode'
    and A.ABSUNIQUEID=B6.UNIQUEID and B6.NameEntityName='Elements' and B6.FieldName ='GoodCutAndFentRemarks'
    and A.ABSUNIQUEID=B7.UNIQUEID and B7.NameEntityName='Elements' and B7.FieldName ='GoodCutAndFentTareWeight'
    and A.ABSUNIQUEID=B8.UNIQUEID and B8.NameEntityName='Elements' and B8.FieldName ='GoodCutAndFentPackingUM'
    and A.ABSUNIQUEID=B9.UNIQUEID and B9.NameEntityName='Elements' and B9.FieldName ='GoodCutAndFentPrimaryUM'
    and A.ABSUNIQUEID=B10.UNIQUEID and B10.NameEntityName='Elements' and B10.FieldName ='GoodCutAndFentPlant'
    and A.ABSUNIQUEID=B11.UNIQUEID and B11.NameEntityName='Elements' and B11.FieldName ='GoodCutAndFentPackingForm'
    and A.CompanyCode=C.CompanyCode and SlipNo=C.SlipNo and C.SeqNo=1 and A.ItemTypeCode=C.ElementItemTypeCode
    and A.SubcodeKey=C.ElementSubcodeKey and A.Code=C.ElementCode and A.CompanyCode=D.CompanyCode
    and C.FromSTTransactionNumber=D.TransactionNumber and C.FromSTTransactionDetailNumber=D.TransactionDetailNumber
    and A.CompanyCode=E.CompanyCode and C.ToSTTransactionNumber=E.TransactionNumber
    and C.ToSTTransactionDetailNumber=E.TransactionDetailNumber
    and SLIPNO='57575763636'
    This query return 1 row.
    Then i created a view on this query except condition SLIPNO='57575763636'
    Now when i use the view as shown below return two rows.
    select * from ViewGoodCutAndFent WHERE SLIPNO = '57575763636'
    I am not able to determine where is problem area is. Thanks & Regards

    In the query SLIPNO is probably C.SlipNo
    In the view SLIPNO is probably B1.ValueString

  • Using same returned data to create datagrid and pie graph

    I am trying to find a good example or information on creating
    charts, initially pie graphs. I will be getting the data from a
    MySQL DB via a HTTPService call to a PHP script. I would like to
    use the same HTTPService call to make a datagrid and build a pie
    graph. My datagrid is working fine.
    All of the examples I have found show the app with an
    internal data source that's hard coded into an array (
    http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDo cs_Parts&file=00001234.html).
    I did search this forum, but it seems most people are just looking
    for dynamic pie graphs and there isn't enough in the entries for me
    to go off of.
    The data returned to the MXML app looks like this:
    <auditdata>
    <riskdata>
    <core>core number here</core>
    <subcore>subcore number here</subcore>
    <mdata>mdata here</mdata>
    <risk1>number here</risk1>
    <risk2>number here</risk2>
    <risk3>number here</risk3>
    </riskdata>
    <riskdata>
    <core>core number here</core>
    <subcore>subcore number here</subcore>
    <mdata>mdata here</mdata>
    <risk1>number here</risk1>
    <risk2>number here</risk2>
    <risk3>number here</risk3>
    </riskdata>
    </auditdata>
    When the data is returned, everything under <riskdata>
    is put into a datagrid. What I'm looking to do in the pie graph is
    this.
    Create a 2 different pie graphs for each riskdata (there will
    only be 2). The first pie graph will be of the three "risks" (where
    their total number equals 100% of the graph). The second pie graph
    would be "core - subcore" and risk1 (where the two values total
    equals 100%of the graph). I hope that makes sense.
    Any guidance would be truly appreciated.
    Thanks,
    Chris

    Does anyone have any ideas on this?
    Thanks,
    Chris

  • How to return mismatched rows from two tables?

    I have created two tables in the same database as below which gives the row
    count of tables across all databases before and after an DB restore
    operation.
    create table before_restore(db_name varchar(100),table_name
    varchar(1000),row_count int) insert into before_restore exec sp_msforeachdb 'USE
    [?]; select ''?'' as database_name,o.name,max(i.rowcnt ) From [?].sys.objects o
    inner join [?].sys.sysindexes i on o.object_id=i.id where o.type=''U'' group by
    o.name'
    create table after_restore(db_name varchar(100),table_name
    varchar(1000),row_count int) insert into after_restore exec sp_msforeachdb 'USE
    [?]; select ''?'' as database_name,o.name,max(i.rowcnt ) From [?].sys.objects o
    inner join [?].sys.sysindexes i on o.object_id=i.id where o.type=''U'' group by
    o.name'
    I want to compare these two tables and it should only return me rows that
    have changed after the restore operation is complete.
    Eg:
    Table xyz has rowcount of 100 before restore and the restore was not proper
    and after restore count is 50. So it should return me the result set as
    below;
    Db_name    Table_Name  row_count_before_restore    row_count_after_restore
    abc                   xyz                       100                              
       50
    Thanks!!!

    Something like below perhaps? Btw, I recommend using catalog view and dynamic management views instead of the old system tables (now called compatibility views)...
    SELECT
    COALESCE(a.db_name, b.db_name) AS db_name
    ,COALESCE(a.table_name, b.table_name) AS table_name
    ,a.row_count AS row_count_before_restore
    ,b.row_count AS row_count_after_restore
    FROM before_restore AS b FULL OUTER JOIN after_restore AS a ON b.db_name = a.db_name AND b.table_name = a.table_name
    WHERE b.row_count <> a.row_count OR b.db_name IS NULL OR a.db_name IS NULL
    Tibor Karaszi, SQL Server MVP |
    web | blog

  • Can't show data labels in pie graphs as decimal number if the crosstab data

    I want to show my data labels in diagrams, as percent values, with three decimals.
    It occurs (in version Oracle Business Intelligence Discoverer Plus 10g (10.1.2.55.26)) it is only possible if the data format of the crosstab data also shows data with decimals. If the data are in integer format, the graphs data labels can only be shown in integer as well.
    Does anyone know how to fix the problem?
    In version Oracle Business Intelligence Discoverer Plus 10g (10.1.2.48.18) we can have a crosstab showing integers and a pie graph showing labels of pie slices where the labels are in percent with three decimals. It seems it does not work in the newer version Oracle Business Intelligence Discoverer Plus 10g (10.1.2.55.26)
    Thanks in advance

    It seems I have another similar problem in version Oracle Business Intelligence Discoverer Plus 10g (10.1.2.55.26):
    I have a Bar (Percent) graph based on a crosstab where the data is formatted as number with two decimals.
    The labels in the graph shows as number (0,76 instead of 76% and 0,13 instead of 13%). I want them to be shown in percent format.
    The Data Label format is set to “Number” with two decimals. I can change the Data Labels to Percent with two decimals and then it shows the data labels in the graph exactly as I want it. But after I have saved the workbook and then opened it again the changes has been “revoked” and is once again set to number with two decimals instead of percent.
    thanks (again) in advance

  • Pie Graph ring-multi Studio Edition Version 11.1.1.2.0

    Update:
    Discovered that a specific sequence is required.
    Column 1 must be set to slice and colums 2-5 pie -- then Preview
    Then swap and it works.
    What ever it takes!!!
    Hi,
    I am trying to create a Pie Graph using Ring_Multi .
    I created a database table with 3 rows.
    1st column is a varchar2 that I want to use for no of Pies.
    2-5 columns are number types.
    When I assign column 1 to the pie and columns 2-5 to the slice I receive a error that states to add a numeric value to the pie. If a swap then the error states to add a numeric value to the slice.
    When I added one of the columns 2-5 to pie it runs, but the result is useless.
    I have tried this at least 50 times, and believe it or not on 3 out of the 50 tries the error did not occur and produceed the desired result.
    I am using Vista 32.
    By the way the Bar graphs work fine.
    Help!!
    chuck
    Edited by: user634580 on Nov 23, 2009 7:23 AM

    Frank,
    Thanks for your response.
    I have installed the Studio Edition Version 11.1.2.4.0 in my PC. But the Tutorial document I have with me, that was written for 11.1.1.2.0. This document I received from ORACLE during my ADF traing with Oracle corporation. Now I have a new PC and I installed the latest version of the Jdeveloper(11.1.2.4.0). This time when I tried to follow the document, I do not see the same screens as before. Sould I remove 11.1.2.4.0 version and install the version 11.1.1.2.0 to follow the training document?
    Or is there any training document or user guide for this new version 11.1.2.4.0.
    I just need to practice few ADF applications/examples with step by step guidance. Any link or document will be helpful.
    Thanks,
    Sudam.

  • Pie Graph 3D mode

    Hi All,
    I have created a Pie Graph with type 3D - The size of the graph is varying depending upon the data(or depending upon number of slice) - but i want a fixed size in the graph - Can any one help me on this please.
    How OBIEE is deciding the radius of the pie circle?
    Thanks in advance,
    Arun

    Hi, I have already given the General Graph property Size - (Width, Height).
    Please not that , i am using the "GO URL" - where i have created a html page with two frames and each frame i am displaying a graphs with the same size (Width, Height) - but what i observed is two graphs are displaying in the html with different in size - or it is varying according to the input data data.
    Example: Frame1 displaying pie chart "A" and Frame2 displaying pie chart "B" both are actually created with same size.
    now Chart "A" has two slice - the ratio is 80:20
    Chart "B" has two slice - the ratio is 55:45
    Now the Chart "A" is displaying bigger than the Chart B.
    Please help on the algorithm used by OBIEE to define this size difference.
    Edited by: Arun Roy on Aug 21, 2009 10:33 AM

  • Returning Multiple Rows From DBAdapter Calling PL/SQL Procedure

    Oracle XE 10g Express Edition
    JDeveloper 11.1.1.2.0
    WebLogic Server 11g
    Guys,
    I have a table of orders, which I need to interrogate, and pass back any matching rows which meet certain criteria (e.g. status = 'OPEN').
    However, rather than create a DBAdapter using an Operation Type of "Peform an Operation on a Table/Select", I need to use an Operation Type of "Call a Stored Procedure or Function".
    I therefore need the procedure to return all the matching rows, rather than a single row.
    I have looked at declaring return parameters for the procedure of the following types:
    RECORD - is good because it allows me to return the elements of the row with their correct datatypes, but does not meet my needs because it will only support the return of a single row.
    VARRAY - good because it can contain many row elements, but not good because it only supports a single row return, and also because all elements of the VARRAY must be of the same data type.
    TABLE - good because it can contain many rows, but bad because each row can contain only two elements - the index element and the data element.
    I think I could first define a RECORD (to hold a row), and then define a TABLE, with the data element being the RECORD, but I have found JDeveloper very fussy indeed when dealing with 'non-standard' data types in the DBAdapter.
    Apologies if I am missing something obvious, but can anyone suggest a way of doing this?
    Many thanks in advance.
    Edited by: user2541290 on 17-Feb-2010 02:48

    Hi, I've been able to create process that seems to work. My platform is a but different but I don't think this is important for your question.
    Here is the PL/SQL code. Just make Db Adapter for Calling stored procedure and it returns all rows!
    Be aware of possible limitations on how manyrows you could return in one select! This can have severe impact on performance.
    Succes.
    Jos Baan
    CREATE OR REPLACE PACKAGE lab2_multiple_rows IS
    -- Author : 801455
    -- Created : 18-2-2010 8:05:52
    -- Purpose :
    -- Public type declarations
    TYPE rrows IS RECORD(
    mutdat DATE,
    opmerking VARCHAR2(20));
    TYPE trows IS TABLE OF rrows INDEX BY BINARY_INTEGER;
    -- Public constant declarations
    -- Public variable declarations
    -- Public function and procedure declarations
    FUNCTION retrows RETURN trows;
    END lab2_multiple_rows;
    CREATE OR REPLACE PACKAGE BODY lab2_multiple_rows IS
    -- Private type declarations
    -- Private constant declarations
    -- Private variable declarations
    -- Function and procedure implementations
    FUNCTION retrows RETURN trows IS
    lrows trows;
    lidx binary_integer := 1;
    BEGIN
    FOR rsql IN (SELECT t.* FROM jba_transactions t ORDER BY t.mutdat)
    LOOP
    lrows(lidx).mutdat := rsql.mutdat;
    lrows(lidx).opmerking := rsql.opmerking;
    lidx := lidx + 1;
    END LOOP;
    RETURN(lrows);
    END;
    BEGIN
    -- Initialization
    NULL;
    END lab2_multiple_rows;
    Edited by: Baan, Jos on 18-feb-2010 8:53

  • ExecuteWithParams is not returning the rows from cache

    Hi,
    We have two VO's based on same entity ,whenever new row is inserted in one VO and we do executeWithParams on another VO ,It is not returning the rows which are uncommitted.
    I replaced the executeWithParams with a custom method in AM in which I am executing the query after applying the view criteria and setting query mode.Its returning rows which are uncommitted.
    Jdev Version which I am using is 11.1.1.7.0
    ExecuteWithParams used to work with uncommitted data in 11.1.1.6.0 .
    Do we need to raise a bug on framework or Am I missing something?
    Edited by: sharavnkumar_malla on Oct 18, 2012 1:02 AM

    Still the same answer, even after you updated the question. We (the public) don't have 11.1.1.7, know nothing about 11.1.1.7, and cannot help you with 11.1.1.7. Questions about internal builds belong on internal forums.

  • Issue with IN parameter of Oracle Procedure returning two RefCursors...

    Hi all,
    I'm having a nightmare with an Oracle procedure that takes one input parameter and returns two RefCursors as outputs. I recently got help in this forum getting a procedure to work that took no inputs but returned two refcursors and that's still working fine. So, for my current issue I have a procedure defined as follows:
    PROCEDURE getQueueInfo(domainKey char, importQueues OUT ODPNet.refcur, exportQueues OUT ODPNet.refcur) IS
      BEGIN
        OPEN importQueues FOR SELECT
        source_key, source_applid,
        import_status(source_key) as status,
        time_added, time_processed
        FROM wm_import_source_header
        WHERE source_id = domainKey
        ORDER BY source_key DESC;
        OPEN exportQueues FOR SELECT
        h.source_key, d.source_applid,
        export_status(h.source_key) as status,
        d.source_wire_code, d.destination_wire_code, h.time_added,
        h.time_transmitted
        FROM wm_export_source_header h, wm_export_source_data d
        WHERE h.source_key = d.source_key
          and d.source_id = domainKey
        ORDER BY h.source_key DESC;
      END getQueueInfo;This is defined within a package called ODPNet as with my previous procedure and all works fine (I can execute within Oracle SQL Developer and it returns the expected results). Within my .NET application my code is as follows:
                try
                    using (OracleConnection conn = new OracleConnection(connString))
                    using (OracleCommand comm = new OracleCommand())
                        comm.CommandText = "ODPNet.getQueueInfo";
                        comm.CommandType = CommandType.StoredProcedure;
                        comm.Connection = conn;
                        OracleParameter domainKey = new OracleParameter();
                        OracleParameter importQueues = new OracleParameter();
                        OracleParameter exportQueues = new OracleParameter();
                        domainKey.OracleDbType = OracleDbType.Char;
                        importQueues.OracleDbType = OracleDbType.RefCursor;
                        exportQueues.OracleDbType = OracleDbType.RefCursor;
                        domainKey.Value = "UKBD72";
                        domainKey.Direction = ParameterDirection.Input;
                        importQueues.Direction = ParameterDirection.Output;
                        exportQueues.Direction = ParameterDirection.Output;
                        comm.Parameters.Add(domainKey);
                        comm.Parameters.Add(importQueues);
                        comm.Parameters.Add(exportQueues);
                        conn.Open();
                        comm.ExecuteNonQuery();
                        OracleDataReader dr1 = ((OracleRefCursor)importQueues.Value).GetDataReader();
                        OracleDataReader dr2 = ((OracleRefCursor)exportQueues.Value).GetDataReader();
                        if (dr1.HasRows)
                            while (dr1.Read())
                                result6 += dr1["source_applid"].ToString() + "<br>";
                        else
                            result6 += "No Rows";
                        if (dr2.HasRows)
                            while (dr2.Read())
                                result7 += dr2["source_applid"].ToString() + "<br>";
                        else
                            result7 += "No Rows";
                catch (Exception ex)
                    result6 = ex.ToString();
                }The value I want to submit as the IN parameter of the procedure is "UKBD72". but I'm really not sure how to apply this and then return my two refcursors into separate datareaders (except for the input parameter stuff the code above is exactly what I did with the other procedure that returned two ref cursors and still works fine). When I run this code I get no errors, I just get told that each DataReader has no rows returned, which shouldn't be right.
    Any help with this would be hugely appreciated.
    Cheers,
    Seb

    Sorry folks, after staring at this over and over, eventually going to sleep and coming back to it with some fresh eyes I realised I was just being a complete idiot - I was feeding the procedure different data in the .NET app than I was when testing in Oracle SQL Developer. Low and behold once I gave it the right data it worked!
    Silly me...

  • Bc4j:RowScope on a Master Detail page always returns 0 rows for detail

    Hi,
    I have a problem with a Master Detail page that is called from another page. The Master Detail page has two View Objects, Budgets and Budget Versions. These are linked properly in BC4J and when I use these VOs together I can navigate through the Budgets (master) and the Budget Versions (details) are populated correctly.
    However, I want to navigate to this page from another page which lists all possible Budgets. I pass the key of the selected Budget to the Master Detail page and the correct Budget is displayed, BUT the Budget Versions are NOT displayed - I get 0 rows returned.
    The mechanism I use to pass the selected Budget ID to my Master Detail page is:
    <ctrl:property name="key">
    <ctrl:selection name="ViewTable" key="key"/>
    </ctrl:property>
    My BC4J Registry is set up as follows:
    <bc4j:registryDef>
    <bc4j:rootAppModuleDef name="BudgetModule"
    defFullName="BudgetPackage.BudgetPackageModule"
    configName="BudgetPackageModuleLocal"
    releaseMode="stateful">
    <bc4j:viewObjectDef name="ItiBudgetsView1">
    <bc4j:rowDef name="CurrentBudgetRow" usesCurrency="True">
    <bc4j:propertyKey name="key"/>
    </bc4j:rowDef>
    </bc4j:viewObjectDef>
    <bc4j:viewObjectDef name="ItiBudgetVersionsView2" rangeSize="15"/>
    </bc4j:rootAppModuleDef>
    </bc4j:registryDef>
    I then use
    <bc4j:rowScope name="CurrentBudgetRow">
    to get the correct Budget row in my master VO. But this always returns 0 rows in my detail VO. If I comment out the rowScope element, I don't get the desired Budget row, but I do get the correct Budget Version rows displayed. Is the rowScope element on the Budget VO interfering with the Budget Version VO?
    Hope this is not too confusing!!
    Thanks,
    Steve

    Steve,
    I tried to create a comparable set of two pages and initially ran into the same problem. I just realized that my issue (which I hope is yours too) is that the rootAppModule name was different across my two pages. This led to each page having its own application module instance, so the currency was different on each page.
    By changing all of my pages to use the same application module name (in the registryDef, in the appModuleScope tags in the page, and in the findAppModule tags in the handlers), I resolved this problem.
    My event handler to go to the master/detail page from the master page, FYI, looks like this:
      <event name="details" >
       <bc4j:findRootAppModule name="MyApp" >
        <!-- establish the ViewObject scope -->
        <bc4j:findViewObject name="CustomersView1" >
         <!-- find the selected Row -->
         <bc4j:findRowByKey>
          <bc4j:keyBinding>
           <bc4j:selectionKey name="viewTable" key="key" />
          </bc4j:keyBinding>
         </bc4j:findRowByKey>
        </bc4j:findViewObject>
        <bc4j:executeQuery />
        <go name="OrdersByCustomer_View" redirect="true" />
       </bc4j:findRootAppModule>                     
      </event>Hope this helps.
    -brian
    UIX Team

Maybe you are looking for