on 08-11-2011 3:34 PM
Hello Experts,
I am using Select options in web dynpro abap.
On a particular View container i have added a selection field using ADD_SELECTION_FIELD which has an OVS help to it.
The selection field is of type CODE.
And on click of a button i am reading the select option fields using GET_RANGE_TABLE_OF_SEL_FIELD and assigining this to a
field symbol which inturn is being set to an attribute.
My requirement is to show the TEXT to the user and send the CODE to the method which is called
when the button is clicked and a table is populated.
Normally we can keep two attributes one for TEXT and the other for CODE but for Select options i am not very sure how this can be achieved.
Because in select options we are reading the values present on the select option field and there may be multiple values.
Please guide me through this.
Thanks in Advance,
Shravan
Hi.,
Check this article : [How to Create OVS for Select Options|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/707f0d73-94f0-2d10-97a2-a3776e2118d8?quicklink=index&overridelayout=true]
hope this helps u.,
Thanks & Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Shravan,
This can be easily achieved if you convert the selection field to dropdown.
Create a valueset containing the list of valid values and then pass this to the ADD_SELECTION_FIELD method
"Creating valueset
DATA lt_valueset TYPE wdy_key_value_table.
DATA ls_valueset LIKE LINE OF lt_valueset.
ls_valueset-key = 'EN'.
ls_valueset-value = 'English'.
APPEND ls_valueset TO lt_valueset.
"Creating selection field as Dropdown
lr_helper->add_selection_field( i_id = <ID>
it_result = lt_range
i_as_dropdown = abap_true
it_value_set = lt_valueset ).
BR, Saravanan
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.