cancel
Showing results for 
Search instead for 
Did you mean: 

Read Only Mode Input Search Help

Former Member
0 Kudos

I created one ovs search help....but i want to restrict manual entry....means with out using search help should give any value for input field ...how to do this?????????

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Yes there is a way to do that as said by Sree in the above reply.If iam not wrong ,you want to replace F4 help with some other alternative which can give user a field with some input values isn't it.If it is so as said by 'Sree',try to create a dropdownbyKey input element in your view.

2. To populate the values into your input field for dropdown area,go and write some code in wddoinit of component controller and get the node information of this dropdown element and write a select query to extract field values from corresponding table into some work area or a header table .Iam providing you some code below which can give all plant details with its description as key value.

3.In this, node will be created as 0...n or 1...n depending upon your knowledge on whether or not values exist in table.Bind this dropdown to this node.

-


method wddoinit .

types: begin of ty_werks,

werks(5) type c,

name1(20) type c,

end of ty_werks.

data lo_nd_node1 type ref to if_wd_context_node.

data lo_el_node1 type ref to if_wd_context_element.

data lo_node_info type ref to if_wd_context_node_info.

data ls_node1 type wd_this->element_node1.

data lt_werks type standard table of ty_werks.

data lx_werks type ty_werks.

data lt_key type standard table of wdy_key_value.

data lx_key type wdy_key_value.

select werks name1 from t001w into table lt_werks.

loop at lt_werks into lx_werks.

lx_key-key = lx_werks-werks.

lx_key-value = lx_werks-name1.

append lx_key to lt_key.

endloop.

lo_nd_node1 = wd_context->get_child_node( name = wd_this->wdctx_node1 ).

lo_node_info = lo_nd_node1->get_node_info( ).

lo_node_info->set_attribute_value_set(

exporting name = 'PLANT'

value_set = lt_key ).

**

endmethod.

-


wdy_key_value is a SAP standard types table already existing.Which has two fields in it,

Key--plant (0001)

value-plant description

Finally with this your dropdown will be populated with value field of wdy_key_value in it.please go through this,it will surely work,if you get any errors,please feel free to post queries.Thanks.

Former Member
0 Kudos

If i understand your requirement correctly then i think you have to use one more input field.

use this input field for manual entry and to display the value being selected from Search help.

Place your ovs search help field next to the input field with 0 pixel so that you can see only the value help icon next to the input field.

KiranJ
Active Participant
0 Kudos

For this we can use Drop down by Key instead of F4 help .