Filter a query based on virtual characteristic

Hi,
I have a query with a virtual characteristic.
I need to filter the query based on the results in that characteristic.
Can it be done?
If not, can I delete records after the stage where the characteristic is filled and before the result of the query appears?
Thanks,
Hagit

Hi Hagit,
To filter a query on the value of a virtual characteristic value directly would not be possible.
Please check the below Forum topic and see if the note 1088469 helps you find a solution to your problem.
Virtual characteristics or key figures load data with BIA/BWA?
Alternatively, you can think about using a query viewwith filter to filter the virtual characteristic value. Do not have a refined solution suggestion, but you can think in that direction, I guess.
Hope it helps.
Thanks,
Abhishek.

Similar Messages

  • BEx query based on virtual cube donu00B4t display a valid List of Value (LOV)

    Hello
    I have a problem with an invalid LOV. The scenario is the following; There´s a BEx query based on a virtual cube. The query has an exit variable on caracteristic that is based on 0CALMONTH.
    At Universe Designer I simply create a connection, a universe based on this query and export.
    At Web Intelligence (also at Live Office), when I try to execute de query, the prompt to fill my exit variable display a list of value that doesn´t match with the values of the caracteristic at the cube.
    Actually, the list at the prompt starts with 01.0000 and finishes with 05.0968.
    In Universe Designer, the option to edit the list of values is not available. But I think that editing the LOV is not the correct way.
    I´ve tried creating a new query based on the DSO that is the source of the virtual cube. In this case, I had a valid list. Unfortunately, I can´t use this DSO.
    Did anyone already have this problem?

    Hi James,
    can you explain what you mean with "input length for that filed" ?
    The field in the table is varchar2(120). I coudn't found options for the List of value.
    Thanks for your response
    Carsten
    null

  • 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.

  • Dynamic filter on time characteristics on OLAP SAP BEX query based universe

    Dear all,
    I'm currently working on the integration between SAP NetWeaver BI 7.0 and SAP BusinessObjects XI 3.1 FP 1.5 via integration kit.
    I've built an OLAP universe on the top of a BW query based on a multiprovider that contains 10 infocubes.
    Everything works fine but I need to create a filter in the OLAP universe that allows to restrict data by current date (e.g. using TIME characteristic of Infocube such as 0CALDAY or 0CALMONTH). From that filter we could start creating other conditions to compare data to different time periods.
    I've already tried to use a SAP exit variable in  a BW query but this kind of object would restrict query data only by current date and for example it would be impossible to browse data by previous years (to bypass this problem we could use restricted key figures with different offsets but we have too many key figures in the query and the number of restrictions
    would rise exponentially). 
    In a relational DataBase we can do that using a "where condition" based on 'CURRENTDATE' (SQL DB2 syntax).
    Now, we need to apply the same logic but translated in MDX syntax. 
    Is it possible to enter a dynamic filter in the OLAP universe or just fixed or promt values ?
    Any advise?
    Thanks in advance.
    Best Regards.
    M.

    Hi Ingo,
    1) My question is: "How can I have to manage variable in BEX queries and in the UNIVERSE in order to obtain the maximum flexibility to create reports with measures on actual day (for example) without asking the user to promt a value ?"
    I want to use an unique BEX query to define an unique UNIVERSE. On this UNIVERSE I want to create many reports (actual day, previous day, and so on).
    If I restrict 0CALDAY with an EXIT variable then shall I be able to create a different restrictions on the same Universe based on 0CALDAY ?
    2) Another question is:
    Is it possible to insert an XML / MDX filter on the OLAP Universe with dynamic derivation of the system date ?
    For example:
    Instead of this:
    <FILTER KEY="[0FISCYEAR].[LEVEL01].[NAME]">
        <CONDITION OPERATORCONDITION="Equal">
            <CONSTANT CAPTION="Z12008"></CONSTANT>
        </CONDITION>
    </FILTER>
    Is it possible to insert a tag with a dynamic function to derive the system date ?
    Thanks in advance.
    Best Regards.

  • Query field calculation based on a characteristic field

    Hi
    I have a req wherein the query has a field "Balance". Now here the value of the Balance field is calculated based on another characteristic "0bal_flag". 0bal_flag has values "X" or blank. The 0bal_flag is actually a attr of 0gl_account and i have it as a nav attr in my cube.
    The calculation goes like this....
    If 0bal_flag = 'X' then "Balance" = balance (there is a balance field in underlying infoprovider)
    else "Balance" = Debit -credit (these fields are also there in underlying infoprovider....)
    So how do i achieve this...?
    Since 0bal_flag is a char I cannot use it directly in a formula....
    Thanks
    Gaurav

    Hi Gaurav,
    Create a replacement path formula variable on the 0bal_flag with evaluate as boolean checked, you will get the values 1 when flag is X and 0 when the flag is initial, now you can use this 'formula variable' in the formula
    ((0bal_flag==1)balance)+((0bal_flag==0)(debit-credit))
    hope this helps,
    Rk.

  • BW 3.5: Filter Characteristic based on another Characteristic

    Hi guys, I need your help.
    I have created one query. In this query, there is 2 characteristic in filter condition. The first one is Consolidation Group (single variable and input come from user) and the second is partner unit (hardcode/ constant : A500, A700, A710, A720, A730, A740). The problem is user want dynamic filter condition for Partner Unit.
    So I need to change the filter condition for this characteristic.User want this condition happen:
    - If user input Consolidation Group = '10000' then partner unit will be filtered by : 'A500', 'A700'
    - If user input Consolidation Group = '10130' then partner unit will be filtered by : 'A710','A720'
    - If user input Consolidation Group =  '10140' then partner unit will be filtered by : 'A730','A740'
    When user want this condition happen, I think I must use hierarchy because there is possibility to add another partner unit in consolidation group (example: If user add partner unit 'A800' in consolidation group '10000' (in SAP system) then partner unit will be filtered automatically with 'A500', 'A700', and 'A800').
    My question is:
    1. Where do I need to create hierarchy? On characteristic Consolidation Group or Partner Unit?Because both infoobject don't have any hierarchy at all
    2. How to create dynamic hierarchy filter condition? Because in this problem, static hierarchy filter condition can't solve the problem. What i mean dynamic in here is when user input consolidation group 10000 then Partner Unit will be restricted to node Cons Group 10000 and so on... 
    Thank you and Regards,
    Satria

    Hi Satria,
               If you use customer exit variable for partner. it may help you.
    Please check here.....
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/59069d90-0201-0010-fd81-d5e11994d8b5
    Customer Exit for Query Variable
    http://help.sap.com/saphelp_nw70/helpdata/en/1d/ca10d858c2e949ba4a152c44f8128a/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/1d/ca10d858c2e949ba4a152c44f8128a/content.htm
    http://sapbwneelam.blogspot.com/2007/10/how-to-create-populate-user-exit.html
    http://www.scribd.com/doc/7477843/Five-Ways-to-Enhance-SAP-BI-Backend-Functionality-Using-ABAP
    http://www.erpgenie.com/bw--km/1097-sap-bw-query-user-exit-rsr00001
    Thnaks,
    Vijay.

  • How to create Virtual InfoProvider with Services - Virtual Characteristic

    Hi all,
    I need to create a virtual infoprovider that also fills a virtual characteristic in order to display custom characteristics and calculated values based on user selection.
    Basicaly what I want to do is send a variable in a virtual characteristic equal to the values I want to fill in the characteristic.  So for instance if my base cube contains the infoobjects Brand, Product Line, Region and Country I want a  have a new infoobject that has no data, but fills itself with the vales of the infoobject I specify at query time on the virtual cube.
    The reason for this is I am trying to create a WAD using the delta chart (waterfall graph) that will show the difference between the plan and actual totals for a specific characteristic in Profitibility analysis.
    I have a document that explains the situation.  Send me your mail address and I will send you the document.
    Kind Regards

    We found a way to build the structure for this.
    Regards

  • SOURCING10: Passing parameters to a Query Based webservice using JAVA

    Hi Experts,
    I have been working on consuming a Query based webservice published in Souricng10 in a simple JAVA class. The query has a filter parameter which is not mandatory. I am able to consume the webservice using the GET method and display the content of the webservice. But when i try to POST a value to the filter parameter of the query i am getting the following error:
    java.io.IOException : Server returned HTTP response code: 415 for URL: http://sapcild9.web.bc:55000/sourcing/ngservices/rest/query/Z_TEST_WS_QUERY/execute/
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    Following is the code which i have used:
       URL url = new URL("http://sapcild9.web.bc:55000/sourcing/ngservices/rest/query/Z_TEST_WS_QUERY/execute/");
       HttpURLConnection connection = (HttpURLConnection)url.openConnection();
       connection.setRequestProperty("Authorization", "Basic " + authStringEnc);
       connection.setRequestProperty("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
       connection.setRequestProperty("Content-Length", "" +Integer.toString(urlParameters.getBytes().length));
       connection.setRequestProperty("Content-Language", "en-US");
       connection.setUseCaches (false);
       connection.setDoInput(true);
       connection.setDoOutput(true);
       connection.setAllowUserInteraction(true);
       connection.setInstanceFollowRedirects(false);
       connection.setRequestMethod("POST");
       connection.connect();
       //Send request
       OutputStream out = connection.getOutputStream();
       OutputStreamWriter wr= new OutputStreamWriter(out, "UTF-8");
       wr.write("EXTERNAL_ID");
       wr.write("=");
       wr.write(URLEncoder.encode("temp","UTF-8"));
       wr.close();
       out.close();
       is = connection.getInputStream();
       isr =new InputStreamReader(is);
       BufferedReader bufferReader = new BufferedReader(isr);
       String str; StringBuffer stringBuffer = new StringBuffer();
       while ((str = bufferReader.readLine()) != null) {
       stringBuffer.append(str);
       stringBuffer.append("\n");
       System.out.println(stringBuffer.toString());
       connection.disconnect();
       is.close();
    Please Advise how to proceed on this isssue?
    Thanks in advance.
    Srikanth Emani

    Hi Gael,
    your URL is made up of :
    [ProcedureName]?[parameter1]=[value1]&[parameter2]=[value2]
    creating URLs like this can have problems especially with spaces and punctuation.
    the answer is a FORM
    the following will create a hidden form :
    FORM ACTION="[ProcedureName]" METHOD="POST" name="F1"
    INPUT type="HIDDEN" name="[parameter1]" value="[value1]"
    INPUT type="HIDDEN" name="[parameter2]" value="[value2]"
    /FORM
    you can set the values in the form using:
    document.F1.[parameter1].value="abc123%%&&$$!";
    document.F1.submit();
    will submit the form and the PL/SQL procedure should receive the text as it was contained in the form.
    the only characters that can now cause problems are :
    " as it delimits the field.
    ' as it may cause problems in PL/SQL.
    \ as it is a special character.
    Regards Michael

  • Add new virtual characteristic in report writer

    Dear gurus,
    I would like to add a new virtual characteristic 'ZZWKDT' (work done date) so that I can filter my report with this selection criteria. This field has been added to structure "CI_CCR1S". But I don't have any idea on where should I code my program in order to tell the system to fill the "Work done date" from the data I retreived and filter tthose record which not meet with user selection from being displayed.
    Pls guided me accordingly asap.
    Thanks & regards,
    LOI

    Dear gurus,
    I would like to add a new virtual characteristic 'ZZWKDT' (work done date) so that I can filter my report with this selection criteria. This field has been added to structure "CI_CCR1S". But I don't have any idea on where should I code my program in order to tell the system to fill the "Work done date" from the data I retreived and filter tthose record which not meet with user selection from being displayed.
    Pls guided me accordingly asap.
    Thanks & regards,
    LOI

  • Simple logic - virtual characteristic

    I'm writing a code for a virtual characteristic, but need a couple pieces to get in place. please help with the following problem:
    In my logic, I have an internal table itab1 whose contents are as follows:
    plant sale
    1001 100
    1001 50
    2001 300
    First I want to aggregate multiple rows like below:
    plant sale
    1001 150
    2001 300
    Second, I want to create another internal itab2 which ranks plants as follows:
    plant sale rank
    1001 150 2
    2001 300 1
    Please help with logic.

    Hello,
    1) When you select values in the internal table make you select statement as below;
    select plant sum( sales ) as sales from table into corresponding fields of table itab1 group by plant.
    This will give output as:
    plant sale
    1001 150
    2001 300
    2) For ranking, i believe you want them to be ranked based on the sales they have. For that do the foll:
    data: count(3) type n.
    itab2[] = itab1[].
    sort itab2 descending by sales.
    count = 1.
    loop at itab2 into wa2.
    wa1-rank = count.
    modify itab2 from wa2.
    count = count + 1.
    endloop.
    clear count.
    Regards,
    Shashank

  • Batch Creation Date  as a Virtual Characteristic in 0IC_C03 Inventory Cube

    Dear Experts
    Currently we have a Stock Aging report based on Document date. But our management requirement is Batch date wise.
    Currently I am having Batch Creation date as an Attribute of 0Material info Object.
    Is it possible to create a Virtual Characteristic for Batch Date and Include in the Cube?
    If Possible please explain me the Procedure to Create Characteristic.
    Thanks in Advance.
    Viru
    Edited by: Lankem-IT on Apr 15, 2011 3:43 PM

    Refer link
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30f15839-0cf1-2b10-c6a7-ebe68cc87cdc?QuickLink=index&overridelayout=true
    & check ur e-mail.

  • BADI for Virtual Characteristic

    Hi,
    I am able to use BADI to populate Virtual Key Figure, but getting an error when I use similar code for Virtual Char.
    Following are the details
    Characteristic InfoObjects IO_MATRAL, IO_PLANT, IO_CMATRL (virtual char)
    I want to assign the value of IO_MATRAL to IO_CMATRAL using BADI.
    Attributes are
    P_CHA_IO_CMATRL  associated type I (level: instance, visibility: private)
    P_CHA_IO_MATRL   associated type I (level: instance, visibility: private)
    DEFINE method
    method IF_EX_RSR_OLAP_BADI~DEFINE.
      DATA: l_s_chanm   TYPE rrke_s_chanm,
            l_kyfnm     TYPE rsd_kyfnm.
      FIELD-SYMBOLS:
            <l_s_chanm> TYPE rrke_s_chanm.
    CASE i_s_rkb1d-infocube.
       WHEN 'IC_SEKH'.
        l_s_chanm-chanm = 'IO_MATRL'.
        l_s_chanm-mode = rrke_c_mode-read.
        APPEND l_s_chanm TO c_t_chanm.
        l_s_chanm-chanm = 'IO_CMATRL'.
        l_s_chanm-mode = rrke_c_mode-read.
        APPEND l_s_chanm TO c_t_chanm.
    ENDCASE.
    ENDMETHOD.                    "if_ex_rsr_olap_badi~define
    INITIALIZE method
    method IF_EX_RSR_OLAP_BADI~INITIALIZE.
      DATA: l_global_name TYPE string.
      FIELD-SYMBOLS:
            <l_global>    TYPE i,
            <l_s_sfc>     TYPE rrkg_s_sfc,
            <l_s_sfk>     TYPE rrkg_s_sfk.
    there's no need to change this method
    Just create attributes for each charactersitic
    with name P_CHA_<characteristic> TYPE i.
    and constants for each key figure with name
    P_KYF_<key figure> TYPE i.
      CLASS cl_exm_im_rsr_olap_badi DEFINITION LOAD.
    get field postions for characteristics in structure
      LOOP AT i_th_sfc ASSIGNING <l_s_sfc>
           WHERE user_exit NE rrke_c_mode-none.
    field name in structure is keyreturnnm
    name of the global variable
        CONCATENATE 'P_CHA' <l_s_sfc>-chanm
            INTO l_global_name
            SEPARATED BY '_'.
    fill the global variable
        UNASSIGN <l_global>.
        ASSIGN (l_global_name) TO <l_global>.
        CHECK <l_global> IS ASSIGNED.
        <l_global> = cl_exm_im_rsr_olap_badi=>get_field_position_d(
                                           i_fieldnm = <l_s_sfc>-keyreturnnm
                                           i_s_data  = i_s_data ).
      ENDLOOP.
    endmethod.
    COMPUTE method
    method IF_EX_RSR_OLAP_BADI~COMPUTE.
      FIELD-SYMBOLS: <fs_io_cmatrl>   TYPE ANY,
                     <fs_io_matrl>    TYPE ANY.
      ASSIGN COMPONENT p_cha_io_matrl  OF STRUCTURE c_s_data TO <fs_io_matrl>.
      ASSIGN COMPONENT p_cha_io_cmatrl OF STRUCTURE c_s_data TO <fs_io_cmatrl>.
      <fs_io_cmatrl> = <fs_io_matrl>.
    endmethod.
    I am not getting any value in IO_CMATRL in the query.
    Even when I assign hardcoded value like 's', in compute method, it's not showing the value in the query result.
    Can you guys please suggest what am I missing here? (similar code works for Virtual keyFig. implementation)
    Thank you,
    Lakshmi

    Hi,
    In DEFINE Method
    l_s_chanm-chanm = 'IO_MATRL'.
    l_s_chanm-mode = rrke_c_mode-read.
    APPEND l_s_chanm TO c_t_chanm.
    l_s_chanm-chanm = 'IO_CMATRL'.
    l_s_chanm-mode = rrke_c_mode-read.
    APPEND l_s_chanm TO c_t_chanm.
    If u2018IO_CMATRLu2019 is your virtual characteristic u2026try changing the read mode to  rrke_c_mode-no_selection
    Thanks,
    Advait

  • Filter list items based on security groups o365

    How to filter list items based on security groups in o365.

    Hi,
    According to your description, my understanding is that you want to filter list items based on the Office 365 security groups.
    If that is the case, I suggest you can create a data view to filter the list items with CAML Query like below:
    <Where>
    <Membership Type="CurrentUserGroups">
    <FieldRef Name="VisibleToGroup"/>
    </Membership>
    </Where>
    For more information, please refer the detailed article below:
    SharePoint - Filtering a View by Group Membership
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • 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 fulfill the virtual characteristic value into report

    Hi Experts,
          I am working on one reporting requirement that needs to add reference date (virtual characteristic) field to report.
          I have added reference date field to query and able to display the field in report.But I am not able to display reference date field runtime data in to report output.
        Could someone please help me on this how to display this virtual characteristic values into report.where the runtime variable values are stored.How to fill the data etc.
    Thanks in advance.
    Best Regards,
    Hari.
    Edited by: k hari on Jan 29, 2008 6:22 AM
    Edited by: k hari on Jan 29, 2008 6:24 AM

    You can achieve this using Customer Exit or BADI. Check the folllowing link.
    http://help.sap.com/saphelp_nw70/helpdata/en/ac/ef1f43daac9a448f0150a02e3a7aba/content.htm
    If you are using BADI
    You can create Virtual CHAR in BADI using transaction SE19
    In this transaction you can create a new or display the existing BADI.
    There you can see two tabs
    The Attribute Tab we need to give the name of the Multiprovider on which the query with the virtual char is getting executed.
    The Inerface Tab has three following sections. Need to write the ABAP code for all the three.
    Define : Defind all the characteristics and virtual char that will be used for populating virtual char
    Initialize : Initialize them
    Compute : Here you will have to write the logic for populating the virtual char.
    Once the logic is written then you can use this char in your query .
    Hope this helps.

Maybe you are looking for

  • One-Time vendors

    We'll soon be implementing the one-time vendor process but I have a potential audit issue. When the AP clerk enters the bank details of the one-time vendor via MIRO does anybody have a verification process to check that the bank details are correct. 

  • How to create an exceptions table

    I am trying to record the records that fail to load in my dimension and fact mappings. I found the Constraint Management option for "Exception Table Name" but I could not find how to create the table i.e. What is the structure of the table and if the

  • How do I remove Leopard so I can go back to Tiger

    A friend talked me into the Leopard upgrade. After 2 days of multiple problems and having work to get done NOW!. I don't have time to waste playing. I want to delete Leopard and reinstall my Tiger software. How do I do this? I have had no problems in

  • Mac Pro 8 core w/2 24"LED screens

    Just converted to: Mac Pro 8 core 2x 2.2.6 GHz Quad-Core Intel Xeon 12 GB 1066 MHz DDR3. No histogram in adjustments pane. After straightening getting a white screen on crop that can be undone with a remove adjustment. Re-installed Aperture 2, rebuil

  • Error occured for "APP-PO-14090: Document was not created

    Hi All, Can anbody please help for the error occured as "APP-PO-14090: Document was not created", while creating purchase order through Auto create feature in Purchasing Module. So request you please help me. Thanks for your response in advance. Than