Set filter value for a web template with java

hi experts,
i need to set a variable dynamicaly  depending on the Logon Name. Ok first step i did, i made a small script for the Username:
_var url = this.location.href;
_var x = url.substring(url.length-6, url.length);
_var lifnr = ("0000" + x);
_alert (LIFNR);
ok if the username i.e B200221 my variable LIFNR gets a valid value  in this case 0000200221. but how can i use this variable in the bi commands ?
here my xhtml coding from my webtemplate, where i want to use my variable LIFNR as template parameter:
_var url = this.location.href;
_var x = url.substring(url.length-6, url.length);
_var lifnr = ("0000" + x);
_alert (LIFNR);
    QUERY_VIEW_DATA_PROVIDER name="DP_1"
                INITIAL_STATE type="CHOICE" value="QUERY"
                QUERY value="VSAG_MM_VMI_KONS_US" text="VSAG_MM_VMI_KONS_US" /
                INITIAL_STATE
            QUERY_VIEW_DATA_PROVIDER
            TEMPLATE_PARAMETERS name="TEMPLATE_PARAMETERS"
                WEB_TEMPLATE_ACTIONS type="COMPOSITE"
                    ACTION_BEFORE_FIRST_RENDERING type="COMPOSITE" /
                    ACTION_BEFORE_RENDERING type="COMPOSITE"
                        INSTRUCTION
                            SET_SELECTION_STATE_SIMPLE
                                TARGET_DATA_PROVIDER_REF_LIST type="ORDEREDLIST"
                                    TARGET_DATA_PROVIDER_REF index="1" value="DP_1" /
                                TARGET_DATA_PROVIDER_REF_LIST
                               CHARACTERISTIC value="0VENDOR" text="Lieferant" /
                                RANGE_SELECTION_OPERATOR type="CHOICE" value="EQUAL_SELECTION"
                                    EQUAL_SELECTION type="CHOICE" value="MEMBER_NAME"
                                    MEMBER_NAME value="0000200221" text="0000200221" /
                                    EQUAL_SELECTION
                                RANGE_SELECTION_OPERATOR
                            SET_SELECTION_STATE_SIMPLE
                        INSTRUCTION
                    ACTION_BEFORE_RENDERING
                WEB_TEMPLATE_ACTIONS
            TEMPLATE_PARAMETERS
how can i use my variable LIFNR  at this point :  MEMBER_NAME value="0000200221"    ?
thanks for any idea's.
Tony

hi experts
does no one have an idea, how i can use my own java variable at   BI Filter  command's in the XHTML Code ?
thx
tony

Similar Messages

  • Show Multiple Filter Values in a Web Template

    Hello
    I have a Web Template based on a query. On this Web Template I can set multiple single filter values for one characteristic.
    Now I want to show these filtered values for this characteristic on the web item. This is possible for ONE filter value when you use the XML path (f.e. DATA_PROVIDER:DP1?/BICS_VIEW/SELECTION_STATE/SELECTION/CHARACTERISTICS/CHARACTERISTIC[@name='CHARNAME']/SELECTIONS/SELECTION[1]/MEMBER/@text)
    Is there a possibility to show MULTIPLE filter values for one characteristics in a text or input field? I don't want to use a drop down box or the info field.
    Kind Regards,
    Andreas

    HI,
    the best ay to do is create a query with same variable parameters as of the main query and place filter Characters on rows.
    Use this query in one analysis item and use it on top row of the template as Filters information.This will give better look and feel as well solve your requirement

  • BEx WAD - How to pass filter values to another Web template

    Hi,
    I have a scenario here...
    Web Template 1:
    - Filter options, Filter on Characteristics
    - Button, this button calls Template 2 sending the parameters selected vía URL to filter the report.
    Web Template 2:
    - Tables and graphs
    Values selected in the Filter of Template 1 and using javascript it should generates a URL, which filters the second template i.e. Web Template 2.
    Can anyone please share javascript to achieve this...
    -Anil

    Hi Anil,
    I tried this and could not get it to work.  so if you find away through Java script then I would be very interested.
    There is an option called TRANSFER_STATE which supposedly lets you pass variable names in  this scenario but I could not get it to work.
    In the end I created one template with all graphs etc.  When you click the button to show the other template all tables and graphs in template 2 are shown and everything from web template 1 is hidden.  This worked fine.
    Cheers,
    Nick.

  • Set multiple values in a web template via JavaScript

    Hi,
    I have a web template displaying a query containing a mandatory variable. Multiple values are allowed for the variable.
    By manually inserting a link in the template I succeeded in setting a single value for the variable with JavaScript, but how is it possible to pass multiple values for that variable?
    So far my link target looks like this:
    "sap/bw/BEx?sap-language=EN&bsplanguage=EN&CMD=LDOC&
    TEMPLATE_ID=ZJS_WT_1&VAR_NAME_1=ZJS_V_R&VAR_VALUE_EXT_1=1"
    How do I have to modify the line?
    Cheers,
    Jost

    Jost -
    I haven't tried this yet...but I suspect it could work. In the below example, I have a variable on Company Code and am setting it equal to 3 different values. Give it a shot.
    &CMD=PROCESS_VARIABLES&SUBCMD=VAR_SUBMIT
    &VAR_ID_1=ZCCMPCOD0001
    &VAR_ID_2=ZCCMPCOD0001
    &VAR_ID_3=ZCCMPCOD0001
    &VAR_OPERATOR_1=EQ
    &VAR_VALUE_LOW_EXT_1=IP01
    &VAR_VALUE_HIGH_EXT_1=
    &VAR_SIGN_1=I
    &VAR_OPERATOR_2=EQ
    &VAR_VALUE_LOW_EXT_2=IP05
    &VAR_VALUE_HIGH_EXT_2=
    &VAR_SIGN_2=I
    &VAR_OPERATOR_3=EQ
    &VAR_VALUE_LOW_EXT_3=IP50
    &VAR_VALUE_HIGH_EXT_3=
    &VAR_SIGN_3=I

  • Setting default value for form field assoc with a table column

    On a "Create Record" situation I was trying to set the default values of some form fields using a page level "Process". These form fields have Source Type = Database Column. It wasn't working, I could only set non-db assoc form field values no matter when the "Process" was set to exec. From some other posts it seems that this is by design, ie. not being able to programatically set the initial values of form fields that are sourced to db columns. I was hoping to have just one "Process" that would exec to set these initial values in one place rather than scattered about for each field that needed a default value. These particular default values come from ref tables and may be different for each user.
    So, it looks like I have to use a "Default Value" plsql chunk for each field on the form itself or else set their value on the calling form's Redirect in the "Set these Items" area.
    Is this correct?

    You could define a database function which accepts the name of the item and the user ID of the user running the application. Based on the item name and the user ID have the function return the appropriate initial value. Invoke this function in a "Default Value" PL/SQL block.
    Does that help in centralizing your initial values? You could have one function per page or one function per application. I would do one function per application.

  • How to set specific URL for broadcasting web templates from WAD

    Hi experts,
    I have created a sample web template in WAD by using SAP BI standerd  query.When I am executing the web template,it is redirecting me to some unintended web portal.I know the correct portal URL.Can anybody tell me where the redirecting portal URL settings are maintained in BI/BEx/WAD??
    Regards,
    Mandar.

    Hi Suman,
    Thanks a lot for your valuable reply.
    By the navigation you mentioned,I was able to identify where exactly I have to change the URL prefix.However,when I am saving the changes I made to URL prefix,system is redirecting me to "Varient Attributes" screen.I don't know what exactly this screen is about.Please help..
    Regards,
    Mandar.

  • Using commands for the web template in WAD

    Hi Experts,
            I have designed a web template for a scenario. As it contains lots of data, I have to give some filters such as drop-down etc to avoid the scrolling. In this case, while executing first time, the drop-down select the 'Show All Values' option.
           So , i try to use some commands, so that I can select the default values.
    PROCEDURE USED TO SELECT THE DEFAULT VALUES :
    -> In the drop-down, I used the command called " Set Filter Value for a characteristic[SET_SELECTION_STATE_SIMPLE].
    ->In the selection type, I choose the member name option so that I can able to select the values that are present in the characteristic.
          But while executing the template, the filter is taking the different value(single value only) irrespective to the given value in the command.
            So pls give me the solution for the problem. Also Give me a reply if there is any other possibility to restrict the data.
    With Regards,
    Yokesh Kumar.

    hi all,
    sorry to update you so late, because I can't log on SDN from time to time.
    the weird thing is that my peer can upload the picture successfully while I still can't see it in the list.
    I am handful, I'll do a research and update you guys later.
    thanks.
    Jennifer

  • ALV Grid default values for new rows added with Add/Insert buttons

    Hi!
    Help, please,  to find a way how to set default values for new rows added with Add/Insert buttons in
    ALV Grid.

    I have found salution:
    ALV Grid u2013 Insert row function
    Sometimes we need to assign some default values when we create a new row in a grid using standard ALV Append row button. In our scenario we will see how to assign default values to Airline Code (CARRID), Flight Connection Number (CONNID) and Flight date (FLDATE) when a new row is created. To do that we need to handle DATA_CHANGED event in the program like mentioned below.
    Definition of a class:
    Code:
          CLASS lcl_event_receiver DEFINITION
    CLASS LCL_EVENT_RECEIVER DEFINITION.
      PUBLIC SECTION.
    METHODS:
         handle_data_changed
         FOR EVENT data_changed OF cl_gui_alv_grid
         IMPORTING er_data_changed
                           e_ucomm.
    ENDCLASS.                    "lcl_event_receiver DEFINITION
    Implementation of a class:
    Code:
    CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.
      METHOD HANDLE_DATA_CHANGED.
        DATA: dl_ins_row TYPE lvc_s_moce.   " Insert Row
          FIELD-SYMBOLS: <fs> TYPE table.    " Output table
    Loop at the inserted rows table and assign default values
        LOOP AT er_data_changed->mt_inserted_rows INTO dl_ins_row.
          ASSIGN er_data_changed->mp_mod_rows->* TO <fs>.
          loop at <fs> into ls_outtab.
            ls_outtab-carrid  = 'LH'.
            ls_outtab-connid  = '400'.
            ls_outtab-fldate  = sy-datum.
            MODIFY <fs> FROM ls_outtab INDEX sy-tabix.
          endloop.
        endloop.
      ENDMETHOD.                    "handle_data_changed
    ENDCLASS.                    "lcl_event_receiver IMPLEMENTATION
    Register the events to trigger DATA_CHANGED event when a new row is created.
    Code:
        CALL METHOD OBJ_GRID->REGISTER_EDIT_EVENT
          EXPORTING
            I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_ENTER.
        CALL METHOD OBJ_GRID->REGISTER_EDIT_EVENT
          EXPORTING
            I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED.

  • Filter Web Template with URL Cmd: doesn't work with compound infoobject ?

    Hello all,
    I've to filter the query contained on a web template with URL command, but it doesn't work.
    The web template contains only one query, and on the free chars I have 0PLANT.
    I call the web template adding to the normal url the following command:
    &FILTER_IOBJNM=0PLANT&FILTER_VALUE=33
    where 33 is the code of the plant I want to filter.
    The command is executed, I think, because the  result is "NO APPLICABLE DATA FOUND". The fact is that when I execute this query on the Bex filtering 0PLANT by value 33 the data exists.
    May be because 0PLANT on our system is in compound with 0SOURSYSTEM ? In this case, what's the value I can use as filter ?
    Thank's in advance,
    Max

    Hi,
    please see http://help.sap.com/saphelp_nw04/helpdata/en/59/edfe395dd76846e10000000a114084/frameset.htm
    especially:
    If the variant with ending 'EXT' is selected, the fully compounded value has to be entered in the external format, for example, 24.12.2000.
    If the ending 'EXT' is not used, the fully compounded value has to be entered in the internal format, for example, 20001224 for 24.12.2000.
    and
    In the internal display (see table below) you can easily determine the name of the characteristic and the filter value using the URL parameter &snippet_operations=%20 (see also Object Tag for the Properties of Web Templates). Call the Web application with this URL parameter. If you filter using the context menu, the parameters FILTER_IOBJNM and FILTER_VALUE are automatically added to the URL in the Web browser. You can then use the desired values with Command URLs in hyperlinks.
    Heike

  • How to Set default value for taxonomywebtagging control with terms and nested terms

    Hi,
    I have created taxonomy control in custom aspx page and I am able to select terms but I am trying to setup default value to that control.
    Can anybody let me know how to set the default value for TaxonomyWebTagging control in custom.aspx page with nested terms?
    Any help would be greatly apprecited.
    Control code in aspx page:
    <td>
    <asp:Label runat="server" ID="lblLanguages">Field A: </asp:Label><asp:Label runat="server" ID="rfvlblLanguages" CssClass="errorMsg" ForeColor="Red">*</asp:Label>
    </td>
    <td>
    <Taxonomy:TaxonomyWebTaggingControl ID="term" Width="385px" runat="server" /></td>Mapping metedata code:TaxonomySession session = new TaxonomySession(SPContext.Current.Site);
    //Set the Business Unit Field
    SPSite site = SPContext.Current.Web.Site;
    TermStore termStore = session.TermStores["Managed Metadata Service"];
    Group group = termStore.Groups["GROUPName"];
    TermSet termSet = group.TermSets["TERMSETNAME"];
    Term term = termSet.Terms["TermA"];
    Guid termGuid = term.Id;
    term.SspId.Add(termStore.Id);
    term.TermSetId.Add(termSet.Id);
    term.AllowFillIn = true;
    term.AnchorId = countryGuid;
    term.IsMulti = true;
    Thank you.
    AA.

    Hi,
    According to your description, you want to set default value for TaxonomyWebTaggingControl.
    I have a test in my environment. It could be achieved by setting the Text Property of TaxonomyWebTaggingControl.
    Here is the code snippet:
    TaxonomySession session = new TaxonomySession(SPContext.Current.Site);
    SPSite site = SPContext.Current.Web.Site;
    TermStore termStore = session.TermStores["Managed Metadata Service"];
    Group group = termStore.Groups["GroupA"];
    TermSet termSet = group.TermSets["A"];
    Term term = termSet.Terms["A1"];
    TaxonomyWebTaggingControl1.SspId.Add(termStore.Id);
    TaxonomyWebTaggingControl1.SSPList = termStore.Id.ToString();
    TaxonomyWebTaggingControl1.TermSetId.Add(termSet.Id);
    TaxonomyWebTaggingControl1.TermSetList = termSet.Id.ToString();
    TaxonomyWebTaggingControl1.AllowFillIn = true;
    TaxonomyWebTaggingControl1.IsAddTerms = true;
    TaxonomyWebTaggingControl1.IsMulti = false;
    TaxonomyWebTaggingControl1.Text = string.Format("{0}|{1}", term.Name, term.Id.ToString());
    Here is a detailed article for your reference:
    http://blog.bugrapostaci.com/2010/09/23/taxonomywebtaggingcontrol-sharepoint/
    Feel free to Reply the test result.
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Patrick Liang
    TechNet Community Support

  • Mapping input values for a web service connection to a range of cells

    I've created a web service connection in Xcelsius data manager. My web service requires an array of integer as input parameter. How do I map input values for a web service connection to read from a range of cells in the spreadsheet, e.g. $A$2:$A$20, in similar way of mapping output values to write to a range of cells in the spreadsheet?
    For output values of the web service, I can specify to map the output values to write to a range of cells. However, it doesn't seem to work for reading the input values.
    I can map input values for each node to a single cell, e.g. $A$2, in the spreadsheet. However, when I set the "Read From" field to a range of cells, e.g. $A$2:$A$20, it only reads in the first value in the range.
    Is there any way that we can do this mapping for input values as we do for output values?
    Your assistance is very much appreciated.
    Regards,
    Van

    Van,
    There is a workaround for that...
    Example:
    My Webservice accepts input data range in a specific format with " :" symbol, i.e. 072008:082008
    Now what i do is
    A1 = 072008
    A2 = 082008
    A3 = CONCATENATE(A1,":",A2)
    so A3 = 072008:082008
    Now i map the input value in web service to cell A3
    P.S have 2 input box components and map it to cells A1 and A2, i.e you are giving users an  option to enter the range of values...then web service will capture the range and refreshes data with the range of values user entered.
    hope this helps..
    -Anil

  • Web Templates with Tabs

    Hi, We have quite a few reports we have developed for users that have around 5 or 6 tabs.  When we adding or remove any functionality we have to maintain each of these reports.   Does anyone else have/had this issue and what is a good strategy to move away from Web Templates with tabs?
    Thanks!

    to my knowldge, we don't have any option... we need to maintain every time.
    I can think how complex it is...if you have 5 or 6 tabs... it 's very complex. Going forward... for small change.. like adding new tab etc... you need to be very careful.
    On every call... try to reset to initial every time you call a tab... then try to pass values as per the requirement. ex: Title, Filters, settings, table etc.
    Initial view we will disble every thing... we will one by one... with multiple commands...
    Nagesh Ganisetti.

  • Set a value for a variable of type exit

    Hello,
    I am filling some variables with multiple values in user exit.
    Now, i would like to place some of these characteritics in Header area. It's of course impossible because there is multiple values but ...
    I will put dropdown box in the web application for these chars. The problem is that by default, any value is assigned to the dropdwom ( any variable value is set).
    Do you know how i can set a value for theses variable after filling all values by the user exit. SO that only one value is selected for the header and all others values available in the dropdown ?
    Regards,
    Jarod

    Hi,
    Off late, this seems to be a usual requirement.
    Just create a Z program to call the FM API_SEMBPS_VARIABLE_SET and then call the FM API_SEMBPS_POST.
    you should be preparing the content/set value to pass to the FMs. check the whereused list to see how this FMs can be used/called.
    finally, run this program for your variable, after the loading/filling the exit variable. Please note that to set 'exit' variables, the sourcing variable's content need to be read/set first before setting the exit varible.
    HTH,
    Regards,
    Nataraj.

  • POSDM - filter value for category code determination

    Hi Guru's
    Pl advice on significance of setting the filter value for Category Code Determination in POSDM config under /posdw/img -> general settings.
    If my inbound tlog contains all the relevant POS transaction type codes , which have been defined in config then probably :
    - I do not need to give any filter value for Category Code Determination
    - I do not need to maintain any definition and assignment entries under posdw/img -> Integration with Other SAP Components -> SAP POS -> Definition of Values for Category Code Criteria AND Assignment of Category Code Criteria to PIPE Category Codes
    Please advice.....
    thanks!!

    Hi,
    Select new entries and give 2 digit numeric value in sequence in tax field. it is taking only numeric values.
    It might be helps to u.
    Regards
    Sasikanth.Ch

  • Filter Value for BADI

    Hi,
    Kindly Let me know the Filter Defined for Implementaing
    BADI.
    Hoping for your Response...!!!

    Hi,
    BADI may be implemented depending on a specific filter value( example COUNTRY-SPECIFIC VERSIONS: distinct implementations of the BADI can be created for the COUNTRY).
    a filter type must be entered when defining your enhancement ( a country or industry, for example).
    all methods created in the enhancement's interface have filter value 'FLT_VAL' as their import parameter.
    the method then selects the active implemetation based on the data provided in the filter value.
    for seting the filter value, you must enable the option FILTER DEPEND and provide FILTER TYPE in the ATTRIBUTES of the BADI defination.
    SE18 is the transaction code for creating BADI.
    Filter dependence for BADI definitions means that each interface method automatically has an importing parameter FLT_VAL assigned ot it. This parameter must be filled with a filter value as current parameter when it is called.
    A BADI definition should be marked as filter-dependent whenever the characteristic of the BADI implementation should match the characteristics of the filter type - that is, whenever the implementation of different filter values should be different or should only exist at all for certain filter values.
    Typical filter types are line of industry or country.
    The BADI is filter dependent. In the first tab of your BADI implementation (SE19), the lower half will contain filter details.
    STEPS FOR SETTING UP A FILTER
    just go to se18 and give ur BADI name..
    then Select 'Attributes' Tab ,there u will find option Filter-Dependent in window named "type"..
    check tht filter dependent checkbox and give ur data element/field in the Filter type field say u can give 'MOLGA' ..save and come back..
    now go to se19 and implement this BADi and there u can give filter values for filed MOLGA..
    Reward Points if found helpfull..
    Cheers,
    Chandra Sekhar.

Maybe you are looking for