on 10-25-2007 9:41 AM
Hi ,
I want to display the check table entries used in a
Domain field in a dropdown box.
for this i created a dropdown box using ui element dropdown by index.
how can display entries in the dropdown.
please specify the context details also for this.
if possible give me the code.
please help me out.
points are sure.
thanks,
sushant
u the following code with drop down by key
field-symbols: <EXT_F> type tablename.
data: node_info type ref to if_wd_context_node_info.
data: value type wdy_key_value,
value_set type wdy_key_value_table.
node_info = wd_context->get_node_info( ).
node_info = node_info->get_child_node( `NODENAME` ).
call method cl_wd_dynamic_tool=>get_table_data
exporting
tab_name = 'table name'
row_count = 0
importing
data = internal table .
loop at internal table assigning <EXT_F> .
value-key = <EXT_F>-element name.
value-value = <EXT_F>-element name.
insert value into table value_set.
endloop.
node_info->set_attribute_value_set( name = `ATTRIBUTE NAME` value_set = value_set ).
clear : value, value_set.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suhail,
For the code which u gave for 'dropdown by index' , I have a querry.
" If we use this logic , the value is not getting defaulted in the dropdown .how to default the values in the dropdown . "
The code which u gave was:
u the following code with drop down by key
field-symbols: <EXT_F> type tablename.
data: node_info type ref to if_wd_context_node_info.
data: value type wdy_key_value,
value_set type wdy_key_value_table.
node_info = wd_context->get_node_info( ).
node_info = node_info->get_child_node( `NODENAME` ).
call method cl_wd_dynamic_tool=>get_table_data
exporting
tab_name = 'table name'
row_count = 0
importing
data = internal table .
loop at internal table assigning <EXT_F> .
value-key = <EXT_F>-element name.
value-value = <EXT_F>-element name.
insert value into table value_set.
endloop.
node_info->set_attribute_value_set( name = `ATTRIBUTE NAME` value_set = value_set ).
clear : value, value_set.
Please let us know early so that it will be most helpful for us.
Thanks,
Hema.
Hi Sushant
To display check table entries, u simply take UIElement "InputField" instead of drop down by key or by index.
Create a context node and add one attribute to it of the type of field which you want to display on screen.
Go in to the check table which you want to use to display the possible entries.
See if any of the search help attached to the field you want to use.
if yes then copy the name of the search help
Go back to the context attribute which you created
Under property section of that context attribute, set
"
input help mode" field as automatic, in field "determinded input help" enter the search help name copied from check table.
activate your WD component and test it.
If search help is not in the check table, then simply create a search help and in the selection method of that search help, enter the name of your check table.
Thanks
Vishal Kapoor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sushant,
The better way to achieve this is to have a DropDownByKey. The selectedKey property of the drop down should be bound to an attribute in the context. You also need to create a value set and attach it to the node info. This can be done by creating a list of values of type WDY_KEY_VALUE_TABLE from the check table and then calling the method SET_ATTRIBUTE_VALUE_SET on the node info.
Hope this helps.
Regards,
Neha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.