on 03-13-2010 4:45 PM
I have a field on my Webdynpro defined as DropDownByKey.
The field's list for the dropdown list is coming from a domain with a list of all the values.
I want to default the field to one of the values in the list from the domain, but I want the description, not the key value to default or showup as the default.
I don't see the method to use in class CL_WD_DROPDOWN_BY_KEY. Is there a method or someway to do this?
Thanks
John
FILL THE BELOW CODE AFTER FILLING THE DROP DOWN
data: lr_node type ref to if_wd_context_node.
lr_node = wd_context->get_child_node( 'CN_TEST ).
lr_node->set_attribute( exporting name = 'VALID'
VALUE = 'CHOICE' ).
HERE CHOICE IS A DEFAULT VALUE .. FOR THE DROP DOWN
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nevermind. Found it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sujay,
I found out the easiest way around this without adding any code.
If you have a field on your iView that points to a structure or table field where the domain for that particular field is a list of values, typically the doman has a fixed value as the key and then the short description.
In most cases the user does not want to see the key fixed value, just the description.
When you add this field to your iView, you must choose the properties DropDownByKey. This will take care of showing the description and not the fixed key value. And not to worry, the value stored to the database will be the fixed value and not the description.
Johnny
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.