Select Options in multiple views

I am running into a problem.  I have an application with 2 views.  I use select-options in both views, but with different fields.  When I move from view 1 to view 2, it works correctly, displaying the select-options for view 2.  When I return to view 1 however, the container still shows the select-options for view 2.  Any help would be greatly appreciated.

Alex, please explain what you mean by 'clear the nodes'.  All the setup for the select-options is currently done in the WDDOINIT in both views.
Sarath, could you please explain what you mean by 'changing the lifetime'.  I've never heard this term.  Where would this be done.
I copied the select-options code I had in my WDDOINIT into my HANDLEIN screen, and it dumps on the first 'ADD_SELECTION_FIELD' method call.  If I add a
   l_ref_comp_usage_so->delete_component( ).
before my
    l_ref_comp_usage_so->create_component( ).
the selection screen comes up blank.

Similar Messages

  • Attributes select-options in form view.

    How to make UI form view context attributes multiple selection ?
    Ex: Employee Id attributes. I need provide this employee id like select-options in form view.
    Thanks,
    kaaviya

    Hi,
    this is an interesting requirement.
    please correct me if my understanding is wrong, do you mean that you want to enable a function like:
    employee ID = 3271 or 3270
    if we take this field in employee IC employee identification for example, you'd like to enable customer to enter more than one ID to start the search without using wildcard (as sometimes wildcard does not help)
    if this is your requirement, maybe try to check the following?
    here is an example for account ID search
    I enter Account ID = 3271;3270 and start search
    in
    CL_ICCMP_BP_BUPASEARCHB2B_IMPL
    FIRE_QUERY
    it will
    er_bo_col  ?= iv_query_service->get_query_result( ).
    how about use a loop to make two query?
    In the above example,
    IV_QUERY_SERVICE->PARAM_STRUCT_REF->PARTNER = 3271;3270
    maybe try to split the string with ; and start the query until the end of this string.
    and then combine the two collection?
    Hongyan

  • How to read data from select Options in another view without using context

    I have 2 views, one for selection screen and another for displaying result.
    In selection screen view I have define a select options with the help of webdynpro component.
    Now my object is display result in result view based on entry of selection screen.
    I don't want to do binding in context node, without that how I can read data of select option
    in result view?
    Regards,
    Rasmi Ranjan Mishra

    Solve by own.
    If I define the Select options in component controller, then it will be global in nature. so i can get the value of select options
    in another view also.
    Regards,
    Rasmi Ranjan Mishra

  • Requirement to maintain select-options for multiple fileds in webdynpro aba

    Hello Gurus,
    We have a requirement to maintain select-options for multiple fileds in webdynpro abap.
    now we are able to create select-options for a single field using wdr_select_options componet usage.
    how can we achive this select-options feature for multiple fields.
    Could anyone please suggest solutions?
    and if possible send me the sample code for this requirement.
    Thanks in Advance for your replies.
    Regards,
    Shyam

    Hi,
    Nothing different for more fields, same. some declaration changes.
    For example code i am using.. in WDDOINIT method.
    TYPES:
        fiscal_year TYPE RANGE OF GJAHR,
        S_KUNNR TYPE RANGE OF J_3RS_KUNNR,
        S_VKORG TYPE RANGE OF VKORG_RAN,
        status type PVWTY-RETPA,
        ty_r_date TYPE RANGE OF s_date,
        ty_s_date TYPE LINE OF ty_r_date.
    DATA lo_interfacecontroller TYPE REF TO iwci_wdr_select_options .
      DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
    lo_cmp_usage =   wd_this->wd_cpuse_cmp_sel_opt( ).
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
      lo_cmp_usage->create_component( ).
    ENDIF.
    * Reference variable used instantiate the select-options component
      DATA
        lr_cmp_usage TYPE REF TO if_wd_component_usage.
    * Variables used to create the select-options fields and
    * define its initial values
      DATA:
        lr_field TYPE REF TO data,
        ls_date  TYPE ty_s_date.
      FIELD-SYMBOLS:
        <fs_field> TYPE ANY,
        <fs_range> TYPE INDEX TABLE.
    * Instantiate the select-options component
      lr_cmp_usage = wd_this->wd_cpuse_cmp_sel_opt( ).
      IF lr_cmp_usage->has_active_component( ) IS INITIAL.
        lr_cmp_usage->create_component( ).
      ENDIF.
      lo_interfacecontroller =   wd_this->wd_cpifc_cmp_sel_opt( ).
    wd_this->m_sel_opt = lo_interfacecontroller->init_selection_screen( ).
    data : vhelp type wdy_md_value_help_mode_enum .
    * Sets the helper reference
      wd_this->m_sel_opt1 = wd_this->wd_cpifc_cmp_sel_opt( ).
      wd_this->m_helper  = wd_this->m_sel_opt1->init_selection_screen( ).
    * Hide the standard select-options components.
      wd_this->m_helper->set_global_options(
        i_display_btn_cancel = abap_false
        i_display_btn_check  = abap_false
        i_display_btn_reset  = abap_false
        i_display_btn_execute  = abap_false
      lr_field = wd_this->m_helper->create_range_table( `KUNNR` ).
      wd_this->m_helper->add_selection_field(
        i_id           = `KUNNR`
        I_DESCRIPTION  = 'Customer Code'
    *    i_within_block = `BL01`
        it_result      = lr_field ).
      FREE lr_field.
      lr_field = wd_this->m_helper->create_range_table( `VKORG` ).
      wd_this->m_helper->add_selection_field(
        i_id           = `VKORG`
        I_DESCRIPTION  = 'Sales Organization'
    *    i_within_block = `BL01`
        it_result      = lr_field ).
      FREE lr_field.
    Go through this..
    http://wiki.sdn.sap.com/wiki/display/Snippets/WebDynproABAP-Complexselect-optionscomponent+usages
    Cheers,
    Kris.

  • Select options for multiple entries

    hi,
    in selection screen i have 2 select-options as below
    SELECT-OPTIONS: s_belnr  FOR bkpf-belnr ,
                                  s_bukrs  FOR bkpf-bukrs.
    the problem is if BELNR or BUKRS are not given the error message should be displayed as enter the required fields.
    if i keep the OBLIGATORY i will get the message but if i keep OBLIGATORY first they need to enter one belnr  or bukrs  in selection screen then it allows for multiple option but the bussiness want to directly goto multiple option and upload data.
    please help

    Note Replace P with % Sign in IF Condition it not allow me to Put % there
    TABLES: bkpf.
    SELECT-OPTIONS: s_belnr FOR bkpf-belnr,
                    s_bukrs FOR bkpf-bukrs.
    AT SELECTION-SCREEN.
      IF s_belnr[] IS INITIAL AND s_bukrs[] IS INITIAL AND sy-ucomm NE 'P000' AND sy-ucomm NE 'P001'.
        IF s_belnr[] IS INITIAL OR s_bukrs IS INITIAL.
          MESSAGE: 'Please Enter Value in Bothe Fields' TYPE 'E'.
        ENDIF.
      ENDIF.

  • "Select Options" in WD view

    Hi to all,
    I have a WD View with some fields that I use as parameters in a BAPI and it works fine. Now I prefer to use thouse fields like "ABAP select options" and so "more than", "less than", "not equal to" and so on. How is it possible in a WD application?
    Thank you very much,
    Antonio

    Hi Antonio,
    please have a look at this Select Options. The example given is from flight list tutorial but should work in similar kind for your scenario.
    Hope that helps.
    Regards
    Stefan

  • Restricting Select Options to Multiple Single Entries

    Hi All,
           I have a requirement where we have two select options. I need to restrict only One of the select options to only accept multiple single entries. I have tried using the  'SELECT_OPTIONS_RESTRICT'  Function module. But it provided little help to me.
    Please check the below code.
    gv_w_opt_list-name = 'A'.
      gv_w_opt_list-options-eq = 'X'.
      APPEND gv_w_opt_list TO gv_w_res-opt_list_tab.
      gv_w_***-kind = 'A'. 
      gv_w_***-name = 'YTRADE_DESC'.
      gv_w_***-sg_main = '*'.
      gv_w_***-sg_addy = 'N'.
      gv_w_***-op_main = 'A'. 
      APPEND gv_w_*** TO gv_w_res-***_tab.
    It allows to restrict intervals for select-options in selection screen
        CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
          EXPORTING
            program                = sy-repid
            restriction            = gv_w_res
          EXCEPTIONS
            too_late               = 1
            repeated               = 2
            selopt_without_options = 3
            selopt_without_signs   = 4
            invalid_sign           = 5
            empty_option_list      = 6
            invalid_kind           = 7
            repeated_kind_a        = 8
            OTHERS                 = 9.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    Please help me if you have any information related to this requirement. Relevant anwers will be surely rewarded.
    Regards
    Nagaraj

    I have a code sample I use in a report. Result is only EQ and no intervals and no excludes
    LOAD-OF-PROGRAM.
        Subscreen: Select Options for delivery                                    *
      SELECTION-SCREEN BEGIN OF SCREEN 1100 AS SUBSCREEN
                                          NO INTERVALS.
      SELECT-OPTIONS:
      so_dlvno FOR /scwm/s_aspq_tu-docno
                                     MODIF ID dlv .
      SELECTION-SCREEN END OF SCREEN 1100.
        Subscreen: Select Options Restrictions                                  *
    Include type pool SSCR
      TYPE-POOLS sscr.
    Define the object to be passed to the RESTRICTION parameter
      DATA restrict TYPE sscr_restrict.
    Auxiliary objects for filling RESTRICT
      DATA t_opt_list TYPE sscr_opt_list.
      DATA ***      TYPE sscr_***.
      CLEAR ***.
      ***-kind    = 'S'.        "Apply only to the named SELECT-OPTION
      ***-name    = 'SO_DLVNO'.  "This is name of the SELECT-OPTION
      ***-sg_main = 'I'.        "I = ONLY Inclusions; * = Both
      ***-op_main = 'NOINTERVALS'. "This must match opt_list-name
      APPEND *** TO restrict-***_tab.
    Create t_opt_list entry to specify capabilities of S_BUKRS.
      CLEAR t_opt_list.
      t_opt_list-name       = 'NOINTERVALS'."This must match ***_tab-op_main
      t_opt_list-options-bt = space.     "Do not permit BETWEEN
      t_opt_list-options-cp = space.     "Do not permit MATCHES-PATTERN
      t_opt_list-options-eq = 'X'.       "       Permit EQUALS
      t_opt_list-options-ge = space.     "Do not permit GREATER-OR-EQUAL
      t_opt_list-options-gt = space.     "Do not permit GREATER-THAN
      t_opt_list-options-le = space.     "Do not permit LESS-OR-EQUAL
      t_opt_list-options-lt = space.     "Do not permit LESS-THAN
      t_opt_list-options-nb = space.     "Do not permit NOT-BETWEEN
      t_opt_list-options-ne = space.     "Do not permit NOT-EQUAL
      t_opt_list-options-np = space.     "Do not permit NO-PATTERN-MATCH
      APPEND t_opt_list TO restrict-opt_list_tab.
    Call function module
      CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
        EXPORTING
          restriction                = restrict
        EXCEPTIONS
          too_late                   = 1
          repeated                   = 2
          not_during_submit          = 3
          db_call_after_report_call  = 4
          selopt_without_options     = 5
          selopt_without_signs       = 6
          invalid_sign               = 7
          report_call_after_db_error = 8
          empty_option_list          = 9
          invalid_kind               = 10
          repeated_kind_a            = 11
          OTHERS                     = 12.
    Exception handling
      IF sy-subrc NE 0.
      ENDIF.
    Edited by: Suhel Awad on Feb 1, 2011 3:06 PM

  • Get Selection options from one view to another view

    Hi Experts,
    I am using two views, first view  it shows basic list of records based on selection options criteria , here I used component WDR_SELECT_OPTIONS . Then if we click on any record in first view then it opens popup window with record relevant information. Here I want to get selection option values while editing record values.
    Initially I used context node for one value, for that just I created node and attribute then bind to table then I used with method get_static_attributes_table(  ) in second view.
    But I need all values to be used in second view.
    Please could you suggest, is there another way to get values into second view?
    Regards,
    BBC

    Hello BBC,
    you can access the SELECT_OPTION component usage in second view and then you retrieve the selection fields and its corresponding range table. In this case the component usage instance will be shared across the application unless you explictly delete the component usage.
    BR, Saravanan

  • Single select option in table view as radio button without design

    Hi,
    When I use the Content design = "Design2002" or design = "Design2003" then I get a checkbox in table view by giving the single select option. But when I do not use any design for the Content then I get a radio button in the table view.
    How do I get a radio button in the table view with Content Design = "Design2002" or design = "Design2003"?
    Message was edited by: Brian McKellar
    Assume you are asking about design=2002 versus 2003? Updated question.

    Hallo Sachin,
    Later this afternoon I will check your question with a colleague for an answer. We are all offsite today.
    Until then, it would be good if you review your questions Tableview radio button event..
    ++bcm

  • Seprating select options in two view containers.

    Hi Gurus,
    I have 4 fields which are select option based.
    I want 2 fields in one view_container_ui element.
    Other 2 fields in other view_container_ui element.
    Presenlty  when i am creating 4 select option fields by coding it is appearing in one view_container_uielement.
    Does neone have any idea about this..?
    Best Regards,
    Navin Fernandes.

    Hi lekha,
    My lead selection issue is solved... I changed the cardinality and selection.
    Also the singleton property had to be unchecked as i came to know from SAP document.
    Checkbox issue is also solved since the default value was not set to the right variable.
    Thanks very much..
    Hi Anurag..
    Thanks for the help.
    Best Regards,
    navin fernandes.

  • Select option "Show this View : in Folder of Content type : {Custom Content Type Name}" while creating view using CSOM

    Hi,
    I am trying to create "View" in a Document Library and need to enable following:
    1. Mark as default View
    2. Folders -> Show this view : in Folders of Content Type : {Custom Content Type name}
    I am using following code which sets "in Folders of Content Type : " to "Folder" rather than selecting custom content type despite passing Content Type ID of custom content type.
    code:
    var itemContentTypes = clientContext.LoadQuery(web.AvailableContentTypes.Where(ct => ct.Name == viewContentType));
    clientContext.ExecuteQuery();
    var itemContentType = itemContentTypes.FirstOrDefault();
    view.ContentTypeId = itemContentType.Id;
    view.DefaultViewForContentType = true;
    view.Update();
    clientContext.ExecuteQuery();
    Please highlight what seems to be missing?
    Thanks
    Sonal

    Hi,
    Before you set the content type ID for the view, you need to add the custom content type to the library firstly.
    You can add the content type to library using OOTB feature “Add from existing site content types” in library settings or using Client Object Model.
    Here is a code snippet for your reference:
    var list = context.Web.Lists.GetByTitle(listTitle);
    list.ContentTypesEnabled = true;
    var contentType = context.Site.RootWeb.ContentTypes.GetById("0x0120");
    list.ContentTypes.AddExistingContentType(contentType);
    context.ExecuteQuery();
    More information about add exist content type using Client Object Model:<o:p></o:p>
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.contenttypecollection.addexistingcontenttype%28v=office.15%29.aspx
    Best regards,
    ZhengyuGuo
    Zhengyu Guo
    TechNet Community Support

  • Table View MULTI SELECT option and Event handling problems

    Hello All,
    I am facing problem while giving miltselect option in a table view. When i mention multiselect attribute in Select option in table view, i am unable to select all the rows which i want to select,because i have an event onRowSelection event activated so when i select a row then it will automatically go to the event and i am unable to do multiple select.
    Can you guys pl tell me is there any way thtat i can put check boxes in a table column and by that i can get values of row seelct and can perform my subsequent SQL operation.
    Also i am not able to navigate in table view through BYPAGE or BYLINE option. When I click on navigate button then page got refreshed and i lost data.
    One more query guys , can you pl tell me how can i store my internal table values from one event for the another event. I have used EXport/Import but internal table values get refreshed as page got refreshed on event switching/selection.
    Please respond.

    hye rahul.
      as i told you my second solution, will help you . the values remain in the corresponding UI elements.
    For example , you have a drop down and table view. both will trigger events. bind the data of the table at drop down event and bind the dat of the drop down at table event.
    event = cl_htmlb_manager=>get_event( runtime->server->request ).
    CASE event->id.
    when 'dd1'.                   drop down event is fired.
    bind data for drop down
    dd ?= cl_htmlb_manager=>get_data(
                                          request = runtime->server->request
                                          name    = 'dropdown'
                                          id      = dd_id'           " name of the drop down id
    along with drop down bind data for table view
        tbv ?= cl_htmlb_manager=>get_data(
                                          request = runtime->server->request
                                          name    = 'tableView'
                                          id      = 'tbv_id'           " name of the table view
    when 'tbv_id'.                   drop down event is fired.
    bind data for drop down
    dd ?= cl_htmlb_manager=>get_data(
                                          request = runtime->server->request
                                          name    = 'dropdown'
                                          id      = dd_id'           " name of the drop down id
    along with drop down bind data for table view
        tbv ?= cl_htmlb_manager=>get_data(
                                          request = runtime->server->request
                                          name    = 'tableView'
                                          id      = 'tbv_id'           " name of the table view
    This is how data should be binded in case of Stateless application. All the UI elemets must b binded again.. as the global data is refresed again.
    Hope this helps.
    Regards,
    Imran.

  • Multipl selection not working in Select Options, NO-EXTENSION not specified

    Hi,
    My code for the selection screen is as given below:
    data: v_bukrs type ekko-bukrs.
    select-options: s_one    for v_bukrs default '1234',
                    s_two    for ekko-lifnr,
                    s_three  for ekko-ekgrp.
    select-options: s_last   for ekko-llief no intervals.
    However, when I execute my program, all for select-options show Multiple selection icon. When I click on the icon for multiple selection, it is not processed.
    I tried to debug and find out but to no avail. Also I have searched extensively over SDN, but have not found any solution for my problem.
    Kindly help with relevant solution.
    Regards,
    Smruthi

    Hi Anurag and Vinod,
    Thanks for your replies.
    The FM - SELECT_OPTIONS_RESTRICT has not been used in my program.
    The issue is however, resolved. There was an error in the selection screen events, that was triggering the disabling.
    Regards,
    Smruthi

  • How to select option to the particular view container

    Hi All,
    I am working on ALV , i have view container for search parameters, here i want to add select option in to the same view container.. anyone help me to achive the same.
    Thanks
    Ram

    As Tamil said above, you have to put the select options in the view that you are embedding in the view container. For help on how to use select options in webdynpro, you can have a look at the tutorial in the following link...
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c09fec07-0dab-2a10-dbbe-c9a26bdff03e

  • Select Option's Context Element for the REPORT_ATTRIBUTE_ERROR_MESSAGE

    Hi,
    We're on 7.0 ehp1.
    I found a thread on same subject u201Cwdr:select_options and highlight Error Message with a Link to Inputfield u201C, Jul-23-2008, in which Thomas Jung gave an explanation of how to get the context element of the Select Options on a view.
    I tried to follow it, but Iu2019m still not getting it.  Please show how to get the context element of a Select Option for the u201CREPORT_ATTRIBUTE_ERROR_MESSAGEu201D .
       wd_comp_controller->go_message_manager->report_attribute_error_message(
             exporting
              message_text   = ls_messaga_text
                  element        = ?????
               attribute_name = ls_option_id
    Thomas' explanation:
    I gave you the code that gets you to the interface controller. From there you call the GET_API to get the component controller. After you have the component controller it is normal context coding to read the context of the Select-Options context. Run the debugger and use the Web Dynpro view to see what your context looks like at runtime. When I test this with one of my applications, the names of the context nodes that were dynamically generated was really straight forward - as it uses the names of the select-option itself. Nothing special once you reach this point - just normal context coding...."
    Kind regards,
    Huntr

    Hi ,
    Use the below approach to achieve this,
    data:
        lr_context_node       type ref to if_wd_context_node,
        lr_element            type ref to if_wd_context_element,
        message_text          type string.
      get the node and leadSelection of that field
        lr_context_node = get_node_of_sel_field( <field>-m_id ).
        lr_element = lr_context_node->get_lead_selection( ).
    case <field>-m_type.
    For Select option field
                when if_wd_select_options=>mc_sscreen_item_type_field.
                  m_message_manager->report_attribute_error_message(
                    element        = lr_element
                    attribute_name = 'LOW'
                    message_text   = message_text ).
    "For Parameter field
                when if_wd_select_options=>mc_sscreen_item_type_parameter.
                  m_message_manager->report_attribute_error_message(
                    element        = lr_element
                    attribute_name = 'VALUE'
                    message_text   = message_text ).
                when others.
              endcase.

Maybe you are looking for

  • K7N420pro issues...

    Excuse if I take a bit too long to explain what the issue is, but I am hoping to give good info. I'm a novice. We ran the board for around 8 months before we had a problem with it. At the time I attempted to boot it up and got a hdd disk read error.

  • Lumia 620 front facing camera

    Hi, i am unable to use the front facing camera on my lumia 620. i have tried updating the software and it says there are no new updates as it is fully up to date, however i still cannot work out how to use the front facing camera. Everything else on

  • DVD Player not recognising DVD Film

    I have a GB iBook with a Combo Drive. When I attempt to play a recently purchased DVD film I get the message "Supported Disc Not Available". The disc does not mount on the desktop. I am unable to get any information about the disc because the Menu 'F

  • Performane related issue in Production Server

    Hi, when i deploy the whole application in development server (by remotely logging into client server through vpn) it works fine . But when it is run at client side for system testing, user acceptance testing and integration testing it becomes very s

  • IP - Domain names changes

    Hello, We have 3 Nodes RAC 11gR2 (11.2.0.2.3) on Redhat Enterprise Linux 5.5. We will move the servers from one datacenter to another. This means we will have to change the IPs and domain name of the nodes. In our environment, we are using: - Role se