Skip to Content
avatar image
Former Member

Incorrect field assignment to search help in webdynpro select-options.

Hi All,

I have used below code to get the search help to a select-option in webdynpro.

DATA: lit_range_table TYPE REF TO data, "Internal Table for Range Table

rt_range_table TYPE REF TO data. "Range Table

DATA: lv_read_only TYPE abap_bool, "Read Only Valiable

lv_ref_cmp_usage TYPE REF TO if_wd_component_usage. "Local Component Usage Variable

* create the used component

lv_ref_cmp_usage = wd_this->wd_cpuse_select_options( ).

IF lv_ref_cmp_usage->has_active_component( ) IS INITIAL.

lv_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

lit_range_table = wd_this->m_handler->create_range_table( i_typename = 'ADRP-NAME_TEXT' ).

* add a new field to the selection

wd_this->m_handler->add_selection_field( i_id = 'NAME' i_description = 'Supplier Name'

i_value_help_type = 'SEARCHHELP' i_value_help_id = 'BBP_BUPA_CLL_PARTNER'

it_result = lit_range_table i_read_only = lv_read_only ).


The above code is not fetching the correct value from search help to field back on screen.


Need your help on this.


Thanks,

Santosh.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    May 06, 2014 at 12:08 PM

    Hi Santosh,

    instead of using this

    wd_this->m_handler->add_selection_field( i_id = 'NAME' i_description = 'Supplier Name'

    i_value_help_type = 'SEARCHHELP' i_value_help_id = 'BBP_BUPA_CLL_PARTNER'

    it_result = lit_range_table i_read_only = lv_read_only ).



    Try this


    After Creating Range table


    Goto ABAP Object Patterns give Class/interface - IF_WD_SELECT_OPTIONS

    Method - ADD_SELECTION_FIELD


    i_value_help_type = if_wd_value_help_handler=>co_prefix_ovs.


    Pass this to the method.


    Hope it will Work

    Thanks & Regards,

    Meena.R

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Meenachi,

      I already have a standard search help for this. But the issue is, the search help is for Supplier number instead of supplier name.

      So, instead of fetching the supplier name, if we can fetch the supplier number, the problem should be solved.

      Thanks,

      Santosh.