cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a SEARCH HELP in a SELECT-OPTION?

vishal_boyro3
Explorer
0 Kudos

Hi people,

I have an issue adding search help to select-option I created. In my example I am addtion a selection option for <b>Product Category</b> and trying to link the search help <b>BBPH_PROD_CAT</b> with it.

Can you please tell me how to do it or give me a sample of how its done?

Thanks,

Vishal

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Vishal,

Here is a superb <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/21706b4b-0901-0010-7d93-c93b6394bc1d">article</a> on Select-Options by <b><i>Rich Heilman</i></b>.

Hope it helps.

Regards,

Maheswaran.B

vishal_boyro3
Explorer
0 Kudos

Thanks Koen but its still taking the standard search help not the one that I am attaching manually.

Former Member
0 Kudos

try method UPD_SELECTION_FIELD on the helper class returned from

INIT_SELECTION_SCREEN call.

If this still doesnt owrk, please open a support ticket.

Cheers

Phil.

thomas_szcs
Active Contributor
0 Kudos

Hi Vishal,

There are examples available in WDR_TEST_SELECT_OPTIONS in the "special cases" section (there is an action with a similar name that contains the corresponding source code).

Best regards,

Thomas

vishal_boyro3
Explorer
0 Kudos

Hello,

Have any of you use these parameters form the <b>ADD_SELECTION_FIELD</b> method for creating a select option:

<b> I_VALUE_HELP_TYPE

I_VALUE_HELP_ID

I_VALUE_HELP_MODE

I_VALUE_HELP_STRUCTURE

I_VALUE_HELP_STRUCTURE_FIELD

I_HELP_REQUEST_HANDLER</b>

Because if I tried to attached a specific search help,<b>BBPH_PROD_CAT</b>, to the select option and when I test the program I get the standard default search help,<b>COM_CAT</b>, linked with the data element and the one I attached. May be am doing something wrong, can you tell me what? Or how I can correct this problem?

Here is the code I used to create the select option:

* create a range table that consists of the corresponding data element
  lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'BBP_CATEGORY_ID' ).
* add a new field to the selection
  wd_this->m_handler->add_selection_field(
    i_description = 'Product Category'
    i_id = 'S_PCAT2'
    it_result = lt_range_table
    i_read_only = ld_read_only
*    i_value_help_id = 'BBPH_PROD_CAT'
*I_VALUE_HELP_TYPE = 'OVR'
    i_value_help_id = 'BBPH_PROD_CAT'
    i_value_help_mode = 0
    i_value_help_structure = 'BBPS_WLRA_SEARCH_CRITERIA'
    i_value_help_structure_field = 'CATEGORY'
    ).

Thanks for your help,

Vishal<b></b>

Former Member
0 Kudos

Hi,

in the I_VALUE_HELP_ID you should set 'SEARCHHELP:<name>' or 'CHECKTABLE:<name>'

it works this way in dynamic context and ui creation, i guess it will work here too

grtz

Koen

Former Member
0 Kudos

Hi Vishal.

The following works without any problem here:


wd_this->mr_selop->add_selection_field(
                     i_id = 'KUNWE'
                     i_within_block = lv_id_gdata
                     i_no_intervals = abap_false
                     i_no_extension = abap_true
                     i_obligatory = abap_false
                     i_read_only = abap_false
                     it_result = lt_range
                     i_value_help_type = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_SEARCHHELP
                     i_value_help_id = 'Z_DEBIS' ).

help id is the name of the help i want to use.

I guess you just have to set the value help type.

Hope this hepls.

Cheers,

Sascha

Message was edited by:

Sascha Dingeldey

Former Member
0 Kudos

Hi Sascha,

I am using the following and i am getting an error saying IF_WD_VALUE_HELP_HANDLER=>CO_VH_TYPE_BACKEND is not type compatible with I_VALUE_HELP_TYPE. Where do you think i am going wrong ??

wd_this->m_handle->add_selection_field(

i_id = '/MRSS/T_RM_CORP_ORG_DESC'

i_description = 'Corporate Organization'

I_VALUE_HELP_TYPE = IF_WD_VALUE_HELP_HANDLER=>CO_VH_TYPE_BACKEND

I_VALUE_HELP_ID = 'PRCTN'

it_result = lt_range_table

i_read_only = read_only ).

Regards,

Anoop

karsten_heth
Active Participant
0 Kudos

Anoop,

as Sascha mentioned, the value help type for value help from the data dictionary is if_wd_value_help_handler=>co_prefix_searchhelp. So the coding should be


wd_this->m_handle->add_selection_field(
  i_id = '/MRSS/T_RM_CORP_ORG_DESC'
  i_description = 'Corporate Organization'
  I_VALUE_HELP_TYPE = if_wd_value_help_handler=>co_prefix_searchhelp
  I_VALUE_HELP_ID = 'PRCTN'
  it_result = lt_range_table
  i_read_only = read_only ).

Regards,

Karsten

Former Member
0 Kudos

Hi,

if your searchhelp is bound to the structure-element category,

in the structure you use for the select options, than you will be able to

get the search help automatically

grtz

Koen

Former Member
0 Kudos

Hi,

for the select-options there's the example component WDR_TEST_SELECT_OPTIONS in the system, and for input help have a look at WDR_TEST_INPUT and WDR_TEST_DDIC_SHLP.

Regards, Heidi