Query 3 Datasources at once

I need to have the user of my application type in a search string into a field and then show the results of three different queries on the web page.
Currently I'm trying to use DataTags to do this. Ideally I'd like to associate three Datasource datatags to one DataQuery Datatag. This looks like I would have to modify the tag library to accomplish this.
Is there an easier way to do this? Or, can somebody please point me the in the correct direction to make modifications to the Data Tag tag library.
Thanks.

Try using a single view object + one data source. You can create view objects that join a number of entity objects. You can also parameterize the view object with query parameters.

Similar Messages

  • How to call the same query more than once with different selection criteria

    Hi,
    Please do anybody know how to solve this issue? I need to call one query with the fixed structure more than once with different selection criteria. For example. I have following data
    Sales organization XX
                         Income 2008  Income 2009
    Customer A       10                 20
    Customer B        30                  0
    Sales organization YY
                         Income 2008  Income 2009
    Customer A        20                5
    Customer B        50                10
    Now, I need this. At the selection screen of query, user fill variable  charakteristic "Sales organization" with interval  XX - YY, than I need to generate two separate results per sales organization, one for Sales Organization XX and the second for SO YYwhich will be displayed each on separate page, where result for SO YY will be dispayed under result for SO YY. Are there some options how to do it for example in Report Designer or WAD or with programming? In Report Designer is possible to use one query more than once, but I dont know how to force each query in RD to display result only for one Sales Organization, which will be defined in selection screen.
    Thank you very much
    J.

    Hello,
    thanks to all for cooperation. Finally we solved this issue with the following way..
    User fill appropriate SO on the selection screen, which is defined as range. This will resulte, that selected SO are listed in report below each othe (standard behavior). Required solution we achieved with the Report Designer, we set page break under each Result row of RD. This caused, that report is divided into required part per SO, which are stated each on separate page.
    J.

  • Select the same attribute in a query more than once

    Hi Experts,
    My requirement is to select the same attribute in a query more than once.
    How can I acheive this?
    Expecting an early solution..
    Pilliga

    Hi,
    Create a calculated attribute that just displays the "same attribute".
    (Note: you will need to uniquely name this object).
    For example, if you wish to display Emp Name twice in the same query, then create a calculated attribute called Emp Name2 and select it and Emp Name in your query and the same info will be displayed twice in your results set.
    Cheers,
    Tanish

  • Datasource works with java code but not with sql:query dataSource=...

    Hello everyone! I have a small problem with binding a DataSource object via JNDI and retrieving it in a web application. This is the case:
    I did not wish to make the DataSource available through the server.xml, because I want to create applications that can be bundled in a simple .war file. So I create the DataSource when the context is created in the contextInitialized() method of ServletContextListener like this:
    InitialContext initialContext = new InitialContext();
    Properties properties = new Properties();
    properties.setProperty( "driverClassName", "com.mysql.jdbc.Driver" );
    properties.setProperty( "factory",   "org.apache.commons.dbcp.BasicDataSourceFactory" );
    properties.setProperty( "username", servletContext.getInitParameter( "dbUser" ) );
    properties.setProperty( "password", servletContext.getInitParameter( "dbPass" ) );
    properties.setProperty( "url",      servletContext.getInitParameter( "dbUrl" ) );
    properties.setProperty( "defaultAutoCommit", "false" );
    properties.setProperty( "maxActive",         "25" );
    properties.setProperty( "initialSize",       "15" );
    properties.setProperty( "maxIdle",           "10" );
    properties.setProperty( "testOnBorrow",      "true" );
    properties.setProperty( "testOnReturn",      "true" );
    properties.setProperty( "testWhileIdle",     "true" );
    properties.setProperty( "validationQuery",   "SELECT 1" );
    properties.setProperty( "removeAbandoned",   "true" );
    DataSource dataSource = BasicDataSourceFactory.createDataSource( properties );
    initialContext.rebind( "daers", dataSource );Please comment if you think this is a bad idea!
    All the above seems to work fine. When I try to retrieve the DataSource in a .jsp file then it all works fine like this:
    <% try {
            javax.naming.InitialContext initialContext = new javax.naming.InitialContext();
            java.sql.Connection conn = ( ( javax.sql.DataSource )initialContext.lookup( "daers" )).getConnection();
            java.sql.Statement statement = conn.createStatement();
            java.sql.ResultSet resultSet = statement.executeQuery("SELECT users.name FROM users;");
            while (resultSet.next()) {
                System.out.println(resultSet.getString(1));
        } catch ( java.sql.SQLException e ) {
            e.printStackTrace();
        } catch ( javax.naming.NamingException e ) {
            e.printStackTrace();
    %>But when I try to execute the same sql query through the appropriate JSTL taglib I get a:
    javax.servlet.ServletException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver"The JSTL code I use is this:
    <sql:query dataSource = "daers" var = "query" scope = "page">
            SELECT users.name
            FROM users
        </sql:query>I do put both of the two above pieces of code in the same .jsp page and the first works but the second causes the exception...
    Any clues..?
    Is it illegal to lookup a DataSource in <sql: dataSource=...> if the DataSource is not registered in the server.xml file..?
    If so, do I have any alternatives (like putting the DataSource as a servlet context variable)..?

    I added a response in your original message:
    http://forum.java.sun.com/thread.jspa?messageID=9629812
    Let's keep to it since splitting things across two posts might be confusing.

  • Info-set query datasource

    Hi Geeks,
    I have created an infoset query. Based on tables
    VBAK - Sales order header data
    VBAP - Sales order item data
    VBUP - Sales document item status
    VBPA - Parnter function table.
    I created a custom data-source in RSO2 based on this infoset query.
    Now I want to delete tables (VBPA) or entries (VBPA-KUNNR) in field groups from infoset query.
    & system is not allowing me to do this saying
    System says "VBPA-KUNNR" is used in queries.
    Can anybody please suggest me any way to change the infoset & inturn datasource created over it.
    Thanx in advance.
    Monica

    If I correctly understand , you want to remove the filed or table from info set query .
    As data source is based on Infoset query , it  will not allow to change the  same
    You can delete the data source  or if you do not want to delete  just  detach the info set from Data source  by removing the info set name  ( may be you can replace it with another duplicate query name for time being ) and save activate datasource  and later change the info set .
    You can revert back to original info set  query name in data sources after changes are done.

  • ** How to show the master query group for once in Report??

    Hi
    I've developed a master-detail groups at a report
    The master one has it's repeating frame and the detail one has another repeating frame and put at another page at the layout.
    The porblem is that the master one is shown (the same record) in pages for times equal to the number of the detail records which is own for that master record!
    Example:
    if the master record has got three details then the master data will be show for three times (three pages) at run time and then the page number 4 will show the three detail records.
    How to make the master data to be shown only for once (page number 1 only) and then show the detail three records at the next page (page number 2) at run time???

    Hi,
    the question back is, what you've done for this. At default the master record is only shown once. Could it be, that the master-fields are inside the repeating frame for the details?
    Regards
    Rainer

  • Setting query datasource at runtime for FORM Datablock

    Hello all,
    we have below requirement -
    the Form datablock is build on a customized table. we need to populate some of the fields of the form by writing a view which joins tables across variousl modules. the form data will be queried by giving po number in query find window. then the rest of the fields are entered from the form front end and saved to the DB Table. we want to query the new po numbers from the view from the query find window. where as the existing po numbers will be queried from the form datablock table only... for this i wrote the below pre_query trigger at datablock level.
    declare
         po_num number;
    BEGIN
    :parameter.G_query_find := 'TRUE' ;
    select count(*) into po_num from ICS_PO_IBOT_ICOT_REP where vendor_po_num = nvl(:QUERY_FIND.PO_NUMBER, vendor_po_num);
         if po_num > 0 then
    COPY(:QUERY_FIND.PO_NUMBER, 'ICS_PO_IBOT_ICOT_REP.VENDOR_PO_NUM');
         else
    set_block_property ('ICS_PO_IBOT_ICOT_REP', QUERY_DATA_SOURCE_NAME, '(select * from ICS_PO_IBOT_ICOT_REP_VIEW where
    VENDOR_PO_NUM = :QUERY_FIND.PO_NUMBER)');
    end if;
    :parameter.G_query_find := 'FALSE';
    end;
    here ICS_PO_IBOT_ICOT_REP - DB TABLE
    ICS_PO_IBOT_ICOT_REP_VIEW - view
    condition is checking for existing pos in table.....
    The above form while running from oracle apps, entering a New po number in query find window gives following error -
    ORA-01008: not all variables are bound.
    whereas for old pos it works correctly......................Please help on this...
    on more analysis from help-diagnostic-system - last query it gives the below code
    SELECT LAST_UPDATE_DATE,LAST_UPDATED_BY,LAST_UPDATE_LOGIN,CREATION_DATE,CREATED_BY,ATTRIBUTE1,ATTRIBUTE2,ATTRIBUTE3,ATTRIBUTE4,ATTRIBUTE5,ATTRIBUTE6,ATTRIBUTE7,ATTRIBUTE8,ATTRIBUTE9,ATTRIBUTE10,ATTRIBUTE11,ATTRIBUTE12,ATTRIBUTE13,ATTRIBUTE14,ATTRIBUTE15,ATTRIBUTE16,ATTRIBUTE17,ATTRIBUTE18,ATTRIBUTE19,ATTRIBUTE20,ATTRIBUTE21,ATTRIBUTE22,ATTRIBUTE23,ATTRIBUTE24,ATTRIBUTE25,ATTRIBUTE26,ATTRIBUTE27,ATTRIBUTE28,ATTRIBUTE29,ATTRIBUTE30,ORG_ID,CONSULTANT_ID,CONSULTANT_NAME,VENDOR_NAME,VENDOR_CONTACT_NUM,VENDOR_EMAIL,VENDOR_DIVERSITY_STATUS,CONSULTANT_INFO,MINORITY_STATUS,REMARK,CBC_DATE,ACKN_DATE,IBM_PO,PO_STATUS,SOW_NUMBER,PO_TYPE,START_DATE_ON_PO,IBM_PO_ISSUE_DT,IBM_PO_ICS_RCV_DT,IBM_PO_CHANGE_DT,SKILL_LEVEL,REQUESTER,REQ_CONT_NO,REQ_EMAIL_ID,BUYER,BUYER_CONT_NO,BUYER_EMAIL_ID,TRANS_STATUS,ST_BILL_RATE,ST_HOURS,OT_BILL_RATE,OT_HOURS,EXPENSES,TOTAL,REGION,AREA,LOCATION,STATE,JOB_ROLE,JOB_SKILL,LOB,CSA_REQ_NO,CSA_SUBMIT_DT,CLIENT,WAGES,EXEMPT,BENEFIT_STATUS,US_NATIONAL,VISA_STATUS,MATRIX_PRICE,SCORP_C2C_W2H,REFERAL_STATUS,REBATE_STATUS,REBATE_PERCENTAGE,REBATE_DESC,CSA_FEE_STATUS,CSA_PERCENTAGE,ICS_FEE,MARK_UP,ADD_INFO,VENDOR_PO_NUM,CCF_CREATED_DATE,CCF_MODIFIED_DATE,DOJ,DOT,DATE_OF_MODIFICATION_DOT,ST_PAY_RATE,ST_BURDEN_RATE,OT_PAY_RATE,OT_BURDEN_RATE,RATE_DESC,SALES_PERSON,RECRUITER,PROJECT,ACCRUAL_REVERSAL,WEEK_1,WEEK_2,WEEK_3,WEEK_4,WEEK_5,ESTIMATE,ACCRUALS,TOTAL_HOURS,BILLABLE_AMOUNT,TOTAL_COST,GM_AMOUNT,GM_PERCENTAGE,INVOICE_NUMBER,INVOICE_AMOUNT,SUBMITTED_ON,RENEWAL_PO,REJECTED_ON,RESUBMITTED_ON FROM (select * from ICS_PO_IBOT_ICOT_REP_VIEW where
    VENDOR_PO_NUM = :QUERY_FIND.PO_NUMBER)
    please suggest what am i missing?????????????????????
    Thanks,
    Sam

    here are the answers to your questions-
    How do you update record?
    Do you have any ON-UPDATE, POST-UPDATE, PRE-UPDATE triggers on this block?
    Do you have any database triggers on the table?
    What is DML Data Target Type property of this block?
    it was not required for me to write any ON-UPDATE, POST-UPDATE, PRE-UPDATE triggers on this block to update record. these are done or taken care off automatically. no database trigger is associated with the table. DML data target type is table.
    also the block has Query data source type as Table only. and the query data source name is the db table ie ICS_PO_IBOT_ICOT_REP. so what u suggest now? if i simply click on new button and enter some data onto form and save it it is inserting record onto db table. so why cant it insert the record in current scenario when a new PO is queried from the view. Please help on this where i am missing.................

  • Can you run deltas off of an Infoset query datasource?

    Hey Gurus of BW,
    We had a consultant come in and setup an infoset datasource in R/3.  Then in BW set up that datasource as a feed into a cube using delta pulls.  The delta init pull pulls all the data, but then the deltas never pull any data.  Is this even possible?
    Thanks,  Ken

    Ken,
    I think generic datasource created on Infoset.
    Provide safety interval - lower limit as 1 for delta field(change date or creation date) & check.
    Loading generic datasource data directly into cube(addition) may create a duplicate data. Due to safety interval every time it pulls data from last day to current.
    Srini

  • Knowing DataSource, Cube, Query, how to identify Master Data datasource?

    Hi,
    based on a research on FI-FM at http://help.sap.com/saphelp_nw70/helpdata/en/71/d3143cb1b8be00e10000000a114084/frameset.htm
    I saw the flow as: first Query(based on cube 0FIFM_C01), the cube which gets data from 2 datasources (0FI_FM_1  & FI_FM_2) through 2 infosources: 0FI_FM_1 and  FI_FM_2.
    1. What do I need to install on BI to get this going and in which order?
    2. In particular, knowing DataSource, Cube, Query do I figure out the Master Data data I need to get this query functional?
    Once you know of the specific master data datasources what do I need to do to get this query functional?
    Thanks

    Dear Amanda,
    Let's clarify your questions.
    1.Install the cube and related stuff.
    RSA1 -> Business content -> Choose " in data flow before" -> install the Cube
    2. For the master data and related hierarchy.
    RSA1 -> Find the InfoCube -> Right click, find a option such as "display data model". I am not sure about the exactly description because i am not in front of the SAP system.
    you can find all the related InfoObject in the right panel.
    It is good if you check all of those master data and load them daily. But it is a big job and sometimes it is not necessary. You can:
    1) Clarify the business need. to konw which kinds of fields are "Must" for the end user anlaysis and make a list of that.
    2) check the list and most of the master data will load by other moduels. for example, cost center, material, customer ... they are too common that you can expect they are in some process chain and loaded daily basis already.
    3) load the master data in your list and no one load it before, or discuss with the ownder of process chain, if you need change the load frequency such as from weekly to daily.
    Edited by: Brian Yang on Jul 12, 2009 8:54 PM

  • Query executes more than once

    Hello All,
    We have crystal reports integrated in the java web application. Reports with parameters are executing query more than once (found in the SQL Server Profiler).
    Scenario:
    Report query with parameter :- select * from cieuser where id >= {?userId}.
    User provides value '1' to this parameter and selects report execution.
    Before executing the report, our system updates the database connection details of the rpt with other configured details.
    Issues:
    During updating of the database details on execution of statement "databaseController.setTableLocation(orig.getTable(i), table);" , the profiler shows:
    select * from cieuser where id >=  NULL
    And on executon of the statement "viewer.processHttpRequest(request, response, getServletConfig()
                  .getServletContext(), null);" the profiler shows the following:
    select * from cieuser where id >= {?userId}
    select * from cieuser where id >= 1
    select * from cieuser where id >= 1
    When the same report is executed from the standalone crystal designer, the profiler shows one time query execution:
    select * from cieuser where id >= 1
    Environment:
    Crystal reports designer - 11.5.10.1263
    JRC - 11.5
    Please advise.
    Thanks,
    Ratan.

    Hello,
    SAP decided to allow the confirmation of orders with a final confirmation (status CNF) deliberately. So it is possible to confirm work that was maybe forgotten or if the flag 'final confirmation' was set mistakenly. Only the status CLSD will prevent further confirmations.
    If you want forbid further confirmations of  orders with status CNF you can use enhancements CONFPM* or BAdI WORKORDER_CONFIRM. However, the probably easiest way is to define a user status that is set at business transaction 'Confirm order' and, once set, forbid business transaction 'Confirm order'.
    Regards,
    Reinhard

  • How to extract R3 query with variant by datasource to BW

    Hi,
    I've created a query datasource, but this query is executed with a dinamic variant.
    How can I extract the result of the query filtered with a variant by my datasource from R3 to BW?
    thanks in advance.

    i think u have missed it.
    RSZCOMPDIR IS THE ONLY TABLE WHICH PROVIDES THE DATA.
    ENTER TECHNICAL QUERY Name in RSZCOMPDIR-COMPID.
    RSZCOMPDIR-TSTNAM gives you the user id of sap bw user who made the change.
    RSZCOMPDIR-TSTPDAT gives you date on which  change was made .
    RSZCOMPDIR-TSTPTIM   gives you timestamp on which  change was made .
    all users details can be obtained from TCODE SU01 where you need to enter sap user id.
    You can also get user name( description) by using tcode SE09 and entering above sap user id.

  • What is the order of Column Names in Sqlite query results?

    I am writing an application using Adobe Air, Sqlite, and Javascript.
    After writing the following select statement:
              SELECT field1, field 2, field 3, field 4 FROM TableA;
    I would like to get the columnName/data combination from each row -- which I do successfully with a loop:
              var columnName="";
              for (columnName in selResults.data[i]) {
                   output+=columnName + ":" + selResultsdata[i][columnName] + ";";
    My issue is that the column names come out in a different order every time I run the query and never once have they come out in the desired order -- field 1, field 2, field 3, field 4.  If I run the query in Firefox's Sqlite Manager, the columns come out in the "proper" order. When I run them in Adobe Air, the order will be the same if I run the query mulitple times without closing the app.  If I make a change such as declaring the columnName variable with "" before the for column, or declare it as (var = columnName in selResults.data) , then the order changes.  If I shut down my app and re-open after lunch and run query, it comes out in another order.  At this time, I'm not interested in the order of the rows, just the order of the columns in each output row.  I've even tried assiging an index to columnName which seems to just pick up a single letter of the columnName.
    I'm in the process of changing my HTML presentation of the data to assign a precise columnName to an HTML table title, but I'm reluctant to let go of the above concept as I think my separation of HTML/presentation and Javascript would be better if I could use the solution described above.
    So, does anybody know how to force the order of the columnNames in my output -- or what I'm doing to cause it to come out in a different order?
    Jeane

    Technically there isn't any "order" for the return columns. They aren't returned as an Array -- they're just properties on an Object instance (a "generic object"). The random order you're seeing is the behavior of the for..in loop iterating over the properties of the object. Unfortunately, with a for..in loop there is no guaranteed order for iterating over properties (and, as you've seen, it tends to vary wildly).
    The only solution is to create your own list of the column names and sort it the way you want to, then use that to create your output. For example, use the for..in loop to loop over the properties, but rather than actually get the values, just dump the column names into an Array:
    var columnName="";
    var columns = [];
    for (columnName in selResults.data[i]) {
        columns.push(columnName);
    columns = columns.sort(); // just uses the default alphabetical sort -- you would customize this if desired
    var j = 0;
    for (j = 0; j < columns.length; j++) {
        columnName = columns[j];
        output+=columnName + ":" + selResultsdata[i][columnName] + ";";

  • Multiple Queries in Workbook - Refresh Screen Shows Up for Every Query

    We have multiple queries in a workbook.  All of these queries have the exact same selections for the variable selection screen.  When all the queries are refreshed once, the selection screen used to show up once and all the queries are refreshed with the same selections.  
    We were on BI 7.0 and SP10.  We recently moved to SP12.  Since the SP12 installation, the multiple query refresh pops-up the selection screen for every query.  It is nothing like "multiple query refresh" at once since the user has to click "execute" button for every single query.  It is interesting to note that the selection screen only contains hierarchy variables and hierarchy node variables.  The other variables of selection screen do not show up.  I couldn't find any OSS note on this topic.  Please let me know if anyone has any comments on this issue.  I will assign points to useful posts.

    hi Sameer,
    try to update front end patch to latest version ?
    Using the BI 7.x Add-On for SAP GUI 7.10 - Requirements
    hope this helps.

  • How to access a infoset query

    Hi
    I am assigned to a user group P1   but how to use the tcode SQ02 AND SQ03
    Whether to use TCODE SQ02 in first place or the other as i was unable to get in there To get into the infosetquery .
    Regards
    P

    You can create an infoset from SQ02.  If you need details on how to create an infoset, there are many postings in SDN, and you can check the sap help also.   You have to assign this infoset to your usergroup, by selecting the query and clicking on the Role/User Group assignment or from SQ03.  Make sure you are in the correct query area.  Once the infoset is assigned to the user-group, you can run the query from SQ01.
    Albert

  • Query Print Layout / Query Manager

    Hopefully some one here can help me out ...
    I have created a handful of Query Print Layouts.  How or is there a way when I make a change to the underlying query, to reassociate it with the report?  Now when I change the query,  I have to create a new report.  I am currently on SAP B1 2007 PL11.  When I upgraded from PL06 to PL11,  the queries handle prompted dates differently, causing me to have to make a simple syntax change to my query which does not change the data being passed to the report.
    Thanks in advance
    Dana

    Dana,
    This is the short-coming of the Query PLD.  Once you change the Query, you will need to redo the template all over again.
    Therefore, it is a good practise to always finalize the query and then design the layout.
    Re-assigning the revised query to QPLD is not possible
    Suda

Maybe you are looking for

  • Windows XP, Itunes error on startup, NEED HELP!!!

    Whenever i click on iTunes i get this error... [img]http://img301.imageshack.us/img301/2160/itunesyi3.th.jpg[/img] i cant even open itunes.... I tried reinstalling, and restarting and the works.... if anyone can help i would be AWESOMELY thankfull!!!

  • Error 37 with serial port / no with hyperterminal

    I have added to my Pc a card with two serial port, I can access to them by hyperteminal or by labview but only at port 0 and 1 at the same time or 2 and 3, if not I have an error 37. What can I do?

  • Hanging on JFileChooser

    I am trying to convert a small application from JBuilder to JDeveloper 10.1.3.0.4. It runs fine in JBuilder, but hangs in JDeveloper. The main window comes up, and I make a menus section to bring up the file selection dialog. I get as far as the line

  • How can add a progress bar into script?

    Hi, I got a script for gen pdf I want put a progress bar, and make it working but I don't know where I can put the progress bar and how //===================================================================== var doc = app.documents;  app.findTextPref

  • Parent child relationship query

    Hi all, I am working on oracle 9i. i have a branch table which has a column branch_id, branch_name etc with a column branch_parent(contains branch_id). Branch_parent column identifies the parent of this particular branch. I want to query this table a