How to use one query results in another query

hi,
in help.sap I have founded that using variable type replacement path I can use one query results in another query. It is wrote there that I have to choose query name results I want to get in variable definition but I do not know where.
How I can do this?
Result I want to get is:
In one query I have material prices in another material quantities. I want to calculate inventory value (price * quantity). Moreover prices are on plant level, quantities on storage type level. Plant is atribute of storage type.
Can I do this?
Regards,
Andrzej

Hi Andrzej,
please check out this thread: Set parameters values depending on other parameters
I had a discussion about query results as input for another query in there.
For creating a workbook, just click on the save button after you ran your query in the bex.
Siggi
Message was edited by: Siegfried Szameitat

Similar Messages

  • How to use one hash table inside another hash table

    Hi everyone,
    Any example of hash table inside another hash table.
    Can one here help me how to write one hash table inside another with repeating keys for the first hash table.
    Thanks,
    kanty.

    Do you mean you want the 'value' entries in a hash table to themselves be hash tables? Easy but this often indicates a design flaw.
    Hashtable<String,<Hashtable<String,Value>> fred = new Hashtable<String,<Hashtable<String,Value>> ();But what do you mean by "with repeating keys for the first hash table"?
    Edited by: sabre150 on Jul 2, 2010 10:11 PM
    Looks like you have already handled the declaration side in your other thread. I suspect you should be writing your own beans that hold the information and these beans would then be stored in a Map. The problem I have is that your description is too vague so I can't be certain.

  • Combine query, result from another query on SAP BI query Universe?

    Hello all,
    We are using SAP BI queries as datasource for our universes. Is the combined query option disabled for webi reports written on such universes?
    result from another query - is this option active for such webi reports? I see both these options greyed out so wanted to check.
    One last thing what is really difference between subquery and results from another query? subquery - you can use filters from that one data provider only right? or can you use a different data provider/report in sub query?
    Thanks a lot for all the replies.

    Hi,
    in BO 3.1 Combined query and result from another query options are not available in webi report on OLAP Universes  (SAP BW Universe.)
    Thanks,
    Amit

  • How to use one xsd element in another xsd

    Hi,
    I have an xml as follows.
    <rss version="2.0" xmlns:ymaps="http://api.maps.yahoo.com/Maps/V1/AnnotatedMaps.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:noNamespaceSchemaLocation="newtest.xsd">
    <!--Locator Version 1.4.0.0-->
    <channel>
    <title>Locations</title>
    <link>http://mytestlink.com</link>
    <description>location information</description>
    <item>
    <ymaps:Address>Roosevelt Blvd</ymaps:Address>
    <ymaps:CityState>Monroe, NC</ymaps:CityState>
    <ymaps:Zip>28112</ymaps:Zip>
    <ymaps:Country>US</ymaps:Country>
    </item>
    </channel>
    </rss>
    I worte an xsd as follows for the above xml
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ymaps="http://api.maps.yahoo.com/Maps/V1/AnnotatedMaps.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xsd:element name="rss">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="channel">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="title" type="xsd:string" />
    <xsd:element name="link" type="xsd:string" />
    <xsd:element name="description" type="xsd:string" />
    <xsd:element ref="ymaps:Address" />
    <xsd:element ref="ymaps:CityState" />
    <xsd:element ref="ymaps:Zip" />
    <xsd:element ref="ymaps:Country" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    <xsd:attribute name="version" type="xsd:decimal" />
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    I am getting the below exception for that
    line numbner ---|13|---Column---|41|-----
    org.xml.sax.SAXParseException: src-resolve.4.2: Error resolving component 'ymaps:Address'. It was detected that 'ymaps:Address' is in namespace 'http://api.maps.yahoo.com/Maps/V1/AnnotatedMaps.xsd', but components from this namespace are not referenceable from schema document 'file:///E:/test/samples/newtest.xsd'. If this is the incorrect namespace, perhaps the prefix of 'ymaps:Address' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///E:/test/samples/newtest.xsd'.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    Could any one help me?
    Thanks in advance
    Samba Damerla

    Hi Andrzej,
    please check out this thread: Set parameters values depending on other parameters
    I had a discussion about query results as input for another query in there.
    For creating a workbook, just click on the save button after you ran your query in the bex.
    Siggi
    Message was edited by: Siegfried Szameitat

  • Query result filter another query

    Hello Guru
    I want to create a query A (List of PM_ORDER) filter by status.
    and another query B based on the list of query A.
    Query A became "filter" of query B.
    How handle this ?
    Message was edited by:
            laurent plichta

    Hi Laurent,
    You can attempt this using replacememtn path variable for the char you need to filter by. This is called Result Set Query. See here for details:
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/78a03c1178ad2ce10000000a114084/content.htm
    Hope this helps...

  • How to use one button to drive another button click

    I'm trying to figure out a way to fix a bug in my application.  The simple fix would be to have a single button that drives a MouseCLICK event on another button everytime the PlayBar in my application reaches the end of the screen and returns to its origin.
    How would I achieve this?  I have made a lot of headway since I last posted a question in the ActionScript 3 forum, which was only yesterday evening.
    Thanks in advance,
    markerline

    The application is an audio application.  It is like a drum machine sort of.
    Currently there is a grid and whenever active cells get hitTest'ed by the PlayBar they become deactivated, the PlayBar returns to the origin, and when you relaunch the Play functionality the deactivated cells no longer play a sound.
    I have a button which reactivates the sounds.
    I also have a button which has a bug in it that loops the sounds. 
    To go around the looper button that has a bug in it I would like to use a Button "Z" which automatically clicks the "reactivate the sounds" button every time the PlayBar returns to the origin and the PlayBar will then continue to play and return to the origin in a looping fashion.  If the Button Z is in an active state this looping will continue.  To stop looping, click the Button Z until it is no longer in an active state and the PlayBar will then remain at the origin.

  • Unicode String Issue while Using Results from Another Query

    Hi All,
    In a webi report i have 2 queries say Sales Out and Investment. I need to have only those chains which are in Investement in Sales Out.
    So in Sales Out query i am using the option Results from another Query. The Chain values are in Unicode format.
    Though in universe i have Set Parameter Unicode_String ='Yes', this does not get applied when using option Results from another Query.
    Is there any solution to resolve this problem.
    Thanks
    Madhura

    leonhardtk wrote:
    I need to take values from the column of one table that meets certain critera, and create inserts into another table that includes this data.
    For example...
    {code}
    select emp_last_name from emp where emp_first_name like 'B%';
    Duncan
    Fitzgerald
    Johnson
    Smith
    {code}
    I then want to insert these values into another table:
    {code}
    insert into My_table values (
    sequence.nextval,99,99,[last_name]);
    {code}
    In the example above, I need it to insert a new row into My_table for where the "last_name" is each of the names from the select statement above (Duncan, Fitzgerald,Johnson,Smith).
    Based on other similar forum questions it looks like I should be doing something like:
    {code}
    INSERT INTO MY_TABLE
    (SELECT sequence.nextval,
                    99,
                    99,
                   (select EMP_LAST_NAME
                    FROM EMP
                    WHERE EMP_FIRST_NAME LIKE 'B%')
    {code}
    But this (obviously) doesn't work!
    Appreciate any assistance on this!
    KSL.
    Hi,
    Created this test data
    create table plch_test (name varchar2(50));
    insert into plch_test values('AKSHAY');
    insert into plch_test values('RAHUL');
    insert into plch_test values('APARNA');
    output
    1    AKSHAY
    2    RAHUL
    3    APARNA
    created another destnation table(in your case "my table")
    create table plch_test_1 (id number,name varchar2(50));
    created another sequence to generate employee ids
    create sequence test_seq;
    Now populated the desination table
    insert into plch_test_1(select test_seq.nextval,name from plch_test);
    verify the destination table
    select * from plch_test_1
    1    AKSHAY
    2    RAHUL
    3    APARNA
    Hope this helps
    Regards,
    Achyut Kotekal

  • Can we use Result from another query in Webi using Bex uery universe?

    Hi,
    Can we use Result from another query filter option in Webi to create a report using a Bex Query universe?
    I need to create a report using two universes, one is Bex Query Universe and the other is Orcle universe. I have two queries, one is using Oracle universe; the other using Bex Query universe. I need to pass the Oracle data from the Oracle query to the Bex Query query to get the matched data from SAP Bex query.
    I used Result from another query in the query filter panel for the query using Bex query universe. But I got an error saying that 'A filter contains a wrong value. you cannot run this query. (Error: WIS 00007). The data used in the filter on both sides are the same. they are char.
    I have tested by using two queries from the same Bex query universe to see if the Result from another query filter option works. And I got the same error.
    Has anyone run into the same issue and if this is possible and what should be the solution?
    Thanks in advance!
    Edited by: BO_Haiyan on Oct 6, 2010 3:47 PM

    In that situation:
    Create two queries : Oracle and BW query.
    @ Report:
    As you have to see result set from both the Dataproviders, correct? To achieve thise one must have common dimension objects to merge them at report and use Objects those are coming from both queries to use them in single Table/Report.
    Unless you don't use Merge Dimensions, you don't get a chane to use both queries objects in single Table/Report. (It will give tooltip saying: You can't drop here -- Incompatable Objects)
    In case, if you don't have common dimensions, change object definitions to Detail objects, for those required.
    Hope it helps you.
    Thank You!!

  • Search criterias in one page, the query results in another page?

    Hi, can I put search criterias in one page, and get query results in another page?
    Need help
    Thanks in advance
    karman

    If you meant a situation like: Page 1 has some items and page 2 has a report which refers page 1 itemsThen your report _query would fetch proper results provided the page 1 item values are available in the session_.
    That is, after submitting their values(using page submit,dynamic action,ajax etx) to session state , their values would be available in any page (anywhere in that session ) , until the page cache for the item page(page 1) is cleared.

  • How to use one report column into the another report in obiee

    How to use one report column into the another report in obiee

    i dont want to use column as a filter for another report it should be report column for another report
    Thanks,
    Vivek

  • Query on results from another query

    Post Author: Duncan1980
    CA Forum: Crystal Reports
    Is it possible to query on the results from another query.  I have a query that produces a list of document numbers.  I want to use the output from that query as the filter criteria in a another query in the same Universe. 
    The output from the first query can be as much as 2000, so it would be very time consuming to cut and paste these into a filter.
    Both reports are built, but can not figure out how to link the first report output to the filtering criteria on the second report.  I
    I am using business objects XI release 2 web intelligence 11.5.3.417 enterprise.

    Hi Vivek,
    It was not directly solved but I applied alternate logic to over come the issue.
    Here's what I did to overcome:
    I used a sub query in place of the whole result from another query.
    For Ex:
    Dim1 inlist result from another query1
    I made it as
    Dim1 inlist (Dim0)
    where Conditions.
    Here Dim0 is the object which we use for Result from another query and Conditions will be the necessary filter conditions to arrive proper Dim0.  Make sure proper context is formed for the sub query.
    Even though it resolved my problem, It introduces an new issue. It causes increase in query run time when huge set of data is returned from sub query.
    Please let me know if i haven't explained clearly.
    Hi Aris_BO,
    Sorry for not responding earlier.  The logic would probably make more queries null & not null. Thats why I was not advised to use it.
    Thanks
    LN

  • How to use one commandButton to execute two tasks in JSF

    I have a form in JSF page which contains different faces components. These faces bind to ADF BC to insert one row in the database when the user press commandButton. Also I need to bind the value of one inputText in that form to managed bean to execute another task in the application when the user press the same commandButton.
    The code of the inputText:
    <h:inputText value="#{bindings.ProjectNumber.inputValue}"
    id="pn"
    size="10"
    required="#{bindings.ProjectNumber.mandatory}">
    The code of commandButton:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}"/>
    The managed bean is �findInspector�. I tried to insert inputHidden inside commandButton tag and assign the value of the inputText to the inputHidden as follows:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}">
    <h:inputHidden value="#{bindings.ProjectNumber.inputValue}" binding="#{findInspector.project}"/>
    </h:commandButton>
    But it was not work
    Please how can I write the code to use the value of the inputText more than one time in the JSF(one to insert one row by using ADF BC and another to use the same value to bind to a managed bean) and how to use one commandButton to execute two tasks in JSF.
    Thank you
    Waheed

    Just dopublic void execute() {
        anotherAction(inputValue);
    I guess those articles might be interesting about passing params and the usage of inputHidden and also about using datatables:
    http://balusc.xs4all.nl/srv/dev-jep-com.html
    http://balusc.xs4all.nl/srv/dev-jep-dat.html

  • How to use one commandButton  to execute two task in JSF

    I have a form in JSF page which contains different faces components. These faces bind to ADF BC to insert one row in the database when the user press commandButton. Also I need to bind the value of one inputText in that form to managed bean to execute another task in the application when the user press the same commandButton.
    The code of the inputText:
    <h:inputText value="#{bindings.ProjectNumber.inputValue}"
    id="pn"
    size="10"
    required="#{bindings.ProjectNumber.mandatory}">
    The code of commandButton:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}"/>
    The managed bean is “findInspector”. I tried to insert inputHidden inside commandButton tag and assign the value of the inputText to the inputHidden as follows:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}">
    <h:inputHidden value="#{bindings.ProjectNumber.inputValue}" binding="#{findInspector.project}"/>
    </h:commandButton>
    But it was not work
    Please how can I write the code to use the value of the inputText more than one time in the JSF(one to insert one row by using ADF BC and another to use the same value to bind to a managed bean) and how to use one commandButton to execute two task in JSF.
    Thank you
    Waheed

    Yes I did
    <managed-bean>
    <description>The bean for get project No</description>
    <managed-bean-name>projectBean</managed-bean-name>
    <managed-bean-class>
    mcscm.model.ProjectBean
    </managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>bindings</property-name>
    <value>#{bindings}</value>
    </managed-property>
    </managed-bean>
    Also I changed the method in the managed bean as follows:
    public String commandButton_action() {
    FacesContext fctx = FacesContext.getCurrentInstance();
    ValueBinding vb = fctx.getApplication().createValueBinding("#{bindings}");
    DCBindingContainer dcb = (DCBindingContainer) vb.getValue(fctx);
    OperationBinding operation = (OperationBinding) dcb.get("projectNumber");
    operation.execute();
    return null;
    where projectNumber is my method in the java class of the application module "TaskInformationImpl". I made this method to be accessed from outside of ADF BC.
    I just create a sample code for projectNumber method for testing only as:
    public void projectNumber (String data){
    System.out.print(data);
    In the page Pagedef file I added this :
    <methodAction id="projectNumber"
    InstanceName="TaskInformationDataControl.dataProvider"
    DataControl="TaskInformationDataControl"
    MethodName="projectNumber" RequiresUpdateModel="true"
    Action="999" IsViewObjectMethod="false">
    <NamedData NDName="data" NDValue = "#{bindings.ProjectNumber.inputValue}" NDType="java.lang.String"/>
    After I did all of this I get a new error like:
    javax.faces.FacesException: #{projectBean.commandButton_action}: javax.faces.el.EvaluationException: java.lang.ClassCastException: oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding cannot be cast to oracle.adf.model.OperationBinding
    Is it very difficult to do this in JDeveloper?. yes ADF BC provide me a lot of facilities, but when I want to do a specific task I face a lot of troubles

  • Results from another Query - not available

    HI,
    My environment is Business Objects XI 3.1 SP2 Edge series , i have  below quereis with web Intelligence Reports
    1. not available  the functions/options  Results from another Query(Any) or Results from another Query(ALL) at Query Level.
    2. not getting list of Values for pronpt until i refresh values for prompt?
    Please suggest me is there any fix packs available for the same to availle that functionality.
    Best Regards,
    Reddeppa K

    not getting list of Values for pronpt until i refresh values for prompt?
    There is option called  "Automatic refresh before use"  for the object properties available in the universe designer.
    Please check the box for the object you are using for populating the list of values and export the universe.
    not available the functions/options Results from another Query(Any) or Results from another Query(ALL) at Query Level.
    There is a limitation for the query on query functionality that the both the queries can-not be from the OLAP universe.
    I guess the query which needs to be filtered should be built on universe from the relational data base.
    Regards,
    Rohit

  • Issue with Results from Another Query (Error on Null value)

    Hi All,
    We have a WebI report using "Result from Another Query" option of BO XI R3.1. The report was running fine till recently the dimension object using result from another query had a null value. Report suddenly throwed error as the query filters are invalid.
    Is there a way to make this filter optional if no data/null value is there ? Because we need those null values in report as well.
    Thank you for your time.
    Thanks & Regards
    LN

    Hi Vivek,
    It was not directly solved but I applied alternate logic to over come the issue.
    Here's what I did to overcome:
    I used a sub query in place of the whole result from another query.
    For Ex:
    Dim1 inlist result from another query1
    I made it as
    Dim1 inlist (Dim0)
    where Conditions.
    Here Dim0 is the object which we use for Result from another query and Conditions will be the necessary filter conditions to arrive proper Dim0.  Make sure proper context is formed for the sub query.
    Even though it resolved my problem, It introduces an new issue. It causes increase in query run time when huge set of data is returned from sub query.
    Please let me know if i haven't explained clearly.
    Hi Aris_BO,
    Sorry for not responding earlier.  The logic would probably make more queries null & not null. Thats why I was not advised to use it.
    Thanks
    LN

Maybe you are looking for