Fetch query data in ABAP

Hi
We are trying to execute a BW query using the RRW3_GET_QUERY_VIEW_DATA function module but when I test the function module I'm getting the data expected.
My query is a simple query returning the cost center hierarchy that my authorizations give me access to). I fill the import parameters I_INFOPROVIDER and I_QUERY and leave I_VIEW_ID and I_T_PARAMETER empty. When I execute the function module I only get zeros in the E_CELL_DATA export parameter. The query works fine, when I execute it through the Query Analyzer.
Any ideas what I might be doing wrong?
We are using a BW 3.5 SP19
Regards,
Jacob Vennervald

OK, I have found out that the reason I didn't get any data was that I didn't have any key figures in the query. This might sound strange but I'll try to explain.
What I want to do is to create a query that will return the cost center hierarchy that a specific user has access to. This hierarchy is in the infoobject 0COSTCENTER and I though I could just make a query with this infoobject in it and then fetch the result of this query in ABAP using FM RRW3_GET_QUERY_VIEW_DATA, but apparently that is not possible.
Is there another way to get contents of the infoobject into the query?
Is there a way to fetch the contents of the infoobject from ABAP?
Regards,
Jacob

Similar Messages

  • How to fetch the data from query to internal table ?

    Dear all ,
             I would like to fetch the query data(sq01) into my internal table ? is it possible to do that ?
    Best Regards,
    Carlos

    Hi
    Try this <b>RRW3_GET_QUERY_VIEW_DATA</b>
    Also, you can have a look at this...
    <a href="/people/durairaj.athavanraja/blog/2005/04/03/execute-bw-query-using-abap-part-ii Query results into Internal table</a>
    Regards
    Raj

  • 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

  • Fetch the data from the Data base based on selection criteria in ABAP

    Hi
    I am new to ABAP and working on the Screen where User Enters Company code from and to , Document no and to, I have defined as specified below
      SELECT-OPTIONS Company     FOR p_ccode.
      SELECT-OPTIONS Document    FOR p_fdocnr.
      SELECT-OPTIONS Year           FOR p_fyear.
    When I debug in the pgm I get the values as
    IBT11001100 (From and To Company Code)
    IBT23234241002323424246 (From and To doc no)
    IBT20092009 (From and To Year)
    How can write a SQL select statement to fetch the data from the Database based on the above inputs
    Thanks
    PR

    Moderator message:
    Sorry - this isn't an ABAP training forum. Please press F1 on SELECT-OPTIONS and/or SELECT.
    Thread locked.
    Rob

  • How to fetch published data from portal using ABAP

    Hello,
    I have a file published in the portal (with broadcaster). Now I want to use this file in an ABAP program. I can't call the web address directly because my program can't handle the Portal authentication. So I have two questions:
    - is there any way to call Portal-websites which require authentication from ABAP?
    or
    - how can I directly get access to the file without detour over the Portal (where is the place in file system).
    Thank you very much!
    Martin

    Hello Adrian,
    Thank you very much for your reply.
    > You can publish the report in MHTML format using the
    > BEx Broadcaster to a mapped drive  (completely
    > independent of the portal)  then you could pick this
    > up from your ABAP program if you have access to that
    > share.
    What do you mean with "mapped drive" - <a href="http://http://help.sap.com/saphelp_erp2005vp/helpdata/en/42/e915d951f23ee0e10000000a1553f6/frameset.htm">this</a>? I guess I could choose this drive in broadcaster at "export document in any folder" (don't know exactly English label because my system is in German language...)?
    > I dont really see the value of publishing the report
    > to KM if all you are wanting to do is read this back
    > into your ABAP program.  Why are you wanting to
    > publish the report to the portal in the first place?
    I need to get the image of a BW-chart in ABAP because I want to use it in SAP Interactive Forms by Adobe (I have an ABAP program to fetch my data and create the form). I could create my own chart of the data with the Internet Graphics Service but this would be a lot of work. You can create this charts very easily using the Chart Designer which i.e. is included in the Web Application Designer. If you create a Web Site containing a chart you can access this via browser and you have the chart as an image (created from current data). I tried simply to call this website with ABAP but I can not "log in" and so I have no access to this page. Because of this I had the idea to use the broadcaster to automatically publish this Web Application when my data were updated. If I use MHTML my chart-image is saved separately. This just would work for me. And now I want to get this image as a binary with ABAP.
    I hope you understand my problem.
    Martin

  • Sys_refcursor not fetching any data although query returns value

    hi!!!
    I am using sys_refcursor to return columns,and using below procedure to do so.Although data is there in table_1 and table_2.
    PROCEDURE test_pro(abc_date N DATE,
    cur_get_data OUT sys_refcursor
    OPEN cur_get_data
    for
    select A.col1,B.col2
    from table_1 A
    where A.dis_date=abc_date
    left outer join
    table_2 B
    on
    A.dis_date=B.dis_date;
    IF cur_get_data%rowcount=0
    then
         raise e_error;
    END if;
    EXCEPTION
         when e_error
         then
              ------no_data_found;
         when others
         then
    --------(giving SQL error with error code);
    END      test_pro;
    while running below sql in sql window of pl/sql developer fetching
    data
    select A.col1,B.col2
    from table_1 A
    where A.dis_date=abc_date
    left outer join
    table_2 B
    on
    A.dis_date=B.dis_date;
    but while testing the test_pro in test window of pl/sql developer it is
    not fetching any data and raising e_error each time
    is there any problem arising using IF cur_get_data%rowcount=0 as each time it is going to exception block..
    so can somebody please put some ideas what cud be the possible reason for this??

    Welcome to the forum!
    Unfortunatley you posted to the wrong forum. This question belongs in the SQL and PL/SQL forum.
    PL/SQL
    >
    sys_refcursor not fetching any data although query returns value
    but while testing the test_pro in test window of pl/sql developer it is
    not fetching any data and raising e_error each time
    is there any problem arising using IF cur_get_data%rowcount=0 as each time it is going to exception block..
    >
    A cursor doesn't fetch data - your code has to do that. The code you posted doesn't have any FETCH statements so no data will be fetched.
    There is no problem using 'IF cur_get_data%rowcount=0' but it will always be 0 in your code because you are not fetching any data.
    I'm guessing that you are trying to determine if there are any rows for the query. That isn't going to work since a cursor doesn't fetch rows.
    You just have to return the cursor to the caller and the caller will have to perform at least one fetch to see if there are any rows.
    If the above answers your question the just mark the question ANSWERED. Otherwise, since you have posted in the wrong forum
    1. repost the question in the SQL and PL/SQL forum
    2. Edit this post to add a link to the new thread in the other forum
    3. Mark this question ANSWERED so people will follow up in the other forum.
    Thanks.

  • How can i get the external Sql result return data to abap?

    Dear All
             I have a problem to how to get the select  result data return abap.
    I used abap to run external SQL server. below is my code:
    ***in above ,abap has already connected external SQL.
    Sql = u2018select * from user01u2019
          CALL METHOD OF rec 'Open'
            EXPORTING #1 = sql
            #2 = con
            #3 = '1'.
          IF NOT sy-subrc = 0.
            MESSAGE e000 WITH 'run external sql error!'.
          ENDIF.
    ***now ,below code how can I get the select result to abap code?
    I know I can use native_sql  such as u2018OPEN CUR1 FOR SELECT * FROM user01 AND FETCH NEXT CUR1 INTO :WAu2019.
        Thanks for all
    Sun

    Thanks.
    it is okay now by myself.
    con_str = 'Provider=SQLOLEDB.1;Password=pwd;Persist Security Info=True;User ID=name;Initial Catalog=VTL_DEMO;Data Source=192.168.21.50'.
      CREATE OBJECT o_conn 'ADODB.Connection'.
      CREATE OBJECT o_rec 'ADODB.Recordset'.
      SET PROPERTY OF o_conn 'Provider' = provider.
      SET PROPERTY OF o_conn 'ConnectionString' = con_str.
      CALL METHOD OF o_conn 'Open'.
      sql_str = 'select *  from userh'.
      CALL METHOD OF o_conn 'Execute' = o_recordset
        EXPORTING
        #1 = sql_str.
       #2 = o_conn.
      GET PROPERTY OF o_recordset 'EOF' = rs_eof.
      REFRESH itab.
      WHILE rs_eof NE 1.
        CALL METHOD OF o_recordset 'fields' = o_field
          EXPORTING
          #1 = 0.
        GET PROPERTY OF o_field 'Value' = itab-name.
        CALL METHOD OF o_recordset 'fields' = o_field
          EXPORTING
          #1 = 1.
        GET PROPERTY OF o_field 'Value' =  itab-cid.
        APPEND itab.
        CALL METHOD OF o_recordset 'MoveNext'.
        GET PROPERTY OF o_recordset 'EOF' = rs_eof.
      ENDWHILE.

  • 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

  • Error NO Data Found  in fetching a data from ResultSet

    I am fetching a data from Access Data base ...and i am getting data in a result set...
    query.append(" select * from college_admission_form ");
    stmt = con.createStatement();
    rs = stmt.executeQuery(query.toString());
    while(rs.next()){
    String ad_id = rs.getString(1);
    String admFormId = rs.getString(2); // line 2
    String collegeId = rs.getString(26);
    String temp = rs.getString(2); // error is showing in this line that NO Data Found.
    but earlier in line 2 i am getting the data.
    how to solve it ...plz reply fast

    I am accessing MS Access DB through a simple web appln using jdbc-odbc
    I am getting error at
    while (rs.next())
    System.out.println("rs.getString(1)="+rs.getString(1));
    objEmp.setEmpName(rs.getString(2)); -----at this line
    The problem i am getting is when i assign/set "rs.getString" value to something.If I commect the problem line, it goes ahead well.
    Can some one pls tell me how i shud resolve this problem or how shud i make use of the resultset?
    Thanks

  • Failed to fetch pluggable data source error

    I'm getting this error when creating a report that is connecting to a DB2 table using jdbc. Report builder seems to connect to the database fine, however when I attempt to compile/run the report I get the following error -
    'REP-4102: Failed to fetch pluggable data source.
    java.lang.AbstractMethodError: COM/ibm/db2/jdbc/app/DB2ResultSet.getStatement'
    I'm using the following in my jdbcpds.conf on my local machine.
    <driver name = "ibm-db2"
    subProtocol = "db2"
    connectString = "subProtocol:databaseName"
    class = "COM.ibm.db2.jdbc.app.DB2Driver"
    connection = "oracle.reports.plugin.datasource.jdbcpds.JDBCConnectionHandling"
    loginTimeout = "0">
    </driver>
    Has anyone experienced this issue or has some insight as to what I need to do to resolve this?
    TIA
    Brian

    Dear Oracle Reports Team,
    Can you please help me out ???
    Need your help in this regard urgently.
    Best Regards,
    Ramakrishnan L
    Dear Friends,
    I am encountering the following the error while running the reports.
    REP-4102: Failed to fetch pluggable data source.
    java.lang.NumberFormatException: 75,000000
    I am using an Express Query in this case.
    The same report runs perfectly when connected to the NT server that has the reports server,Http server and the rdf file.The db that the reports uses is on the SOLARIS server.
    But when I use the reports server,http server and the rdf file avaiable to me on the SOLARIS server with the db also now on the same machine it does not run and gives the error.
    What could be the problem ?
    Just to add more clarity below is the URL which I use to display the report
    NT URL(This works perfectly)
    http://sa560:7778/reports/rwservlet?server=rep_sa560&report=c:\DWHReports\Man_Days_Spent.rdf&express_server="server=ora_ro_tcp:172.20.128.199/sl=-2/st=1/ct=0/st=1/"&destype=cache&desformat=htmlcss&OESHOST=172.20.128.199&SUSR_NAME='oraexp'&PASSWORD='test'
    SOLARIS URL(This does not work and gives the error)
    http://172.20.128.199:7778/reports/rwservlet?server=rep_gosisvr&report=Man_Days_Spent.rdf&express_server="server=ora_ro_tcp:172.20.128.199/sl=-2/st=1/ct=0/st=1/"&destype=cache&desformat=htmlcss&OESHOST=172.20.128.199&USR_NAME='oraexp'&PASSWORD='test'
    Regds,
    Ramakrishnan L

  • Xml data to abap internal table

    I'm presently working on a interface where data in abap internal table is converted into xml format and placed in the frontend and vice versa.
    I'm through with the first part and in secodn part also I'm able to transfer the data from frontend to Document Object Model(DOM) by parsing but finally am not able to put it into an internal table.
    Please help (Urgent).
    Thanks and regards,
    S.K.Tripathy

    Hi sitakant,
    1. itab --- > xml
       xml ---> itab.
    2. This program will do both.
       (just copy paste in new program)
    3.
    REPORT abc.
    DATA
    DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
    DATA : BEGIN OF itab OCCURS 0,
    a(100) TYPE c,
    END OF itab.
    DATA: xml_out TYPE string .
    DATA : BEGIN OF upl OCCURS 0,
           f(255) TYPE c,
           END OF upl.
    DATA: xmlupl TYPE string .
    FIRST PHASE
    FIRST PHASE
    FIRST PHASE
    Fetch Data
    SELECT * FROM t001 INTO TABLE t001.
    XML
    CALL TRANSFORMATION ('ID')
    SOURCE tab = t001[]
    RESULT XML xml_out.
    Convert to TABLE
    CALL FUNCTION 'HR_EFI_CONVERT_STRING_TO_TABLE'
      EXPORTING
        i_string         = xml_out
        i_tabline_length = 100
      TABLES
        et_table         = itab.
    Download
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filetype = 'BIN'
        filename = 'd:\xx.xml'
      TABLES
        data_tab = itab.
    SECOND PHASE
    SECOND PHASE
    SECOND PHASE
    BREAK-POINT.
    REFRESH t001.
    CLEAR t001.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename = 'D:\XX.XML'
        filetype = 'BIN'
      TABLES
        data_tab = upl.
    LOOP AT upl.
      CONCATENATE xmlupl upl-f INTO xmlupl.
    ENDLOOP.
    XML
    CALL TRANSFORMATION ('ID')
    SOURCE  XML xmlupl
    RESULT tab = t001[]
    BREAK-POINT.
    regards,
    amit m.

  • Adhoc Query data not getting displayed on Portal

    Hi,
    I have a problem with custom Adhoc query data not getting displayed on the portal.
    It was getting displayed initially but after a user made some changes to the query its not getting displayed.
    The query is displaying data perfectly on R/3 but on portal ..Its giving the message no data found.
    Can anyone help me on this.
    Also if anyone can tell me how do i debug an Adhoc query from potal.
    Is there any tool to debug an Abap program from portal.
    I dont want to use trace,
    Thanks
    GT
    Message was edited by: GT

    Hi GT
    find out the EXACT query u want to launch if it's display
    in BW buisness explorer then change the iview property
    for that query in portal . right click on iview
    BEx Web Application Query String -> assign correct query
    regards,
    kaushal

Maybe you are looking for

  • HCM P&F: Check and Send won't update back end fields?

    Hi All, Here is my issue:  I have a field that is not editable on the screen - we manipulate it using a generic service that is called when the user presses a button. Of course, as we know, all services are called every time 1 service is called, so i

  • My laptop turns off when i remove the power cord

    I have a Pavilion dv7-6c27cl running windows 7 (64 bit). Everytime I remove my laptop from the power cord, it shuts down immdiently. The battery says that it is at 77% and charging. I don't know what wrong at all. The light on the side is orange. Ide

  • How do I determine the number of plots on a waveform graph?

    How do I determine the number of plots that have previously been plotted on a waveform graph? I am loading dynamic data from a file. If I convert to an array and size it and there is only one plot, I get the number of data points and I don't know how

  • LoadVariables ASP Database

    Hi, I've read what threads are on this forum about this and searched high and low but still can't get this working! I've done a few Tutorials on the web saying you can use LoadVariables with an asp page and return db records back to Flash using respo

  • Newbie question: root can't write /home?

    I've just installed Solaris Express DE under Parallels on an MB15. It works fine, except that root can't make directories in /home, or (apparently) change it in any way -- chmod, etc give errors. Even rmdir /home complains that /home is in use or a m