Workbook fetching buffer date in variable popup in BI 7.0

Hi All
Appreciate ur respose in advance
I have an issue related to workbook it is taking the buffer date instead current date from the variable
i have tested the query with its variable popup .when we run it is showing  the current date i.e; sysdate
and when the user runs the work book it fetches data from the cache it will not take the sysdate i.e; the cuurent date i have checked with all the technical settings with query and workbook as well
we are using  a customer exit for 0calday varible
*fo example *when we open the work book it fetches the old date(previousdate) not the current date**
where as when we run the query it will display the variable popup with current date or sysdate
Thanks in advance
Mohammed ghouse
Edited by: Mohammed Ghouse on Jul 17, 2009 2:05 PM
Edited by: Mohammed Ghouse on Jul 17, 2009 2:06 PM

Hi Chandamita Sarmah
Pleased to see ur  reply but all  the technical settings related to workbook are done .every option is selected with out missing even though the problem persits
Thanks for ur reply
Mohammed Ghouse

Similar Messages

  • Error when Fetching CATs Data to BI

    Hi,
    I have created data source in R/3 System (Source System) for CATS data and extracting data Using function Module. Using transaction RSA3 it is fetching all the desired records in R/3 System.
    In BI System extracting Full Data and when monitoring it is throwing Error.
    Error 7 when sending an IDoc
    Error when opening an RFC connection    2
    Error when opening an RFC connection
    Errors in source system
    Function Module for fetching CATS Data
    FUNCTION ZLBTIME_GET_CATSREC.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SRSC_S_IF_SIMPLE-REQUNR
    *"     VALUE(I_DSOURCE) TYPE  SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
    *"     VALUE(I_MAXSIZE) TYPE  SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
    *"     VALUE(I_INITFLAG) TYPE  SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
    *"     VALUE(I_READ_ONLY) TYPE  SRSC_S_IF_SIMPLE-READONLY OPTIONAL
    *"     VALUE(I_REMOTE_CALL) TYPE  SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
    *"  TABLES
    *"      I_T_SELECT TYPE  SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
    *"      E_T_DATA STRUCTURE  ZLSCATS OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    * Example: DataSource for table SFLIGHT
    *  TABLES: SFLIGHT.
    * Auxiliary Selection criteria structure
      DATA: L_S_SELECT TYPE SRSC_S_SELECT.
    * Maximum number of lines for DB table
      STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
    * counter
              S_COUNTER_DATAPAKID LIKE SY-TABIX,
    * cursor
              S_CURSOR TYPE CURSOR.
    * Select ranges
    **  RANGES: L_R_CARRID  FOR SFLIGHT-CARRID,
    **          L_R_CONNID  FOR SFLIGHT-CONNID.
    * Initialization mode (first call by SAPI) or data transfer mode
    * (following calls) ?
      IF I_INITFLAG = SBIWA_C_FLAG_ON.
    * Initialization: check input parameters
    *                 buffer input parameters
    *                 prepare data selection
    * Check DataSource validity
        CASE I_DSOURCE.
          WHEN 'ZLTIME_DS_3'.
          WHEN OTHERS.
            IF 1 = 2. MESSAGE E009(R3). ENDIF.
    * this is a typical log call. Please write every error message like this
            LOG_WRITE 'E'                  "message type
                      'R3'                 "message class
                      '009'                "message number
                      I_DSOURCE   "message variable 1
                      ' '.                 "message variable 2
            RAISE ERROR_PASSED_TO_MESS_HANDLER.
        ENDCASE.
        APPEND LINES OF I_T_SELECT TO S_S_IF-T_SELECT.
    * Fill parameter buffer for data extraction calls
        S_S_IF-REQUNR    = I_REQUNR.
        S_S_IF-DSOURCE = I_DSOURCE.
        S_S_IF-MAXSIZE   = I_MAXSIZE.
    * Fill field list table for an optimized select statement
    * (in case that there is no 1:1 relation between InfoSource fields
    * and database table fields this may be far from beeing trivial)
        APPEND LINES OF I_T_FIELDS TO S_S_IF-T_FIELDS.
      ELSE.                 "Initialization mode or data extraction ?
    * Data transfer: First Call      OPEN CURSOR + FETCH
    *                Following Calls FETCH only
    * First data package -> OPEN CURSOR
        IF S_COUNTER_DATAPAKID = 0.
    * Fill range tables BW will only pass down simple selection criteria
    * of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
    **      LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'CARRID'.
    **        MOVE-CORRESPONDING L_S_SELECT TO L_R_CARRID.
    **        APPEND L_R_CARRID.
    **      ENDLOOP.
    **      LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'CONNID'.
    **        MOVE-CORRESPONDING L_S_SELECT TO L_R_CONNID.
    **        APPEND L_R_CONNID.
    **      ENDLOOP.
    * Determine number of database records to be read per FETCH statement
    * from input parameter I_MAXSIZE. If there is a one to one relation
    * between DataSource table lines and database entries, this is trivial.
    * In other cases, it may be impossible and some estimated value has to
    * be determined.
    **      OPEN CURSOR WITH HOLD S_CURSOR FOR
    **      SELECT (S_S_IF-T_FIELDS) FROM SFLIGHT
    **                               WHERE CARRID  IN L_R_CARRID AND
    **                                     CONNID  IN L_R_CONNID.
            OPEN CURSOR WITH HOLD s_cursor FOR
    *        SELECT * FROM zlvctmbw.
            SELECT a~counter a~pernr a~workdate a~skostl a~lstar a~rproj a~awart a~kokrs a~meinh a~tcurr a~price
                   a~unit a~bukrs a~ersda a~erstm a~ernam a~laeda a~laetm a~status a~refcounter a~reason a~belnr
                   a~catshours a~act1 a~act2 a~task a~lang1 a~narr1 a~lang2 a~narr2 a~cmnt a~clst a~plchl
                   b~ltxa1 b~transfer b~hrkostl b~hrlstar b~hrcostasg b~statkeyfig b~catsquantity b~bemot
                   c~pspnr c~pspid
                   d~kunnr
            FROM   catsdb AS a
            LEFT OUTER JOIN catsco AS b ON a~counter = b~counter
            JOIN   prps AS p ON p~pspnr = a~rproj
            JOIN   proj AS c ON c~pspnr = p~psphi
            JOIN   zltproj AS d ON d~pspnr = c~pspnr.
        ENDIF.                             "First data package ?
    * Fetch records into interface table.
    *   named E_T_'Name of extract structure'.
        FETCH NEXT CURSOR S_CURSOR
                   APPENDING CORRESPONDING FIELDS
                   OF TABLE E_T_DATA
                   PACKAGE SIZE S_S_IF-MAXSIZE.
        IF SY-SUBRC <> 0.
          CLOSE CURSOR S_CURSOR.
          RAISE NO_MORE_DATA.
        ENDIF.
        S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
      ENDIF.              "Initialization mode or data extraction ?
    ENDFUNCTION.
    When fetching data using VIEW in source system it works fine.
    When testing for fetching data of SFLIGHT using function module ZRSAX_BIW_GET_DATA_SIMPLE
    made a copy of RSAX_BIW_GET_DATA_SIMPLE, it is working fine.
    Pls suggest the cause of error.
    Regards
    Vishal

    Hello Praveen,
    Connection is fine as I tried fetching data of SFLIGHT using standard template function module which works fine and in transaction sm58 I do not any data.
    Regards
    Vishal

  • How to fetch the data from a pl/sql table and varray, with some example

    I want to fetch the data using a cursor from Pl/sql table and varry and I want to update the data.
    Please provide me some example.

    PL/SQL Table  - please note that, right term is Associative Array.
    Presumably you are referring to the 'often heated' back-and-forth that sometimes goes on in the forums when people refer to ANY PL/SQL type using a term with the word 'table' in it?
    Curious that you then show an example of a nested table!
    type emp_tab is table of employees%rowtype;
    The 'right term' for that is 'nested table'. The following would be an 'associative array' or 'index-by table'
    type emp_tab is table of employees%rowtype INDEX BY PLS_INTEGER;
    Those used to be called 'PL/SQL tables' or 'index-by tables' but 'associative array' is the current term used.
    Associative Arrays
    An associative array (formerly called PL/SQL table or index-by table) is a set of key-value pairs. Each key is a unique index, used to locate the associated value with the syntax variable_name(index).
    The data type of index can be either a string type or PLS_INTEGER.
    Since the Oracle docs often use 'PL/SQL table' or 'index-by table' it isn't unusual for someone asking a question to use those terms also. Technically the types may not be 'tables' but it's clear what they mean when they use the term.
    In PL/SQL the term 'nested table' is still used even though the PL/SQL collection is not really a table. SQL does have nested tables where the data is actually stored in a table. The PL/SQL  'nested table' type can be used as the source/destination of the SQL data from a nested table so that may be why Oracle uses that term for the PL/SQL type.
    The doc that SKP referenced refers to this use:
    Nested Tables
    In the database, a nested table is a column type that stores an unspecified number of rows in no particular order. When you retrieve a nested table value from the database into a PL/SQL nested table variable, PL/SQL gives the rows consecutive indexes, starting at 1.

  • ORA-01044: size of buffer bound to variable exceeds maximum

    Hello Oracle Gurus,
    I have a tricky problem.
    I have a stored procedure which has to retun more than 100,000 records. In my stored procedure, I have "TABLE OF VARCHAR2(512) INDEX BY BINARY_INTEGER". It fails when I try to get 80,000 records.
    I get an error "ORA-01044: size 40960000 of buffer bound to variable exceeds maximum 33554432"
    A simple calculation shows that 512*80000=40960000.
    Oracle help suggests to reduce buffer size (i.e., number of records being returned or size of variable).
    But, reducing the number of records returned or reducing the size of variable is not possible because of our product design constraints.
    Are there any other options like changing some database startup parameters to solve this problem?
    Thanks,
    Sridhar

    We are migrating an application running on Oracle 8i to 9i and found the same problem with some of the stored procedures.
    Our setup:
    + Oracle 9.2.0.3.0
    + VB6 Application using OLEDB for Oracle ...
    + MDAC 2.8 msdaora.dll - 2.80.1022.0 (srv03_rtm.030324-2048)
    I am calling a stored procedure from VB like this one:
    {? = call trev.p_planung.GET_ALL_KONTEN(?,?,{resultset 3611, l_konto_id, l_name,l_ro_id, l_beschreibung, l_typ, l_plg_id})}
    If setting the parameter "resultset" beyond a certain limit, I will eventually get this ORA-01044 error. This even happens, if the returned number of records is smaller than what supplied in the resultset parameter (I manually set the "resultset" param in the stored procedure string). E.g.:
    resultset = 1000 -> ORA-06513: PL/SQL: Index der PL/SQL-Tabelle ungültig für Language-Array vom Host
    resultset = 2000 -> OK (actual return: 1043 Recordsets)
    resultset = 3000 -> ORA-01044: Größe 6000000 des Puffers für Variable überschreitet Höchstwert von 4194304
    resultset = 3500 -> ORA-01044: Größe 7000000 des Puffers für Variable überschreitet Höchstwert von 4194304
    ... therefore one record is calculated here 7000000/3500=2000 bytes.
    In Oracle 8i we never had this problem. As this is a huge application using a lot stored procedures, changing all "select" stored procedures to "get data by chunks" (suggestet in some forum threads in OTN) ist not an option.
    Interesting: I can call the stored procedure above with the same parameters as given in VB from e.g. Quest SQL Navigator or sql plus successfully and retrieve all data!
    Is there any other known solution to this problem in Oracle 9i? Is it possible to increase the maximum buffer size (Oracle documentation: ORA-01044 ... Action: Reduce the buffer size.)? What buffer size is meant here - which part in the communication chain supplies this buffer?
    Any help highly appreciated!
    Sincerely,
    Sven Bombach

  • Stop ADF from fetching all data on startup

    Hi all,
    I have built an ADF page with a search form on it. Goal here obviously is to search the DB for certain user entered criteria. The problem now is that ADF fetches all data before the user has enetered anything. Pretty annoying, as it takes about 5 minutes to fetch the 1 mil records over VPN. And not very performant either...
    How can I stop ADF from doing this?
    Thanks,
    Stijn.

    Hi,
    2 topics here that I'll address one after the other
    1. ADF fetches nothing. The business Service layer does. If you use ADF BC for example then you can define the number of records that are fetched initially. If you use EJB then this kind of intelligence is all yours to implement. Same then for POJO and Web Service. If you are working with a million of records, think about using query hints in your query to boost performance.
    2. To solve your issue
    - assuming you use ADF BC: Set the iterator to find mode or set the query condition to where it finds no hits. If your query uses bind variables then it is enough to not provide a default value for the bind variable. Another option is to use a invokeAction method and set the iterator into findMode upon page load
    - If you use EJB, make sure the initial query also doesn't return any hits
    Note that for the refresh property on teh iterator there are other conditions like "deferred" that you may want to try out
    Frank

  • Want to hide/eliminate the leading Zeros in the Variable popup for0MATERIAL

    I have a requirement where 0MATERIAL is having leading zeros and it has the MATN1 conversion routine in the production system.I want to only remove the leading zeros in the Variable popup in report for 0 MATERIAL witohut changing the definition of the object as it has too much production data to change.
    Best Regards
    Tagore

    Hi,
    You will have to write some code in F4 help BADI, please refer the sap note 1416952. And you can take help of following function module to remove leading zeros,
    CONVERSION_EXIT_ALPHA_OUTPUT.
    If above thing doesn't help then you will have to create virtual key figure.
    Regards,
    Durgesh.

  • Message @ variable-popup

    Hi m8s,
    the first screen if you are running a query is the variable-popup, where you can enter your selections/restrictions. I would like to add there a message for the users e.g. how to use this selection screen, etc... How can I do that?
    Thx.

    Hi,
    You can use offsets with -4 in the Query designer for that Fiscal period variable.
    See whenever user enters Fiscal period it will minus the period and shows what you are expecting.
    you also use between option where it will show the data ranges between entered month and -4.
    Let us know.
    Reg
    Pra

  • Excel Workbook with Excel Data Model stored on SharePoint - daily refresh

    I'm not sure if this is exactly the right forum but I'm hoping that someone here can either answer or point me in the right direction.
    I have an Excel Workbook with an Excel Data Model.
    The Excel Data Model uses SQL to contact our data warehouse and pull through data into tables.
    We are storing the Workbook on a SharePoint site and viewing it using Excel Services.
    The data in our data warehouse is updated daily and so I would like to refresh the workbook daily and remove the option to refresh the data in the browser.
    Is this possible with a workbook that has an Excel Data Model (I've seen lots of posts that relate to workbooks with connections to tabular models).
    Thanks
    Paul

    Hi Paul,
    I have answered this issue in this thread that you posted in SQL Server PowerPivot for SharePoint forum, please see:
    http://social.msdn.microsoft.com/Forums/en-US/9627939c-e9f1-48ae-a6ed-0c238d8f2d69/excel-workbook-with-excel-data-model-stored-on-sharepoint-daily-refresh?forum=sqlkjpowerpointforsharepoint
    Furthermore, this issue is more related to PowerPivot for SharePoint. If you have any more questions about PowerPivot for SharePoint, I would sugget you open a new thread in the forum below for better support:
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=sqlkjpowerpointforsharepoint
    Thanks for your understanding.
    Regards,
    Elvis Long
    TechNet Community Support

  • Not able to fetch the data by Virtual Cube

    Hi Experts,
    My requirement is I need to fetch the data from Source System (From Data base table) by using Virtual Cube.
    What I have done is I have created Virtual Cube and created corresponding Function Module in Source System.
    That Function MOdule is working fine, if Data base table is small in Source System.But If data base table contains huge amount of data (millions of record), I am not able to fetch the data.
    Below is the code I have incorporated in my function module.
    c_th_mapping TYPE CL_RSDRV_EXTERNAL_IPROV_SRV=>TN_TH_IOBJ_FLD_MAPPING.
      DATA:
        l_s_map TYPE CL_RSDRV_EXTERNAL_IPROV_SRV=>TN_S_IOBJ_FLD_MAPPING.
      l_s_map-iobjnm = '0PARTNER'.
      l_s_map-fldnm  = 'PARTNER'.
      insert l_s_map into table l_th_mapping.
    create object l_r_srv
        exporting
           i_tablnm              = '/SAPSLL/V_BLBP'
          i_th_iobj_fld_mapping = l_th_mapping.
      l_r_srv->open_cursor(
        i_t_characteristics = characteristics[]
        i_t_keyfigures      = keyfigures[]
        i_t_selection       = selection[] ).
       l_r_srv->fetch_pack_data(
        importing
          e_t_data = data[] ).
      return-type = 'S'.
    In the above function Module,Internal table L_TH_MAPPING contains Info Objects from Virtual Cube and corresponding field from Underlying data base table.
    The problem where I am facing is, in the method FETCH_PACK_DATA, initially program is trying to fetch all the recordsfrom data base table to internal table.If Data base table so lagre, this logic is not working.
    So would you please help me how to handle these kind of issues.

    Hi Experts,
    My requirement is I need to fetch the data from Source System (From Data base table) by using Virtual Cube.
    What I have done is I have created Virtual Cube and created corresponding Function Module in Source System.
    That Function MOdule is working fine, if Data base table is small in Source System.But If data base table contains huge amount of data (millions of record), I am not able to fetch the data.
    Below is the code I have incorporated in my function module.
    c_th_mapping TYPE CL_RSDRV_EXTERNAL_IPROV_SRV=>TN_TH_IOBJ_FLD_MAPPING.
      DATA:
        l_s_map TYPE CL_RSDRV_EXTERNAL_IPROV_SRV=>TN_S_IOBJ_FLD_MAPPING.
      l_s_map-iobjnm = '0PARTNER'.
      l_s_map-fldnm  = 'PARTNER'.
      insert l_s_map into table l_th_mapping.
    create object l_r_srv
        exporting
           i_tablnm              = '/SAPSLL/V_BLBP'
          i_th_iobj_fld_mapping = l_th_mapping.
      l_r_srv->open_cursor(
        i_t_characteristics = characteristics[]
        i_t_keyfigures      = keyfigures[]
        i_t_selection       = selection[] ).
       l_r_srv->fetch_pack_data(
        importing
          e_t_data = data[] ).
      return-type = 'S'.
    In the above function Module,Internal table L_TH_MAPPING contains Info Objects from Virtual Cube and corresponding field from Underlying data base table.
    The problem where I am facing is, in the method FETCH_PACK_DATA, initially program is trying to fetch all the recordsfrom data base table to internal table.If Data base table so lagre, this logic is not working.
    So would you please help me how to handle these kind of issues.

  • Reg: fetch the data by using item_id which is retuned by In line View Query

    Hi all,
    create table xxc_transactions(type_id number,trx_line_id number ,item_id number,org_id number);
    insert into xxc_transactions values(null,null,null,null);
    create table xxc_items1(item_id number,org_id number,item_no varchar2(10));
    insert into xxc_items1 values(123,12,'book');
    create table xxc_headers(header_id number,order_id number);
    insert into xxc_headers values(null,null);
    create table xxc_lines(header_id number,item_id number,line_id number);
    insert into xxc_lines values(null,null,null);
    create table xxc_types_tl(transaction_id number,NAME varchar2(10));
    insert into xxc_types_tl values(106,'abc');
    create table xxc_quantity(item_id number);
    insert into xxc_quantity values (123);
    create table xxc_quantity_1(item_id number);
    insert into xxc_quantity_1 values (123);
    SELECT union_id.item_id,
           b.org_id,
           e.name,
           fun1(union_id.item_id) item_no
    FROM   xxc_transactions a,
           xxc_items1 b,
           xxc_headers c,
           xxc_lines d,
           xxc_types_tl e,
           (SELECT item_id
            FROM   xxc_quantity
            WHERE  item_id = 123
            UNION
            SELECT item_id
            FROM   xxc_quantity_1
            WHERE  item_id = 123
            UNION
            SELECT item_id
            FROM   xxc_transactions
            WHERE  item_id = 123) union_id
    WHERE  a.type_id = 6
           AND a.item_id  = b.item_id
           AND union_id.item_id = b.item_id
           AND a.org_id = b.org_id
           AND c.header_id = d.header_id
           AND d.line_id = a.trx_line_id
           AND d.item_id = b.item_id
           AND c.order_id = e.transaction_id
           AND b.org_id = 12
    GROUP  BY union_id.item_id,
              b.org_id,
              e.name
    ORDER  BY union_id.item_id;
    create or replace function fun1(v_item in number)
    return varchar2
    is
    v_item_no
    Begin
       select item_no from xxc_items1
       where item_id=v_item;
       return v_item_no ;
        Exception
         When Others Then
          v_item_no := null;
          return v_item_no;
    END fun1;
    I  need  fetch the data by using item_id which is retuned by In line View Query(UNION)
    item_id  org_id  name    item_no
    123        12        abc       book
    Version: 11.1.0.7.0  and 11.2.0.1.0
    Message was edited by: Rajesh123 Added test cases script
    Message was edited by: Rajesh123 changed Question as fetch the data by using item_id which is retuned by In line View Query(UNION)

    Hi Master , sorry for the late reply and can you please help on this?
    create table xxc_transactions(type_id number,trx_line_id number ,item_id number,org_id number);
    insert into xxc_transactions values(null,null,null,null);
    create table xxc_items(item_id number,org_id number,item_no varchar2(10));
    insert into xxc_items values(123,12,'book');
    create table xxc_headers(header_id number,order_id number);
    insert into xxc_headers values(null,null);
    create table xxc_lines(header_id number,item_id number,line_id number);
    insert into xxc_lines values(null,null,null);
    create table xxc_types_tl(transaction_id number,NAME varchar2(10));
    insert into xxc_types_tl values(106,'abc');
    create table xxc_uinon_table(item_id number);
    insert into xxc_types_tl values(123);
    SELECT   union_id.item_id,
             b.org_id ,
             e.name ,
             fun1(union_id.item_id) item_no   --> to get item_no
             FORM xxc_transactions a,
             xxc_items             b,
             xxc_headers           c,
             xxc_lines             d,
             xxc_types_tl          e,
             ( SELECT item_id
                 FROM   xxc_uinon_table ) union_id
    WHERE    a.type_id= 6
    AND      a.item_id = b.item_id
    AND      union_id.item_id = b.item_id
    AND      a.org_id = b.org_id
    AND      c.header_id = d.header_id
    AND      d.line_id= a.trx_line_id
    AND      d.item_id= b.item_id
    AND      c.order_id= e.transaction_id ---106
    AND      b.org_id = 12
    GROUP BY union_id.item_id,
             b.org_id ,
             e.name
    ORDER BY union_id.item_id;
    Note: xxc_uinon_table is a combination of UNION's
    select 1 from dual
    union
    select 1 from dual
    union
    select no rows returned  from dual;
    I will get 1 from the above Query
    Thank you in advanced

  • Error -1074118610 occurred at niUSRP Fetch Rx Data (CDB Cluster).vi

       I researched this error in forum ,however, I don't reach the solutions. 
    Error -1074118610 occurred at niUSRP Fetch Rx Data (CDB Cluster).vi
    The received data is out of sequence. This may be a symptom of overflows due to an inability to maintain streaming at the specified IQ Rate, or rearrangement of packets by an ethernet adapter or network switch.
       When I start to USRP, I am taking this error 6-7 minutes later. I tried IQ Rate= 2M and samples per symbol=4 also IQ Rate is approximately 192k and samples per symbol= 20 for 9600 baud rate. 

    Hello ITUbahadir
    I understand you are NOT testing a LabVIEW shipping example. If this is correct, Could you try to test the shipping examples? Same error? If this is incorrect, what is the name of the example?
    If the problem is specific to your code, could you share it? If you are not able to do that, could you explain me what have you changed to the code?
    Regards
    Frank R.

  • How to fetch the data from pl/sql table dynamically

    Hi All, I have the requirement of comparing two db views data in pl/sql. So, I have bulk collect the view into pl/sql table. But, the issue is, It is expecting to provide the column name for comparison. But, in my case, column name is dynamic. So, i cannot provide the column name directly for comparison.
    For eg: In my view t1_VW, i have 4 columns. stid, c1,c2,c3,c4 and similar structure for t2_vw
    my code
    TYPE v1_type IS TABLE OF t1_vw%ROWTYPE;
    l_data v1_type;
    TYPE v1_type1 IS TABLE OF t2_vw%ROWTYPE;
    l_data1 v1_type1;
    test varchar2(1000);
    test1 varchar2(1000);
    temp1 number;
    begin
    SELECT * Bulk collect into l_data
    FROM T1_VW;
    SELECT * Bulk collect into l_data1
    FROM T2_VW;
    select l_data(1).stid into temp1 from dual; -- It is working fine and gives me the value properly
    -- But, in my case, we are reading the column names from array, i am constructing the query dynamically and execute it.
    test :='select l_data(1).stid into temp1 from dual';
    execute immediate test into temp1;
    -- I am getting error as follows:
    Error report:
    ORA-00904: "L_DATA": invalid identifier
    ORA-06512: at "SYSTEM.BULKCOMPARISON", line 93
    ORA-06512: at line 2
    00904. 00000 - "%s: invalid identifier"
    *Cause:   
    *Action
    end;
    - Please help me to get rid of this issue. Is it possible to construct the query dynamically and fetch the data?. If not, is there any other better approach to compare the data between two views?.

    Output should display what are all columns changed and its old value and new value.
    For eg., output should be
    COLUMNNAME OLD_VALUE NEW_VALUE STID
    C1 20 10 1
    C2 50 40 2
    C3 60 70 2
    C2 80 90 3Why no do this only via a simple sql ?
    create table a (STID number, C1 number,  C2 number, C3 number);
    insert into a values (1, 20, 30, 40)
    insert into a values (2, 40, 50, 60);
    insert into a values (3, 90, 80, 100);
    create table b as select *
    from a where 1 = 0;
    insert into b values (1, 10, 30, 40)
    insert into b values (2, 40, 40, 70);
    insert into b values (3, 90, 90, 100);
    commit;And now you can issue such a kind of select
    SELECT stid , c1, c2, c3                      
       FROM
      ( SELECT a.*,
             1 src1,
             to_number(null) src2        
       FROM  a   
       UNION ALL
       SELECT b.*,
             to_number(null) src1,
             2  src2        
        FROM b
       GROUP BY stid , c1, c2, c3
       HAVING count(src1) <> count(src2)
       order by stid;I would then create a new table a_b_difference having the same structure as a or b and insert into it like this
    create table a_b_diff as select * from a where 1 = 0;
    insert into a_b_diff
    SELECT stid , c1, c2, c3                      
       FROM
      ( SELECT a.*,
             1 src1,
             to_number(null) src2        
       FROM  a   
       UNION ALL
       SELECT b.*,
             to_number(null) src1,
             2  src2        
        FROM b
       GROUP BY stid , c1, c2, c3
       HAVING count(src1) <> count(src2)
       order by stid
       ;Then each time there is a difference between a column in a and its equivalente one in b (per unique stid ) a record will be inserted in this table.
    You can do more by adding the name of the table in front of each record in this table to see exactly where the data comes from
    Best Regards
    Mohamed Houri

  • How to fetch the data from databse table and get the required output

    Hi,
    I have made a project that connects CEP to database table but i m getting some problem in fetching the data from database.
    From the following code :
    If the where condition is removed then the application runs fine but i am still not able to fetch the data from the table because it is not showing any output.
    Can anyone please suggest me that how to write WHERE statement correctly and how i will be able to see the output.
    Following is the config.xml for processor:
    ======================================
    <?xml version="1.0" encoding="UTF-8"?>
    <wlevs:config xmlns:wlevs="http://www.bea.com/ns/wlevs/config/application"
         xmlns:jdbc="http://www.oracle.com/ns/ocep/config/jdbc">
         <processor>
              <name>JDBC_Processor</name>
              <rules>
                   <query id="q1"><![CDATA[
                             SELECT STOCK.SYMBOL as symbol, STOCK.EXCHANGE as exchange
                             FROM ExchangeStream [Now] as datastream, STOCK
                             WHERE datastream.SYMBOL = datastream.SYMBOL ]]></query>
              </rules>
         </processor>
         <jms-adapter>
              <name>JMS_IN_Adapter</name>
              <jndi-provider-url>t3://CHDSEZ135400D:7001</jndi-provider-url>
              <destination-jndi-name>jms.TestKanikaQueue</destination-jndi-name>
              <user>weblogic</user>
              <password>welcome1</password>
         </jms-adapter>
    </wlevs:config>
    Following is the assembly file:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:osgi="http://www.springframework.org/schema/osgi"
         xmlns:wlevs="http://www.bea.com/ns/wlevs/spring" xmlns:jdbc="http://www.oracle.com/ns/ocep/jdbc"
         xmlns:spatial="http://www.oracle.com/ns/ocep/spatial"
         xsi:schemaLocation="
              http://www.springframework.org/schema/beans
              http://www.springframework.org/schema/beans/spring-beans.xsd
              http://www.springframework.org/schema/osgi
              http://www.springframework.org/schema/osgi/spring-osgi.xsd
              http://www.bea.com/ns/wlevs/spring
              http://www.bea.com/ns/wlevs/spring/spring-wlevs-v11_1_1_3.xsd
              http://www.oracle.com/ns/ocep/jdbc
              http://www.oracle.com/ns/ocep/jdbc/ocep-jdbc.xsd
              http://www.oracle.com/ns/ocep/spatial
              http://www.oracle.com/ns/ocep/spatial/ocep-spatial.xsd">
         <wlevs:event-type-repository>
              <wlevs:event-type type-name="StockEvent">
                   <wlevs:properties>
                        <wlevs:property name="SYMBOL" type="byte[]" length="16" />
                        <wlevs:property name="EXCHANGE" type="byte[]" length="16" />
                   </wlevs:properties>
              </wlevs:event-type>
              <wlevs:event-type type-name="ExchangeEvent">
                   <wlevs:class>com.bea.wlevs.event.example.JDBC_CEP.ExchangeEvent</wlevs:class>
              </wlevs:event-type>
              <wlevs:event-type type-name="StockExchangeEvent">
                   <wlevs:properties>
                        <wlevs:property name="symbol" type="byte[]" length="16" />
                        <wlevs:property name="price" type="byte[]" length="16" />
                        <wlevs:property name="exchange" type="byte[]" length="16" />
                   </wlevs:properties>
              </wlevs:event-type>
         </wlevs:event-type-repository>
         <bean id="readConverter" class="com.bea.wlevs.adapter.example.JDBC_CEP.Adapter_JDBC" />
         <bean id="outputJDBCBean" class="com.bea.wlevs.bean.example.JDBC_CEP.OutputBean_JDBC">
         </bean>
         <wlevs:adapter id="JMS_IN_Adapter" provider="jms-inbound">
              <wlevs:listener ref="ExchangeStream" />
              <wlevs:instance-property name="converterBean"
                   ref="readConverter" />
         </wlevs:adapter>
         <wlevs:processor id="JDBC_Processor" advertise="true">
              <wlevs:listener ref="OutputChannel" />
              <wlevs:table-source ref="STOCK" />
         </wlevs:processor>
         <wlevs:channel id="ExchangeStream" event-type="ExchangeEvent" advertise="true">
              <wlevs:listener ref="JDBC_Processor" />
         </wlevs:channel>
         <wlevs:channel id="OutputChannel" event-type="StockExchangeEvent"
              advertise="true">
              <wlevs:listener ref="outputJDBCBean" />
         </wlevs:channel>
         <wlevs:table id="STOCK" event-type="StockEvent"
              data-source="StockDs" table-name="STOCK" />
         <wlevs:table id="STOCK_EXCHANGE" event-type="StockExchangeEvent"
              data-source="StockDs" table-name="STOCK_EXCHANGE" />
    </beans>
    ExchangeEvent.java:
    package com.bea.wlevs.event.example.JDBC_CEP;
    public class ExchangeEvent {
         public String SYMBOL;
         public String symbol;
         public String exchange;
         public ExchangeEvent() {
         public String getSYMBOL() {
              return SYMBOL;
         public void setSYMBOL(String sYMBOL) {
              SYMBOL = sYMBOL;
         public String getSymbol() {
              return symbol;
         public void setSymbol(String symbol) {
              this.symbol = symbol;
         public String getExchange() {
              return exchange;
         public void setExchange(String price) {
              this.exchange = price;
    Adapter Class:
    package com.bea.wlevs.adapter.example.JDBC_CEP;
    import com.bea.wlevs.adapter.example.JDBC_CEP.MyLogger;
    import com.bea.wlevs.adapters.jms.api.InboundMessageConverter;
    import java.text.DateFormat;
    import java.util.Date;
    import com.bea.wlevs.adapters.jms.api.MessageConverterException;
    import com.bea.wlevs.event.example.JDBC_CEP.ExchangeEvent;
    import javax.jms.JMSException;
    import javax.jms.Message;
    import javax.jms.TextMessage;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.Random;
         public class Adapter_JDBC implements InboundMessageConverter{
         @SuppressWarnings("unchecked")
         public List convert(Message message) throws MessageConverterException, JMSException {
              Random rand = new Random();
              int unique_id = rand.nextInt();
              DateFormat dateFormat;
              dateFormat = DateFormat.getTimeInstance();
              dateFormat.format(new Date());
              MyLogger.info(unique_id + " CEP Start Time is: " + dateFormat.format(new Date()));
              System.out.println("Message from the Queue is :"+ message);
              TextMessage textMessage = (TextMessage) message;
              String stringMessage = textMessage.getText().toString();
              System.out.println("Message after getting converted into String is :"+ stringMessage);
                   String[] results = stringMessage.split(",\\s*"); // split on commas
                   ExchangeEvent event1 = new ExchangeEvent();
                   event1.setSYMBOL(results[0]);
         List events = new ArrayList(2);
         events.add(event1);
         return events;
    Output Bean Class :
    package com.bea.wlevs.bean.example.JDBC_CEP;
    import com.bea.wlevs.ede.api.StreamSink;
    import com.bea.wlevs.event.example.JDBC_CEP.ExchangeEvent;
    import com.bea.core.datasource.DataSourceService;
    public class OutputBean_JDBC implements StreamSink{
         public void onInsertEvent(Object event) {
         if (event instanceof ExchangeEvent) {
              ExchangeEvent cacheEvent = (ExchangeEvent) event;
         System.out.println("Symbol is: " + cacheEvent.getSymbol());
         System.out.println("Exchange is: " + cacheEvent.getExchange());
         System.out.println(DataSourceService.class.getClass());
    Kindly let me know if you need further info.

    Do you have StockDs configured in your server config.xml?
    I think the query should look more like this:
    SELECT stocks.SYMBOL, stocks.EXCHANGE
    FROM STOCK as stocks, ExchangeStream [Now] as datastream WHERE stocks.SYMBOL = datastream.SYMBOL
    Thanks
    andy

  • How to Fetch the Data from a Cube

    Dear All,
    We created a cube containing dimensions
    Customer, Product, Branch, Activity, Time dimensions
    using Oracle Analytical WorkSpace Manager.
    Once Cube is created,
    How can I see the Data existing in the Cube using normal SQL Queries ??? Through Analytical Workspace Manager Toll we r able to see the data. But our requirement is to see the data from the Cube using SQL Queries.
    Regards,
    S.Vamsi Krishna

    Hey I got the Solution. It follows in this way :
    A Cube is nothing but a Data Storage. Based on the Mapping we given it considers the data.
    To fetch the data from the Cube -> we have to write the SQl Query as below :
         SELECT dealer_name,model_name,sales
         FROM TABLE(OLAP_TABLE('MDB.FINAL_AW DURATION SESSION',
         'DIMENSION dealer_name AS varchar2(30) FROM FINALDEAL
         DIMENSION model_name AS varchar2(30) FROM FINALMODEL'));
    We can create View for the above statement o
    we can apply group by ,rollup, etc etc clauses
    and even we can write where clauses for the above select statement.
    But now my doubt is :
    can we apply any calculations while mapping the Level to an Dimension.
    Generally we will map Level toa dimension as DBUSER.TABLENAME.COLUMN NAME
    can we apply any calculation like :
    MIS.PROPKEY020MB.MATURITY_DATE+2
    Please help for the above.
    If any wrong is there please let me know
    Regards,
    S.Vamsi Krishna
    can we apply

  • Report is not fetching the data from Aggregate..

    Hi All,
    I am  facing the problem  in aggregates..
    For example when i  am running the report using Tcode RSRT2, the BW report is not fetching the data from Aggregates.. instead going into the aggregate it is scanning whole cube Data....
    FYI.. Checked the characteristcis is exactely matching with aggregates..
    and also it is giving the  message as:
    <b>Characteristic 0G_CWWPTY is compressed but is not in the aggregate/query</b>
    Can some body explain me about this error message.. pls let me know solution asap..
    Thankyou in advance.
    With regards,
    Hari

    Hi
    Deactivate the aggregates and then rebuild the indexes and then activate the aggregates again.
    GTR

Maybe you are looking for

  • When i plug my ipod into the computer  it will charge but it won't open itunes?

    As i plug in my ipod to my computer it sometimes charges and somtimes doesn't recongnize my ipod  and im trying to put videos onto my ipod but can't because it won't conncet to the computer. it freezes when the ipods in but when i take it out it unfr

  • How do I get Google microphone on iPad to turn on?

    The mic appears on the Google site and tells me to go to Settings, then Privacy, then Microphone.  Then THAT tells me that the sites who want to use the microphone will appear.  And there is nothing there!  How can I get Google to communicate with my

  • How do I remove the bullets and change font on navagation?

    I have been following the instructions in the video, but the Dreamweaver software is not doing like is shown on the video. 

  • Changing the x-axis crossing point on a log y-axis

    Is it possible to change the point at which the x-axis crossing a log y-axis? I'd like the origin to be 0.1, not 1, and I'm losing hours of my life trying to work out how to do it. Hopefully it will be something easy that I have missed... ...I'd rath

  • Why no PCI Slots 1 & 5 ? ?

    A common thread throughout this board is to tell users not to use PCI slots 1 or 5. I find this perplexing - whats the point of MSI building mobos with 5 slots and then you telling us not to use 2 of them? Can anybody from MSI give me a good and cohe