Dynamic filter to capture the highest value at runtime.

Hi,
     Is there a way through which we can have a dynamic filter in Webi, which would automatically filter the maximum value from a list of values associated with a dimension object? 
     I have the following scenario :- I have a dimension object called 'Plan Version', whose list of values would typically be 00, 01, 02, 03.....and so on. These values are updated in the database after every 15 days. Now, in my report, i need to display the data which would be associated only to the highest 'Plan Version' value. This requires me to apply a filter on the highest value of 'Plan Version', which is not a difficult job to do if it has to be a static filter. However, I need it to be a dynamic filter, i.e., every time a new plan version is uploaded in the system, and if the report is refreshed, the report filter should automatically select (highlight) the highest value for 'Plan Version' and display the data accorsingly.  One way would be to use the 'Max' function, but aggregate functions cannot be used in filters. Any help would be greatly appreciated.
Thanks,
Alok.

Hey Alok,
You're correct, using Max(). But you have to apply/use it @Universe level not @Query panel.
Create Object @Universe:
Plant version = Max([Plant Version]) and make it as Dimension type.
Now use this Plane version object for Prompt @ Query level. So that it will fetch max value for the Plant Version all times.
Hope you got the logic.
Gracias...!!

Similar Messages

  • How to capture the Textelements value

    Can anyone give me the command to capture the Textelement value
    <----
    <param name="ELEMENT_TYPE_1" value="FILTER"/>
    <param name="ELEMENT_NAME_1"                            value="ZCUSTSALE__ZLOGOPRTN"/>
    I need to capture the value which the user selects for a dropdown filter in one of the tabs of webtemplate.
    If anyone has the JavaScript !!!
    so that I can then pass value it as a URL to another template in WAD, which has multiple TABS.
    Would award points...
    thanks
    BWinfo

    bwinfo,
    you will need to write the javascript as part of the onchange() function assigned to the dropdown.
    document.yourform.ZCUSTSALE_LOGPRTN.options[document.yourform.ZCUSTSALE_LOGPRTN.selectedIndex].value
    Here it is simple javascript , what you need to do is assign the onchange() function and you can get the command URL and needed manipulation done.
    Arun
    P.S check if the form name and the dropdown name are the same , open the template through Internet explorer and check the dorpdown name or the HTML view

  • Unable to capture the parameter values from a PL/SQL procedure

    hi.
    i'm trying to capture the parameter values of a PL/SQL procedure by calling inside a anonymous block but i'm getting a "reference to uninitialized collection error" ORA-06531.
    Please help me regarding.
    i'm using following block for calling the procedure.
    declare
    err_cd varchar2(1000);
    err_txt VARCHAR2(5000);
    no_of_recs number;
    out_sign_tab search_sign_tab_type:=search_sign_tab_type(search_sign_type(NULL,NULL,NULL,NULL,NULL));
    cntr_var number:=0;
    begin
         rt843pq('DWS','3000552485',out_sign_tab,no_of_recs,err_cd,err_txt);
         dbms_output.put_line('The error is ' ||err_cd);
         dbms_output.put_line('The error is ' ||err_txt);
         dbms_output.put_line('The cntr is ' ||cntr_var);
         for incr in 1 .. OUT_SIGN_TAB.count
         loop
         cntr_var := cntr_var + 1 ;
    Dbms_output.put_line(OUT_SIGN_TAB(incr).ref_no||','||OUT_SIGN_TAB(incr).ciref_no||','||OUT_SIGN_TAB(incr).ac_no||','||OUT_SIGN_TAB(incr).txn_type||','||OUT_SIGN_TAB(incr).objid);
    end loop;
    end;
    Error is thrown on "for incr in 1 .. OUT_SIGN_TAB.count" this line
    Following is some related information.
    the 3rd parameter of the procedure is a out parameter. it is a type of a PL/SQL table (SEARCH_SIGN_TAB_TYPE) which is available in database as follows.
    TYPE "SEARCH_SIGN_TAB_TYPE" IS TABLE OF SEARCH_SIGN_TYPE
    TYPE "SEARCH_SIGN_TYPE" AS OBJECT
    (ref_no VARCHAR2(22),
    ciref_no VARCHAR2(352),
    ac_no VARCHAR2(22),
    txn_type VARCHAR2(301),
    objid VARCHAR2(1024))............

    We don't have your rt843pq procedure, but when commenting that line out, everything works:
    SQL> create TYPE "SEARCH_SIGN_TYPE" AS OBJECT
      2  (ref_no VARCHAR2(22),
      3  ciref_no VARCHAR2(352),
      4  ac_no VARCHAR2(22),
      5  txn_type VARCHAR2(301),
      6  objid VARCHAR2(1024))
      7  /
    Type is aangemaakt.
    SQL> create type "SEARCH_SIGN_TAB_TYPE" IS TABLE OF SEARCH_SIGN_TYPE
      2  /
    Type is aangemaakt.
    SQL> declare
      2    err_cd varchar2(1000);
      3    err_txt VARCHAR2(5000);
      4    no_of_recs number;
      5    out_sign_tab search_sign_tab_type:=search_sign_tab_type(search_sign_type(NULL,NULL,NULL,NULL,NULL));
      6    cntr_var number:=0;
      7  begin
      8    -- rt843pq('DWS','3000552485',out_sign_tab,no_of_recs,err_cd,err_txt);
      9    dbms_output.put_line('The error is ' ||err_cd);
    10    dbms_output.put_line('The error is ' ||err_txt);
    11    dbms_output.put_line('The cntr is ' ||cntr_var);
    12    for incr in 1 .. OUT_SIGN_TAB.count
    13    loop
    14      cntr_var := cntr_var + 1 ;
    15      Dbms_output.put_line(OUT_SIGN_TAB(incr).ref_no||','||OUT_SIGN_TAB(incr).ciref_no||','||OUT_SIGN_TAB(incr).ac_no||','||OUT_SIGN
    TAB(incr).txntype||','||OUT_SIGN_TAB(incr).objid);
    16    end loop;
    17  end;
    18  /
    The error is
    The error is
    The cntr is 0
    PL/SQL-procedure is geslaagd.Regards,
    Rob.

  • How to capture the selected values from module pool dialog list box !

    Hi experts,
    Can anyone help me out in capturing the values from the list box.
    i am able to set the values in the list box.But i am not able to capture the selected value from the list box. Always the list box name is getting as "space"
    I also tried in using the FM "VRM_GET_VALUES" but it is retireving all the values. Is there is any flag for filttering out the selected value.
    Your inputs are appreciated.
    Thanks,
    Vijay.

    Along with the PBO and PAI event, add a POV event in the flow logic of the screen
    DEMO_DROPDOWN_LIST_BOX -is a good demo example.
    PROCESS ON VALUE-REQUEST.
    FIELD structure_name-field_name MODULE create_dropdown_box.
    In the report :
    MODULE create_dropdown_box INPUT.
      SELECT carrid carrname
                    FROM scarr
                    INTO CORRESPONDING FIELDS OF TABLE itab_carrid.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'CARRID'
                value_org       = 'S'
           TABLES
                value_tab       = itab_carrid
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc <> 0.
      ENDIF.
    ENDMODULE.
    In the layout, assign a Function Code , for eg : 'SELECTED' to the listbox and lets say name of the field is SDYN_CONN-CARRID. So in the PAI module,
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'SELECTED'.
          MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
      ENDCASE.
    ENDMODULE.
    sdyb_conn-carrid will contain your selected field

  • How can we select the highest value from 3 disfferent #defined values???

    Hello,
    Sometimes I come across the requirement of having the program automatically select the highest value
    among several defined preprocessor command statements. For example:
    #include "stdio.h"
    #include <math.h>
    #define _K_BUF_OTHERS 20
    #define _k_BUF_ENV_TAGS 30
    #define _k_BUF_REGS 40
    #define _k_MAX(x, y, z) (max((max(x, y)), z))
    int main(){
    unsigned int u;
    u = _k_MAX(_k_BUF_OTHERS,_k_BUF_ENV_TAGS, _k_BUF_REGS);
    return 0;
    In the sample above we have three (3) different define statements called :
    _k_BUF_OTHERS
    _k_BUF_ENV_TAGS
    _k_BUF_REGS
    but at any given time in certain C modules (In this case above, the main.c module) I require for the program to know
    which of the three is the highest and get that highest value so I can use it downstream of my code. In this case the highest would be 40. So therefore putting the following macro anywhere in my code should make a text substitution of the macro's value
    and return 40 to u:
    u = _k_MAX(_k_BUF_OTHERS, _k_BUF_ENV_TAGS, _k_BUF_REGS);
    But I can't even compile the program!
    Here's the error I get in VC++:
    1>------ Build started: Project: MinMax, Configuration: Debug Win32 ------
    1>  Source1.cpp
    1>c:\c++_tests\minmax\minmax\source1.cpp(15): error C3861: 'max': identifier not found
    1>c:\c++_tests\minmax\minmax\source1.cpp(15): error C3861: 'max': identifier not found
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    Can someone please have a look and see what I am doing wrong.
    All help appreciated...
    Thanks
    r

    On 4/12/2015 4:30 PM, roberto wrote:
     1>c:\c++_tests\minmax\minmax\source1.cpp(15): error C3861: 'max': identifier not found
    So implement or #define one. C standard library doesn't provide a function named "max".
    Igor Tandetnik

  • Hide multiple rows in a dynamic table based on the row value.

    Hi,
    I need to hide multiple rows in a dynamic table based on the specific value of that row.
    I cant find the right expression to do that.
    please help

    Go to the Row Properties, and in the Visibility tab, you have "Show or hide based on an expression". You can use this to write an expression that resolves to true if the row should be hidden, false otherwise.
    Additionally, in the Matrix properties you should take a look at the filters section, perhaps you can achieve what you wish to achieve through there by removing the unnecessary rows instead of just hiding them.
    It's only so much I can help you with the limited information. If you require further help, please provide us with more information such as what data are you displaying, what's the criteria to hiding rows, etc...
    Regards
    Andrew Borg Cardona

  • How to capture the Subtype value in Overview view of Address iview

    Hello Experts,
    Below is wdDomodify function of Overview of Address iview.
    TO create bizcards create overview function of FcPersInfo is called.
    Here I want to send fieldinfo1 as the parameter to that fnction  if the subtype is permanent office. can any one please give me a hint how to proceed on this.
    //@@end
      public static void wdDoModifyView(IPrivateBizCardsView wdThis, IPrivateBizCardsView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
        //@@begin wdDoModifyView
              BizcardFieldInfo[] fieldInfo;
             BizcardFieldInfo[] fieldInfo1;
              Date defaultBegda = wdContext.currentContextElement().getDefault_Begda();
              String bizcardField1 = wdThis.wdGetAPI().getComponent().getTextAccessor().getText("BizcardField1");
              String bizcardField2 = wdThis.wdGetAPI().getComponent().getTextAccessor().getText("BizcardField2");
              String bizcardField3 = wdThis.wdGetAPI().getComponent().getTextAccessor().getText("BizcardField3");
         String BizcardField3 = wdThis.wdGetAPI().getComponent().getTextAccessor().getText("BizcardField3");     // House #
         String BizcardField4 = wdThis.wdGetAPI().getComponent().getTextAccessor().getText("BizcardField4");     // City
         String BizcardField5 = wdThis.wdGetAPI().getComponent().getTextAccessor().getText("BizcardField5");     // State
         String BizcardField6 = wdThis.wdGetAPI().getComponent().getTextAccessor().getText("BizcardField6");     // Zip Code
         String BizcardField7 = wdThis.wdGetAPI().getComponent().getTextAccessor().getText
              fieldInfo = new BizcardFieldInfo[] { new BizcardFieldInfo(bizcardField1, "Stras"),
                                                            new BizcardFieldInfo(bizcardField2, "Ort01"),
                                                            new BizcardFieldInfo(bizcardField3, "Telnr"),
              fieldInfo1 = new BizcardFieldInfo[] {
                                                      new BizcardFieldInfo(BizcardField3, "Stras"),     // House #
                                                       new BizcardFieldInfo(BizcardField4, "Ort01"),     // City
                                                       new BizcardFieldInfo(BizcardField5, "State"),     // State
                                                       new BizcardFieldInfo(BizcardField6, "Pstlz"),     // Zip Code
                                                       new BizcardFieldInfo(BizcardField7, "Land1")                                                   };
    wdThis.wdGetFcPersInfoInterface().CreateOverview(
                                                        wdThis.wdGetContext().nodeInfotypeList(),
                                                        view,
                                                        fieldInfo,                                                    "Anssa");     
    Thanks,
    Boiler

    Hello Bolier !!
    Were you able to do the same  ? " capture the Subtype value in Overview view of Address iview"
    Since I am in similar soup  , I would like your help on that matter .If this can be done we can identify and control the delete  button for the subtype (2 & 1)
    Please suggest !!

  • How to capture the parameter value of Concurrent Program submited

    Hi,
    I would like to capture the Parameter value of Concurrent Program submitted through Submit Request screen based on that i want to return value.
    When Conc prog "Payroll Run" along with parameter like "Pay Period" which has LOV attached to it, which has one coulumn named "End Date", this value selected needs to be captured. Can you please tell the Table name where the value is stored or Captured.
    I want this value to be used in Fast Formula which will return the desired value to Input Value.
    Actually in one of the Element I have Input Value as "Monthly Days" which should be populated with the "Number of days" in the period in which Payroll is being processed.
    Thanks in advance.
    Ram

    Hi,
    fnd_concurrent_requests.argument_text stores the argument values in comma separated form. But check the prior response from thierry first - fnd_concurrent _requests is not the place you want to be getting things from as it can be purged and so you source data is gone!
    Gareth
    http://garethroberts.blogspot.com

  • How to capture the string values

    Hi Gurus,
    Could you plz suggest me how to capture the string value.
    My requirement is.
    I have a structure field called  cnj_stat-sttxt_int and it is storing a value like "REL CDRT AVAC". AND the moddile value CDRT will change according to condtions. now i required to write a logic like if cnj_stat-sttxt_int field contain 'REL' and 'AVAC'.  I HAVE TO THROW SOME ERROR.
    SO please give some idea about on it...
    Its urgent..
    points will be rewarded...
    Thanks in advance!!!!
    Thanks & regards,
    Kranthi.

    if cnj_stat-sttxt_int field contain 'REL' and 'AVAC'. I HAVE TO THROW SOME ERROR.
    if cnj_stat-sttxt_int CS 'REL' and cnj_stat-sttxt_int CS 'AVAC'.
    THROW SOME ERROR.
    endif.

  • Function module that can give the last value or the highest value of a key

    hi,
    Is there any function module that can give the last value or the highest value of a key feild in a z table.
    regards,
    johnson

    Hi ,
    We have  aggregate functions in SQL. Some of the functions are as follows.
    MAX(col ) Determines the maximum value of the value in the column col in the resulting set or in the current group.
    MIN( col ) Determines the minimum value of the content of the column col in the resulting set or in the current group.
    AVG(  col ) Determines the average value of the content of the column col in the resulting set or in the current group. The data type of the column has to be numerical.
    SUM( col ) Determines the sum of the content of the column col in the resulting set or in the current group. The data type of the column has to be numerical.
    COUNT( col ) Determines the number of different values in the column col in the resulting set or in the current group.
    For further details , type the function name name and press F1 for further help.
    Eg: select count(mantr) from mara into workarea where condition.
    Reward points if helpful.
    Thanks and Regards.

  • How to use my findTheHighest method to find the highest value in my two dim

    I am going to create a 13row by 10 colume two dimensional array.
    how to use my findTheHighest method to find the highest value in my two dimensional array.
    .When i compile this program , i got those as following;
    "Exception in thread "main" java.lang.ArrayIndexOutOfBoundsExce
    at TaxEvolution.findTheHighest(TaxEvolution.java:31)
    at TaxEvolutionClient.main(TaxEvolutionClient.java:25)"
    public class TaxEvolution{
    public double[][] salesTaxRates;
    public TaxEvolution()
      salesTaxRates = new double[13][10];
      fillProvinTaxRates();
    private void fillProvinTaxRates()
      for ( int row = 0; row < salesTaxRates.length; row++ )
        for ( int column = 0; column < salesTaxRates[row].length; column++ )
          salesTaxRates[row][column]= (int)(Math.random()*5000) + 1;
    public double findTheHighest()
        double highest = salesTaxRates[0][0];
        for ( int row = 0; row <= salesTaxRates.length; row++ )
          for ( int column = 0; column <= salesTaxRates[row].length; column++ )
             if ( salesTaxRates[row][column] >= highest )
                   highest = salesTaxRates[row][column];
        return highest;   
    public double[][] arrayTaxEvolution()
      double[][] returnTaxRates = new double[13][10];
      for ( int row = 0; row < salesTaxRates.length; row++ )
        for ( int column = 0; column < salesTaxRates[row].length; column++ )
          returnTaxRates = salesTaxRates;
      return returnTaxRates;
    public class TaxEvolutionClient{
    public static void main( String[] args ){
      TaxEvolution protaxRateList = new TaxEvolution();
      double[][] taxRateList = protaxRateList.arrayTaxEvolution();
        for ( int i = 0; i < taxRateList.length; i++ )
          for ( int j = 0; j < taxRateList[0].length; j++ )
            System.out.print( taxRateList[i][j] + "\t" );               
            System.out.print( protaxRateList.findTheHighest + "\t" );
    }

    Multiposted
    http://forum.java.sun.com/thread.jspa?threadID=699057&tstart=0

  • Read and assign the highest value

    Hi experts
           I want to read the highest value of the records in a condition basis for example matnr wise then assign that value to some records.
         how to read and assign the value, pls help me out.
    Thanks in advance.
    regards
    Rajaram

    hi
    sort itab by <fildname> descending.
    read table itab  into wa index 1.
    assign wa-fildname to the required records or variables
    regards
    vijay
    reward points if helpful

  • To find the number that has the highest value

    I have an internal table with one field containing numeric values. I want to know the number that has the highest value. Can you tell me how do I do that?
    Is there any keyword for this?
    Thank you,
    Krishen

    Hi,
      Use the below procedures..
    <b>CASE 1</b>
    SORT <itab> by <Fld>
    where <itab> - Internal Table.
    and <Fld>     - Field Name ( in your case it is the field with numeric values)
    describe table <itab> lines <no_of_lines>
    <no_of_lines> - total number of lines in the table.
    read table <itab> index <NO_OF_LINES>
    the above read statement gives the highest record.
    <b>CASE 2</b>
    SORT <itab> by <Fld> descending.
    where <itab> - Internal Table.
    and <Fld>     - Field Name ( in your case it is the field with numeric values)
    read table <itab> index 1.
    the above read statement gives the highest record.
    I hope this solves your problem.
    Regards,
    Vara

  • Setting the selectOneChoice value at runtime

    Hi,
    I need to set the selectOneChoice value at runtime. On Page Load I am creating object of RichSelectOneChoice and currencyCode.setValue("USD");
    When I check on runtime it is not showing "USD" as selected item in dropdown where as in background it is sending USD to downstream application.
    How to get the show the value in SelectOneChoice which is selected at runtime in code?
    Thanks in advance.

    Hi,
    Selected value will be taken from the value property of selectOneChoice component, I guess you don't have specified value property. Create a String instance variable in bean and then set the value 'USD' to this variable and then bind it to value property of selectOneChoice component.
    Sample:
    //inside bean
    private String selectedValue;
    //Getter and Setter methods
    //Replace the currencyCode.setValue("USD"); line with the below code
    this.selectedValue = "USD"
    //Finally in jspx page bind this selectedValue to value property of bean
    <af:selectOneChoice value="#{bean.selectedValue}" ... />Sireesha

  • How to select values frm table giving the condition value at runtime in SQL

    Hi All,
    How to select values from a table by giving the condition value at runtime in SQL
    My SQL statement is select * from employee where empno=<empno>, this empno I want to provide at run time. Also I don't have any bind variables defined. Can anyone please tell how can I achieve this. Also do I have to write a SQL or pl/sql statement.

    Hi Roshni Shankar,
    You can use substitution variable in case of SQL.
    SQL> select * from employees where emplployee_id = &emp_id;
    Enter value for emp_id: 100
    old   1: select * from employees where emplployee_id = &emp_id
    new   1: select * from employees where emplployee_id = 100If you want to put condition on varchar values then eighter provide values in single quotes or use single quote for substitution variable.
    SQL> select * from employees where last_name = &emp_name;
    Enter value for emp_name: 'King'
    old   1: select * from employees where last_name = &emp_name
    new   1: select * from employees where last_name = 'King'
    no rows selected
    SQL> select * from employees where last_name = '&e_name';
    Enter value for e_name: King
    old   1: select * from employees where last_name = '&e_name'
    new   1: select * from employees where last_name = 'King'In case of pl/sql you can pass values to procedure and you can use those values at run time.
    create or replace procedure test (p_emp_id number)
    as
       v_last_name      varchar2(100);
    begin
       select last_name
       into    v_last_name
       from  employees
       where employee_id = p_emp_id;
       dbms_output.put_line(p_emp_id ||'    ->    '||v_last_name);
    end;
    show errors
    SQL>exec test(100);
    SQL>exec test(101);Edited by: Gaurav Bhide on Oct 29, 2012 4:07 AM

Maybe you are looking for