WD_CPUSE_SELECT_OPTIONS( )

can u please tell me  what is the use of  WD_CPUSE_SELECT_OPTIONS( )

Ravi,
whenever we reuse other stnadard components ( like slav_wd_table, wdr_Select_option ) into your component,, we will declare them under used components..
In order to use that component in coding, first we have to take the reference of that component.,,,that can be done by below statemetent
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_select_options( ).
Regards
Srinivas

Similar Messages

  • Select-options for input field

    hi,
    Is it possible to use 'Select-options' in web dynpro for the input field like we use in abap?
    Ex. material is the input field. i want to select range also for this input field using 'Select-options'
    I have tried only with ovs(f4 help) for the input field. can u pls tel me how to use if it is possible ?
    Thanks,
    Aishwarya.

    DATA: LT_RANGE_TABLE TYPE REF TO DATA,
            RT_RANGE_TABLE TYPE REF TO DATA,
            READ_ONLY TYPE ABAP_BOOL,
            TYPENAME TYPE STRING.  DATA: LR_COMPONENTCONTROLLER TYPE REF
    TO IG_COMPONENTCONTROLLER,
            L_REF_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
    create the  used component
      L_REF_CMP_USAGE = WD_THIS->WD_CPUSE_SELECT_OPTIONS( ).
      IF L_REF_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
        L_REF_CMP_USAGE->CREATE_COMPONENT( ).
      ENDIF.
      WD_THIS->M_WD_SELECT_OPTIONS = WD_THIS->WD_CPIFC_SELECT_OPTIONS( ).
    init the select screen
      WD_THIS->M_HANDLER =
    WD_THIS->M_WD_SELECT_OPTIONS->INIT_SELECTION_SCREEN( ). 
    WD_THIS->M_HANDLER->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 ).
    *create a range table that consists of this new data element
      LT_RANGE_TABLE = WD_THIS->M_HANDLER->CREATE_RANGE_TABLE(
      I_TYPENAME = 'matnr' ).
    add a new field to the selection
      WD_THIS->M_HANDLER->ADD_SELECTION_FIELD(
      I_ID = 'matnr'
      IT_RESULT = LT_RANGE_TABLE
      I_READ_ONLY = READ_ONLY ).
    This is my code followed by saptechnical. but when i exec, am getting err like the type matnr is invalid.

  • Select-options for date field.

    Hi all,
    i need to give select options for Date field.How can i give that.
    Thanks & Regards
    Ravi.

    Hi Ravi,
    Use the Component WDR_SELECT_OPTIONS to include select options in Web Dynpro ABAP. Follow these steps:
    1. In your Component , "Used Componet" tab add Component WDR_SELECT_OPTIONS . Component Use can be any name that you want to give, eg SELECT_OPTIONS
    2. Go to the View where you want to include the Date Select Options. I am assuming that you already have an Attribute of Type DATS in your context.
    3. View: Properties Tab:Create Controller Usage and select
    SELECT_OPTIONS     WDR_SELECT_OPTIONS                   
    SELECT_OPTIONS     WDR_SELECT_OPTIONS     INTERFACECONTROLLER
    4. View Layout Tab:Include a View Container. In this view container we will show the Date Select Options.
    5. View Attributes Tab: Create Following two attributes:
    M_HANDLER type IF_WD_SELECT_OPTIONS
    M_WD_SELECT_OPTIONS type IWCI_WDR_SELECT_OPTIONS
    6: View Methods Tab: Create a method eg CREATE_SELECTION_SCREEN. Call this method in the WDDOINIT of the view.
    7:CREATE_SELECTION_SCREEN: Write following Code:
    * Data Declaration
      data:
            lt_range_table TYPE REF TO DATA.
      data:
            lr_componentcontroller TYPE REF TO IG_COMPONENTCONTROLLER,
            lr_componentusage TYPE REF TO IF_WD_COMPONENT_USAGE.
    * Execution
    *  Create Used Component
      lr_componentusage = wd_this->wd_cpuse_select_options( ).
      if LR_COMPONENTUSAGE->HAS_ACTIVE_COMPONENT( ) is initial.
        lr_componentusage->create_component( ).
      endif.
    *  Get pointer to interface controller of select options
      wd_this->M_WD_SELECT_OPTIONS = wd_this->wd_cpifc_select_options( ).
    * initialize selction screen
      wd_this->M_HANDLER = wd_this->M_WD_SELECT_OPTIONS->init_selection_screen( ).
    *  Create Range Table for: Date
      CALL METHOD WD_THIS->M_HANDLER->CREATE_RANGE_TABLE
        EXPORTING
          I_TYPENAME     = 'DATS'
        RECEIVING
          RT_RANGE_TABLE = lt_range_table.
    * Add Selection Field for: Date
      CALL METHOD WD_THIS->M_HANDLER->ADD_SELECTION_FIELD
        EXPORTING
          I_ID                         = '<name of date attribute in the context>'
    *      I_WITHIN_BLOCK               = MC_ID_MAIN_BLOCK
    *      I_DESCRIPTION                =
    *      I_IS_AUTO_DESCRIPTION        = ABAP_TRUE
          IT_RESULT                    = lt_range_table
    *      I_OBLIGATORY                 = ABAP_FALSE
    *      I_COMPLEX_RESTRICTIONS       =
    *      I_USE_COMPLEX_RESTRICTION    = ABAP_FALSE
    *      I_NO_COMPLEX_RESTRICTIONS    = ABAP_FALSE
    *      I_VALUE_HELP_TYPE            = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_NONE
    *      I_VALUE_HELP_ID              =
    *      I_VALUE_HELP_MODE            =
    *      I_VALUE_HELP_STRUCTURE       =
    *      I_VALUE_HELP_STRUCTURE_FIELD =
    *      I_HELP_REQUEST_HANDLER       =
    *      I_LOWER_CASE                 =
    *      I_MEMORY_ID                  =
    *      I_NO_EXTENSION               = ABAP_FALSE
    *      I_NO_INTERVALS               = ABAP_FALSE
    *      I_AS_CHECKBOX                = ABAP_FALSE
    *      I_AS_DROPDOWN                = ABAP_FALSE
    *      IT_VALUE_SET                 =
    *      I_READ_ONLY                  = ABAP_FALSE
    *      I_DONT_CARE_VALUE            =
    *      I_EXPLANATION                =
          I_TOOLTIP                    = 'Select Date'.
    8: To Fetch Data entered in the selection field, write following code on action of button click:
      data:
            lt_date type REF TO DATA.
    FIELD-SYMBOLS:
                     <fs_date> TYPE table.
      *  retrieve Date from Select Options
      CALL METHOD WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD
        EXPORTING
          I_ID           = '<attrib_name>'
        RECEIVING
          RT_RANGE_TABLE = lt_date.
    *  assign Date Field Symbol
      ASSIGN lt_date->* to <fs_date>.
    9: Windows Window Tab: In the View Conatiner, embed the WND_SELECTION_SCREEN view from SELECT_OPTIONS component Usage of  WDR_SELECT_OPTIONS component.
    Regards,
    Reema.

  • When do I need to declare multiple usages of the same component

    I have a noddy WD4A component with a main view containing only ViewContainerUI elements. Each container has a sub-view embedded implementing some functionality I am playing with. One of these views implements a select option by using the WDR_SELECT_OPTIONS component. I have got this working. Then I decide to make a copy of the view in order to test some modifications. I embed this in a new ViewContainerUI element on the main view.
    So now I have 2 sub views implementing the same select option. When I run it, the 2nd select option appears in the first view as a duplicate. The only way I can fix this is by declaring a second usage (of WDR_SELECT_OPTIONS) in the component and using this in the copied view.
    So now I have 2 WDR_SELECT_OPTIONS component usages declared (with different names) so that my 2 views can coexist on the screen. Is this really necessary? Had it been the same view implementing both select options fair enough - but these are 2 different views.
    If the views were not displayed at the same time, could I have declared and used just 1 component usage?
    Peter

    I have still not succeeded in dynamically creating a 2nd select Option and getting it to display in a View Container (called VC_SOD). The code compiles and runs but the select option does not display. This is hopefully something I will never need to do in reality. Just an exercise.
    The code that is commented out is the original standard technique of using a select_option usage. There is probably more then 1 fundamental mistake in the code
    method WDDOMODIFYVIEW .
      DATA: LT_RANGE_TABLE TYPE REF TO DATA,
            RT_RANGE_TABLE TYPE REF TO DATA,
            READ_ONLY TYPE ABAP_BOOL,
            TYPENAME TYPE STRING.
      DATA: LR_COMPONENTCONTROLLER TYPE REF TO IG_COMPONENTCONTROLLER,
            L_REF_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
    create the used component
      L_REF_CMP_USAGE = WD_THIS->WD_CPUSE_SELECT_OPTIONS( ).
    Here we copy the usage just for the hell of it.
      DATA lr_component_usage type ref to if_wd_component_usage.
      L_REF_CMP_USAGE = L_REF_CMP_USAGE->CREATE_COMP_USAGE_OF_SAME_TYPE( name = 'SELECT_OPTIONS2' ).
      IF L_REF_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
        L_REF_CMP_USAGE->CREATE_COMPONENT( ).
      ENDIF.
    *call the interface controller method init_selection_screen to get the helper class
    WD_THIS->M_WD_SOD = WD_THIS->WD_CPIFC_SELECT_OPTIONS( ).
      data L_INTF_CONTROLLER type ref to IWCI_WDR_SELECT_OPTIONS.
      L_INTF_CONTROLLER ?= L_REF_CMP_USAGE->GET_INTERFACE_CONTROLLER( ).
    data lo_view_controller type ref to if_wd_view_controller.
    data lo_view_usage TYPE REF TO if_wd_rr_view_usage.
    data lo_view_cnt_assignment TYPE REF TO if_wd_rr_view_cnt_assignment.
    data lo_view type ref to if_wd_view.
    lo_view_controller = wd_this->wd_get_api( ).
    lo_view_usage = view->get_view_usage( ).
    try and see what is going on
    data lo_view_container_assignments type WDRR_VCA_OBJECTS.
    lo_view_container_assignments = lo_view_usage->GET_VIEW_CNT_ASSIGNMENTS( ).
    lo_view_cnt_assignment = lo_view_usage->create_view_cnt_assignment( name = 'VC_SOD' assigned_container = 'VC_SOD' ).
    try and see what is going on
    lo_view_container_assignments = lo_view_usage->GET_VIEW_CNT_ASSIGNMENTS( ).
    init the select screen
    WD_THIS->M_HANDLER = WD_THIS->M_WD_SOD->INIT_SELECTION_SCREEN( ).
      WD_THIS->M_HANDLER = L_INTF_CONTROLLER->INIT_SELECTION_SCREEN( ).
      WD_THIS->M_HANDLER->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 ).
    create a range table that consists of this new data element
      LT_RANGE_TABLE = WD_THIS->M_HANDLER->CREATE_RANGE_TABLE( I_TYPENAME = 'S_CARR_ID' ).
    add a new field to the selection
      WD_THIS->M_HANDLER->ADD_SELECTION_FIELD( I_ID = 'S_CARR_ID' IT_RESULT = LT_RANGE_TABLE I_READ_ONLY = READ_ONLY ).
    endmethod.

  • Wdr:select_options and highlight Error Message with a Link to Inputfield

    Hi,
    I have created a InputField on a View using WDR_SELECT_OPTIONS. I want to validate this Input Field and give
    Error Message, when User fill it with wrong Values. How can we achieve this and important is to mark it on Screen WITH a RED STAR. ( e.g. highlighted )
    Thanks!
    Best Regards
    Beserithan Malabakan

    I've not tried it with select options before, but you might wan to have a look at setting the REPORT_ATTRIBUTE_ERROR_MESSAGE method of the message object.  This way the message gets attached to any UI element bound to the context attribute you issue the message for. But as I type this and think about it some more; I see where the problem lies.  The Select Options component doesn't follow an approach of cross component context binding.  It dynamically generates its own context.
    If I had a little more time I would test this out; but it might be worth your while to research.  When you initialize the Select-Options, you normally get access to the interface controller:
    data: l_ref_cmp_usage type ref to if_wd_component_usage.
      l_ref_cmp_usage =   wd_this->wd_cpuse_select_options( ).
      if l_ref_cmp_usage->has_active_component( ) is initial.
        l_ref_cmp_usage->create_component( ).
      endif.
    * get a pointer to the interface controller of the select options
    *component
      wd_this->lv_wd_select_options =
           wd_this->wd_cpifc_select_options( ).
    * init the select screen
      wd_this->lv_sel_handler =
           wd_this->lv_wd_select_options->init_selection_screen( ).
    This interface controller (LV_WD_SELECT_OPTIONS in my case). Has a GET_API method that returns the component controller.  In turn you might be able to access the context of the Select-Options directly. Its a crazy idea, but worth a try.

  • ' SET_OUTPUT_TABLE Cannot Be Called '  error  while using OVS in Select opt

    Hi All,
    I am trying to put the OVS help in a select  option.
    When I run the application and click the help icon for select option I am getting the below error:
    OVS: Methode SET_OUTPUT_TABLE Cannot Be Called
    The abap call stack is this :
    Method: IF_WDR_OVS_LISTENER~MODIFY_RESULT_VIEW of program CL_WDR_VALUE_HELP_HANDLER=====CP
    Method: WDDOMODIFYVIEW of program /1BCWDY/05LR4UBIVJKOH0BA5Y5V==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_DO_MODIFY_VIEW of program /1BCWDY/05LR4UBIVJKOH0BA5Y5V==CP
    Method: DO_MODIFY_VIEW of program CL_WDR_DELEGATING_VIEW========CP
    Method: MODIFY_VIEW of program CL_WDR_VIEW===================CP
    Method: DO_MODIFY_VIEW of program CL_WDR_CLIENT_COMPONENT=======CP
    Method: DO_MODIFY_VIEW of program CL_WDR_WINDOW_PHASE_MODEL=====CP
    Method: PROCESS_REQUEST of program CL_WDR_WINDOW_PHASE_MODEL=====CP
    Method: PROCESS_REQUEST of program CL_WDR_WINDOW=================CP
    Method: EXECUTE of program CL_WDR_MAIN_TASK==============CP
    My code is below :
    method on_ovs .
      types:
        begin of lty_stru_input,
      add fields for the display of your search input here
          carrid type sflight-carrid,
        end of lty_stru_input,
        begin of lty_stru_list,
      add fields for the selection list here
          carrid type sflight-carrid,
        end of lty_stru_list,
        ty_range type range of sflight-carrid.
      data: ls_search_input  type lty_stru_input,
            lt_select_list   type standard table of lty_stru_list,
            ls_text          type wdr_name_value,
            lt_label_texts   type wdr_name_value_list,
            lt_column_texts  type wdr_name_value_list,
            lv_window_title  type string,
            lv_group_header  type string,
            lv_table_header  type string.
      field-symbols: <ls_query_params> type lty_stru_input,
                     <ls_selection>    type lty_stru_list.
      case ovs_callback_object->phase_indicator.
        when if_wd_ovs=>co_phase_0.
          ls_text-name = `CARRID`.  "must match a field name of search
          ls_text-value = `CARRID`. "wd_assist->get_text( `001` ).
          insert ls_text into table lt_label_texts.
          ls_text-name = `CARRID`.  "must match a field in list structure
          ls_text-value = `CARRID`. "wd_assist->get_text( `002` ).
          insert ls_text into table lt_column_texts.
          lv_window_title = 'Test Window'.
          ovs_callback_object->set_configuration(
                    label_texts  = lt_label_texts
                    column_texts = lt_column_texts
                    group_header = lv_group_header
                    window_title = lv_window_title
                    table_header = lv_table_header
                    col_count    = 2
                    row_count    = 20 ).
        when if_wd_ovs=>co_phase_1.
          ls_search_input-carrid = 'AH'.
        pass the values to the OVS component
          ovs_callback_object->set_input_structure(
              input = ls_search_input ).
        when if_wd_ovs=>co_phase_2.
          if ovs_callback_object->query_parameters is not bound.
    TODO Exception Handling       
          endif.
          assign ovs_callback_object->query_parameters->*
                                  to <ls_query_params>.
          if not <ls_query_params> is assigned.
              select carrid from sflight into  table lt_select_list.
         else.
           select carrid from sflight into table
             lt_select_list where carrid eq <ls_query_params>-carrid.
          endif.
          ovs_callback_object->set_output_table( output = lt_select_list ).
        when if_wd_ovs=>co_phase_3.
      apply result
          if ovs_callback_object->selection is not bound.
    TODO exception handling
          endif.
          assign ovs_callback_object->selection->* to <ls_selection>.
          if <ls_selection> is assigned.
            data: lr_select_options type ref to iwci_wdr_select_options.
            data lr_helper type ref to if_wd_select_options.
            data: lt_range type ty_range.
            data: lr_comp_usage type ref to if_wd_component_usage,
                  wa_range like line of lt_range,
                  rt_range type ref to data.
            wa_range-sign = 'I'.
            wa_range-option = 'EQ'.
            wa_range-low = <ls_selection>-carrid.
            append wa_range to lt_range.
            "lt_RANGE-SIGN = 'I'.
          create data rt_range like lt_range.
            lr_comp_usage = wd_this->wd_cpuse_my_select( ).
            if lr_comp_usage->has_active_component( ) is initial.
            lr_comp_usage->create_component( ).
            endif.
            lr_select_options = wd_this->wd_cpifc_my_select( ).
            lr_helper = lr_select_options->init_selection_screen( ).
            call method lr_helper->set_range_table_of_sel_field
             exporting
                i_id = 'CARRID'
                it_range_table = rt_range.
          endif.
      endcase.
    endmethod.
    Please help!!!
    Its urgent.
    Regards,
    Sumit Oberoi

    Hi Sumit,
    1) In the WDINIT method define ur select-option.
    2) IN Mthods of ur view controller write :
    ON_OVS     Event Handle    ON_OVS     INTERFACECONTROLLER     SELECT_OPTIONS
    3) code for ON_OVS:
      DATA: l_current_controller TYPE REF TO if_wd_controller,
            l_message_manager    TYPE REF TO if_wd_message_manager,
            lv_message_ERROR(100), l_subrc TYPE subrc,
            lv_message_SUCESS(100).
      DATA : STRU_ENAME TYPE ZU5_PERLIST_S.
      DATA: WA_CALLOWNR LIKE STRU_ENAME.
      DATA: IT_CALLOWNR LIKE STANDARD TABLE OF STRU_ENAME.
      DATA: IT_ENAME TYPE ZU5_PERLIST_T.
      DATA: LV_STR TYPE STRING VALUE 'BOB'.
      DATA:  lr_componentcontroller  type ref to ig_componentcontroller,
             l_ref_cmp_usage         type ref to if_wd_component_usage.
      DATA:  rt_CALLOWNR          type ref to data,
              R_CALLOWNR          TYPE RANGE OF IHPA-PARNR,
              R_CALLOWNR_line     LIKE LINE OF R_CALLOWNR.
      field-symbols:
          <lt_ovs_result1>     LIKE IT_ENAME,
          <PA0001>             TYPE ZU5_PERLIST_S,
          <lt_sel_opt_result1> type standard table.
      field-symbols: <fs_CALLOWNR> type table.
    case ovs_callback_object->
      case i_ovs_data-m_ovs_callback_object->phase_indicator.
        when if_wd_ovs=>co_phase_0.
          l_ref_cmp_usage = wd_this->wd_cpuse_select_options( ).
         get a pointer to the interface controller of the select options component
          wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).
          i_ovs_data-m_ovs_callback_object->set_configuration(
           WINDOW_TITLE       =
           GROUP_HEADER       =
           LABEL_TEXTS        =
           TABLE_HEADER       =
           COLUMN_TEXTS       =
           COL_COUNT          =
            TABLE_MULTI_SELECT = abap_true ).
        when if_wd_ovs=>co_phase_1.
    // to display extra search window
         i_ovs_data-m_ovs_callback_object->set_input_structure(
           input  = STRU_PA0001
           GROUP_HEADER =
           LABEL_TEXTS  =
           WINDOW_TITLE =
    to display extra search window
        when if_wd_ovs=>co_phase_2.
          rt_CALLOWNR = wd_this->m_handler->get_range_table_of_sel_field( i_id = 'CALLOWNR' ).
          assign rt_CALLOWNR->* to <fs_CALLOWNR>.
          R_CALLOWNR = <fs_CALLOWNR>.
          READ TABLE R_CALLOWNR INTO R_CALLOWNR_line INDEX 1.
          LV_STR = R_CALLOWNR_line-LOW.
          CALL METHOD ZU7_CL_DB_UTILITY=>GET_PERNR_HITLIST
            EXPORTING
              I_SEARCH = LV_STR
            IMPORTING
              ET_HLIST = IT_ENAME.
          l_current_controller ?= wd_this->wd_get_api( ).
          CALL METHOD l_current_controller->get_message_manager
            RECEIVING
              message_manager = l_message_manager.
          IF LV_STR IS INITIAL.
            lv_message_ERROR = wd_assist->if_wd_component_assistance~get_text( key = '031' ).
            CALL METHOD l_message_manager->report_error_message
              EXPORTING
                message_text = lv_message_ERROR.
          ELSE.
            CLEAR lv_message_ERROR.
            DATA : LV_LINES TYPE char3.
            DESCRIBE TABLE IT_ENAME LINES LV_LINES.
            lv_message_ERROR = wd_assist->if_wd_component_assistance~get_text( key = '032' ).
            CONCATENATE LV_LINES lv_message_ERROR INTO lv_message_ERROR SEPARATED BY space.
            CALL METHOD L_MESSAGE_MANAGER->CLEAR_MESSAGES
              EXPORTING
                INCLUDING_PERMANENT_MSG = ABAP_FALSE.
            CALL METHOD L_MESSAGE_MANAGER->REPORT_SUCCESS
              EXPORTING
                MESSAGE_TEXT = lv_message_ERROR.
          ENDIF.
          i_ovs_data-m_ovs_callback_object->set_output_table(
              output       = IT_ENAME
        when  if_wd_ovs=>co_phase_3.
          assign i_ovs_data-m_ovs_callback_object->selection->* to <lt_ovs_result1>.
          assign i_ovs_data-mt_selected_values->* to <lt_sel_opt_result1>.
          loop at <lt_ovs_result1> assigning <PA0001>.
            APPEND <PA0001>-PERNR TO <lt_sel_opt_result1>.
          endloop.
      endcase.
    Regards,
    Vishal.
    Edited by: VISHAL GUPTA on Aug 5, 2008 9:42 AM

  • Access via 'NULL' object reference not possible   - GET_RANGE_TABLE_OF_SEL_

    Hi Guru's,
       i am new for WebDynpro programming.I am trying to use select-options tutorial.
    System showing select options and table binding on screen when i test the application.
    I have using search button to get the value which user will i/p.for that onaction method created, i have writen the code to get the values which user will input.
    Method  given below is of componentcontroler
    method wddoinit .
      data: lt_range_table type ref to data,
            rt_range_table type ref to data,
            read_only type abap_bool,
            lt_range_table1 type ref to data.
      data: lr_componentcontroller type ref to ig_componentcontroller,
            l_ref_cmp_usage type ref to if_wd_component_usage.
    create the used component
      l_ref_cmp_usage = wd_this->wd_cpuse_select_options( ).
      if l_ref_cmp_usage->has_active_component( ) is initial.
        l_ref_cmp_usage->create_component( ).
      endif.
      wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).
      wd_this->m_handler = wd_this->m_wd_select_options->init_selection_screen( ).
      wd_this->m_handler->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 ).
      lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'S_CARR_ID' ).
      wd_this->m_handler->add_selection_field( i_id = 'CARRID'
      it_result = lt_range_table i_read_only = read_only ).
      call method wd_this->m_handler->add_horizontal_divider
        exporting
          i_id = 'LINE'.
    endmethod.
    Method  given below is of VIEW.
    method ONACTIONSEARCH .
      DATA: NODE_FLIGHTS TYPE REF TO IF_WD_CONTEXT_NODE.
      DATA: RT_CARRID TYPE REF TO DATA.
      DATA: ISFLIGHT TYPE TABLE OF SFLIGHT.
      DATA: WSFLIGHT TYPE SFLIGHT.
      FIELD-SYMBOLS: <FS_CARRID> TYPE TABLE.
    Retrieve the data from the select option
      RT_CARRID = WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_CARR_ID' ).
    Assign it to a field symbol
      ASSIGN RT_CARRID->* TO <FS_CARRID>.
      CLEAR ISFLIGHT. REFRESH ISFLIGHT.
      SELECT * INTO CORRESPONDING FIELDS OF TABLE ISFLIGHT FROM SFLIGHT
                           WHERE CARRID IN <FS_CARRID>.
      NODE_FLIGHTS = WD_CONTEXT->GET_CHILD_NODE( NAME = `FLIGHTS` ).
      NODE_FLIGHTS->BIND_ELEMENTS( ISFLIGHT ).
    endmethod.
    while executing appln. error is trigger on line given below
    RT_CARRID = WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_CARR_ID' ).
    Err: The following error text was processed in the system BCD : Access via 'NULL' object reference not possible.
    please help me out on this issue.
    Thanks and Regards
    Vinayak Sapkal

    hi ,
    The attribute M_HANDLER is an attirbute of component controller (as told by your post) and so you cannot access it as you have done it.
    You will have to access it as .
    WD_COMP_CONTROLLER->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD(I_ID = 'S_CARR_ID' ).
    Try doing it.
    Or else , if you have created a similar attribute in your view itself , then it is "INITIAL" and hence you are getting the dump.
    You will have to assign the view attribute "M_HANDLER" with the value of your component controller attribute "M_HANDLER" ,because all the initializations are done in WDDOINIT of comp controller and on component controller atribute "M_HANDLER".
    Thanks,
    aditya.

  • Select option in web dyn pro

    Hi,
    Is there any way to deafult current date to date select-option in web dyn pro?

    hi,
    Check following code:
    DATA:
           lr_componentcontroller TYPE REF TO ig_componentcontroller,
           l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
      DATA:
          lt_range_table       TYPE REF TO data,
          lt_types             TYPE string_table,
          rt_range_table       TYPE REF TO data,
          text                 TYPE string,
          typename             TYPE string.
      DATA: vbeln TYPE lips-vbeln,
            erdat TYPE lips-erdat,
            auart TYPE vbak-auart,
            trnsp TYPE vtadd01t-add_info,
            kunnr TYPE likp-kunnr.
      DATA:
        num_events TYPE i.
      DATA: uname TYPE sy-uname.
      uname = sy-uname.
      wd_context->set_attribute(  name = 'CUSTOMER'
      value = uname  ).
    wd_context->GET_ATTRIBUTE( Name = 'TRANSPORTER_CODE'
    Value = uname ).
    create the used component
      l_ref_cmp_usage = wd_this->wd_cpuse_select_options( ).
      IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
        l_ref_cmp_usage->create_component( ).
      ENDIF.
    get a pointer to the interface controller of the select options component
      wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).
    init the select screen
      wd_this->m_handler = wd_this->m_wd_select_options->init_selection_screen( ).
      lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'VBELN_VL' ).
      wd_this->m_handler->add_selection_field(
        i_description                = 'Sales Document'
        i_id                         = 'VBELN'
        i_obligatory                 = 'X'
        it_result                    = lt_range_table
        i_value_help_structure       = 'LIPS'
        i_value_help_structure_field = 'VBELN' ).
      lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'ERDAT' ).
      wd_this->m_handler->add_selection_field( i_id = 'ERDAT'  i_obligatory = 'X' it_result = lt_range_table ).
    *lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'VTTK_ADD01' ).
    *wd_this->m_handler->add_selection_field( i_id = 'VTTK_ADD01' I_DESCRIPTION  = 'CHAHA' it_result = lt_range_table ).
       wd_this->m_handler->add_selection_field(
         i_description                = 'Transporters Code'
         i_id                         = 'VTTK_ADD01'
         it_result                    = lt_range_table
         i_value_help_structure       = 'VTADD01T'
         i_value_help_structure_field = 'ADD_INFO' ).
    *Supress Global options in Used Component
      wd_this->m_handler->set_global_options(
          i_display_btn_cancel  = ''
          i_display_btn_check   = ''
          i_display_btn_execute = ''
          i_display_btn_reset   = '' ).
      lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'VBAK-AUART' ).
      wd_this->m_handler->add_selection_field(
        i_description                = 'Sales Document Type'
        i_id                         = 'AUART'
         i_obligatory                = 'X'
        it_result                    = lt_range_table
        i_value_help_structure       = 'VBAK'
        i_value_help_structure_field = 'AUART' ).
    ENDMETHOD.
    METHOD onactionexecute .
      DATA: node_saledoc TYPE REF TO if_wd_context_node.
      DATA: node_crdate TYPE REF TO if_wd_context_node.
      DATA: node_transcode TYPE REF TO if_wd_context_node.
      DATA: node_doctype TYPE REF TO if_wd_context_node.
      DATA: node1 TYPE REF TO if_wd_context_node.
      DATA: node2 TYPE REF TO if_wd_context_node.
      DATA: rt_saledoc TYPE REF TO data.
      DATA: rt_crdate TYPE REF TO data.
      DATA: rt_transcode TYPE REF TO data.
      DATA: rt_doctype TYPE REF TO data.
      FIELD-SYMBOLS: <fs_saledoc> TYPE table,
                      <fs_crdate> TYPE table,
                      <fs_transcode> TYPE table,
                      <fs_doctype> TYPE table.
    Retrieve the data from the select option
      rt_saledoc = wd_this->m_handler->get_range_table_of_sel_field(
      i_id = 'VBELN' ).
    Assign it to a field symbol
      ASSIGN rt_saledoc->* TO <fs_saledoc>.
    Retrieve the data from the select option
      rt_crdate = wd_this->m_handler->get_range_table_of_sel_field(
      i_id = 'ERDAT' ).
    Assign it to a field symbol
      ASSIGN rt_crdate->* TO <fs_crdate>.
    Retrieve the data from the select option
      rt_doctype = wd_this->m_handler->get_range_table_of_sel_field(
      i_id = 'AUART' ).
    Assign it to a field symbol
      ASSIGN rt_doctype->* TO <fs_doctype>.
    Retrieve the data from the select option
    *rt_transcode = wd_this->m_handler->get_range_table_of_sel_field(
    *i_id = 'VTTK_ADD01' ).
    Assign it to a field symbol
    assign rt_transcode-> to <fs_transcode>.
      node_saledoc = wd_context->get_child_node( name = 'S_VBELN' ).
      node_saledoc->bind_table( <fs_saledoc> ).
      node_crdate = wd_context->get_child_node( name = 'S_ERDAT' ).
      node_crdate->bind_table(  <fs_crdate> ).
      node_doctype = wd_context->get_child_node( name = 'S_AUART' ).
      node_doctype->bind_table( <fs_doctype> ).
      IF <fs_doctype> IS NOT INITIAL
        AND <fs_crdate> IS NOT INITIAL
        AND <fs_saledoc> IS NOT INITIAL
        wd_comp_controller->execute_zotddelvnote_vend_tari( ).
      ENDIF.

  • Select-options in Selection Screen to show more rows for entering values

    Hi all,
    In my webdynpro abap  I have added the SELECT-OPTIONS componenet and working fine.
    User need  in the Selection Screen for select options  more rows to show entering values in single time.
    THe Default Rows show only 5 .
    user need to change to 10 or 15 Rows to show.
    Pl help .
    THanks in advance.
    Dev

    Hi,
    Here is the way which I just tested and found working.
    This is the main code which needs to be written.
    TYPES:
        ty_r_vbeln TYPE RANGE OF vbeln,
        ty_s_vbeln TYPE LINE OF ty_r_vbeln.
    data ls_vbeln type ty_s_vbeln.
    field-symbols <fs_range> TYPE INDEX TABLE.
    ASSIGN lt_range->* TO <fs_range>.
    do 10 times.
    APPEND ls_vbeln TO <fs_range>.
    enddo.
    For further refinement, you can create a input field in view for number of lines to be shown as enabled.
    The complete code is as below.
    DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
    lo_cmp_usage =   wd_this->wd_cpuse_select_options( ).
    IF lo_cmp_usage->has_active_component( ) IS INITIAL.
      lo_cmp_usage->create_component( ).
    ENDIF.
    DATA lo_interfacecontroller TYPE REF TO iwci_wdr_select_options .
    lo_interfacecontroller =   wd_this->wd_cpifc_select_options( ).
    DATA lo_r_helper_class TYPE REF TO if_wd_select_options.
    lo_r_helper_class = lo_interfacecontroller->init_selection_screen(  ).
    Creating range table
    DATA lt_range TYPE REF TO data.
    CALL METHOD lo_r_helper_class->create_range_table
        EXPORTING
          i_typename     = 'VBELN'
        RECEIVING
          rt_range_table = lt_range.
    Disabling the global options
    CALL METHOD lo_r_helper_class->set_global_options
      EXPORTING
          i_display_btn_cancel  = abap_false
          i_display_btn_check   = abap_false
          i_display_btn_reset   = abap_false
          i_display_btn_execute = abap_true.
           TYPES:
        ty_r_vbeln TYPE RANGE OF vbeln,
        ty_s_vbeln TYPE LINE OF ty_r_vbeln.
    data ls_vbeln type ty_s_vbeln.
    field-symbols <fs_range> TYPE INDEX TABLE.
    ASSIGN lt_range->* TO <fs_range>.
    do 10 times.
    APPEND ls_vbeln TO <fs_range>.
    enddo.
    Adding the selection field
    CALL METHOD lo_r_helper_class->add_selection_field
        EXPORTING
          i_id                         = 'VBELN'
          I_OBLIGATORY                 = ABAP_TRUE
          I_NO_EXTENSION               = abap_false
          i_value_help_type = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
          it_result                    = lt_range.
    Edited by: Jayanthi Jayaraman on Dec 2, 2010 8:29 AM

  • Unable to see select options in view

    HI ,
    I have the following code in the WdDOINIT method of my view for viewing a field as a select option...
    DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
    l_ref_cmp_usage =   wd_this->wd_cpuse_select_options( ).
    IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
      l_ref_cmp_usage->create_component( ).
    ENDIF.
    DATA: l_ref_interfacecontroller1 TYPE REF TO iwci_wdr_select_options .
    l_ref_interfacecontroller1 =   wd_this->wd_cpifc_select_options( ).
      DATA:
        l_r_helper_class TYPE REF TO if_wd_select_options.
      l_r_helper_class = l_ref_interfacecontroller1->init_selection_screen(
    data lt_range_table type ref to data.
    CALL METHOD l_r_helper_class->create_range_table
      EXPORTING
        i_typename     = 'BUKRS'
       i_length       =
       i_decimals     =
      receiving
        rt_range_table = lt_range_table
    CALL METHOD l_r_helper_class->add_selection_field
      EXPORTING
        i_id                         = 'BUKRS'
       i_within_block               = mc_id_main_block
        i_description                = 'Empresa'
       i_is_auto_description        = abap_true
        it_result                    = lt_range_table
       i_obligatory                 = abap_false
       i_complex_restrictions       =
       i_use_complex_restriction    = abap_false
       i_value_help_type            = if_wd_value_help_handler=>co_prefix_none
       i_value_help_id              =
       i_value_help_mode            =
       i_value_help_structure       =
       i_value_help_structure_field =
       i_help_request_handler       =
       i_lower_case                 =
       i_memory_id                  =
       i_no_extension               = abap_false
       i_no_intervals               = abap_false
       i_as_checkbox                = abap_false
       i_as_dropdown                = abap_false
       it_value_set                 =
       i_read_only                  = abap_false
       i_dont_care_value            =
    Besides this, the WND_SELECTION_SCREEN view is embedded in the respective container as follows...
    Tray - >Container - this container has the WND_SELECTION_SCREEN.
    I can see the tray in the view cannot see any field (expectation was to see a select-option for BUKRS.
    Any hints? Am i missing something. I have followed the tutorial for select options in webdynpro abap.
    regards,
    Priyank

    Hi Sascha,
    No i cannot see the buttons either.
    Following is how the view is embedded.
    View - > Tray - >viewcontaineruielement-> wnd_selection_screen.
    Am i missing something?
    regards,
    Priyank

  • WD -Select options - DUMP -Practicing Rich heilman's app

    Hi,
    I am practising the tutorial created by Rich heilman /people/rich.heilman2/blog/2005/12/20/using-select-options-in-a-web-dynproabap-application
    I am getting following dump while running i browser.
    Error when processing your request
    What has happened?
    The URL http://ssss.com/sap/bc/webdynpro/sap/ytest/ was not called due to an error.
    Note
    The following error text was processed in the system DV1 : Exception condition "TYPE_NOT_FOUND" raised.
    The error occurred on the application server sape-dev_DV1_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: DESCRIBE_BY_NAME of program CL_ABAP_TYPEDESCR=============CP
    What can I do?
    If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system DV1 in transaction ST22.
    If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server sape-dev_DV1_00 in transaction SM21.
    If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 0 in transaction ST11 on the application server sape-dev_DV1_00 . In some situations, you may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system administrator.
    Error code: ICF-IE-http -c: 180 -u: XXXXX -l: E -s: DV1 -i: sape-dev_DV1_00 -w: 0 -d: 20090112 -t: 162129 -v: RABAX_STATE -e: RAISE_EXCEPTION
    All I did is i used a different table and follwed all steps.
    Rich,
    Thank you for the wonderful blog.
    Any idea?
    rgds
    Vara
    Edited by: Vara K on Jan 12, 2009 11:26 PM
    Edited by: Vara K on Jan 12, 2009 11:34 PM

    Rich,
    Here is what I did.
    I changed SFLIGHT TABLE to PROJ and tried to put only one select-options for field PSPNR.
    Node name = PROJ.
    I kept a break-point in these methods but  it got dumped before that only.
    method WDDOINIT .
    data:
    lt_range_table type ref to data,
    rt_range_table type ref to data,
    read_only type abap_bool,
    typename type string.
    data:
    lr_componentcontroller type ref to ig_componentcontroller,
    l_ref_cmp_usage type ref to if_wd_component_usage.
    * create the used component
    l_ref_cmp_usage = wd_this->wd_cpuse_select_options( ).
    if l_ref_cmp_usage->has_active_component( ) is initial.
    l_ref_cmp_usage->create_component( ).
    endif.
    * get a pointer to the interface controller of the select options
    *component
    wd_this->m_wd_select_options =
    wd_this->wd_cpifc_select_options( ).
    * init the select screen
    wd_this->m_handler =
    wd_this->m_wd_select_options->init_selection_screen( ).
    * create a range table that consists of this new data element
    lt_range_table =
    wd_this->m_handler->create_range_table(
    i_typename = 'S_PSPNR_ID' ).
    *add a new field to the selection
    wd_this->m_handler->add_selection_field(
    i_id = 'S_PSPNR_ID'
    it_result = lt_range_table
    i_read_only = read_only ).
    endmethod.
    method ONACTIONCONTINUE .
    data: node_proj type ref to if_wd_context_node.
    data: rt_pspnr type ref to data.
    data: iproj type table of proj.
    data: wproj type proj.
    field-symbols: <fs_pspnr> type table.
    * Retrieve the data from the select option
    rt_pspnr = wd_this->m_handler->get_range_table_of_sel_field(
    i_id = 'S_PSPNR_ID' ).
    * Assign it to a field symbol
    assign rt_pspnr->* to <fs_pspnr>.
    * Retrieve that data from the database. Normally it is suggested to
    * encapsulate the data retrieval in a separate class.
    * For simplicity, the SELECT statement has been implemented here.
    clear iproj. refresh iproj.
    select * into corresponding fields of table iproj from proj
    where pspnr in <fs_pspnr>.
    * Bind the data to the context
    node_proj = wd_context->get_child_node( name = `PROJ` ).
    node_proj->bind_elements( iproj ).
    endmethod.
    rgds
    vara
    Edited by: Vara K on Jan 13, 2009 12:10 AM

  • Disable the Select-options field in the viewcontainer

    Hi,
    I  have two select option fields(Date,Number) in a viewcontainer .
    Now i need to disable one of the select-option field(Date) in the view container based on the condition.If I give Enability for the view container then both the select options will get diasbled.Is there any way to disable only Date select-option field in the view container.
    Thanks in Advance.
    Regards,
    bala.

    Hi,
    I just tested this solution and it is working for me....Following on Thomas's suggestion...I did the following....
    I just had one select-option on my scr...but it can be done with two too...
    step1: 
    created three attributes at component level under the attribute tab ( as suggested by Thomas )
    ENABLE_PRI_SELECTOPTION type  WDY_BOOLEAN 
    M_HANDLER type ref to     IF_WD_SELECT_OPTIONS
    M_WD_SELECT_OPTIONS  type ref to     IWCI_WDR_SELECT_OPTIONS
    Note: all are with public check box checked....so that all your views can see these attributes
    I created a method at componenet controller leverl:  create_select_option....in this method i have following code:
    DATA:
      lt_range_table TYPE REF TO data,
    *  rt_range_table TYPE REF TO data,
      read_only TYPE abap_bool,
      typename TYPE string.
      DATA:
      lr_componentcontroller TYPE REF TO ig_componentcontroller,
      l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
    * create the used component
      l_ref_cmp_usage = wd_this->wd_cpuse_select_options( ).
      IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
        l_ref_cmp_usage->create_component( ).
      ENDIF.
    * get a pointer to the interface controller of the select options
    *component
      wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).
    * init the select screen
      wd_this->m_handler = wd_this->m_wd_select_options->init_selection_screen( ).
    * create a range table that consists of this new data element
      lt_range_table = wd_this->m_handler->create_range_table(
      i_typename = 'PERSNO' ).
    * add a new field to the selection
      wd_this->m_handler->add_selection_field(
      i_id = 'PERSNO'
    I_VALUE_HELP_TYPE = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
    I_VALUE_HELP_ID = 'ZHELP_WDA_PERNR'
    I_NO_INTERVALS = abap_true
      it_result = lt_range_table
      i_read_only = wd_this->ENABLE_PRI_SELECTOPTION ).   <-----pls see here how i am controlling the read only property
    I assume you know this much...already....but i am just putting everything down....
    step2:
    in my view where i want to display the select-options....i added this code under my wddoinit method
    DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
    lo_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
    lo_componentcontroller->ENABLE_PRI_SELECTOPTION = abap_false.    <--pls see initially we want this field to be open
      lo_componentcontroller->create_select_option(
    step3: 
    i did not have much logic to control the select option field so i added a button which if user presses the field become disable...
    under that button action method i added the following code:
    DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
    lo_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
    lo_componentcontroller->ENABLE_PRI_SELECTOPTION = abap_true.
       "<---pls see here how i am changing the global *attribute which Thomas has suggested for controlling the "read only" attibute for the select-option field....you can put this under *your "if" statement....
    "this step is very important if you do not remove the field you will get the dump...since it will try to add the same field again
    "which produces dump from system....
    lo_componentcontroller->m_handler->REMOVE_SELECTION_SCREEN_ITEM(
    i_id = 'PERSNO' ).
    "now call the same method which we created at component level to create the select_options...
    lo_componentcontroller->create_select_option(
    that is all....it works great for me.....let us know if still have any questions....
    Thanks...
    AS...

  • How to hide default buttons on WD selection screen

    Hi Experts,
    Is there a way to hide default buttons ( Cancel, Check, Reset, Copy ) on web dynpro selection screen ??
    Please let me know how can I achieve this..
    Thanks in advance !
    Anand

    By selection screen do you mean the select-options reusable component?  If so, then there is an API of the component that you can call to disable these fields. Use the SET_GLOBAL_OPTIONS method of the select-options API to acomplish this:
    data: l_ref_cmp_usage type ref to if_wd_component_usage.
      l_ref_cmp_usage =   wd_this->wd_cpuse_select_options( ).
      if l_ref_cmp_usage->has_active_component( ) is initial.
        l_ref_cmp_usage->create_component( ).
      endif.
      wd_this->lv_wd_select_options =
           wd_this->wd_cpifc_select_options( ).
    * init the select screen
      wd_this->lv_sel_handler =
           wd_this->lv_wd_select_options->init_selection_screen( ).
      wd_this->lv_sel_handler->set_global_options(
        EXPORTING
    *      i_display_btn_cancel  = ABAP_TRUE    " Displays "Cancel" Button
    *      i_display_btn_check   = ABAP_TRUE    " Displays "Check" Button
    *      i_display_btn_reset   = ABAP_TRUE    " Displays "Reset" Button
          i_display_btn_execute = abap_false    " Displays "Apply" Button

  • Problem in select-options

    I am not able to see my view element container containing my select options in the webpage although it shows in my view.
    The code used by me in the doinit method is
    METHOD wddoinit .
      DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
      lo_cmp_usage =   wd_this->wd_cpuse_select_options( ).
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
        lo_cmp_usage->create_component( ).
      ENDIF.
      DATA lo_interfacecontroller TYPE REF TO iwci_wdr_select_options .
      lo_interfacecontroller =   wd_this->wd_cpifc_select_options( ).
        DATA lo_r_helper_class TYPE REF TO if_wd_select_options.
        lo_r_helper_class = lo_interfacecontroller->init_selection_screen(
      DATA lo_r_helperclass TYPE REF TO if_wd_select_options.
      lo_r_helperclass = lo_interfacecontroller->init_selection_screen(
      DATA lt_range TYPE REF TO data.
      CALL METHOD lo_r_helperclass->create_range_table
        EXPORTING
          i_typename     = 'VBELN'
        RECEIVING
          rt_range_table = lt_range.
    CALL METHOD lo_r_helperclass->set_global_options
    EXPORTING
        i_display_btn_cancel  = ABAP_FALSE
        i_display_btn_check   = ABAP_FALSE
       i_display_btn_reset   = ABAP_FALSE
        i_display_btn_execute = ABAP_FALSE.
      CALL METHOD lo_r_helperclass->add_selection_field
        EXPORTING
          i_id              = 'VBELN'
          it_result         = lt_range
          i_obligatory      = abap_true
          i_value_help_type = if_wd_value_help_handler=>co_prefix_none
          i_value_help_id   = 'VMVA'.
    ENDMETHOD.

    Have you embededd teh view of the select option's comp respective WIND*view inside the view container element.
    Edited by: Lekha on Dec 21, 2011 6:16 PM

  • How to create select options

    Hi,
    Please guide me to implement select options in webdynpro.
    Regards,
    Ratheesh BS

    Hi Ratheesh,
    Sorry for the late reply. The m_handler is just a normal reference variable of type if_wd_select_options. Within the WDDOINIT methos you would be calling the interface controller method init_selection_screen to get the helper class. You just need to use this reference for calling the method set_global_options with your desired criteria. Just try go through the sample code fragment below:
    METHOD wddoinit .
      DATA: lr_select_options TYPE REF TO iwci_wdr_select_options.
      DATA lr_helper TYPE REF TO if_wd_select_options.
      DATA: lt_range TYPE REF TO data.
      DATA: lr_comp_usage TYPE REF TO if_wd_component_usage.
    " This code is to instantiate the component WDR_SELECT_OPTIONS
      lr_comp_usage = wd_this->wd_cpuse_select_options( ).
      IF lr_comp_usage->has_active_component( ) IS INITIAL.
        lr_comp_usage->create_component( ).
      ENDIF.
    " call the interface controller method init_selection_screen to get the helper class
      lr_select_options = wd_this->wd_cpifc_select_options( ).
    " You are getting the necessary reference to the component into lr_helper here
      lr_helper = lr_select_options->init_selection_screen( ).
    " Use the helper class to create a range table for the data element S_CARR_ID
      lt_range = lr_helper->create_range_table( i_typename = 'S_CARR_ID' ).
    " Add a Selection Screen Field
      lr_helper->add_selection_field( i_id   = 'S_CARR_ID'
                                   it_result = lt_range ).
    " Removing the Cancel button from the toolbar displayed
      lr_helper->set_global_options(  i_display_btn_cancel  = abap_false
                                      i_display_btn_check   = abap_true
                                      i_display_btn_reset   = abap_true
                                      i_display_btn_execute = abap_true ).
    ENDMETHOD.
    Hope this helps resolve your problem.
    Regards,
    Uday

Maybe you are looking for

  • Currency Field Not Being Saved

    Hi, I modified the BP_HEAD/AccountDetails view to include the address fields from BP_ADDR and also include a few EEWB generated fields - including a currency field. I am also defaulting the currency key field to 'USD' via BADI_CRM_BP_UIU_DEFAULTS. Wh

  • I get a runtime error R6034

    I get a runtime error R6034 when double clicking on the icon of iTunes

  • Transferring iweb site to new hosting

    Q: Transfering my iweb account to a new hosting - it used to be hosted by mobile me I am new to this forum, so expect a delay while I work out how to reply!

  • Subject on objects and attachments

    Hi all, Does anyone know how to change the subject on an SOFM object I create on the fly and attach to a task? Under "Objects and attachments" the attachment shows up as "Office Document: SDM".  How do I change the "SDM" to something else. Thanks, Sc

  • Is it a flash bug?or???

    is it a flash bug?o how i can fix it? http://www.gotoandlearnforum.com/viewtopic.php?f=28&t=15709