cancel
Showing results for 
Search instead for 
Did you mean: 

value help for select-option not filling selection field

former_member186444
Participant
0 Kudos

I'm having some problems with a value help on a select-option. I've managed to get the value help displaying the correct values but for some reason can't get it to populate the selection field after I've selected a record.

I have the following call:

wd_this->m_handler->add_selection_field(

i_id = 'SHORT_D'

i_description = 'Program'

it_result = lt_range_table

i_read_only = read_only

i_value_help_type = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_SEARCHHELP

i_value_help_id = 'ZPROGSTUDY' ).

where ZPROGSTUDY is a new search help I've set up with an exit to retrieve the values.

Any ideas ? Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

Madhu2004
Active Contributor
0 Kudos

hi,

when you select the value in the custom F4 component you are using for freely programmed help,

set the value of the fileds using F4_CONTEXT_ELEMENT attibute of IF_WD_VALUE_HELP_LISTENER interface.

Regards,

Madhu

Former Member
0 Kudos

Hi,

Are you saying the selection is not taken over from the search help? (this is the behaviour in RO mode)

What is read_only set to? It should be set to false

Regards,

George

former_member186444
Participant
0 Kudos

Hi George,

that's right, the value selected is not taken back to the selection screen. Read Only is set to false but that is making no difference.

thanks for your reply. Any other ideas ?

Malcolm.

Former Member
0 Kudos

Hi Malcolm,

The code you have is OK. I copied your code into a test program and it worked as expected.

I used a search help where the possible values are populated in the search help exit, exactly as in your case. The only time it did not work was when read_only = X, but that is obvious also from a visual point of view since the input field is greyed out in that case. The popup also tells you is in RO mode...

Does your SHLP work when you test it from SE11? Returns values?

SAP provides a lot of WD4A sample code, see for example component WDR_TEST_SELECT_OPTIONS look for

select-option fields > special cases > input helps > Non field-specific input help using search help

Regards,

George

former_member186444
Participant
0 Kudos

good suggestion George. When I try to run the search help from SE11, despite it being set up in exactly the same way as my previous search help, which works fine, I get an error I've not seen before:

"search help: internal error"

former_member186444
Participant
0 Kudos

forget that. I've managed to get rid of the error.

After I select a value, I'm now getting 'No values selected' when processing returns to the selection screen.