How to set filters to a Result view

Hi All,
   How to set filters to a result view in web UI.
Thanks & Regards
Nitish.

Hi Nitish Kumar,
if you want to sort the table fields like ascending , Descending create one event ex: eh_on_sorting.
in that get the event using thtmlb_event. then check whether sorting is necessary or not.
then get the name of column to be sort by using tableview->column_key.
based on that arrange the field ascending or descending using tableview->column_sort_directin.
ascending or descending.
then sort the collection using collection_wrappor->sort( lv_attrname .. etc).
here is the sample code..
data: lv_bo               type ref to if_bol_bo_property_access,
         lv_thtmlb_tableview type ref to cl_thtmlb_table_view,
         lv_attr_name        type name_komp,
         lv_sort_order       type char1,
         lv_stable           type abap_bool value abap_false.
   try.
       lv_thtmlb_tableview ?= iv_htmlb_event_ex.
     catch cx_sy_move_cast_error.
       exit.
   endtry.
   if lv_thtmlb_tableview is bound.
*   check whether its realy a sorting event
     check lv_thtmlb_tableview->event_type = cl_thtmlb_table_view=>co_header_click.
*   get name of column to be sorted
     lv_attr_name  = lv_thtmlb_tableview->column_key.
     check lv_attr_name is not initial.
*   get sorting direction
     case lv_thtmlb_tableview->column_sort_direction.
       when 'U'.
         lv_sort_order = cl_bsp_wd_collection_wrapper=>sort_ascending.
       when 'D'.
         lv_sort_order = cl_bsp_wd_collection_wrapper=>sort_descending.
       when others.
         return.
     endcase.
*   sort
     try.
         me->collection_wrapper->sort( iv_attr_name     = lv_attr_name
                                       iv_sort_order    = lv_sort_order
                                       iv_stable        = lv_stable
*                                  IV_SORT_CALLBACK =
       catch cx_crm_cic_parameter_error.
*     could be a renamed attribute or field which does not belong to the collection
     endtry.
*   in case of single selection restore the selected row index
     if   me->selection_mode = selmode_single
       or me->selection_mode = selmode_lineedit.
       if me->selected_index <> '0'.
         me->selected_index = me->collection_wrapper->get_current_index( ).
       endif.
     endif.
   else.
     exit.
   endif.
Thanks & Regards,
Srinivask

Similar Messages

  • How to set Where clause in the View Object of the MessageChoice ?

    Hi,
    How to set Where clause in the View Object of the
    MessageChoice ?
    Example:
    <bc4j:rootAppModuleDef name="EdEscolaCampusView1AppModule"
    definition="ed00050.Ed00050Module"
    releaseMode="stateful" >
    <bc4j:viewObjectDef name="EdEscolaCampusView1" >
    <bc4j:rowDef name="CreateEdEscolaCampusView1" autoCreate="true" >
    <bc4j:propertyKey name="key" />
    </bc4j:rowDef>
    </bc4j:viewObjectDef>
    <bc4j:viewObjectDef name="ListaTipLocalView1"
    rangeSize="9999">
    </bc4j:viewObjectDef>
    </bc4j:rootAppModuleDef>
    </bc4j:registryDef>
    messageChoice declaration:
    <bc4j:messageChoice name="SeqTipoLocalCampus"
    attrName="SeqTipoLocalCampus"
    prompt="Local do Campus">
    <contents>
    <bc4j:optionList attrName="SeqTipoBasico"
    textAttrName="NomTipoBasico"
    voName="ListaTipLocalView1"/>
    </contents>
    </bc4j:messageChoice>
    I would like set where clause of ViewObject, with dinamic parameters (using attribute1 = :1), before populate messageChoice.
    thanks...
    Danilo

    Hi Andy,
    I try set a where clause using the message:
    Set where Clause parameter using UIX , but my UIX Page have 2 messageChoice's of different ViewObject's, then I need implement this Java Class:
    //Nome da Package da Tela Detail
    package br.com.siadem.siaed.ed00050;
    // Importa as Bibliotecas necessárias
    import oracle.jbo.ViewObject;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.client.Configuration;
    import oracle.cabo.servlet.BajaContext;
    import oracle.cabo.servlet.Page;
    import oracle.cabo.servlet.event.PageEvent;
    import oracle.cabo.servlet.event.EventResult;
    import oracle.cabo.data.jbo.servlet.bind.*;
    import oracle.cabo.ui.data.BoundValue;
    import oracle.cabo.ui.data.DataBoundValue;
    import javax.servlet.http.HttpServletRequest;
    import br.com.siadem.siaed.util.*;
    import javax.servlet.http.Cookie;
    import oracle.cabo.data.jbo.def.NestedAppModuleDef;
    import oracle.cabo.data.jbo.def.ViewObjectDef;
    import oracle.cabo.data.jbo.def.AppModuleDef;
    // Classe que configura os parametros para a execução da Query,
    // utilizando variáveis de Sessao
    public class FunPreQueryLista
    public static EventResult FunConfiguraQuery(BajaContext context, Page page, PageEvent event) throws Throwable
    // TrataDadosSessao - Classe utilizada para retornar os valores das variáveis de sessão genéricas
    // Ex: CodCliente, CodMunicipio etc...
    TrataDadosSessao varDadosSessao = new TrataDadosSessao();
    // 1o. Parametro Configurado - Através da classe TrataDadosSessao, utilizando um método Get
    // <alterar>
    String valor1 = varDadosSessao.getCodCliente();
    String valor2 = varDadosSessao.getCodMunicipio();
    //Cria o objeto que retorna o ApplicationModule
    ApplicationModule am = ServletBindingUtils.getApplicationModule(context);
    // Início das Configurações da Query da Lista
    //Cria o objeto que retorna o view object da lista desejada
    //alterar
    ViewObject TipoLocal = am.findViewObject("ListaTipoLocalView1");
    //Configuração dos parametros definidos na query do view Object
    //alterar
    TipoLocal.setWhereClauseParam(0,valor1);
    TipoLocal.setWhereClauseParam(1,valor2);
    // Executa a Query
    TipoLocal.executeQuery();
    // Fim das Configurações da Query da Lista
    // Início das Configurações da Query da Lista
    //Cria o objeto que retorna o view object da lista desejada
    //alterar
    ViewObject TipoDestLixo = am.findViewObject("ListaDestinoLixoView1");
    //Configuração dos parametros definidos na query do view Object
    //alterar
    TipoDestLixo.setWhereClauseParam(0,valor1);
    TipoDestLixo.setWhereClauseParam(1,valor2);
    // Executa a Query
    TipoDestLixo.executeQuery();
    // Fim das Configurações da Query da Lista
    // Retorna o Resultado para a Página
    return new EventResult(page);
    The code works very well...
    And, I'm sorry for my two repost's in UIX Forum about this in a few time.
    Thank very much...
    Danilo

  • Hi how to set filters in ALE idoc and types of filters

    Using filters how we can validate data?
    what are the mandatory fields to set filters
    pls give me solution
    ravi

    Hi Ravi,
    Filters are not used to validate data, they are used to restrict data.
    It is depend on the message type which fields you can filter.
    Reward points if useful.
    Regards,
    Atish

  • How to set page break for Narrative view???

    Hi All,
    I have created a report in Narrative view using HTML code. I am stuck how to set page break based on a column in Narrative view. If anybody is aware of the issue pls let me know how to overcome this situation. Or if this can be done using HTML code itself pls let me know how to do it.
    Thanks & Regards
    Thenmozhi

    Hi Honey,
    I am not sure on ur requirement but you can achieve page break with a column using pivot view by dragging that column into section area and editing section properties to Insert Page break option.

  • How to set a customized search results template for all users

    Hi.
    I know the customized search results views are stored in a file called pne_portal.hda that resides on every user's subfolder in data/users/profiles/...
    Is there a way to set a customized search results template for all users? If it's impossible, is there a way to modify the Headline view? I'm not able to find the resource or template where this view is.
    Thanks in advance.

    I wasn't able to understand what was meant by this post. Therefore, I modified the standard template HeadLine View.
    Columns for this template are defined in the include slim_search_result_table_header_setup (in std_page.htm).
    Here is the modification of the code:
    <$if customTemplateId and not (baseTemplateId like customTemplateId)$>
              <$columnsString = utGetValue("customlisttemplates/" & strLower(customTemplateId), "columns")$>          
              <!-- Modify START by Oracle-->
         <$else$>
    <!-- here add default fields -->
              <$columnsString="dDocName,dDocTitle,dInDate,dDocAuthor"$>
    <!-- here add your custom fields -->
              <$columnsString=columnsString&",xComment"$>
              <!-- Modify END by Oracle-->
         <$endif$>

  • How to set PAPER SIZE in PRINT VIEW

    I am missing a step here in printing to Tabloid paper size.
    How do I set the paper size in the actual document or on the actual sheet?
    I am in Print View and I am guessing that it is showing the Sheets for my document as printing on 8 1/2 x 11 paper which appears to mean that no matter what I do - once I go to Print (like printing to Tabloid paper size) that this document will print at 8 1/2 x 11 even if it is printing on 11 x 17 paper.
    I understand that I need to move the slider to get the document to fit on the paper but it appears that right now I am doing this simply to get the document to fit on 8 1/2 x 11.
    Is there a setting somewhere that tells Print View what paper size to use? Is this set by Individual Sheet?
    Thanks,
    Jon

    Ah crimeny. This is Inspector > Page?
    I am getting a bit confused as to how to print on various size paper and how to SAVE THESE SETTINGS.
    For EACH SHEET I have to do the following:
    First I pulldown to the Printer and the Page Size in INSPECTOR
    THEN I scale the Sheet Manually to fit this paper in PRINT VIEW
    THEN I run PRINT?
    Now what?
    Is there a way to get this to Print in Color instead of Black and White?
    Can I make some PRESETS somewhere that will let me print to this printer at Tabloid size in Color and then in Black and White and also make some PRESETS that will let me print 8 1/2 x 11 and 12 x 18 so I can just pulldown to these?
    Thanks for any help. I'm not on a deadline but I am losing this battle apparently...

  • How-to set the title of  a View

    Hi,
    I'm a very newbie of Obj-C and InterfaceBuilder.
    From three days I'm fighting with my iPhone app to set the title of a view.
    I've the MainWindow.xib with a UITabBarController; each tabbar's viewcontroller is on a separate xib (i.e.: the GUI of every button of the tabbar is on a different xib file).
    In IB I set up the top bar property to Translucente etc... In Xcode, in the viewDidLoad I set the self.title to something... but the top bar is never shown!!
    I also tried to set self.navigationItem.title... but nothing...
    To see the top bar do I have to use a NavigationController inside every "button" of the tab bar?? Or is the top bar property of IB not working??
    Thanks to all...

    Wenwen,
    View Function dropdown "standard view" is just making the ALV to display the ALV standard configuration (so it will display the ALV the way is designed).
    now if you want to change that to your OWN VIEW you just need to click in the SETTINGS (ALV TOOLBAR at the right end) and then configure your ALV the way you want to be display. After that click SAVE AS and you can name the VIEW to your own and also you can click INITIAL VIEW checkbox in order to display always that for youl.
    Please note that this is a user base personification so this will be only available for you.
    if you want to have your own view for every user then you need to enhanced the ALV in a POST-EXIT method and do not allowed user personification.
    you can disable user personification at the application level in the parameters tab.
    hope this help!
    Jason PV

  • BEx Reporting - How to set Filters ?

    Hi SDN friends,
    Right now am working on BEx reporting and need to do lot of filters for my reporting.......am looking forward for some good step by step material which can help in BEx reporting for setting Filters, Restricted KF and Calculated KF.
    Please if anyone has send it to my email
    [email protected]
    Thanks & Regards
    Shreya

    Hi,
    Also check:
    Good Knowledge in BW Reporting
    https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/a8cd1f71-0a01-0010-4783-f119b6132d25 [original link is broken]
    https://www.sdn.sap.com/irj/sdn/docs?rid=/webcontent/uuid/d5db5d85-0a01-0010-bda5-c5834821a1a5 [original link is broken]
    assign points if useful ***
    Thanks,
    Raj

  • How to set selection in UIPickerView after view has loaded?

    I have a UIPickerView working just fine, and I can set the current selection when a button is clicked, but how can I set the current selection when the view appears?
    I've tried to set the selection in viewDidLoad, viewDidAppear and viewWillAppear to no avail, I've also tried to do it in initWithNibName. Again no joy.
    As far as I can tell, the sequence of events is that my nib gets loaded by the view, my UIPickerViewDelegate interface methods are called to configure the picker, but what message can I pick up after all that has occured to set the selection?

    Hey Paul-
    I use this in one of my apps and it works great. Once the view loads, the picker gets set to the value I want with a nice animation. Let's say you want to set it to row 3.
    - (void)viewWillAppear:(BOOL)animated {
    [myPicker selectRow:3 inComponent:0 animated:YES];
    Of note: If you have the function - (void)viewWillAppear without the :(BOOL)animated part, it won't throw an error on compile, nor will it get called. Yes, I learned that firsthand.
    Hope this is what you are looking for.

  • How can set a customized search results template and all users see it

    Hi all ,,,,
    I Added new costume template search result
    And when I added this template it’s added only for the user how created this template ,And I need all users see and use this template can anyone tell how I can add template for search result and all users see it or if I can do synchronies for this template.

    I wasn't able to understand what was meant by this post. Therefore, I modified the standard template HeadLine View.
    Columns for this template are defined in the include slim_search_result_table_header_setup (in std_page.htm).
    Here is the modification of the code:
    <$if customTemplateId and not (baseTemplateId like customTemplateId)$>
              <$columnsString = utGetValue("customlisttemplates/" & strLower(customTemplateId), "columns")$>          
              <!-- Modify START by Oracle-->
         <$else$>
    <!-- here add default fields -->
              <$columnsString="dDocName,dDocTitle,dInDate,dDocAuthor"$>
    <!-- here add your custom fields -->
              <$columnsString=columnsString&",xComment"$>
              <!-- Modify END by Oracle-->
         <$endif$>

  • How to set a background color to view

    Hi All,
              i creared a view with 2 textboxes and a button.These elements are in TransparentContainer.I set the background color to the TransparentContainer.By setting color to the TransparentContainer it is comming at the center and the 4 sides of it is displaying in the normal background color of the browser
    i didnt find any color options for the view called RootUIElementContainer.the width and height of the view are setted to the browser means 1024*768.
    Just like sap editor which we get by the link https://www.sdn.sap.com i want to get my view .....
    I want to set color to this RootUIElementContainer element which effect the whole view...not the containers or groups which i add under this RootUIElementContainer
    Regards
    Padma N

    hi Padma,
    For changing the background colour you will have to make the change in the theme.
    You can download the theme editor plugin for eclipse from SDN. With this plugin, you can make changes to the default themes , save as a new theme
    Or if you are using portal, then goto system administrator, theme editor, select SAP Streamline and change the color in Screen areas -> application, then save the theme with different name.
    Best regards,
    Sangeeta

  • How to set an adapted project dashboard view as initial for all users?

    Hi all.
    We have the cProjects project dashboard active and have defined (via settings, save as) a custom view with the columns relevant in this particular installation. 
    I can however only save this view with assignment "user" meaning that it only applies to the user logged on when creating it. 
    We are however looking to have a common global customized view that all users should begin with. 
    Compare the R/3 functionality with layout management in reports where you can define whether the layout should be
    user specific or not
    default
    My question is therefore if it should be possible to save global views in the above example and if not how to achieve what we are looking for.
    I assume one option could be to see if one can use BADI DPR_EVE_DASHBOARD but it seems this should be possible to handle within the application given that the field "Assignment" is there when you save the view.  At the moment only with the value "user" available though ...
    Regards / Anders

    Hej Anders
    You can save a default view for all users under administration mode:
    http:<server>:<port>/sap/bc/webdynpro/sap/cprojects?sap-config-mode=X
    BR
    Matthias

  • How to set up help desk to view and reset password for all users?

    Hello,
    I am on OIM 11.1.2.1.0 and would like to assign the helpdesk role to a small group of users.  I created an organization ORG1 and ORG2.  They have the parent organization as "Top".  I have a user USR11 and USR12 that belongs to ORG1 and USR2 that belongs to ORG2.
    I would like USR11 to be able to see all users in ORG1 and ORG2.
    I assign the User Viewer admin role of the Top organization to USR11.  After logging in to OIM as USR1, I could see users USR11 and USR12 (same organization) but couldn't see USR2 (different organization).
    How can I configure OIM so that user USR11 will be able to see all users?
    If I add the User Viewer admin role for both organizations ORG1 and ORG2, then it worked.  But I thought with the admin role of the Top organization, this will allow the user USR11 to be able to see all users.
    Thanks
    Khanh

    Hi,
    You can achieve everyone can see each other by providing User Viewer admin role to each user under each organization present in ur OIM.
    Thats the only way supported in OIM 11g R2. APIs are present for this and you can automate it.
    Regards,
    J

  • How to set preview as default pdf viewer from itunes?

    I recently installed acrobat CS3 on my mac and it has taken over the duty of being the default reader anytime i open a pdf. However i must prefer Preview, just because it is a million times faster when all you want to do is view the file.
    I have managed to disable acrobat dominance over pdfs from safari but i cannot seem to find a way to set it so that my music booklets open in preview again and not acrobat.
    Please help, as i have a big presentation tomorrow about podcasting and i wanted to demonstrate the seemless nature of macs!!!!
    cheers

    See if this thread helps:
    _http://discussions.apple.com/message.jspa?messageID=6830346#6830346_
    Joe

  • [Solved] How to set vim -R as a viewer for mc?

    Hello!
    I am trying to set vim in read only mode as a viewer for Midnight Commander.
    I tried:
    alias mc='VIEWER="vim -R" mc'
    or
    alias vimr='vim -R'
    alias mc='VIEWER=vimr mc'
    and more but without success.
    So far the only successful approach was to:
    - create shell script, e.g. vimr.sh containing "vim -R"
    - create an alias using the script, i.e. alias mc='VIEWER=vimr.sh mc'
    It works, but creating additional file doesn't seem to be optimal solution.
    Is there a way to solve it using one-liner, or at least put all the config into .bashrc?
    Last edited by satori (2014-09-19 19:03:14)

    Thank you for your quick replies.
    @alphaniner:
    alias mc='VIEWER=vim\ -R mc'
    does not work as intended - it launches vim but I am still able to modify viewed file, like -R had no effect
    @WonderWoofy:
    If you mean exporting variable like
    export VIEWER='vim -R'
    it has the same effect as described above. Additionally, it sets the viewer for all applications using that variable, which I would like to avoid.
    Unfortunately this is not what I am looking for.

Maybe you are looking for

  • How to export special characters into an XML file?

    Dear experts, We read files from our customers and save data into our customized table without any character changed, including some address fields. In those address fields, some special characters (not in our code page) are also kept. When we want t

  • Calling a DLL(with vi.lib) from a lvclass within a Packed library

    Basically, I am having problem calling a DLL (which uses the vi.lib) from a packed library. The error code I got is error code 1003. "Error 1003 occurred at Call Library Function Node in XXXXX.lvlibp", "Labview: The VI is not excutable. Most likely t

  • Background image for a Scene in JavaFX2.0

    Hi all, I am new to JavaFX2.0 and need to know how to set a background image for a scene. Thanks in advance.

  • Displaying previous FLV cue point during scrubbing

    I have a single FLV that has 10 different scenes in it. I've been able to make a "credit" list for each scene by adding actionscript cue points in the FLV component, and displaying the info using dynamic text. It all works fine. Now I want the dynami

  • SQL 2008 R2 disable sa login

    I would like to disable the sa login. However, all our SQL sched tasks have sa as job owner. Additionally, sa is the dbo for system databases. Will there be any problems with the system databases and jobs if sa is disabled? Or is another sql login wi