Filter a Query Based on the Output of Another Query

Is it possible to run a query based on the put put of another query? I have two queries. One query is based on GL Line items and shows the account assignemnt of postings where a customer has had a debt raised and it been credited to an account assignment e.g. Order, Cost Centre or Profit Centre. The other query is on an AR cube and that shows payment made. I want to bring these together to show the owners of the various account assignments to what extent customers have actually paid the debts that have been raised and credited to them. This I do as the source document of the CO doscument matches the allocation of the ar document. So I have a query that shows the CO journal and another query that shows payments. But I only want to show the payments in the second query for documents displayed in the first query (which can be restricted by period and fiscal year and the particular account assignment).

Hi,
This can be acheived by usign a replacement path variable.
Create replacement pathe variables for those the filter values in the second report nneds tobe restricted from the first.
Then in the properties of the varioable say replce by query result and input the first query name in it.
Use these variables in teh filter section of the second report.
Make sure the characteristics for which you created the replacement path variables are in teh row section of the first Query.
Now on executing the second query you will have it filtered based on teh values of the first Query.
Hope this helps.
Regards.
Shafi.

Similar Messages

  • OBIEE Report - filter based on the result from another analysis

    Hi,
    I am using OBIEE 11g,
    I am trying to use a filter which is based on the result from another analysis. I have an analysis A which is as table 1, and I want to filter the respective columns of analysis B (Table B) based on analysis A to remove the duplicates for march 01, 02, and 07 , but it is not working properly. I took a max of start and end time when I created analysis A. Please let me know if I did anything wrong. thanks.
    Table 1
    Employee Number
    Date
    IN
    Out
    Start Time
    End Time
    xxxxxxx
    2015-02-26
    9:00
    13:00
    00:00:00
    00:00:00
    2015-02-27
    12:00
    18:00
    00:00:00
    00:00:00
    2015-02-28
    8:00
    14:00
    00:00:00
    00:00:00
    2015-03-01
    14:00
    20:00
    14:00:00
    20:00:00
    2015-03-02
    16:00
    20:00
    16:00:00
    20:00:00
    2015-03-07
    14:06
    20:02
    14:00:00
    20:00:00
    2015-03-11
    16:00
    20:00
    16:00:00
    20:00:00
    2015-03-14
    8:00
    14:00
    00:00:00
    00:00:00
    2015-03-25
    14:00
    20:00
    16:00:00
    20:00:00
    Table 2
    Employee Number
    Date
    IN
    Out
    Start Time
    End Time
    Hours
    xxxxxxx
    2015-02-26
    9:00
    13:00
    00:00:00
    00:00:00
    -3
    2015-02-27
    12:00
    18:00
    00:00:00
    00:00:00
    6
    2015-02-28
    8:00
    14:00
    00:00:00
    00:00:00
    6
    2015-03-01
    14:00
    20:00
    00:00:00
    00:00:00
    6
    14:00:00
    20:00:00
    6
    2015-03-02
    16:00
    20:00
    00:00:00
    00:00:00
    4
    16:00:00
    20:00:00
    4
    2015-03-07
    14:06
    20:02
    00:00:00
    00:00:00
    6
    14:00:00
    20:00:00
    6
    2015-03-11
    16:00
    20:00
    16:00:00
    20:00:00
    4
    2015-03-14
    8:00
    14:00
    00:00:00
    00:00:00
    6
    2015-03-25
    14:00
    20:00
    16:00:00
    20:00:00
    4

    Why avg here?
    What columns you want to show in the report?
    for a employee for given date if he have 2 rows then you may sum up hours right?
    Employee Number
    Date
    IN
    Out
    Start Time
    End Time
    Hours

  • DIO Pass or Fail Tests: LabVIEW would have to determine the expected result or results (1 or 2 of a possible 25) based on the output pattern send out (1 of 65K).

    I am trying to come up with a plan to write a LabVIEW VI to do the following test. Can you give me a few ideas how to do this in LabVIEW. I am a new to LabView. I think I how to read and write I/O ports and do comparisons. I need a little guidance on the error checking. In simple terms the test will go like this:
    I have 16 digital inputs and 16 outputs.
    The 16 outputs are turned on in a specific pattern (i.e. 1001000101011101) and then the 16 inputs (i.e. 1000101111111111) are read in after a time delay. The inputs are checked to see if they match the expected results. If they do it's a pass if not it's a f
    ailure. This seems pretty straightforward. And I think I have an idea how to do it. Here's the problem. The inputs are changed sequentially so that all possible combinations are tried. The test needs to determine if the resulting input pattern is correct based on the outputs that were sent out. 16 outputs give 65K possible tests. For each tests there would be 1 or 2 possible results with a total of 25 results for the entire 65K possible tests. LabVIEW would have to determine the expected result or results (1 or 2 of the 25) based on the output pattern send out (1 of 65K). Then it would have to compare the actual input pattern received to see if it's a pass or fail?
    Any ideas how I can approach this?

    The 16 outputs are simulating inputs to the device under test, (simulating remote switches and contacts). The object of the test is to test every possible combination to ensure that nothing unexpected happens at the output. The device under test is a logic motor control system and we want to make sure (among other things) that we don’t start or stop the motor when its not suppose to. How can only two tests do that?
    I think you are describing how to create an array with the results. But I still don’t know how to determine what the result should be and if it is correct.
    I’ve identified 25 possible valid states the motor controller can be in.
    I’ve also identified the correct outputs that determine each of the 25 states.
    I’ve also
    identified the possible valid states you can go to from each (previous) state, You can only get to a valid new state from a previous state if the right combination of inputs is applied (we hope).
    If you know what state you are in when start and you know the valid states you can go to and the inputs required to get there, you should be able test the system against that. You verify this by checking the outputs against what they should be. With 65K possible inputs combination, checking them all manually would be quite is a task. Putting this into LabView is my task.

  • Passing the output to another program

    Passing the output to another program
    The problem I have that I don�t know how to pass the results of my java Program ( as parameter) to another application!
    I have a class �A.class� should send result �VAR_result� to application �B.application�
    Now I am using it like this: System.out (VAR_result) >> B.application
    But it could not be the right way at least because I cant make any other System.out as debug now.
    My Question please: to pass a parameter to a java is clear: A.class ( var ..)
    But how to take a parameter from a class, to use it in another Applicatin ( script )?
    Thanks a lot

    slackware2007 wrote:
    Passing the output to another program
    The problem I have that I don’t know how to pass the results of my java Program ( as parameter) to another application!
    I have a class “A.class” should send result “VAR_result” to application “B.application”
    Now I am using it like this: System.out (VAR_result) >> B.application
    But it could not be the right way at least because I cant make any other System.out as debug now.Then move your debug to System.err and use System.out as it should be used and pipe stdout to the stdin of the other application..

  • Adding numbers in a file a and saving the output in another file.!

    can any one pls tell me how to add numbers from a textfile and save the output in another textfile. i'm new with java so pls help out..

    Hi Friend,
    your statement is not clear, it's bit confuse
    this is my unserstanding,
    you want to open a file and read the values then add numbers,
    latter save the sum in a new file.let me know if this is the thing, I can help u
    with Cheers
    Prasanna

  • Validating an attribute based on the value of another while inserting

    Hi guys
    I need to validate an attribute based on the value of another attribute.
    Example:
    inside some entity I have the following validation function
    public boolean validateAtt1(Number data){
         if (this.getAtt2() < some vlaue)
              return false;
         return true;
    this function works fine when I'm updating a record, but when I'm inserting a new record the this.getAtt2 return null, now I don't want to override the validateEntity function I want to override the validate function for att1; so in other words is there a way to reach att2 in the validation function of att1 when I'm inserting a new record, because the this.getAtt2() returns null if I'm inserting a new record.

    Using attribute-level setter methods won't work because when the value of a particular attribute is being set, the values of the other attributes might not yet have been set. This explains for example why it does not work when inserting a new record. You therefore have to validate at entity level.
    Rather than coding on the validateEntity() method you use a built-in Validator or Method Validator. When recording validators like this, you can provide a separate message for each business rule. If you also have the bundled exception mode enables (which will be the case by default for web applications), then multiple messages can be shown at the same time.
    If you have one business rule involving two different attributes, for example a and b, and you must provide different messages based on if a is causing the violation or b, you can do it like this:
    - implement one method doing the validation and that will indicate which attribute is causing the violation
    - implement two different method validators (with two different messages) that call the method doing the actual validation and return false based on the attribute causing the violation
    For more information about implementing business rules in ADF BC, you might have a look at this white paper:
    http://www.oracle.com/technology/products/jdev/collateral/papers/10131/businessrulesinadfbctechnicalwp.pdf
    Jan Kettenis

  • How to Visible/Hide an Item based on the value of another Item

    Hi
    I need to visible and hide a textitem based on the value of another item.This form has 3 blocks, and the both item is in the first Master Block.
    My code is:
    if :RECORDTYPE=7 then
         Set_Item_Property('BLOCK.ITEM',VISIBLE,PROPERTY_TRUE);
         Set_Item_Property('BLOCK.ITEM',ENABLED,PROPERTY_TRUE);
    ELSE
         Set_Item_Property('BLOCK.ITEM',VISIBLE,PROPERTY_FALSE);
    Set_Item_Property('BLOCK.ITEM',ENABLED,PROPERTY_FALSE);
    :BLOCK.ITEM:=NULL;
    end if;     
    I wrote the code in the Validate Trigger, but not working when moving Next Record & Previous Record
    Thanks in advance
    Rizly

    Read the 'Propagation of Property Changes' section towards the end of the page for Set_Item_Property in the online help. I'm not sure what you mean by locking automatically but perhaps it's because of this.
    You should also ensure the item you're setting to invisible is not the current item (check :system.cursor_item and go to a different item if necessary).

  • Creating a number of Link to Actions based on the Output of an ALV

    Hello Experts,
    I have an ALV table as an output in WDA in which the number of records are unknown.
    I want to limit the number of records to 500 at a point of time.
    Below the table i need to have link to actions placed like 1-500 501-1000 10001-1500 and so on.
    As the number of records are unknown i need to have these link to actions divided among total records.
    And if the table shows 1-500 records the Link to Action 1-500 should become text so that the user will not be able to click on it.
    So my requirement is
    1.How to limit the number of records to 500.
    2.How to place the link to actions dynamically based on the number of output records.
    3.How to change the Link to Action to Text.
    Please help me in this.
    Thanks in Advance,
    Shravan

    Hello Shravan,
    If you know the total number of records at runtime then its simple. Otherwise you need to write some complex logic. I assume that at runtime while launching the application you will know the total number records .
    1.How to limit the number of records to 500.
    As Srinivas mentioned call the set_visible_row_count method by passing 500
    2.How to place the link to actions dynamically based on the number of output records.
    Logic for the same.
    data i_total type i value 1250. "say total number of records
    data i_max type i value 500. "your max records to be displayed in aLV at anypoint of time
    data i_num type i.
    data i_rem type i.
    i_num = i_total div i_max.
    i_rem = i_total mod i_max.
    data lv_end_text type string.
    data lv_start_text type string.
    data lv_final_text type string.
    data i_start type i.
    data i_end type i.
    do i_num times.
      i_start = ( i_max * ( sy-index - 1 ) + 1 ).
      lv_start_text = i_start.
      i_end = i_max * sy-index.
      lv_end_text = i_end.
      concatenate lv_start_text ' - ' lv_end_text into lv_final_text RESPECTING BLANKS.
       "Write the logic to create the Link to Action - as suggested by Srinivas
    enddo.
    if i_rem > 0.
      i_start  = i_max * i_num + 1.
      lv_start_text = i_start.
      i_end = i_max * i_num + i_rem.
      lv_end_text = i_end.
      concatenate lv_start_text ' - ' lv_end_text into lv_final_text RESPECTING BLANKS.
    " Write the logic to add the last linkToAction
    endif.
    3.How to change the Link to Action to Text.
    If you set the enable property of the LinkToAction to abap_false then it will be disabled and displayed as text.
    Hope this helps.
    BR, Saravanan

  • IDOC Number based on the output type

    Hi,
    I have a special requirement where in I need to find the IDOC number generated from the output type .
    I have the NAST details and the Invoice number and need to find the IDOC generated for the particular NAST entry.
    Is there any table or FM which gives this information in SAP.
    Please let me know.
    Regards
    Praneeth

    All,
    Solved myself.
    Used FM WFMC_PROTOCOL_GET to get the IDOC number based on the NAST value.
    Regards
    Praneeth

  • How to make a report based on the result of another report?

    Hi, All,
    I am a new guy in BW development
    I  made the report1, to show the "Total Sales in each country and each shop "
    (the fact table is "Order")
    now I want to make report2 "in each countries, the number of the shops, whose Total Sales >100000"
    Can I make the report2 based on the result of report1 (use the same fact table)
    thanks a lot
    QY

    Hi Klaus,
    your condition only works if the Shop is in the query. If I understood it correctly you have one query with
    Country   Shop   Total Sales
    and one with
    Country   Number of Shops   Total Sales
    and you don't want to restrict the second Total Sales but the Total Sales from the first query.
    Best regards
       Dirk

  • Using javascript to populate one menu based on the choice in another menu

    I have several menus which are dynamically populated (with PHP and MYSQL). The information is category based. How do I dynamically populate the second menu based on the choice the user makes in the first menu (without having to submit and refresh the page-- i.e. I need to use javascript instead of the server-side PHP).
    Example:
    Main Categories: 1) Numbers     2) Letters
    Sub Categories:        1                      a
                                   2                      b 
                                   3                      c
                                  etc.                  etc.
    the first menu contains the two main categories. I want the second list to be populated with only the sub categories of the main category the user chooses in the first menu (i.e. 1,2,3 etc. if he chose the main category 'Numbers' and a,b,c, etc. if he chose the main category 'Letters')
    Is there an easy way to do this in Dreamweaver?
    Thanks,
    YWSW

    How many items do you have in each dropdown? If it's a small number, you can download all of the options for the second dropdown and use client side javascript to filter based on the choice of the first dropdown. If the number is large, you'll need to use AJAX to dynamically pull the related items from the database.
    Search the web for "dependent dropdown" or "cascading dropdown" for some technical details.

  • IS IT POSSIBLE TO REDIRECT THE OUTPUT TO ANOTHER PAGE?

    Hi all,
    Is it possible to redirect the output when I excute my query in iSQL*plus to another predifined html page?
    If yes how do I do this?
    Thanks a mill

    You could do this..just read on..
    It would generate a html page for you...and..so on..!
    In addition to plain text output, the SQL*Plus command-line interface enables you to generate either a complete web page, or HTML output which can be embedded in a web page. You can use SQLPLUS -MARKUP "HTML ON" or SET MARKUP HTML ON SPOOL ON to produce complete HTML pages automatically encapsulated with <HTML> and <BODY> tags.
    By default, data retrieved with MARKUP HTML ON is output in HTML, though you can optionally direct output to the HTML <PRE> tag so that it displays in a web browser exactly as it appears in SQL*Plus. See the SQLPLUS MARKUP Options and the SET MARKUP command for more information about these commands.
    SQLPLUS -MARKUP "HTML ON" is useful when embedding SQL*Plus in program scripts. On starting, it outputs the HTML and BODY tags before executing any commands. All subsequent output is in HTML until SQL*Plus terminates.
    The -SILENT and -RESTRICT command-line options may be effectively used with -MARKUP to suppress the display of SQL*Plus prompt and banner information, and to restrict the use of some commands.
    SET MARKUP HTML ON SPOOL ON generates an HTML page for each subsequently spooled file. The HTML tags in a spool file are closed when SPOOL OFF is executed or SQL*Plus exits.
    You can use SET MARKUP HTML ON SPOOL OFF to generate HTML output suitable for embedding in an existing web page. HTML output generated this way has no <HTML> or <BODY> tags.

  • [ADF BC] Showing a list of values based on the contents of another list

    I have tried to make a simplified example to illustrate what I want to do. Here is a picture of my example schema:
    Example Schema Image
    There are three entity tables: Employee, Department and Location.
    There are also two intersection tabels: Employee_Location and Department_Location.
    My ADF BC model layer is based on this schema.
    What I am trying to do is have a creation process for an employee where you first fill in the employee details (forname and surname), then you assign the employee to a department, then - based on the locations assigned to the department - assign one or more locations to the employee.
    Imagine that the employee is a door-to-door salesman and that each department in is company has several areas of a town that they cover (locations). Each employee will cover a subset of the locations that the department covers.
    The first two steps are easy - the details page can be created using a form on the employee view and the department assignment can be done with a list of values drop down on the departments view.
    The third step is a little more complex. You can use a shuttle to assign one or more locations to the employee, but you shouldn't just show a list of all locations, since some of these will not be covered by the department and therefore not be available to the employee. What I want is only the locations associated with the employee's department to appear in the list.
    So my question is how do I model this using ADF Business Components?
    Also, if an employee is allowed to be assigned to more than one department (adding another intersection table between the employee and department tables), how would I model that?

    Hi,
    For your reference variable name should be simply any name i.e resorts_resort.No need to put @ in front when declaring variable and to refer presentation variable you should use the below syntax
    @{Variable_name}{Default_value} where default_value is some default value you want to give.
    Now coming to your problem you can fulfill your requirement by simply checking constrain checkbox.If you choose all values instaed of SQL results constrain checkbox will appear.Approach followed by you should also work but constrain is an easy option.
    Thanks
    Sandeep
    Edited by: Sandeep Saini on 10-Sep-2010 00:59
    Edited by: Sandeep Saini on 10-Sep-2010 00:59

  • DYNAMIC INTERNAL TABLE CREATION BASED ON THE CONTENT OF ANOTHER INTERNAL TA

    Hi All
    I need to create an internal table at runtime.
    I have a selection screen parameter which is specific to country, Which can take values below
    eg:- IT_AREA for Italy(IT)
    FR_AREA for France(FR)
    IE_AREA for Ireland(IE).....And similary for other countries
    Based on the Above parameter, I need to create Internal Table as below
    DATA: itab TYPE italy_data Occurs 0.
    If I declare as above, Then itab has fields from italy_data. And this internal table i will be sending it to Function Module to get data into it.
    My Requirement is to Create the Internal table itab during runtime for tables italy_data OR france_data OR ireland_data based on selection screen parameter. Tables on Country may have different number of fields in it.
    Can anyone help me on this??

    Hi,
    Here is a sample code to create a dynamic internal table.
    REPORT ytrab03.
    TABLES: mara, makt.
    TYPE-POOLS: slis.
    DATA: it_fcat TYPE slis_t_fieldcat_alv,
    is_fcat LIKE LINE OF it_fcat,
    ls_layout TYPE slis_layout_alv.
    DATA: it_fieldcat TYPE lvc_t_fcat,
    is_fieldcat LIKE LINE OF it_fieldcat.
    DATA: new_table TYPE REF TO data,
    new_line TYPE REF TO data,
    ob_cont_alv TYPE REF TO cl_gui_custom_container,
    ob_alv TYPE REF TO cl_gui_alv_grid,
    vg_campos(255) TYPE c,
    i_campos LIKE TABLE OF vg_campos,
    vg_campo(30) TYPE c,
    vg_tables(60) TYPE c.
    DATA: e_params LIKE zutsvga_alv_01.
    FIELD-SYMBOLS: <l_table> TYPE table,
    <l_line> TYPE ANY,
    <l_field> TYPE ANY.
    PARAMETERS: p_max(2) TYPE n DEFAULT '20' OBLIGATORY.
    is_fcat-fieldname = 'COL01'.
    is_fcat-ref_fieldname = 'MATNR'.
    is_fcat-ref_tabname = 'MARA'.
    APPEND is_fcat TO it_fcat.
    is_fcat-fieldname = 'COL02'.
    is_fcat-ref_fieldname = 'MAKTX'.
    is_fcat-ref_tabname = 'MAKT'.
    APPEND is_fcat TO it_fcat.
    LOOP AT it_fcat INTO is_fcat.
    is_fieldcat-fieldname = is_fcat-fieldname.
    is_fieldcat-ref_field = is_fcat-ref_fieldname.
    is_fieldcat-ref_table = is_fcat-ref_tabname.
    APPEND is_fieldcat TO it_fieldcat.
    CONCATENATE is_fieldcat-ref_table is_fieldcat-ref_field
    INTO vg_campos SEPARATED BY '~'.
    APPEND vg_campos TO i_campos.
    ENDLOOP.
    *... Create the dynamic internal table
    CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING
    it_fieldcatalog = it_fieldcat
    IMPORTING
    ep_table = new_table.
    *... Create a new line
    ASSIGN new_table->* TO <l_table>.
    CREATE DATA new_line LIKE LINE OF <l_table>.
    ASSIGN new_line->* TO <l_line>.
    SELECT (i_campos) FROM mara INNER JOIN makt
    ON mara~matnr = makt~matnr
    UP TO p_max ROWS
    INTO TABLE <l_table>.
    LOOP AT <l_table> INTO <l_line>.
    LOOP AT it_fcat INTO is_fcat.
    ASSIGN COMPONENT is_fcat-fieldname
    OF STRUCTURE <l_line> TO <l_field>.
    IF sy-tabix = 1.
    WRITE: /2 <l_field>.
    ELSE.
    WRITE: <l_field>.
    ENDIF.
    ENDLOOP.
    ENDLOOP.
    Regards,
    Karuna.

  • Create a filtered list based on the selection in another field? URGENT HELP NEEDED

    Hi,
    Hoping someone can help me with something I am working on. i am fairly new to creating forms in acrobat (know how to us the full range of very basic features) but I have now found myself needing some help.
    i am producing an order form, and I need to create a filtered dropdown list based on the value selected in another field.
    basically, when a user select the company chooses their Business Name from a dropdown list, I would like their deliver address to self populate. In some cases there may be a few options for the company delivery address so in these cases the second option would be a dropdown list of the options available for that company.
    i have attached a screenshot, it is the Fields "Business Name" and "delivery Address/Delivery Postcode" that i would like to be linked so that the option in Business Name filtered the options in delivery Address
    Hope someone out there has the time to help me with this, i am using Acrobat Pro DC
    many Thanks
    Lee

    This will require a complex, custom-made script. The basic functionality of populating another field based on a selection in a drop-down is not that complicated, but if you want it to also populate other drop-downs (and then presumably use them to populate other fields), it will require a more complex solutions.
    This tutorial is relevant for your question: https://acrobatusers.com/tutorials/change_another_field

Maybe you are looking for