cancel
Showing results for 
Search instead for 
Did you mean: 

Show label text on search help field

siongchao_ng
Contributor
0 Kudos

Hi all,

Currently I am using the freely programmed search help field method. I can only show the key value on the search help field. How can I include the description text beside the key value as well? thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI ,

Try creating a new field in the Provider component for description.

Please explain a bit more if the above solution doesnt make sense..:)

Thanks,

Aditya.

siongchao_ng
Contributor
0 Kudos

On the particular field, when I click on the search help, choose value and click on "close" button which will input the key value onto the field, the following code to input the value:

DATA lo_listener type ref to if_wd_value_help_listener.

DATA lv_attrib_name type string.

DATA lo_nd_slart type ref to if_wd_context_node.

DATA lo_el_slart type ref to if_wd_context_element.

DATA ls_slart type wd_this->element_slart.

DATA lv_slart type wd_this->element_slart-slart.

lo_nd_slart = wd_context->get_child_node( name = wd_this->wdctx_slart ).

lo_el_slart->get_attribute(

EXPORTING

name = 'SLART'

IMPORTING

value = lv_slart ).

lo_listener = wd_comp_controller->value_help_listener.

lv_attrib_name = lo_listener->f4_attribute_info-name.

lo_listener->f4_context_element->set_attribute( value = lv_slart

name = lv_attrib_name ).

wd_comp_controller->fire_vh_data_selected_evt( ).

wd_comp_controller->value_help_listener->close_window( ).

Based on the code listed in the provider component, how can I add a text view ui and link the stext from this provider to the user component?

Former Member
0 Kudos

Hi ,

How about adding a table in provider comp with key and description fields?and showing this on F4 click?

Populate both key and description in the WDDOINIT of the view of provider component.

Code what you have posted is correct.

Thanks,

Aditya.

siongchao_ng
Contributor
0 Kudos

There is already a table showing the key value and its description text.

Right now, after i click close button below the table, the code will input the key value on the selected table line onthe the input field. I need to show the description text next to the input field. How?

Abhinav_Sharma
Contributor
0 Kudos

Hi,

What you can do is, you can search for the key selected by a user in the internal table (which contains the Key as well as description).

Once you get the key, copy its description in the attribute. Later this attribute can be display to the user by data binding to a textview UI element.

Hope this helps you

Regards

Abhinav

Answers (0)