BEx Query from Java

Hi
Can I call a BEx Query from Java . If yes, in what format data will be returned? We just need data, we want to structure it in Java for display in a Flex UI.
Please note that I have very limited knowledge of both Java and BI.
Thanks in advance for your help.
Best Regards
Saurabh

Hi,
Yes you can. It will be contained in a web template.
Please read through the link below and the related links contained within.
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/0d/af12403dbedd5fe10000000a155106/frameset.htm
Thanks,
Michael
Edited by: Michael Devine on May 25, 2010 3:40 PM

Similar Messages

  • Can I directly access BEX query from web version

    Hi expert,
            Can I directly access BEX query from web version ? I know we can access bex query from webi rich client.
    Many Thanks,

    Hi,
    Yes, you can access BEx query via BICS connection (OLAP Connection).
    In SAP BusinessObjects BI 4.0 you have multiple options to connect your SAP BusinessObjects BI client to your SAP NetWeaver BW system.
    Direct BI Consumer Services (BICS)
    SAP BusinessObjects BI 4.x Relational Universe (UNX)
    SAP BusinessObjects XI 3.1 OLAP Universe (UNV) used in a SAP BusinessObjects BI 4 environment
    Web Intelligence
    Yes
    Yes
    Yes
    SAP BusinessObjects Dashboards
    Yes
    Yes
    No
    Analysis, edition for Microsoft Office
    Yes
    No
    No
    Analysis, edition for OLAP
    Yes
    No
    No
    SAP BusinessObjects Explorer
    No
    Yes
    No
    SAP BusinessObjects Design Studio
    Yes
    No
    No
    Visual Intelligence
    No
    Yes (1)
    No
    Predictive Analysis
    No
    Yes (1)
    No
    Design Studio
    Yes
    No
    No

  • Running the BEX query from webdynpro ABAP

    Hi Gurus,
    Can someone provide the code for running the BEX query from WDA.
    Thanks,
    David.

    Hi! Do you want to get query results in ABAP or to open excel from browser?

  • Copy BEx Query from one SAP BI system to another SAP BI system?

    Experts please help me to Copy a BEx Query from one SAP BI system to another SAP BI system?
    Thanks in Advance.......

    HI,
    Just assume like below,
    you are creating your query in Development server(BI),
    Before creating query, you go to SE09(t code), here you create a workbench request by clicking the create button.
    Give some description here to be identified by you in future.
    Now a requested will be generated(ex: DW5K50098) with prefix of your server name.
    now you go to query designer, you create query, when you save the query, it will ask you request, now you click button 'own request'. you choose request(create by you in SE09).
    it will be saved under this request, now you will have one more request under your request in SE09
    parent request(DW5K50098) and child request(DW5K50099).
    First you click child request and relese(click lorry button in se09),second you click parent request and lorry button.
    next steps will be related to your organization, you can ask your team leader, he will be taking care of it.
    Regards,
    Ranganath.

  • Call BEX-Query from VBA with BEX-automatic login?

    Hi,
    I'm trying to call a query from VBA. I have two problems/questions:
    1. Automatic login?
    I want to do an automatic login. I found this peace of code here, but I get an error:
    Public Function  LogonToYourBW()
    ' create Logon & RFC-Handle
    logonToBW = False ‘ clear connect Flag the flag can be used to find out if connected or not
        'load SAP functionality by opening BEX file ( use your installation path)
            Workbooks.Open (“c:\sappc\bw\sapbex.xla”)
        With Run("sapbex.xla!sapbexGetConnection") ‘ call the connection
           ' Set the params for Auto logon
           .client = “YOUR CLIENT NO”
           .user = “YOUR BW USER”
           .Password = “YOUR BW PWD” ‘ I recommend to create a dummy reporting user for this task
           .Language = “YOUR LANGUAGE YOU LIKE TO USE FOR QUERY DISPLAY ( i.E.  “EN”)”
           .SystemNumber = “YOUR SYSTEM NO” ‘
           .ApplicationServer = “YOUR SERVER Name OR IP-ADDRESS”
           .UseSAPLOgonIni = FALSE 'important for automatic connection
           .logon 0, True ‘ This will provide a dialog to appear
            If .IsConnected <> 1 Then
                .logon 0, False
                If .IsConnected <> 1 Then Exit Function
            Else
                Set g_oFunction = CreateObject("SAP.Functions")
                Set g_oFunction.Connection = g_oConnection
            End If
        End With
        Run "sapbex.xla!sapbexinitConnection" ‘ this will enable the connection you just created
        logonToBW = True
    End Function
    The error is by this row:
    Set g_oFunction.Connection = g_oConnection
    Object is needed! How is the g_oConnection-object defined?
    2. How can I pass values for the parameters from VBA?
    If I open the query usually from SAP-BEX-Toolbar, after selecting the query, I get a parameter mask, where I must put in a value. How can I this automatize from VBA? Has anybody a short samplecode for that?
    Thank you for your help
    Stefan
    [email protected]

    Peter and others:
    What I really want to do … is write a stand-alone application that I can run from windows scheduler … that queries our BW for sales data for certain items (in a tabular form) … and pulls that data into a VB recordset, or a .NET dataset … so that I can insert the rows into another database (SQL Server, or Access) … I already know how to do all the data movement to/from datasets and databases … I just cannot figure out how to programmatically grab this sales data from BW … our company has “workbooks” already set up that aggregate WW sales information by region (IE, there is a separate workbook for each region of the world) … I can manually go into the Excel interface, tell it which items to pull the sales info for, and it dumps the data into the worksheet (organized by customer, and then by cat #) …
    So, what I’d like to do is write an app that will pull data every week or so from the BW (from each region’s sales invoice detail “workbook”), and insert it into another database that we use for reporting other, non-sales, data.
    Thoughts on this ?  Is there another, non-BEx method that is better ?
    thanks !!

  • Problem while querying from java

    I have a query like this ...
    Select name,description,start_date from Events where TO_CHAR(start_date,'MM/DD/YYYY')='09/19/2004';
    I want to execute the same query using java for which i say
    String QQQ="Select name,description,start_date from Events where TO_CHAR(start_date,'MM/DD/YYYY')='?/?/?'"
    PreparedStatement stmt = conn.prepareStatement(QQQ);
    stmt.setString(1,"09");
    stmt.setString(2,"27");
    stmt.setString(3,"2004");
    But I am not getting the results. Is there anything wrong with the Qusetion marks(?) in the query ?
    I get the results if i directly enter the value for the question mark.
    Please help.
    Thanks.

    Date date = get a Date object somehow, perhaps from SimpleDateFormat.parse()
    String query = "Select name,description,start_date from Events where start_date = ?";
    PreparedStatement ps = con.prepareStatement(query);
    ps.setDate(1, date);
    ps.executeQuery();

  • LDAP Query from Java taking abnormally long

    Is there any reason why this query would take an abnormally long time? When I run the query from the command line it comes back practically instantly, but when I access it via Java it takes close to 30 seconds.
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.NamingEnumeration;
    import javax.naming.NamingException;
    import javax.naming.directory.Attribute;
    import javax.naming.directory.Attributes;
    import javax.naming.directory.DirContext;
    import javax.naming.directory.InitialDirContext;
    import javax.naming.directory.SearchControls;
    import javax.naming.directory.SearchResult;
    public class LDAPTest {
          * @param args
         public static void main(String[] args) {
              String username = System.getProperty("user.name");
              String LDAPServer = "ldap://ldap.myldapserver.net/";
              //String attribute = "";
              String query = "uid=" +username;
              Hashtable env = new Hashtable();
            env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
            env.put(Context.PROVIDER_URL, LDAPServer);
            DirContext context = null;
            NamingEnumeration enumeration = null;
              try {
                   context = new InitialDirContext(env);
                SearchControls ctrl = new SearchControls();
                ctrl.setSearchScope(SearchControls.SUBTREE_SCOPE);
                enumeration = context.search("", query, ctrl);
                //while (enumeration.hasMore()) {
                     SearchResult searchResult = (SearchResult) enumeration.next();
                    Attributes attributes = searchResult.getAttributes();
                    Attribute attr = attributes.get("cn");
                    String cn = (String) attr.get();
                    System.out.println(" Person Common Name = " + cn);
            } catch (NamingException e) {
                throw new RuntimeException(e);
            } finally {
                if (enumeration != null) {
                    try {
                         enumeration.close();
                    } catch (Exception e) {
                if (context != null) {
                    try {
                         context.close();
                    } catch (Exception e) {
    }

    njb7ty wrote:
    One way to speed it up is to only retreive those attributes your interested in via ctls.setReturningAttributes.
    Also, if you know what sub directories you want to look in, you can create a list of just those subdirectories and look through them one at a time via ctls.setSearchScope(SearchControls.ONELEVEL_SCOPE);
    SearchControls ctls = new SearchControls();
    ctls.setReturningAttributes((String[])attrIDs.toArray(new String[attrIDs.size()]));
    //only look at the immediate folder level specified (not in sub-folders)
    ctls.setSearchScope(SearchControls.ONELEVEL_SCOPE);Hi, thanks. I tried these, unfortunately I don't know enough about ldap to set the onelevel_scope properly. I have narrowed it down as a combination of load and login issues. For example, in our test environment the java program returns instantly with anonymous. In our production environment it returns in about 30-40 seconds with no login credentials supplied. (it does allow anonymous access). I made sure I set the authentication to none when attempting to try this. But when I do an anonymous query from the command line via a ldapsearch program it pulls the results instantly. (i know it is anonymous because if I specify credentials it pulls back additional data). For some reason it just takes really long to resolve in our production environment if I try anonymous access and I haven't figured it out yet. When I supply login credentials to our production environment it comes back in under a fifth of a second.

  • How to open a brio Query from Java

    Hi,
    I am working with Hyperion Intellegence Explorer to take care of the MIS related activities, to pull out the Data from the Data Base and Export it to the Excel
    Actually this is a BAU.
    So i want to reduce my work burdon. I am a Java Progrrammer too. So i want to automate all the thing from Java.
    Pls help me below to open a Brio files from Java,so that i can proceed to process the Query and export it on to the Excel.,

    Don't double post the same question. You can continue in your previous thread
    [http://forums.sun.com/thread.jspa?threadID=5367120]
    I'm locking this one and it will be removed it later.
    db

  • To Open a Brio Query from Java

    Hi,
    I am using Hyperian Intellegence Explorer to get a information from the Data Base.
    I want to do it automatic,because this we are doing this as a BAU.
    I want to reduce my work load ,so thatpln to write a Code.
    Please help me how to Open an existing BrioQuery from Java.

    corlettk wrote:
    http://geocities.com/khory_scythe/Praxeum/jedicode.html
    Yeah that fits... except I swear a lot. Is that allowed?
    Jedi use their powers to defend and protect, never to attack others.Can we throw an exception for this one?
    edit: actually i disagree with the whole jedi code, its wrong, wheres the fun...
    Mel

  • Copying a Single BEx Query from One Infoprovider to Another

    Is it possible to copy just a single query from one Infoprovider to another?
    I know how to copy all of them at once, but I want to know if there is a way to do it just for a single query.

    Ah.  That worked perfectly.
    Awarding points.
    Thank you.

  • Database query from Java

    I'm writing a Java program that needs to query a Microsoft Access database. I'm not sure how to do this. Someone said to use ODBC drivers but I don't know what these are. Any clarification/ideas would be appreciated.

    There are a few easy step to set up a connection to your database in your java program.
    1. establish an odbc data source in windows control panel (may be under Administrative tools).
    2. you need to import the java.sql package.
    3. you need a connection, so type the following into your database class:
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    connection = DriverManager.getConnection("jdbc:odbc:/*your data source name goes here*/");
    catch (ClassNotFoundException exception)
    System.err.println("Failed to load JDBC/ODBC driver");
    exception.printStackTrace();
    System.exit(1);
    catch (SQLException exception)
    System.err.println("Unable to connect");
    exception.printStackTrace();
    System.exit(1);
    }4. Find an SQL tutorial on the web.
    5. For each query/update etc create a Statement object using the following code:
    try
    Statement statement = connection.createStatement();
    /* now use the remainder of this try block to execute your query. Each database query returns a ResultSet object */
    ResultSet resultSet = statement.executeQuery("/*your query string goes here*/");
    /* the next() method in ResultSet returns true if there are any more records, like an iterator. Therefore, you know if there are any results or not*/
    if (resultSet.next())
    /* If your query was a 'SELECT * FROM ...etc' then you will get a whole row from the table(s) within the database. if you need to extract a number from that record and you know the column number, then use the following */
    int id = resultSet.getInt(1);
    /* where 1 corresponds to the first column in the table, and so on. Ifyou want to extract a String, the use the getString() method*/
    catch (SQLException exception)
    }That's basically the easiest way to go about it (I think). Best to consult a book for a more in-depth look. Try Java - How to Program, by Deitel and Deitel (available at www.deitel.com). I found this very useful.

  • Using mdx query from Java Apache

    Please suggest/guide me how to use MDX query to pull data from cube from Apache JAVA??
    BI GUY

    Hi BIGUY,
    Multidimensional Expressions (MDX) is the query language that you use to work with and retrieve multidimensional data in Microsoft Analysis Services. MDX is based on the XML for Analysis (XMLA) specification, with specific extensions for SQL Server Analysis
    Services.
    According to your description, it's hard to give your the exact MDX query to pull the data which you want from the cube since there are no any detail information about the cube. Here are some basic knowledge for your reference.
    Querying Multidimensional Data with MDX
    MDX Sample
    Regards,
    Charlie Liao
    TechNet Community Support

  • Execute Bex query from ABAP

    Hi,
    I am using the method mentioned by Durairaj (@  /people/durairaj.athavanraja/blog/2005/04/03/execute-bw-query-using-abap-part-i )
    to execute queries from ABAP.
    When I try to execute a query with characteristics in rows and if the characteristics name is large then i get a dump:
    'Field symbol has not yet been assigned'
    @ <l_field> = wa_set-chavl .
    I tried the same for another cahracteristic of lesser length and it works fine.
    Initially the chara name was like:
    <8 letter dim name>__<7 letter chara name >
    when i used a dim name with lesser no of letters:
    <7 letter dim name>__<6 letter chara name >
    It works fine.
    is there any restricition on the lenght of characteristics ?
    Thanks,
    Message was edited by:
            Rithesh Vijayakrishnan

    Matthias,
    I have tried to use this method before, but with the follow URL:
    /SAP/BC/WebDynpro/SAP/YWEBTEMPLATE_TEST/bi_template_page.htm?&varn1=0pcalmon&varv1=200901&varn2=0p_cocd&varv2=b047&url=/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex
    didn't work as I image.
    Do I have to transform this url before execute the method?
    Tnks for your patience.

  • Can we call a bex query from result of another bex query?

    we have a requirement wherein client has asked us for bex reports
    in a BEX report
    multiple queries needs to be executed and the querues are dependent on their parent query
    i.e.
    result of query 1 works as input for query 2 and result of query 2 works as input for query 3..
    is it possible??
    kindly help.

    Hi,
    (If RRI is not exactly what you need)
    Eg. for a scenario where we want to display all positions of documents where at least one position in a document fits given cretaria. You can try it using query/prequery construction.
    In short:
    Create two querries:
    In the first query you set the criteria (the output will be a list of document nos that fits that criteria). For peformance reasons keep this query small.
    In the second query give restriction on document number (replacement path with the first query as a parameter).
    Regards, Leszek

  • Ms Access query from Java

    I'm trying to finish a program but there are some bugs in accessing the database, the connection opened well and i can retreive any data from the data base but when i wrote this sql statement:
    rs = stmt.executeQuery("Select number,Type, sum(charge) from invoice where date between '" + d1 +"' and '"+ d2 + "' Group By number, Type;");
    an error was appeared with:
    "data type mismatch in criteria expression"
    the d1 and d2 are variables with date datatype
    in invoice table "date" is an attribute with date/time datatype..
    anyone to help me??
    thanks all

    the real problem here that in java d1 and d2 areNo the real problem is your refusal to use Prepared Statements.
    converted from from string to date data type
    so it consists of: dayname, day , month, hour, and
    year
    and in MS Access the date attribute is consist of
    day, month and year only.. If you used Prepared Statements then this would not matter.
    so when i compare these d1and d2 in java with date in
    ms access it cause miss match data type error..
    how to make d1,d2 in the format "dd/mm/yyyy" and
    still date data type???
    USE PREPARED STATEMENTS.
    java.sql.PreparedStatement
    Look that up. Annie gave you an example in her post.

Maybe you are looking for